A path planning method, device, equipment and readable storage medium

By calculating and selecting the weight sum of multiple paths in the network, the problem that network stability cannot be guaranteed in the prior art is solved when at least two paths fail, and the effect of ensuring network stability after multiple paths fail is achieved.

CN115599097BActive Publication Date: 2025-05-13FIBERHOME TELECOMMUNICATION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211281918.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2025-05-13
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

In the prior art, when at least two paths fail in the network, the stability of the network cannot be guaranteed.

Method used

By obtaining N paths from the starting network element to the end network element, selecting any path as the target path, obtaining the mutually exclusive path corresponding to the target path from the remaining paths, calculating the weight sum of the target path and the mutually exclusive path until all paths have been selected, and outputting the path corresponding to the minimum value of multiple weight sums.

Benefits of technology

Ensure that after at least two paths in the network fail, there are mutually exclusive paths, thereby ensuring the stability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115599097B_ABST
    Figure CN115599097B_ABST
Patent Text Reader

Abstract

The present invention provides a path planning method, device, equipment and readable storage medium. The method includes: obtaining N paths from a starting network element to an end network element, wherein N is a positive integer; selecting any path from the N paths as a target path, and obtaining a mutually exclusive path corresponding to the target path from the remaining paths; calculating the weight sum of the target path and the mutually exclusive path corresponding to the target path based on the link corresponding to the mutually exclusive path; selecting one path from the N paths that has not been selected as the target path, executing the step of obtaining the mutually exclusive path corresponding to the target path from the remaining paths, until all N paths have been selected, and multiple weight sums are obtained; outputting the path corresponding to the minimum value of the multiple weight sums. The present invention solves the problem that when at least two paths in the network fail, the path planned in the prior art cannot guarantee the stability of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a path planning method, device, equipment and readable storage medium. Background Art

[0002] According to the network structure, mutually exclusive paths are calculated through the path algorithm, which can ensure that when a path in the network fails, there is still a path that will not be interrupted, thereby ensuring the stability of the network.

[0003] In the prior art, the path algorithm only considers calculating two shortest mutually exclusive paths. When a path in the network fails, it cannot be guaranteed that another mutually exclusive path exists. Therefore, when at least two paths in the network fail, the stability of the network cannot be guaranteed. Summary of the invention

[0004] The main purpose of the present invention is to provide a path planning method, device, equipment and readable storage medium, aiming to solve the problem that when at least two paths in the network fail, the paths planned in the prior art cannot guarantee network stability.

[0005] In a first aspect, the present invention provides a path planning method, the path planning method comprising:

[0006] Obtain N paths from the starting network element to the ending network element, where N is a positive integer;

[0007] Select any path from the N paths as the target path, and obtain mutually exclusive paths corresponding to the target path from the remaining paths, where the remaining paths are the paths other than the target path in the N paths;

[0008] Based on the links corresponding to the mutually exclusive paths, the weight sum of the target path and the mutually exclusive paths corresponding to the target path is calculated;

[0009] Select one of the unselected paths included in the N paths as the target path, and execute the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths until all the N paths have been selected, and obtain multiple weight sums;

[0010] Output the path corresponding to the minimum value among multiple weight sums.

[0011] Optionally, the step of calculating the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path based on the links corresponding to the mutually exclusive paths includes:

[0012] Based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated;

[0013] Calculating a weight factor of a target path based on the number of links;

[0014] The sum of the weights of the target path and the mutually exclusive paths corresponding to the target path is calculated based on the weight factor of the target path and the length of each link.

[0015] Optionally, the step of calculating the number of links included in the mutually exclusive paths based on the links corresponding to the mutually exclusive paths includes:

[0016] If there is only one mutually exclusive path corresponding to the target path, the number of links corresponding to the mutually exclusive path is the number of links included in all mutually exclusive paths;

[0017] If there are at least two mutually exclusive paths corresponding to the target path, then based on the links corresponding to each mutually exclusive path, the number of links included in each mutually exclusive path is calculated.

[0018] Optionally, the step of calculating the number of links included in each mutually exclusive path based on the links corresponding to each mutually exclusive path includes:

[0019] Mark the links included in each mutually exclusive path as one, and the links not included as zero;

[0020] Substitute the label value of each link included in each mutually exclusive path and the label value of each link not included in each mutually exclusive path into the first preset formula in turn to calculate the number of links included in each mutually exclusive path, where the first preset formula is as follows:

[0021]

[0022] Among them, L i represents link i, L represents the set of links in N paths, r i represents the mutually exclusive path i, R represents the mutually exclusive path set corresponding to the target path, λ i represents the label value of link i, and C represents the number of links contained in each mutually exclusive path.

[0023] Optionally, the step of calculating a weight factor of the target path based on the number of links includes:

[0024] Substitute the number of the links into the second preset formula to calculate the weight factor of the target path, where the second preset formula is as follows:

