Routing method and routing device for path between devices

By selecting the path with the largest bandwidth as the target path among processing devices and switching to the backup path in case of anomalies, the problem of difficulty in determining the optimal communication path in the prior art is solved, and efficient and stable communication between processing devices is achieved.

CN121728017APending Publication Date: 2026-03-24MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing path routing technologies between processing devices struggle to determine the optimal communication path, resulting in suboptimal performance during communication.

Method used

By selecting the target path based on the bandwidth information of the connection path between processing devices, and switching to the backup path when the target path is abnormal, the stability and efficiency of communication performance are ensured.

Benefits of technology

It improves the communication performance between processing devices, meets communication bandwidth requirements, and dynamically adjusts routes when links are abnormal, ensuring efficient and stable data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121728017A_ABST
    Figure CN121728017A_ABST
Patent Text Reader

Abstract

The invention discloses a routing method and a routing device for a path between devices, the routing method and the routing device are applied to a processing system, the processing system comprises a plurality of processing devices, and the routing method comprises the following steps: according to connection topology information between the plurality of processing devices, routing the path between the plurality of processing devices; determining at least one connection path between a first processing device and a second processing device and bandwidth information of each connection path, wherein the first processing device and the second processing device are any two of a plurality of processing devices; and determining a target path from the at least one connection path according to the bandwidth information of each connection path, the target path being used for communication between the first processing device and the second processing device. According to the invention, the requirement of communication bandwidth can be met, and the communication performance between processing devices is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a routing method and routing device for an inter-device path. BACKGROUND

[0002] An inter-device high-speed link interconnection technology adopts a dedicated high-speed link for topology interconnection, and provides reliable communication guarantee for data transmission, instruction synchronization and memory sharing between computing devices, realizes deep fusion and collaborative scheduling of multi-device computing power, and is suitable for artificial intelligence (AI) large model training, high-performance computing (HPC), cloud-edge collaboration (CEC) and other scenarios.

[0003] It should be noted that the above introduction to the technical background is only for the convenience of clearly and completely describing the technical solutions of the present application, and for the convenience of understanding by those skilled in the art. The above technical solutions cannot be considered as known to those skilled in the art only because they are described in the background section of the present application. SUMMARY

[0004] Figure 1 is a schematic diagram of an interconnection topology between processing devices. As shown in Figure 1 , processing device 0, processing device 1, processing device 2 and processing device 3 are fully connected by links (for example, network cables), for example, processing device 0 and processing device 1 are connected by links 101 and 102, processing device 1 and processing device 2 are connected by links 103 and 104, processing device 2 and processing device 3 are connected by link 105, processing device 3 and processing device 0 are connected by links 106 and 107, processing device 0 and processing device 2 are connected by link 108, and processing device 1 and processing device 3 are connected by links 109 and 110, wherein processing device 0 and processing device 2 have the following multiple communication paths:

[0005] Connection path 1: processing device 0→processing device 1→processing device 2

[0006] Connection path 2: processing device 0→processing device 3→processing device 2

[0007] Connection path 3: processing device 0→processing device 2

[0008] The inventors discovered that, when multiple connection paths exist, existing path routing technologies between processing devices struggle to determine the optimal communication path. This results in the optimal communication path remaining idle during communication between devices, hindering the achievement of optimal communication performance. Therefore, determining the optimal communication path based on data traffic has become a pressing issue.

[0009] To address at least one of the aforementioned technical problems, this application proposes a routing method and apparatus for inter-device paths. In this routing method, a target path is selected based on the effective bandwidth of the connection path between processing devices for communication between a first processing device and a second processing device. This path selection mechanism can meet the communication bandwidth requirements and improve the communication performance between processing devices.

[0010] One aspect of this application provides a routing method for inter-device paths, applied to a processing system comprising multiple processing devices, the routing method comprising:

[0011] Based on the connection topology information between the plurality of processing devices, at least one connection path between the first processing device and the second processing device, and bandwidth information for each connection path, are determined, wherein the first processing device and the second processing device are any two of the plurality of processing devices; and

[0012] Based on the bandwidth information of each of the connection paths, a target path is determined from at least one of the connection paths, the target path being used for communication between the first processing device and the second processing device.

[0013] In some embodiments, determining a target path from at least one of the connection paths includes:

[0014] The at least two connection paths between the first processing device and the second processing device are sorted according to the bandwidth information, and the connection path with the largest bandwidth is selected as the target path.

[0015] In some embodiments, selecting the connection path with the largest bandwidth as the target path includes:

[0016] If there is only one connection path with the highest bandwidth, then that connection path with the highest bandwidth will be used as the target path.

[0017] If there are at least two connection paths with the highest bandwidth, the connection path with the lowest hop count among these two connection paths with the highest bandwidth shall be the target path.

[0018] In some embodiments, determining a target path from at least one of the connection paths includes:

[0019] For at least two connection paths between the first processing device and the second processing device, a weighted value is calculated based on the bandwidth information and hop count information, and the connection path with the largest weighted value is selected as the target path.

