Self-adaptive routing method and device, medium, equipment and product

By using a layered approach to collect node network metrics data and an adaptive routing method that dynamically adjusts weights, the problems of poor flexibility and high communication overhead in traditional routing algorithms are solved, achieving high-performance routing under complex network loads.

CN121283931APending Publication Date: 2026-01-06YUANQIXIN (SHANDONG) SEMICONDUCTOR TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511395309.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Existing deterministic routing algorithms lack flexibility and cannot cope with network congestion and dynamic load changes, while adaptive algorithms based on global information suffer from high latency and high communication overhead.

Method used

A hierarchical acquisition mechanism is used to obtain preset index data of the node network, generate a candidate path set and evaluate the comprehensive cost, bypass congested areas through preset turning constraint rules, and dynamically adjust weights to select the optimal path.

Benefits of technology

It reduces the delay in determining the optimal path, reduces communication overhead, improves path reliability and network performance, and adapts to complex network load changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121283931A_ABST
    Figure CN121283931A_ABST
Patent Text Reader

Abstract

The invention relates to a self-adaptive routing method and device, a medium, equipment and a product. The method comprises the following steps: acquiring preset index data of each node in different hierarchies of a node network by adopting different preset periods; generating a candidate path set according to the target node and a preset turning constraint rule; wherein the candidate path set comprises a plurality of candidate paths taking the target node as an end point, and the preset turning constraint rule is used for indicating that the candidate paths can bypass a congestion area in the node network; for each candidate path, evaluating the comprehensive cost of the candidate path according to the preset index data of each node in the candidate path; and selecting an optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path. The invention provides a routing scheme which not only can realize self-adaptive routing, but also can reduce delay and reduce communication overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of on-chip network development technology, and in particular to an adaptive routing method, apparatus, medium, device, and product. Background Technology

[0002] With the development of multi-core processor technology, on-chip networking has become a key architecture for solving the communication bottleneck between multi-core processors. Routing algorithms, as the core technology of on-chip networking, directly affect network performance.

[0003] Traditional deterministic routing algorithms are simple to implement but lack flexibility and cannot cope with network congestion and dynamic load changes. Adaptive algorithms based on global information suffer from high latency and communication overhead. Therefore, it is necessary to design a routing scheme that can achieve adaptive routing while reducing latency and communication overhead. Summary of the Invention

[0004] To address at least one of the above-mentioned technical problems, embodiments of the present invention provide an adaptive routing method, apparatus, medium, device, and product.

[0005] According to a first aspect, embodiments of the present invention provide an adaptive routing method, comprising:

[0006] Preset index data of each node in different levels of the node network are collected using different preset periods;

[0007] A candidate path set is generated based on the target node and preset turning constraint rules; wherein, the candidate path set includes multiple candidate paths with the target node as the endpoint, and the preset turning constraint rules are used to indicate that the candidate paths can bypass congested areas in the node network;

[0008] For each candidate path, the overall cost of the candidate path is evaluated based on the preset index data of each node in the candidate path.

[0009] The optimal path is selected from the set of candidate paths based on the comprehensive cost corresponding to each candidate path.

[0010] In one embodiment, the preset indicator data includes cache utilization, link utilization, hop count, and transmission delay data; correspondingly, evaluating the comprehensive cost of the candidate path based on the preset indicator data of each node in the candidate path includes: weighted summing of the cache utilization, link utilization, hop count, and transmission delay data of each node in the candidate path to obtain the first cost corresponding to the node; and calculating the average of the first costs corresponding to each node in the candidate path to obtain the comprehensive cost of the candidate path.

[0011] In one embodiment, the method further includes any one of the following: increasing the weight of the link utilization when congestion is detected in the node network; increasing the weight of the transmission delay data when a link error is detected.

[0012] In one embodiment, the different levels include a local level, a regional level, and a global level; correspondingly, the step of collecting preset indicator data of each node in different levels of the node network using different preset periods includes: collecting preset indicator data of each node in the local level using a first preset period; collecting preset indicator data of each node in the regional level using a second preset period; and collecting preset indicator data of each node in the global level using a third preset period; wherein the first preset period, the second preset period, and the third preset period increase sequentially.