[0025] τ=M C

[0026] Wherein, τ represents the weight factor of the target path, C represents the number of links included in the mutually exclusive paths corresponding to the target path, and M represents a preset value greater than one.

[0027] Optionally, the step of calculating the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path based on the weight factor of the target path and the length of each link includes:

[0028] The mutually exclusive path corresponding to the target path is used as the new target path, and the weight factor of the new target path is recalculated;

[0029] The weight factor of the new target path is used as the weight factor of the mutually exclusive path corresponding to the target path;

[0030] Based on the weight factor of the target path, the weight factor of the mutually exclusive path corresponding to the target path, and the length of each link, the sum of the weights of the target path and the mutually exclusive path corresponding to the target path is calculated by a third preset formula, wherein the third preset formula is as follows:

[0031]

[0032] Among them, τ represents the weight factor of the target path, L i represents the link i included in the target path, L represents the set of links in N paths, and W i represents the length of link i included in the target path, Indicates the weight factor of the mutually exclusive path corresponding to the target path, l j Indicates the link j contained in the mutually exclusive path corresponding to the target path, W j represents the length of link j contained in the mutually exclusive path corresponding to the target path, and x represents the sum of the weights of the target path and the mutually exclusive path corresponding to the target path.

[0033] In a second aspect, the present invention further provides a path planning device, the path planning device comprising:

[0034] An acquisition module, used to acquire N paths from a starting network element to an ending network element, where N is a positive integer;

[0035] A selection module is used to select a path from the N paths as a target path, and obtain mutually exclusive paths corresponding to the target path from the remaining paths, wherein the remaining paths are paths other than the target path in the N paths;

[0036] A calculation module, used for calculating the weight sum of the target path and the mutually exclusive path corresponding to the target path based on the link corresponding to the mutually exclusive path;

[0037] An execution module is used to select one of the unselected paths included in the N paths as a target path, and execute the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths until all the N paths have been selected, thereby obtaining a plurality of weight sums;

[0038] The output module is used to output the path corresponding to the minimum value of multiple weight sums.

[0039] Optionally, the computing module is used to:

[0040] Based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated;

[0041] Calculating a weight factor of a target path based on the number of links;

[0042] The sum of the weights of the target path and the mutually exclusive paths corresponding to the target path is calculated based on the weight factor of the target path and the length of each link.

[0043] In a third aspect, the present invention also provides a path planning device, comprising a processor, a memory, and a path planning program stored in the memory and executable by the processor, wherein when the path planning program is executed by the processor, the steps of the path planning method as described above are implemented.

[0044] In a fourth aspect, the present invention further provides a readable storage medium, on which a path planning program is stored, wherein when the path planning program is executed by a processor, the steps of the path planning method as described above are implemented.

[0045] In the present invention, N paths from a starting network element to an end network element are obtained, wherein N is a positive integer; any path is selected from the N paths as a target path, and a mutually exclusive path corresponding to the target path is obtained from the remaining paths, wherein the remaining paths are paths other than the target path in the N paths; based on the links corresponding to the mutually exclusive paths, the weight sum of the target path and the mutually exclusive path corresponding to the target path is calculated; one path that has not been selected from the N paths is selected as the target path, and the step of obtaining the mutually exclusive path corresponding to the target path from the remaining paths is performed until all N paths have been selected to obtain multiple weight sums; and the path corresponding to the minimum value of the multiple weight sums is output. Through the present invention, after obtaining N paths from the starting network element to the end network element, the mutually exclusive path corresponding to each path in the N paths is obtained, and then the weight sum of the target path and the mutually exclusive path corresponding to the target path is calculated, and the path corresponding to the minimum value output from the multiple weight sums is obtained. Since among the paths corresponding to the minimum values ​​in the multiple weight sums, after a path fails, another path still has a mutually exclusive path, the stability of the network is guaranteed after at least two paths in the network fail, and the problem that when at least two paths in the network fail, the path planned in the prior art cannot guarantee the stability of the network is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1A schematic diagram of the hardware structure of a path planning device involved in an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of a flow chart of a first embodiment of a path planning method of the present invention;

[0048] Figure 3 A schematic diagram of a network element connection architecture of an embodiment of a path planning method of the present invention;

[0049] Figure 4 A target path and a weight and schematic table of mutually exclusive paths corresponding to the target path in an embodiment of a path planning method of the present invention;

[0050] Figure 5 A schematic diagram of a flow chart of a second embodiment of a path planning method of the present invention;

[0051] Figure 6 Schematic diagram of functional modules of an embodiment of a path planning device of the present invention.

[0052] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0053] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0054] In a first aspect, an embodiment of the present invention provides a path planning device, which may be a device having a data processing function, such as a personal computer (PC), a notebook computer, or a server.

