Network topology configuration method, communication system, and related device

By determining the link switching configuration of optical switching equipment before AI model training through the network controller, the problem of large reconstruction latency of optical switching equipment is solved, realizing efficient optical-electric hybrid network topology reconstruction and reducing hardware costs and complexity.

WO2026103859A1PCT designated stage Publication Date: 2026-05-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2025-11-14
Publication Date
2026-05-21

Smart Images

  • Figure CN2025134998_21052026_PF_FP_ABST
    Figure CN2025134998_21052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a network topology configuration method, a communication system, and a related device. In the method, before distributed training of an AI model begins, a network controller can analyze a training task and determine traffic demand information for the training task. The traffic demand information comprises a bandwidth demand between different processors in a training process of an AI training task. Network topology information of an optical-electrical hybrid network can be determined on the basis of the traffic demand information. Configuration information of an optical switching device is then generated on the basis of the network topology information, so that the optical switching device can perform link switching on the basis of the configuration information and complete topology reconfiguration of the optical-electrical hybrid network. In this way, the network controller can actively perform traffic planning before AI model training, avoiding the problem of large network delay in the training process caused by a slow link switching speed of the optical switching device.
Need to check novelty before this filing date? Find Prior Art

Description

A network topology configuration method, communication system and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202411649607.2, filed on November 18, 2024, with the China National Intellectual Property Administration, entitled “A Network Topology Configuration Method, Communication System and Related Equipment”, the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communications, and in particular to a network topology configuration method, a communication system, and related equipment. Background Technology

[0003] Optical switching equipment offers significant advantages in terms of capacity, cost, and power consumption. Therefore, the industry typically integrates optical switching equipment into electrical switching networks. This hybrid optical-electrical network effectively increases network capacity and reduces network construction costs. However, optical switching equipment operates on a point-to-point port-level forwarding model. Unlike electrical switches, optical switches cannot form fully connected networks; they can only create fixed network topologies through point-to-point ports. This makes it difficult to meet diverse bandwidth requirements. Therefore, hybrid optical-electrical networks often utilize optical cross-connect (OXC) devices to adjust the port mapping of optical signals, enabling switching between different network topologies to support various communication needs.

[0004] Typically, OXC devices have multiple built-in micromirror arrays. By adjusting the angle of the micromirror arrays, the input signal can be deflected to different output ports, thereby achieving port mapping adjustment of the optical signal and enabling switching between different network topologies. However, compared to the flexible forwarding capabilities of electrical switching equipment, port-level switching in OXC suffers from slow port mapping switching speed. If the network topology is dynamically switched according to communication needs during communication, it will generate significant reconstruction latency, affecting the user experience. Summary of the Invention

[0005] This application provides a network topology configuration method, a communication system, and related equipment to solve the problem that dynamically switching the network topology structure according to communication needs during the communication process will generate a large reconstruction delay, which will affect the user experience.

[0006] Firstly, a network topology configuration method is provided. This method is applied to a communication system, which includes a network controller and an optical switching device. The communication system is used to realize communication between multiple processors, which are used for distributed training of an artificial intelligence (AI) model. The method includes the following steps: the network controller obtains training information of the distributed training task, including the parallel strategy used by the distributed training task; the network controller determines the traffic demand information of the distributed training task based on the training information, including the bandwidth demand between multiple processors during the training process; the network controller determines the network topology information of the communication system based on the traffic demand information; and the network controller sends configuration information to the optical switching device based on the network topology information. The configuration information is used to instruct the optical switching device to perform link switching to realize communication connections between multiple processors through the optical switching device.

[0007] The method described in the first aspect involves analyzing the training task through a network controller. At least based on the parallel strategy of the training task, the traffic demand information of the training task is determined, i.e., the bandwidth demand between different processors during training. Based on this traffic demand information, the network topology information of the hybrid optoelectronic network can be determined. Then, configuration information of the optical switching equipment is generated based on the network topology information, enabling the optical switching equipment to perform link switching based on this configuration information, completing the topology reconstruction of the hybrid optoelectronic network, and then starting the training of the AI ​​model. In this way, the network controller proactively performs traffic planning before AI model training, avoiding the problem of high network latency caused by slow link switching speed of the optical switching equipment during training. Furthermore, this solution does not require the detection or analysis of historical network traffic, avoiding traffic detection costs and eliminating the complexity of passive traffic sampling and analysis. Moreover, since the network topology is determined based on the bandwidth demand required by the task, it can eliminate detour traffic, an effect that traditional methods based on detecting historical traffic to determine network topology cannot achieve.

[0008] In one possible implementation, the parallel strategy includes one or more of data parallelism, tensor parallelism, and pipeline parallelism. The network controller determines the traffic requirement information of the distributed training task based on the training information, including the following steps: the network controller determines one or more communication domains according to the parallel strategy, each communication domain includes multiple processors that need to be synchronized with data, the network controller determines the traffic requirement information of each communication domain, and based on the traffic requirement information of each communication domain, determines the traffic requirement information of the AI ​​training task.

[0009] In this context, a communication domain can be understood as a boundary or range for communication. All accelerator cards within the same communication domain need to exchange data. A communication domain is a logical grouping; the same accelerator card may be divided into different communication domains under different parallel training methods. For example, if card A needs to communicate with cards B and C under the tensor parallel method, then cards A, B, and C constitute a communication domain under the tensor parallel method. If card A needs to communicate with cards C and D under the data parallel method, then cards A, C, and D constitute a communication domain under the data parallel method. Typically, distributed training can use one or more parallel methods, so the network controller can determine one or more communication domains for each parallel method based on device information and parallel strategies.

[0010] The above implementation, based on one or more parallel strategies used in distributed training tasks, can determine multiple communication domains within the entire communication system. The same processor may belong to different parallel strategies under different parallel strategies, and the corresponding communication requirements need to be accumulated or merged for calculation. This application determines the communication domain under each parallel strategy, determines the traffic requirement information of each communication domain, and then determines the traffic requirement information of all communication domains to which each accelerator card belongs, thereby determining the bandwidth requirement among multiple processors in the entire communication system, which is the traffic requirement information of the AI ​​training task. This method can accurately and quickly obtain the traffic requirement information of the communication system without needing to detect data communication traffic in the network or record historical data traffic. This not only reduces hardware costs but also allows for flexible handling of AI training tasks under various conditions. Even for AI training tasks that have not been processed previously, the corresponding traffic requirement information can be obtained by analyzing their parallel strategies, flexibly meeting various business needs.

[0011] In one possible implementation, the training information also includes a set communication strategy, which includes the communication strategy used for data synchronization between multiple processors during the execution of the parallel strategy. When the network controller determines the traffic demand information for each communication domain, it includes the following steps: the network controller determines one or more communication pairs in each communication domain according to the set communication strategy, each communication pair includes a pair of processors that send and receive in their respective communication domain, the network controller determines the traffic volume of each communication pair based on the parallel strategy and the set communication strategy, and the network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair.

[0012] In this context, a communication domain can be understood as a boundary or range of communication. All accelerator cards within the same communication domain need to exchange data. A communication domain is a logical grouping; the same accelerator card may be divided into different communication domains under different parallel training methods. For example, if card A needs to communicate with cards B and C under the tensor parallel method, then cards A, B, and C constitute a communication domain under the tensor parallel method. If card A needs to communicate with cards C and D under the data parallel method, then cards A, C, and D constitute a communication domain under the data parallel method. Typically, distributed training can use one or more parallel methods, so the network controller 210 can determine one or more communication domains under each parallel method based on device information and parallel strategies.

[0013] Furthermore, the communication pair obtained from the communication domain refers to the two accelerator cards that specifically send and receive data within the communication domain. Each communication domain can include one or more communication pairs. Typically, each parallel strategy may support different traffic patterns, and the corresponding communication pairs will also differ. Here, the traffic pattern refers to the way data is exchanged between the accelerator cards, describing how data flows between computing nodes when the distributed training system executes the parallel strategy. It should be understood that the parallel strategy focuses on how to split, allocate, and coordinate the overall training task across the accelerator cards, while the traffic pattern focuses on how specific data is transferred between them. Therefore, based on the parallel strategy, it can be determined which accelerator cards need to communicate, and the traffic pattern can determine the direction of data flow between the accelerator cards that need to communicate, thus obtaining multiple communication pairs. In specific implementations, the traffic pattern may include rings, hierarchical decomposition (Havling and doubling, HD), double binary trees (DBtree), etc., which are not specifically limited in this application.

[0014] In simple terms, after identifying at least one communication pair in each communication domain, the communication volume of the communication pair can be determined by combining parallel strategies and traffic patterns. This yields the communication volume of multiple communication pairs in different communication domains under different parallel strategies. Then, based on the communication volume of the communication pair, the traffic demand of the communication link carrying that traffic is determined, thereby determining the traffic demand information of the entire communication system. Finally, based on the traffic demand information, the topology information of the optoelectronic hybrid network is determined.

[0015] As discussed above, the parallel strategy focuses on how to break down, allocate, and coordinate the overall training task across various accelerator cards, while the traffic pattern focuses on how data is transferred between different accelerator cards. Therefore, based on the parallel strategy and traffic pattern, the traffic volume of each communication pair can be determined. After obtaining the traffic volume of multiple communication pairs, the traffic volume between each pair of accelerator cards in different communication domains can be accumulated and merged to obtain the overall traffic demand information of the communication system.

[0016] The above implementation, based on the aggregated communication strategy used in distributed training tasks, can identify the communication pairs existing in each communication domain—that is, the two processors for sending and receiving—and thus determine the communication volume of each pair, obtaining the bandwidth requirements of each communication domain and the overall traffic requirements of the training task. This method obtains the traffic requirements of the communication system through the model's training information and then determines the network topology based on this information. This scheme does not require detecting or analyzing historical network traffic, avoiding traffic detection costs and eliminating the complexity of passive traffic sampling and analysis. Furthermore, since the network topology is determined based on the bandwidth requirements of the task, it eliminates detour traffic, an effect that traditional methods based on detecting historical traffic cannot achieve.

[0017] In one possible implementation, the method further includes the following steps: the network controller sends a notification message to the AI ​​platform, the notification message being used to notify the AI ​​platform to begin executing a distributed training task.

[0018] In a specific implementation, after receiving the configuration information sent by the network controller, the optical switching device can switch the optical communication link based on the configuration information, such as establishing a connection between port 1 of OXC1 and port 3 of OXC2, configuring the corresponding bandwidth and link delay requirements, etc., to complete the topology of the optoelectronic hybrid network. This application does not make any specific limitations.

[0019] Furthermore, after completing the topology reconstruction of the optoelectronic hybrid network, the network controller can notify the distributed training system to start model training. In this way, before the AI ​​task runs, the traffic demand information of the AI ​​task can be determined based on the training information and device information of the AI ​​task. Then, the topology reconstruction of the optoelectronic hybrid network can be performed based on the traffic demand information, which can eliminate the impact of the slow switching speed of optical switching equipment on the communication system. At the same time, this method does not require the detection or analysis of historical network traffic, which can avoid traffic detection costs and eliminate the complexity brought about by passive traffic sampling and traffic analysis.

[0020] Understandably, dynamically adjusting the optoelectronic hybrid network during model training can reduce network communication efficiency due to slow link switching speeds of optical switching equipment. This application, however, pre-plans an optoelectronic hybrid network that meets the communication requirements of the training task before model training, effectively avoiding this problem. Furthermore, planning the network before model training eliminates the need to detect historical traffic, avoiding the detection costs associated with traffic monitoring. For training tasks that haven't been processed previously, the application can generate the corresponding optoelectronic hybrid network topology based on device and training information, solving the problem of determining the optoelectronic hybrid network structure for complex and ever-changing communication needs.

[0021] In one possible implementation, the network controller determines the traffic requirement information for each communication domain based on the traffic of each communication pair, including the following steps: the network controller identifies multiple repeating communication pairs that communicate using repeating communication links from multiple communication pairs; the network controller determines the bandwidth requirement of the repeating communication links based on the traffic of the multiple repeating communication pairs; and the network controller determines the traffic requirement information for each communication domain based on the traffic of each communication pair and the bandwidth requirement of the repeating communication links.

[0022] It should be understood that when determining the bandwidth requirement of a communication link based on the traffic of communication pairs, if a communication link only needs to carry the communication needs of one communication pair, then the traffic of that communication pair is the bandwidth requirement of that communication link. If a communication link needs to carry the communication needs of multiple communication pairs, then that communication link can be understood as a duplicated communication link, and in this case, the bandwidth requirement of the duplicated communication link needs to be determined based on the traffic of the multiple communication pairs it carries.

[0023] In the above implementation, under multiple parallel strategies, each processor may belong to multiple communication domains, and the communication links between processors may carry the communication volume under multiple parallel strategies. Therefore, we can first determine the communication domain, then determine the communication pair, then filter the duplicate communication pair, and calculate the bandwidth requirement of the duplicate communication pair. This can make the final network topology more accurately meet the communication requirements of the training task and improve the processing efficiency of subsequent distributed training tasks.

[0024] In one possible implementation, the network controller can merge the traffic of multiple repeating optical communication pairs that communicate using repeating communication links in the same time period and with different communication directions to obtain the bandwidth requirement of the repeating communication links, wherein the bandwidth requirement includes the maximum value of the traffic of multiple repeating optical communication pairs.

[0025] Optionally, the network controller can sum the traffic of multiple repeating optical communication pairs that communicate using the repeating communication link in the same time period and in the same direction to obtain the bandwidth requirement of the repeating communication link, wherein the bandwidth requirement includes the sum of the traffic of multiple repeating optical communication pairs.

[0026] Optionally, the network controller can obtain the bandwidth limit of the repeating communication link, and based on the bandwidth limit, obtain multiple repeating optical communication pairs to be merged from multiple repeating optical communication pairs that use the repeating communication link to communicate in different time periods. Based on the communication volume of the multiple repeating optical communication pairs to be merged, determine the bandwidth requirement of the repeating communication link, wherein the bandwidth requirement includes the sum of the communication volume of the multiple repeating optical communication pairs to be merged, and the bandwidth requirement is not greater than the bandwidth limit.

[0027] It should be understood that the above examples illustrate some possible scenarios of duplicate communication pairs. In specific implementations, the bandwidth requirements corresponding to the duplicate communication links of duplicate communication pairs can be flexibly calculated based on the actual business scenarios. Examples will not be provided here.

[0028] The above implementation calculates the bandwidth requirement of the repeated communication link in different ways for each possible repeated communication pair, so that the final network topology matches the actual communication needs. It also merges some communication traffic that can be merged, making the designed network topology more streamlined and eliminating detour traffic.

[0029] In one possible implementation, the network controller determines the bandwidth requirement of a repeating communication link based on the traffic of multiple repeating communication pairs, including the following steps: the network controller uses the repeating communication link to communicate in the same time period and the communication direction is the same for a first repeating communication pair and a second repeating communication pair, the first traffic of the first repeating communication pair is greater than the second traffic of the second repeating communication pair, the network controller modifies the communication direction of the first repeating communication pair, or adjusts the communication order of the first repeating communication pair in the corresponding set communication strategy, and the network controller determines the bandwidth requirement of the repeating communication link including the first traffic.

[0030] It should be understood that during aggregated communication, computing nodes need to communicate according to a certain algorithm to achieve data synchronization. Therefore, if the communication direction or order of one optical communication pair is modified, the communication method or order of other communication pairs in the same traffic mode must be adjusted accordingly to ensure that data synchronization between computing nodes is not affected. In specific implementations, the overall communication direction and order can be adjusted based on the traffic mode.