[0020] In some embodiments, the routing method further includes:

[0021] For at least two connection paths between the first processing device and the second processing device, an alternative path is determined according to the bandwidth information; and

[0022] When the target path is abnormal, the backup path is set to replace the target path for communication between the first processing device and the second processing device.

[0023] In some embodiments, determining alternative paths for at least two connection paths between the first processing device and the second processing device according to the bandwidth information includes:

[0024] If there is only one connection path with the highest bandwidth, select the connection path with the highest bandwidth other than the one with the highest bandwidth as the candidate path.

[0025] If there is only one candidate path, select that candidate path as the backup path; otherwise, sort at least two candidate paths according to their hop count information, and select the candidate path with the smallest hop count as the backup path.

[0026] In some embodiments, determining alternative paths for at least two connection paths between the first processing device and the second processing device according to the bandwidth information includes:

[0027] If there are at least two connection paths with the highest bandwidth, select the connection path with the highest bandwidth other than the target path as the candidate path, and select the connection path with the lowest hop count among the candidate paths as the backup path.

[0028] In some embodiments, determining alternative paths for at least two connection paths between the first processing device and the second processing device according to the bandwidth information includes:

[0029] For at least two connection paths between the first processing device and the second processing device, a weighted value is calculated based on the bandwidth information and hop count information, and the connection path with the largest weighted value, other than the connection path with the largest weighted value, is selected as the backup path.

[0030] In some embodiments, the routing method further includes:

[0031] After the target path recovers, the target path is marked as a valid backup path; and

[0032] When communication between the first processing device and the second processing device is idle, the effective backup path is set to replace the backup path for communication between the first processing device and the second processing device.

[0033] In some embodiments, when the connection path between the processing devices is a direct path, the bandwidth of the connection path between the processing devices is the sum of the bandwidths of all communication links on the direct path; or

[0034] When the connection path between the processing devices is a multi-hop path, the bandwidth of the connection path between the processing devices is the bandwidth of the connection path with the smallest bandwidth in the multi-hop path.

[0035] Another aspect of this application provides a routing device for inter-device paths, applied to a processing system comprising multiple processing devices, the routing device comprising:

[0036] A path management module determines, based on the connection topology information between the plurality of processing devices, at least one connection path between a first processing device and a second processing device, and bandwidth information for each connection path, wherein the first processing device and the second processing device are any two of the plurality of processing devices; and

[0037] The path selection module determines a target path from at least one of the connection paths based on the bandwidth information of each connection path, the target path being used for communication between the first processing device and the second processing device.

[0038] One of the beneficial effects of the embodiments of this application includes: selecting a target path based on the effective bandwidth of the connection path between the processing devices for communication between the first processing device and the second processing device. This path selection mechanism can meet the communication bandwidth requirements and improve the communication performance between the processing devices. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. The drawings, which provide a further understanding of the embodiments of the present invention, constitute a part of the specification and are used to illustrate the implementation of the present invention, and together with the text description, explain the principles of the present invention. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0040] Figure 1 This is a schematic diagram of the interconnection topology between processing devices;

[0041] Figure 2 This is a schematic diagram of a routing method for inter-device paths according to an embodiment of this application;

[0042] Figure 3 This is another schematic diagram of the routing method for inter-device paths according to an embodiment of this application;

[0043] Figure 4 It is a schematic diagram of a graph;

[0044] Figure 5 This is a schematic diagram of the target path and alternative path selection process in an embodiment of this application;

[0045] Figure 6 This is a schematic diagram of the link anomaly recovery process according to an embodiment of this application;

[0046] Figure 7 This is a schematic diagram of a routing device for inter-device paths according to an embodiment of this application. Detailed Implementation

[0047] Referring to the accompanying drawings, the foregoing and other features of this application will become apparent from the following description. Specific embodiments of this application are specifically disclosed in the description and drawings, illustrating partial implementations in which the principles of this application can be adopted. It should be understood that this application is not limited to the described embodiments; rather, it includes all modifications, variations, and equivalents falling within the scope of the appended notes. Various embodiments of this application are described below with reference to the accompanying drawings. These embodiments are merely exemplary and not intended to limit the scope of this application.

[0048] In the embodiments of this application, the terms "first," "second," etc., are used to distinguish different elements by name, but do not indicate the spatial arrangement or chronological order of these elements, and these elements should not be limited by these terms. The term "and / or" includes any one or more of the associated listed terms and all combinations thereof. The terms "comprising," "having," etc., refer to the presence of the stated features, elements, components, or assemblies, but do not exclude the presence or addition of one or more other features, elements, components, or assemblies.

[0049] In the embodiments of this application, the singular forms "a," "the," etc., including the plural forms, should be broadly understood as "a kind" or "a class" rather than limited to the meaning of "an"; furthermore, the term "the" should be understood to include both the singular and plural forms, unless the context clearly indicates otherwise. Additionally, the term "according to" should be understood as "at least in part according to…," unless the context clearly indicates otherwise.