[0055] Reference Figure 1 , Figure 1It is a schematic diagram of the hardware structure of the path planning device involved in the embodiment of the present invention. In the embodiment of the present invention, the path planning device may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as wireless fidelity WIreless-FIdelity, WI-FI interface); the memory 1005 may be a high-speed random access memory (random access memory, RAM), or a stable memory (non-volatile memory), such as a disk storage, and the memory 1005 may optionally be a storage device independent of the aforementioned processor 1001. Those skilled in the art will understand that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the present invention, and may include more or less components than those shown in the figure, or combine certain components, or arrange the components differently.

[0056] Continue to refer to Figure 1 , Figure 1 The memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a path planning program. The processor 1001 may call the path planning program stored in the memory 1005 and execute the path planning method provided in the embodiment of the present invention.

[0057] In a second aspect, an embodiment of the present invention provides a path planning method.

[0058] In one embodiment, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of the first embodiment of the path planning method of the present invention. Figure 2 As shown, the path planning method includes:

[0059] Step S10, obtaining N paths from the starting network element to the ending network element, where N is a positive integer;

[0060] In this embodiment, N paths from the starting network element to the ending network element are obtained by using the K shortest path algorithm (KSP algorithm), where N is a positive integer. Figure 3 , Figure 3 Schematic diagram of network element connection architecture of an embodiment of a path planning method of the present invention. Figure 3As shown, five paths from the starting network element A to the ending network element C are obtained by the K shortest path algorithm (KSP algorithm), and the five paths are path {AEC}, path {ADBC}, path {ADC}, path {ABC}, and path {ABDC}. It is easy to imagine that the network element connection architecture, the starting network element, and the ending network element in this embodiment are for reference only and are not limiting.

[0061] Step S20, selecting any path from the N paths as the target path, and obtaining mutually exclusive paths corresponding to the target path from the remaining paths, wherein the remaining paths are paths other than the target path from the N paths;

[0062] In this embodiment, continue to refer to Figure 3 , after obtaining N paths, any path is selected from the N paths as the target path, and the mutually exclusive path corresponding to the target path is obtained from the paths other than the target path in the N paths. Specifically, if any path {AEC} is selected from the N paths as the target path, the mutually exclusive path corresponding to the target path {AEC} is obtained from the path {ADBC}, the path {ADC}, the path {ABC}, and the path {ABDC}, wherein the mutually exclusive path corresponding to the target path {AEC} includes the path {ADBC}, the path {ADC}, the path {ABC}, and the path {ABDC}. If any path {ADBC} is selected from the N paths as the target path, the mutually exclusive path corresponding to the target path {ADBC} is obtained from the path {AEC}, the path {ADC}, the path {ABC}, and the path {ABDC}, wherein the mutually exclusive path corresponding to the target path {ADBC} is the path {AEC}.

[0063] Further, if the target path is path {ADC}, the mutually exclusive paths corresponding to the target path {ADC} include path {AEC} and path {ABC}; if the target path is path {ABC}, the mutually exclusive paths corresponding to the target path {ABC} include path {AEC} and path {ADC}; if the target path is path {ABDC}, the mutually exclusive path corresponding to the target path {ABDC} is path {AEC}.

[0064] Step S30, based on the links corresponding to the mutually exclusive paths, calculate the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path;

[0065] In this embodiment, based on the links corresponding to the mutually exclusive paths, the weight sum of the target path and the mutually exclusive paths corresponding to the target path can be calculated. Wherein, a link is a section of a line from a node to an adjacent node without any other switching nodes in between.

[0066] Step S40, selecting one of the unselected paths included in the N paths as the target path, and executing the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths, until all the N paths have been selected, and obtaining a plurality of weight sums;

[0067] In this embodiment, one of the unselected paths included in the N paths is selected as the target path, that is, if the path {AEC} is selected as the target path in step S20, one of the unselected paths included in the five paths (path {ADBC}, path {ADC}, path {ABC} and path {ABDC}) is selected as the target path, and the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths is performed until all N paths have been selected, and multiple weight sums can be obtained. Figure 4 , Figure 4 The weights and schematic diagram of the target path and the mutually exclusive paths corresponding to the target path in the first embodiment of the path planning method of the present invention are shown in FIG. Figure 4 As shown, the sum of the weights of the target path {AEC} and the mutually exclusive path {ADBC} corresponding to the target path is 302, the sum of the weights of the target path {AEC} and the mutually exclusive path {ADC} corresponding to the target path is 8, the sum of the weights of the target path {AEC} and the mutually exclusive path {ABC} corresponding to the target path is 13, and the sum of the weights of the target path {AEC} and the mutually exclusive path {ABDC} corresponding to the target path is 1602; the sum of the weights of the target path {ADBC} and the mutually exclusive path {AEC} corresponding to the target path is 302; the sum of the weights of the target path {ADC} and the mutually exclusive path {AEC} corresponding to the target path is 8, and the sum of the weights of the target path {ADC} and the mutually exclusive path {ABC} corresponding to the target path is 17; the sum of the weights of the target path {ABC} and the mutually exclusive path {AEC} corresponding to the target path is 13, and the sum of the weights of the target path {ABC} and the mutually exclusive path {ADC} corresponding to the target path is 17; the sum of the weights of the target path {ABDC} and the mutually exclusive path {AEC} corresponding to the target path is 1602.