[0031] In the above implementation, for multiple repeating optical communication pairs that share the same communication direction within the same time period, the network controller can adjust the communication order or communication direction of at least one of the repeating optical communication pairs. This allows repeating optical communication pairs that occupy the same communication link to communicate in a staggered manner, avoiding link overload issues, saving bandwidth resources, and reducing hardware costs.

[0032] In one possible implementation, the communication system further includes multiple switching groups, each including at least one electrical switching device. The switching group establishes a communication connection with at least one of multiple processors. The optical switching device establishes a communication connection with the multiple switching groups. The network controller determines the traffic demand information of each communication domain based on the traffic of each communication pair, including the following steps: the network controller determines multiple optical communication pairs that communicate using optical communication links from the multiple communication pairs in each communication domain. The optical communication links pass through the optical switching device. The network controller determines the traffic demand information of each communication domain based on the traffic of the multiple optical communication pairs.

[0033] The above implementation method reduces the amount of data required for traffic demand calculation by screening optical communication links to determine traffic demand information. The purpose of this application is to obtain the configuration information of optical switching equipment so that the network topology can be reconstructed by switching optical switching links. Therefore, the traffic demand within the switching group is irrelevant to the subsequently issued configuration information. Thus, when determining the topology information, the calculation can mainly focus on the bandwidth demand of duplicate optical communication links to ensure that the bandwidth demand of the optical switching equipment is accurate, making the subsequently obtained configuration information of the optical switching equipment more accurate. Whether the electrical communication links are duplicated can be disregarded, thereby reducing the amount of calculation, improving the efficiency of topology information acquisition, and thus improving the efficiency of topology reconstruction in optoelectronic hybrid networks.

[0034] In one possible implementation, the network controller determines the network topology information of the communication system based on traffic demand information by including the following steps: the network controller obtains constraint information, updates the traffic demand information based on the constraint information, and obtains updated traffic demand information. The constraint information includes global traffic constraints and single-task traffic constraints. The global traffic constraints are used to impose bandwidth constraints on the global traffic of the communication system, and the single-task traffic constraints are used to impose bandwidth constraints on multiple communication links of the communication system. The network controller determines the network topology information of the communication system based on the updated traffic demand information.

[0035] The constraint information includes limitations and conditions inherent in the network topology design of hybrid optoelectronic networks, such as bandwidth constraints (limiting the bandwidth of links to ensure data traffic does not exceed the maximum carrying capacity of the link), latency constraints (ensuring network latency during data packet transmission does not exceed a set threshold), and security constraints (some links need to follow specific security policies, such as traffic isolation or encryption, to protect sensitive data). Further constraints may be included, but this application does not specify them.

[0036] In practical implementation, the traffic demand matrix can be adjusted based on constraint information. While ensuring the symmetry of the traffic demand matrix, the bandwidth constraints specified in the constraint information are met, ensuring that the sum of corresponding elements in the traffic demand matrix is ​​no greater than the value specified in the constraint information. For example, if it is a global bandwidth constraint, the sum of all rows and columns in the updated traffic demand matrix is ​​no greater than the value of the global bandwidth constraint. If it is a single-task bandwidth constraint, the sum of the elements corresponding to that single task in the updated traffic demand matrix is ​​no greater than the value of the single-task bandwidth constraint. The constraint information can be user-configured or preset by the communication system based on historical scenarios. Different scenarios have corresponding constraint information, and this application does not impose specific limitations.

[0037] The above implementation method, after obtaining the updated traffic demand matrix based on constraint information, can determine the necessary links and the bandwidth required for each link according to the traffic demand between each accelerator card in the traffic demand matrix. Combined with the equipment information of the communication system, a suitable topology can be determined. The finally generated topology information can include the devices included in the optoelectronic hybrid network to be reconstructed, and the connection relationships between the devices. Specifically, it can include information on the switching groups included in the optoelectronic hybrid network to be reconstructed, and information on the optical switching equipment that enables data communication between the switching groups. The technical solution of this application can not only determine the corresponding traffic demand information based on AI tasks and customize an optoelectronic hybrid network structure that meets the communication requirements of the AI ​​task, but also meet deeper traffic isolation and sharing service requirements based on different service scenarios when multiple AI tasks exist. It has wide applicability and strong solution flexibility.

[0038] In one possible implementation, the network controller determines the network topology information of the communication system based on traffic demand information by including the following steps: the network controller determines the network topology information of the communication system using a load balancing algorithm based on the traffic demand information.

[0039] Optionally, after obtaining the traffic demand matrix of the communication system based on the above process, the traffic demand matrix can be updated by combining some load balancing algorithms to obtain an updated traffic demand matrix. A load balancing algorithm is an algorithm used to rationally allocate network traffic and computing tasks, avoiding overload of a single resource, thereby improving network performance and resource utilization. Load balancing algorithms may include, but are not limited to, least connections, weighted round-robin, and integer programming algorithms such as minimizing maximum link utilization, etc., and this application does not impose specific limitations. Thus, by determining the network topology information based on the updated traffic demand matrix, a load-balanced network topology can be obtained.

[0040] The above implementation method, after determining the traffic demand information, combined with the load balancing algorithm, can make the final obtained network topology information more accurate, eliminate detour traffic, improve the communication efficiency of subsequent AI training tasks, and save hardware costs. This is an effect that the traditional method of determining network topology based on detecting historical traffic cannot achieve.

[0041] Secondly, a network controller is provided, which is applied to a communication system. The communication system includes the network controller and optical switching equipment. The communication system is used to realize communication between multiple processors, which are used for distributed training of artificial intelligence (AI) models. The network controller includes: an acquisition unit for acquiring training information of the distributed training task, including the parallel strategy used by the distributed training task; a demand determination unit for determining the traffic demand information of the distributed training task based on the training information, including the bandwidth demand among multiple processors during the training process; a topology determination unit for determining the network topology information of the communication system based on the traffic demand information; and a configuration determination unit for sending configuration information to at least one optical switching equipment based on the network topology information. The configuration information is used to instruct the optical switching equipment to perform link switching to realize communication connections between multiple switching groups through the optical switching equipment.

[0042] Implementing the network controller described in the second aspect, before the distributed model training begins, the network controller analyzes the training task and determines the traffic demand information of the training task based at least on the parallel strategy of the training task, that is, the bandwidth demand between different processors during the training process. Based on this traffic demand information, the network topology information of the optoelectronic hybrid network can be determined. Then, based on the network topology information, the configuration information of the optical switching equipment is generated, so that the optical switching equipment can perform link switching based on the configuration information to complete the topology reconstruction of the optoelectronic hybrid network. Then, the training of the AI ​​model begins. In this way, the network controller actively performs traffic planning before the AI ​​model training, which can avoid the problem of large network latency caused by slow link switching speed of optical switching equipment during training. At the same time, this solution does not need to detect or analyze historical network traffic, which can avoid traffic detection costs and eliminate the complexity brought by passive traffic sampling and traffic analysis. Moreover, since the network topology is determined according to the bandwidth demand required by the task, it can eliminate detour traffic, which is an effect that cannot be achieved by the traditional method of determining network topology based on detecting historical traffic.

[0043] In one possible implementation, the parallel strategy includes one or more of data parallelism, tensor parallelism, and pipeline parallelism. The demand determination unit is used to determine one or more communication domains according to the parallel strategy. Each communication domain includes multiple processors that need to be synchronized with data. The demand determination unit is used to determine the traffic demand information of each communication domain and, based on the traffic demand information of each communication domain, determine the traffic demand information of the AI ​​training task.

[0044] In one possible implementation, the training information also includes a set communication strategy, which includes the communication strategy used for data synchronization between multiple processors during the execution of the parallel strategy. A demand determination unit is used to determine one or more communication pairs in each communication domain according to the set communication strategy. Each communication pair includes a pair of processors that send and receive in their respective communication domain. A demand determination unit is used to determine the communication volume of each communication pair based on the parallel strategy and the set communication strategy. A demand determination unit is used to determine the traffic demand information of each communication domain based on the communication volume of each communication pair.

[0045] In one possible implementation, the network controller further includes a sending unit for sending a notification message to the AI ​​platform, the notification message being used to notify the AI ​​platform to begin executing a distributed training task.

[0046] In one possible implementation, a demand determination unit is used to determine multiple repeating communication pairs from multiple communication pairs that communicate using repeating communication links; a demand determination unit is used to determine the bandwidth demand of the repeating communication links based on the communication volume of the multiple repeating communication pairs; and a demand determination unit is used to determine the traffic demand information of each communication domain based on the communication volume of each communication pair and the bandwidth demand of the repeating communication links.

[0047] In one possible implementation, the demand determination unit is used to determine the bandwidth requirements of the repeating communication links, including the first repeating communication pair and the second repeating communication pair, which are used by the network controller to communicate in the same time period and have the same communication direction. The first communication volume of the first repeating communication pair is greater than the second communication volume of the second repeating communication pair. The demand determination unit is also used to modify the communication direction of the first repeating communication pair or adjust the communication order of the first repeating communication pair in the corresponding set communication strategy. The demand determination unit is also used to determine the bandwidth requirements of the repeating communication links, including the first communication volume.

[0048] In one possible implementation, the communication system further includes multiple switching groups, each including at least one electrical switching device. The switching group establishes a communication connection with at least one of multiple processors. The optical switching device establishes a communication connection with the multiple switching groups. The network controller determines the traffic demand information for each communication domain based on the traffic of each communication pair. This includes: the network controller determining multiple optical communication pairs that communicate using optical communication links from the multiple communication pairs in each communication domain. The optical communication links pass through the optical switching device. The network controller determines the traffic demand information for each communication domain based on the traffic of the multiple optical communication pairs.

[0049] In one possible implementation, a topology determination unit is used to acquire constraint information, update traffic demand information based on the constraint information, and obtain updated traffic demand information. The constraint information includes global traffic constraints and single-task traffic constraints. Global traffic constraints are used to impose bandwidth constraints on the global traffic of the communication system, and single-task traffic constraints are used to impose bandwidth constraints on multiple communication links of the communication system. The topology determination unit is used to determine the network topology information of the communication system based on the updated traffic demand information.

[0050] In one possible implementation, a topology determination unit is used to determine the network topology information of the communication system using a load balancing algorithm based on traffic demand information.

[0051] Thirdly, a communication system is provided, comprising a network controller and an optical switching device. The communication system enables communication between multiple processors, which are used for distributed training of an artificial intelligence (AI) model. The network controller is used to implement the method described in the first aspect.

[0052] Fourthly, a computing device is provided, the computing device including a processor and a memory, the memory for storing instructions and the processor for executing the instructions, such that the computing device implements the method described in the first aspect.

[0053] Fifthly, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and the instructions are executed by a computing device or a cluster of computing devices to implement the method described in the first aspect.

[0054] In a sixth aspect, a computing device cluster is provided, the computing device cluster including at least one computing device, each of the at least one computing device including a processor and a memory, the processor of the at least one computing device being configured to execute instructions stored in the memory of the at least one computing device to cause the computing device cluster to implement the method as described in the first aspect.

[0055] In a seventh aspect, a computer program product comprising instructions is provided, the computer program product including instructions capable of running on a computing device or stored in any available medium, and when the computer program product is run on a computing device or a cluster of computing devices, causing the computing device or cluster of computing devices to perform the method described in the first aspect.

[0056] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0057] Figure 1 is an architecture diagram of a communication system provided in this application;

[0058] Figure 2 is an example diagram of a communication system deployed in a cloud environment according to this application;

[0059] Figure 3 is a flowchart illustrating the steps of a network topology configuration method provided in this application;

[0060] Figure 4 is an example diagram of the communication domain for multiple parallel strategies in an application scenario;

[0061] Figure 5 is a flowchart illustrating the steps for determining a communication pair in one application scenario provided in this application.

[0062] Figure 6 is a flowchart illustrating the steps of adjusting the communication direction in a network topology configuration method provided in this application.

[0063] Figure 7 is a flowchart illustrating the steps of adjusting the communication sequence in a network topology configuration method provided in this application.

[0064] Figure 8 is a schematic diagram of a process for updating the traffic demand matrix based on global traffic constraints provided in this application;

[0065] Figure 9 is a schematic diagram of a process for updating the traffic demand matrix based on single service traffic constraints provided in this application;

[0066] Figure 10 is a schematic diagram of the structure of a network controller provided in this application;

[0067] Figure 11 is a schematic diagram of the structure of a computing device provided in this application;

[0068] Figure 12 is an example diagram of a computing device cluster provided in this application. Detailed Implementation

[0069] With the continuous development of AI technology, the scale of models is getting larger and larger, triggering an explosive growth in AI training computing power. The gap between computing power demand and the capability of a single card is widening. To address the growing demand for computing power, distributed systems are usually used to train AI models. However, with the continuous growth of model and cluster sizes, distributed systems based on traditional switching networks are gradually facing challenges in terms of both switching speed and network scale.

[0070] Compared to electrical switching equipment, optical switching equipment has significant advantages in terms of capacity, cost, and power consumption. Therefore, the industry is gradually incorporating optical switching equipment into electrical switching networks. This hybrid optical-electrical network can effectively improve network capacity and reduce network construction costs. Taking a million-card cluster with a full-box network as an example, the hybrid optical-electrical network can reduce network costs by 27% and power consumption by 20%. Therefore, using a hybrid optical-electrical network can effectively overcome the switching rate bottleneck and network scale bottleneck of distributed systems.

[0071] Unlike electrical switching equipment, which offers full connectivity, optical switching equipment operates on a point-to-point, port-level forwarding model. It can only form a fixed network topology through point-to-point ports, making it difficult to meet diverse bandwidth demands. Therefore, hybrid optical-electrical networks typically rely on OXC (Optical Cross-Connect) devices to adjust the port mapping of optical signals, enabling switching between different network topologies to support varying communication requirements. Typically, OXC devices contain multiple micromirror arrays. By adjusting the angle of these arrays, the input signal can be deflected to different output ports, thus adjusting the port mapping of the optical signal and enabling switching between different network topologies.

[0072] However, compared to the flexible forwarding capabilities of electrical switching equipment, port-level switching OXC suffers from slow port mapping switching speed. If the network topology of the optoelectronic hybrid network is dynamically switched according to communication needs during the communication process, a large reconstruction delay will be generated. For example, the reconstruction delay of the electrical interconnection network topology is generally around 160ns, while the reconstruction delay of the optical interconnection network topology can reach 10ms, making it difficult for the optoelectronic hybrid network to achieve dynamic switching for different communication needs.

[0073] To avoid latency caused by dynamic switching, optical switching equipment typically predicts communication needs based on certain algorithms before communication begins, generates a corresponding network topology, and obtains the relevant configuration information for the optical switching equipment. However, predicting communication needs is very difficult. The industry usually predicts future communication needs based on historical network traffic patterns. However, this not only requires switches and network controllers to reserve a large amount of storage space to store historical network traffic, leading to increased hardware costs, but also makes it difficult to reconstruct the corresponding network topology in advance for some communication needs that have never appeared before. Especially in the field of Artificial Intelligence (AI), when AI models are trained in a distributed manner, different models use different parallel training methods and different ensemble communication methods, requiring different resources and correspondingly different network topologies. In the distributed training scenario of AI models, communication needs become more complex and variable, making it difficult to match AI service traffic demands with network topology in a hybrid optical-electrical network.