[0013] In one embodiment, the method further includes: if a link failure is detected in the optimal path, marking the optimal path as unavailable and initiating a reselection process for the optimal path.

[0014] In one embodiment, selecting the optimal path from the candidate path set based on the comprehensive cost corresponding to each candidate path includes: selecting the optimal path from the candidate path set based on the comprehensive cost and load balancing strategy corresponding to each candidate path.

[0015] According to a second aspect, embodiments of the present invention provide an adaptive routing device, comprising:

[0016] The data acquisition module is used to collect preset indicator data of each node in different levels of the node network at different preset periods;

[0017] The path generation module is used to generate a set of candidate paths based on the target node and preset turning constraint rules; wherein, the set of candidate paths includes multiple candidate paths ending at the target node, and the preset turning constraint rules are used to indicate that the candidate paths can bypass congested areas in the node network;

[0018] The cost calculation module is used to evaluate the comprehensive cost of each candidate path based on the preset index data of each node in the candidate path.

[0019] The optimal selection module is used to select the optimal path from the candidate path set based on the comprehensive cost corresponding to each candidate path.

[0020] According to a third aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method provided in the first aspect.

[0021] According to a fourth aspect, the computing device provided in the embodiments of the present invention includes a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method provided in the first aspect.

[0022] According to a fifth aspect, the computer program product provided in the embodiments of the present invention includes a computer program that, when executed by a processor, implements the method provided in the first aspect.

[0023] The adaptive routing method, apparatus, medium, device, and product provided in this invention collect preset index data of each node at different levels of the node network at different preset periods. This layered data collection mechanism reduces the delay in determining the optimal path and decreases communication overhead. A candidate path set is generated based on the target node and preset turning constraint rules. The candidate paths in this set can bypass congested areas in the node network, improving their reliability. For each candidate path, the comprehensive cost is evaluated based on the preset index data of each node within that path. Based on the comprehensive cost of each candidate path, the optimal path is selected from the candidate path set. The selected optimal path is suitable for the current state of the node network, achieving adaptive routing and improving performance under complex network loads. Attached Figure Description

[0024] Figure 1 This is a flowchart illustrating an adaptive routing method in one embodiment of the present invention;

[0025] Figure 2 This is a structural block diagram of an adaptive routing device according to an embodiment of the present invention. Detailed Implementation

[0026] Firstly, embodiments of the present invention provide an adaptive routing method, see [link to relevant documentation]. Figure 1 The method includes:

[0027] S110 collects preset indicator data of each node in different levels of the node network using different preset periods.

[0028] The different levels include local level, regional level and global level.

[0029] S110 may include: collecting preset indicator data of each node in the local level using a first preset period; collecting preset indicator data of each node in the regional level using a second preset period; and collecting preset indicator data of each node in the global level using a third preset period; wherein the first preset period, the second preset period, and the third preset period increase sequentially.

[0030] For example, preset indicator data for each node in the local hierarchy is collected every 10 clock cycles, preset indicator data for each node in the regional hierarchy is collected every 50 clock cycles, and preset indicator data for each node in the global hierarchy is collected every 200 clock cycles. A dedicated hardware counter can be set up to monitor the preset indicator data with minimal overhead.

[0031] As can be seen, this embodiment uses a layered acquisition mechanism to collect data, achieving a balance between information accuracy and acquisition overhead.

[0032] The preset indicator data may include cache utilization, link utilization, hop count, and transmission delay data.

[0033] S120, Generate a candidate path set based on the target node and preset turning constraint rules; wherein, the candidate path set includes multiple candidate paths with the target node as the endpoint, and the preset turning constraint rules are used to indicate that the candidate paths can bypass congested areas in the node network.

[0034] Among them, the preset turning constraint rule can be the West-First turning constraint rule, which is a deterministic routing algorithm in on-chip network. Its core rule is: the data packet moves westward first during transmission, and then can freely choose the path in the X-axis and Y-axis directions.

