A method for obtaining the optimal path of optical resources based on improved ant colony algorithm

By improving the ant colony algorithm and half-course cross-optimization strategy, the existing optical path planning methods have solved the problems of low computational efficiency and insufficient resource utilization in high-dimensional problems, and the optimal path acquisition of optical resources and full utilization of resources are achieved.

CN115695290BActive Publication Date: 2025-03-21CHONGQING PINSHENG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211181760.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2025-03-21
Estimated Expiration
2042-09-27

AI Technical Summary

Technical Problem

The existing optical path planning method has a long calculation time, a large memory occupancy, and lacks intelligence in high-dimensional problems, resulting in insufficient resource utilization and affecting user experience.

Method used

The optimal path acquisition method for optical resource based on the improved ant colony algorithm is adopted. By adding Metropolis acceptance criteria to the ant colony algorithm, the inferior solution is avoided directly abandoned, and a half-course cross-optimization strategy is used in the path optimization to generate multiple paths according to different target fitness values ​​to achieve full utilization of resources.

Benefits of technology

It improves the computing efficiency and resource utilization rate of optical path planning, reduces the cost of operators, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695290B_ABST
    Figure CN115695290B_ABST
Patent Text Reader

Abstract

The present invention provides a method for obtaining an optimal path of optical resources based on an improved ant colony algorithm, which specifically comprises the following steps: S1: constructing an authorized undirected graph G=(V, E) according to an optical resource network, wherein V is a set of nodes of the undirected graph, and the nodes include a starting point node, a destination point node and a topology graph node of a plurality of optical cross boxes corresponding to the optical resource network, and E is a set of arcs of the undirected graph, representing an optical cable connected between two nodes; S2: utilizing an improved ant colony algorithm based on the Metropolis criterion to search and calculate on the undirected graph G to obtain a plurality of current ant colony optimal paths and corresponding target fitness values, and simultaneously updating the pheromone of the current ant colony optimal path; S3: selecting different half-distance cross optimization strategies to optimize the current ant colony optimal path, obtaining optimized optimal paths focusing on different optimization types and corresponding minimum target fitness values, and simultaneously updating the pheromone of the optimized optimal path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of optical path planning, and in particular to a method for acquiring an optimal path of optical resources based on an improved ant colony algorithm. Background Art

[0002] In the past, the selection of optical resource paths was mainly based on the principle of randomness and proximity, connecting two lines from the optical cross-connection box, and the number of optical cross-connection box ports is limited. During the construction process, it is often the case that some optical cross-connection box ports have extremely high occupancy rates, even reaching 100%. At this time, fiber jumper operations require adding trays or building new optical cross-connection boxes and connecting new optical cables. As the optical cables are divided, the optical signals entering the house will be weak, thus affecting user use; while some optical cross-connection boxes can also achieve two-end interconnection. The optical cross-connection box was ignored or not considered by the previous rules, making the optical cross-connection box port occupancy rate extremely low. These two extremely unbalanced situations will cause more optical cross-connection boxes to be built near the optical cross-connection boxes with higher occupancy rates, while the optical cross-connection boxes with lower occupancy rates will be "unattended". On the one hand, operators consume a lot of manpower and material resources but fail to make full use of resources. On the other hand, for users, the weak light situation affects the user experience. Therefore, it is particularly important to find an intelligent solution for optical path resource route planning to solve the above problems.

[0003] At present, there are few studies on the problem of optical path planning at home and abroad, and they mainly adopt planning methods similar to the breadth-first algorithm, such as the optical path planning method of Cheng Xiaochong et al., which starts from the end point and searches for connected nodes outward, and then continues to search for nodes connected to it from the node, which is based on the breadth-first algorithm. For the breadth-first algorithm, the algorithm works better when solving path optimization problems with smaller dimensions, but when the problem dimension gradually increases, the algorithm occupies a large amount of memory and takes longer to calculate. Sometimes, stack overflow problems may occur for high-dimensional problems, and it lacks intelligence because it has no search direction. Summary of the invention