[0068] Step S50, outputting the path corresponding to the minimum value among the sums of multiple weights.

[0069] In this embodiment, the minimum weight sum is obtained from multiple weight sums. Figure 4, the minimum weight sum is 8, that is, the weight sum of the target path {AEC} and the mutually exclusive path {ADC} corresponding to the target path is 8, and the weight sum of the target path {ADC} and the mutually exclusive path {AEC} corresponding to the target path is 8. Then the path corresponding to the minimum value of the multiple weight sums is output as path {AEC} and path {ADC}. Continue to refer to Figure 3 It can be seen that when one of the paths {AEC} and {ADC} fails, the other path still has a mutually exclusive path, thereby ensuring the stability of the network after at least two paths in the network fail.

[0070] In this embodiment, N paths from the starting network element to the ending network element are obtained, where N is a positive integer; a path is selected from the N paths as the target path, and a mutually exclusive path corresponding to the target path is obtained from the remaining paths, where the remaining paths are paths other than the target path in the N paths; based on the links corresponding to the mutually exclusive paths, the weight sum of the target path and the mutually exclusive path corresponding to the target path is calculated; one path that has not been selected from the N paths is selected as the target path, and the step of obtaining the mutually exclusive path corresponding to the target path from the remaining paths is performed until all N paths have been selected to obtain multiple weight sums; and the path corresponding to the minimum value of the multiple weight sums is output. Through this embodiment, after obtaining N paths from the starting network element to the end network element, the mutually exclusive path corresponding to each path in the N paths is obtained, and then the weight sum of the target path and the mutually exclusive path corresponding to the target path is calculated, and the path corresponding to the minimum value is output from the multiple weight sums. Since among the paths corresponding to the minimum values ​​in the multiple weight sums, after a path fails, another path still has a mutually exclusive path, the stability of the network is guaranteed after at least two paths in the network fail, and the problem that when at least two paths in the network fail, the path planned in the prior art cannot guarantee the stability of the network is solved.

[0071] Further, in one embodiment, referring to Figure 5 , Figure 5 FIG. 2 is a flow chart of the second embodiment of the path planning method of the present invention. Figure 5 As shown, step S30 includes:

[0072] Step S301, based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated;

[0073] Step S302, calculating a weight factor of the target path based on the number of the links;

[0074] Step S303 , calculating the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path based on the weight factor of the target path and the length of each link.

[0075] In this embodiment, based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated. Figure 3 , if the target path is the path {AEC}, then the links corresponding to the mutually exclusive paths {ADBC}, {ADC}, {ABC}, and {ABDC} corresponding to the target path {AEC} include link AB, link BC, link BD, link AD, and link DC, and the number of links included in the mutually exclusive paths is 0. If the target path is the path {ADBC}, then the links corresponding to the mutually exclusive path {AEC} corresponding to the target path {ADBC} include link AE and link EC, and the number of links included in the mutually exclusive paths is 2.

[0076] Based on the number of links included in the mutually exclusive paths, the weight factor of the target path can be calculated, and then based on the weight factor of the target path and the length of each link, the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path can be calculated.

[0077] Furthermore, in one embodiment, step S301 includes:

[0078] If there is only one mutually exclusive path corresponding to the target path, the number of links corresponding to the mutually exclusive path is the number of links included in all mutually exclusive paths;

[0079] If there are at least two mutually exclusive paths corresponding to the target path, then based on the links corresponding to each mutually exclusive path, the number of links included in each mutually exclusive path is calculated.

[0080] In this embodiment, if the target path is the path {ADBC}, the mutually exclusive path corresponding to the target path {ADBC} is the path {AEC}, that is, there is only one mutually exclusive path corresponding to the target path {ADBC}, and the number of links 2 corresponding to the mutually exclusive path {AEC} corresponding to the target path {ADBC} is the number of links included in the mutually exclusive paths, that is, the number of links included in the mutually exclusive path {AEC} corresponding to the target path {ADBC} is 2. Among them, the links corresponding to the mutually exclusive path {AEC} corresponding to the target path {ADBC} include link AE and link EC.

[0081] If the target path is path {AEC}, the mutually exclusive paths corresponding to the target path {AEC} include path {ADBC}, path {ADC}, path {ABC}, and path {ABDC}, that is, there are 4 mutually exclusive paths corresponding to the target path. Based on the links corresponding to each mutually exclusive path, the number of links included in each mutually exclusive path can be calculated.