[0074] In summary, optical switching equipment has significant advantages in terms of capacity, cost, and power consumption. Therefore, the industry typically integrates optical switching equipment into electrical switching networks. This hybrid optical-electrical network effectively increases network capacity and reduces network construction costs. However, compared to the flexible forwarding capabilities of electrical switching equipment, port-level switching (OXC) suffers from slow port mapping switching speeds. If the network topology of the hybrid optical-electrical network is dynamically switched according to communication needs during communication, significant reconfiguration latency will occur, impacting the user experience.

[0075] To address the issue of slow link switching speed of optical switching equipment leading to large network reconfiguration delays in hybrid optoelectronic networks, this application provides a method for determining network topology information. This method is applied to a communication system including a network controller and optical switching equipment. The communication system enables communication between multiple processors for distributed training of an artificial intelligence (AI) model. After the network controller obtains training information for the distributed training task, it can determine the traffic demand information of the distributed training task based on the parallel strategy in the training information—that is, the bandwidth demand between multiple processors during training. Then, based on the traffic demand information, it determines the network topology information of the communication system and sends corresponding configuration information to the optical switching equipment. This allows the optical switching equipment to perform link switching based on the configuration information, enabling communication connections between multiple processors through the optical switching equipment. After the switching is complete, the distributed training task can begin execution. This pre-switching of links based on the training task before training begins avoids the problem of large network delays caused by slow link switching speeds of the optical switching equipment during training. Furthermore, this application determines the network topology based on the traffic demand information determined by the training task, ensuring that the network communication during training is not affected.

[0076] Figure 1 is an architecture diagram of a communication system provided in this application. As shown in Figure 1, the system may include a client 100, a communication system 200, and a distributed training system 300. The communication connection between the communication system 200, the distributed training system 300, and the client 100 can be a wired connection or a wireless connection. Wired connections include Ethernet, dedicated lines, cables, etc., while wireless connections include wireless local area networks (Wi-Fi), cellular networks, etc. It may also include the Internet, local area networks (LANs), etc., which simultaneously support wired and wireless connections. Of course, other connection types may also be included, which are not specifically limited in this application. Furthermore, the number of the client 100, the communication system 200, and the distributed training system 300 in this architecture can be one or more, which is not specifically limited in this application.

[0077] Client 100 is used for human-computer interaction and can be deployed on terminal devices, computing devices, or edge computing devices. Terminal devices include personal computers, smartphones, wearable devices, handheld processing devices, tablets, mobile laptops, augmented reality (AR) devices, virtual reality (VR) devices, smart conferencing devices, etc., without specific limitations. Computing devices can be bare metal servers (BMS), virtual machines, or containers. BMS refers to a general-purpose physical server, such as an ARM server or an x86 server; a virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a virtual machine. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity needs to be used as the virtual machine's hard drive and memory capacity. Each virtual machine has its own independent basic input / output system (BIOS), hard drive, and operating system, allowing it to be operated like a physical machine. A container is a portable software unit that combines an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, eliminating the need to build complex environments and simplifying the application development and deployment process. Edge computing devices are hardware devices located close to the data source or data user.

[0078] The distributed training system 300 can be a cluster of computing devices composed of multiple computing devices. The distributed training system 300 is used to receive training requests for AI models sent by the client 100, and to implement distributed training of the AI ​​model based on these requests. As mentioned above, distributed training of AI models is characterized by complex and variable communication requirements. Therefore, Figure 1 uses the communication system 200 to implement network communication during the AI ​​model training process as an example to illustrate that the technical solution of this application can cope with various complex and variable communication requirements and can determine the corresponding network topology under different communication requirements. In other possible implementations, the AI ​​platform 310 can also be replaced with other types of application platforms; this application does not make specific limitations.

[0079] Furthermore, the distributed training system 300 may include an AI platform 310, a resource manager 320, and computing nodes 330.

[0080] AI Platform 310 is a system or service integrating various AI technologies and tools to help users (including but not limited to developers, enterprises, researchers, etc.) quickly build, train, deploy, and apply AI models. AI Platform 310 can provide users with a training environment for machine learning and deep learning models, supporting various algorithms and frameworks such as TensorFlow and PyTorch. It allows users to deploy trained models to production environments and provides API interfaces, enabling users to easily call AI models to achieve functional integration. For example, image recognition, natural language processing, and speech recognition functions can be directly called through the APIs provided by AI Platform 310. It can also provide users with automated machine learning (AutoML) tools to recommend optimal model parameter configurations, and may include more functions. This application does not limit the specific functional types of the AI ​​platform. In specific implementations, AI Platform 310 can be deployed on one or more computing devices; this application does not impose specific limitations.

[0081] Resource Manager 320 is responsible for detecting, managing, and maintaining the hardware resources of the distributed training system 300, including computing resources, storage resources, and network resources. Specific functions include, but are not limited to, hardware configuration and network configuration of computing nodes 330, fault detection and handling, and monitoring resource usage. Resource Manager 320 ensures that all hardware resources are maintained in optimal condition to support efficient system operation. Common Resource Managers 320 include Kubernetes and Apache Mesos.

[0082] The computing node 330 can be a computing device, a chip, a cluster of computing devices, or a chip system. The description of the computing device is as described above, and this application does not impose specific limitations. The chip may include a processor implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system-on-chip (SoC), or any combination thereof, and this application does not impose specific limitations. It may also include processors or accelerator cards that have good performance when performing machine learning tasks and can improve the speed and efficiency of neural network training, such as graphics processing units (GPUs), neural network processing units (NPUs), data processing units (DPUs), tensor processing units (TPUs), etc., and this application does not impose specific limitations. The computing node 330 can also be a cluster of computing devices composed of multiple computing devices, or a chip system composed of multiple chips. For example, in the example of Figure 1, each computing node 330 includes 8 accelerator cards 331 for distributed training of AI models. Figure 1 is for illustrative purposes only and is not specifically limited in this application.

[0083] The communication system 200 is used to realize data communication between computing nodes 330 in the distributed training system 300, enabling the distributed training system 300 to use multiple computing nodes 330 to complete the distributed training of AI models. For example, the aggregate communication required during the distributed training of AI models can be implemented based on the communication system 200. Specifically, the communication system 200 can be a cluster of communication devices composed of multiple communication devices, wherein the communication devices are devices or chips that have the function of transmitting data through electrical signals and / or optical signals. According to the signal transmission medium, communication devices can be classified into optical communication devices and electrical communication devices. Optical communication devices may include optical switching devices, optical multiplexers, optical splitters, etc., while electrical communication devices may include switches, routers, modems, repeaters, etc., and this application does not make specific limitations.

[0084] Furthermore, the communication system 200 may include a network controller 210 and multiple communication devices, which may include optical switching devices 220 and electrical switching devices 231. The switching group 230 includes multiple electrical switching devices, and each switching group 230 establishes a communication connection with at least one optical switching device 220.

[0085] It should be noted that Figure 1 illustrates an example where switching group 230 consists entirely of electrical switching equipment. In a specific implementation, switching group 230 may also include optical switching equipment. These optical switching devices can have a fixed configuration; that is, the configuration information issued by the network topology configuration method provided in this application only includes the configuration information of the optical switching equipment 220 used to connect switching group 230. Alternatively, these optical switching devices can have a modifiable configuration; that is, the configuration information issued by the network topology configuration method provided in this application includes not only the configuration information of the optical switching equipment 220 used to connect switching group 230, but also the configuration information of the optical switching equipment within the electrical switching group 230. This application does not impose any specific limitations.

[0086] It should be noted that the communication system 200 may include only one or more optical switching devices 220, excluding the switching group 230 shown in Figure 1. That is to say, the optical switching device 220 realizes the communication between processors in the computing nodes 330 in the distributed training system 300. This application does not make specific limitations.

[0087] Network controller 210 is used to control, manage, and optimize data flows in communication system 200, including but not limited to functions such as traffic management, security management, network configuration, and fault recovery. Network controller 210 can receive requests from within communication system 200 or from upper-layer applications, make intelligent decisions based on these requests, and distribute the decision results to communication devices within communication system 200. This allows these communication devices to adjust the network topology, enabling communication system 200 to adapt to constantly changing communication needs. For example, in a Software-Defined Networking (SDN) architecture, network controller 210 can be an SDN controller.

[0088] Optical switching device 220 is a communication device that uses optical signals for data exchange. It can receive commands from network controller 210 to switch the transmission path of optical signals, thereby enabling data forwarding based on optical signals. Specifically, optical switching device 220 can be an optical cross-connect (OXC) device. An OXC device has multiple micromirror arrays built-in. By adjusting the rotation angle of the micromirror arrays, the input signal can be deflected to different output ports, thereby achieving port mapping adjustment of the optical signal and enabling switching between different network topologies. In specific implementations, the OXC device can be a microelectromechanical system (MEMS) OXC, a liquid crystal OXC, a wavelength selective switch (WSS) OXC, a 3D MEMS OXC, an optical switch chip, etc., and this application does not impose specific limitations.

[0089] The switching group 230 may include multiple electrical switching devices 231, and may be an area or cluster composed of multiple electrical switching devices 231. The electrical switching devices 231 may be network communication devices or chips capable of transmitting data via electrical signals, such as switches or routers. Each electrical switching device 231 can provide a dedicated electrical signal path for any two access devices. Specifically, if the electrical switching device 231 is a Layer 2 switch (link layer switch) or a switching chip, it can generate a MAC address table using switch forwarding algorithms such as Address Resolution Protocol (ARP), where the source and destination addresses can be MAC addresses. If the electrical switching device 231 is a Layer 3 switch (network layer switch) or a router, it can generate a routing table using routing algorithms such as Routing Information Protocol (RIP) or Border Gateway Protocol (BGP), where the source and destination addresses can be IP addresses; this application does not impose specific limitations.

[0090] The multiple electrical switching devices 231 within the switching group 230 can form a one-layer or multi-layer electrical switching network. The topology of the electrical switching network may include, but is not limited to, dragonfly (or dragonfly+) networks, torus networks, fat-tree networks, etc. This application does not impose specific limitations.

[0091] Furthermore, multiple switching groups 230 can establish connections through optical switching equipment 220. That is, communication within a switching group 230 is achieved via electrical signals, while communication between switching groups 230 is achieved via optical signals. Specifically, optical switching equipment 220 may include multiple ports 221, each port 221 can be linked to a switching group 230, allowing the optical switching equipment 220 to route optical signals from one port to another according to the destination of data packets, thus realizing cross-group communication between switching groups 230. In specific implementations, the number of optical switching equipment 220 in the communication system 200 can be one or more. Figure 1 illustrates one example, and this application does not limit the number of optical switching equipment 220. Moreover, multiple optical switching equipment 220 can also establish connections and form one or more layers of network; this application does not impose specific limitations.

[0092] In this way, data exchange within switching group 230 is completed using electrical signals. Optical switching equipment 220 only adjusts the optical switching links and is unconcerned about the internal topology of switching group 230. When computing nodes communicate across groups, they utilize a communication method of intra-group electrical switching – inter-group optical switching – intra-group electrical switching to complete inter-group communication. For example, as shown in Figure 1, taking the physical topology of optical switching equipment 220 connecting four groups as an example, OXC only adjusts the inter-group optical switching links and is unconcerned about the internal topology of switching group 230. When computing node 0 communicates with computing node 1, the data packets sent by computing node 0 can undergo intra-group electrical switching through pod0 and then reach computing node 1. When computing node 0 communicates with computing node 3, the data packets sent by computing node 0 can first undergo intra-group electrical switching through pod0, then reach optical switching equipment 220, undergo inter-group optical switching through optical switching equipment 220, reach pod1, then undergo intra-group electrical switching through pod1, and finally reach computing node 3. The above processing is for illustrative purposes only and is not intended to limit the scope of this application.

[0093] Optionally, the client 100 may be software or an application running on a terminal device or computing device controlled by the user, such as a personal computer (PC) client, a World Wide Web (web) client accessed through a browser, an application (APP) client running on a mobile terminal, or a console of a cloud platform. This application does not make any specific limitations.

[0094] Optionally, the client 100 may be a model service platform or a machine learning framework client for handling machine learning-related tasks. Such clients provide a series of tools and services for the entire process of defining, training, deploying, inferring, and managing machine learning models. The model service platform may be ModelArts, OpenAI, etc., and the machine learning framework may be TensorFlow, PyTorch, MindSpore, etc. This application does not make any specific limitations.

[0095] It should be understood that Figure 1 uses the communication system 200 to implement data communication of the distributed training system 300 as an example for illustration. Therefore, the purpose of the client 100 is to issue training requests for the AI ​​model. In other application scenarios, the client 100 can also be used for other purposes, which are not specifically limited in this application.

[0096] Optionally, the client 100 can also be a client of the network controller 210. The user can input communication requirements through the client 100, causing the network controller 210 to execute the network topology configuration method provided in this application, obtain the network topology information of the optoelectronic hybrid network adapted to the communication requirements, and then obtain the corresponding configuration information of the optical switching device 220. The optical switching device 220 is then sent to the optical switching device 220, so that the optical switching device 220 adjusts the mapping of the optical switching ports according to the configuration information and switches the corresponding optical communication links, thereby realizing the network topology reconstruction of the optoelectronic hybrid network. The reconstructed optoelectronic hybrid network can meet the communication requirements sent by the user.

[0097] Optionally, client 100 can also be a client of a cloud platform, used for users to purchase and rent various cloud services. The network topology configuration method provided in this application can be one of these cloud services, which users can purchase separately to optimize the network topology reconstruction quality of the optoelectronic hybrid network and thus improve communication efficiency. Alternatively, the cloud platform provides users with a comprehensive service, and the network topology configuration method provided in this application can be a sub-service of this comprehensive cloud service. For example, if the comprehensive cloud service is an AI cloud service, the network topology configuration method provided in this application can be a sub-service of this AI cloud service, enabling users to automatically determine the optoelectronic hybrid network that meets the training requirements of the AI ​​model when using the AI ​​cloud service for distributed training, thereby optimizing the efficiency of aggregated communication during model training.

[0098] The preceding text has described in detail the possible deployment methods of client 100, communication system 200, and distributed training system 300, as well as their respective components. In actual deployment, flexible deployment can be carried out based on specific application scenarios and business requirements. The following section provides examples illustrating the actual deployment methods of client 100, communication system 200, and distributed training system 300, as well as their respective components, using specific scenarios.

[0099] For example, client 100, communication system 200, and distributed training system 300 can be deployed in a data center owned by the enterprise. Distributed training system 300 is deployed in a server or server cluster purchased by the enterprise. Client 100 is a remote desktop connection tool or server management console software. Communication system 200 is deployed on switching equipment such as electrical switches and optical switches purchased by the enterprise. Employees of the enterprise can remotely connect to the server or server cluster where distributed training system 300 is located through client 100 and use distributed training system 300 to train AI models. Communication system 200 can determine the corresponding optoelectronic hybrid network topology structure according to the communication requirements of AI model training using the network topology configuration method provided in this application, thereby optimizing the efficiency of aggregated communication during model training.

[0100] For example, the distributed training system 300 and the communication system 200 can be deployed in a cloud environment. Figure 2 illustrates an example of a communication system deployed in a cloud environment according to this application. As shown in Figure 2, a user can initiate a purchase request for AI cloud services through client 100. These AI cloud services include sub-services corresponding to the network topology configuration method provided in this application. Specifically, after client 100 sends the purchase request to the cloud platform, the cloud platform can grant client 100 access to the distributed training system 300 and the communication system 200. This allows the user to use client 100 to train the required AI model using the distributed training system 300. During model training, the communication system 200 completes the aggregated communication required for distributed training of the AI ​​model. The communication system 200, based on the communication requirements of the AI ​​model training, uses the network topology configuration method provided in this application to determine the corresponding optoelectronic hybrid network topology, thereby optimizing the efficiency of aggregated communication during model training.