[0004] The purpose of the present invention is to provide a method for obtaining the optimal path of optical resources based on an improved ant colony algorithm. First, an improved Metropolis acceptance criterion is added to the ant colony algorithm, that is, the inferior solution will not be directly abandoned. Then, after each search is completed, a central node is selected in the current ant colony optimal path to calculate the fitness value of the path before and after the point, and then a path containing the same central node in other paths is selected, and the fitness value before and after the point is calculated for pairwise comparison. If there is a better fitness value, the first half or / and the second half of the current path are replaced, thereby improving the algorithm performance and optimization accuracy. Then, for the four goals of short path length, few fiber jumps, low average occupancy rate, and low comprehensive target fitness value in optical resource path planning, different half-way cross optimization strategies are generated to achieve full utilization of resources. This method can generate multiple paths that meet the set focus according to the different target focuses set by the user, meet different optical path connection requirements, not only facilitate the installation and maintenance of construction personnel, but also improve the overall reasonable utilization rate of the optical cross-box port, thereby achieving full utilization of resources and reducing the consumption cost of operators.

[0005] In order to solve the above technical problems, the present invention adopts the following solutions:

[0006] A method for obtaining an optimal path for optical resources based on an improved ant colony algorithm, the method specifically comprising the following steps:

[0007] S1: Build a weighted undirected graph G = (V, E) based on the optical resource network, where V is a set of nodes of the undirected graph, including a starting point node, a destination point node and a topology graph node of multiple optical cross boxes corresponding to the optical resource network, E is a set of arcs of the undirected graph, representing the optical cable connecting the two nodes, and S (i, j) is the weight of the arc S (i, j), representing the distance traveled by the actual light in the optical cable;

[0008] S2: Use the improved ant colony algorithm based on the Metropolis criterion to search and calculate on the undirected graph G to obtain several current ant colony optimal paths and their corresponding target fitness values, and update the pheromone of the current ant colony optimal path;

[0009] S3: According to different target fitness values, the corresponding half-way cross optimization strategy is selected to optimize the current ant colony optimal path, and the optimized optimal path with different focuses and the corresponding minimum target fitness value is obtained, and the pheromone of the optimized optimal path is updated at the same time.

[0010] Furthermore, each optical cross-connection box node in the undirected graph in S1 also includes a plurality of ports, and the ports are used to connect two different nodes. i Represents node V i The port occupancy rate, that is, the ratio of the number of idle ports to the total number of ports, R a,b=(V0 = V a ,V1=V b ,…,V n =V z ), which means that the set V consists of nodes V a To Node V z a path.

[0011] Furthermore, the relevant formula of the ant colony algorithm improved based on the Metropolis criterion in S2 is as follows:

[0012]

[0013] c=iter max -t+ε (3-2)

[0014] df = fitness(X t )-fitness(X t+1 ) (3-3)

[0015] Among them, Y(X t →X t+1 ) is the probability of accepting a new path, t represents the current number of iterations, iter max is the total number of iterations, X t represents the current solution, X t+1 For the next generation of solutions, ε is the smallest constant, with a value of 1e-10, to avoid The denominator c is zero, fitness(X t ) and fitness(X t+1 ) is the target fitness function. In formula (3-2), when df>0, it means that the length of the new path is less than the length of the old path, that is, the new path is better than the old path, then the probability of the new path replacing the old path is 1, that is, the new path is directly accepted; when df≤0, it means that the length of the new path is greater than the length of the old path, that is, the fitness value of the new path is poor, but the new path is not directly abandoned.

[0016] Furthermore, the target fitness values ​​are respectively a,b The actual total length L of the path R a,b The number of fiber jumps T, that is, the number of optical cross boxes passed, the path R a,b The average port occupancy rate P, and the comprehensive target fitness value C of the above three objectives are as follows:

[0017]

[0018] T(R a,b )=size(R a,b ) (4-2)

[0019]

[0020] C=L*T*P (4-4)

[0021] Furthermore, the selecting of the first half-range cross optimization strategy specifically includes the following steps:

[0022] S31: using the improved ant colony algorithm based on the Metropolis criterion, the actual total length L of several current ant colony optimal paths searched are calculated, and the paths are sorted from small to large;

[0023] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed to perform half-way cross optimization, which specifically includes the following steps:

[0024] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the actual total length L of segment A and segment B respectively;

