A method and system for relay core selection for communication range limited connections

By optimizing relay path selection using network flow graphs and minimum cost flow algorithms, the problem of limited communication distance and relay rule capacity in neuromorphic computers is solved, and efficient relay path configuration under hardware constraints is achieved.

CN121957612BActive Publication Date: 2026-07-14ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG UNIV
Filing Date
2026-03-31
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In neuromorphic computers, existing technologies struggle to simultaneously satisfy communication distance and relay rule capacity constraints during the compilation phase, leading to infeasible or inefficient relay paths that affect system deployability and operational efficiency.

Method used

A relay path selection method is constructed using a network flow graph model and a minimum cost flow algorithm. This method optimizes relay resource allocation by minimizing the total communication distance and the number of relay cores used.

Benefits of technology

It optimizes communication distance and relay core usage under hardware constraints, reduces relay path length and improves resource utilization efficiency, and is suitable for complex hardware environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957612B_ABST
    Figure CN121957612B_ABST
Patent Text Reader

Abstract

The application discloses a relay core selection method and system for a communication distance limited connection, belongs to the field of pulse neural network compilation, and aims at the problem that the direct communication distance between cores in a neural quasi-state computer is limited, the relay resource capacity and availability are limited, and long-distance connection needs to be assisted by a relay core. In the application, connection demand and core state are acquired in a compilation stage, a network flow graph with capacity and distance constraints is constructed, a minimum cost flow is solved, and flow decomposition is performed on the result to obtain a relay path and a rule configuration scheme. A relay rule set that can be written into hardware and storage usage of each relay core are outputted, and are used for relay planning of pulse neural network mapping deployment, so that the ultra-distance connection reachability is ensured and the relay rule capacity utilization efficiency is improved in an actual hardware system. The application has strong universality, and can be adapted to neural quasi-state chips with different topological structures, distance measurement modes and maximum communication distance parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of spiking neural network compilation technology, specifically relating to a relay core selection method and system for communication distance-limited connections. Background Technology

[0002] Neuromorphic computers typically consist of numerous neuromorphic cores connected via on-chip networks and multi-chip interconnects to support parallel computing and pulse event transmission for large-scale spiking neural networks. Large-scale spiking neural network loads exhibit characteristics such as neuron clusters distributed across cores and large connection spans. After mapping and deployment, it's inevitable that the source and destination cores requiring communication will be far apart in the network topology. Simultaneously, due to hardware implementation limitations, the field width in the communication message header used to encode the relative offset between the source and destination cores in a neuromorphic computer is limited. The communication distance between any two cores communicating directly cannot exceed the hardware-defined upper limit. If the distance between two cores exceeds this limit but communication is still required, several relay cores must be used for segmented forwarding so that the pulse message can be correctly routed to the destination core. Furthermore, neuromorphic cores can typically be configured to switch between computing core and relay core modes. Relay cores rely on the core's storage resources to store relay rules, but this storage space has limited capacity, thus limiting the number of relay rules a single relay core can support. Meanwhile, the system may contain unavailable resources such as faulty cores, heterogeneous non-neuromonic cores, or cores reserved for use by the operating system, which constrains relay resources in terms of capacity, availability, and physical location.

[0003] In existing technologies, neuromorphic multi-core systems focus more on the design and improvement of runtime routing algorithms. Such solutions typically rely on routers to select forwarding directions based on network conditions at runtime. However, when the communication mechanism has an upper bound on the direct communication distance between cores and limited relay rule capacity, there is still a lack of a unified and easily implementable solution for simultaneously satisfying distance and capacity constraints during the compilation phase and optimizing communication distance and relay resource usage globally. This can easily lead to problems such as failing to meet all connection requirements, using too many relay cores, or having excessively long relay path communication distances, affecting system deployability and operational efficiency. Summary of the Invention

[0004] To address the shortcomings of existing technologies and achieve the goal of generating relay core configurations that meet connectivity requirements while optimizing communication distance and the number of relay cores used, this invention adopts the following technical solution:

[0005] A relay core selection method for distance-constrained connections is applied to the compilation stage of a spiking neural network.