[0082] Furthermore, in one embodiment, the step of calculating the number of links included in each mutually exclusive path based on the links corresponding to each mutually exclusive path includes:

[0083] Mark the links included in each mutually exclusive path as one, and the links not included as zero;

[0084] Substitute the label value of each link included in each mutually exclusive path and the label value of each link not included in each mutually exclusive path into the first preset formula in turn to calculate the number of links included in each mutually exclusive path, where the first preset formula is as follows:

[0085]

[0086] Among them, L i represents link i, L represents the set of links in N paths, r i represents the mutually exclusive path i, R represents the mutually exclusive path set corresponding to the target path, λ i represents the label value of link i, and C represents the number of links contained in each mutually exclusive path.

[0087] In this embodiment, continue to refer to Figure 3 , the links corresponding to the five paths include link AB, link BC, link BD, link AD, link DC, link AE and link EC. The links included in each mutually exclusive path are marked as one, and the links not included are marked as zero. That is, if the target path is path {AEC}, the mutually exclusive paths {ADBC}, {ADC}, {ABC} and {ABDC} corresponding to the target path {AEC} include links AB, link BC, link BD, link AD and link DC, respectively, and the links not included are link AE and link EC, respectively. Then, link AB, link BC, link BD, link AD and link DC are all marked as 1, and link AE and link EC are marked as 0.

[0088] Substitute the label value of each link included in each mutually exclusive path and the label value of each link not included in each mutually exclusive path into the first preset formula in turn to calculate the number of links included in each mutually exclusive path, where the first preset formula is as follows:

[0089]

[0090] Among them, L i represents link i, L represents the set of links in N paths, r i represents the mutually exclusive path i, R represents the mutually exclusive path set corresponding to the target path, λ i represents the label value of link i, and C represents the number of links contained in each mutually exclusive path.

[0091] Specifically, if the target path is path {ADC}, then the mutually exclusive paths corresponding to the target path {ADC} include path {AEC} and path {ABC}. Sequentially substitute each link included in the mutually exclusive path {AEC} corresponding to the target path {ADC}, i.e., link AE and link EC, with a tag value of 1, each link not included, i.e., link AB, link BC, link BD, link AD, and link DC, with a tag value of 0, and each link included in the mutually exclusive path {ABC} corresponding to the target path {ADC}, i.e., link AB and link BC, with a tag value of 1, each link not included, i.e., link BD, link AD, link DC, link AE, and link EC, with a tag value of 0 into the first preset formula, and calculate that the number of links included in each mutually exclusive path (path {AEC} and path {ABC}) corresponding to the target path {ADC} is 0, i.e.

[0092] Among them, the tag value of the link AB not included in the mutually exclusive path {AEC} corresponding to the target path {ADC}*the tag value of the link AB included in the mutually exclusive path {ABC} corresponding to the target path {ADC}=0*1;

[0093] The tag value of the link BC not included in the mutually exclusive path {AEC} corresponding to the target path {ADC} * the tag value of the link BC included in the mutually exclusive path {ABC} corresponding to the target path {ADC} = 0*1;

[0094] The tag value of the link BD not included in the mutually exclusive path {AEC} corresponding to the target path {ADC}*the tag value of the link BD not included in the mutually exclusive path {ABC} corresponding to the target path {ADC}=0*0

[0095] The tag value of the link AD not included in the mutually exclusive path {AEC} corresponding to the target path {ADC}*the tag value of the link AD not included in the mutually exclusive path {ABC} corresponding to the target path {ADC}=0*0;

[0096] The tag value of the link DC not included in the mutually exclusive path {AEC} corresponding to the target path {ADC}*the tag value of the link DC not included in the mutually exclusive path {ABC} corresponding to the target path {ADC}=0*0;

[0097] The tag value of the link AE included in the mutually exclusive path {AEC} corresponding to the target path {ADC} * the tag value of the link AE not included in the mutually exclusive path {ABC} corresponding to the target path {ADC} = 1*0;

[0098] The tag value of the link EC included in the mutually exclusive path {AEC} corresponding to the target path {ADC}*the tag value of the link EC not included in the mutually exclusive path {ABC} corresponding to the target path {ADC}=1*0.

[0099] Further, if the target path is path {ADBC}, then the mutually exclusive path corresponding to the target path {ADBC} is path {AEC}, and the tag value 1 of each link included in the mutually exclusive path {AEC} corresponding to the target path {ADBC}, that is, link AE and link EC, and the tag value 0 of each link not included, that is, link AB, link BC, link BD, link AD, and link DC, are substituted into the first preset formula, and the number of links included in each mutually exclusive path {AEC} corresponding to the target path {ADBC} is calculated to be 2, that is,

[0100] Furthermore, in one embodiment, step S302 includes:

[0101] Substitute the number of the links into the second preset formula to calculate the weight factor of the target path, where the second preset formula is as follows:

[0102] ζ=M C