[0025] S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and rear segments, at the central node. The front halves of all the divided paths are included in the set N, and the rear halves of all the divided paths are included in the set M. The actual total length L of the front half in the set N and the rear half in the set M are calculated respectively.

[0026] S323: Compare the L of segment A with the L of the first half of the segment in set N. If the L of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest L is selected from set N to replace segment A.

[0027] S324: Compare the L of segment B with the L of the second half of the segment in set M. If the L of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest L is selected from set M to replace segment B.

[0028] S325: Obtain several new paths, select the path with the smallest actual total length L as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0029] Furthermore, the selection of the second half-range cross optimization strategy specifically includes the following steps:

[0030] S31: using an ant colony algorithm improved based on the Metropolis criterion, calculating the fiber jump times T of several currently searched ant colony optimal paths, and sorting them from small to large;

[0031] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0032] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the number of fiber jumps T of segment A and segment B respectively;

[0033] S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, front and back, at the central node. The first halves of all the divided paths are included in the set N, and the second halves of all the divided paths are included in the set M. Calculate the number of fiber jumps T of the first half in the set N and the second half in the set M respectively.

[0034] S323: Compare the T of segment A with the T of the first half of the set N. If the T of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest T is selected from the set N to replace segment A.

[0035] S324: Compare the T of segment B with the T of the second half of the segment in set M. If the T of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest T is selected from set M to replace segment B.

[0036] S325: Obtain several new paths, select the path with the minimum fiber jump times T as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0037] Further, the selection of the third half-range crossover optimization strategy specifically includes the following steps:

[0038] S31: using the improved ant colony algorithm based on the Metropolis criterion to calculate the average port occupancy P of several current ant colony optimal paths that have been searched, and sorting them from small to large;

[0039] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0040] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A and the second half is recorded as segment B, and calculate the average port occupancy P of segment A and segment B respectively;

[0041] S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and the back segments, at the central node. The front halves of all the divided paths are included in the set N, and the back halves of all the divided paths are included in the set M. Calculate the average port occupancy P of the front half in the set N and the back half in the set M respectively.

[0042] S323: Compare the P of segment A with the P of the first half of the segment in set N. If segment A has the smallest P, it is not replaced. Otherwise, the first half with the smallest P is selected from set N to replace segment A.

[0043] S324: Compare the P of segment B with the P of the second half of the segment in set M. If segment B has the smallest P, it is not replaced. Otherwise, the second half with the smallest P is selected from set M to replace segment B.

[0044] S325: Obtain several new paths, select the path with the smallest average port occupancy rate P as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0045] Furthermore, the selection of the fourth half-range cross optimization strategy specifically includes the following steps:

[0046] S31: using the improved ant colony algorithm based on the Metropolis criterion to calculate the comprehensive target fitness values ​​C of several current ant colony optimal paths that have been searched, and sorting them from small to large;

[0047] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0048] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the comprehensive target fitness value C of segment A and segment B respectively;

[0049] S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide it into two segments at the central node, the first half of all the divided paths are included in the set N, and the second half of all the divided paths are included in the set M, and calculate the comprehensive target fitness value C of the first half in the set N and the second half in the set M respectively;

[0050] S323: Compare the C of segment A with the C of the first half segment in set N. If the C of segment A is the smallest, then it is not replaced. Otherwise, the first half segment with the smallest C is selected from set N to replace segment A.

[0051] S324: Compare the C of segment B with the C of the second half of the segment in set M. If the C of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest C is selected from set M to replace segment B.

[0052] S325: Obtain several new paths, select the path with the smallest comprehensive target fitness value C as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0053] Furthermore, the concentration of the pheromone indicates the distance of the path. The higher the pheromone concentration, the shorter the corresponding path distance.

[0054] Beneficial effects of the present invention:

[0055] The present invention provides a method for obtaining the optimal path of optical resources based on an improved ant colony algorithm. Firstly, an improved Metropolis acceptance criterion is added to the ant colony algorithm so that inferior solutions are not directly discarded, but are accepted with dynamic probability, thereby preventing the algorithm from falling into a local optimum.

[0056] Then, different half-path cross optimization strategies were generated for the four goals of fewer fiber jumps, short path length, low average occupancy, and low comprehensive target fitness value in optical resource path planning.