[0006] Get the set of connection requests to be configured;

[0007] Obtain the core state set, which includes the remaining relay rule capacity, availability flag, and relay core flag for each core. The remaining relay rule capacity represents the number of relay rules that a candidate relay core can continue to carry. The availability flag indicates whether a core can be used as a relay core. The relay core flag indicates whether a core has already been used as a relay core.

[0008] For each source core in the connection demand set, a network flow graph is constructed with the current core state set. The minimum cost flow is solved on the network flow graph, and the minimum cost flow is decomposed to obtain the relay path. The flow of the relay path is the relay rule increment of the core corresponding to each relay node on the relay path. Based on the relay rule increment of each core, the remaining relay rule capacity in the core state set is updated. Specifically, for a core with a positive relay rule increment, the relay rule increment is subtracted from its remaining relay rule capacity, and its relay core label is updated to indicate that the core has been used as a relay core.

[0009] Output the relay rule configuration schemes corresponding to all connections; the relay rule configuration schemes satisfy the hardware constraints of the neuromorphic computer and all connection requirements in the connection requirement set, and include at least the relay status flags of each core in the core state set that can be used as a relay core, the remaining relay rule capacity, and the newly added relay rules.

[0010] Furthermore, the connection requirements include the source core location, the various destination core locations that receive communication messages sent by the source core, and the number of connections from the source core to the destination core.

[0011] The network flow graph includes endpoint nodes, relay nodes, source nodes, and sink nodes. Endpoint nodes include source endpoint nodes representing source cores and destination endpoint nodes representing destination cores. Relay nodes represent cores that can be used as relay cores. The source node is the starting point of traffic in the entire network flow, with only outgoing edges and no incoming edges, and is connected to the source endpoint nodes. The sink node is the ending point of traffic in the entire network flow, with only incoming edges and no outgoing edges, and is connected to all destination endpoint nodes.

[0012] Establish forwarding edges between each endpoint node and relay node that satisfy the communication distance constraint, including forwarding edges from the source endpoint node to the relay node and the destination endpoint node, and forwarding edges from the relay node to the relay node and the destination endpoint node. The capacity of each of the above forwarding edges is positive infinity.

[0013] In the network flow graph, capacity constraints are imposed on relay nodes to ensure that the number of relay rules allocated to any relay core does not exceed its remaining capacity, and usage costs are set.

[0014] The total cost of a network flow is the sum of the cost of all forwarding edges on each relay path and the cost of using all relay nodes.

[0015] Furthermore, the network flow graph establishes forwarding edges between each endpoint node and relay node that satisfy the communication distance constraint, including forwarding edges from the source endpoint node to the relay node and the destination endpoint node, and forwarding edges from the relay node to the relay node and the destination endpoint node; with communication distance and the number of relay cores used as optimization objectives, the total communication distance is minimized and the number of relay cores is reduced under the premise of satisfying all hardware constraints and connection requirements;

[0016] The cost of the forwarding edge is set according to the physical communication distance between the cores represented by the nodes at both ends, and is a non-decreasing function of this distance. For example, it can be set to be proportional to the Manhattan distance between the cores, so that the path with the shorter relay forwarding segment distance is selected first when solving the minimum cost flow. The distance between the two nodes connected by each forwarding edge in the network flow graph is determined by the distance metric based on the address encoding and addressing mode on the hardware. The distance between the nodes is less than or equal to the upper bound of the distance between cores that can communicate directly.

[0017] Furthermore, the capacity constraint is achieved through node splitting, by splitting the relay nodes... Split into relay nodes With relay outgoing node And set up the relay node. To relay node The capacity edge is equal to the remaining relay rule capacity of the corresponding core, and a cost is set on the capacity edge to express the usage cost of the corresponding core. If the core corresponding to the relay node has been used as a relay core, the usage cost of the relay node is low. If the core has not been used as a relay core, the usage cost of the relay node is high. This is to prioritize the reuse of used but not fully utilized relay cores and reduce the addition of new relay cores while meeting hardware constraints and connection requirements.