[0103] in, represents the weight factor of the target path, C represents the number of links included in the mutually exclusive paths corresponding to the target path, and M represents a preset value greater than one.

[0104] In this embodiment, after calculating the number of links included in the mutually exclusive paths corresponding to the target path, the number of links included in the mutually exclusive paths corresponding to the target path is substituted into the second preset formula to calculate the weight factor of the target path, where the second preset formula is as follows:

[0105] τ=M C

[0106] Wherein, τ represents the weight factor of the target path, C represents the number of links included in the mutually exclusive paths corresponding to the target path, and M represents a preset value greater than one.

[0107] Specifically, taking M as 10 and the target path as path {ADC} as an example, the number of links 0 included in the mutually exclusive paths (path {AEC} and path {ABC}) corresponding to the target path {ADC} is substituted into the second preset formula to calculate the weight factor τ of the target path {ADC} = M C =10 0 =1.

[0108] Further, taking M as 10 and the target path as path {ADBC} as an example, the number of links 2 included in the mutually exclusive path {AEC} corresponding to the target path {ADBC} is substituted into the second preset formula to calculate the weight factor τ of the target path {ADC} = M C =10 2 =100.

[0109] Furthermore, in one embodiment, step S303 includes:

[0110] The mutually exclusive path corresponding to the target path is used as the new target path, and the weight factor of the new target path is recalculated;

[0111] The weight factor of the new target path is used as the weight factor of the mutually exclusive path corresponding to the target path;

[0112] Based on the weight factor of the target path, the weight factor of the mutually exclusive path corresponding to the target path, and the length of each link, the sum of the weights of the target path and the mutually exclusive path corresponding to the target path is calculated by a third preset formula, wherein the third preset formula is as follows:

[0113]

[0114] Among them, τ represents the weight factor of the target path, L i represents the link i included in the target path, L represents the set of links in N paths, and W i represents the length of link i included in the target path, Indicates the weight factor of the mutually exclusive path corresponding to the target path, l j Indicates the link j contained in the mutually exclusive path corresponding to the target path, W j represents the length of link j contained in the mutually exclusive path corresponding to the target path, and x represents the sum of the weights of the target path and the mutually exclusive path corresponding to the target path.

[0115] In this embodiment, the mutually exclusive paths (paths {AEC} and {ABC}) corresponding to the target path {ADC} are used as the new target path, and the new target path includes the path {AEC} and the path {ABC}, and the weight factor of the new target path is recalculated. Among them, the mutually exclusive paths corresponding to the new target path {ABC} include the path {AEC} and the path {ADC}, and the links included in the mutually exclusive paths {AEC} and {ADC} corresponding to the new target path {ABC} are link AD, link DC, link AE and link EC, respectively, and link AD, link DC, link AE and link EC are all marked as 1, and link AB, link BC and link BD are marked as 0. The label value of each link included in each mutually exclusive path corresponding to the new target path {ABC} and the label value of each link not included are substituted into the first preset formula in turn, and the number of links included in each mutually exclusive path corresponding to the new target path {ABC} is calculated, and then the number of links included in each mutually exclusive path corresponding to the new target path {ABC} is substituted into the second preset formula, and the weight factor τ=M of the new target path {ABC} can be calculated. C =10 0 =1. Similarly, the weight factor τ of the new target path {AEC} can be calculated to be M C =10 0 =1.

[0116] The weight factor of the new target path (path {AEC} and path {ABC}) is used as the weight factor of the mutually exclusive path (path {AEC} and path {ABC}) corresponding to the target path {ADC} That is, the weight factor of the mutually exclusive path {AEC} corresponding to the target path {ADC} is 1, and the weight factor of the mutually exclusive path {ABC} corresponding to the target path {ADC} is 1.

[0117] The length of each link (link AB, link BC, link BD, link AD, link DC, link AE, and link EC) is obtained. Taking the length of link AB as 10 km, the length of link BC as 1 km, the length of link BD as 1 km, the length of link AD as 1 km, the length of link DC as 5 km, the length of link AE as 1 km, and the length of link EC as 1 km as an example, based on the weight factor of the target path {ADC}, the weight factor of the mutually exclusive path (path {AEC}) corresponding to the target path {ADC}, and the length of each link, the weight sum of the target path {ADC} and the mutually exclusive path (path {AEC}) corresponding to the target path is calculated by a third preset formula, wherein the third preset formula is as follows:

[0118]

[0119] Where τ represents the weight factor of the target path {ADC}, L i represents the link i included in the target path, L represents the set of links in N paths, and W i represents the length of link i included in the target path, Indicates the weight factor of the mutually exclusive path corresponding to the target path, l j Indicates the link j contained in the mutually exclusive path corresponding to the target path, W j represents the length of link j contained in the mutually exclusive path corresponding to the target path, and x represents the sum of the weights of the target path {ADC} and the mutually exclusive path (path {AEC}) corresponding to the target path.