[0101] Furthermore, the cloud platform also maintains various basic resources, including computing resources, storage resources, network resources, and security resources, to meet the computing needs of the communication system 200 and the distributed training system 300 under different scales and loads. These computing resources can be dynamically scaled according to the usage needs of the communication system 200 and the distributed training system 300 to ensure the stable operation of the communication system 200 and the distributed training system 300 and provide users with reliable AI cloud services.

[0102] It should be understood that the above application scenarios are for illustrative purposes only. The client 100, communication system 200, and distributed training system 300 can be flexibly deployed according to actual business needs. They will not be listed here.

[0103] The possible system architecture of this application has been described above. The following is a brief explanation of how this system architecture implements the network topology configuration method provided in this application.

[0104] In this embodiment, client 100 can send a training request to AI platform 310. AI platform 310 generates a corresponding AI training task based on the training request and then sends a resource allocation request for the AI ​​training task to resource manager 320. Resource manager 320 can allocate corresponding computing resources according to the resource allocation request, the current resource usage, and the configured resource allocation rules. Next, network controller 210 can obtain device information of the allocated computing resources from resource manager 320 and training information of the AI ​​training task from AI platform 310, including parallel strategies used for distributed training and aggregate communication strategies used for aggregate communication. Based on the device information and training information, network controller 210 generates corresponding optoelectronic hybrid network topology information and determines the configuration information of optical switching device 220 based on this topology information. This configuration information instructs optical switching device 220 to modify corresponding port mappings and switch optical communication links, thereby achieving topology reconstruction of the optoelectronic hybrid network. The resulting optoelectronic hybrid network can meet the communication requirements of the AI ​​training task, effectively adapt to the AI ​​training task to complete aggregate communication, and improve the processing efficiency of the AI ​​training task.

[0105] Understandably, dynamically adjusting the optoelectronic hybrid network during model training can reduce network communication efficiency due to slow link switching speeds of optical switching equipment. This application, however, pre-plans an optoelectronic hybrid network that meets the communication requirements of the training task before model training, effectively avoiding this problem. Furthermore, planning the network before model training eliminates the need to detect historical traffic, avoiding the detection costs associated with traffic monitoring. For training tasks that haven't been processed previously, the application can generate the corresponding optoelectronic hybrid network topology based on device and training information, solving the problem of determining the optoelectronic hybrid network structure for complex and ever-changing communication needs.

[0106] In a specific implementation, the device information obtained by the network controller 210 from the resource manager 320 includes information about the switching groups 230 required for model training, and information about the optical switching devices 220 that enable data communication between the switching groups 230. Specifically, the information about the switching groups 230 and the optical switching devices 220 may include a device list. This device list includes information about the relevant devices required for distributed training of the AI ​​model, such as the group IDs of multiple switching groups 230, the device IDs of each electrical switching device in the switching groups 230, and the device IDs of the optical switching devices 220 connecting these switching groups 230. Of course, the device information may include more than just the device list; it may also include related information about these devices, such as the number, model, resource usage, and address of the electrical switching devices in the switching groups 230, and the number, model, address, and resource usage of the optical switching devices 220. The specific details can be determined according to actual business needs, and this application provides specific limitations.

[0107] In specific implementation, the training information obtained by the network controller 210 from the AI ​​platform includes parallel strategies and ensemble communication strategies. Here, parallel strategies refer to the parallel strategies used during AI model training. Commonly used parallel training algorithms include data parallelism, tensor parallelism, and pipelined parallelism. Among them, data parallelism refers to dividing the dataset and distributing it to multiple nodes for training, tensor parallelism refers to distributing the model parameters to multiple nodes for training, and pipelined parallelism refers to dividing the model according to network layers and distributing it to multiple nodes for training. Of course, there are many other types of parallel strategies, which will not be listed here. It should be noted that hybrid parallel strategies can also be used in the distributed training process of AI models, such as a hybrid parallel strategy that uses both data parallelism and tensor parallelism, or other hybrid parallel strategies, etc. This application does not make specific limitations.

[0108] A ensemble communication strategy refers to the process of distributing training tasks to multiple accelerator cards during distributed AI model training. These accelerator cards need to exchange data simultaneously so that each card can obtain the training results from the other cards. This process is called ensemble communication, and the algorithm used in ensemble communication is called the ensemble communication strategy. Typically, ensemble communication strategies can include broadcast, gather, scatter, all-gather, reduce, all-reduce, reduce-scatter, etc. Other ensemble communication strategies may also be included, but they will not be listed here.

[0109] In this embodiment, the network controller 210 can first determine one or more communication domains corresponding to the parallel strategy based on the aforementioned device information and parallel strategy. Each communication domain includes multiple accelerator cards that need to perform data communication under the parallel strategy. Then, based on the aggregated communication strategy, it determines one or more communication pairs in each communication domain. The communication pair includes a sender and a receiver. Then, based on the communication volume of each communication pair, it determines the bandwidth requirement of the communication link used to realize data communication between the communication pairs. Based on the bandwidth requirement of the communication link, it can determine the traffic requirement information of the communication system. Then, based on the traffic requirement information of the communication system, it determines the topology information of the optoelectronic hybrid network, and thus obtains the configuration information of the optical switching equipment.

[0110] In this context, a communication domain can be understood as a boundary or range of communication. All accelerator cards within the same communication domain need to exchange data. A communication domain is a logical grouping; the same accelerator card may be divided into different communication domains under different parallel training methods. For example, if card A needs to communicate with cards B and C under the tensor parallel method, then cards A, B, and C constitute a communication domain under the tensor parallel method. If card A needs to communicate with cards C and D under the data parallel method, then cards A, C, and D constitute a communication domain under the data parallel method. Typically, distributed training can use one or more parallel methods, so the network controller 210 can determine one or more communication domains under each parallel method based on device information and parallel strategies.

[0111] A communication pair refers to two accelerator cards that specifically send and receive data in a communication domain. Each communication domain can include one or more communication pairs. The traffic pattern used under each parallel strategy may be different, and the corresponding communication pairs will also be different. Here, the traffic pattern refers to the way data is exchanged between the accelerator cards, describing how data flows between computing nodes when the distributed training system executes a parallel strategy. It should be understood that the parallel strategy focuses on how to split, allocate, and coordinate the overall training task across various accelerator cards, while the traffic pattern focuses on how specific data is transferred between them. Therefore, based on the parallel strategy, it can be determined which accelerator cards need to communicate, and the traffic pattern can determine the direction of data flow between the accelerator cards that need to communicate, thus obtaining multiple communication pairs. In specific implementations, the traffic pattern may include rings, hierarchical decomposition (HD), database trees (DBtree), etc., which are not specifically limited in this application.

[0112] For example, in the example above, card A needs to communicate with cards B and C under the tensor parallel method. Cards A, B, and C constitute a communication domain under the tensor parallel method. If the set communication method within this domain is Allreduce set communication, this communication method typically needs to be implemented using ring flow mode. Therefore, this communication domain can include three communication pairs: (A, B), (B, C), and (C, A), representing accelerated card A sending data to accelerated card B, accelerated card B sending data to accelerated card C, and accelerated card C sending data to accelerated card A. The above example is for illustration only and is not intended to impose specific limitations.

[0113] Optionally, when determining the bandwidth requirement of a repeating communication link, repeating optical communication links passing through the optical communication equipment can be screened first, and then repeating optical communication pairs that use the repeating optical communication link for communication can be determined. Based on the communication volume of each repeating optical communication pair, the bandwidth requirement of the repeating optical communication link can be determined.

[0114] It should be understood that the purpose of this application is to obtain the configuration information of optical switching equipment, enabling hybrid optoelectronic networks to reconstruct the network topology by switching optical switching links. Therefore, the traffic demand within the switching group is irrelevant to the subsequently issued configuration information. Thus, when determining the topology information, the calculation can primarily focus on the bandwidth requirements of duplicate optical communication links to ensure the accuracy of the bandwidth requirements for the optical switching equipment, thereby making the subsequently obtained configuration information for the optical switching equipment more accurate. Whether electrical communication links are duplicated can be disregarded, thereby reducing the computational load, improving the efficiency of topology information acquisition, and ultimately improving the efficiency of hybrid optoelectronic network topology reconstruction.

[0115] Optionally, after obtaining the traffic demand matrix of the communication system based on the above process, the traffic demand matrix can be updated by combining some load balancing algorithms to obtain an updated traffic demand matrix. A load balancing algorithm is an algorithm used to rationally allocate network traffic and computing tasks, avoiding overload of a single resource, thereby improving network performance and resource utilization. Load balancing algorithms may include, but are not limited to, least connections, weighted round-robin, and integer programming algorithms such as minimizing maximum link utilization, etc., and this application does not impose specific limitations. Thus, by determining the network topology information based on the updated traffic demand matrix, a load-balanced network topology can be obtained.

[0116] Furthermore, based on load balancing, constraint information can be incorporated to update the traffic demand matrix. This constraint information includes limitations and conditions inherent in the network topology design of the hybrid optoelectronic network, such as bandwidth constraints (limiting the bandwidth of links to ensure data traffic does not exceed the maximum carrying capacity of the link), latency constraints (ensuring network latency during data packet transmission does not exceed a set threshold), and security constraints (some links require adherence to specific security policies, such as traffic isolation or encryption, to protect sensitive data). More constraint information may also be included, but this application does not specify a particular limitation.

[0117] It should be understood that in some existing solutions, the network topology templates corresponding to historical traffic are often fixed and general, which can lead to some detour traffic. The proposed technical solution, which infers network topology from communication needs, can eliminate more detour traffic and improve network link utilization.

[0118] In summary, this application provides a communication system including a network controller and an optical switching device. The communication system is used to realize communication between multiple processors, which are used for distributed training of artificial intelligence (AI) models. After the network controller obtains the training information of the distributed training task, it can determine the traffic demand information of the distributed training task based on the parallel strategy in the training information, that is, the bandwidth demand between multiple processors during the training process. Then, based on the traffic demand information, it determines the network topology information of the communication system and sends the corresponding configuration information to the optical switching device. This enables the optical switching device to switch links based on the configuration information, realizing the communication connection between multiple processors through the optical switching device. After the switching is completed, the distributed training task can be executed.

[0119] This solution proactively plans traffic before training the AI ​​model, which can solve the problem of slow link switching in optical switching equipment. At the same time, this solution does not require the detection or analysis of historical network traffic, thus avoiding traffic detection costs and eliminating the complexity of passive traffic sampling and analysis. Moreover, since the network topology is determined based on the bandwidth requirements of the task, it can eliminate detour traffic, which is an effect that traditional methods based on detecting historical traffic to determine network topology cannot achieve.

[0120] Figure 3 is a flowchart illustrating the steps of a network topology configuration method provided in this application. This method can be applied to the communication system 200 shown in Figures 1 and 2. As shown in Figure 3, the method may include the following steps:

[0121] S310: AI Platform 310 creates AI training tasks.

[0122] In specific implementation, the AI ​​platform 310 can create a corresponding AI training task based on the training request sent by the client 100. Typically, the training request may include dataset information, model configuration information, etc. The dataset information includes the location of the dataset used to train the model, which may be a file path or a database link. The model configuration information includes the AI ​​model's structural data, hyperparameters, and configuration information. The structural data includes data describing the model's structure, such as the number of layers and activation functions. Hyperparameters include information such as the model's learning rate, batch size, and number of training epochs. The configuration information includes data such as optimizer type, loss function type, regularization method, parallel strategy, and traffic pattern. The above examples are for illustrative purposes only and are not intended to be specific in this application.

[0123] Optionally, the AI ​​platform 310 can analyze dataset information, model configuration information, etc., in the training request to determine that the necessary data for AI model training is available. Then, it generates a corresponding AI training task. This AI training task may include information such as task description, resource requirements, and execution strategy. The task description includes detailed information required for model training, such as the model type, required dataset, expected output, and specific task objectives. Resource requirements include the computing resources required for model training, such as the number of processors and memory size. The execution strategy may include information about the multiple subtasks included in the training scheduling task, as well as the execution order between the subtasks, ensuring that model training proceeds steadily. It should be understood that the above examples are for illustrative purposes, and AI training tasks may include more content; this application does not impose specific limitations.

[0124] S320: AI platform 310 sends a resource allocation request to resource manager 320.

[0125] In specific implementation, the AI ​​platform 310 can determine the computing resource information required based on the AI ​​training task and generate a corresponding resource allocation request. This resource allocation request may include the type of computing resource to be allocated, such as computing nodes, accelerator cards, and memory, as well as the quantity of resources, such as the number of accelerator cards, computing nodes, CPU cores, and storage capacity for training AI models. It may also include more information, such as resource characteristics, dependencies, and priorities. Resource characteristics refer to special requirements for resources, such as performance standards and regional requirements. Dependencies refer to the dependencies between the requested resources and other resources, and priorities refer to the priority of the request. This helps the resource manager to allocate resources reasonably when resources are scarce. The above example is for illustration, and the resource allocation request may include more information, which is not specifically limited in this application.

[0126] In its specific implementation, the resource manager 320 is used to detect and manage the physical resources in the distributed training system 300. Therefore, it can complete the corresponding resource allocation based on the resource allocation request sent by the AI ​​platform 310. The resource manager 320 can obtain the available resource information in the current resource pool, combine the resource allocation request and allocation decision, allocate the available resources, and update the available resource information. Resource allocation may include load balancing, priority strategies, etc., which are not specifically limited in this application.

[0127] Optionally, after the resources are allocated, the resource manager 320 can return a notification message of successful allocation to the AI ​​platform 310. The notification message may include the status of successful allocation, and may also include details of the allocated resources, such as resource ID, resource type, quantity, etc. This application does not make specific limitations.

[0128] S330: Resource Manager 320 sends device information to Network Controller 210.

[0129] Optionally, after allocating computing resources, the resource manager 320 can generate device information corresponding to the allocated computing resources. The device information includes information about the switching group 230 required for model training, and information about the optical switching device 220 that enables data communication between the switching groups 230.

[0130] It should be understood that, as can be seen from the foregoing, the technical solution of this application is applicable to the system shown in Figures 1 and 2. In this system, the computing nodes communicate with the switching group 230, and the switching groups 230 communicate with each other through the optical switching device 220. Therefore, after allocating computing resources, the resource manager 320 can determine the switching group 230 connected to each computing node and the optical switching device 220 connected to the switching group 230, and obtain device information.

[0131] In a specific implementation, the device information may include a device list, which may include the group ID of each switching group 230, the device ID of each electrical switch in each switching group, and the device ID of the optical switches 220 connecting the switching groups 230. The device information may also include some device information related to determining the network topology, such as the number, model, resource usage, and address of the electrical switches in the switching group 230, and the number, model, address, and resource usage of the optical switches 220, etc. The specific details can be determined according to actual service requirements, and this application provides specific limitations.

[0132] S340: AI platform 310 sends training information to network controller 210.