[0018] Furthermore, the total traffic is set as the number of connections originating from the current source core, and the minimum cost flow is solved on the network flow graph; the total traffic is sent, and the traffic allocation result for each edge is obtained. If the actual sendable traffic reaches the total demand, it is determined that there is a feasible relay path; otherwise, it is determined that there is no feasible relay rule configuration scheme under the current available relay rule capacity and distance constraints.

[0019] Furthermore, each directed edge of the network flow graph With capacity With fees and with the current flow This represents the number of assigned relay rules; to support iterative solutions, a residual network is constructed at any given time based on the current traffic. To the original edge Set positive residual edge The residual capacity is the difference between the current flow rate and the remaining capacity. Simultaneously, set a reverse residual edge. remaining capacity and the corresponding negative cost This is used to withdraw an existing allocation for a more cost-efficient redistribution.

[0020] Furthermore, relay selection is performed based on augmenting paths, where an augmenting path refers to a path in the residual network that starts from the source node. to the remittance point A path is defined such that the residual capacity of each edge on the path is greater than zero, indicating that relay rules can be further allocated along the path while maintaining capacity constraints. This path corresponds to a segmented forwarding candidate link from a source endpoint node to a destination endpoint node, and the link may contain one or more relay nodes. When augmentation is performed along this path, the augmentation amount is equal to the bottleneck residual capacity of the path, which means that the corresponding number of relay rule requirements are allocated to the candidate link. When the augmentation path contains reverse residual edges, it indicates that the existing allocation is withdrawn and reallocated to obtain a lower total cost. Finally, the relay path is obtained by flow decomposition of the set of positive flow edges after the solution is completed.

[0021] Furthermore, the minimum cost flow is solved using a continuous shortest path algorithm: in the residual network repeatedly searching for a path from the source to the remittance point The minimum cost path is found, and the path is extended as much as possible along the bottleneck residual capacity until it can no longer be extended or the total demand has been met. After each extension, the residual network is updated and the next round of shortest path search begins. The shortest path search is implemented using any shortest path algorithm that satisfies correctness. In the case of negative cost of reverse edges, the edge cost is recalibrated using a potential function so that the shortest path solution in each round is performed under the condition of non-negative edge cost, thereby supporting the use of efficient algorithms such as Dijkstra. The augmented path set obtained in the above way not only provides the allocation result with the minimum total cost, but can also be directly used to recover the relay path corresponding to each destination endpoint, and based on this, a rule set that can be written into the relay core and the relay rule occupancy update of each relay core are generated.

[0022] Furthermore, the traffic decomposition involves finding a reachable path for each destination endpoint node, consisting of edges with positive traffic, originating from the source endpoint node and reaching the destination endpoint node. The bottleneck traffic of this path is determined, which is the minimum traffic of each edge on the path. This bottleneck traffic is added to the traffic from the current source core to the destination core, and the bottleneck traffic is subtracted from the traffic of each edge on the path. This process is repeated until the traffic from the current source core to the destination core equals the number of connections between them, resulting in one or more relay paths and the traffic of the relay paths.

[0023] A relay core selection system for distance-constrained connections includes a connection requirement module, a core state module, a network flow graph generation module, and a relay rule configuration scheme generation module. Employing a relay core selection method for distance-constrained connections, the system sequentially obtains the connection requirement set and the core state set, constructs a network flow graph, updates the relay path capacity based on the minimum cost flow, and finally outputs the relay rule configuration scheme corresponding to the selected optimal relay core.

[0024] The advantages and beneficial effects of this invention are as follows:

[0025] This invention selects relay paths that satisfy hardware constraints for ultra-long-distance connections under the constraint of an upper bound on communication distance, avoiding infeasibility or inefficiency caused by manual rules. Through minimum cost flow modeling, it globally optimizes communication distance and the number of relay cores used while satisfying physical constraints, thereby reducing the total communication distance of relay paths and the number of relay cores used. Considering distance constraints, capacity constraints, and core role constraints simultaneously, it is suitable for complex hardware environments with faulty cores, heterogeneous cores, or system-reserved cores. This invention is highly versatile and adaptable to neuromorphic chips with different topologies, distance measurement methods, and maximum communication distance parameters. The relay paths and relay rule sets output by this invention can be directly used to generate and write relay core configurations, thereby ensuring the reachability of ultra-long-distance connections and improving the capacity utilization efficiency of relay rules in actual hardware systems. Attached Figure Description