[0120] Further, based on the weight factor of the target path {ADC}, the weight factor of the mutually exclusive path (path {ABC}) corresponding to the target path {ADC}, and the length of each link, the weight sum of the target path {ADC} and the mutually exclusive path (path {ABC}) corresponding to the target path is calculated by a third preset formula.

[0121] In a third aspect, an embodiment of the present invention further provides a path planning device.

[0122] In one embodiment, referring to Figure 6 , Figure 6 FIG. 1 is a schematic diagram of the functional modules of an embodiment of a path planning device of the present invention. Figure 6 As shown, the path planning device includes:

[0123] The acquisition module 10 is used to acquire N paths from the starting network element to the ending network element, where N is a positive integer;

[0124] A selection module 20 is used to select a path from the N paths as a target path, and obtain mutually exclusive paths corresponding to the target path from the remaining paths, wherein the remaining paths are paths other than the target path in the N paths;

[0125] A calculation module 30, configured to calculate a weight sum of a target path and the mutually exclusive path corresponding to the target path based on the links corresponding to the mutually exclusive paths;

[0126] An execution module 40 is used to select one of the unselected paths included in the N paths as a target path, and execute the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths until all the N paths have been selected, thereby obtaining a plurality of weight sums;

[0127] The output module 50 is used to output the path corresponding to the minimum value among the multiple weight sums.

[0128] Furthermore, in one embodiment, the calculation module 30 is used to:

[0129] Based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated;

[0130] Calculating a weight factor of a target path based on the number of links;

[0131] The sum of the weights of the target path and the mutually exclusive paths corresponding to the target path is calculated based on the weight factor of the target path and the length of each link.

[0132] Furthermore, in one embodiment, the calculation module 30 is further configured to:

[0133] If there is only one mutually exclusive path corresponding to the target path, the number of links corresponding to the mutually exclusive path is the number of links included in all mutually exclusive paths;

[0134] If there are at least two mutually exclusive paths corresponding to the target path, then based on the links corresponding to each mutually exclusive path, the number of links included in each mutually exclusive path is calculated.

[0135] Furthermore, in one embodiment, the calculation module 30 is further configured to:

[0136] Mark the links included in each mutually exclusive path as one, and the links not included as zero;

[0137] Substitute the label value of each link included in each mutually exclusive path and the label value of each link not included in each mutually exclusive path into the first preset formula in turn to calculate the number of links included in each mutually exclusive path, where the first preset formula is as follows:

[0138]

[0139] Among them, L i represents link i, L represents the set of links in N paths, r i represents the mutually exclusive path i, R represents the mutually exclusive path set corresponding to the target path, λ i represents the label value of link i, and C represents the number of links contained in each mutually exclusive path.

[0140] Furthermore, in one embodiment, the calculation module 30 is further configured to:

[0141] Substitute the number of the links into the second preset formula to calculate the weight factor of the target path, where the second preset formula is as follows:

[0142]

[0143] in, represents the weight factor of the target path, C represents the number of links included in the mutually exclusive paths corresponding to the target path, and M represents a preset value greater than one.

[0144] Furthermore, in one embodiment, the calculation module 30 is further configured to:

[0145] The mutually exclusive path corresponding to the target path is used as the new target path, and the weight factor of the new target path is recalculated;

[0146] The weight factor of the new target path is used as the weight factor of the mutually exclusive path corresponding to the target path;

[0147] Based on the weight factor of the target path, the weight factor of the mutually exclusive path corresponding to the target path, and the length of each link, the sum of the weights of the target path and the mutually exclusive path corresponding to the target path is calculated by a third preset formula, wherein the third preset formula is as follows:

[0148]

[0149] Among them, τ represents the weight factor of the target path, L i represents the link i included in the target path, L represents the set of links in N paths, and W i represents the length of link i included in the target path, Indicates the weight factor of the mutually exclusive path corresponding to the target path, l j Indicates the link j contained in the mutually exclusive path corresponding to the target path, W j represents the length of link j contained in the mutually exclusive path corresponding to the target path, and x represents the sum of the weights of the target path and the mutually exclusive path corresponding to the target path.

[0150] Among them, the functional implementation of each module in the above-mentioned path planning device corresponds to the various steps in the above-mentioned path planning method embodiment, and its functions and implementation processes will not be repeated here one by one.

[0151] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium.

[0152] A path planning program is stored on the readable storage medium of the present invention, wherein when the path planning program is executed by a processor, the steps of the path planning method described above are implemented.

[0153] Among them, the method implemented when the path planning program is executed can refer to the various embodiments of the path planning method of the present invention, and will not be repeated here.

[0154] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0155] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present invention.