[0133] In specific implementations, training information includes parallel strategies and ensemble communication strategies. Here, parallel strategies refer to the parallel strategies used during AI model training. Commonly used parallel training algorithms include data parallelism (DP), tensor parallelism (TP), and pipeline parallelism (PP). Among them, data parallelism refers to dividing the dataset and distributing it to multiple nodes for training; tensor parallelism refers to distributing the model parameters to multiple nodes for training; and pipeline parallelism refers to dividing the model according to network layers and distributing it to multiple nodes for training. Of course, there are many other types of parallel strategies, which will not be listed here. It should be noted that hybrid parallel strategies can also be used in the distributed training process of AI models, such as a hybrid parallel strategy that uses both data parallelism and tensor parallelism, or other hybrid parallel strategies, etc. This application does not make specific limitations.

[0134] A ensemble communication strategy refers to the process of distributing training tasks to multiple accelerator cards during distributed AI model training. These accelerator cards need to exchange data simultaneously so that each card can obtain the training results from the other cards. This process is called ensemble communication, and the algorithm used in ensemble communication is called the ensemble communication strategy. Typically, ensemble communication strategies can include broadcast, gather, scatter, all-gather, reduce, all-reduce, reduce-scatter, etc. Other ensemble communication strategies may also be included, but they will not be listed here.

[0135] It should be understood that the training information may also include more information related to the determination of the topology of the optoelectronic hybrid network, such as latency requirements, network performance indicator requirements, training rounds, batch size, etc., which can be determined based on the actual business scenario, and this application does not make specific limitations.

[0136] S350: Network controller 210 determines the topology information of the optoelectronic hybrid network based on device information and training information.

[0137] In this embodiment, the network controller 210 can first determine one or more communication domains (communicators) corresponding to the parallel strategy based on the aforementioned device information and the parallel strategy in the training information. Each communication domain includes multiple accelerator cards that need to perform data communication under the parallel strategy. Then, based on the aggregated communication strategy, it determines one or more communication pairs in each communication domain. Each communication pair includes an accelerator card as the sender and an accelerator card as the receiver. Then, it determines the communication volume required by each communication pair under each communication domain, and further determines the bandwidth requirement of the communication link used to realize data communication between the communication pairs. Based on the bandwidth requirement of each communication link, it determines the overall traffic requirement information of the communication system. Based on the traffic requirement information of the communication system, it determines the topology information of the optoelectronic hybrid network.

[0138] Understandably, by analyzing and processing the model's training information and device information, the traffic demand information of the communication system can be obtained. Then, based on this traffic demand information, the topology of the optoelectronic hybrid network can be determined. This resulting topology can meet the communication requirements of model training. Simultaneously, it eliminates the need to detect data communication traffic in the network or record historical data traffic. This not only reduces hardware costs but also allows for flexible handling of AI training tasks under various circumstances. Even for AI training tasks that haven't been processed previously, the corresponding traffic demand information can be obtained by analyzing their training information and device information, flexibly meeting various business needs.

[0139] In this context, a communication domain can be understood as a boundary or range of communication. All accelerator cards within the same communication domain need to exchange data. A communication domain is a logical grouping; the same accelerator card may be divided into different communication domains under different parallel training methods. For example, if card A needs to communicate with cards B and C under the tensor parallel method, then cards A, B, and C constitute a communication domain under the tensor parallel method. If card A needs to communicate with cards C and D under the data parallel method, then cards A, C, and D constitute a communication domain under the data parallel method. Typically, distributed training can use one or more parallel methods, so the network controller 210 can determine one or more communication domains under each parallel method based on device information and parallel strategies.

[0140] For example, Figure 4 is an example diagram of the communication domain for multiple parallel strategies in an application scenario. In the application scenario shown in Figure 4, the distributed training system 300 includes 8 computing groups, each computing group includes 16 computing nodes, and each computing node includes 8 accelerator cards. Therefore, the scale of the distributed training system 300 is 1024 accelerator cards, distributed across 128 nodes.

[0141] Assuming that the parallel strategies used during model training include three types—tensor parallelism, pipeline parallelism, and data parallelism—the communication domain corresponding to each parallel strategy can be shown in Figure 4.

[0142] Under the DP algorithm, the accelerator cards within the 8 communication groups exchange data. Specifically, this can be data exchange between cards with the same number in the nodes of the 8 communication groups. Therefore, the DP communication domain includes 128 domains, and each communication domain includes cards with the same number in each node of the 8 communication groups, or in other words, 8 cards with the same number in each node horizontally. For example, in Figure 4, the number 1 card of each node in the 8 communication groups forms a DP communication domain.

[0143] Under the PP algorithm, the accelerator cards within each communication group exchange data. Specifically, this can be data exchange between cards with the same serial number among the 16 nodes in the communication group. Therefore, there are 64 PP communication domains, each containing 16 cards with the same serial number from each node within the communication group, or 16 cards with the same serial number among each node in the vertical direction. For example, cards numbered 7 from the 16 nodes in communication group 1 form one PP communication domain, cards numbered 7 from the 16 nodes in communication group 2 form another PP communication domain, and so on.

[0144] Under the TP algorithm, the 8 accelerator cards in each node exchange data, so there are 128 TP communication domains for 128 nodes. For example, the 8 cards in node 1 of communication group 1 form a TP communication domain, the 8 cards in node 2 of communication group 1 form a TP communication domain, and so on.

[0145] It should be understood that Figure 4 is for illustrative purposes only. In actual implementations, the communication domains corresponding to different parallel strategies used in the model are different, and this application does not limit this.

[0146] In this embodiment, the communication pair obtained based on the communication domain refers to two accelerator cards that specifically send and receive data within the communication domain. Each communication domain may include one or more communication pairs. Typically, each parallel strategy may support different traffic patterns, and the corresponding communication pairs will also differ. Here, the traffic pattern refers to the way data is exchanged between the accelerator cards, describing how data flows between computing nodes when the distributed training system executes a parallel strategy. It should be understood that the parallel strategy focuses on how to split, allocate, and coordinate the overall training task across various accelerator cards, while the traffic pattern focuses on how specific data is transferred between them. Therefore, based on the parallel strategy, it can be determined which accelerator cards need to communicate, and the traffic pattern can determine the direction of data flow between the accelerator cards that need to communicate, thereby obtaining multiple communication pairs. In specific implementations, the traffic pattern may include rings, hierarchical decomposition (Havling and doubling, HD), double binary trees (DBtree), etc., which are not specifically limited in this application.

[0147] For example, Figure 5 is a flowchart illustrating the steps for determining communication pairs in an application scenario provided by this application. Unlike Figure 4, which uses a large-scale distributed training system with 1024 accelerator cards to better illustrate the concept of a communication domain, Figure 5 uses a smaller-scale distributed training system with 8 accelerator cards to better illustrate the concept of a communication pair. The distributed training system shown in Figure 5 uses two parallel strategies: the DP algorithm and the TP algorithm. Under the TP algorithm, data communication occurs between horizontal communication groups, while under the DP algorithm, data communication occurs between vertical communication groups.

[0148] First, it is determined that there are 4 communication domains under the TP algorithm. If represented by the card number of the accelerator card, the 4 communication domains are (0,1), (2,3), (4,5), and (6,7). It is determined that there are 2 communication domains under the DP algorithm, namely (0,2,4,6) and (1,3,5,7).

[0149] Next, based on the traffic pattern under each parallel strategy, the communication pairs in each communication domain are determined. Figure 5 takes the communication domain (0,2,4,6) under the DP algorithm as an example. If the ring traffic pattern is used, card 0 needs to send to card 2, card 2 needs to send to card 4, card 4 needs to send to card 6, and card 6 needs to send to card 0. Therefore, under the ring traffic pattern, the communication pairs in the communication domain (0,2,4,6) include (0,2), (2,4), (4,6), and (6,0). If the HD traffic pattern is used, card 0 needs to send to card 2, card 0 needs to send to card 4, card 2 needs to send to card 6, and card 4 needs to send to card 6. Therefore, under the HD traffic pattern, the communication pairs in the communication domain (0,2,4,6) include (0,6), (2,4), (0,4), and (2,6).

[0150] Similarly, the communication pairs in the communication domain (1,3,5,7) can be determined. In ring traffic mode, the communication pairs in the communication domain (1,3,5,7) include (1,3), (3,5), (5,7), and (7,1). In HD traffic mode, the communication pairs in the communication domain (1,3,5,7) include (1,7), (3,5), (3,5), and (3,7).

[0151] It should be understood that in the example in Figure 5, the TP communication domain is a horizontal communication group, and each horizontal communication group includes 2 accelerator cards. This is equivalent to only one communication pair per communication domain, so it is not necessary to determine the pair based on the traffic pattern. In other examples, such as when the TP communication domain is a vertical communication group, and each vertical communication group includes 4 accelerator cards, the TP communication domain also needs to determine the communication pair based on the traffic pattern. Further examples will not be provided here.

[0152] It should be noted that the traffic pattern used under each parallel strategy can be the system default. For example, when using the DP algorithm by default, the traffic pattern is ring traffic pattern, and when using the TP algorithm by default, the traffic pattern is HD traffic pattern. Alternatively, the traffic pattern used under each parallel strategy can also be user-defined. For example, the training request sent by the user may carry the desired parallel strategy and traffic pattern. The above examples are for illustration only, and this application does not impose any specific limitations.

[0153] It should be noted that when determining communication pairs, the generated communication pair sequence can be arranged according to the communication order, which can be determined based on the traffic pattern. For example, in the communication domain (0,2,4,6) under the DP algorithm in Figure 5, if the ring traffic pattern is used, card 0 needs to send to card 2, card 2 to card 4, card 4 to card 6, and card 6 to card 0. Therefore, in the ring traffic pattern, the communication pairs in the communication domain (0,2,4,6) include (0,2), (2,4), (4,6), and (6,0). This communication pair sequence is arranged according to the communication order. This method of generating communication pair sequences can record both the communication pairs and the communication order simultaneously.

[0154] In this embodiment, after determining at least one communication pair in each communication domain, the communication volume of the communication pair can be determined by combining parallel strategies and traffic patterns to obtain the communication volume of multiple communication pairs in different communication domains under different parallel strategies. Then, based on the communication volume of the communication pair, the traffic demand of the communication link carrying that communication volume is determined, thereby determining the traffic demand information of the entire communication system. Finally, based on the traffic demand information, the topology information of the optoelectronic hybrid network is determined.

[0155] As discussed above, the parallel strategy focuses on how to break down, allocate, and coordinate the overall training task across various accelerator cards, while the traffic pattern focuses on how data is transferred between different accelerator cards. Therefore, based on the parallel strategy and traffic pattern, the traffic volume of each communication pair can be determined. After obtaining the traffic volume of multiple communication pairs, the traffic volume between each pair of accelerator cards in different communication domains can be accumulated and merged to obtain the overall traffic demand information of the communication system.

[0156] In practical implementation, the overall traffic demand information of the communication system is used to describe the communication volume between different accelerator cards in the system. Specifically, it can be a traffic demand matrix, where each element represents the communication volume between different accelerator cards. For example, assuming a distributed system includes four accelerator cards, the traffic demand matrix of this distributed system can be as follows:

[0157] Among them, C ij This represents the communication volume between accelerator card i and accelerator card j. For example, in a distributed system including card 1, card 2, card 3, and card 4, the communication volume between card 1 and card 2 is C. 12 Then the communication volume between card 3 and card 4 is C. 34 And so on, without going into detail here. Since each card does not send data to itself, the diagonal elements of the traffic demand matrix are 0.

[0158] In this embodiment, when determining the bandwidth requirement of a communication link based on the communication volume of a communication pair, if a communication link only needs to carry the communication needs of one communication pair, then the communication volume of that communication pair is the bandwidth requirement of that communication link. If a communication link needs to carry the communication needs of multiple communication pairs, then that communication link can be understood as a duplicated communication link, and in this case, the bandwidth requirement of the duplicated communication link needs to be determined based on the communication volume of the multiple communication pairs it carries.

[0159] Optionally, when determining the bandwidth requirement of a repeating communication link, repeating optical communication links passing through the optical communication equipment can be screened first, and then repeating optical communication pairs that use the repeating optical communication link for communication can be determined. Based on the communication volume of each repeating optical communication pair, the bandwidth requirement of the repeating optical communication link can be determined.

[0160] It should be understood that the purpose of this application is to obtain the configuration information of the optical switching equipment so that the optoelectronic hybrid network shown in Figure 1 or Figure 2 can complete the network topology reconstruction by switching optical switching links. Therefore, the traffic demand within the switching group is irrelevant to the subsequently issued configuration information. Thus, when determining the topology information, the bandwidth demand of duplicate optical communication links can be mainly calculated to ensure that the bandwidth demand of the optical switching equipment is accurate, making the subsequently obtained configuration information of the optical switching equipment more accurate. Whether the electrical communication links are duplicated can be disregarded, thereby reducing the amount of calculation, improving the efficiency of topology information acquisition, and thus improving the efficiency of optoelectronic hybrid network topology reconstruction.

[0161] Taking the example shown in Figure 5, the communication domain under the DP algorithm is (0,2,4,6). In ring traffic mode, the communication pairs include (0,2), (2,4), (4,6), and (6,0). If accelerator cards 0 to 3 belong to switch group 1, and accelerator cards 4 to 7 belong to switch group 2, then communication pairs (0,2) and (4,6) are communication pairs that communicate within the switch group, while communication pairs (2,4) and (6,0) are communication pairs that need to communicate across switch groups, that is, optical communication pairs that need to communicate through optical switching equipment.

[0162] Similarly, in the DP algorithm, another communication domain (1,3,5,7) includes communication pairs (1,3), (3,5), (5,7), and (7,1) in ring traffic mode. Among them, communication pairs (1,3) and (5,7) are communication pairs that communicate within the switching group, while communication pairs (3,5) and (7,1) are communication pairs that need to communicate across switching groups, that is, optical communication pairs that need to communicate through optical switching equipment.

[0163] Similarly, the TP algorithm can also use a similar approach to determine multiple communication pairs in each communication domain, and then determine the optical communication pairs that need to communicate through optical switching equipment. Examples will not be given here.

[0164] Optionally, when determining the bandwidth requirement of a repeating optical communication link, repeating optical communication pairs that use the repeating optical communication link within the same time period but with different communication directions can be selected. Their communication volumes can then be combined to obtain the bandwidth requirement for that repeating optical communication link. Considering the bidirectional multiplexing of the optical communication link during communication, the bandwidth requirement can be the communication volume corresponding to the communication direction with the largest communication volume. For example, in the first time period, the optical communication pairs using the first optical communication link include a first optical communication pair and a second optical communication pair. The communication direction of the first optical communication pair is the first direction, and its communication volume is the first volume. The communication direction of the second optical communication pair is the second direction, and its communication volume is the second volume. Since the first volume is less than the second volume, the bandwidth requirement of the first optical communication link can be the second volume. This is because the link can be bidirectionally multiplexed during communication, so satisfying the communication requirement in one direction is sufficient.

[0165] It should be noted that the same time period here can refer to the time period where the first time period and the second time period overlap, or the time period between the first time period and the second time period is not less than a preset threshold. Simply put, for repeated optical communication pairs with similar times that can be bidirectionally multiplexed, the communication traffic can be merged to obtain the bandwidth requirement of the repeated optical communication link.

[0166] Taking the above example, the communication pairs include (0,2), (2,4), (4,6), and (6,0). Communication pairs (0,2) and (4,6) are communication pairs that communicate within the switching group, while communication pairs (2,4) and (6,0) are communication pairs that need to communicate across switching groups. Both need to pass through the same optical communication link and are considered duplicate optical communication pairs. Furthermore, (2,4) and (6,0) are two different transmission directions. If the communication throughput of communication pair (2,4) is 200M and the communication throughput of communication pair (6,0) is 300M, the sum of the two is 500M. However, since the two can bidirectionally reuse the optical communication link during communication, the communication throughput in actual business scenarios will not reach 500M. Considering bidirectional reuse, the combined result of the two is 300M. The bandwidth requirement of this duplicate optical communication link is 300M. The bandwidth requirement obtained after merging is more in line with the communication needs of actual business scenarios.