[0026] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.

[0027] Figure 2 This is a schematic diagram of the hardware destination address field encoding structure in an embodiment of the present invention.

[0028] Figure 3 This is a schematic diagram illustrating the organization of the core storage structure and connection relationships in an embodiment of the present invention.

[0029] Figure 4 As described in the embodiments of the present invention A schematic diagram of a two-dimensional on-chip mesh structure.

[0030] Figure 5 This is a schematic diagram of the network flow graph structure constructed in an embodiment of the present invention.

[0031] Figure 6 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation

[0032] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0033] like Figure 1 As shown, the present invention provides a relay core selection method for communication distance-limited connections, which generates relay paths and relay rules for long-distance connections generated in the deployment of spiking neural network mapping when the direct communication distance between cores is limited.

[0034] This invention executes during the compilation phase and does not limit the placement method of the spiking neural network. The placement method can be generated by any mapper, optimizer, or manual rules. This invention takes the source core position, destination core position, and the number of connections from the source core to the destination core determined by the placement result as input, and outputs a relay core configuration scheme. This relay core configuration scheme minimizes the total communication distance and reduces the number of relay cores used, while satisfying hardware constraints and the communication requirements of the spiking neural network. Therefore, this invention can be flexibly combined with different placement algorithms as an independent module in the mapping process.

[0035] The neuromorphic computer employs a two-dimensional mesh interconnection topology, and the system consists of a large number of neuromorphic cores. These cores switch between computing core and relay core modes via configuration. The internal storage space of each core is limited, thus restricting the number of relay rules that can be stored. In this embodiment, the hardware relay core has a maximum capacity of 8192 rules. The stored configuration fields include relay identifiers and forwarding selection information. Simultaneously, the bit width of the information field representing the relative offset position of the target in communication messages and memory target entries is limited, thereby restricting the coordinate offset range between directly communicating cores and establishing a maximum upper bound on the direct communication distance. , Figure 2 Shown in the target entries of the hardware , The offset is represented using 5 bits with a signed bit, which makes... , The maximum value is 15, thus corresponding to the constraint example that the Chebyshev distance between directly communicating cores cannot exceed 15. In this embodiment, the present invention is located in the compilation and mapping process of the spiking neural network. Its upstream can determine the endpoint core position corresponding to each neuron group through arbitrary placement algorithms or manual mapping. The present invention only uses the endpoint position and connection requirements as input to generate relay rule configuration, thereby decoupling from different placement algorithms and reusing it as an independent module.

[0036] The method of the present invention specifically includes the following steps:

[0037] Step S1: Obtain the set of connection requirements to be configured, wherein each connection requirement includes the source core location, the destination core locations of each receiving communication messages sent by the source core, and the number of connections from the source core to the destination core; wherein each connection corresponds to a relay rule and occupies one unit of relay core relay rule storage resources.

[0038] Specifically, establish a set of connection requirements for each source core. The set of destination cores that receive communication messages sent by the source core. The core of each objective demand Defined as the number of relay rules that need to be configured for this connection, where This is equal to the number of axon terminals occupied by the logical connection on the source core. Figure 3 The diagram illustrates the organization of the core storage structure and connection relationships in this embodiment. Each axon terminal requires a relay rule to forward pulse messages, and each relay rule requires the storage capacity of the relay rule in the previous unit of the relay core.

[0039] Step S2: Construct a core state set. The core state includes at least the availability flag of each core, the relay core flag, and the remaining relay rule capacity. The availability flag indicates whether a core can be used as a relay core. It is used to exclude cores that cannot be used as relay cores, such as faulty cores, heterogeneous cores, cores reserved by the system, and computing cores. The relay core flag indicates whether a core has been used as a relay core. It is used to distinguish between idle cores and cores that have been configured as relays. The remaining relay rule capacity is used to indicate the number of relay rules that a candidate relay core can continue to carry.