[0035] For example, for any source node (s) x ,s y ) to target node (t x ,t y First, calculate the distance difference between the X and Y directions: d x =t x -s x d y =t y -s y According to the West-First turning constraint rule, when westward transmission is required, transmission in the X direction is prioritized. In other cases, either the X or Y direction can be flexibly selected, but loops are prevented by isolating virtual channels.

[0036] Understandably, the default turning constraint rules allow for reverse turns to bypass congested areas.

[0037] In practical scenarios, virtual channels can be categorized into at least three types, such as regular transmission channels, congestion detour path channels, and fault isolation channels, enabling virtual channel allocation and isolation based on path type. Furthermore, by combining preset turning constraint rules with virtual channel isolation technology, deadlock can be prevented through virtual channel isolation, ensuring that candidate paths meet deadlock-free conditions. This supports more flexible path selection while effectively avoiding deadlock.

[0038] For example, each physical channel can be divided into 5 virtual channels: 2 regular transmission channels, 2 congestion bypass path channels, and 1 fault isolation channel. Different types of paths use different virtual channels to avoid deadlock.

[0039] S130, for each candidate path, evaluate the comprehensive cost of the candidate path based on the preset index data of each node in the candidate path.

[0040] S130 may include: weighted summing of the cache utilization rate, link utilization rate, hop count and transmission delay data of each node in the candidate path to obtain the first cost corresponding to the node; and calculating the average value of the first costs corresponding to each node in the candidate path to obtain the comprehensive cost of the candidate path.

[0041] The formula for calculating the first cost corresponding to each node can be expressed as:

[0042] Cost = α × (Buffer) Occupancy )+β×(Link Utilization )+γ×(Hop Count )+δ

[0043] ×(Error Rate )

[0044] Where α, β, γ, and δ are dynamically adjusted weights, satisfying α + β + γ + δ = 1, Cost is the first cost, and Buffer... Occupancy For cache utilization, Link Utilization For link utilization, Hop Count Error for segment counting Rate This refers to data with transmission delay.

[0045] It is evident that by using various weights, the first cost achieves a balance between cache utilization, link utilization, hop count, and transmission delay data.

[0046] In an optional implementation, the method provided in this embodiment further includes any one of the following: (1) increasing the weight of the link utilization when congestion is detected in the node network; (2) increasing the weight of the transmission delay data when a link error is detected.

[0047] As can be seen, this embodiment dynamically updates the path evaluation parameter weights through a reinforcement learning mechanism, thereby achieving adaptive optimization of the routing strategy and improving the routing method's adaptability to complex dynamic loads.

[0048] For example, the initial weights are α = 0.3, β = 0.3, γ = 0.3, and δ = 0.1. These coefficients are updated periodically based on network conditions: when link utilization is detected to exceed 70%, the β value is increased by 0.1, and other weights are decreased accordingly; when the link error rate is detected to exceed a certain threshold, the δ value is increased by 0.1, and other weights are decreased accordingly.

[0049] S140, Select the optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path.

[0050] In real-world scenarios, the candidate path with the lowest overall cost can be selected as the optimal path. Alternatively, the overall cost of the candidate paths and load balancing can be considered together to select the optimal strategy. Specifically, when the overall costs of multiple candidate paths are similar, a random selection strategy can be used to select the candidate path that achieves load balancing as the optimal path.

[0051] That is, S140 may include: selecting the optimal path from the candidate path set according to the comprehensive cost and load balancing strategy corresponding to each candidate path.

[0052] In an optional implementation, the method provided in this embodiment may further include: when a link failure is detected in the optimal path, marking the optimal path as unavailable and entering the optimal path reselection process.

[0053] For example, the link status is monitored by periodically sending detection signals, and a link failure is determined when three consecutive detections fail.

[0054] As can be seen, when a link failure occurs on the optimal path, the optimal path is marked as unavailable. This ensures that unavailable paths are not considered during the optimal path reselection process, preventing the next optimal path from being a faulty one. Therefore, this embodiment demonstrates fault detection and recovery capabilities, enhancing the reliability of the on-chip network.