[0167] Understandably, merging the traffic of bidirectional multiplexed optical communication pairs can make the final generated topology information better meet the actual business scenario requirements, avoid the problem that the calculated traffic demand matrix does not meet the actual business requirements, and improve the accuracy of topology reconstruction of optoelectronic hybrid networks.

[0168] Optionally, when determining the bandwidth requirement of a repeating optical communication link, repeating optical communication pairs that use the repeating optical communication link within the same time period but have the same communication direction can be selected. Then, their communication volumes can be combined to obtain the bandwidth requirement of that repeating optical communication link. Since the communication direction is the same, the bandwidth requirement can be the sum of the communication volumes. For example, if the optical communication pairs using the first optical communication link in the first time period include a first optical communication pair and a second optical communication pair, where the communication direction of the first optical communication pair is the same as that of the second optical communication pair, then the bandwidth requirement of the first optical communication link can be the sum of the first and second communication volumes.

[0169] Furthermore, since each optical communication link has a bandwidth limit, it is necessary to ensure that the bandwidth demand does not exceed the bandwidth limit. Therefore, after identifying repeating optical communication pairs that use the same optical communication link in the same time period but have the same communication direction, some or all of these repeating optical communication pairs can be selected for traffic merging based on the bandwidth limit. This ensures that the bandwidth demand obtained after merging does not exceed the communication bandwidth, so that the final optical communication demand can meet the bandwidth limit and avoid link overload.

[0170] For example, the communication throughput of optical communication pair (A,B) is 100M, that of optical communication pair (B,A) is 200M, and that of optical communication pair (A,C) is 400M. Accelerator card A is in switching group 1, and accelerator cards B and C are in switching group 2. The optical switching equipment between switching group 1 and switching group 2 is OXC1. The redundant optical communication link is optical communication link Y1 between switching group 1 and switching group 2 via OXC1. Assuming the bandwidth of optical communication link Y1 is 500M, the optical throughput of optical communication pair (A,B) and optical communication pair (B,A) can be combined. The combined result is 300M, which is less than the bandwidth of 500M. If the throughput of optical communication pair (A,C) is further combined, the combined result will be 700M, which is greater than the bandwidth of 500M, exceeding the link's carrying capacity. Therefore, only two optical communication pairs can be combined. The above example is for illustration only and is not intended to limit the scope of this application.

[0171] Optionally, when determining the bandwidth requirement of a repeating optical communication link, optical communication pairs that use the repeating optical communication link in different time periods can be selected, and their communication volumes can be combined to obtain the bandwidth requirement of the repeating optical communication link. Considering the different times they use the optical communication link, the bandwidth requirement of the repeating optical communication link can be the maximum communication volume among them. For example, if the first optical communication pair uses the first optical communication link in the first time period, and the second optical communication pair uses the first optical communication link in the second time period, and the first and second time periods do not overlap, if the first communication volume of the first optical communication pair is greater than the second communication volume of the second optical communication pair, then the bandwidth requirement of the first optical communication link can be determined as the first communication volume.

[0172] Taking the example shown in Figure 5, processor 0123 is one switching group, and processor 4567 is another switching group. The two switching groups communicate via OXC1. In the communication domain (0,2,4,6), if the traffic mode is HD, the communication pairs in the communication domain (0,2,4,6) include (0,2), (0,4), (2,6), and (4,6). Among them, (0,4) and (2,6) are optical communication pairs that pass through the same optical communication device, OXC1, which is a repeated optical communication pair. The communication times of (0,4) and (2,6) are different, but they share the same optical communication link. Therefore, the bandwidth requirements of this optical communication link can be combined. Specifically, the largest communication volume among the multiple communication pairs that reuse the optical communication link can be taken as its bandwidth requirement. For example, if the communication volume of (0,4) is 200M and the communication volume of (2,6) is 300M, then 300M can be taken as the bandwidth requirement corresponding to this optical communication link. The examples above are for illustrative purposes only and are not intended to be specific limitations in this application.

[0173] Optionally, for multiple repeating optical communication pairs that share the same communication direction within the same time period, the network controller can adjust the communication direction of at least one of the repeating optical communication pairs, enabling the multiple repeating optical communication pairs to bidirectionally reuse the optical communication link during communication, thereby saving bandwidth resources and reducing hardware costs.

[0174] In specific implementation, the optical communication pairs that use the first optical communication link to communicate during the first time period include the first optical communication pair and the second optical communication pair. The communication direction of the first optical communication pair is the first direction, and the communication direction of the second optical communication pair is the first direction. The first communication volume of the first optical communication pair is greater than the second communication volume of the second optical communication pair. At this time, the communication direction of the second optical communication pair can be adjusted to the second direction, and then the bandwidth requirement of the first optical communication link can be determined as the first communication volume.

[0175] It should be understood that during ensemble communication, computing nodes need to communicate according to a certain algorithm to achieve data synchronization. Therefore, when the communication direction of one optical communication pair is modified, the communication directions of other communication pairs need to be adjusted accordingly to ensure that data synchronization between computing nodes is not affected. In specific implementations, the overall communication direction can be adjusted based on the traffic pattern.

[0176] For example, Figure 6 is a flowchart illustrating the steps of adjusting the communication direction in a network topology configuration method provided in this application. The scenario shown in Figure 6 includes two concurrent ring mode algorithms, namely a first parallel strategy and a second parallel strategy. These two algorithms can be two TP algorithms, two DP algorithms, or one TP algorithm and one DP algorithm. This application does not make any specific limitations.

[0177] In this context, the first communication domain of the first parallel strategy is (0,2,4,6), and the second communication domain of the second parallel strategy is also (0,2,4,6). Accordingly, the first communication domain includes four communication pairs (0,2), (2,4), (4,6), and (6,0), and the second communication domain also includes four communication pairs (0,2), (2,4), (4,6), and (6,0). Assuming that accelerator cards 0 and 2 belong to switch group 1, and accelerator cards 4 and 6 belong to switch group 2, and switch groups 1 and 2 communicate with each other through optical communication device OXC1, then the optical communication pairs in the first and second communication domains both include (2,4) and (6,0), and they are duplicate optical communication pairs, using the same optical communication device OXC1.

[0178] In this scenario, the repeated optical communication pairs (2,4) and (6,0) in the first and second communication domains use the same optical communication link, and their communication directions are the same, and their communication time is also the same time period. If the communication demand of the optical communication device OXC1 is to be calculated, it needs to be determined based on the sum of the communication volume of the repeated optical communication pairs. The communication demand is large, and the corresponding bandwidth resource consumption is high.

[0179] In this embodiment, the communication direction of any one of the repeating optical communication pairs can be adjusted. Figure 6 uses the adjustment of the communication direction of the second parallel strategy as an example. When the communication directions of the repeating optical communication pairs (2,4) in the first and second communication domains are the same, the optical communication pair in the second communication domain can be adjusted to (4,2). This allows the first and second communication domains to bidirectionally multiplex the optical communication link during communication, enabling the communication load of the optical communication device OXC1 to be determined based on the maximum value of the repeating optical communication pairs, reducing communication requirements and saving bandwidth resources. Of course, the communication direction of the optical communication pairs in the first communication domain can also be adjusted; examples are not repeated here.

[0180] Furthermore, if the direction of the optical communication pair in the second communication domain changes from (2,4) to (4,2), combined with the aggregated communication strategy and traffic pattern, the direction of other communication pairs can be adaptively adjusted so that the AI ​​training task is not affected. For example, if the communication sequence in the second communication domain is changed from (0,2), (2,4), (4,6), (6,0) to (0,6), (6,4), (4,2), (2,0), then during the same time period, when processor 0 in the second communication domain sends data to processor 6 through OXC1, processor 6 in the first communication domain sends data to processor 0 through OXC1; when processor 4 in the second communication domain sends data to processor 2 through OXC1, processor 2 in the first communication domain sends data to processor 4 through OXC1. This allows the optical communication link through OXC1 to be bidirectionally multiplexed during communication, saving bandwidth resources.

[0181] Understandably, in the example of Figure 6, if the communication direction is not adjusted, the port is overloaded in one direction and empty in the other, with a bandwidth utilization of 50%. After adjusting the communication direction using the method provided in this application, the bidirectional ring mode makes the port unloaded and the bandwidth utilization is 100%, so that the reverse bandwidth can also be fully utilized, saving bandwidth resources.

[0182] Optionally, for multiple repeating optical communication pairs that share the same communication direction and occur within the same time period, the network controller can adjust the communication order of at least one of the repeating optical communication pairs. This allows repeating optical communication pairs that occupy the same communication link to communicate in a staggered manner, avoiding link overload and saving bandwidth resources while reducing hardware costs.

[0183] In specific implementation, the optical communication pairs that use the first optical communication link to communicate during the first time period include the first optical communication pair and the second optical communication pair. The communication time of the first optical communication pair and the second optical communication pair is the same. The communication order of the traffic mode to which the first optical communication pair belongs is adjusted so that the communication time of the first optical communication pair and the second optical communication pair is different. If the first communication volume of the first optical communication pair is greater than the second communication volume of the second optical communication pair, then the bandwidth requirement of the first optical communication link can be determined as the first communication volume.

[0184] It should be understood that during aggregated communication, computing nodes need to communicate according to a certain algorithm to achieve data synchronization. Therefore, if the communication order of one optical communication pair is modified, the communication order of other communication pairs in the same traffic mode must be adjusted accordingly to ensure that data synchronization between computing nodes is not affected. In specific implementations, the overall communication direction can be adjusted based on the traffic mode.

[0185] For example, Figure 7 is a flowchart illustrating the steps of adjusting the communication order in a network topology configuration method provided in this application. The scenario shown in Figure 7 includes two concurrent ring mode algorithms, namely the first parallel strategy and the second parallel strategy. These two algorithms can be two TP algorithms, two DP algorithms, or one TP algorithm and one DP algorithm. This application does not make any specific limitations.

[0186] In this case, the first communication domain of the first parallel strategy is (0,2,4,6), and the second communication domain of the second parallel strategy is also (0,2,4,6). Accordingly, the first communication domain includes four communication pairs (0,6), (2,4), (0,4), and (2,6), and the second communication domain also includes four communication pairs (0,6), (2,4), (0,4), and (2,6). This will cause the following situation: In the first stage, the first parallel strategy communicates the two communication pairs (0,6) and (2,4) through link 1 and link 2, and the second parallel strategy also communicates the two communication pairs (0,6) and (2,4) through link 1 and link 2. This will cause congestion on link 1 and link 2 corresponding to (0,6) and (2,4). In the second phase, the first parallel strategy communicates the two communication pairs (0,4) and (2,6) through links 3 and 4, and the second parallel strategy also communicates the two communication pairs (0,4) and (2,6) through links 3 and 4. This will cause congestion on links 3 and 4 corresponding to (0,4) and (2,6).

[0187] Using the method provided in this application, the communication order of the traffic pattern of one of the parallel strategies can be adjusted. Figure 7 takes the adjustment of the second parallel strategy as an example, swapping the communication order of the first and second stages. That is, the second parallel strategy will first communicate the two communication pairs (0,4) and (2,6), and then communicate the two communication pairs (0,6) and (2,4). Thus, in the first stage, the first parallel strategy communicates the two communication pairs (0,6) and (2,4) through link 1 and link 2, while the second parallel strategy communicates the two communication pairs (0,4) and (2,6) through link 3 and link 4. In this way, links 1 to 4 are all working in the first stage, achieving load balancing and avoiding congestion on any link. Similarly, in the second stage, the first parallel strategy communicates the two communication pairs (0,4) and (2,6) through link 3 and link 4, while the second parallel strategy communicates the two communication pairs (0,6) and (2,4) through link 1 and link 2. In this way, links 1 to 4 are all working in the first stage, achieving load balancing and avoiding congestion on any link.

[0188] It should be understood that the above explanation uses the ring mode in Figure 6 and the HD mode in Figure 7 as examples. Similar methods can be used for other traffic patterns to adjust the communication direction or sequence, avoiding link congestion and achieving load balancing. This application analyzes the AI ​​task itself to obtain the traffic demand matrix of the AI ​​task, and determines the network topology based on this matrix. The network topology obtained through this analysis can adjust the communication direction as needed, achieving bidirectional link multiplexing, thereby improving network resource utilization and increasing the throughput and training efficiency of the entire system. Traditional solutions, when determining the network topology of optoelectronic hybrid networks, rely on historical traffic patterns and fixed network topologies. This makes traditional solutions lack the ability to flexibly adjust the communication direction or sequence. The technical solution provided in this application is more flexible than traditional solutions, and the customized network topology is more suitable for actual business scenarios, while also saving bandwidth resources.

[0189] In practice, the network controller can be pre-configured with a communication direction adjustment algorithm. This algorithm can first identify multiple repeating optical communication pairs that communicate in the same time period and use repeating optical communication links, select one of these repeating optical communication pairs to modify the communication direction, and then adaptively adjust the communication direction of other communication pairs based on the set communication strategy and traffic pattern, so that the AI ​​training task is not affected.

[0190] Furthermore, since the communication direction between accelerator cards has changed, it is necessary to ensure that the model training process follows the communication direction adjusted by the network controller. It should be understood that in large-scale distributed training, training efficiency is often affected by network communication methods and bandwidth allocation. The network topology determination method provided in this application occurs before the AI ​​training task is executed. Before AI model training begins, the network topology is generated based on the task requirements, and some communication directions are adjusted to achieve bidirectional link reuse. This not only improves training efficiency but also reduces network bottlenecks.

[0191] In one possible implementation, to ensure that the model training process will perform aggregate communication in accordance with the communication direction adjusted by the network controller, the network controller can send a notification message to the AI ​​platform 310 before the AI ​​task begins, so that the AI ​​platform 310 can adaptively adjust the training algorithm based on the notification message and adaptively adjust the communication strategy during the training process, so that aggregate communication can be performed in accordance with the communication direction adjusted by the network controller during the training process.

[0192] In another possible implementation, to ensure that the model training process will perform aggregate communication in accordance with the communication direction adjusted by the network controller, the network controller may not notify the AI ​​platform. The AI ​​platform will execute the AI ​​training task normally. When aggregate communication is required, after the data arrives at the communication system, the network controller can realize data communication in accordance with the adjusted communication direction.

[0193] The two implementation methods described above are possible implementation methods provided by this application. Other methods can also be used to ensure that data communication is carried out in accordance with the communication direction adjusted by the network controller during AI training. This application does not make any specific limitations.

[0194] Understandably, traditional solutions require detecting and analyzing historical network traffic to determine the network topology for hybrid optoelectronic networks. Because these solutions rely on historical traffic patterns and fixed network topologies, they lack the flexibility to adjust communication direction. In contrast, the proposed solution analyzes the AI ​​task itself to obtain its traffic demand matrix. This matrix is ​​then used to determine the network topology, allowing for adjustments to communication direction during the analysis process. This enables bidirectional link reuse, improving network resource utilization and enhancing overall system throughput and training efficiency.

[0195] It should be understood that the above examples provide some methods for merging traffic in repeated optical communication to obtain the communication demand of repeated optical communication links. In specific implementations, other methods can be used to merge traffic in combination with specific application scenarios so that the final communication demand meets the actual business needs.