[0040] Step S3: For each source core in the set of connection requirements, perform the following sub-steps:

[0041] Step S3.1: Construct a network flow graph based on the connection requirements corresponding to the source core and the current core state set; further, the nodes in the network flow graph include: endpoint nodes, including source endpoint nodes for representing source cores and destination endpoint nodes for representing destination cores; relay nodes, for representing cores that can be used as relay cores; the source node of the network flow graph, which is the starting point of traffic in the entire network flow, with only outgoing edges and no incoming edges, and is connected to the endpoint nodes representing source cores; the sink node of the network flow graph, which is the ending point of traffic in the entire network flow, with only incoming edges and no outgoing edges, and is connected to all endpoint nodes representing destination cores.

[0042] Specifically, a network flow graph is constructed based on the connection requirements corresponding to the source core and the current core state set. Its node set Including source Exchange Point Endpoint nodes and relay nodes. Endpoint nodes represent computing cores and must include at least the source core. With the core set of objectives Relay nodes are used to represent cores that can be used as relay cores. For each relay node... Split into and Two nodes, and add from arrive The capacity of an edge is equal to the capacity of the edge. The remaining relay rule capacity of the core is represented to constrain the number of unit traffic allocated through the candidate relay node to not exceed its upper capacity bound. Simultaneously, node fees are set on this capacity edge to represent the cost of using the relay core. Furthermore, if... If it is already in relay core mode, set a lower node fee. If the node is not yet in relay core mode, a higher node cost is set to prioritize reusing existing relay cores to reduce the number of new relay cores while satisfying all requirements. Subsequently, a set of forwarding edges is established based on distance constraints: when... Establishing a network flow graph from arrive Forwarding edges, where the distance function Take the Chebyshev distance. The upper bound of the distance between directly communicable cores is defined by the bit width limitation of the target address field; a fee is set for each forwarding edge, and this fee does not decrease with the distance between nodes. In the implementation, the fee can be set to be proportional to the Manhattan distance to further favor shorter forwarding segments while maintaining the preference for fewer hops. Finally, the source-sink connection relationship is established: from the source node... To the source endpoint node Establish supply sides to provide the flow supply of aggregate demand from each destination endpoint node. Towards the Exchange Establish capacity as The demand edge absorbs the corresponding demand, thereby transforming the relay rule storage demand for each logical connection into a flow conservation constraint in the network flow graph.

[0043] In one specific embodiment, such as Figure 4 , Figure 5 As shown, the on-chip network is The two-dimensional grid structure allows for direct communication with an upper limit. There is a core source. The core set of objectives Candidate relay core , First, establish the source node in the network flow graph. With source endpoint node and from Towards Establish a supply side; simultaneously establish destination endpoint nodes for each destination core. , and respectively from , Establish demand edges to sink T, with capacities corresponding to the number of connections. , For candidate relay cores and Each node is split into its own sub-nodes, forming a sequence from... arrive And from arrive A capacity edge is defined, with its capacity equal to the remaining relay rule capacity of the corresponding core, and a relay core usage cost is set on the edge. Subsequently, based on communication distance constraints, forwarding edges are established between nodes corresponding to cores with a Chebyshev distance not exceeding 1. In this example, the source core... With relay core , The Chebyshev distances are all 1, therefore, establishing from... arrive and from arrive Forwarding edge; relay core With the core of the purpose The Chebyshev distance is 1, therefore, establishing from arrive Forwarding edge; relay core With the core of the purpose The Chebyshev distance is 1, therefore establish arrive Forwarding edge; relay core and The Chebyshev distance between them is 1, establish from arrive and from arrive The forwarding edges are all set to have a capacity of positive infinity, and their cost is equal to the Manhattan distance between the corresponding cores. Using this method, the relay selection problem from the source core to multiple destination cores can be uniformly represented as a minimum cost flow problem with node capacity constraints and distance cost constraints, thus solving the relay path configuration scheme under the premise of satisfying hardware constraints. The code logic for relay core selection based on the above network flow graph construction method is shown in Table 1:

[0044] Table 1 Code Logic Table for Relay Core Selection

[0045]

[0046] Step S3.2: Set the total flow to the number of connections originating from the current source core, and solve for the minimum cost flow on the network flow graph.

[0047] Specifically, the minimum cost flow is solved on the network flow graph to determine the total transmission traffic. The system obtains the traffic allocation results for each edge. If the actual sendable traffic reaches the total demand, it determines that there is a feasible relay path; otherwise, it determines that there is no feasible relay rule configuration scheme under the current available relay capacity and distance constraints.

[0048] In one embodiment, each directed edge of the network flow graph With capacity With fees and with the current flow This represents the number of assigned relay rules. To support iterative solutions, a residual network is constructed at any given time based on the current traffic. : For the original edge Set positive residual edge The residual capacity is The fee is Simultaneously set the reverse residual edge. The residual capacity is The fee is This is used to withdraw existing allocations to achieve a more cost-efficient reallocation. In the relay selection problem described in this invention, the augmenting path refers to a path in the residual network from the source node. to the remittance point A path is defined such that the residual capacity of each edge on the path is greater than zero, indicating that relay rules can be further allocated along this path while maintaining capacity constraints. This path corresponds to a segmented forwarding candidate link from a source endpoint node to a destination endpoint node, and the link may contain one or more relay nodes. When augmentation is performed along this path, the augmentation amount is equal to the bottleneck residual capacity of the path, which means that the corresponding number of relay rule requirements are allocated to this candidate link. When the augmentation path contains reverse residual edges, it indicates that the existing allocation is withdrawn and reallocated to obtain a lower total cost. The final relay path is obtained by flow decomposition of the set of positive flow edges after the solution is completed.

[0049] Specifically, the minimum cost flow can be solved using the continuous shortest path algorithm: in the residual network repeatedly searching for a path from arrive The algorithm finds the minimum cost path and expands it as much as possible along the bottleneck residual capacity until it can no longer be expanded or the total demand has been met. After each expansion, the residual network is updated and the next round of shortest path search begins. Furthermore, the shortest path search can be implemented using any shortest path algorithm that satisfies correctness; in the case of negative cost on reverse edges, a potential function can be used to recalibrate the edge costs, ensuring that each round of shortest path solving is performed under non-negative edge cost conditions, thus supporting the use of efficient algorithms such as Dijkstra's algorithm. The augmented path set obtained in the above manner not only provides the allocation result with the minimum total cost but can also be directly used to recover the relay path corresponding to each destination endpoint, and thereby generate a rule set that can be written into the relay core and update the relay rule occupancy of each relay core. The code logic of the continuous shortest path algorithm is shown in Table 2.

[0050] Table 2 Code logic table for the continuous shortest path algorithm

[0051]

[0052] Step S3.3: Perform flow decomposition on the minimum cost flow result to obtain the relay paths from the source endpoint node to each destination endpoint node and the flow of the above relay paths. The flow is the core relay rule increment corresponding to each relay node on the relay path.

[0053] Furthermore, the traffic decomposition is achieved by iteratively performing the following operations on the edge set with positive traffic: for each destination endpoint node, search for a reachable path from the source endpoint node to the destination endpoint node, determine the bottleneck traffic on the path, i.e. the minimum traffic of each edge on the path, and subtract the bottleneck value from the traffic of each edge. Repeat this process until the traffic from the current source core to the destination core is equal to the number of connections between them, thereby obtaining one or more relay paths and the traffic of the aforementioned relay paths.

[0054] Specifically, the minimum cost flow result is decomposed into traffic, and relay paths and rule configuration schemes are generated, including: for each destination endpoint Search for a path from the source endpoint node to the set of forwarding edges with positive traffic. Find the reachable path, identify the bottleneck flow on that path and deduct the positive flow of the corresponding edge, repeat this process until the demand of the destination endpoint is met. This yields one or more relay paths. For each relay path, its relay core set is extracted, and relay rules are generated accordingly. Simultaneously, the number of rules occupied by each relay core is counted, and the remaining relay rule capacity in the core state set is updated, ensuring that the output scheme can be directly used for hardware configuration. The path structure recovered through stream decomposition is shown in Table 3.