[0057] Among them, the first half-cross optimization strategy completes the optical path conduction by adjusting fewer optical cross-connect boxes, which is conducive to construction personnel to quickly complete network connection.

[0058] The second half-path cross optimization strategy can alleviate the low light situation by finding the shortest path for light between pre-set starting and ending points.

[0059] The third half-haul cross-connection optimization strategy is to make full use of the resources of each optical cross-box port to avoid the situation where some optical cross-box ports are almost fully occupied, and even need to add disks again in subsequent optical path connections, thereby increasing operation and maintenance costs, while some optical cross-box ports have extremely low occupancy rates.

[0060] The fourth half-cross-connection optimization strategy is to combine the above three optimization strategies to provide an optimal optical resource path that takes into account the three conditions of less fiber jumps, short path length, and low average occupancy rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 It is a schematic diagram of the process of the present invention;

[0062] Figure 2 is a schematic diagram of an undirected graph of the present invention;

[0063] Figure 3 A schematic diagram of the half-distance crossover optimization strategy of the present invention; DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present invention and its application or use. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0065] The relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0066] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportions.

[0067] Additionally, descriptions of well-known structures, functions, and configurations may be omitted for clarity and conciseness.One of ordinary skill in the art will recognize that various changes and modifications may be made to the examples described herein without departing from the spirit and scope of the present disclosure.

[0068] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0069] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0070] The present invention will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments:

[0071] Example 1

[0072] A method for obtaining an optimal path for optical resources based on an improved ant colony algorithm, the method specifically comprising the following steps:

[0073] S1: Build a weighted undirected graph G = (V, E) based on the optical resource network, where V is a set of nodes of the undirected graph, including a starting point node, a destination point node and a topology graph node of multiple optical cross boxes corresponding to the optical resource network, E is a set of arcs of the undirected graph, representing the optical cable connecting the two nodes, and S (i, j) is the weight of the arc S (i, j), representing the distance traveled by the actual light in the optical cable;

[0074] S2: Use the improved ant colony algorithm based on the Metropolis criterion to search and calculate on the undirected graph G to obtain several current ant colony optimal paths and their corresponding target fitness values, and update the pheromone of the current ant colony optimal path;

[0075] S3: According to different target fitness values, the corresponding half-way cross optimization strategy is selected to optimize the current ant colony optimal path, and the optimized optimal path with different focuses and the corresponding minimum target fitness value is obtained, and the pheromone of the optimized optimal path is updated at the same time.

[0076] Furthermore, each optical cross-connection box node in the undirected graph in S1 also includes a plurality of ports, and the ports are used to connect two different nodes. i Represents node V i The port occupancy rate, that is, the ratio of the number of idle ports to the total number of ports, R a,b =(V0 = V a ,V1=V b ,…,V n =V z ), which means that the set V consists of nodes V a To Node V z a path.

[0077] Furthermore, the relevant formula of the ant colony algorithm improved based on the Metropolis criterion in S2 is as follows:

[0078]

[0079] c=iter max -t+ε (3-2)

[0080] df = fitness(X t )-fitness(X t+1 ) (3-3)

[0081] Among them, Y(X t →X t+1 ) is the probability of accepting a new path, t represents the current number of iterations, iter max is the total number of iterations, X t represents the current solution, X t+1 For the next generation of solutions, ε is the smallest constant, with a value of 1e-10, to avoid The denominator c is zero, fitness(X t ) and fitness(X t+1) is the target fitness function. In formula (3-2), when df>0, it means that the length of the new path is less than the length of the old path, that is, the new path is better than the old path, then the probability of the new path replacing the old path is 1, that is, the new path is directly accepted; when df≤0, it means that the length of the new path is greater than the length of the old path, that is, the fitness value of the new path is poor, but the new path is not directly abandoned.

[0082] Furthermore, the target fitness values ​​are respectively a,b The actual total length L of the path R a,b The number of fiber jumps T, that is, the number of optical cross boxes passed, the path R a,b The average port occupancy rate P, and the comprehensive target fitness value C of the above three objectives are as follows:

[0083]

[0084] T(R a,b )=size(R a,b ) (4-2)

[0085]

[0086] C=L*T*P (4-4)