[0055] The aforementioned adaptive routing method collects preset index data from nodes at different levels of the node network at different preset periods, employing a hierarchical data collection mechanism. This reduces the delay in determining the optimal path and minimizes communication overhead. Based on the target node and preset turning constraints, a candidate path set is generated. The candidate paths in this set can bypass congested areas in the node network, improving their reliability. For each candidate path, its comprehensive cost is evaluated based on the preset index data of each node within that path. Then, based on the comprehensive cost of each candidate path, the optimal path is selected from the candidate path set. The selected optimal path is suitable for the current state of the node network, achieving adaptive routing and improving performance under complex network loads.

[0056] Secondly, embodiments of the present invention provide an adaptive routing device, see [link to related document]. Figure 2 The device includes:

[0057] The data acquisition module is used to collect preset indicator data of each node in different levels of the node network at different preset periods;

[0058] The path generation module is used to generate a set of candidate paths based on the target node and preset turning constraint rules; wherein, the set of candidate paths includes multiple candidate paths ending at the target node, and the preset turning constraint rules are used to indicate that the candidate paths can bypass congested areas in the node network;

[0059] The cost calculation module is used to evaluate the comprehensive cost of each candidate path based on the preset index data of each node in the candidate path.

[0060] The optimal selection module is used to select the optimal path from the candidate path set based on the comprehensive cost corresponding to each candidate path.

[0061] In one embodiment, the preset indicator data includes cache utilization rate, link utilization rate, hop count, and transmission delay data; correspondingly, the cost calculation module is specifically used to: perform a weighted summation of the cache utilization rate, link utilization rate, hop count, and transmission delay data of each node in the candidate path to obtain the first cost corresponding to the node; and calculate the average value of the first costs corresponding to each node in the candidate path to obtain the comprehensive cost of the candidate path.

[0062] In one embodiment, the apparatus further includes any one of the following: a first adjustment module, configured to increase the weight of the link utilization when congestion is detected in the node network; and a second adjustment module, configured to increase the weight of the transmission delay data when a link error is detected.

[0063] In one embodiment, the different levels include a local level, a regional level, and a global level; correspondingly, the data acquisition module is specifically used to: acquire preset indicator data of each node in the local level using a first preset period; acquire preset indicator data of each node in the regional level using a second preset period; and acquire preset indicator data of each node in the global level using a third preset period; wherein the first preset period, the second preset period, and the third preset period increase sequentially.

[0064] In one embodiment, the apparatus further includes a path reselection module, configured to mark the optimal path as unavailable and initiate an optimal path reselection process when a link failure is detected in the optimal path.

[0065] In one embodiment, the optimal selection module is specifically used to: select the optimal path from the candidate path set according to the comprehensive cost and load balancing strategy corresponding to each candidate path.

[0066] It is understood that explanations, specific implementation methods, beneficial effects, examples, etc. of the contents of the apparatus provided in the embodiments of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0067] Thirdly, embodiments of the present invention provide a computer-readable medium storing computer instructions, which, when executed by a processor, cause the processor to perform the method provided in the first aspect.

[0068] Specifically, a system or apparatus equipped with a storage medium may be provided, on which software program code implementing the functions of any of the embodiments described above is stored, and the computer (or CPU or MPU) of the system or apparatus may read and execute the program code stored in the storage medium.

[0069] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of the present invention.

[0070] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.

[0071] Furthermore, it should be clear that not only can the program code read by the computer be executed, but also the operating system or other components operating on the computer can be instructed based on the program code to perform some or all of the actual operations, thereby realizing the function of any of the embodiments described above.

[0072] Furthermore, it is understood that the program code read from the storage medium is written to the memory set in the expansion board inserted into the computer or to the memory set in the expansion module connected to the computer. Then, based on the instructions of the program code, the CPU or other components installed on the expansion board or expansion module execute some and all of the actual operations, thereby realizing the function of any of the above embodiments.