[0050] First aspect of the embodiments

[0051] An embodiment of the first aspect of this application provides a routing method for inter-device paths, applied to a processing system including multiple processing devices.

[0052] Figure 2 This is a schematic diagram of a routing method for inter-device paths according to an embodiment of this application. For example... Figure 2 As shown, the routing method includes:

[0053] Operation 201: Based on the connection topology information between multiple processing devices, determine at least one connection path between the first processing device and the second processing device, and the bandwidth information of each connection path, wherein the first processing device and the second processing device are any two of the multiple processing devices; and

[0054] Operation 202: Based on the bandwidth information of each connection path, determine the target path from at least one connection path. The target path is used for communication between the first processing device and the second processing device.

[0055] This application selects a target path for the first processing device and the second processing device (e.g., bandwidth information (or bandwidth weights) based on bandwidth information). Figure 2 The communication between processing device 0 and processing device 2 shown in the diagram, the path selection mechanism can meet the requirements for communication bandwidth and improve the communication performance between processing devices.

[0056] In this application, the processing device is, for example, a GPU (or chip), or, for example, a computing card (or board) equipped with one or more GPUs (or chips), or a computing system composed of two or more computing cards.

[0057] In some examples, the connection path between processing devices can be a communication path between two GPUs (or chips), or a communication path between two computing cards (or GPUs (or chips), or a communication path between two computing units (or GPUs (or chips)). The number of such paths can be set to one or more.

[0058] In operation 201, the connection topology information between processing devices can be represented by a graph, which can conveniently represent the connection path (e.g., direct path or multi-hop path) between any two processing devices in the topology, the number of links between processing devices, and the bandwidth information of each link.

[0059] In a graph, vertices represent processing devices, each with a unique number; edges represent the number of links between processing devices; and bandwidth weights represent the total bandwidth between directly connected paths.

[0060] Figure 4 It is a schematic diagram of a graph, used to represent Figure 1 The connection topology information between the processing devices is shown. For example... Figure 4 As shown, vertices 0, 1, 2, and 3 represent processing devices 0, 1, 2, and 3, respectively, and each processing device has a unique number. Edge 301 represents the number of links between processing devices 0 and 1, with a value of 2; edge 302 represents the number of links between processing devices 1 and 2, with a value of 2; edge 303 represents the number of links between processing devices 2 and 3, with a value of 1; edge 304 represents the number of links between processing devices 3 and 0, with a value of 2; edge 305 represents the number of links between processing devices 1 and 3, with a value of 2; and edge 306 represents the number of links between processing devices 0 and 2, with a value of 1.

[0061] In operation 201, the bandwidth (or bandwidth weights) between processing devices is calculated by parsing the information in the graph, thereby generating a path statistics table.

[0062] In Operation 201, for a directly connected path (i.e., a single-hop path between the source and target processing devices), the bandwidth of that path is the sum of the bandwidths of all Links on that path. For example, if there are N directly connected Links between two processing devices, meaning the edge value is N and the bandwidth of a single Link is 28 GB / s, then the total bandwidth = 28 × N (GB / s), which is the bandwidth weight of the edge between the two processing devices.

[0063] In operation 201, for a non-directly connected path (i.e., there are multiple hops between the source processing device and the target processing device, that is, there are multiple cascaded direct paths between the source processing device and the target processing device), the bandwidth of the non-directly connected path depends on the bandwidth of the direct path with the smallest bandwidth on the non-directly connected path (i.e., the bottleneck bandwidth). In other words, the bandwidth of the non-directly connected path depends on the minimum bandwidth of each direct path segment on the non-directly connected path.

[0064] For example, such as Figure 1 and Figure 4 As shown, each Link has the same bandwidth, and the bandwidth weights of the three optional paths for communication between processing device 0 and processing device 2 are as follows:

[0065] Connection path 1: There are two bidirectional links between processing device 0 and processing device 1, that is, the value of edge 301 is 2, and the bandwidth weight of each link is 28GB / s. Therefore, the bandwidth weight of processing device 0 to processing device 1 is 28*2=56GB / s. Similarly, the bandwidth weight of processing device 1 to processing device 2 is 56GB / s. Since the total bandwidth of the path depends on the minimum bandwidth between processing device 0 to processing device 1 and processing device 1 to processing device 2, the bandwidth weight of connection path 1 is 56GB / s.

[0066] Connection path 2: The weight from processing device 0 to processing device 3 is 56 GB / s, and the weight from processing device 3 to processing device 2 is 28 GB / s. According to the minimum principle, the weight of connection path 2 is recorded as 28 GB / s.

[0067] Connection path 3: Bandwidth weight is 28GB / s.

[0068] For example, during the data transmission process from processing device 0 to processing device 1, the data is distributed across two links between processing device 0 and processing device 1 for transmission.

[0069] In operation 202, if there is only one connection path between the processing devices, that connection path is selected as the target path. If there are two or more connection paths between the processing devices, the target path is selected using the following two methods based on the path statistics table:

[0070] Method 1: Sort at least two connection paths between the first processing device and the second processing device according to bandwidth information, and select the connection path with the largest bandwidth as the target path.

[0071] In some examples, at least two connection paths between the first processing device and the second processing device are sorted according to bandwidth information, and the connection path with the largest bandwidth is selected as the target path.

[0072] For example, in Figure 1 In the connection topology between the processing devices shown, among the three optional paths for communication between processing device 0 and processing device 2, if the bandwidth weight of connection path 1 is greater than the bandwidth weight of connection path 2 and the bandwidth weight of connection path 3, then connection path 1 is selected as the target path.

[0073] This processing method can meet the requirement of maximum communication bandwidth between the first and second processing devices, achieving optimal transmission performance.

[0074] In Method 1, if there is only one connection path with the highest bandwidth, the connection path with the highest bandwidth is taken as the target path; if there are at least two connection paths with the highest bandwidth, the connection path with the lowest hop count among the at least two connection paths with the highest bandwidth is taken as the target path.

[0075] In some cases, if there is a connection path with the lowest hop count among at least two connection paths with the highest bandwidth, then that connection path is selected as the target path; if there are more than two connection paths with the lowest hop count, then any one of the connection paths with the lowest hop count is selected as the target path.

[0076] In some cases, at least two connection paths with the highest bandwidth are sorted by hop count, and the connection path with the lowest hop count is selected as the target path.

[0077] In some examples, the hop count refers to the number of intermediate processing devices that data passes through during its transmission from the source processing device to the target processing device plus 1. That is, the number of node jumps on the data transmission path. For example, the hop count for connection path 1 is 2, the hop count for connection path 2 is 2, and the hop count for connection path 3 is 1.

[0078] By using this processing method, when there are multiple connection paths with the largest bandwidth, the connection path with the largest bandwidth and the smallest hop count is selected as the target path by combining the hop count information, thereby achieving the best transmission performance between the first processing device and the second processing device.

[0079] Method 2: Calculate the weighted value of at least two connection paths between the first processing device and the second processing device based on bandwidth information and hop count information, and select the connection path with the largest weighted value as the target path.

[0080] For example, if we assign weights w1 and w2 to the bandwidth (or bandwidth weight) and hop count of connection path 1, connection path 2, and connection path 3, respectively, where w1 > w2, then the weighted values ​​of connection path 1, connection path 2, and connection path 3 are as follows:

[0081] Connection path 1: Weighted value is 56*w1+w2 / 2

[0082] Connection path 2: Weighted value is 28*w1+w2 / 2

[0083] Connection path 3: Weighted value is 28*w1+w2

[0084] If the weighted value of connection path 1 > the weighted value of connection path 3 > the weighted value of connection path 2, then connection path 1 is selected as the target path.

[0085] In Method 2 above, the target path is determined by comprehensively considering bandwidth and hop count information, and the weight of bandwidth information is set to be greater than that of hop count information, so that bandwidth information is more important than hop count information in the determination of the target path.

[0086] In operation 202, after selecting the target path that meets the requirements according to the path selection strategy, the hardware routing table is configured. The hardware provides the first route configuration channel, sets the target path as the primary route, and deploys it on channel 0. At the same time, the hardware is explicitly informed that the route on channel 0 is the primary route. When communicating between multiple processing devices, such as in a remote memory access scenario, the system queries the routing table information and uses the target path corresponding to the primary route to conduct data communication between processing devices.

[0087] In a multi-processor interconnection system, the master route is responsible for data transmission between processing devices under normal circumstances. The master route serves as the optimal path for communication between processing devices. When the link is functioning correctly, the master route remains unchanged. Therefore, existing routing technologies for paths between processing devices typically employ static routing tables. Path information is permanently configured in a static routing table between two processing devices. During communication between processing devices, this static routing table is consulted to select the data transmission path, thereby accessing the target remote processing device.

[0088] However, high-speed communication links have a certain probability of malfunctioning. When a link in the selected connection path malfunctions, it can lead to data loss or even communication interruption. Link recovery usually takes a long time and affects the overall system performance.

[0089] Figure 3 This is another schematic diagram of a routing method for inter-device paths according to an embodiment of this application. To solve at least one of the above-mentioned technical problems, such as... Figure 3 As shown, the device path routing method of this application, in addition to operations 201 and 202, also includes:

[0090] Operation 203: Determine alternative paths for at least two connection paths between the first processing device and the second processing device based on bandwidth information; and

[0091] Operation 204: When the target path is abnormal, set an alternative path to replace the target path for communication between the first processing device and the second processing device.

[0092] This approach allows for timely switching to a backup path (e.g., a secondary path) when the target path (e.g., the primary route) encounters an anomaly, and dynamically adjusts routing information to ensure that the optimal path can still be selected under the current environment, guaranteeing efficient and stable data transmission.

[0093] In operation 203, if there is only one connection path between the processing devices besides the target path, that connection path is selected as the backup path. If there are two or more connection paths between the processing devices besides the target path, the backup path is selected according to the following two methods:

[0094] Method 1: If there is only one connection path with the highest bandwidth, select the connection path with the highest bandwidth other than the one with the highest bandwidth as the candidate path.

[0095] If there is only one candidate path, select the candidate path as the backup path; otherwise, sort at least two candidate paths according to the hop count information and select the candidate path with the smallest hop count as the backup path.

[0096] For example, in Figure 1 In the connection topology between the processing devices shown, among the three optional paths for communication between processing device 0 and processing device 2, the bandwidth weight of connection path 1 is greater than the bandwidth weight of connection path 2, which is equal to the bandwidth weight of connection path 3. Therefore, connection path 1 is selected as the target path, and connection path 2 and connection path 3 are selected as candidate paths. Furthermore, since the number of hops of connection path 2 is greater than the number of hops of connection path 3, connection path 3 is selected as the backup path.

[0097] By using this processing method, when there are multiple candidate paths with the largest bandwidth, the candidate path with the largest bandwidth and the smallest hop count is selected as the backup path by combining the hop count information. Thus, outside of the target path, the backup path can achieve the best transmission performance between the first processing device and the second processing device.

[0098] In Method 1, if there are at least two connection paths with the highest bandwidth, the connection paths with the highest bandwidth other than the target path are selected as candidate paths, and the connection path with the lowest hop count among the candidate paths is selected as the backup path.

[0099] In some cases, if there is one connection path with the lowest hop count among the candidate paths, that connection path is selected as the backup path; if there are two or more connection paths with the lowest hop count, any one of them with the lowest hop count is selected as the backup path.

[0100] In some cases, at least two candidate paths are sorted by hop count, and the connecting path with the smallest hop count is selected as the backup path.

[0101] For example, in Figure 1 In the connection topology shown, the possible communication paths between processing device 0 and processing device 1 include:

[0102] Connection path 1: Processing device 0 → Processing device 1, bandwidth weight 56GB / s, hop count 1;

[0103] Connection path 2: Processing device 0 → Processing device 3 → Processing device 1, bandwidth weight is 56GB / s, hop count is 2;

[0104] Connection path 3: Processing device 0 → Processing device 3 → Processing device 2 → Processing device 1, with a bandwidth weight of 28GB / s and a hop count of 3;

[0105] The bandwidth weight of connection path 1 = the bandwidth weight of connection path 2 > the bandwidth weight of connection path 3. Connection path 1 is selected as the target path, and connection path 2 is selected as the candidate path. Since there is only one candidate path, connection path 2 is the backup path.

[0106] By using this processing method, when there are multiple connection paths with the largest bandwidth, the connection path with the largest bandwidth and the smallest hop count, other than the target path, is selected as the backup path based on the hop count information. Thus, the backup path can achieve the best transmission performance between the first processing device and the second processing device, in addition to the target path.

[0107] Method 2: Calculate the weighted value of at least two connection paths between the first processing device and the second processing device according to the bandwidth information and hop count information, and select the connection path with the largest weighted value other than the connection path with the largest weighted value as the backup path.

[0108] In method 2, the method for calculating the weighted value of at least two connection paths between the first processing device and the second processing device according to bandwidth information and hop count information can refer to the method for calculating the weighted value of at least two connection paths between the first processing device and the second processing device according to bandwidth information and hop count information in the above-mentioned selection of target path.

[0109] For example, in Figure 1 In the connection topology between the processing devices shown, among the three optional paths for communication between processing device 0 and processing device 2, if the weighted value of connection path 1 > the weighted value of connection path 3 > the weighted value of connection path 2, then connection path 1 is selected as the target path and connection path 3 is selected as the backup path.

[0110] By comprehensively considering bandwidth and hop count information, alternative paths are determined, and the weight of bandwidth information is set to be greater than that of hop count information, so that bandwidth information is more important than hop count information in the determination of alternative paths.

[0111] In some cases, the alternative path may also include multiple connection paths.

[0112] In operation 203, after selecting suitable backup paths, the hardware routing table configuration from operation 202 is updated. The hardware provides a first routing configuration channel and a second routing configuration channel, designated as primary and backup routes. The selection of primary and backup routes is controlled by software. The initial strategy is to set the target path as the primary route and deploy it on channel 0; the backup path is set as the backup route and deployed on channel 1. Simultaneously, the system explicitly tells the hardware that the route on channel 0 is the primary route and the route on channel 1 is the backup route, and that routes on both channels are valid. During communication between multiple processing devices, such as in remote memory access scenarios, the system queries the routing table information and uses the target path corresponding to the primary route for data communication between processing devices.

[0113] In Operation 204, when an anomaly is detected in the primary route link, the backup route is immediately promoted to the new primary route, the original faulty primary route is downgraded to the backup route and marked as invalid. After the switch is completed, the system immediately restores communication capability, and the background continues to attempt to restore the faulty link.

[0114] like Figure 3 As shown, the routing method for inter-device paths in this application further includes:

[0115] Operation 205: After the target path recovers, mark the target path as a valid backup path; and

[0116] Operation 206: When communication between the first processing device and the second processing device is in an idle state, set a valid backup path to replace the backup path for communication between the first processing device and the second processing device.

[0117] By using this approach, after setting up an effective backup path to replace the backup path for communication between the first and second processing devices, the currently used backup path falls back to the backup route. Finally, the system returns to the optimal communication path. By dynamically switching routes, communication efficiency is maximized and fault recovery overhead is reduced.

[0118] like Figure 1 As shown, there are two communication links between processing device 0 and processing device 1. If either link fails, the entire communication link between processing device 0 and processing device 1 is considered to be faulty and needs to be switched to the backup link.

[0119] Figure 5 This is a schematic diagram of the target path and alternative path selection process according to an embodiment of this application. Figure 5 As shown, the selection process includes:

[0120] Operation 401: Calculate the bandwidth weights of all connection paths between two processing devices (e.g., a first processing device and a second processing device);

[0121] Operation 402: Sort all connection paths according to their bandwidth weights, such as ascending or descending order;

[0122] Operation 403: Select the connection path with the highest bandwidth weight;

[0123] Operation 404: If there is only one connection path with the largest bandwidth weight, then execute operations 405 and 410; otherwise, execute operation 406.

[0124] Operation 405: Select the connection path with the largest bandwidth weight as the target path;

[0125] Operation 406: Sort at least two connection paths with the largest bandwidth weights by hop count, for example, in ascending or descending order;

[0126] Operation 407: If there is only one connection path with the largest bandwidth weight and the smallest hop count, then execute operation 408; otherwise, execute operations 409a and 409b.

[0127] Operation 408: Select the connection path with the largest bandwidth weight and the smallest hop count as the target path;

[0128] Operation 409a: Select any one of the connection paths with the largest bandwidth weight and the smallest hop count as the target path;

[0129] Operation 409b: Select the other path from the connection path with the largest bandwidth weight and the smallest hop count as the backup path;

[0130] Operation 410: If there is only one connection path with the largest bandwidth other than the connection path with the largest bandwidth weight, then execute operation 411; otherwise, execute operation 412.

[0131] Operation 411: Select the connection path with the largest bandwidth (excluding the connection path with the largest bandwidth weight) as the backup path;

[0132] Operation 412: Sort at least two connection paths with the largest bandwidth, excluding the connection path with the largest bandwidth weight, according to the number of hops, for example, in ascending or descending order;

[0133] Operation 413: If there is only one connection path with the largest bandwidth and the smallest hop count other than the connection path with the largest bandwidth weight, then execute operation 414; otherwise, execute operation 415.

[0134] Operation 414: Select the connection path with the largest bandwidth and smallest hop count (excluding the connection path with the largest bandwidth weight) as the backup path; and

[0135] Operation 415: Select any one of the connection paths with the largest bandwidth and the smallest hop count, excluding the connection path with the largest bandwidth weight, as the backup path.

[0136] Operation 401 corresponds to operation 201, operations 402 to 409a correspond to operation 202, and operations 409b to 415 correspond to operation 203.

[0137] Figure 6 This is a schematic diagram of a link anomaly recovery process according to an embodiment of this application. For example... Figure 6 As shown, the selection process includes:

[0138] Operation 501: When a communication failure occurs on the target path (i.e., the optimal path), the routing controller reports a communication interruption to the processor;

[0139] Operation 502: After receiving the communication interruption information, the processor initiates the dynamic switching process between the primary and backup routes;

[0140] Operation 503: Blocks access requests from upper-layer applications, thereby preventing access failures caused by access requests during route switching.

[0141] Operation 504: Determine if the backup route (the current backup route refers to the alternative path) exists and is valid. If it does, execute operation 505; otherwise, execute operation 511.

[0142] Operation 505: Switch the backup route (current backup route refers to the standby path) to the primary route, switch the original primary route (original primary route refers to the destination path) to the backup route, and mark it as invalid; thereby, communication between processing devices is restored, and upper-layer applications can continue to access it;

[0143] Operation 506: Restore links on the backup route (the current backup route refers to the destination path);

[0144] Operation 507: Determine whether the link of the backup route (the current backup route refers to the destination path) has been restored to normal. If so, mark the backup route (the current backup route refers to the destination path) as valid and execute operation 508; otherwise, execute operation 510.

[0145] Operation 508: Determine if the communication link is idle. If it is, execute operation 509.

[0146] Operation 509: Switch the backup route (current backup route refers to the target path) to the primary route, and switch the primary route (current primary route refers to the backup path) to the backup route. As a result, the communication path is restored to the original optimal path (i.e., the target path).

[0147] Operation 510: No dynamic route switching occurs; maintaining the backup route (the current backup route refers to the destination path) is ineffective.

[0148] Operation 511: Restore the link on the main route (the current main route refers to the destination path);

[0149] Operation 512: Determine if the main route (the current main route refers to the destination path) has returned to normal. If so, inter-device communication resumes; otherwise, execute operation 513.

[0150] Operation 513: Reports a communication error between processing devices to the processor, and the fault cannot be recovered.

[0151] Operations 501 to 505 correspond to operation 204, operations 506 to 507 correspond to operation 205, and operations 508 to 513 correspond to operation 206. In operations 501 to 513, the fast switching mechanism between primary and backup routes ensures the continuous and stable operation of communication services and guarantees the continuity of communication services.

[0152] In operations 506 and 511, the faulty link is repaired through a silent background mode, which avoids interference with normal communication. In operations 508 and 509, the optimal path switching is performed during off-peak hours, avoiding interference with normal communication throughout the recovery operation, and achieving dual optimization of intelligent recovery and resource utilization.

[0153] In Operations 505 and 507, the validity of routes is dynamically marked, and the identity of primary and backup routes is intelligently switched according to the link status, forming a complete closed-loop management of the status and ensuring that the system always maintains the optimal communication state.

[0154] Second aspect of the embodiments

[0155] An embodiment of the second aspect of this application provides a routing apparatus for inter-device paths.

[0156] Figure 7 This is a schematic diagram of a routing apparatus for inter-device paths according to an embodiment of this application. Figure 7 As shown, the routing system 600 includes a path management module 601, a path selection module 602, an exception handling module 603, and a path calculation module 604.

[0157] The path management module 601 is used to execute the method described in the first aspect embodiment for determining at least one connection path between the first processing device and the second processing device and the bandwidth information of each connection path, corresponding to operation 201.

[0158] The path selection module 602 is used to execute the method for selecting the target path and alternative path as described in the first aspect embodiment, corresponding to operations 202 and 203.

[0159] The exception handling module 603 is used to execute the exception handling method described in the first aspect embodiment, corresponding to operation 204.

[0160] The path recovery module 604 is used to execute the path recovery method described in the first aspect embodiment, corresponding to operations 205 and 206.

[0161] In some possible implementations, the path management module 601 determines at least one connection path between the first processing device and the second processing device, as well as the bandwidth information of each connection path, based on the connection topology information between the multiple processing devices; wherein the first processing device and the second processing device are any two of the multiple processing devices; and

[0162] The path selection module 602 determines the target path from at least one connection path based on the bandwidth information of each connection path. The target path is used for communication between the first processing device and the second processing device.

[0163] In some possible implementations, the path selection module 602 sorts at least two connection paths between the first processing device and the second processing device according to bandwidth information and selects the connection path with the largest bandwidth as the target path.

[0164] In some possible implementations, if there is only one connection path with the highest bandwidth, the path selection module 602 will use the connection path with the highest bandwidth as the target path; if there are at least two connection paths with the highest bandwidth, the path selection module 602 will use the connection path with the lowest hop count among the at least two connection paths with the highest bandwidth as the target path.

[0165] In some possible implementations, the path selection module 602 calculates a weighted value for at least two connection paths between the first processing device and the second processing device based on bandwidth information and hop count information, and selects the connection path with the largest weighted value as the target path.

[0166] In some possible implementations, the path selection module 602 determines an alternative path based on bandwidth information for at least two connection paths between the first processing device and the second processing device; and

[0167] When an anomaly occurs in the target path, the anomaly handling module 603 sets up a backup path to replace the target path for communication between the first processing device and the second processing device.

[0168] In some possible implementations, if there is only one connection path with the highest bandwidth, the path selection module 602 selects the connection path with the highest bandwidth (excluding the path with the highest bandwidth) as the candidate path.

[0169] If there is only one candidate path, the path selection module 602 selects the candidate path as the backup path; otherwise, at least two candidate paths are sorted according to the hop count information, and the path selection module 602 selects the candidate path with the smallest hop count as the backup path.

[0170] In some possible implementations, if there are at least two connection paths with the highest bandwidth, the path selection module 602 selects the connection path with the highest bandwidth other than the target path as a candidate path, and selects the connection path with the fewest hops among the candidate paths as a backup path.

[0171] In some possible implementations, the path selection module 602 calculates a weighted value for at least two connection paths between the first processing device and the second processing device based on bandwidth information and hop count information, and selects the connection path with the largest weighted value (excluding the connection path with the largest weighted value) as the backup path.

[0172] In some possible implementations, the path recovery module 604 marks the target path as a valid backup path after the target path has been restored to normal; and

[0173] When communication between the first processing device and the second processing device is idle, the path recovery module 604 sets a valid backup path to replace the backup path for communication between the first processing device and the second processing device.

[0174] In some possible implementations, when the connection path between processing devices is a direct path, the bandwidth of the connection path between processing devices is the sum of the bandwidths of all communication links on the direct path; or

[0175] When the connection path between processing devices is a multi-hop path, the bandwidth of the connection path between processing devices is the bandwidth of the single-hop connection path with the smallest bandwidth in the multi-hop path.

[0176] For the specific operations performed by the path management module 601, path selection module 602, exception handling module 603, and path calculation module 604 of the routing device 600, refer to the routing method described in the embodiment of the first aspect.

[0177] For any topology connecting processing devices, the routing device 600 can select the optimal communication path based on the specific topology, fully utilizing hardware resources and bandwidth to improve communication efficiency and overall performance. Furthermore, it dynamically switches routing information when a communication link fails, characterized by short switching time and high efficiency, effectively improving system stability and utilization, and ensuring efficient and stable data transmission. While maintaining high availability, it ensures that the multi-processor interconnection system always operates on the optimal path, effectively solving the performance bottleneck problem caused by high-speed link failures. The routing device 600 is easy to implement, primarily managed and processed by software, requiring minimal hardware design modifications and offering high application flexibility.

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

[0179] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0182] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0183] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0184] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0185] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0186] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0187] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A routing method for inter-device paths, characterized in that, The routing method is applied to a processing system, which includes multiple processing devices, and includes: Based on the connection topology information between the plurality of processing devices, at least one connection path between the first processing device and the second processing device, and bandwidth information for each connection path, are determined, wherein the first processing device and the second processing device are any two of the plurality of processing devices; and Based on the bandwidth information of each of the connection paths, a target path is determined from at least one of the connection paths, the target path being used for communication between the first processing device and the second processing device.