[0087] Furthermore, the selecting of the first half-range cross optimization strategy specifically includes the following steps:

[0088] S31: using the improved ant colony algorithm based on the Metropolis criterion, the actual total length L of several current ant colony optimal paths searched are calculated, and the paths are sorted from small to large;

[0089] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed to perform half-way cross optimization, which specifically includes the following steps:

[0090] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the actual total length L of segment A and segment B respectively;

[0091] S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and rear segments, at the central node. The front halves of all the divided paths are included in the set N, and the rear halves of all the divided paths are included in the set M. The actual total length L of the front half in the set N and the rear half in the set M are calculated respectively.

[0092] S323: Compare the L of segment A with the L of the first half of the segment in set N. If the L of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest L is selected from set N to replace segment A.

[0093] S324: Compare the L of segment B with the L of the second half of the segment in set M. If the L of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest L is selected from set M to replace segment B.

[0094] S325: Obtain several new paths, select the path with the smallest actual total length L as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0095] Specifically, the first half-cross-connection optimization strategy is mainly aimed at completing the optical path by adjusting fewer optical cross-connect boxes, which is conducive to the construction personnel to quickly complete the network connection and, in this case, keep the total optical path length of the connection short.

[0096] Furthermore, the selection of the second half-range cross optimization strategy specifically includes the following steps:

[0097] S31: using an ant colony algorithm improved based on the Metropolis criterion, calculating the fiber jump times T of several currently searched ant colony optimal paths, and sorting them from small to large;

[0098] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0099] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the number of fiber jumps T of segment A and segment B respectively;

[0100] S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, front and back, at the central node. The first halves of all the divided paths are included in the set N, and the second halves of all the divided paths are included in the set M. Calculate the number of fiber jumps T of the first half in the set N and the second half in the set M respectively.

[0101] S323: Compare the T of segment A with the T of the first half of the set N. If the T of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest T is selected from the set N to replace segment A.

[0102] S324: Compare the T of segment B with the T of the second half of the segment in set M. If the T of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest T is selected from set M to replace segment B.

[0103] S325: Obtain several new paths, select the path with the minimum fiber jump times T as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0104] Specifically, the second half-way cross-optimization strategy aims at the weak light situation when light resources enter the home, and designs a strategy to find the shortest light path, that is, recommending a path with the shortest distance (including the length of the disk) between pre-set starting and ending points. This strategy can alleviate the weak light situation.

[0105] Further, the selection of the third half-range crossover optimization strategy specifically includes the following steps:

[0106] S31: using the improved ant colony algorithm based on the Metropolis criterion to calculate the average port occupancy P of several current ant colony optimal paths that have been searched, and sorting them from small to large;

[0107] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0108] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A and the second half is recorded as segment B, and calculate the average port occupancy P of segment A and segment B respectively;

[0109] S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and the back segments, at the central node. The front halves of all the divided paths are included in the set N, and the back halves of all the divided paths are included in the set M. Calculate the average port occupancy P of the front half in the set N and the back half in the set M respectively.

[0110] S323: Compare the P of segment A with the P of the first half of the segment in set N. If segment A has the smallest P, it is not replaced. Otherwise, the first half with the smallest P is selected from set N to replace segment A.

[0111] S324: Compare the P of segment B with the P of the second half of the segment in set M. If segment B has the smallest P, it is not replaced. Otherwise, the second half with the smallest P is selected from set M to replace segment B.

[0112] S325: Obtain several new paths, select the path with the smallest average port occupancy rate P as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0113] Specifically, the current use of each optical cross-connect box internal port may be insufficient, that is, some optical cross-connect box ports are almost fully occupied, and even need to add disks again in the subsequent optical path connection, thereby increasing the operation and maintenance cost, while some optical cross-connect box internal ports have extremely low occupancy rates. Therefore, the third half-cross optimization strategy is to make full use of each optical cross-connect box port resource.

[0114] Furthermore, the selection of the fourth half-range cross optimization strategy specifically includes the following steps:

[0115] S31: using the improved ant colony algorithm based on the Metropolis criterion to calculate the comprehensive target fitness values ​​C of several current ant colony optimal paths that have been searched, and sorting them from small to large;

[0116] S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps:

