A communication optical cable path planning method and system based on the Internet of Things
By dynamically adjusting the pheromone volatility coefficient of the grid in the ant colony algorithm, combining the cost mark value and diversity contribution value, optimizing the path planning of the ant colony algorithm, the path planning problems caused by the fixed pheromone volatility coefficient are solved, and a more efficient communication optical cable path planning is achieved.
Patent Information
- Application Number
- CN202510443633.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In the communication optical cable path planning, the existing ant colony algorithm has poor path planning accuracy due to the fixed pheromone volatility coefficient, and the iterative convergence speed is too slow or it may fall into the problem of local optimality.
By calculating the pheromone volatility coefficient of each grid, combining the cost mark value and diversity contribution value of the grid, the pheromone volatility coefficient is dynamically adjusted to improve the global search capability and convergence speed of the ant colony algorithm and optimize path planning.
It improves the accuracy and efficiency of communication optical cable path planning, reduces construction costs, and ensures the optimality and overall nature of path selection.
Smart Images

Figure CN119984285B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of path planning, and particularly to a communication optical cable path planning method and system based on the Internet of Things. Background Art
[0002] When constructing the backbone telecommunications network of a country or region, it is necessary to plan the path of long-distance optical cables. For the communication network within a city, the optical cable path planning needs to consider factors such as the geographical layout of the city, building distribution, population density, and laying cost. For example, in a bustling commercial center area, it is necessary to ensure that the optical cable can cover each office building, shopping mall, and public facility, while also considering the laying cost and laying difficulty. During the path planning process, it is necessary to try to select a path with low laying cost and easy construction to reduce repeated construction and resource waste. The ant colony algorithm is a heuristic algorithm with global search characteristics and can be used for the path planning of communication optical cables.
[0003] The Chinese patent application document with the publication number CN117824683A discloses an improved ant colony path planning method and system based on a high-precision map. The method includes: S1, preprocessing the high-precision map based on the starting point A and the ending point B to be navigated to obtain a bottom-layer map that distinguishes the feasible area and the infeasible area; S2, clustering and partitioning the infeasible areas of the bottom-layer map so that each infeasible sub-area contains some feasible areas; extracting the feasible areas and classification information in all infeasible sub-areas to construct a high-layer map; S3, using a cross-layer improved ant colony algorithm to search for the optimal path from the starting point A on the bottom-layer map. When it is determined that the next node of the current node is a cross-layer node, the cross-layer node is used as a new search starting point, and the optimal path is continued to be searched from the high-layer map until the ending point B is reached; S4, mapping the path searched from the high-layer map to the bottom-layer map and integrating to obtain a complete optimal path.
[0004] When the above technical solution uses the ant colony algorithm for path planning, a fixed pheromone evaporation coefficient is adopted. The fixed pheromone evaporation coefficient causes the pheromones of all paths to decay at the same rate during the entire iteration process, which will cause different effects at different stages of the algorithm iteration. For example, in the early stage of iteration, the ant colony needs to perform global exploration. The fixed pheromone evaporation coefficient causes excessive evaporation of pheromones, resulting in the loss of high-quality path information. In the later stage, the fixed pheromone evaporation coefficient may cause the pheromones of obsolete paths to remain, resulting in invalid search and falling into local optimum, ultimately leading to too slow convergence speed and the obtained planned path not being the global optimal path. Summary of the Invention
[0005] In order to solve the problem that the fixed pheromone evaporation coefficient leads to poor accuracy of the obtained planned path, the present invention provides a communication optical cable path planning method and system based on the Internet of Things.
[0006] In a first aspect, the present invention provides a communication optical cable path planning method based on the Internet of Things, which adopts the following technical solution:
[0007] Obtain a grid map, set a cost mark value for each grid in the grid map, calculate the pheromone volatility coefficient of each grid in the iteration process of the ant colony algorithm, and use the ant colony algorithm to obtain the optimal path for laying communication optical cables; the calculation method of the pheromone volatility coefficient of each grid is:
[0008] The diversity contribution value of each grid in the iteration process is calculated. The diversity contribution value indicates the importance of the grid in the overall path. The sum of the cost mark values of the grids in the path obtained after iteration is taken as the path cost of the corresponding path. The path with the smallest path cost is taken as the preferred path. The pheromone volatility coefficient of each grid is calculated. The expression is:
[0009]
[0010] In the formula is the pheromone volatility coefficient of the i-th grid in the k-th iteration process, is the preset global pheromone volatility coefficient at the kth iteration, is the cost mark value of the i-th grid, mean( ) is the mean of all grid cost marker values; is the diversity contribution value of the i-th grid during the k-1-th iteration, is the probability that the preferred path obtained before the kth iteration passes through the i-th grid, norm represents the normalization function, and exp represents the exponential function with e as the base.
[0011] According to the importance of a single grid when the ant colony searches for a path during each iteration and its contribution to the diversity of the path, the pheromone volatility coefficient of a single grid is locally and dynamically adjusted in combination with the marking value of the grid, thereby increasing the flexibility of the pheromone volatility coefficient, improving the accuracy of searching for the optimal path, and further improving the accuracy of communication optical cable path planning.
[0012] Preferably, the expression of the global information volatility coefficient is:
[0013]
[0014] In the formula, is the preset global pheromone volatility coefficient at the kth iteration, represents the path cost of the preferred path obtained after the k-1th iteration, represents the mean of the path costs of all paths obtained after the k-1th iteration, and exp represents an exponential function with e as the base.
[0015] Preferably, the expression of the global information evaporation coefficient is:
[0016]
[0017] where is the preset global pheromone evaporation coefficient at the k-th iteration, k represents the k-th iteration, and K is the maximum number of iterations set by the ant colony algorithm. represents the path cost of the optimal path obtained after the (k - 1)-th iteration. represents the average value of the path costs of all paths obtained after the (k - 1)-th iteration, and exp represents the exponential function with base e.
[0018] The global evaporation coefficient is initially adjusted according to different periods of algorithm iteration and the path cost of the previous iteration, enhancing the global search ability in the early stage of the ant colony algorithm and accelerating the convergence of the ant colony algorithm in the later stage, solving the problem that improper selection of the fixed threshold leads to slow iteration convergence or convergence to a local optimum of the ant colony algorithm.
[0019] Preferably, the expression of the diversity contribution value is:
[0020]
[0021] where is the diversity contribution value of the i-th grid during the (k - 1)-th iteration. represents the standard deviation of the path costs of the paths corresponding to all ants passing through the i-th grid during the (k - 1)-th iteration.
[0022] Preferably, the expression of the diversity contribution value is:
[0023]
[0024] where is the diversity contribution value of the i-th grid during the (k - 1)-th iteration. is the number of ants passing through the i-th grid during the (k - 1)-th iteration. is the total number of ants in the ant colony, H represents the binary cross-entropy loss function. represents the standard deviation of the path costs of the paths corresponding to all ants passing through the i-th grid during the (k - 1)-th iteration.
[0025] By calculating the diversity contribution value of the grid, it is possible to understand the contribution degree of the corresponding grid in finding the optimal path, providing a theoretical basis for adjusting the pheromone evaporation coefficient.
[0026] Preferably, the method for obtaining the grid map is: obtaining a map image covering the starting point, ending point, and laying area of the optical cable, and converting the map image to obtain the grid map.
[0027] Preferably, the probability of the preferred path passing through the i-th grid is calculated by calculating the number of preferred paths passing through the i-th grid, and taking the ratio of the number of preferred paths passing through the i-th grid to the total number of preferred paths as the probability of passing through the i-th grid.
[0028] The probability of passing through a grid reflects the importance of the corresponding grid in finding the optimal path, which facilitates the adjustment of the pheromone volatility coefficient.
[0029] Preferably, the method of using the ant colony algorithm to obtain the optimal path for laying communication optical cables is: after the iteration, multiple preferred paths are obtained, and the preferred path with the smallest path cost is used as the optimal path.
[0030] The optimal path is obtained through iterative calculation, and the optimal path is the planned path of the communication optical cable, thereby reducing the construction cost of laying the optical cable.
[0031] Preferably, before the ant colony algorithm is iterated, the method further includes a step of initializing the number of ant colonies, initial pheromone concentration, and heuristic factors.
[0032] In a second aspect, the present invention provides a communication optical cable path planning system based on the Internet of Things, which adopts the following technical solutions:
[0033] A communication optical cable path planning system based on the Internet of Things includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the communication optical cable path planning method based on the Internet of Things is implemented.
[0034] The above-mentioned communication optical cable path planning method based on the Internet of Things is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.
[0035] The present invention has the following technical effects:
[0036] According to the importance of a single grid and its contribution to the diversity of the path when the ant colony searches for the path in each iteration, the pheromone volatility coefficient of a single grid is locally and dynamically adjusted in combination with the tag value of the grid, thereby realizing adaptive adjustment of the pheromone volatility coefficient, increasing the flexibility of the pheromone volatility coefficient, improving the accuracy of searching for the optimal path, and further improving the accuracy of communication optical cable path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a flow chart of a communication optical cable path planning method based on the Internet of Things of the present invention. DETAILED DESCRIPTION
[0038] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention.
[0039] An embodiment of the present invention discloses a communication optical cable path planning method based on the Internet of Things. Refer to Figure 1 , and the method includes the following steps:
[0040] S1: Obtain a grid map and set a cost marking value for each grid in the grid map.
[0041] Obtain a map image covering the starting point, ending point, and laying area of the optical cable, match the map image with the real geographic coordinate system, eliminate the geometric deformation and error in the map image, make the positions on the map correspond to the actual spatial positions, and convert the map image to obtain a grid map. It can be understood that the grid map is composed of multiple grids. Manually set a cost marking value for each grid according to the terrain complexity or construction difficulty. The larger the cost marking value, the greater the cost consumed when the optical cable passes through the grid area. Conversely, the lower the cost marking value, the lower the cost consumed when the optical cable passes through the grid area.
[0042] S2: Calculate the pheromone evaporation coefficient of each grid in the ant colony algorithm during the iteration process.
[0043] After each iteration is completed, each ant searches for a path, and each path is composed of corresponding grids. Take the sum of the cost marking values of the grids in the path obtained after iteration as the path cost of the corresponding path, and take the path with the minimum path cost as the preferred path.
[0044] S21: Calculate the global information evaporation coefficient.
[0045] In one embodiment, the expression of the global information evaporation coefficient is:
[0046]
[0047] In the formula, is the preset global pheromone evaporation coefficient at the k-th iteration, represents the path cost of the preferred path obtained after the (k - 1)-th iteration, represents the average value of the path costs in all paths obtained after the (k - 1)-th iteration, and exp represents the exponential function with e as the base.
[0048] The smaller the value, the wider the search range of the ant colony in the (k - 1)-th iteration process, and the greater the difference in path quality, being in the global search period in the early stage of iteration, and the pheromone evaporation coefficient should be increased; while the larger the ratio, the closer the algorithm is to convergence, and the pheromone evaporation coefficient should be decreased.
[0049] In one embodiment, the expression of the global pheromone evaporation coefficient is:
[0050]
[0051] In the formula, is the preset global pheromone evaporation coefficient at the k-th iteration, k represents the k-th iteration, and K is the maximum number of iterations set by the ant colony algorithm. represents the path cost of the optimal path obtained after the (k - 1)-th iteration. represents the average value of the path costs of all paths obtained after the (k - 1)-th iteration, and exp represents the exponential function with base e.
[0052] The smaller the value, the wider the search range of the ant colony in the (k - 1)-th iteration process, and the greater the difference in path quality, being in the global search period in the early stage of iteration, and the pheromone evaporation coefficient should be increased; while the larger the ratio, the closer the algorithm is to convergence, and the pheromone evaporation coefficient should be decreased. At the same time, at the beginning of the iteration, a large-scale global search should be carried out to avoid falling into the local optimal solution, and at this time the pheromone evaporation coefficient should be increased. At the end close to the number of iterations, convergence should be carried out and the pheromone evaporation coefficient should be decreased.
[0053] In summary, this embodiment comprehensively considers the path cost and the iteration ordinal number in the (k - 1)-th iteration process when calculating the global pheromone evaporation coefficient, and has high accuracy.
[0054] S22: Calculate the diversity contribution value of each grid in the iteration process. The diversity contribution value represents the importance of the grid in the overall path.
[0055] In one embodiment, the expression of the diversity contribution value is:
[0056]
[0057] In the formula, is the diversity contribution value of the i-th grid in the (k - 1)-th iteration process. represents the standard deviation of the path costs of the paths corresponding to all the ants passing through the i-th grid in the (k - 1)-th iteration.
[0058] After the (k - 1)-th iteration, each ant searches for a path, and each path is composed of corresponding grids. Thus, the path cost of the path is further obtained according to the cost marking value of the corresponding grid within the path, and the standard deviation of the path costs of the paths corresponding to the ants passing through the i-th grid is calculated. The larger this value is, the greater the difference in the path costs of all paths passing through the i-th grid during the (k - 1)-th iteration, and the higher the contribution of the i-th grid to the diversity of the overall path.
[0059] In one embodiment, the expression of the diversity contribution value is:
[0060]
[0061] In the formula, is the diversity contribution value of the i-th grid during the (k - 1)-th iteration, is the number of ants passing through the i-th grid during the (k - 1)-th iteration, is the total number of ants in the ant colony, H represents the binary cross-entropy loss function, represents the standard deviation of the path costs of the paths corresponding to all ants passing through the i-th grid during the (k - 1)-th iteration.
[0062] represents the loss value calculated using the binary cross-entropy loss function. The larger this value is, the more balanced the distribution of the i-th grid in different paths, and the higher the diversity contribution. After the (k - 1)-th iteration, each ant searches for a path, and each path is composed of corresponding grids. Thus, the path cost of the path is further obtained according to the cost marking value of the corresponding grid within the path, and the standard deviation of the path costs of the paths corresponding to the ants passing through the i-th grid is calculated. The larger this value is, the greater the difference in the path costs of all paths passing through the i-th grid during the (k - 1)-th iteration, and the higher the contribution of the i-th grid to the diversity of the overall path. Calculating the diversity contribution value from two dimensions further improves the accuracy and stability of the diversity contribution value.
[0063] S23: Calculate the pheromone evaporation coefficient of each grid.
[0064] The expression is:
[0065]
[0066] In the formula is the pheromone evaporation coefficient of the i-th grid during the k-th iteration, is the preset global pheromone evaporation coefficient during the k-th iteration, is the cost marking value of the i-th grid, mean( ) is the mean of the cost marking values of all grids; is the diversity contribution value of the i-th grid in the (k - 1)-th iteration process. is the probability that the optimal path obtained before the k-th iteration passes through the i-th grid. Exemplarily, among the 10 optimal paths obtained before the 11th iteration, 6 optimal paths pass through the 2nd grid, so The value of is 0.6, norm represents the normalization function, and exp represents the exponential function with base e.
[0067] The larger the value of, the higher the proportion of the optical cable laying cost of the i-th grid among all grids. Laying an optical cable here may make the cost of the whole path relatively high. Therefore, the possibility that the i-th grid is a node in the shortest path is relatively low. So, the pheromone evaporation coefficient should be increased to avoid most ants passing through this grid.
[0068] is the diversity contribution value of the i-th grid in the (k - 1)-th iteration process. The larger its value, the higher the contribution of the i-th grid to the overall path diversity, and its exploration value is relatively high. The pheromone evaporation coefficient should be reduced to promote more ants to pass through this grid; on the contrary, The smaller the value of, the lower the exploration value of the i-th grid, and the pheromone evaporation coefficient should be increased.
[0069] is the probability that the optimal path obtained before the k-th iteration passes through the i-th grid, reflecting the importance degree of the i-th grid in finding the optimal path. The larger the value of, the more likely the i-th grid is to be a node in the optimal path. The pheromone evaporation coefficient should be reduced to promote the algorithm to converge to the optimal path.
[0070] S3: Use the ant colony algorithm to obtain the optimal path for laying communication optical cables.
[0071] Initialize the number of ant colonies, the initial pheromone concentration, and the heuristic factor. Update the pheromone during the iteration using the pheromone evaporation coefficient of each grid. End the iteration after the number of iterations of the ant colony algorithm reaches the preset maximum number of iterations. After the iteration ends, multiple optimal paths are obtained. The optimal path with the minimum path cost is taken as the optimal path, and the optimal path is the laying path of the communication optical cable, completing the path planning of the communication optical cable.
[0072] The embodiment of the present invention also discloses a communication optical cable path planning system based on the Internet of Things, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a communication optical cable path planning method based on the present invention is implemented.
[0073] The above system further includes other components well-known to those skilled in the art, such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be elaborated here.
[0074] The above are all preferred embodiments of the present invention. The protection scope of the present invention is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present invention shall be covered within the protection scope of the present invention.
Claims
1. A communication optical cable path planning method based on the Internet of Things, characterized in that, Including the steps: Obtain a grid map, set a cost marking value for each grid in the grid map, calculate the pheromone evaporation coefficient of each grid during the iteration process of the ant colony algorithm, and use the ant colony algorithm to obtain the optimal path for laying communication optical cables; among them, the calculation method of the pheromone evaporation coefficient of each grid is: Calculate the diversity contribution value of each grid during the iteration process, and the expression is: , is the diversity contribution value of the i-th grid in the (k - 1)-th iteration process, is the number of ants passing through the i-th grid in the (k - 1)-th iteration process, is the total number of ants in the ant colony, H represents the binary cross-entropy loss function, represents the standard deviation of the path costs of all paths corresponding to the ants passing through the i-th grid in the (k - 1)-th iteration; the diversity contribution value represents the importance of the grid in the overall path; the sum of the cost marker values of the grids in the path obtained after iteration is used as the path cost of the corresponding path, and the path with the minimum path cost is used as the optimal path; Calculate the pheromone evaporation coefficient of each grid, and the expression is: , is the pheromone evaporation coefficient of the i-th grid in the k-th iteration process, is the preset global pheromone evaporation coefficient at the k-th iteration, is the cost marking value of the i-th grid, mean( ) is the mean of the cost marking values of all grids, is the probability that the optimal path obtained before the k-th iteration passes through the i-th grid, norm represents the normalization function, and exp represents the exponential function with base e; The calculation method of the probability that the preferred path passes through the i-th grid is: calculate the number of preferred paths passing through the i-th grid, and use the ratio of the number of preferred paths passing through the i-th grid to the total number of preferred paths as the probability of passing through the i-th grid.
2. The communication optical cable path planning method based on the Internet of Things according to claim 1, wherein The expression of the global information evaporation coefficient is: Wherein, is the preset global pheromone evaporation coefficient at the k-th iteration, represents the path cost of the optimal path obtained after the (k - 1)-th iteration, represents the average value of the path costs in all paths obtained after the (k - 1)-th iteration, and exp represents the exponential function with base e.
3. A communication optical cable path planning method based on the Internet of Things according to claim 1, characterized in that The expression of the global information evaporation coefficient is: In the formula, is the preset global pheromone evaporation coefficient at the k-th iteration, where k represents the k-th iteration and K is the maximum number of iterations set by the ant colony algorithm. represents the path cost of the optimal path obtained after the (k - 1)-th iteration. represents the mean value of the path costs among all paths obtained after the (k - 1)-th iteration, and exp represents the exponential function with base e.
4. A communication optical cable path planning method based on the Internet of Things according to claim 1, characterized in that, The method for obtaining the grid map is: obtain a map image covering the starting point, ending point and laying area of the optical cable, and convert the map image to obtain a grid map.
5. A method for planning the path of a communication optical cable based on the Internet of Things according to claim 1, characterized in that, The method for obtaining the optimal path for laying communication optical cables by using the ant colony algorithm is: after the iteration ends, obtain multiple preferred paths, and use the preferred path with the minimum path cost as the optimal path.
6. A communication optical cable path planning method based on the Internet of Things according to claim 1, characterized in that, Before the iteration of the ant colony algorithm, it also includes the steps of initializing the number of ant colonies, the initial pheromone concentration, and the heuristic factor.
7. A communication optical cable path planning system based on the Internet of Things, characterized in that, Including: A processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for planning the path of a communication optical cable based on the Internet of Things according to any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Improved ant colony path planning method and system based on high-precision map
CN117824683A
Power transmission line intelligent line selection method based on adaptive resolution grids and improved ant colony algorithm
CN115994979A