[0196] Furthermore, after determining the communication demand corresponding to the repeating optical communication links, the communication demand of other communication links can be determined based on the communication demand of non-repeating communication pairs, thereby obtaining the traffic demand matrix of the communication system.

[0197] Optionally, after obtaining the traffic demand matrix of the communication system based on the above process, the traffic demand matrix can be updated by combining some load balancing algorithms to obtain an updated traffic demand matrix. A load balancing algorithm is an algorithm used to rationally allocate network traffic and computing tasks, avoiding overload of a single resource, thereby improving network performance and resource utilization. Load balancing algorithms may include, but are not limited to, least connections, weighted round-robin, and integer programming algorithms such as minimizing maximum link utilization, etc., and this application does not impose specific limitations. Thus, by determining the network topology information based on the updated traffic demand matrix, a load-balanced network topology can be obtained.

[0198] Furthermore, based on load balancing, constraint information can be incorporated to update the traffic demand matrix. This constraint information includes limitations and conditions inherent in the network topology design of the hybrid optoelectronic network, such as bandwidth constraints (limiting the bandwidth of links to ensure data traffic does not exceed the maximum carrying capacity of the link), latency constraints (ensuring network latency during data packet transmission does not exceed a set threshold), and security constraints (some links require adherence to specific security policies, such as traffic isolation or encryption, to protect sensitive data). More constraint information may also be included, but this application does not specify a particular limitation.

[0199] In practical implementation, the traffic demand matrix can be adjusted based on constraint information. While ensuring the symmetry of the traffic demand matrix, the bandwidth constraints specified in the constraint information are met, ensuring that the sum of corresponding elements in the traffic demand matrix is ​​no greater than the value specified in the constraint information. For example, if it is a global bandwidth constraint, the sum of all rows and columns in the updated traffic demand matrix is ​​no greater than the value of the global bandwidth constraint. If it is a single-task bandwidth constraint, the sum of the elements corresponding to that single task in the updated traffic demand matrix is ​​no greater than the value of the single-task bandwidth constraint. The constraint information can be user-configured or preset by the communication system based on historical scenarios. Different scenarios have corresponding constraint information, and this application does not impose specific limitations.

[0200] For example, in a traffic-sharing scenario, constraint information may include global traffic constraints, which include the constraint value of the sum of traffic from multiple services. Figure 8 is a schematic diagram of a process for updating the traffic demand matrix based on global traffic constraints provided in this application. As shown in Figure 8, in a multi-service shared global traffic scenario, N services can have N single-service traffic demand matrices. The global traffic demand matrix can be obtained based on the N single-service traffic demand matrices, specifically, it can be the superposition of the N single-service traffic demand matrices. The constraint is global bandwidth. Assuming the available link limit for each switching group is 16 traffic units, and the global traffic constraint is [16,16,16,16], and assuming the traffic demand matrix of the communication system is as shown in Figure 8, the global traffic demand matrix can be obtained by summing the traffic demand matrices of each single service. In this traffic demand matrix, there are multiple rows and columns where the total traffic exceeds 16 traffic units, which means it exceeds the global bandwidth constraint. Based on the constraint, it is updated. Based on the load balancing algorithm, considering the symmetry of the logical topology and the bandwidth limit of 16 traffic units, it is determined that in the updated traffic demand matrix, the sum of all rows and columns is 16, the matrix presents a symmetrical structure along the diagonal, and all diagonal elements are 0. Figure 8 is used for illustration and this application does not impose specific limitations.

[0201] For another example, in a traffic isolation scenario, the bandwidth of a communication system may be allocated to different services. Therefore, the constraint information may include single-task traffic constraints, which may include the traffic constraint values ​​of some links in a single service scenario. Figure 9 is a flowchart of updating the traffic demand matrix based on single-service traffic constraints provided in this application. As shown in Figure 9, in a traffic isolation scenario, there are N single-service traffic demand matrices for N services. If traffic constraints are applied to service N, assuming the single-service traffic constraints are [4,6,7,0]. In the traffic demand matrix of service N, the sum of the elements in the rows and columns does not satisfy [4,6,7,0], which means it exceeds the constraint of single service traffic. Based on the constraint, it is updated. Based on the load balancing algorithm, considering the symmetry of the logical topology and the constraint, it is determined that in the updated traffic demand matrix of service N, the sum of the elements in the first row is 4, the sum of the elements in the second row is 6, the sum of the elements in the third row is 7, and the sum of the elements in the fourth row is 0. Similarly, the sum of the elements in the first column is 4, the sum of the elements in the second column is 6, the sum of the elements in the third column is 7, and the sum of the elements in the fourth column is 0. The matrix presents a symmetrical structure along the diagonal, and all diagonal elements are 0. Figure 8 is used for illustration, and this application does not make specific limitations.

[0202] It should be understood that Figures 8 and 9 provide examples of possible constraint information in two scenarios. In specific implementations, there may be more types of constraint information. The updated traffic demand matrix can be obtained based on the constraint information and the symmetry of the logical topology of the traffic demand matrix. These will not be illustrated here.

[0203] It should be understood that the technical solution of this application can not only determine the corresponding traffic demand information based on the AI ​​task and customize the optoelectronic hybrid networking structure to meet the communication needs of the AI ​​task, but also meet the service needs of deeper traffic isolation and sharing based on different service scenarios when multiple AI tasks exist. It has a wide range of applicable scenarios and strong solution flexibility.

[0204] It should be understood that the embodiments of this application use an accelerator card as an example to illustrate the computing unit for processing AI tasks. In actual business scenarios, the computing unit for processing AI tasks can also be other computing units such as CPU, GPU or inference card, and this application does not limit it.

[0205] In this embodiment, after obtaining the updated traffic demand matrix based on constraint information, the necessary links and their required bandwidth can be determined according to the traffic demand between each accelerator card in the traffic demand matrix. Combined with the device information of the communication system, a suitable topology can be determined. The final generated topology information may include the devices included in the optoelectronic hybrid network to be reconstructed, and the connection relationships between the devices. Specifically, it may include information about the switching groups included in the optoelectronic hybrid network to be reconstructed, and information about the optical switching equipment that enables data communication between the switching groups.

[0206] S360: Network controller 210 determines the configuration information of optical switching equipment based on the topology information of the optoelectronic hybrid network.

[0207] In specific implementations, the configuration information may include port configuration information of the optical switching equipment, such as port number, port type, port rate, etc.; it may also include wavelength allocation information, such as wavelength size (e.g., using 40 channels, each channel with a bandwidth of 100 GHz), wavelength networking topology (wavelength paths between different switching devices so that data can be correctly transmitted through different fiber optic links), etc.; it may also include link configuration information, such as the source and destination ends of the link (e.g., specifying the connection from port 1 of OXC1 to port 3 of OXC2), link bandwidth, link delay requirements, etc., and may include more content, which is not specifically limited in this application.

[0208] S370: Network controller 210 sends configuration information to optical switching device 220.

[0209] In a specific implementation, the network controller 210 can determine the configuration information of multiple optical switching devices based on the topology information, and then send it to the corresponding optical switching devices to instruct them to complete the relevant configuration according to the configuration information.

[0210] S380: Optical switching equipment 220 switches optical communication links based on configuration information to complete the topology reconstruction of optoelectronic hybrid network.

[0211] In specific implementation, after each optical switching device 220 receives the configuration information issued by the network controller 210, it can complete the corresponding configuration based on the configuration information, such as establishing a connection between port 1 of OXC1 and port 3 of OXC2, configuring the corresponding bandwidth and link delay requirements, etc., to complete the topology of the optoelectronic hybrid network. This application does not make specific limitations.

[0212] Furthermore, after completing the topology reconstruction of the optoelectronic hybrid network, the network controller 210 can notify the distributed training system 300 to start model training. In this way, before the AI ​​task runs, the traffic demand information of the AI ​​task is determined based on the training information and device information of the AI ​​task. Then, the topology reconstruction of the optoelectronic hybrid network is performed based on the traffic demand information. This can eliminate the impact of the slow switching speed of optical switching equipment on the communication system. At the same time, this method does not require the detection or analysis of historical network traffic, which can avoid traffic detection costs and eliminate the complexity brought about by passive traffic sampling and traffic analysis.

[0213] In summary, this application provides a method for determining network topology information. Before the distributed model training begins, the network controller can analyze the training task to determine the traffic demand information of the training task. This traffic demand information includes the bandwidth demand between different processors during the AI ​​training task. Based on this traffic demand information, the network topology information of the optoelectronic hybrid network can be determined. Then, based on the network topology information, the configuration information of the optical switching equipment is generated, enabling the optical switching equipment to perform link switching based on the configuration information, completing the topology reconstruction of the optoelectronic hybrid network, and then starting the training of the AI ​​model.

[0214] This solution proactively plans traffic before training the AI ​​model, which can solve the problem of slow link switching in optical switching equipment. At the same time, this solution does not require the detection or analysis of historical network traffic, thus avoiding traffic detection costs and eliminating the complexity of passive traffic sampling and analysis. Moreover, since the network topology is determined based on the bandwidth requirements of the task, it can eliminate detour traffic, which is an effect that traditional methods based on detecting historical traffic to determine network topology cannot achieve.

[0215] The method for determining network topology information and the communication system provided in this application have been described in detail above. The structure of the network controller provided in this application will be explained below with reference to Figure 10.

[0216] Figure 10 is a schematic diagram of the structure of a network controller provided in this application. The network controller can be the network controller 210 mentioned above. As shown in Figure 10, the network controller includes an acquisition unit 810, a demand determination unit 820, a topology determination unit 830, a configuration determination unit 840, and a transmission unit 850. It should be understood that Figure 10 is an exemplary division method. The network controller 210 can be divided into more or fewer unit modules. This application does not make specific limitations.

[0217] The acquisition unit 810, demand determination unit 820, topology determination unit 830, configuration determination unit, and sending unit 850 can all be implemented in software or hardware. For example, the implementation of the acquisition unit 810 will be described below. Similarly, the implementation of the demand determination unit 820, topology determination unit 830, configuration determination unit, and sending unit 850 can refer to the implementation of the acquisition unit 810.

[0218] As an example of a software functional unit, the acquisition unit 810 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, the acquisition unit 810 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0219] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0220] As an example of a hardware functional unit, the acquisition unit 810 may include at least one computing device, such as a server. Alternatively, the acquisition unit 810 may be implemented using a central processing unit (CPU), an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a neural network processing unit (NPU), a system-on-a-chip (SoC), an offload card, an accelerator card, or any combination thereof.

[0221] The multiple computing devices included in the acquisition unit 810 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the acquisition unit 810 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the acquisition unit 810 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, GALs, DPUs, NPUs, SoCs, offloading cards, and accelerator cards.

[0222] It should be noted that, in other embodiments, the steps implemented by the acquisition unit 810, the demand determination unit 820, the topology determination unit 830, the configuration determination unit, and the sending unit 850 can be specified as needed. The network controller 210 can achieve all its functions by implementing different steps in the method for determining network topology information through the acquisition unit 810, the demand determination unit 820, the topology determination unit 830, the configuration determination unit, and the sending unit 850 respectively.

[0223] The functions of the acquisition unit 810, the demand determination unit 820, the topology determination unit 830, the configuration determination unit, and the sending unit 850 are explained below.

[0224] The acquisition unit 810 is used to acquire training information for the AI ​​training task, specifically to implement steps S310 to S340 and their optional steps in the embodiment of Figure 3.

[0225] The demand determination unit 820 is used to determine the traffic demand information of the AI ​​training task based on the training information. The traffic demand information includes the bandwidth demand between different processors during the training process of the AI ​​training task. The communication system is used to realize data communication between different processors. Specifically, it is used to implement S350 and its optional steps in the embodiment of Figure 3.

[0226] The topology determination unit 830 is used to determine the network topology information of the communication system based on traffic demand information, specifically to implement S350 and its optional steps in the embodiment of Figure 3.

[0227] In one possible implementation, the configuration determination unit 840 is used to determine the configuration information of at least one optical switching device based on network topology information. The configuration information is used to instruct each optical switching device to perform link switching and complete the topology reconstruction of the communication system. Specifically, it is used to implement S360 and its optional steps in the embodiment of Figure 3.

[0228] The transmitting unit 850 is used to transmit configuration information to at least one optical switching device, specifically to implement S370 and its optional steps in the embodiment of FIG3.

[0229] The sending unit 850 is used to send a notification message to the AI ​​platform. The notification message is used to notify the AI ​​platform to start executing the AI ​​training task. Specifically, it is used to implement S380 and its optional steps in the embodiment of Figure 3.

[0230] In one possible implementation, the training information includes a parallel strategy and a set communication strategy. The parallel strategy includes the parallel strategy used when the AI ​​training task is performed in a distributed manner, and the parallel strategy includes one or more of data parallelism, tensor parallelism, and pipelined parallelism. The set communication strategy includes the communication algorithm used for data synchronization between processors during the execution of the parallel strategy, and the set communication strategy includes one or more of broadcast, gather, scatter, all-gather, reduce, all-reduce, and reduce-scatter.

[0231] In one possible implementation, the requirement determination unit 820 is used to determine one or more communication domains corresponding to the parallel strategy in the training information, each communication domain including multiple processors that need to perform data synchronization; the requirement determination unit 820 is used to determine one or more communication pairs in each communication domain according to the set communication strategy in the training information, each communication pair including a pair of processors that send and receive in the communication domain; the requirement determination unit 820 is used to determine the communication volume of each communication pair based on the parallel strategy and the set communication strategy; and the requirement determination unit 820 is used to determine the traffic requirement information of the AI ​​training task based on the communication volume of each communication pair.

[0232] In one possible implementation, the demand determination unit 820 is used by the network controller to determine multiple optical communication pairs that communicate using optical communication links from multiple communication pairs in each communication domain. The optical communication links pass through optical switching equipment. The demand determination unit 820 is also used to determine multiple repeated optical communication pairs that communicate using repeated optical communication links from the multiple optical communication pairs. Based on the communication volume of the multiple repeated optical communication pairs, the demand determination unit 820 determines the bandwidth requirement of the repeated optical communication links. The demand determination unit 820 is also used to determine the traffic requirement information of the AI ​​training task based on the communication volume of each communication pair and the bandwidth requirement of the repeated optical communication links.

[0233] In one possible implementation, the demand determination unit 820 is used to merge the traffic of multiple repeating optical communication pairs that communicate using repeating communication links in the same time period and have different communication directions to obtain the bandwidth demand of the repeating communication links, wherein the bandwidth demand includes the maximum value of the traffic of multiple repeating optical communication pairs.

[0234] In one possible implementation, the demand determination unit 820 is used to superimpose the communication traffic of multiple repeating optical communication pairs that communicate using repeating communication links in the same time period and in the same communication direction to obtain the bandwidth demand of the repeating communication links, wherein the bandwidth demand includes the sum of the communication traffic of multiple repeating optical communication pairs.

[0235] In one possible implementation, the demand determination unit 820 is used to obtain the bandwidth limit of the repeating communication link; the demand determination unit 820 is used to obtain multiple repeating optical communication pairs to be merged from multiple repeating optical communication pairs that use the repeating communication link to communicate in different time periods based on the bandwidth limit, and to determine the bandwidth demand of the repeating communication link based on the communication volume of the multiple repeating optical communication pairs to be merged, wherein the bandwidth demand includes the sum of the communication volume of the multiple repeating optical communication pairs to be merged, and the bandwidth demand is not greater than the bandwidth limit.