[0117] S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the comprehensive target fitness value C of segment A and segment B respectively;

[0118] S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide it into two segments at the central node, the first half of all the divided paths are included in the set N, and the second half of all the divided paths are included in the set M, and calculate the comprehensive target fitness value C of the first half in the set N and the second half in the set M respectively;

[0119] S323: Compare the C of segment A with the C of the first half segment in set N. If the C of segment A is the smallest, then it is not replaced. Otherwise, the first half segment with the smallest C is selected from set N to replace segment A.

[0120] S324: Compare the C of segment B with the C of the second half of the segment in set M. If the C of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest C is selected from set M to replace segment B.

[0121] S325: Obtain several new paths, select the path with the smallest comprehensive target fitness value C as the optimized optimal path, and update the pheromone of the optimized optimal path.

[0122] Specifically, the fourth half-path cross-connection optimization strategy is to combine the above three optimization strategies to provide an optimal optical resource path that takes into account the three conditions of less fiber jump times, short path length, and low average occupancy rate.

[0123] Furthermore, the method for replacing the path to be optimized in the four half-way cross optimization strategies mainly adopts the method of dividing the path to be optimized into two segments at the center node position. The advantage of the center node segmentation strategy is that the calculation is directly performed in one process, which improves the algorithm calculation speed and convergence speed. If the calculation and cross replacement are performed between any two nodes, this method occupies a large amount of memory and the calculation time will be longer.

[0124] Furthermore, the concentration of the pheromone indicates the distance of the path. The higher the pheromone concentration, the shorter the corresponding path distance.

[0125] If an optimized optimal path with the least number of fiber jumps T is required, the second half-cross optimization strategy is adopted. If the ant colony algorithm based on the Metropolis criterion is used to search and calculate the fitness function of the number of fiber jumps T of 10 current ant colony optimal paths on an undirected graph, and all current ant colony optimal paths are sorted from small to large according to the number of fiber jumps T, they are 12549, 13469, 134569, 126579, 1234659, 1326549, 1346879, 13625479, 12654379, 13478659. Among them, the top 20% of the current ant colony optimal paths are selected as the paths to be crossed, that is, 12549 and 13469 are the paths to be crossed.

[0126] When 12549 is selected as the path to be optimized, its central node is 5, segment A is 12, and segment B is 49. Therefore, the number of fiber jumps T in segment A is 2, and the number of fiber jumps T in segment B is 2. Next, the paths containing the central node are 134569, 126579, 1234659, 1326549, 13625479, 12654379, and 13478659. These paths are divided into front and back segments with the central node 5. The segments included in set N are {134, 126, 1234, 1326, 13625, 126, 134786}. The number of fiber jumps T of each segment in set N is calculated, and segments 134 and 126 have the smallest number of fiber jumps T of 3. The segments included in set M are {469, 69, 79, 9, 49, 479, 4379, 9}. The number of fiber jumps T of each segment in set M is calculated, and segment 9 has the smallest number of fiber jumps T of 1. Then the fiber jump number T of section A is compared with the fiber jump number T of the sections in set N. The comparison result is that the fiber jump number T of section A is smaller, so the front section replacement does not occur; the fiber jump number T of section B is compared with the fiber jump number T of the sections in set M. The comparison result is that the fiber jump number T of section 9 in set M is smaller, so the back section replacement occurs, that is, 49 is replaced with 9, and the optimized optimal path with the least fiber jump number T is 1259, and the pheromones on the path are updated according to the optimized optimal path.

[0127] When 13469 is selected as the path to be optimized, its central node is 4, segment A is 13, and segment B is 69. Therefore, the number of fiber jumps T in segment A is 2, and the number of fiber jumps T in segment B is 2. Next, the paths containing the central node are 12549, 134569, 1234659, 1326549, 1346879, 13625479, 12654379, and 13478659. These paths are divided into front and back segments with the central node 4. The segments included in set N are {125, 13, 123, 13265, 13, 13625, 1265}. The number of fiber jumps T of each segment in set N is calculated, and segment 13 has the smallest number of fiber jumps T of 2. The segments included in set M are {9, 569, 659, 9, 6879, 79, 379}. The number of fiber jumps T of each segment in set M is calculated, and segment 9 has the smallest number of fiber jumps T of 1. Then the fiber jump number T of section A is compared with the fiber jump number T of the sections in set N. The comparison result is that the fiber jump number T is equal, so the front section replacement does not occur; the fiber jump number T of section B is compared with the fiber jump number T of the sections in set M. The comparison result is that the fiber jump number T of section 9 in set M is smaller, so the back section replacement occurs, that is, 9 replaces 69, and the optimized optimal path with the least fiber jump number T is 1349, and the pheromone on the path is updated according to the optimized optimal path.

