RapidIO Network Device Routing Method, System and Device
By optimizing the topology and path planning of the RapidIO network, and using the optimal link and endpoint device ID hop count, the problem of path planning time-consuming caused by the depth-first algorithm is solved, and faster data transmission and network stability are achieved.
Patent Information
- Application Number
- CN202510372494.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-27
AI Technical Summary
In the existing RapidIO network management system, the depth-first algorithm causes path planning to take time under complex topology, increase transmission distance and resource waste, and affects network response speed and stability.
By obtaining the network topology, calculating the optimal link between switching nodes, using Freud's algorithm and state compression dynamic programming, optimizing path planning, and using backup links and endpoint device ID hops to form the shortest path route.
Improve network response speed, reduce transmission delay, achieve traffic equalization, enhance network stability and reliability, avoid node or link overload, and improve overall performance and capacity.
Smart Images

Figure CN119892712B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of integrated circuit design, network device data transmission management, and RapidIO network, and particularly relates to a RapidIO network device routing method, system, and device. Background Art
[0002] The RapidIO protocol has characteristics such as high bandwidth, low latency, high flexibility, and strong reliability, and is the most preferred interconnection technology in high-performance embedded communication systems. Usually, a RapidIO network management system includes endpoint devices (PE, Processing Element) and switching devices (SWITCH). The former is responsible for generating, sending, and processing data packets, while the latter is responsible for receiving and forwarding data packets. Generally, there is a device in the endpoint devices as the master node, whose role is to perform network maintenance work such as initial enumeration, topology management, and routing deployment of the RapidIO network. Among them, topology management and routing deployment are the prerequisites and essential conditions for device management, mainly maintaining the topology data of the RapidIO network and providing data support for planning the routing from the master to each device.
[0003] Data forwarding between RapidIO network devices is based on the ID number. Considering that the switching device has no ID, when the target device is a switching device, a combination addressing of the ID number and the hop count (hopCount) is required. The hop count is the number of switching devices passed from the packet source device to the target device. Therefore, if the master device wants to access all the switching devices in the network, it is necessary to plan a path from the master to access all the switching nodes (allowing repeated access to the switch) as the basis for configuring and managing the routing. The existing technology uses the order of traversing the switches during the RapidIO initial enumeration process to configure and manage the routing, and the RapidIO initial enumeration uses a depth-first algorithm to traverse all the switches and the endpoints connected to the switches in the system. Due to the limitations of the depth-first algorithm, when the network topology is complex, traversing all the devices may require a large number of paths to be retraced before, and the management routing configured thereby greatly increases the transmission distance and time of the maintenance packet, wasting network resources. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a RapidIO network device routing method, system, and device, and specifically provide the following technical solutions:
[0005] In a first aspect, the present invention provides a RapidIO network device routing method, which includes:
[0006] S1. Obtain the topological structure of the RapidIO network system and form a topological graph based on the switching nodes;
[0007] S2. Based on the topological graph, calculate the optimal link when there are multiple links between any two directly connected switching nodes;
[0008] S3. Set the cost and path arrays between all switching nodes, calculate the minimum cost between any two switching nodes, and update the path between the two switching nodes based on this minimum cost;
[0009] S4. Starting from the host, calculate the path with the minimum cost among all possible paths passing through all switching nodes as the planned path;
[0010] S5. Starting from the last switching node of the planned path, perform backtracking based on the planned path, obtain all switching nodes in the planned path, and add the optimal link between any two directly connected switching nodes in this planned path to the planned path until backtracking to the switching node directly connected to the host to form the added planned path;
[0011] S6. Traverse the added planned path from the host again and add the route to each switching node.
[0012] Preferably, the RapidIO network system includes at least a host, a RapidIO switching device, and an endpoint device; each RapidIO switching device is a switching node. After adding the route to each switching node based on the added planned path, the host can access any RapidIO switching device and any endpoint device in the RapidIO network.
[0013] Preferably, the host is used for system enumeration and management of route planning, the RapidIO switching device is used for processing and forwarding data, and the endpoint device is used for sending or receiving data.
[0014] Preferably, in the adjacency matrix, corresponding values are set only for whether there is a direct link between any two switching nodes. For example, if there is a direct link, the corresponding adjacency matrix element is set to 1, otherwise it is set to 0.
[0015] Preferably, in S5, it also includes balancing the maintenance packet data traffic in the switching node: if the path between two switching nodes has been traversed once and it is necessary to return to the source switching node to access the next switching node, if there are multiple ports available for establishing a link between the two switching nodes, the port that has not been planned into the previous path is preferentially used to configure the link.
[0016] Preferably, in S2, the confirmation method of the optimal link is:
[0017] Calculate the bandwidth of different links between two switching nodes, and use the link with a higher bandwidth as the optimal link between the two switching nodes.
[0018] Preferably, after the equalization process, it further includes optimizing the access to the switching device using the endpoint device access path: using the ID of the endpoint device as the ID of the switching node in the path for the host to access the endpoint device, and using the hop count of the endpoint device minus one as the hop count of the switching node in the path for the host to access the endpoint device, where the switching node is directly connected to the endpoint device.
[0019] Preferably, in S4, starting from the master control, calculate the path with the minimum cost among all possible paths passing through all switching nodes, specifically including:
[0020] S41. Preprocess the cost and path array between all switching nodes. The cost is represented as the hop count from the source switching device to the destination switching device; the path array is set as a two-dimensional array a[i][j], indicating the last switching node in the path from switching node i to switching node j.
[0021] S42. Calculate the minimum cost between any two switching nodes, and update the path between the two switching nodes to the path corresponding to the minimum cost.
[0022] S43. Starting from the switching node directly connected to the host, calculate the cost of passing through each switching node. Each time a switching node is passed through, add one to the cost corresponding to the path until one or more paths that can access all switching nodes are constructed.
[0023] S44. Select the path with the minimum cost from the paths obtained in S43 as the planned path.
[0024] Preferably, the method further includes: when the port of a switching node is in a link failure state, if the link failure port is in the planned path and there is a redundant link between the two switching nodes involved in the link failure port, replace the link failure port with the port of the redundant link on its corresponding switching node;
[0025] If there is no redundant link between the two switching nodes involved in the link failure port, re-initiate path planning and repeat steps S2 to S6; if the switching node involved in the link failure port is not connected to any device in the topology graph, remove the switching node from the topology graph and then repeat steps S2 to S6.
[0026] Preferably, in S1, enumerate each RapidIO switching device and endpoint device in the entire RapidIO network starting from the host to form a topology graph, which is stored in the form of an adjacency matrix; the adjacency matrix does not include the host and the endpoint devices.
[0027] In a second aspect, the present invention further provides a RapidIO network device routing system, which includes: a host, a RapidIO switching device, and an endpoint device; the system is used to execute the RapidIO network device routing method as described above, and the host includes:
[0028] A topology graph building unit, which is used to form a topology graph based on switching nodes for the RapidIO network;
[0029] An optimal link calculation unit, which is used to calculate the optimal link when there are multiple links between any two switching nodes;
[0030] A path planning unit, which is used to form a planned path based on the path with the minimum cost, and form an added planned path based on the backtracking of the planned path.
[0031] In a third aspect, the present invention further provides a RapidIO network device routing device, which at least includes a processor and a memory, and the processor calls computer instructions in the memory to execute the RapidIO network device routing method as described above.
[0032] Compared with the prior art, this solution further optimizes the routing plan of the RapidIO network system. By using a combination of standby links and optimized links, the access of the master control device to other devices in the entire system is not affected, improving the stability and transmission efficiency of the management routing link. This solution has at least the following advantages compared with the path planning method of managing routing in the prior art:
[0033] The maintenance packet can reach the destination faster through the shortest path, reducing the transmission delay, thereby improving the network response speed. Reducing the resource consumption of the network, reducing the transmission distance and time, improving the responsiveness and availability of the service. Achieving balanced distribution of traffic, avoiding overload of certain nodes or links, thereby improving the overall stability and performance of the network. Effectively utilizing network resources, enhancing the overall capacity and throughput of the network. Reducing service interruptions caused by path failures or congestion, enhancing the continuity and reliability of the service. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0035] Figure 1 It is a schematic diagram of the RapidIO network routing method according to an embodiment of the present invention;
[0036] Figure 2 This is an example of the RapidIO network topology structure according to an embodiment of the present invention;
[0037] Figure 3 This is an example of the topology graph stored using the adjacency matrix according to an embodiment of the present invention;
[0038] Figure 4 This is a schematic diagram of the system architecture according to an embodiment of the present invention. Detailed implementation manners
[0039] The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be clear that the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0040] Those skilled in the art should know that the following specific embodiments or specific implementation manners are a series of optimized setting manners listed by the present invention to further explain the specific invention content, and these setting manners can be combined with each other or used in association with each other, unless it is clearly stated in the present invention that some or a specific embodiment or implementation manner cannot be associated or used jointly with other embodiments or implementation manners. At the same time, the following specific embodiments or implementation manners are only used as the optimized setting manners, rather than as an understanding of limiting the protection scope of the present invention.
[0041] Based on the above discussion, in order to solve the deficiencies of the prior art, the present invention provides a method for planning the management routing of RapidIO network devices. After the RapidIO network completes enumeration, first, according to the topology graph obtained by enumeration, use algorithms such as the Floyd algorithm to pre-calculate the shortest path between every two switching nodes; then use state compression plus dynamic programming to calculate the total cost of passing through each switching node from the master device until all switching nodes are passed; finally, find the optimal path according to the cost calculated above and backtrack all the passed switching nodes to plan the path of the management routing. The ID of the switch in the path still uses a unique ID, and the hop count (hopCount) is the hop count from the master to each switch in the planned path. At the same time, if the switching node is connected to an endpoint device, the ID and hop count of the endpoint device can be used, and the ID and hop count of the switching node can be the ID of the endpoint device and the hop count minus one. The planned path is used as a backup link to improve the usability and transmission efficiency of the link.
[0042] In a specific embodiment, in combination with Figure 1 as shown, the routing method of this solution mainly includes the following key settings and steps:
[0043] 1. The system targeted in this embodiment is at least a basic RapidIO network system, that is, it includes a master device (or called a host), a RapidIO switching device, and endpoint devices. The master device is also regarded as an endpoint device, which is responsible for system enumeration and management routing planning. The RapidIO switching device is responsible for processing and forwarding data, and the endpoint devices are responsible for sending or receiving data. This is the basic network system setting method for the execution of the method described in this embodiment. Those skilled in the art can understand that other necessary network system devices can also be added on the basis of the above infrastructure, and these conventional adjustments should all be regarded as falling within the protection scope of the present invention.
[0044] 2. Based on the above network system, obtain a topology map containing all the switching nodes of the system. After the system starts, the master device enumerates other devices in the entire network starting from the HOST (i.e., the host), and after completion, forms a complete topology map stored using an adjacency matrix, as Figure 3 shown. The setting method of the adjacency matrix in this embodiment can be as follows: using the node (i.e., Figure 3 the SW in) numbers as the horizontal and vertical axes, each element in the matrix represents the connection relationship between two nodes. For the assignment of each element, multiple methods can be used. In this embodiment, the Figure 3 assignment method is adopted, that is, 0 represents no direct connection between two switching nodes, and 1 represents that there is at least one direct link connection between two switching nodes (that is, there are no other intermediate nodes between two switching nodes and they are directly connected). In addition, combined with Figure 1 , the initialization step is mainly to obtain the above adjacency matrix. The adjacency matrix does not include the links between endpoints (i.e., endpoint devices) and switching nodes, but only includes the links between switching nodes and the links between the host and switching nodes. Further explanation is that in this solution, mainly the switching devices are managed and controlled, and the main purpose is to achieve access to all switching devices, so that by configuring the switching devices, access to the required endpoint devices can be achieved.
[0045] 3. For the obtained complete topology map, through the algorithm of the shortest path passing through all switching nodes starting from the master device, obtain the planned optimal path, and configure the routing of each switch based on the planned path to improve the transmission efficiency of the link on the basis of ensuring the normal sending and receiving of maintenance packets.
[0046] 4. After obtaining the optimal path, perform load balancing processing on the maintenance packet data traffic. The following principles are followed in the load balancing processing: If the path between two switching nodes has been traversed once and it is necessary to return to the source switching device (i.e., the switching node) to access the next switching device, if there are multiple ports available for establishing a link between two switching nodes (that is, there are other multiple links), preferentially use the ports that have not been planned into the previous path to configure the link routing.
[0047] 5. After performing maintenance packet data traffic balancing, host access to endpoint devices (such as Figure 2 The switching path optimization of endpoint A in , using the endpoint device ID and hop count (hopCount) minus one as the switching node directly linked to the endpoint device (see Figure 2 The ID and hop count of the switching node SW6 directly connected to the endpoint device A in the optimization plan path are used as the backup link. If the connection between the endpoint device and the switching device is disconnected, the backup link can still be used to ensure the normal sending and receiving of the maintenance package. It is further explained here that in this embodiment, the hop count is used as the cost, that is, the cost of the path; the ID and the specific hop count are used for addressing.
[0048] It can be understood here that for a switching node in the network that is not directly connected to an endpoint device, its ID is set to 0xff. The hop count of such a switching node can be determined by the number of switching nodes passed through in the initialization planning optimal path. In this embodiment, the hop count of the switching node is the number of switching nodes passed through from the host to the switching node, for example Figure 2 In the example, the host accesses the switching node SW2 through the switching node SW0, so the hop count of SW2 in this path is 1. After the optimal path planning in this scheme, all the switching nodes in the network will have an ID and a hop count, among which the ID and hop count of the switching node directly connected to the endpoint device are updated to the ID of the endpoint device to which it is directly connected, and the hop count is updated to the hop count of the endpoint device to which it is directly connected minus 1. In addition, in a more special case, when a switching node is directly connected to multiple endpoint devices, the ID of the switching node is updated to the ID of the endpoint device with the smallest ID among the connected endpoint devices, and the hop counts of the endpoint devices connected to the same switching node are generally the same. Therefore, in this case, the hop count of the switching node is set according to the hop count of any endpoint device to which it is directly connected, and the hop count results of the switching node are often the same.
[0049] 6. When a link down event occurs between the links of the switching nodes, if the disconnected port is detected in the port of the above path planning, the planned path needs to be updated. If there are still redundant links between the two switches, one of the redundant links can be directly selected for use. If not, the algorithm in the above step 3 needs to be called to re-plan the management routing path. In a preferred implementation, if there are multiple redundant links, the link with the highest bandwidth is selected.
[0050] 7. After the path planning is completed and configured for each switching device, the master device can access all the switching devices and the endpoint devices connected thereto, and manage and maintain the entire RapidIO network through modules such as error management and traffic statistics. Here, modules such as error management, traffic statistics, device management, network enumeration, topology management, traffic monitoring, port management, and routing configuration belong to other cooperating modules for network management and maintenance, and their working methods can be the conventional methods in the existing technology, which will not be elaborated here.
[0051] The following will again combine Figure 1 、 2 with a specific example to further elaborate in detail on the method for routing planning based on the network topology. Figure 2 The RapidIO shown in the topology structure in
[0052] does not list enough links between the endpoint devices and the switching nodes, and is only used as an illustrative example. Among them, the endpoint device with network management function is the host. The specific implementation process of this solution is as follows:
[0053] (1) The host initiates network enumeration to obtain a network topology map including all the endpoint devices and switching devices, and the host can access any device in the network. Here, the acquisition of the network topology map can adopt, for example, the depth-first algorithm, etc. The topology map is represented by an adjacency matrix. Figure 3 (2) Based on the topology map and related data structures obtained in the previous step, the data structure can refer to the adjacency matrix shown in Figure 2 to calculate the optimal link between any two switching nodes. The calculation of the optimal link between two switching nodes is to determine whether it is the optimal link by calculating the bandwidth of different links between the two switching nodes. As shown in
[0054] (3)Preprocess the cost and path-related array of the connection paths between all switching nodes. The cost is represented as the number of hops from the source switching device (i.e., the source switching node) to the destination switching device (i.e., the destination switching node). Suppose there are n switching nodes, and the path-related array is a two-dimensional array of n*n. a[i][j] represents the last switching node in the path from switching node i to switching node j. If a[i][j] = k and a[i][k] = i, then the path from switching node i to switching node j is i-k-j. For the topology graph, the path-related array between any two switching nodes can be obtained; combined with Figure 2 As shown in Figure 2 , taking SW2 to SW5 as an example, if a[2][5]=4, a[2][4]=3, a[2][3]=2, then the path from SW2 to SW5 at this time is SW2-SW3-SW4-SW5. Then cost[2][3] = 1, cost[2][4] = cost[2][3] + cost[3][4], cost[2][5]= cost[2][4] + cost[4][5]. This cost for adjacent switching nodes is 1, and for non-adjacent switching nodes, it needs to be calculated step by step; if a[2][5]=6, a[2][6]=2, then the path from SW2 to SW5 at this time is SW2-SW6-SW5, and the calculation of the cost (i.e., the expense) refers to the previous one. In summary, for the setting of the cost, since SW2 and SW3 are directly connected, the cost between the two switching nodes can be set to 1, and the previous switching node is SW2. However, since SW2 and SW5 are not directly connected, the calculation of its cost needs to be cumulative. It can be understood here that the method of using the endpoint device ID and subtracting one from the number of hops is used to update the ID and the number of hops of the switching nodes directly connected to the endpoint device after the number of hops and the cost of these switching nodes are initialized. For example, the switching node hanging the host device uses the host ID and subtracts one from the number of hops to access this switching node, and the switching nodes not directly connected to the endpoint device still use the method in this paragraph to set the number of hops. Here, as mentioned before, for the switching nodes not directly connected to the endpoint device, their ID is set to 0xff, and these switching nodes are distinguished by the number of hops. Further explanation here is that 0xff is a reserved ID, and this embodiment uses it on the switching nodes to avoid the risk of conflict with the endpoint device ID that may occur when using other IDs.
[0055] (4) Calculate the minimum cost between any two switching nodes and update the relevant paths. For example, there are two routes between SW2 and SW5, namely SW2 - SW3 - SW4 - SW5 and SW2 - SW6 - SW5. The cost of the former is 3 and the cost of the latter is 2. Then set the cost between the two switching nodes to 2, and the previous switching node is SW6. That is, the path between SW2 and SW5 is updated to the minimum cost path SW2 - SW6 - SW5.
[0056] (5) The host device is directly connected to SW0. Calculate the cost of passing through each switching node starting from SW0. Each time a switching node is passed through (including repeated passing through the same switching node), the cost is incremented by one. In this embodiment, state compression is used to represent whether each switching node has been passed through. State compression is represented by an array. Each bit in the array represents the corresponding switching node. That is, the number of bits is set according to the number of switching nodes in the topology graph. Which bit is set indicates that the corresponding switching node has been passed through. For example, if SW0 is passed through first, then the 0th bit of the status bit is set to 1. Then, when passing through any other switching node, the corresponding status bit is set to 1. At the same time, continuously update the previous node with a smaller cost according to the cost calculated by the previous status bits until all switching nodes have been passed through, that is, all status bits related to the switching nodes are 1. Finally, a path is constructed starting from the main control and capable of accessing all switching nodes (i.e., all switching nodes in the topology network); it can be understood that there may be multiple paths planned at this time, that is, all these paths can achieve starting from the host and accessing all switching nodes in the network.
[0057] (6) Find the path with the minimum cost among all paths. Then, according to the last switching node of this path, continuously backtrack to find the previous switching node, and add the optimal link between two adjacent switching nodes to the planned path. If there is more than one optimal link between two switching nodes, the link with a wider bandwidth can be selected based on the bandwidth as the optimal path. If the bandwidths of multiple optional optimal paths are the same, any one of them can be selected, such as the first one. Of course, other performance metrics can also be added here for further screening until reaching SW0 directly connected to the host.
[0058] (7) Traverse the planned path from the beginning and add the route to the corresponding switching nodes. If the link between two switching nodes has been used and there are multiple links, update the optimal link between the switching nodes to the unused link for future use. Here, when updating the optimal link between switching nodes, the same method as in step (6) can be used, that is, select the link with a wider bandwidth as the optimal. If there are multiple identical optimal paths with the same bandwidth, any one of them can be selected, such as the first one. Figure 2As shown in the figure, for example, the planned path is SW0 - SW1 - SW0 - SW2 - SW6 - SW5 - SW4 - SW7 - SW8 - SW7 - SW10 - SW9. When SW0 moves to SW1, the optimal link between SW0 and SW1 is port 5 of SW0 and port 4 of SW1. At this time, since there are multiple links between SW0 and SW1, the optimal link between SW0 and SW1 will be updated to port 4 of SW0 and port 5 of SW1. When SW1 returns to SW0, this link will be used, that is, when it is possible not to reuse, the non - repeating link will be preferentially used.
[0059] (8)When the link of a switch port (i.e., the port in the switching node) fails (i.e., link down), if the port is in the planned path and there is a redundant link between two switching nodes, the failed routing port of the switch is replaced by the port of the redundant link. For example, the routing of each switch configuration (i.e., the routing relationship between the internal ports of each switching node) is respectively SW0 - 2 -> SW0 - 5, SW1 - 4 -> SW1 - 5, SW0 - 4 -> SW0 - 8, SW2 - 3 -> SW2 - 9, SW6 - 1 -> SW6 - 7, SW5 - 9 -> SW5 - 5, SW4 - 4 -> SW4 - 6, SW7 - 7 -> SW7 - 9, SW8 - 7 -> SW8 - 7, SW7 - 9 -> SW7 - 10, SW10 - 7 -> SW10 - 11, SW9 - 10 -> SW9 - 7, SW3 - 6 -> SW3 - 6. If the port 4 of SW4 fails and the link drops, but the port 4 of SW4 is in the planned path, this will cause the routing SW4 - 4 -> SW4 - 6 to fail, and the switching devices after this routing in the planned path cannot be accessed. Therefore, the port 7 of the redundant link of SW4 is used to replace the original routing. Since the link drop of port 4 of SW4 affects the connection with SW5, the routing related to SW5 should also be replaced by port 0 of SW5, that is, SW5 - 5 is replaced by SW5 - 0. At this time, the routing related to SW5 and SW4 becomes SW5 - 9 -> SW5 - 0, SW4 - 7 -> SW4 - 6. If there is no redundant link between switches, such as the link between SW2 and SW6 is disconnected, the path planning will be restarted, and steps (2) - (7) will be repeated.
[0060] From the description of the above embodiments, it can be seen that this solution effectively improves the stability and transmission efficiency of the routing link. The maintenance packet can reach the destination faster through the shortest path, reducing the transmission delay, thereby improving the network response speed. At the same time, it can achieve the balanced distribution of traffic, effectively utilize network resources, avoid overloading of certain nodes or links, thereby improving the overall network stability and performance, reducing service interruptions caused by path failures or congestion, and enhancing the continuity and reliability of services.
[0061] In another embodiment, the present solution can also be implemented in a systematic manner, in combination with Figure 4 As shown, the system includes:
[0062] A host, multiple RapidIO switching devices, and endpoint devices. There can be multiple endpoint devices, Figure 4 and only one is taken as an example for illustration herein; the system is used to execute the RapidIO network device routing method as described above. The host includes:
[0063] A topology graph building unit, which is used to form a topology graph based on switching nodes for the RapidIO network;
[0064] An optimal link calculation unit, which is used to calculate the optimal link when there are multiple links between any two switching nodes;
[0065] A path planning unit, which is used to form a planned path based on the path with the minimum cost, and form an added planned path based on the backtracking of the planned path.
[0066] In yet another embodiment of the present solution, it can be implemented in the form of a device. The device can include corresponding modules that execute each or several steps in the above various embodiments. Therefore, each step or several steps in the above various embodiments can be executed by the corresponding modules, and the device can include one or more of these modules. The module can be one or more hardware modules specifically configured to execute the corresponding steps, or implemented by a processor configured to execute the corresponding steps, or stored in a computer-readable medium for implementation by the processor, or implemented through a certain combination.
[0067] The device can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus connects various circuits including one or more processors, memories, and / or hardware modules together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0068] Any process or method description depicted in the flowchart or described otherwise herein can be understood as representing a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of this solution includes additional implementations, where the functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed. This should be understood by those skilled in the technical field to which the embodiments of this solution pertain. The processor executes the various methods and processes described above. For example, the method embodiments in this solution can be implemented as a software program tangibly embodied in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via the memory and / or communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps of the methods described above can be executed. Alternatively, in other embodiments, the processor can be configured to execute one of the above methods by any other suitable means (e.g., by means of firmware).
[0069] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the technical field to which the present invention pertains within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A method for routing a RapidIO network device, characterized in that, The method includes: S1. Obtain the topology of the RapidIO network system and form a topology graph based on the switching nodes; S2. Based on the topology graph, calculate the optimal link when there are multiple links between any two directly connected switching nodes; S3. Set the cost and path arrays between all switching nodes, calculate the minimum cost between any two switching nodes, and update the path between the two switching nodes based on the minimum cost; S4. Starting from the host, calculate the path with the minimum cost among the possible paths passing through all switching nodes as the planned path; In S4, the path with the minimum cost is calculated through state compression and dynamic programming; The state compression is used to represent whether each switching node has been passed, specifically represented as a two-dimensional array, where each bit in the array represents the corresponding switching node; according to the total number of switching nodes in the topology graph, set the corresponding number of bits; when the bit is set, it means that the corresponding switching node has been passed; The dynamic programming is used to continuously update the predecessor node with a smaller cost according to the cost calculated by the bits until all switching nodes have been passed; S5. Starting from the last switching node of the planned path, perform backtracking based on the planned path, obtain all the switching nodes in the planned path, and add the optimal link between any two directly connected switching nodes in the planned path to the planned path until backtracking to the switching node directly connected to the host to form the planned path after addition; S5 further includes balancing the maintenance packet data traffic in the switching nodes: if the path between two switching nodes has been passed once and it is necessary to return to the source switching node to access the next switching node, if there are multiple ports available for establishing a link between the two switching nodes, preferentially use the ports not planned into the previous path to configure the link; after the balancing process, it further includes optimizing the access to the switching device using the endpoint device access path: using the ID of the endpoint device as the ID of the switching node in the path for the host to access the endpoint device, and using the hop count of the endpoint device minus one as the hop count of the switching node in the path for the host to access the endpoint device, and this switching node is directly connected to the endpoint device; S6. Traverse the planned path after addition from the host again and add the routing to each switching node.
2. The method according to claim 1, characterized in that, The RapidIO network system includes at least a host, a RapidIO switching device, and an endpoint device; each RapidIO switching device is a switching node. After adding the routing to each switching node based on the planned path after addition, the host can access any RapidIO switching device and any endpoint device in the RapidIO network.
3. The method according to claim 1, characterized in that, In S2, the confirmation method of the optimal link is: Calculate the bandwidths of different links between two switching nodes, and use the link with a higher bandwidth as the optimal link between the two switching nodes.
4. The method according to claim 1, wherein In S4, starting from the main control, calculate the path with the minimum cost among the possible paths passing through all switching nodes, specifically including: S41. Preprocess the costs of all paths between switching nodes and the path array. The cost is represented as the number of hops from the source switching device to the destination switching device. The path array is set as a two-dimensional array a[i][j], which represents the last switching node in the path from switching node i to switching node j. S42. Calculate the minimum cost between any two switching nodes, and update the path between the two switching nodes to the path corresponding to the minimum cost. S43. Start from the switching node directly connected to the host, calculate the cost of passing through each switching node. For each switching node passed, add one to the cost corresponding to the path until one or more paths that can access all switching nodes are constructed. S44. Select the path with the minimum cost from the paths obtained in S43 as the planned path.
5. The method according to claim 1, characterized in that, The method further includes: when a link failure occurs at the port of a switching node, if the link failure port is in the planned path and there is a redundant link between the two switching nodes involved in the link failure port, replace the link failure port with the port of the redundant link on its corresponding switching node. If there is no redundant link between the two switching nodes involved in the link failure port, re-initiate path planning and repeat steps S2 to S6. If the switching node involved in the link failure port is not connected to any device in the topology graph, remove the switching node from the topology graph and then repeat steps S2 to S6.
6. The method according to claim 1, wherein In S1, enumerate each RapidIO switching device and endpoint device in the entire RapidIO network starting from the host to form a topology graph, which is stored in the form of an adjacency matrix. The adjacency matrix does not include the host and endpoint devices.
7. The RapidIO network device routing system is characterized in that The system includes: a host, RapidIO switching devices, and endpoint devices. The system is used to execute the RapidIO network device routing method as described in any one of claims 1-6. The host includes: A topology graph establishment unit for forming a topology graph based on switching nodes for the RapidIO network. An optimal link calculation unit for calculating the optimal link when there are multiple links between any two switching nodes. A path planning unit for forming a planned path based on the path with the minimum cost and forming an added planned path based on the backtracking of the planned path.
8. A RapidIO network device routing apparatus, characterized in that, The device at least includes a processor and a memory. The processor calls the computer instructions in the memory to execute the RapidIO network device routing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Industrial Ethernet data distribution and link redundancy design
CN103095540A
Routing method and routing equipment
CN107995109A
Network dynamic search and route configuration method
CN114363188A
Route automatic planning method of RapidIO switching network
CN115208820A
Adaptive network dynamic topology method and device based on switches
CN117560312A