2. The routing method according to claim 1, characterized in that, Determining a target path from at least one of the connection paths includes: The at least two connection paths between the first processing device and the second processing device are sorted according to the bandwidth information, and the connection path with the largest bandwidth is selected as the target path.

3. The routing method according to claim 2, characterized in that, Selecting the connection path with the highest bandwidth as the target path includes: If there is only one connection path with the highest bandwidth, then that connection path with the highest bandwidth will be used as the target path. If there are at least two connection paths with the highest bandwidth, the connection path with the lowest hop count among these two connection paths with the highest bandwidth shall be the target path.

4. The routing method according to claim 1, characterized in that, Determining a target path from at least one of the connection paths includes: For at least two connection paths between the first processing device and the second processing device, a weighted value is calculated based on the bandwidth information and hop count information, and the connection path with the largest weighted value is selected as the target path.

5. The routing method according to claim 1, characterized in that, The routing method also includes: For at least two connection paths between the first processing device and the second processing device, an alternative path is determined according to the bandwidth information; and When the target path is abnormal, the backup path is set to replace the target path for communication between the first processing device and the second processing device.

6. The routing method according to claim 5, characterized in that, For at least two connection paths between the first processing device and the second processing device, alternative paths are determined according to the bandwidth information, including: If there is only one connection path with the highest bandwidth, select the connection path with the highest bandwidth other than the one with the highest bandwidth as the candidate path. If there is only one candidate path, select that candidate path as the backup path; otherwise, sort at least two candidate paths according to their hop count information, and select the candidate path with the smallest hop count as the backup path.