[0128] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. According to the technical essence of the present invention, within the spirit and principles of the present invention, any simple modification, equivalent replacement and improvement made to the above embodiment still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for obtaining the optimal path of optical resources based on an improved ant colony algorithm, characterized in that: The acquisition method specifically comprises the following steps: S1: Build a weighted undirected graph G=(V, E) based on the optical resource network, where V is a set of nodes of the undirected graph, including a starting point node, a destination node, and a topology graph node of multiple optical cross boxes corresponding to the optical resource network, E is a set of arcs of the undirected graph, representing the optical cable connecting the two nodes, and S(i,j) is the weight of the arc S(i,j), representing the distance traveled by the actual light in the optical cable; S2: Use the improved ant colony algorithm based on the Metropolis criterion to search and calculate on the undirected graph G to obtain several current ant colony optimal paths and their corresponding target fitness values, and update the pheromone of the current ant colony optimal path; S3: According to different target fitness values, the corresponding half-way cross optimization strategy is selected to optimize the current ant colony optimal path, and the optimized optimal path with different focuses and the corresponding minimum target fitness value are obtained, and the pheromone of the optimized optimal path is updated at the same time; Specifically, the half-distance cross optimization strategy includes a first half-distance cross optimization strategy, a second half-distance cross optimization strategy, a third half-distance cross optimization strategy, and a fourth half-distance cross optimization strategy; When the first half-cross optimization strategy is selected, the following steps are specifically included: S31: using the improved ant colony algorithm based on the Metropolis criterion, the actual total length L of several current ant colony optimal paths searched are calculated, and the paths are sorted from small to large; S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed to perform half-way cross optimization, which specifically includes the following steps: S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the actual total length L of segment A and segment B respectively; S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and rear segments, at the central node. The front halves of all the divided paths are included in the set N, and the rear halves of all the divided paths are included in the set M. The actual total length L of the front half in the set N and the rear half in the set M are calculated respectively. S323: Compare the L of segment A with the L of the first half of the segment in set N. If the L of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest L is selected from set N to replace segment A. S324: Compare the L of segment B with the L of the second half of the segment in set M. If the L of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest L is selected from set M to replace segment B. S325: obtaining a number of new paths, selecting a path with the smallest actual total length L as the optimized optimal path, and updating the pheromone of the optimized optimal path; When the second half-range cross optimization strategy is selected, the following steps are specifically included: S31: using an ant colony algorithm improved based on the Metropolis criterion, calculating the fiber jump times T of several currently searched ant colony optimal paths, and sorting them from small to large; S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps: S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the number of fiber jumps T of segment A and segment B respectively; S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, front and back, at the central node. The first halves of all the divided paths are included in the set N, and the second halves of all the divided paths are included in the set M. Calculate the number of fiber jumps T of the first half in the set N and the second half in the set M respectively. S323: Compare the T of segment A with the T of the first half of the set N. If the T of segment A is the smallest, then it is not replaced. Otherwise, the first half with the smallest T is selected from the set N to replace segment A. S324: Compare the T of segment B with the T of the second half of the segment in set M. If the T of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest T is selected from set M to replace segment B. S325: obtaining a number of new paths, selecting a path with the minimum number of fiber jumps T as the optimized optimal path, and updating the pheromone of the optimized optimal path; When the third half-range cross optimization strategy is selected, the following steps are specifically included: S31: using the improved ant colony algorithm based on the Metropolis criterion, calculate the average port occupancy rate P of several current ant colony optimal paths that have been searched, and sort them from small to large; S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps: S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A and the second half is recorded as segment B, and calculate the average port occupancy P of segment A and segment B respectively; S322: Select a path including a central node of the path to be optimized from the paths excluding the path to be optimized, and divide the path into two segments, the front and the back segments, at the central node. The front halves of all the divided paths are included in the set N, and the back halves of all the divided paths are included in the set M. Calculate the average port occupancy P of the front half in the set N and the back half in the set M respectively. S323: Compare the P of segment A with the P of the first half of the segment in set N. If segment A has the smallest P, it is not replaced. Otherwise, the first half with the smallest P is selected from set N to replace segment A. S324: Compare the P of segment B with the P of the second half of the segment in set M. If the P of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest P is selected from set M to replace segment B. S325: obtaining a number of new paths, selecting a path with the smallest average port occupancy rate P as the optimized optimal path, and updating the pheromone of the optimized optimal path; When the third half-range cross optimization strategy is selected, the following steps are specifically included: S31: using the improved ant colony algorithm based on the Metropolis criterion to calculate the comprehensive target fitness values ​​C of several current ant colony optimal paths that have been searched, and sorting them from small to large; S32: Select the top 20% of the current ant colony optimal paths as the paths to be crossed for half-way cross optimization, which specifically includes the following steps: S321: Select one path to be optimized from the paths to be crossed in turn, select its central node to divide the path to be optimized into two segments, the first half of which is recorded as segment A, and the second half is recorded as segment B, and calculate the comprehensive target fitness value C of segment A and segment B respectively; S322: Select a path including the central node of the path to be optimized from the paths excluding the path to be optimized, and divide it into two segments at the central node, the first half of all the divided paths are included in the set N, and the second half of all the divided paths are included in the set M, and calculate the comprehensive target fitness value C of the first half in the set N and the second half in the set M respectively; S323: Compare the C of segment A with the C of the first half segment in set N. If the C of segment A is the smallest, then it is not replaced. Otherwise, the first half segment with the smallest C is selected from set N to replace segment A. S324: Compare the C of segment B with the C of the second half of the segment in set M. If the C of segment B is the smallest, then it is not replaced. Otherwise, the second half with the smallest C is selected from set M to replace segment B. S325: Obtain several new paths, select the path with the smallest comprehensive target fitness value C as the optimized optimal path, and update the pheromone of the optimized optimal path.