[0055] Table 3. Structure of the Flow Decomposition and Recovery Path

[0056]

[0057] Step S3.4: Update the remaining relay rule capacity in the core state set according to the relay rule increment of each core. Specifically, for a core with a positive relay rule increment, subtract the relay rule increment from its remaining relay rule capacity and update its relay core flag to indicate that the core has been used as a relay core.

[0058] Step S4: Output the relay rule configuration schemes for all connections.

[0059] Through the above embodiments, the present invention can generate relay paths and relay rule configurations that meet distance and capacity constraints for long-distance connections under the conditions of limited distance between direct communication cores and limited relay rule capacity; it can achieve priority reuse of cores already configured as relays by setting differentiated costs on node split edges; and it can optimize the total communication distance of relay paths by using the non-decreasing relationship between forwarding edge costs and distance.

[0060] like Figure 5As shown, this invention also proposes a relay core selection system for distance-constrained connections, including a connection requirement module, a core state module, a network flow graph generation module, and a relay rule configuration scheme generation module. Employing the aforementioned relay core selection method for distance-constrained connections, the system sequentially obtains the connection requirement set and the core state set, constructs a network flow graph, updates the relay path capacity based on the minimum cost flow, and finally outputs the relay rule configuration scheme corresponding to the selected optimal relay core. This ensures long-distance connectivity and outputs relay rule configurations that can be directly written to hardware, even under conditions of limited distance between directly communicating cores and limited relay rule storage capacity. Simultaneously, it reduces communication distance and the number of occupied relay cores globally, improving system deployability and resource utilization efficiency.

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

Claims

1. A relay core selection method for distance-constrained connections, applied to the compilation stage of a spiking neural network, characterized in that: Get the set of connection requests to be configured; Obtain the core state set, which includes the remaining relay rule capacity of each core. The remaining relay rule capacity represents the number of relay rules that the candidate relay core can continue to carry. A network flow graph is constructed based on the connection requirements corresponding to the source cores in the connection requirement set and the current core state set. The minimum cost flow is solved on the network flow graph, and the minimum cost flow is decomposed into a relay path. The flow of the relay path is the relay rule increment of the core corresponding to each relay node on the relay path. The remaining relay rule capacity in the core state set is updated according to the relay rule increment of each core. The network flow graph establishes forwarding edges between each endpoint node and relay node that satisfy the communication distance constraint, including forwarding edges from the source endpoint node to the relay node and the destination endpoint node, and forwarding edges from the relay node to the relay node and the destination endpoint node; with communication distance and the number of relay cores used as optimization objectives, the total communication distance is minimized and the number of relay cores is reduced under the premise of satisfying all hardware constraints and connection requirements. The cost of the forwarding edge is set based on the physical communication distance between the cores represented by its two end nodes, and is a non-decreasing function of that distance; Capacity constraints are imposed on relay nodes to ensure that the number of relay rules allocated to any relay core does not exceed its remaining capacity. A usage cost is also set, which is achieved by splitting the relay node into relay in nodes and relay out nodes. A capacity edge is set from the relay in node to the relay out node, and the capacity of the capacity edge is equal to the remaining relay rule capacity of the corresponding core. A cost is set on the capacity edge to express the usage cost of the corresponding core. If the core corresponding to the relay node has been used as a relay core, the usage cost of the relay node is low. If the core has not been used as a relay core, the usage cost of the relay node is high. This is to prioritize the reuse of used but not fully utilized relay cores and reduce the addition of new relay cores while meeting hardware constraints and connection requirements. The minimum cost flow is solved using a continuous shortest path algorithm: A minimum cost path from the source to the sink is repeatedly searched in the residual network, and the network is augmented along this path by the bottleneck residual capacity until it can no longer be augmented or the total demand has been met; after each augmentation, the residual network is updated and the next round of shortest path search begins; the shortest path search is implemented using any shortest path algorithm that satisfies correctness; in the case of negative cost of reverse edges, the edge cost is recalibrated using a potential function, ensuring that each round of shortest path solving is performed under non-negative edge cost conditions; The traffic decomposition involves finding a reachable path for each destination endpoint node, consisting of edges with positive traffic, originating from the source endpoint node and reaching the destination endpoint node. The bottleneck traffic of this path is determined, which is the minimum traffic of each edge on the path. This bottleneck traffic is added to the current traffic from the source core to the destination core, and the bottleneck traffic is subtracted from the traffic of each edge on the path. This process is repeated until the traffic from the current source core to the destination core equals the number of connections between them, resulting in one or more relay paths and the traffic of the relay paths. Output the relay rule configuration schemes for all connections.

