Route planning method based on common priority and reverse recursion
By adopting the common priority and inverse recursion routing method in the cascading matrix, reordering and recursive operations, the problem of large amount of routing planning operations in the cascading matrix is solved, and timeliness and efficiency in ARM computing power is achieved .
Patent Information
- Application Number
- CN202411385788.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-30
AI Technical Summary
In the cascading matrix, the calculation amount of routing planning is huge, which makes ARM computing power unable to timely support the needs of large-scale cascading matrix routing planning. Especially when the channel is fully loaded, the combination calculation amount of brute force cycle judgment is used to determine the selection of routes without conflict. big.
Using the routing planning method based on shared priority and reverse recursion, the common channels of route 1 to M2 channels are extracted, the execution order is reordered, and forward planning and reverse exhaustive recursion are performed in sequence until the routing planning is successful, saving routing resources and reducing operational volume .
Through shared routing priority allocation and front-end random allocation, end-end exhaustive matching, the exponential reduction of routing planning operations is achieved, and the timeliness of large-scale cascading matrix routing planning is achieved within the ARM computing power.
Smart Images

Figure CN119276768A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of routing planning methods in cascade design of full-switching large-scale analog signals and optical signal matrix switches, and in particular relates to a routing planning method based on shared priority and reverse recursion. Background Art
[0002] In a non-cascaded matrix, the RF routing is fixed and does not need to be selected or chosen, nor will there be conflicts. In a cascaded matrix, such as an M×M cascade of M units, 2 ×M 2 The matrix includes three levels of M M×M matrix units (including M input switching units, M bridge switching units, and M output switching units), and there are 2*M*M cross-connection cables between each level (M*M cables between the input switching unit and the bridge switching unit, and between the bridge switching unit and the output switching unit). Each cable represents a route (there can only be one radio frequency signal on a cable). From the input switching unit to the bridge switching unit, the radio frequency signal has M routes, and from the bridge switching unit to the output switching unit, the radio frequency signal also has M routes.
[0003] In the M based on M×M unit cascade 2 ×M 2 In the matrix, each input / output combination has M channel routes, each channel route contains 1 input route and 1 output route, "passing" M bridge switching units respectively. The input and output routes are defined as:
[0004] R_SR=SR_ij
[0005] R_SC=SC_jk
[0006] Where j is the bridge switching unit number; i and k are the input and output switching unit numbers, respectively, with a value range of 1, 2, ..., M, corresponding to the input port number IN and the output port number OUT, respectively:
[0007] i = TRUNC ((IN-1) / M+1, 0)
[0008] k=TRUNC((OUT-1) / M+1,0)
[0009] The channel routing is defined as:
[0010] R_CH=[SR_ij SC_jk]
[0011] Each channel selection (input IN / output OUT), a total of M channel routing:
[0012]
[0013] The condition for a channel selection to be "successful" is that both the input route SR_ij and the output route SC_jk are not occupied, or, even if occupied, the input port numbers selected by the two channels are the same, otherwise, a routing conflict will occur.
[0014] There are three types of routing conflicts:
[0015] 1) R_SR+R_SC routing conflict:
[0016] CH(01,01) route: [SR_11,SC_11]
[0017] CH(02,02) route: [SR_11,SC_11]
[0018] 2) R_SC routing conflict:
[0019] CH(05,05) route: [SR_22,SC_22]
[0020] CH(09,08) route: [SR_32,SC_22]
[0021] 3) R_SR routing conflict:
[0022] CH(14,11) route: [SR_43,SC_33]
[0023] CH(16,14) route: [SR_43,SC_34]
[0024] M based on M×M unit cascade 2 ×M 2 Matrix, when the channel is fully loaded, M*M channel routing plans need to be made. Each channel routing has M options, so there are M in total. M*M combinations.
[0025] M 4 6 8 12 16 Matrix size 16×16 36×36 64×64 144×144 256×256 Number of routing combinations 4294967296 1.03E+28 6.28E+57 2.5E+155 #NUM!
[0026] Even for a 16×16 matrix cascaded with 4×4, the number of routing combinations is quite large. The amount of computation required to brute force loop judgment and select non-conflicting routing combinations is quite large, and the computing power of ARM cannot support its timely computing needs.
[0027] Therefore, how to improve the existing routing planning method to optimize the resource allocation of the entire routing network while keeping the cost as low as possible, improve the network implementation efficiency and the performance of the entire routing network is a technical problem that needs to be solved urgently. Summary of the invention
[0028] The purpose of the present invention is to reorder the execution order of channel routing based on the priority of channels with the same input port number, adopt the principle of sharing what can be shared and giving priority to shared routes, save routing resources, adopt positive random allocation of channels with a front execution order, and exhaustively match channels with a front execution order, thereby exponentially reducing the amount of routing planning calculations and realizing the timeliness of large-scale cascade matrix routing planning calculations within the ARM computing power.
[0029] In order to solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0030] A route planning method based on shared priority and reverse recursion comprises the following steps:
[0031] S1: Extract routes 1 to M 2 The shared channels of the channels reorder the execution order of the channel routing based on the principle of shared priority;
[0032] S2: Based on the principle of sharing if possible, plan 1 to M in a forward direction 2 Channel routing, and determine whether the m channels planned in the forward direction are successful. If not, execute step S3. If yes, proceed according to the channels planned in the forward direction, and the routing planning is completed.
[0033] S3: Perform m~M recursion by exhaustive recursion in reverse order 2 Channel routing is planned and it is determined whether it is successful. If not, m=m-1, and a recursive loop is performed until the routing planning is successful and the routing planning is completed.
[0034] Preferably, the specific process of step S1 is as follows:
[0035] S11: In M 2 In the selection of the routing output channels, determine whether there are channels with the same input in the array of the M routing input / output relationships. If so, execute step S12. If not, randomly sort the routing channels and calculate the serial numbers of the corresponding input switches SR and output switches SC.
[0036] S12: Record the number of the same input channels, and rearrange them from large to small according to the number of the same input channels, that is, reorder the execution order of channel routing based on the principle of shared priority.
[0037] Preferably, the specific process of step S2 is as follows:
[0038] S21: The planned routing array R_CH(M 2 ) is cleared, and the order of routing planning of the channel link starts from m=1 to m=M 2 , calculate the M optional routes R of routing channel link m CH(i, k);
[0039] S22: The optional route R CH (i, k) is compared with the planned routing array R_CH(M2) to find the optional routing R CH Available channel routing in (i, k);
[0040] S23: Determine whether there is a shared channel route among the available channel routes. If so, give priority to the shared channel route and the route with more shared channels. If there is no shared channel route and there is a non-shared channel route, randomly select one and store it in the planned route R_CH(m), and continue to plan the next channel link. If not, execute step S3.
[0041] Preferably, step S3 includes the following specific process:
[0042] S31: Calculate routing channel links m~M 2 Optional routing R CHm (i,k)···R CHM * M (i, k);
[0043] S32: List optional routes R CHm (i,k)···R CHM * M All combinations of (i, k) and remove occupied routes;
[0044] S33: Perform combination planning m~M according to reverse recursion exhaustive recursion 2 Channel routing, first m~M 2 All routing channels are exhaustively tried to plan, and it is determined whether they are successful. If not, m=m-1, and a recursive loop is performed (S31, S32 and S33 are repeatedly executed) until the routing planning is successful and the routing planning is completed.
[0045] The beneficial effects of the present invention include:
[0046] The routing planning method based on shared priority and reverse recursion provided by the present invention first extracts routes 1 to M 2 The shared channels of the channels re-arrange the execution order of the channel routing; then, based on the principle of sharing if possible, forward plan 1 to M in sequence 2 Channel routing, and determine whether the forward planning of m channels is successful. If not, then recursively perform mM according to the reverse recursion exhaustive recursion 2Channel routing planning, if unsuccessful, m=m-1, and determine whether it is successful, if not, m=m-1, and perform a recursive loop (repeatedly execute S31, S32 and S33) until routing planning is successful and routing planning is completed.
[0047] By adopting the priority allocation of channels for shared routing, routing resources can be saved; by adopting the positive random allocation of front-end channels and exhaustive matching of end channels, the amount of routing planning calculations can be reduced exponentially, and the timeliness of large-scale cascade matrix routing planning calculations can be achieved within the ARM computing power. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a flow chart of the routing planning method based on shared priority and reverse recursion of the present invention.
[0049] Figure 2 M×M units are cascaded into M 2 ×M 2 Routing diagram of the matrix
[0050] Figure 3 Schematic diagram of routing conflicts when 4×4 units are cascaded into a 16×16 matrix
[0051] Figure 4 Flowchart of the route planning procedure based on shared priority
[0052] Figure 5 Flowchart of reverse recursive routing planning program
[0053] Figure 6 Schematic diagram of the routing planning results of cascading 4×4 units into a 16×16 matrix DETAILED DESCRIPTION
[0054] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0055] The following is combined with Figure 1 The present invention is further described in detail:
[0056] Before describing the routing planning method based on shared priority and reverse recursion, it should be noted that the M×M unit cascade 2 ×M 2 The matrix includes 3*M M×M matrix units, namely, input switching units, bridge switching units, and output switching units, each with M units. There are 2*M*M cross-connect cables, namely, M*M cables between the input switching unit and the bridge switching unit, and between the bridge switching unit and the output switching unit. The specific cascade matrix composition and connection relationship are as follows: Figure 2 As shown:
[0057] In the M based on M×M unit cascade 2 ×M 2 In the matrix, each input / output combination has M channel routes, each channel route contains 1 input route and 1 output route, "passing" M bridge switching units respectively. The input route and output route are defined as:
[0058] R-SR=SR-ij;
[0059] R-SC=SC-jk;
[0060] Among them, j is the bridge switching unit number; i and k are the input and output switching unit numbers respectively, with a value range of 1, 2, ..., M, corresponding to the input port number IN and the output port number OUT respectively:
[0061] i = TRUNC((IN-1) / M+1, 0);
[0062] k=TRUNC((OUT-1) / M+1,0).
[0063] The channel routing is defined as:
[0064] R_CH=[SR_ij SC_jk].
[0065] Each channel selects input IN / output OUT, with a total of M channel routings:
[0066]
[0067] Among them, the condition for a channel selection to be "successful" is that both the input route SR_ij and the output route SC_jk are not occupied, or, even if occupied, the input port numbers selected by the two channels are the same, otherwise, a routing conflict will occur.
[0068] See also Figure 3 , there are three types of routing conflicts:
[0069] The first type: R_SR+R_SC routing conflict:
[0070] CH(01,01) route: [SR_11,SC_11];
[0071] CH(02,02) routing: [SR_11,SC_11].
[0072] The second type: R_SC routing conflict:
[0073] CH(05,05) route: [SR_22,SC_22];
[0074] CH(09,08) routing: [SR_32,SC_22].
[0075] The third type: R_SR routing conflict:
[0076] CH(14,11) route: [SR_43,SC_33];
[0077] CH(16,14) routing: [SR_43,SC_34].
[0078] M based on M×M unit cascade 2 ×M 2 Matrix, when the channel is fully loaded, M*M channel routing plans need to be made. Each channel routing has M options, so there are M M*M combinations.
[0079]
[0080] Even if it is a 16×16 matrix cascaded by 4×4, the number of routing combinations is quite large. The amount of calculation required to select a combination that does not conflict with the routing by brute force loop judgment is quite large, and the computing power of ARM cannot support its timely calculation requirements. Based on this, the present invention proposes the following routing planning method based on shared priority and reverse recursion, which includes the following steps:
[0081] S1: Extract routes 1 to M 2 The shared channels of the channels reorder the execution order of the channel routing based on the principle of shared priority;
[0082] S2: Based on the principle of sharing if possible, plan 1 to M in a forward direction 2 Channel routing, and determine whether the m channels planned in the forward direction are successful. If not, execute step S3. If yes, proceed according to the channels planned in the forward direction, and the routing planning is completed.
[0083] S3: Perform m~M recursion by exhaustive recursion in reverse order 2 Channel routing is planned and it is determined whether it is successful. If not, m=m-1, and a recursive loop is performed until the routing planning is successful and the routing planning is completed.
[0084] The routing planning method based on shared priority and reverse recursion first extracts routes 1 to M in a large-scale cascade matrix routing planning algorithm. 2 The shared channels of the channels reorder the execution order of the channel routing based on the principle of shared priority. The shared channels here refer to the routing channels with the same input. Based on the principle of shared sharing, forward planning 1 to M 2 Channel routing, and determine whether the m channel planning planned in the forward direction is successful. If not, execute step S3. If so, proceed according to the forward planned channel routes, and the routing planning is completed. By giving priority to the shared routes, redundant routing resources are saved. Then randomly allocate non-shared channels in turn. If a routing conflict occurs, reversely exhaust all routes of the remaining channels including the previous channel. Reverse here means from back to front, and perform recursive operations until the routes of all channels do not conflict. The massive full-channel routing is exhausted and converted into an end-to-end exhaustive match. By adopting the priority allocation of shared routing channels, routing resources are saved, the front-end channel is randomly allocated, and the end channel is exhaustively matched, the routing planning calculation amount is reduced exponentially, and the timeliness of large-scale cascade matrix routing planning calculations is achieved within the ARM computing power.
[0085] The specific process of step S1 is as follows:
[0086] S11: In M 2 In the selection of the routing output channels, determine whether there are channels with the same input in the array of the M routing input / output relationships. If so, execute step S12. If not, randomly sort the routing channels and calculate the serial numbers of the corresponding input switches SR and output switches SC.
[0087] S12: Record the number of the same input channels, and rearrange them from large to small according to the number of the same input channels, that is, reorder the execution order of channel routing based on the principle of shared priority.
[0088] This embodiment takes a 4×4 cascaded 16×16 matrix as an example to randomly generate input-output relationships:
[0089] Routing planning sequence m Input OUT 1 7 1 2 1 2 3 11 3 4 l1 4 5 6 5 6 7 6 7 2 7 8 14 8 9 9 9 10 12 10 11 7 11 12 9 12 13 14 13 14 1 14 15 3 15 16 10 16
[0090] Reordered input and output relations:
[0091] Planning sequence enter Output SR SC 1 7 1 2 1 2 7 6 2 2 3 7 11 2 3 4 1 2 l 1 5 1 14 1 4 6 11 3 3 1 7 11 4 3 1 8 14 8 4 2 9 14 13 4 4 10 9 9 3 3 11 9 12 3 3 12 2 7 1 2 13 3 15 1 4 14 6 5 2 2 15 10 16 3 4 16 12 10 3 3
[0092] See also Figure 4 , the specific process of step S2 is as follows:
[0093] S21: Plan the routing array RCH (M 2) is cleared, and the order of routing planning of the channel link starts from m=1 to m=M 2 , calculate the M optional routes R of routing channel link m CH (i, k);
[0094] S22: The optional route R CH (i, k) is compared with the planned routing array R_CH(M2) to find the optional routing R CH Available channel routing in (i, k);
[0095] S23: Determine whether there is a shared channel route among the available channel routes. If so, give priority to the shared channel route and the route with more shared channels. If there is no shared channel route and there is a non-shared channel route, randomly select one and store it in the planned route R_CH(m), and continue to plan the next channel link. If not, execute step S3.
[0096] In this embodiment, the planned route R_CH array is first cleared, and the R_CH array corresponding to CH (IN, OUT) is cleared according to the order of the route planning of the channel link, starting from m=1 to m=M*M. CH (i, k), select R_SR and R_SC in row order, compare with the planned channel route according to the search order, find one or more available channel routes RCH(i, k), give priority to the shared channel route, if there is no shared channel route, there is a non-shared channel route, randomly select one, store it in the planned route R_CH(m), and continue to plan the next channel link. If no available channel route is found, execute step S3.
[0097] in,
[0098]
[0099] See also Figure 5 , step S3 includes the following specific processes:
[0100] S31: Calculate routing channel links m~M 2 Optional routing R CHm (i,k)···R CHM * M (i, k);
[0101] S32: List optional routes R CHm (i,k)···R CHM * M All combinations of (i, k) and remove occupied routes;
[0102] S33: Perform combinatorial planning mM according to the reverse recursive exhaustive recursion 2 Channel routing, first m~M 2 All routing channels are exhaustively planned and it is determined whether they are successful. If not, m=m-1, and steps S31, S32, and S33 are repeated. If so, until the routing planning is completed.
[0103] When the forward shared priority forward routing planning in step S2 fails, it indicates that the channel link R_CH(m) can no longer find a route, and R_CH(m-1)~R_CH(1) need to be re-planned. The steps adopted are: first, R_CH(m-1)~R_CH(M 2 ) are exhaustively "tried" to plan all routes. If successful, the route planning is completed. If failed, then R_CH(m-2)~R_CH(M 2 ) to perform exhaustive “trial” planning on all routes, in a recursive loop.
[0104] In the routing planning operation, firstly, a large amount of routing resources are saved because of the advance planning of shared channels and the strategy of sharing means sharing. Secondly, the forward sequential routing is adopted, and the reverse exhaustive routing planning will not be started until the forward sequential routing planning fails.
[0105] The forward sequential routing is likely to succeed, especially in the case of more sharing. Even if it fails, m is close to M. 2 , only M is left 2 -m channels are not planned.
[0106] In the unplanned M 2 -m channels. Although each channel has M optional routes, after eliminating 1 to m planned routes, the optional routes are much smaller than M, which greatly reduces the number of exhaustive route combinations.
[0107] Taking the 16×16 matrix cascaded with 4×4 as an example again, the routing planning results are as follows:
[0108] Planning sequence enter Output SR_ij SC_jk 1 7 1 21 11 4 1 2 13 31 6 11 3 32 21 7 11 4 32 21 14 6 5 23 32 2 7 6 21 12 12 2 7 14 42 8 14 8 42 22 10 9 9 33 33 16 12 10 31 13 3 7 11 24 43 11 9 12 33 33 9 14 13 42 24 5 1 14 13 34 13 3 15 11 14 15 10 16 34 44
[0109] For a schematic diagram of the routing planning results, see Figure 6 .
[0110] In the above scheme, in the process of recursive loop in step S3, an exhaustive trial planning is performed, and the routing channel links m~M are calculated and compared. 2 The routing status is used to determine whether there is a routing conflict. If not, the routing planning is successful and the routing planning is completed. If so, the routing channel links m~M are determined. 2Check whether the combination has been exhaustively planned. If not, re-execute step S33. If so, re-execute step S31.
[0111] In summary, the routing planning method based on shared priority and reverse recursion provided by the present invention first extracts routes 1 to M 2 The shared channels of the channels re-arrange the execution order of the channel routing; then, based on the principle of sharing if possible, forward plan 1 to M in sequence 2 Channel routing, and determine whether the forward planning of m channels is successful. If not, then recursively perform mM according to the reverse recursion exhaustive recursion 2 Channel routing planning, first (m-1) ~ M 2 All routing channels of M are exhaustively planned. If unsuccessful, (m-2)~M 2 All routing channels are exhaustively planned and recursively looped until the routing planning is successful.
[0112] By adopting the priority allocation of channels for shared routing, routing resources can be saved; by adopting the positive random allocation of front-end channels and exhaustive matching of end channels, the amount of routing planning calculations can be reduced exponentially, and the timeliness of large-scale cascade matrix routing planning calculations can be achieved within the ARM computing power.
[0113] The above-mentioned embodiments only express the specific implementation method of the present application, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the protection scope of the present application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the technical solution concept of the present application, and these all belong to the protection scope of the present application.
Claims
1. A cascade matrix routing planning method based on shared priority and reverse recursion, characterized in that: The following steps are involved: S1: Extract routes 1 to M 2 The shared channels of the channels reorder the execution order of the channel routing based on the principle of shared priority; S2: Based on the principle of sharing if possible, plan 1 to M in a forward direction 2 Channel routing, and determine whether the m channels planned in the forward direction are successful. If not, execute step S3. If yes, proceed according to the channels planned in the forward direction, and the routing planning is completed. S3: Perform m~M recursion by exhaustive recursion in reverse order 2 Channel routing is planned and it is determined whether it is successful. If not, m=m-1, and a recursive loop is performed until the routing planning is successful and the routing planning is completed.
2. A cascade matrix routing planning method based on shared priority and reverse recursion according to claim 1, characterized in that: The specific process of step S1 is as follows: S11: In M 2 In the selection of the routing output channels, determine whether there are channels with the same input in the array of the M routing input / output relationships. If so, execute step S12. If not, randomly sort the routing channels and calculate the serial numbers of the corresponding input switches SR and output switches SC. S12: Record the number of the same input channels, and rearrange them from large to small according to the number of the same input channels, that is, reorder the execution order of channel routing based on the principle of shared priority.
3. The cascade matrix routing planning method based on shared priority and reverse recursion according to claim 1, characterized in that: The specific process of step S2 is as follows: S21: Plan the routing array R_CH(M 2 ) is cleared, and the order of routing planning of the channel link starts from m=1 to m=M 2 , calculate the M optional routes R of routing channel link m CH (i, k); S22: The optional route R CH (i, k) is compared with the planned routing array R_CH(M2) to find the optional routing R CH Available channel routing in (i, k); S23: Determine whether there is a shared channel route among the available channel routes. If so, give priority to the shared channel route and the route with more shared channels. If there is no shared channel route and there is a non-shared channel route, randomly select one and store it in the planned route R_CH(m), and continue to plan the next channel link. If not, execute step S3.
4. The cascade matrix routing planning method based on shared priority and reverse recursion according to claim 3, characterized in that: Step S3 includes the following specific processes: S31: Calculate routing channel links m~M 2 Optional routing R CHm (i,k)···R CHM * M (i, k); S32: List optional routes R CHm (i,k)···R CHM * M All combinations of (i, k) and remove occupied routes; S33: Perform combination planning m~M according to reverse recursion exhaustive recursion 2 Channel routing, first m~M 2 All routing channels are exhaustively tried to plan, and it is determined whether they are successful. If not, m=m-1, and a recursive loop is performed (S31, S32 and S33 are repeatedly executed) until the routing planning is successful and the routing planning is completed.
Citation Information
Patent Citations
System and method for realizing non-blocking channel switching of cascade switching matrix
CN112769647A
Routing path determination method and related component
CN117176638A
Multi-stage routing switchers with sequential and non-repetitive distributive circuit interconnections
US6087958A