[0157] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A path planning method, characterized in that: The path planning method comprises: Obtain N paths from the starting network element to the ending network element, where N is a positive integer; Select any path from the N paths as the target path, and obtain mutually exclusive paths corresponding to the target path from the remaining paths, where the remaining paths are the paths other than the target path in the N paths; Based on the links corresponding to the mutually exclusive paths, the weight sum of the target path and the mutually exclusive paths corresponding to the target path is calculated; Select one of the unselected paths included in the N paths as the target path, and execute the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths until all the N paths have been selected, and obtain multiple weight sums; Output the path corresponding to the minimum value among multiple weight sums; The step of calculating the weight sum of the target path and the mutually exclusive path corresponding to the target path based on the link corresponding to the mutually exclusive path includes: Based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated; Calculating a weight factor of a target path based on the number of links; The sum of the weights of the target path and the mutually exclusive paths corresponding to the target path is calculated based on the weight factor of the target path and the length of each link.

2. The path planning method according to claim 1, characterized in that: The step of calculating the number of links included in the mutually exclusive paths based on the links corresponding to the mutually exclusive paths includes: If there is only one mutually exclusive path corresponding to the target path, the number of links corresponding to the mutually exclusive path is the number of links included in all mutually exclusive paths; If there are at least two mutually exclusive paths corresponding to the target path, then based on the links corresponding to each mutually exclusive path, the number of links included in each mutually exclusive path is calculated.

3. The path planning method according to claim 2, characterized in that: The step of calculating the number of links included in each mutually exclusive path based on the links corresponding to each mutually exclusive path includes: Mark the links included in each mutually exclusive path as one, and the links not included as zero; Substitute the label value of each link included in each mutually exclusive path and the label value of each link not included in each mutually exclusive path into the first preset formula in turn to calculate the number of links included in each mutually exclusive path, where the first preset formula is as follows: Among them, L i represents link i, L represents the set of links in N paths, r i represents the mutually exclusive path i, R represents the mutually exclusive path set corresponding to the target path, λ i represents the label value of link i, and C represents the number of links contained in each mutually exclusive path.

4. The path planning method according to claim 1, characterized in that: The step of calculating the weight factor of the target path based on the number of links includes: Substitute the number of the links into the second preset formula to calculate the weight factor of the target path, where the second preset formula is as follows: τ=M C Wherein, τ represents the weight factor of the target path, C represents the number of links included in the mutually exclusive paths corresponding to the target path, and M represents a preset value greater than one.

5. The path planning method according to claim 4, characterized in that: The step of calculating the sum of the weights of the target path and the mutually exclusive paths corresponding to the target path based on the weight factor of the target path and the length of each link comprises: The mutually exclusive path corresponding to the target path is used as the new target path, and the weight factor of the new target path is recalculated; The weight factor of the new target path is used as the weight factor of the mutually exclusive path corresponding to the target path; Based on the weight factor of the target path, the weight factor of the mutually exclusive path corresponding to the target path, and the length of each link, the sum of the weights of the target path and the mutually exclusive path corresponding to the target path is calculated by a third preset formula, wherein the third preset formula is as follows: Among them, τ represents the weight factor of the target path, L i represents the link i included in the target path, L represents the set of links in N paths, and W i represents the length of link i included in the target path, Indicates the weight factor of the mutually exclusive path corresponding to the target path, l j Indicates the link j contained in the mutually exclusive path corresponding to the target path, W j represents the length of link j contained in the mutually exclusive path corresponding to the target path, and x represents the sum of the weights of the target path and the mutually exclusive path corresponding to the target path.

6. A path planning device, characterized in that: The path planning device comprises: An acquisition module, used to acquire N paths from a starting network element to an ending network element, where N is a positive integer; A selection module is used to select a path from the N paths as a target path, and obtain mutually exclusive paths corresponding to the target path from the remaining paths, wherein the remaining paths are paths other than the target path in the N paths; A calculation module, used for calculating the weight sum of the target path and the mutually exclusive path corresponding to the target path based on the link corresponding to the mutually exclusive path; An execution module is used to select one of the unselected paths included in the N paths as a target path, and execute the step of obtaining mutually exclusive paths corresponding to the target path from the remaining paths until all the N paths have been selected, thereby obtaining a plurality of weight sums; An output module, used to output the path corresponding to the minimum value of multiple weight sums; The computing module is used for: Based on the links corresponding to the mutually exclusive paths, the number of links included in the mutually exclusive paths is calculated; Calculating a weight factor of a target path based on the number of links; The sum of the weights of the target path and the mutually exclusive paths corresponding to the target path is calculated based on the weight factor of the target path and the length of each link.

7. A path planning device, characterized in that: The path planning device includes a processor, a memory, and a path planning program stored in the memory and executable by the processor, wherein when the path planning program is executed by the processor, the steps of the path planning method as described in any one of claims 1 to 5 are implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a path planning program, wherein when the path planning program is executed by a processor, the steps of the path planning method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Protective business path management method and device

    CN107919904A

  • Mutual exclusion group service routing calculation method and device in optical transmission network planning

    CN113709605A