2. The method for obtaining the optimal path of optical resources based on the improved ant colony algorithm according to claim 1, characterized in that: Each optical cross-connection box node in the undirected graph in S1 also includes multiple ports, and the ports are used to connect two different nodes. i Represents node V i The port occupancy rate, that is, the ratio of the number of idle ports to the total number of ports, R a,b =(V0=V a ,V1=V b ,…,V n =V z ), which means that the set V consists of nodes V a To Node V z a path.

3. The method for obtaining the optimal path of optical resources based on the improved ant colony algorithm according to claim 1, characterized in that: The relevant formula of the ant colony algorithm improved based on the Metropolis criterion in S2 is as follows: ; ; ; in, is the probability of accepting a new path, t represents the current number of iterations, is the total number of iterations, represents the current solution, Solutions for the next generation, is the smallest constant, and its value is ,avoid The denominator c is zero, and is the target fitness function, in the formula (3-2), when When , it means that the length of the new path is less than the length of the old path, that is, the new path is better than the old path, then the probability of the new path replacing the old path is 1, that is, the new path is directly accepted; when When , it means that the length of the new path is greater than that of the old path, that is, the fitness value of the new path is poor, but the new path is not abandoned directly.

4. The method for obtaining the optimal path of optical resources based on the improved ant colony algorithm according to claim 1, characterized in that: The target fitness values ​​are respectively a,b The actual total length L of the path R a,b The number of fiber jumps T, that is, the number of optical cross boxes passed, the path R a,b The average port occupancy rate P, and the comprehensive target fitness value C of the above three objectives are as follows: ; ; ; 。 5. The method for obtaining the optimal path of optical resources based on the improved ant colony algorithm according to claim 1, characterized in that: The concentration of the pheromone indicates the distance of the path. The higher the pheromone concentration, the shorter the corresponding path distance.

Citation Information

Patent Citations

  • Wafer exposure route planning method based on particle swarm optimization algorithm

    CN106970506A

  • Method of path planning based on improved ant colony algorithm

    CN107272679A