[0073] It is understood that explanations, specific implementation methods, beneficial effects, examples, etc. of the contents in the computer-readable medium provided in the embodiments of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0074] Fourthly, one embodiment of this specification provides a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method of any embodiment of the specification.

[0075] It is understood that explanations, specific implementation methods, beneficial effects, examples, etc. of the computing device provided in the embodiments of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0076] Fifthly, one embodiment of this specification provides a computer program product including a computer program that, when executed by a processor, implements the method described in any of the embodiments of the specification.

[0077] It is understood that explanations, specific implementation methods, beneficial effects, examples, etc. of the computer program products provided in the embodiments of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0078] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0079] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using hardware, software, widgets, or any combination thereof. When implemented in software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.

[0080] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. An adaptive routing method, characterized in that, The method comprises the steps of: collecting preset index data of each node in different levels of a node network by using different preset periods; generating a candidate path set according to a target node and a preset turning constraint rule, wherein the candidate path set comprises a plurality of candidate paths with the target node as a terminal point, and the preset turning constraint rule is used to indicate that the candidate paths can bypass a congested area in the node network; for each candidate path, evaluating a comprehensive cost of the candidate path according to preset index data of each node in the candidate path; selecting an optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path.

2. The method of claim 1, wherein, The preset index data comprises buffer occupancy, link utilization, hop count and transmission delay data. Correspondingly, the step of evaluating the comprehensive cost of the candidate path according to the preset index data of each node in the candidate path comprises the steps of: performing weighted summation on the buffer occupancy, the link utilization, the hop count and the transmission delay data of each node in the candidate path to obtain a first cost corresponding to the node; and calculating an average value of the first cost corresponding to each node in the candidate path to obtain the comprehensive cost of the candidate path.

3. The method of claim 2, wherein, The method further comprises any one of the following steps: increasing the weight of the link utilization when detecting that congestion occurs in the node network; increasing the weight of the transmission delay data when detecting that a link error occurs.

4. The method of claim 1, wherein, The different levels comprise a local level, a regional level and a global level. Correspondingly, the step of collecting the preset index data of each node in different levels of a node network by using different preset periods comprises the steps of: collecting the preset index data of each node in the local level by using a first preset period; collecting the preset index data of each node in the regional level by using a second preset period; collecting the preset index data of each node in the global level by using a third preset period; wherein the first preset period, the second preset period and the third preset period increase sequentially.

5. The method of claim 1, wherein, The method further comprises the step of: when detecting that a link fault occurs in the optimal path, marking the optimal path as unavailable and entering a reselection process of the optimal path.

6. The method of claim 1, wherein, The step of selecting the optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path comprises the step of: selecting the optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path and a load balancing strategy.

7. An adaptive routing device, characterized by The method comprises the steps of: a data collection module configured to collect preset index data of each node in different levels of a node network by using different preset periods; a path generation module configured to generate a candidate path set according to a target node and a preset turning constraint rule, wherein the candidate path set comprises a plurality of candidate paths with the target node as a terminal point, and the preset turning constraint rule is used to indicate that the candidate paths can bypass a congested area in the node network; a cost calculation module configured to, for each candidate path, evaluate a comprehensive cost of the candidate path according to preset index data of each node in the candidate path; and a path selection module configured to select an optimal path from the candidate path set according to the comprehensive cost corresponding to each candidate path. An optimal selection module is configured to select an optimal path from the candidate path set according to a comprehensive cost corresponding to each candidate path.

8. A computer-readable storage medium, characterized in that, A computer program is stored on the computer readable medium, and when the computer program is executed in the computer, the computer is caused to execute the method of any one of claims 1-6.

9. A computing device, comprising: A computer readable medium includes a memory and a processor, the memory stores executable code, and the processor executes the executable code to implement the method of any one of claims 1-6.

10. A computer program product, characterised in that, A computer program is stored on the computer readable medium, and when the computer program is executed in the computer, the computer is caused to execute the method of any one of claims 1-6.