2. The relay core selection method for distance-constrained connections according to claim 1, characterized in that: The connectivity requirements include the source core location, the destination core location, and the number of connections from the source core to the destination core. The network flow graph includes endpoint nodes, relay nodes, source nodes, and sink nodes. Endpoint nodes include source endpoint nodes representing source cores and destination endpoint nodes representing destination cores. Relay nodes represent cores that can be used as relay cores. The source node of the network flow graph is the starting point of traffic in the entire network flow and is connected to the source endpoint nodes. The sink node of the network flow graph is the ending point of traffic in the entire network flow and is connected to all destination endpoint nodes. Establish forwarding edges between each endpoint node and relay node that satisfy the communication distance constraint, including forwarding edges from the source endpoint node to the relay node and the destination endpoint node, and forwarding edges from the relay node to the relay node and the destination endpoint node. The total cost of a network flow is the sum of the cost of all forwarding edges on each relay path and the cost of using all relay nodes.

3. The relay core selection method for distance-constrained connections according to claim 2, characterized in that: Set the total traffic to the number of connections originating from the current source core, and solve for the minimum cost flow on the network flow graph; send the total traffic and obtain the traffic allocation result for each edge. If the actual sendable traffic reaches the total demand, it is determined that there is a feasible relay path; otherwise, it is determined that there is no feasible relay rule configuration scheme under the current available relay rule capacity and distance constraints.

4. The relay core selection method for distance-constrained connections according to claim 3, characterized in that: Each directed edge in the network flow graph has a capacity and a cost, and the number of allocated relay rules is represented by the current flow. At any time, a residual network is constructed based on the current flow to set the residual capacity of the positive residual edge on the original edge, and the residual capacity is the difference between the capacity and the current flow. At the same time, the residual capacity and the corresponding negative cost of the reverse residual edge are set to withdraw the existing allocation and perform a global cost-optimized redistribution.

5. The relay core selection method for distance-constrained connections according to claim 4, characterized in that: Relay selection is based on augmented paths. An augmented path is a path from the source to the sink in the residual network, and the residual capacity of each edge on the path is greater than zero. This means that relay rules can be further allocated along the path and the capacity constraint is not violated. The path corresponds to a segmented forwarding candidate link from the source endpoint node to a certain destination endpoint node. The link may contain one or more relay nodes. When augmentation is performed along this path, the augmentation amount is equal to the bottleneck residual capacity of the path, which means that the corresponding number of relay rule requirements are allocated to the candidate link; when the augmentation path contains reverse residual edges, it means that the existing allocation is withdrawn and reallocated to obtain a lower total cost; finally, the relay path is obtained by flow decomposition of the set of positive flow edges after the solution is completed.

6. A relay core selection system for distance-constrained connections, comprising a connection requirement module, a core state module, a network flow graph generation module, and a relay rule configuration scheme generation module, characterized in that: The relay core selection method for communication distance-constrained connections, as described in any one of claims 1 to 5, sequentially obtains the connection demand set and the core state set, constructs a network flow graph and updates the relay path capacity based on the minimum cost flow, and finally outputs the relay rule configuration scheme corresponding to the selected optimal relay core.

Citation Information

Patent Citations

  • Spiking neural network by 3D network on-chip

    JP2021013048A

  • Optimized topology of a multi-core spiking neural network

    WO2025172528A1