[0236] In one possible implementation, the demand determination unit 820 is used to identify a first repeated optical communication pair and a second repeated optical communication pair that communicate using a repeated communication link in the same time period and have the same communication direction, wherein the first communication volume of the first repeated optical communication pair is greater than the second communication volume of the second repeated optical communication pair; the demand determination unit 820 is used to modify the communication direction of the first repeated optical communication pair; and the demand determination unit 820 is used to determine the bandwidth demand of the repeated communication link, including the first communication volume.

[0237] In one possible implementation, the topology determination unit 830 is used to acquire constraint information, update the traffic demand information based on the constraint information, and obtain updated traffic demand information. The constraint information includes global traffic constraints and single-task traffic constraints. The global traffic constraints are used to impose bandwidth constraints on the global traffic of the communication system, and the single-task traffic constraints are used to impose bandwidth constraints on multiple communication links of the communication system. The topology determination unit 830 is used to determine the network topology information of the communication system based on the updated traffic demand information.

[0238] In summary, this application provides a network controller that can analyze the training task before the distributed model training begins, determine the traffic demand information of the training task, including the bandwidth demand between different processors during the AI ​​training process, determine the network topology information of the optoelectronic hybrid network based on the traffic demand information, and then generate the configuration information of the optical switching equipment based on the network topology information, so that the optical switching equipment can perform link switching based on the configuration information, complete the topology reconstruction of the optoelectronic hybrid network, and then start the training of the AI ​​model.

[0239] This network controller proactively performs traffic planning before AI model training, which can solve the problem of slow link switching in optical switching equipment. At the same time, this solution does not require the detection or analysis of historical network traffic, thus avoiding traffic detection costs and eliminating the complexity of passive traffic sampling and analysis. Moreover, since the network topology is determined based on the bandwidth requirements of the task, it can also eliminate detour traffic, which is an effect that traditional methods based on detecting historical traffic to determine network topology cannot achieve.

[0240] The network topology configuration method, communication system, and network controller provided in this application have been described in detail above. The computing device and computing device cluster provided in this application will be explained below with reference to Figures 11 and 12.

[0241] Figure 11 is a schematic diagram of a computing device provided in this application. As shown in Figure 11, the computing device 900 includes: a bus 902, a processor 904, a memory 906, an accelerator card 907, and a communication interface 908. The processor 904, the memory 906, and the communication interface 908 communicate with each other via the bus 902. The computing device 900 can be a server. It should be understood that this application does not limit the number of processors, memories, and accelerator cards in the computing device 900. The computing device 900 can be used to deploy the network controller 210 in the embodiments of Figures 1-10 above. The memory 906 is used to store instructions, and the processor 904 is used to execute the instructions stored in the memory 906. The memory 906 stores program code, and the processor 904 can call the program code stored in the memory 906 to execute steps S310-S380 and their optional steps described in Figure 3.

[0242] It should be understood that the memory 906 stores executable program code, and the processor 904 executes the executable program code to implement the operation steps of the data communication method described in each embodiment of Figures 1 to 10. The program code may include one or more software units, which are the acquisition unit, demand determination unit, topology determination unit, configuration determination unit, and sending unit in the embodiment of Figure 10. Specifically, the acquisition unit is used to acquire training information for the AI ​​training task, and implements steps S310 to S340 and their optional steps in the embodiment of Figure 3. The demand determination unit is used to determine the traffic demand information of the AI ​​training task based on the training information. The traffic demand information includes the bandwidth demand between different processors during the training process. The communication system is used to realize data communication between different processors, and implements step S350 and its optional steps in the embodiment of Figure 3. The topology determination unit is used to determine the network topology information of the communication system based on the traffic demand information, and implements step S350 and its optional steps in the embodiment of Figure 3. Further details about each unit will not be elaborated here.

[0243] Bus 902 can be a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a Unified Bus (Ubus or UB), a Compute Express Link (CXL), a Cache Coherent Interconnect for Accelerators (CCIX), etc. The Unified Bus is also known as the Lingqu Bus. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in Figure 11, but this does not imply that there is only one bus or one type of bus. Bus 902 can include pathways for transmitting information between various components of the computing device 900 (e.g., memory 906, processor 904, communication interface 908). The Unified Bus can also be called the Lingqu Bus.

[0244] The processor 904 may include any one or more computing devices such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP) or a digital signal processor (DSP), an ASIC, an FPGA, a CPLD, an NPU, a SoC, an offload card, or an accelerator card.

[0245] Memory 906 may include volatile memory, such as random access memory (RAM). Memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD). Furthermore, memory 906 may also be implemented using storage class memory (SCM), phase change memory (PCM), or other types of storage media.

[0246] It is worth noting that the same type of storage medium can be configured in the same computing device to realize the function of memory 906, or two or more types of storage media can be configured to realize the function of memory 906. This application does not limit this.

[0247] The communication interface 908 uses transceiver modules such as, but not limited to, network interface cards and transceivers to enable communication between the computing device 900 and other devices or communication networks.

[0248] Furthermore, the accelerator card 907 can be implemented through computing devices such as DPU, NPU, GPU, XPU, SoC, or AI chips. The accelerator card 907 is used to implement distributed training of AI models. The accelerator card 907 includes a processing unit and a power supply circuit. The power supply circuit is used to supply power to the processing unit, enabling the processing unit to perform various tasks in distributed training.

[0249] It should be understood that the accelerator card 907 can be understood as the processor used to train AI models as mentioned above, while the processor 904 refers to the processing core in the computing device 900, such as the CPU. The two are different concepts.

[0250] This application also provides a computing device cluster, as shown in FIG12. FIG12 is an example diagram of a computing device cluster provided by this application. The cluster may include at least one computing device of the embodiment in FIG11. The computing device cluster is used to deploy the network controller 210 described above.

[0251] As one possible implementation, the memory 906 of one or more computing devices 900 in a computing device cluster may store the same instructions for implementing the operation steps of the network topology configuration method described in the embodiments of Figures 3 to 10. Alternatively, the memory 906 of one or more computing devices 900 may store different instructions for implementing the operation steps that the network controller needs to implement in the network topology configuration method described in Figures 3 to 10. In other words, a combination of one or more computing devices 900 can jointly execute instructions for implementing the operation steps in the network topology configuration method.

[0252] This application also provides a chip, which includes a processing unit and a power supply circuit. The power supply circuit is used to supply power to the processing unit, so that the processing unit executes the operation steps implemented by the accelerator card 331 in the computing node in the network topology configuration method of FIG3 to FIG10. For the sake of brevity, it will not be described in detail here.

[0253] This application also provides a chip system comprising multiple chips as described above, which is used to deploy the distributed training system described above.

[0254] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to execute the data communication method provided in this application.

[0255] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing 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). The computer-readable storage medium includes instructions that instruct a computing device to execute the data communication method provided in this application.

[0256] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of this application.

Claims

1. A network topology configuration method, characterized by, The method is applied to a communication system, which includes a network controller and optical switching equipment. The communication system enables communication between multiple processors, which are used for distributed training of artificial intelligence (AI) models. The method includes: The network controller acquires training information for the distributed training task, the training information including the parallel strategy used by the distributed training task; The network controller determines the traffic requirement information of the distributed training task based on the training information, and the traffic requirement information includes the bandwidth requirement among the multiple processors during the training process of the distributed training task. The network controller determines the network topology information of the communication system based on the traffic demand information; Based on the network topology information, the network controller sends configuration information to the optical switching device. The configuration information is used to instruct the optical switching device to perform link switching in order to realize the communication connection between the multiple processors through the optical switching device.

2. The method of claim 1, wherein, The parallel strategy includes one or more of data parallelism, tensor parallelism, and pipelined parallelism. The network controller determines the traffic requirement information of the distributed training task based on the training information, including: The network controller determines one or more communication domains according to the parallel strategy, and each communication domain includes multiple processors that need to be synchronized with data. The network controller determines the traffic demand information for each communication domain, and based on the traffic demand information for each communication domain, determines the traffic demand information for the AI ​​training task.

3. The method of claim 2, wherein, The training information also includes a collective communication strategy, which includes the communication strategy used by the multiple processors to synchronize data during the execution of the parallel strategy. The network controller determines the traffic demand information for each communication domain, including: The network controller determines one or more communication pairs in each communication domain according to the aggregated communication strategy, and each communication pair includes a pair of processors that transmit and receive in their respective communication domain; The network controller determines the communication volume of each communication pair based on the parallel strategy and the aggregated communication strategy. The network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The network controller sends a notification message to the AI ​​platform, which is used to notify the AI ​​platform to start executing the distributed training task.

5. The method according to claim 3 or 4, characterized in that, The network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair, including: The network controller determines from the plurality of communication pairs that communicate using repeated communication links; The network controller determines the bandwidth requirement of the repeated communication link based on the communication volume of the multiple repeated communication pairs. The network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair and the bandwidth demand of the repeated communication links.

6. The method of claim 5, wherein, The network controller determines the bandwidth requirement of the repeated communication link based on the communication volume of the plurality of repeated communication pairs, including: The network controller will use the repeating communication link to communicate in the same time period, and the communication direction is the same for a first repeating communication pair and a second repeating communication pair. The first communication volume of the first repeating communication pair is greater than the second communication volume of the second repeating communication pair. The network controller modifies the communication direction of the first repeated communication pair, or adjusts the communication order of the first repeated communication pair in the corresponding set communication strategy; The network controller determines that the bandwidth requirement of the repeated communication link includes the first communication volume.

7. The method according to any one of claims 3 to 6, characterized in that, The communication system further includes multiple switching groups, each switching group including at least one electrical switching device, the switching group establishing a communication connection with at least one of the multiple processors, and the optical switching device establishing a communication connection with the multiple switching groups; The network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair, including: The network controller determines multiple optical communication pairs from multiple communication pairs in each communication domain that communicate using an optical communication link, the optical communication link passing through the optical switching device; The network controller determines the traffic demand information for each communication domain based on the communication volume of the plurality of optical communication pairs.

8. The method according to any one of claims 1 to 7, characterized in that, The network controller determines the network topology information of the communication system based on the traffic demand information, including: The network controller acquires constraint information and updates the traffic demand information based on the constraint information to obtain updated traffic demand information. The constraint information includes global traffic constraints and single-task traffic constraints. The global traffic constraints are used to constrain the bandwidth of the global traffic of the communication system, and the single-task traffic constraints are used to constrain the bandwidth of multiple communication links of the communication system. The network controller determines the network topology information of the communication system based on the updated traffic demand information.

9. The method according to any one of claims 1 to 8, characterized in that, The network controller determines the network topology information of the communication system based on the traffic demand information, including: The network controller determines the network topology of the communication system using a load balancing algorithm based on the traffic demand information.

10. A network controller, comprising: The network controller is applied to a communication system, which includes the network controller and optical switching equipment. The communication system enables communication between multiple processors, which are used for distributed training of artificial intelligence (AI) models. The network controller includes: An acquisition unit is used to acquire training information of a distributed training task, the training information including the parallel strategy used by the distributed training task; A demand determination unit is used to determine the traffic demand information of the distributed training task based on the training information, wherein the traffic demand information includes the bandwidth demand among the multiple processors during the training process of the distributed training task. A topology determination unit is used to determine the network topology information of the communication system based on the traffic demand information. A configuration determination unit is used to send configuration information to the at least one optical switching device based on the network topology information. The configuration information is used to instruct the optical switching device to perform link switching in order to realize the communication connection between the multiple switching groups through the optical switching device.

11. The network controller of claim 10, wherein, The parallel strategies include one or more of data parallelism, tensor parallelism, and pipeline parallelism. The demand determination unit is used to determine one or more communication domains according to the parallel strategy, and each communication domain includes multiple processors that need to be synchronized with data. The demand determination unit is used to determine the traffic demand information of each communication domain, and based on the traffic demand information of each communication domain, determine the traffic demand information of the AI ​​training task.

12. The network controller of claim 11, wherein, The training information also includes a collective communication strategy, which includes the communication strategy used by the multiple processors to synchronize data during the execution of the parallel strategy. The demand determination unit is used to determine one or more communication pairs in each communication domain according to the aggregate communication strategy, wherein each communication pair includes a pair of processors that transmit and receive in their respective communication domains; The demand determination unit is used to determine the communication volume of each communication pair based on the parallel strategy and the aggregate communication strategy. The demand determination unit is used to determine the traffic demand information of each communication domain based on the communication volume of each communication pair.

13. The network controller of any of claims 9 to 12, wherein, The network controller further includes a sending unit, which is used to send a notification message to the AI ​​platform, the notification message being used to notify the AI ​​platform to start executing the distributed training task.

14. The network controller according to claim 12 or 13, characterized in that, The demand determination unit is used to determine, from the plurality of communication pairs, a plurality of repeated communication pairs that use repeated communication links for communication; The demand determination unit is used to determine the bandwidth demand of the repeated communication link based on the communication volume of the multiple repeated communication pairs. The demand determination unit is used to determine the traffic demand information of each communication domain based on the communication volume of each communication pair and the bandwidth demand of the repeated communication link.

15. The network controller according to claim 14, characterized in that, The demand determination unit is used to determine whether the network controller will use the repeating communication link to communicate in the same time period and whether the communication direction is the same for a first repeating communication pair and a second repeating communication pair, wherein the first communication volume of the first repeating communication pair is greater than the second communication volume of the second repeating communication pair. The demand determination unit is used to modify the communication direction of the first repeated communication pair, or to adjust the communication order of the first repeated communication pair in the corresponding set communication strategy. The demand determination unit is used to determine the bandwidth demand of the repeated communication link, including the first communication volume.

16. The network controller of claims 12-15, wherein, The communication system further includes multiple switching groups, each switching group including at least one electrical switching device, the switching group establishing a communication connection with at least one of the multiple processors, and the optical switching device establishing a communication connection with the multiple switching groups; The network controller determines the traffic demand information for each communication domain based on the traffic volume of each communication pair, including: The network controller determines multiple optical communication pairs from multiple communication pairs in each communication domain that communicate using an optical communication link, the optical communication link passing through the optical switching device; The network controller determines the traffic demand information for each communication domain based on the communication volume of the plurality of optical communication pairs.

17. The network controller according to any one of claims 10 to 16, characterized in that, The topology determination unit is used to acquire constraint information, update the traffic demand information based on the constraint information, and obtain updated traffic demand information. The constraint information includes global traffic constraints and single-task traffic constraints. The global traffic constraints are used to impose bandwidth constraints on the global traffic of the communication system, and the single-task traffic constraints are used to impose bandwidth constraints on multiple communication links of the communication system. The topology determination unit is used to determine the network topology information of the communication system based on the updated traffic demand information.

18. The network controller according to any one of claims 10 to 17, characterized in that, The topology determination unit is used to determine the network topology information of the communication system using a load balancing algorithm based on the traffic demand information.

19. A communication system, characterized by The communication system includes a network controller and an optical switching device. The communication system is used to realize communication between multiple processors, which are used for distributed training of artificial intelligence (AI) models. The network controller is used to implement the operation steps of the method as described in any one of claims 1 to 9.

20. A computing device, comprising: The computing device includes a processor and a memory, the memory being used to store code, and the processor being used to execute the code to implement the method as claimed in any one of claims 1 to 9.

21. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computing device, perform the method as claimed in any one of claims 1 to 9.

22. A computer program product comprising instructions, wherein: When the instruction is executed by the computing device, the computing device performs the operational steps of the method as described in any one of claims 1 to 9.