7. The routing method according to claim 5, characterized in that, For at least two connection paths between the first processing device and the second processing device, alternative paths are determined according to the bandwidth information, including: If there are at least two connection paths with the highest bandwidth, select the connection path with the highest bandwidth other than the target path as the candidate path, and select the connection path with the lowest hop count among the candidate paths as the backup path.

8. The routing method according to claim 5, characterized in that, For at least two connection paths between the first processing device and the second processing device, alternative paths are determined according to the bandwidth information, including: For at least two connection paths between the first processing device and the second processing device, a weighted value is calculated based on the bandwidth information and hop count information, and the connection path with the largest weighted value, other than the connection path with the largest weighted value, is selected as the backup path.

9. The routing method according to claim 5, characterized in that, The routing method also includes: After the target path recovers, the target path is marked as a valid backup path; and When communication between the first processing device and the second processing device is idle, the effective backup path is set to replace the backup path for communication between the first processing device and the second processing device.

10. The routing method according to claim 1 or 5, characterized in that, When the connection path between the processing devices is a direct path, the bandwidth of the connection path between the processing devices is the sum of the bandwidths of all communication links on the direct path; or When the connection path between the processing devices is a multi-hop path, the bandwidth of the connection path between the processing devices is the bandwidth of the connection path with the smallest bandwidth in the multi-hop path.

11. A routing device for inter-device paths, characterized in that, The routing device is applied to a processing system, which includes multiple processing devices, and includes: A path management module determines, based on the connection topology information between the plurality of processing devices, at least one connection path between a first processing device and a second processing device, and bandwidth information for each connection path, wherein the first processing device and the second processing device are any two of the plurality of processing devices; and The path selection module determines a target path from at least one of the connection paths based on the bandwidth information of each connection path, the target path being used for communication between the first processing device and the second processing device.