Power communication service protection method and related equipment based on flexible Ethernet technology

By applying ant colony optimization algorithm and flexible Ethernet technology in the power communication network, pre-planning of working channels and protection channels is solved, and the problems of low resource utilization and insufficient flexibility in the existing technology are achieved, and efficient resource utilization and good adaptability to multi-link failures are achieved.

CN116094935BActive Publication Date: 2025-06-24FIBRLINK NETWORKS +5
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211551894.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2025-06-24
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

The protection switching method of the existing power communication network has shortcomings in resource utilization and flexibility, especially in the event of multi-link failures.

Method used

The ant colony optimization algorithm is used combined with flexible Ethernet technology, and the physical node and link selection is iteratively optimized, and the working channels and protection channels of power communication services are pre-planned to improve resource utilization and enhance adaptability to multi-link failures.

Benefits of technology

It achieves the improvement of resource utilization while ensuring business needs and rapid protection switching, and has good adaptability in multi-link failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116094935B_ABST
    Figure CN116094935B_ABST
Patent Text Reader

Abstract

The present application provides a power communication service protection method and related devices based on flexible Ethernet technology. For a power communication network based on flexible Ethernet devices, physical nodes and physical links in the network are determined; an ant colony optimization algorithm and a pheromone matrix are used for iteration. In each iteration, the physical nodes and physical links are selected to obtain an iterative output path; according to the iterative output path, a global output path is determined; according to all iterative output paths and the global output path obtained in each iteration process, the pheromone matrix is updated and applied to the next iteration process; in response to reaching the number of iterations, the final global output path obtained in the last iteration process is output, and the working channel and protection channel of the power communication service are obtained. According to the above method, appropriate working channels and protection channels are pre-planned for services in the network topology, which improves resource utilization while ensuring service requirements and fast protection switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a protection method for power communication services based on flexible Ethernet technology, and particularly to a protection method for power communication services in which an ant colony algorithm is adapted to the characteristics of power communication services and the ant colony optimization algorithm is improved to a certain extent. Background Art

[0002] In order to understand the existing protection switching methods, existing papers and patents were retrieved, compared and analyzed, and the following paper information with a relatively high relevance to the present invention was selected:

[0003] Literature Solution 1: "Dual Routing Equalization Algorithm for Power Communication Network Based on Improved KSP" proposes a dual-routing equalization algorithm for a power communication network based on improved KSP with service transmission delay, service reliability, shared risk group, and disjoint dual routes as constraint conditions and the minimum standard deviation of link occupancy rate as the optimization target. This algorithm has a short running time, can improve the balance degree of service load, and reduce the service rejection rate. However, it has the defect that when selecting 2 from k shortest paths, if k is too small, the similarity of each path is likely to be high, and if k is too large, the calculation time is likely to be too long.

[0004] Literature Solution 2: "A Method for Configuring the Maximum Disjoint Dual Routes in a Power Communication Network" proposes a maximally disjoint routing algorithm under the most reliable loop strategy (MRMLS). This algorithm can allocate a group of dual routes with the fewest common elements for services, and the dual routes satisfy the most reliable loop condition, which can further improve the reliability of the dual routes. MRMLS has a small time overhead and can ensure that the obtained dual routes have high reliability. However, it has the defect that in the process of algorithm solving, the method of node splitting is used to obtain the maximum disjoint dual route pair, which enhances the reliability of the dual routes, but the routing algorithm design focuses on network connectivity and insufficiently considers network resource usage and service characteristics.

[0005] Literature Solution 3: "on Service Security-based Dual-route Allocation Algorithm for Power Communication Networks" proposed the Optimal Double Route (ODR) algorithm, which configures two node-disjoint paths with the highest security for each service. Compared with the simplest dual-route algorithm, the Remove-Find (RF) algorithm, the service capacity of the ORD algorithm is increased by 9.07%, and the service path security is 20.4% higher, which has certain guiding value for service deployment and network planning in actual engineering. However, it has the defect that it aims to minimize the sum of the security of two paths, and configures node- and link-disjoint paths for each service through the improved Bhandair algorithm, achieving primary and backup route configuration based on service security, but other metrics of the service are not considered during configuration, nor can it consider the overall network services comprehensively. Summary of the Invention

[0006] In view of this, the purpose of this application is to propose a power communication service protection method, device, electronic device, and storage medium based on flexible Ethernet technology to solve or partially solve the above problems.

[0007] Based on the above purpose, the first aspect of this application provides a power communication service protection method based on flexible Ethernet technology, and the method includes:

[0008] Obtain a power communication network based on flexible Ethernet devices;

[0009] Determine physical nodes and physical links in the network according to the power communication network;

[0010] Set the number of iterations of the ant colony optimization algorithm and the pheromone matrix;

[0011] Use the ant colony optimization algorithm and the pheromone matrix for iteration. In each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and the physical links to obtain an iterative output path;

[0012] Determine the global output path according to the iterative output path;

[0013] Update the pheromone matrix according to all the iterative output paths and the global output path obtained during each iteration process, and use the updated pheromone matrix for the next iteration process;

[0014] In response to reaching the number of iterations, output the final global output path obtained in the last iteration process;

[0015] Based on the final global output path, obtain the working channel and protection channel of the power communication service

[0016] The second aspect of this application proposes a power communication service protection device based on flexible Ethernet technology, and the device includes:

[0017] An information determination module, configured to obtain a power communication network based on flexible Ethernet devices; determine physical nodes and physical links in the network according to the power communication network;

[0018] An iterative output path determination module, configured to set the number of iterations of the ant colony optimization algorithm and the pheromone matrix; perform iterations using the ant colony optimization algorithm and the pheromone matrix. In each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and physical links to obtain an iterative output path;

[0019] A global output path determination module, configured to determine a global output path according to the iterative output path;

[0020] A pheromone matrix update module, configured to update the pheromone matrix according to all iterative output paths and global output paths obtained in each iteration process, and use the updated pheromone matrix for the next iteration process;

[0021] A channel determination module, configured to, in response to reaching the number of iterations, output the final global output path obtained in the last iteration process; based on the final global output path, obtain the working channel and protection channel of the power communication service.

[0022] The third aspect of this application proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method described in the first aspect.

[0023] The fourth aspect of this application proposes a non-transitory computer-readable storage medium, and the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method described in the first aspect.

[0024] As can be seen from the above, a power communication service protection method, device, electronic device, and storage medium provided by the embodiments of this application, based on the power communication service, through the ant colony optimization algorithm, pre-plan appropriate working channels and protection channels for services in the network topology, while ensuring service requirements and fast protection switching, improve resource utilization rate, and have good adaptability in case of multi-link failures. Description of the Drawings

[0025] To more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following descriptions are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0026] Figure 1 It is a schematic flowchart of a power communication service protection method based on flexible Ethernet technology according to an embodiment of the present application;

[0027] Figure 2 It is a schematic structural diagram of a power communication service protection device based on flexible Ethernet technology according to an embodiment of the present application;

[0028] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Specific embodiments

[0029] To make the purpose, technical solutions and advantages of the present application more clear and understandable, the following further elaborates on the present application in detail with reference to specific embodiments and the accompanying drawings.

[0030] It should be noted that unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meaning understood by those of ordinary skill in the art to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. The terms such as "including" or "comprising" mean that the elements or objects appearing before this word cover the elements or objects listed after this word and their equivalents, without excluding other elements or objects. The terms such as "connected" or "coupled" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right" are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0031] In recent years, with the diversification of services and application scenarios, the network development has put forward higher requirements for the bandwidth of the bearer network. At the same time, users also hope to use a unified network to carry various different services, and these requirements have put forward higher requirements for network interfaces. However, the link rate of the underlying optical transmission network is fixed, and the interfaces and modules are fixed. If the underlying transmission modules are adjusted to adapt to various transmission requirements, the cost is too high to adapt. Flexible Ethernet (FlexE) technology is a technology developed on the basis of Ethernet technology to meet the requirements of high-speed transmission and flexible bandwidth configuration.

[0032] FlexE is a communication protocol developed by the Optical Internetworking Forum (OIF), an international standards organization, based on IEEE802.3 / 1. The FlexE technology aims to decouple the service rate from the physical channel rate, and multiple clients can share the total rate of the physical channels in the FlexE group. This core function is achieved by inserting an additional logical layer, the FlexE Shim layer, between the Physical Coding Sublayer (PCS) and the Media Access Control (MAC) layer of the Port Physical Layer (PHY) in the traditional Ethernet architecture and through a time slot distribution mechanism. The Shim layer separates the service logic layer from the physical layer. In the FlexE 1.0 standard, each 100GE PHY in the FlexE group can be divided into 20 time slot data-bearing channels, and the bandwidth corresponding to each time slot in this group of time slots corresponding to each PHY is 5Gbps. According to the mapping relationship between the client and the FlexE group, FlexE can provide three application modes: link aggregation, sub-rate, and channelization.

[0033] To ensure the stability of power communication services, it is necessary to implement the protection of power communication services based on FlexE technology. Currently, the relevant solutions for FlexE protection mainly include link protection solutions such as linear protection and ring network protection, which have the advantages of fast protection switching speed and high recovery efficiency. However, this protection method has low resource utilization rate, lacks flexibility, and generally only considers single-link failures. To solve this problem, the embodiment of this application designs a dual-channel communication power service protection method based on the ant colony optimization algorithm, adapts the ant colony algorithm to the characteristics of power communication services, and makes certain improvements, so as to quickly plan working channels and protection channels for power communication services, pre-plan appropriate working channels and protection channels for services in the network topology, improve the resource utilization rate while ensuring service requirements and fast protection switching, and have good adaptability in case of multi-link failures.

[0034] Based on the above description, refer to Figure 1 , which shows a schematic flow diagram of the wiring method of the photovoltaic power station in the real-time example of this application.

[0035] As Figure 1 described, a power communication service protection method based on flexible Ethernet technology proposed in this embodiment, the method includes:

[0036] Step 101, obtain a power communication network based on flexible Ethernet devices; according to the power communication network, determine physical nodes and physical links in the network.

[0037] In specific implementation, obtain a power communication network G(N,E) based on flexible Ethernet devices, where N is a set of physical nodes, each physical node can sense FlexE, and E is a set of physical links. And each physical node has a certain number of interfaces, which are divided into two types: Network-Network Interface (abbreviated as NNI) and User-Network Interface (abbreviated as UNI). Among them, the NNI interface connects a node and a physical link, and the UNI interface is used to send and receive power grid services. And a physical link contains time slots of the same size. In addition, a FlexE interface group is composed of interfaces on several same nodes, and each NNI interface must belong to a certain FlexE interface group; a FlexE group is composed of physical links between several same node pairs, and each physical link must belong to a certain FlexE group; each FlexE group corresponds to two FlexE interface groups. According to the information of the obtained power communication network, determine the positions of each physical node and physical link, and the relationship between the two, and determine the FlexE interface group and FlexE group where each physical node and physical link are located. Among them, the physical node also includes a source node and a destination node. The source node refers to the physical node that acts as a data source to send original data packets; the destination node refers to the physical node that acts as a data sink to receive data packets.

[0038] In the above solution, various information of the power communication network is obtained, which lays a foundation for subsequent planning of the service channels of the power communication network. In the power communication network, two channels need to be planned for each power communication service, one is the working channel and the other is the protection channel.

[0039] Step 102, set the number of iterations of the ant colony optimization algorithm and the pheromone matrix; use the ant colony optimization algorithm and the pheromone matrix to perform iterations. In each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and physical links to obtain an iterative output path.

[0040] In specific implementation, the ant colony optimization algorithm is used to obtain the iterative output path. First, the number of iterations and the pheromone matrix are initially set and continuously updated during subsequent debugging to find the most suitable number of iterations and the initial pheromone matrix. When using the ant colony optimization algorithm to obtain the iterative output path, first set how many ants select appropriate paths, that is, set how many initial paths. It is also necessary to select the next-hop physical node and physical link according to the known physical nodes and physical links, and connect the selected physical nodes and physical links to obtain the iterative output path.

[0041] In the above solution, the process of initially setting the number of iterations and the pheromone matrix and continuously updating them during subsequent debugging is to find the optimal solution. Through continuous debugging, determine the number of iterations and the initial pheromone matrix that can obtain the best path. The setting of the number of ants, that is, the setting of how many initial paths, also needs to be obtained through multiple debuggings. According to the selection process of multiple next-hop nodes and physical links, an optimal iterative output path is obtained.

[0042] Step 103: Determine the global output path according to the iterative output path.

[0043] In specific implementation, according to the iterative output path obtained in each iteration, the global output path is obtained, and through a certain comparison process, the global output path is updated.

[0044] An iterative output path is obtained in each iteration. Compare the iterative output path of each time with the global output path. If the current iterative output path is better than the current global output path, update the current global output path to the current iterative output path; otherwise, the global output path remains unchanged.

[0045] Step 104: Update the pheromone matrix according to all the iterative output paths and the global output paths obtained during each iteration process, and use the updated pheromone matrix for the next iteration process.

[0046] In specific implementation, according to all the iterative output paths and all the global output paths obtained during each iteration process, use the differences in the physical links in the two paths to update the pheromone matrix. After updating the pheromone, obtain the iterative output path in the next iteration process.

[0047] In the above solution, the update of the pheromone matrix is to increase the exploration of different physical links. Since in the selection of physical links, different connections of physical links may result in different paths, and the selection of physical links has a great relationship with the pheromone. The higher the pheromone, the higher the probability that the physical link is selected. By continuously updating the pheromone matrix, each physical link can be explored, thus avoiding the situation of obtaining a local optimal solution.

[0048] Step 105, in response to reaching the iteration times, output the final global output path obtained in the last iteration process; according to the final global output path, obtain the working channel and protection channel of the power communication service.

[0049] In specific implementation, if the preset iteration times are reached, it means that the iteration ends. At this time, the global output path obtained, which is also the optimal solution obtained in multiple iterations, is output, and the working channel and protection channel of the power communication service are obtained.

[0050] In the above solution, the iteration times are the final optimal iteration times obtained through multiple tests. Then, the global output path obtained after continuous update of the global output path will surely be the optimal global output path. Regarding such a global output path as the final solution will effectively improve the resource utilization rate while ensuring service requirements and rapid protection switching.

[0051] In some embodiments, step 102 specifically includes:

[0052] Step 1021, in each iteration, use the ant colony optimization algorithm to preset multiple starting paths;

[0053] Step 1022, in response to determining the next-hop node and physical link of the current position of any of the starting paths;

[0054] Step 1023, connect the starting path with the multiple next-hop nodes and physical links to obtain the first iteration output path;

[0055] Step 1024, determine the multiple first iteration output paths corresponding to the multiple starting paths;

[0056] Step 1025, use the objective function calculation method to calculate the objective function of each first iteration output path; compare the objective functions of the multiple first iteration output paths, and take the first iteration output path with the minimum objective function value as the iteration output path corresponding to this iteration process.

[0057] In specific implementation, in each iteration, the ant colony optimization algorithm is used to calculate the iteration output path. At the beginning, the number of starting paths, that is, the number of ants, needs to be preset. When selecting a path, multiple selections of the next-hop node and the physical link are required. Connect multiple next-hop nodes of one ant, that is, one starting path, and the starting path. When reaching the end point, a first iteration output path can be obtained. Since there are multiple starting paths, multiple first iteration output paths can be obtained. Compare the multiple obtained first iteration output paths, and select the path with the minimum objective function as the iteration output path corresponding to this iteration process.

[0058] In the above solution, by setting multiple ants, that is, multiple starting paths, multiple first iteration output paths can be obtained. Among them, the number of starting paths is also determined after multiple debuggings. The iteration output path obtained after comparing multiple first iteration output paths is the optimal first iteration output path, which ensures the optimality of the iteration output path obtained in each iteration from the first aspect.

[0059] In some embodiments, step 1022 specifically includes:

[0060] Step 10221, according to the physical nodes and physical links in the network, obtain the list of identity numbers isAllowed of all next-hop nodes that can be reached from the current position;

[0061] Step 10222, confirm the physical links that meet the delay and bandwidth requirements from the list of identity numbers isAllowed;

[0062] Step 10223, in response to the non-existence of the physical link for any of the next-hop nodes, determine that after deleting the next-hop nodes without the physical link in the list of identity numbers, re-select the next-hop nodes;

[0063] Step 10224, in response to the existence of the physical link for any of the next-hop nodes, determine the specific information of the next-hop node and the physical link:

[0064] Calculate the probability of the physical link being selected:

[0065]

[0066] Among them, probability[k] is the probability of a certain physical link being selected, k is an arbitrary number, and nodeIdA and nodeIdB represent the identity numbers of the nodes at both ends of the selected physical link, OF kThe objective function representing the current path, pheromone[nodeIdA][nodeIdB] represents the pheromone on the selected physical link, θ + β = 1, where θ and β are parameters for adjusting weights;

[0067] Calculate the selected probabilities for all the next-hop nodes in the identity identifier list isAllowed to obtain the probability array probability;

[0068] Sum all the values in the probability array probability to obtain the sum of probabilities sum;

[0069] Let all k ∈ isAllowed, such that the sum of probabilities of all the probability arrays obtained from probability1[k] is 1;

[0070] Generate a random number between 0 and 1, accumulate probability1[k] in sequence. When the accumulated value is greater than this random number, use the next-hop node and physical link corresponding to the current k value as the result;

[0071] In response to the physical link connected to the next-hop node corresponding to the current k value satisfying the delay and bandwidth requirements, determine that the selection is successful and record the information of the next-hop node and physical link corresponding to the current k value;

[0072] In response to the identity identifier list isAllowed being empty, determine that the selection fails, and after initialization, re-select the next-hop node.

[0073] In specific implementation, based on the information of the communication node set and physical link information, all the next-hop nodes and physical links that the current node can reach can be obtained, and they are aggregated into a list isAllowed containing the identity numbers of all reachable next-hop nodes. And for the next-hop nodes in this identity number list, calculate whether there is a list of FlexE group IDs and a list of physical link IDs with sufficient slot bandwidth. Randomly select a next-hop node with a physical link (which can be multiple, but must be in the same FlexE group) that meets the delay and bandwidth requirements from the said list: In this process, three situations will occur. First, if there is no list of physical link IDs and list of FlexE group IDs, it means that there is no physical link that meets the requirements, then delete the ID of the corresponding node in the identity number list isAllowed and directly proceed to the selection of the next next-hop node; Second, if there is a list of physical link IDs, randomly select an ID in the list of physical link IDs as the path; Finally, if there is no list of physical link IDs but there is a list of FlexE group IDs, that is, multiple physical links in the same FlexE group are required to meet the bandwidth and delay requirements, randomly select an ID in the list of FlexE group IDs, and sequentially select physical links in the corresponding FlexE group until the bandwidth is met (it can be multiple physical links). Then, according to the latter two situations, calculate the specific physical link and the next-hop node. When calculating the probability of selecting a physical link, if the corresponding subscript in the array does not exist, that is, when the physical link between nodeIdA and nodeIdB does not exist in the identity number list isAllowed, the probability value is represented by 0. In addition, when the calculation is completed but the selection is unsuccessful, there are two situations where the identity number list isAllowed is empty: one is that there may be no reachable next-hop, and the other is that there is a reachable next-hop, but it is deleted because there is no suitable physical link.

[0074] In the above solution, the list of FlexE group IDs means that in a FlexE group, multiple physical links together can meet the delay and bandwidth requirements; the list of physical link IDs means that a single physical link can meet the delay and bandwidth requirements. The physical link obtained through the above method must meet the delay and bandwidth requirements. If there are next-hop nodes and physical links, enter the selection process of the next next-hop node until the end point is reached; if there are no next-hop nodes and physical links, re-enter the selection process of the next-hop nodes and physical links at the current position.

[0075] In some embodiments, before step 1025, it further includes:

[0076] Step 10250, determine the calculation method of the objective function;

[0077] The objective function includes: the objective function of the working channel and the objective function of the protection channel;

[0078] In response to calculating the path of the working channel, it is determined that the objective function of using the working channel is:

[0079]

[0080] min{αT w +(1 - α)CSE w}

[0081] where, service num w (e a,b,c ) represents the number of working channels carried by the physical link e a,b,c in the network, a, b, c represent arbitrary natural numbers, and represent the maximum and minimum values of the number of working channels of the physical link in the network, weight w (e a,b,c ) represents the value of service num w (e a,b,c ) after normalization, CSE w represents the service balance degree of the working channels in the network, represents the average value of weight w (e a,b,c ), |E| is the number of physical links, E represents the set of physical links, T w represents the channel delay of the current service working channel, represents the channel length of the working channel , i represents the i-th physical node interface, lightspeed represents the speed of light, α is the weight parameter, min{αT w +(1 - α)CSE w} is the final objective function calculation formula;

[0082] In response to calculating the path of the protection channel, it is determined that the objective function of using the protection channel is:

[0083]

[0084]

[0085] min{[αT p +(1 - α)CSE p ×e CI}

[0086] where, service nump (e a,b,c ) represents the number of protection channels carried by the physical link e in the network. a, b, and c represent arbitrary natural numbers. a,b,c The number of protection channels carried by the physical link e, a, b, and c represent arbitrary natural numbers, and represent the maximum and minimum values of the number of protection channels of the physical links in the network, weight p (e a,b,c ) represents the value of service num p (e a,b,c ) after normalization. CSE p represents the service balance degree of the protection channels in the network. represents weight p (e a,b,c )'s average value, |E| is the number of physical links, T p represents the channel delay of the current service protection channel. represents the protection channel 's channel length, lightspeed represents the speed of light, CI n represents the node intersection degree of the working channel and the protection channel of service s i CI l represents the link-level channel intersection degree of the working channel and the protection channel of service s i CI represents the channel intersection degree of the working channel and the protection channel of service s i The channel intersection degree of the working channel and the protection channel, represents the number of nodes where the working channel and the protection channel use the same nodes. represents the number of working channels. represents the number of protection channels. represents the number of physical links where the working channel and the protection channel use the same ones. S represents the set of service s i The set of s, min{[αT p +(1-α)CSE p ×e CI} is the calculation formula of the final objective function, and α is the weight parameter.

[0087] In the specific implementation, there are two types of objective functions, namely the objective function of the working channel and the objective function of the protection channel. When calculating the working channel, the calculation formula of the objective function of the working channel is used. When calculating the protection channel, the calculation formula of the objective function of the protection channel is used. Among them, the calculation formulas of the objective functions of the two channels are both composed of the average channel delay, the intersection degree of the primary and backup channels, and the service balance degree. In addition, in the calculation formulas of CI n and CI l , represents traversing all the physical links of the working channel and the protection channel; n s(c i,a ) = n s (c i,b ) represents the selection of two physical links (one on the working channel and one on the protection channel), satisfying the same physical node at a certain end (such as the node close to the source node). The number of identical nodes except the destination node can be counted. In the formula, multiply by 2 and subtract 2 to exclude the source node, and finally calculate the proportion of identical nodes.

[0088] In the above solution, the communication power service has high requirements for latency. The first part of the objective function represents the requirement for low latency. The latency generated by each physical link is calculated through the length of the physical link and the speed of light, and the sum of the calculated latencies gives the latency of the entire path. To ensure that the probability of a link failure affecting both channels simultaneously is as small as possible, it is necessary to avoid using the same physical link or node for the working channel and the protection channel as much as possible. The second part of the objective function represents the requirement for approximate non-intersection of the channels, which is measured by the intersection degree of the working channel and the protection channel. The intersection degree of the working channel and the protection channel is the average of the node intersection degree and the channel intersection degree. The proportion of identical nodes other than the source and destination nodes used by the two channels can be used to obtain the node intersection degree, and the proportion of identical physical links used by the two channels can be used to obtain the channel intersection degree. On the basis of the first two points, considering the distribution degree of the service on each physical link, avoiding the situation where some physical links carry too concentrated services and some physical links carry too few services, the third part of the objective function represents the balance degree of the communication power service, which is measured by the mean square deviation of the service quantities carried by each physical link after normalization. Therefore, by comprehensively considering the above three key indicators, the objective function matching the requirements is set.

[0089] In some embodiments, step 103 specifically includes:

[0090] Step 1031, taking the iterative output path obtained in the first iteration as the global output path;

[0091] Step 1032, when performing the next iteration, comparing the objective function of the obtained iterative output path with the objective function of the global output path, and updating the path with the minimum objective function as the global output path.

[0092] In specific implementation, take the iterative output path obtained in the first iteration as the global output path. However, in each iteration, compare the objective function of each newly obtained iterative output path with the objective function of the current global output path, and take the one with the smaller objective function as the better path. If the current iterative output path is better than the current global output path, update the current global output path to the current iterative output path; otherwise, the global output path remains unchanged.

[0093] According to the above steps, the global output path is updated time by time through the comparison process, and the global output path with the minimum objective function, that is, the optimal global output path, will be obtained.

[0094] In some embodiments, step 104 specifically includes:

[0095] Step 1041, obtaining the best path change information through the difference set between the physical link sets of the iterative output paths obtained in each iteration process and the physical link set of the global output path in the current iteration;

[0096] Step 1042, updating the pheromone matrix according to the best path change information.

[0097] In specific implementation, the best path change information is obtained through the difference set between the physical link sets of the iterative output paths obtained in each iteration process and the physical link set of the global output path in the current iteration. The best path change information refers to the set of physical links that are included in the physical link set IOSloution of all previous iterative output paths and do not include the physical link set BIOSloution of the current global output path. And after obtaining the best path change information, the pheromone matrix is updated using the physical link set of the best path change information.

[0098] In the above solution, the main purpose of obtaining the best path change information is to make the updated pheromone in the pheromone matrix better when updating the pheromone matrix, so that in the iterative output path, some physical links not utilized by the global output path have a higher exploration possibility, making the selection of the next-hop node and physical link more comprehensive.

[0099] In some embodiments, step 1042 specifically includes:

[0100] Step 10421, calculating pheromone[a][b]' = pheromone[a][b] * ρ for all values of the pheromone matrix, where pheromone[a][b] refers to each pheromone in the pheromone matrix, pheromone[a][b]' is the updated value of the corresponding pheromone[a][b], a and b are arbitrary values, and ρ is the proportion of pheromone remaining after each iteration;

[0101] Step 10422, for all physical links e c,d,e ∈E c,d , calculating pheromone[c][d]' = pheromone[c][d] + 1 / OF(iteratorOptimalPath), where, E c,dThe set of all physical links representing the connection between physical node c and physical node d, e c,d,e Represents E c,d The physical link in, e represents the serial number of the physical link in the set, OF(iteratorOptimalPath) is the objective function of the iterative output path, pheromone[c][d] refers to the pheromone corresponding to each physical path included in the best path change information in the pheromone matrix, pheromone[c][d]' is the updated value of the corresponding pheromone[c][d], and c and d are arbitrary values;

[0102] Step 10423, for all physical links e included in the global output path f,g,e ∈E f,g , calculate pheromone[f][g]' = pheromone[f][g] + 1 / OF(globalOptimalPath), where, E f,g Represents the set of all physical links connecting physical node f and physical node g, e f,g,e Represents E f,g The physical link in, e represents the serial number of the physical link in the set, OF(globalOptimalPath) is the objective function of the global output path, pheromone[f][g] refers to the pheromone corresponding to each physical path included in the global output path in the pheromone matrix, pheromone[f][g]' is the updated value of the corresponding pheromone[f][g], and f and g are arbitrary values;

[0103] Step 10424, reset the elements in the pheromone matrix that are less than minPheromone and not zero to minPheromone, where minPheromone is the lower bound of the element values of the pheromone matrix;

[0104] Step 10425, reset the elements in the pheromone matrix that are greater than maxPheromone to maxPheromone, where maxPheromone is the upper bound of the element values of the pheromone matrix;

[0105] Step 10426, obtain the updated pheromone matrix.

[0106] In specific implementation, 1. Pheromone volatilization is performed. The pheromone left by ants in nature will volatilize over time. ρ is the proportion of the remaining pheromone after each iteration. Therefore, for all values of the pheromone matrix, calculate pheromone[a][b]' = pheromone[a][b] * ρ, so that each pheromone pheromone[a][b] in the pheromone matrix is multiplied by ρ to obtain the updated pheromone pheromone[a][b]'; 2. Additional pheromone enhancement is performed on the newly explored path, and the increment is saved in the pheromone matrix, which can increase the diversity of solutions. Therefore, for all physical links e c,d,e ∈E c,d , calculate pheromone[c][d]' = pheromone[c][d] + 1 / OF(iteratorOptimalPath), so that the pheromone pheromone[c][d] corresponding to each physical link included in the optimal path change information is added to 1 / OF(iteratorOptimalPath) to obtain the updated pheromone pheromone[c][d]' of the physical link included in the optimal path change information; 3. Pheromone update is performed on the solution of the global output path to increase the probability of exploring near the solution of the global output path. Therefore, for all physical links e f,g,e ∈E f,g , calculate pheromone[f][g]' = pheromone[f][g] + 1 / OF(globalOptimalPath), so that the pheromone pheromone[f][g] corresponding to each physical link included in the global output path is added to 1 / OF(globalOptimalPath) to obtain the updated pheromone pheromone[f][g]' of the physical link corresponding to the global output path; 4. To limit the element size of the pheromone matrix, the elements in the pheromone matrix that are less than minPheromone and not 0 are reset to minPheromone; the elements in the pheromone matrix that are greater than maxPheromone are reset to maxPheromone; 5. Set maxPheromone as the estimated value of the asymptotic maximum value of the pheromone matrix elements. Therefore, update maxPheromone, 6. Obtain the updated pheromone matrix.

[0107] In the above solution, the evaporation mechanism of pheromone in the ant optimization algorithm is used to update the pheromone matrix. When updating, the pheromone of the physical links that have not been explored much before is enhanced, the pheromone with a relatively high value in the previous pheromone matrix is reduced, and the size of the elements in the pheromone matrix is restricted to complete the update of a pheromone matrix. In the process of iteration after iteration, the explored physical links are made more comprehensive to avoid the situation of local optimal solutions.

[0108] In some embodiments, after step 104, it further includes:

[0109] Determine whether the updated pheromone matrix is stagnant, including:

[0110] Obtain the solution set matrix A obtained after the previous iteration and the solution set matrix B obtained after the current iteration. When the element in the solution set matrix A and the solution set matrix B is the physical link included in the first iteration output path, the element is represented by the character x; when the element in the matrix A and the matrix B is not the physical link included in the first iteration output path, the element is represented by the character y;

[0111] Add the solution set matrix A and the solution set matrix B to obtain a matrix C composed of multiple elements of x, y, and z, where z is the value obtained by adding two characters x;

[0112] Calculate the proportion of the elements with the value of z in the matrix C in the sum of the number of elements with the values of x and z;

[0113] Determine that the updated pheromone matrix is stagnant according to the proportion being greater than or equal to the first value;

[0114] Determine that the pheromone matrix is not stagnant according to the proportion being less than the first value;

[0115] In response to being stagnant, determine to use a smoothing mechanism for the pheromone matrix, including:

[0116] According to the position of the element with the value of z in the matrix C, change the pheromone pheromone[h][l] at the corresponding position in the pheromone matrix to pheromone[h][l] = ρ * (maxPheromone - pheromone[h][l]). After resetting each pheromone value of the obtained pheromone[h][l] less than the value of minPheromone to minPheromone and greater than the value of maxPheromone to maxPheromone, enter the next iteration;

[0117] Where h and l are the element subscripts at the corresponding positions in matrix C and the pheromone matrix, and h and l can be any values;

[0118] In response to not being stuck in stagnation, determine to enter the next iteration.

[0119] In specific implementation, it is necessary to make a judgment on the updated pheromone matrix, obtain the solution set matrix A obtained after the previous iteration and the solution set matrix B obtained after the current iteration. The two solution set matrices are composed of two elements, character x and character y. When the elements in the solution set matrix A and the solution set matrix B are the physical links included in the first iteration output path, the element is represented by character x, that is, when the element in the solution set matrix A is the physical link included in the first iteration output path obtained after the previous iteration, it is represented by x, and when the element in the solution set matrix B is the physical link included in the first iteration output path obtained after the current iteration, it is represented by x. When the elements in the matrix A and the matrix B are not the physical links included in the first iteration output path of the current iteration, the element is represented by character y; in the matrix C composed of elements x, y, and z obtained by adding the solution set matrices A and B, x can be 1, y can be 0, and z can be 2. Among them, z is the value obtained by adding two x's. When judging whether the pheromone matrix is stuck in stagnation according to the ratio, the first value can be 90%.

[0120] In the above solution, the process of using the solution set matrix A and the solution set matrix B to judge whether the pheromone matrix is stuck in stagnation is to judge the similarity of the two solution sets. If the similarity is too high, it can be judged that it is stuck in stagnation, then the smoothing mechanism is used. If the similarity is not high, the next iteration can be entered.

[0121] In some embodiments, step 105 specifically includes:

[0122] Step 1051, after the first round of iteration, the obtained final global output path is the working channel;

[0123] Step 1052, after the second round of iteration, the obtained final global output path is the protection channel.

[0124] In specific implementation, when all processes run once, that is, after the first round of iteration, the obtained global output path is the working channel; when all processes run the second time, that is, after the second round of iteration, the obtained global output path is the protection channel.

[0125] In the above solution, in the power communication service, the pre-planned working channel and protection channel can improve the resource utilization rate while ensuring the service requirements and fast switching.

[0126] Based on the same inventive concept and being the same as the method of any of the above embodiments, the embodiments of the present application may also be described as:

[0127] Given a power communication network G(N, E). N is a set of physical nodes, and each node can sense FlexE; E is a set of physical links, and each physical link represents a 100G PHY.

[0128] There are a certain number of interfaces on each physical node, which are divided into two types: NNI (Network-Network Interface) and UNI (User-Network Interface). The NNI interface connects a physical node and a physical link; the UNI interface is used to send and receive power grid services. represents the set of NNI on the i-th physical node, represents the interface connected to the physical link. represents the set of UNI on physical node i.

[0129] E i,j ={e i,j,1 ,e i,j,2 ,…,e i,j,k ,…} represents the set of physical links connecting the interface of the i-th physical node and the interface of the j-th physical node. L(e i,j,k ) represents the length of the physical link e i,j,k , b(e i,j,k ) represents the bandwidth capacity of the physical link e i,j,k , b u (e i,j,k ) represents the used bandwidth of the physical link e i,j,k (i.e., the sum of the actual used bandwidths in the occupied time slots), b o (e i,j,k ) represents the occupied bandwidth of the physical link e i,j,k (i.e., the sum of the bandwidths of the occupied time slots), p a (e i,j,k ) represents the interface on the i-th physical node connected to the physical link e i,j,k , p z (e i,j,k ) represents the interface on the j-th physical node connected to the physical link e i,j,k .

[0130] A physical link contains four different sizes of time slots: 5G time slots, 1G time slots, 100M time slots, and 10M time slots. represents the physical link e i,j,kThe set of 5G time slots. The representation methods of other types of time slots are similar, and different types of time slots are distinguished by superscripts.

[0131] An interface group consists of several interfaces on the same physical node, and each NNI interface must belong to a certain interface group. Represents the set of FlexE interface groups on the i-th physical node, Represents the k-th FlexE interface group on this physical node, where a, b, and c represent arbitrary natural numbers.

[0132] A FlexE group consists of several physical links between the same pair of physical nodes, and each physical link must belong to a certain FlexE group. G e Represents the set of all FlexE groups (FlexE Group), Represents the set of FlexE groups connecting the i-th physical node and the j-th physical node, Represents the FlexE group Represents the set of physical links included in the FlexE group, where a, b, and c represent arbitrary natural numbers.

[0133] Each FlexE group corresponds to two FlexE interface groups. Represents the FlexE interface group The corresponding FlexE group, Represents the FlexE group The corresponding FlexE interface group on physical node i, Represents the FlexE group The corresponding FlexE interface group on physical node j.

[0134] S = {s1, s2, …, s i , …} represents the set of power communication services that need to configure working paths and protection paths in the network topology. N s (s i ) represents the source point of the i-th service, p s (s i ) represents the source port of the i-th service, n d (s i ) represents the destination point of the i-th service, p d (s i ) represents the destination port of the i-th service.

[0135] Each power communication service needs to plan two channels, one is the working channel and the other is the protection channel. C i = {c i,1 , c i,2 , …, c i,j , …} represents the service si A channel (working channel or protection channel), and each channel is composed of multiple point-to-point group link connections (Group Link Connection). Adding superscripts can be used to distinguish between working channels and protection channels, that is and C represents all the channels planned in the network.

[0136] c i,j ={c i,j,1 , c i,j,2 ,…, c i,j,k ,…} represents a group link connection in channel C i Each group link connection is composed of multiple link connections (Link Connection), is associated with a FlexE group, and the physical links associated with these link connections all belong to the FlexE group. G(c i,j ) represents the FlexE group associated with group link connection c i,j n s (c i,j ) represents the source node of group link connection c i,j n d (c i,j ) represents the destination node of group link connection c i,j .

[0137] c i,j,k represents the link connection in group link connection c i,j and records the physical link and time slot bound by service s i in group link connection c i,j . E(c i,j,k ) represents the physical link corresponding to link connection c i,j,k p s (c i,j,k ) represents the source port of group link connection c i,j,k p d (c i,j,k ) represents the destination port of group link connection c i,j,k .

[0138] c i,j,k ={c i,j,k,a , c i,j,k,b ,…, c i,j,k,c ,…} represents the set of all types of time slots corresponding to link connection c i,j,k on this physical link, and |c i,j,k | represents the number of all types of time slots in link connection c i,j,k . Superscripts 5G, 1G, 100M or 10M can be added to represent the set of 5G, 1G, 100M or 10M time slots of the link connection.

[0139] This solution aims to comprehensively optimize communication power services. Therefore, the objective function consists of 1) the average channel delay, 2) the intersection degree of primary and backup channels, and 3) the service balance degree. Communication power services have high requirements for delay. The first part of the objective function represents the demand for low delay. The delay generated by each physical link is calculated through the length of the physical link and the speed of light, and the sum of the calculated delays is used to obtain the delay of the entire path. To ensure that the probability of a link failure affecting both the primary and backup channels simultaneously is as small as possible, the primary and backup channels should avoid using the same physical links or nodes as much as possible. The second part of the objective function represents the demand for approximately non-intersecting channels, which is measured by the intersection degree of the primary and backup channels. The intersection degree of the primary and backup channels is the average of the node intersection degree and the channel intersection degree. The node intersection degree can be obtained by calculating the proportion of the same nodes used by the primary and backup channels except for the source and destination nodes, and the channel intersection degree can be obtained by calculating the proportion of the same physical links used by the primary and backup channels. On the basis of the first two points, considering the distribution degree of services on each physical link, to avoid the situation where some physical links carry too concentrated services and some physical links carry too few services, the third part of the objective function represents the balance degree of communication power services, which is measured by the mean square deviation of the service quantities carried by each physical link after normalization. In response to the requirements of communication power services, the embodiments of this application comprehensively consider the above three key indicators and thus set an objective function that matches the requirements. Among them, the primary and backup channels refer to the working channel and the protection channel.

[0140] Objective function of the working channel:

[0141]

[0142] min{αT w +(1-α)CSE w}

[0143] Where, service num w (e a,b,c ) represents the number of working channels carried by the physical link e a,b,c in the network, and represent the maximum and minimum values of the number of working channels of the physical links in the network, weight w (e a,b,c ) represents the value of service num w (e a,b,c ) after normalization, CSE w represents the service balance degree of the working channels in the network, represents the average value of weight w (e a,b,c ), T wRepresents the channel delay of the current service working channel, Represents the working channel The channel length of, lightspeed represents the speed of light.

[0144] Protection channel objective function:

[0145]

[0146] min{[αT p +(1-α)CSE p ×e CI}

[0147] Where, service num p (e a,b,c ) Represents the number of protection channels carried by the physical link e in the network a,b,c , And Represents the maximum and minimum values of the number of protection channels of the physical link in the network, weight p (e a,b,c ) Represents the value after normalizing service num p (e a,b,c ), CSE p Represents the protection channel service balance degree in the network, Represents the average value of weight p (e a,b,c ), T p Represents the channel delay of the current service protection channel, Represents the protection channel The channel length of, lightspeed represents the speed of light, CI n Represents the node intersection degree of the primary and backup channels of service s i CI l Represents the link-level channel intersection degree of the primary and backup channels of service s i CI represents the intersection degree of the primary and backup channels of service s i .

[0148] First, for the ant colony optimization algorithm, define the relevant concepts:

[0149] alpha: The importance degree of pheromone, used to calculate the probability of a physical link being selected.

[0150] beta: The importance degree of the heuristic factor, used to calculate the probability of a physical link being selected.

[0151] ρ: The pheromone evaporation coefficient, and the pheromone volatilization ratio for each iteration is 1 - ρ.

[0152] maxPheromone: The upper bound of the element values in the pheromone matrix, which will be updated along with the pheromone matrix.

[0153] minPheromone: The lower bound of the element values in the pheromone matrix, with a default value of 1.

[0154] Global output path: The optimal solution among all calculated paths.

[0155] Iterative output path: The optimal solution among all calculated paths in the current iteration.

[0156] IOSloution: The set of physical links of the solutions of all previous iterative output paths.

[0157] BIOSloution: The set of physical links of the current global output path solution.

[0158] Vinformation: The change information of the best path, that is, the difference set between IOSloution and BIOSloution.

[0159] After defining the relevant concepts, a dual-channel communication power service protection method based on the Max-Min ant system algorithm in the ant colony optimization algorithm can be designed. The steps of the protection method are as follows:

[0160] The method first initializes the relevant parameters. If the number of iterations has not reached the specified number of iterations iterationsNum, then continue to the next round of iteration. In each iteration, select appropriate paths for antNum ants, that is, preset multiple starting paths. When selecting a path, if the j-th ant has not reached the end point, then continue to select the next-hop node and the physical link to pass through for the ant, that is, determine the next-hop node and the physical link to pass through for any starting path:

[0161] First, calculate the list of allowed next-hop node IDs, isAllowed, that the ant (starting path) can reach. Randomly select physical links that meet the delay and bandwidth requirements for each optional next-hop node (multiple physical links are allowed, but they must be in the same FlexE group): Calculate the list of FlexE group IDs and the list of physical link IDs with sufficient time-slot bandwidth for this next-hop node. ① If there is a list of physical link IDs, randomly select one ID from the list of physical link IDs as the path. ② If there is no list of physical link IDs but there is a list of FlexE group IDs, that is, multiple physical links in the same FlexE group are required to meet the bandwidth and delay requirements, randomly select one ID from the list of FlexE group IDs, and sequentially select physical links in the corresponding FlexE group until the bandwidth is satisfied (multiple physical links are allowed). ③ If there is no list of physical link IDs and no list of FlexE group IDs, it means that there are no physical links that meet the requirements. Then delete the ID of the corresponding node from isAllowed and directly proceed to the next loop.

[0162] Calculate the objective function OF after selection. k , and calculate probability[k] based on the pheromone and the objective function OF k . The formula for calculating probability[k] is as follows:

[0163]

[0164] nodeIdA and nodeIdB represent the physical node IDs at both ends of the selected physical link, and OF k represents the objective function of the current path. Calculate the probability of this physical link being selected by considering two factors: pheromone and objective function.

[0165] Then, using the values in the probability array as the selection probability (if the array index is not in isAllowed, the value is 0), randomly select a node and the corresponding physical link. The specific method is as follows: 1. Calculate the sum of the probabilities in the probability array; 2. For all k ∈ isAllowed, make the sum of the probabilities in the probability array equal to 1; 3. Generate a random number between 0 and 1, and sequentially accumulate probability[k]. When the accumulated value is greater than this random number, take the next-hop node and the physical link corresponding to the current k value as the result. If the selection is successful, record the result in the ant information; if isAllowed is empty, the selection fails, and initialize the ant information (including path information).

[0166] Finally, update the global output path and the iterative output path.

[0167] Next, calculate the optimal path change information Vinformation, which is the set of physical links IOSloution included in all previous iterative output path solutions and not included in the current global output path solution BIOSloution. First, set Vinformation and BIOSloution to empty sets. Add the physical links included in the global output path to BIOSloution. Add the physical links included in the iterative output path to IOSloution. Calculate the difference set between IOSloution and BIOSloution, which is Vinformation.

[0168] Update the pheromone matrix. The update steps are as follows: 1. Perform pheromone evaporation. The pheromone left by ants in nature will evaporate over time. ρ is the proportion of the previous pheromone remaining after each iteration. Therefore, calculate pheromone[a][b]*=ρ for all values in the pheromone matrix; 2. Perform additional pheromone enhancement on the newly explored path and save the increment in the pheromone matrix, which can increase the diversity of the solution. Therefore, for all physical links e c,d,e ∈E c,d included in the optimal path change information Vinformation, calculate pheromone[c][d]+=1 / OF(iteratorOptimalPath); 3. Update the pheromone for the global output path solution to increase the probability of exploring near the global output path solution. Therefore, for all physical links e f,g,e ∈E f,g included in the global output path, calculate pheromone[f][g]+=1 / OF(globalOptimalPath); 4. To limit the element size of the pheromone matrix, reset the elements in the pheromone matrix that are less than minPheromone and not zero to minPheromone; reset the elements in the pheromone matrix that are greater than maxPheromone to maxPheromone; 5. Set maxPheromone to the estimated value of the asymptotic maximum of the pheromone matrix elements. Therefore, update maxPheromone.

[0169] Use the solution matrix to judge whether the pheromone matrix has fallen into stagnation. The judgment method is as follows: 1. Record the solution set matrix A after the previous iteration and the solution set matrix B after the current iteration. Each element is represented by 1 indicating that there is a solution passing through this path, and 0 indicating that there is no solution; 2. Add the two matrices to obtain matrix C; 3. Calculate the proportion of elements with a value of 2 among the elements with a value of 1 or 2, that is, the similarity of the solution set matrices in two iterations; 4. If the proportion is greater than or equal to 90%, it is considered that the pheromone matrix has fallen into stagnation; if it is less than 90%, it is considered that it has not fallen into stagnation.

[0170] If the pheromone matrix has fallen into stagnation, use a smoothing mechanism for the pheromone matrix: For the subscripts h and l of the elements with a value of 2 in matrix C, let pheromone[h][l] = ρ * (maxPheromone - pheromone[h][l]). If the modified value is less than minPheromone or greater than maxPheromone, reset it to minPheromone or maxPheromone.

[0171] After the iteration ends, output the global output path. Use this algorithm to calculate the working channel and protection channel of the service respectively.

[0172] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of these multiple devices can only execute one or more steps of the method of the embodiment of the present application, and these multiple devices will interact with each other to complete the described method.

[0173] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be executed in a different order from that in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0174] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a power communication service protection device based on flexible Ethernet technology.

[0175] Refer to Figure 2 , the power communication service protection device based on flexible Ethernet technology includes:

[0176] An information determination module 201, configured to obtain a power communication network based on a flexible Ethernet device; determine physical nodes and physical links in the network according to the power communication network;

[0177] An iterative output path determination module 202, configured to set the number of iterations of the ant colony optimization algorithm and the pheromone matrix; perform iterations using the ant colony optimization algorithm and the pheromone matrix, and in each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and physical links to obtain an iterative output path;

[0178] A global output path determination module 203, configured to determine a global output path according to the iterative output path;

[0179] A pheromone matrix update module 204, configured to update the pheromone matrix according to all iterative output paths and global output paths obtained in each iteration process, and use the updated pheromone matrix for the next iteration process;

[0180] A channel determination module 205, configured to output the final global output path obtained in the last iteration process in response to reaching the number of iterations; obtain a working channel and a protection channel of the power communication service according to the final global output path.

[0181] In some embodiments, the output path determination module 202 specifically includes:

[0182] A preset unit, configured to preset a plurality of starting paths using the ant colony optimization algorithm in each iteration;

[0183] A next-hop determination unit, configured to determine the next-hop node and physical link at the current position of the starting path in response to any one of the starting paths;

[0184] A first iterative output path determination unit, configured to connect the starting path and the plurality of next-hop nodes and physical links to obtain a first iterative output path;

[0185] An iterative output path determination unit, configured to determine a plurality of first iterative output paths corresponding to the plurality of starting paths; calculate the objective function of each first iterative output path using an objective function calculation method; compare the objective functions of the plurality of first iterative output paths, and use the first iterative output path with the minimum objective function value as the iterative output path corresponding to this iteration process.

[0186] In some embodiments, the next-hop determination unit specifically includes:

[0187] A list determination subunit, configured to obtain a list of identity identification numbers isAllowed of all next-hop nodes that can be reached from the current location according to physical nodes and physical links in the network;

[0188] A link determination subunit, configured to confirm a physical link that meets the delay and bandwidth requirements from the list of identity identification numbers isAllowed; in response to the absence of the physical link for any of the next-hop nodes, determine to re-select the next-hop node after deleting the next-hop node without the physical link in the list of identity identification numbers; in response to the presence of the physical link for any of the next-hop nodes, determine the specific information of the next-hop node and the physical link:

[0189] Calculate the probability that the physical link is selected:

[0190]

[0191] where probability[k] is the probability that a certain physical link is selected, k is an arbitrary number, nodeIdA and nodeIdB represent the identity identification numbers of the nodes at both ends of the selected physical link, and OF k represents the objective function of the current path, pheromone[nodeIdA][nodeIdB] represents the pheromone on the selected physical link, θ + β = 1, and θ and β are parameters for adjusting weights;

[0192] Perform the calculation of the probability of being selected for all next-hop nodes in the list of identity identification numbers isAllowed to obtain a probability array;

[0193] Sum all the values in the probability array to obtain the sum of probabilities sum;

[0194] Let all k ∈ isAllowed, such that the sum of probabilities of all probability1 arrays obtained from probability1[k] is 1;

[0195] Generate a random number between 0 and 1, accumulate probability1[k] in sequence, and when the accumulated value is greater than the random number, use the next-hop node and physical link corresponding to the current k value as the result;

[0196] In response to the physical link connected to the next-hop node corresponding to the current k value meeting the delay and bandwidth requirements, determine that the selection is successful and record the information of the next-hop node and the physical link corresponding to the current k value;

[0197] In response to the list of identity identification numbers isAllowed being empty, it is determined that the selection fails, and after initialization, the next-hop node selection is performed again.

[0198] In some embodiments, before the iterative output path determination unit, it further includes:

[0199] A target function calculation unit, configured that the target function includes: the target function of the working channel and the target function of the protection channel;

[0200] In response to calculating the path of the working channel, it is determined that the target function of the working channel is used as:

[0201]

[0202] min{αT w +(1-α)CSE w}

[0203] where service num w (e a,b,c ) represents the number of working channels carried by the physical link e a,b,c in the network, a, b, c represent arbitrary natural numbers, and represent the maximum and minimum values of the number of working channels of the physical link in the network, weight w (e a,b,c ) represents the value after normalization of service num w (e a,b,c ), CSE w represents the traffic balance degree of the working channels in the network, represents the average value of weight w (e a,b,c ), |E| is the number of physical links, E represents the set of physical links, T w represents the channel delay of the current service working channel, represents the working channel of the channel length, i represents the i-th physical node interface, lightspeed represents the speed of light, α is a weight parameter, min{αT w +(1-α)CSE w} is the final target function calculation formula;

[0204] In response to calculating the path of the protection channel, it is determined that the target function of the protection channel is used as:

[0205]

[0206] min{[αTp +(1 - α)CSE p ×e CI}

[0207] where service num p (e a,b,c ) represents the number of protection channels carried by the physical link e a,b,c in the network, a, b, c represent arbitrary natural numbers, and represent the maximum and minimum values of the number of protection channels of the physical links in the network, weight p (e a,b,c ) represents the value of service num p (e a,b,c ) after normalization, CSE p represents the protection channel service balance degree in the network, represents the average value of weight p (e a,b,c ), |E| is the number of physical links, T p represents the channel delay of the current service protection channel, represents the protection channel channel length, lightspeed represents the speed of light, CI n represents the node intersection degree of the working channel and the protection channel of service s i CI l represents the link - level channel intersection degree of the working channel and the protection channel of service s i CI represents the channel intersection degree of the working channel and the protection channel of service s i the number of nodes where the working channel and the protection channel use the same nodes, represents the number of working channels, represents the number of protection channels, represents the number of physical links where the working channel and the protection channel use the same physical links, S represents the set of service s min{[αT i +(1 - α)CSE p ×e p ×e CI} is the final objective function calculation formula, and α is the weight parameter.

[0208] In some embodiments, the global output path determination module 203 specifically includes:

[0209] The first determination unit is configured to use the iterative output path obtained in the first iteration as the global output path;

[0210] An iterative determination unit, configured to compare the objective function of the obtained iterative output path with the objective function of the global output path during the next iteration, and update the path with the minimum objective function as the global output path.

[0211] In some embodiments, the pheromone matrix update module 204 specifically includes:

[0212] An optimal path change information determination unit, configured to obtain the optimal path change information through the difference set between the physical link sets of the iterative output paths obtained during each iteration and the physical link set of the global output path of the current iteration;

[0213] A pheromone matrix update unit, configured to update the pheromone matrix according to the optimal path change information.

[0214] In some embodiments, the pheromone matrix update unit specifically includes:

[0215] An all-values calculation sub-unit, configured to calculate pheromone[a][b]' = pheromone[a][b] * ρ for all values of the pheromone matrix, where pheromone[a][b] refers to each pheromone in the pheromone matrix, pheromone[a][b]' is the updated value of the corresponding pheromone[a][b], a and b are arbitrary values, and ρ is the proportion of pheromone remaining after each iteration;

[0216] An optimal path change information pheromone calculation sub-unit, configured to calculate pheromone[c][d]' = pheromone[c][d] + 1 / OF(iteratorOptimalPath) for all physical links e c,d,e ∈E c,d contained in the optimal path change information, where, E c,d represents the set of all physical links connecting between physical node c and physical node d, e c,d,e represents a physical link in E c,d , e represents the serial number of the physical link in the set, OF(iteratorOptimalPath) is the objective function of the iterative output path, pheromone[c][d] refers to the pheromone corresponding to each physical path contained in the optimal path change information in the pheromone matrix, pheromone[c][d]' is the updated value of the corresponding pheromone[c][d], and c and d are arbitrary values;

[0217] A global output path pheromone calculation sub-unit, configured to calculate pheromone[c][d]' = pheromone[c][d] + 1 / OF(iteratorOptimalPath) for all physical links e f,g,e ∈Ef,g , calculate pheromone[f][g]' = pheromone[f][g] + 1 / OF(globalOptimalPath), where E f,g represents the set of all physical links connecting physical node f and physical node g, e f,g,e represents E f,g in the physical link, e represents the serial number of the physical link in the set, OF(globalOptimalPath) is the objective function of the global output path, pheromone[f][g] refers to the pheromone corresponding to each physical path included in the global output path in the pheromone matrix, pheromone[f][g]' is the updated value of the corresponding pheromone[f][g], and f and g are arbitrary values;

[0218] The boundary value calculation subunit is configured to reset the elements in the pheromone matrix that are less than minPheromone and non-zero to minPheromone, where minPheromone is the lower bound of the element values of the pheromone matrix; reset the elements in the pheromone matrix that are greater than maxPheromone to maxPheromone, where maxPheromone is the upper bound of the element values of the pheromone matrix. Update maxPheromone,

[0219] In some embodiments, after the pheromone matrix update module 204, it further includes:

[0220] The pheromone matrix judgment module is configured to judge whether the updated pheromone matrix is stagnant, including:

[0221] Obtain the solution set matrix A obtained after the previous iteration and the solution set matrix B obtained after the current iteration. When the elements in the solution set matrix A and the solution set matrix B are the physical links included in the first iteration output path, the element is represented by the character x; when the elements in the matrix A and the matrix B are not the physical links included in the first iteration output path, the element is represented by the character y;

[0222] When the elements in the solution set matrix A and the solution set matrix B are the physical links included in the first iteration output path, represent the element by the character x; when the elements in the matrix A and the matrix B are not the physical links included in the first iteration output path, represent the element by the character y;

[0223] Add the matrix A and the matrix B to obtain a matrix C composed of multiple elements of x, y, and z, where z is the value obtained by adding two characters x;

[0224] Calculate the proportion of elements with value z in matrix C in the sum of the number of elements with values x and z;

[0225] Determine that the updated pheromone matrix is stagnant according to the proportion being greater than or equal to the first value;

[0226] Determine that the pheromone matrix is not stagnant according to the proportion being less than the first value;

[0227] In response to being stagnant, determine to use a smoothing mechanism for the pheromone matrix, including:

[0228] According to the positions of the elements with value z in matrix C, change the pheromone pheromone[h][l] at the corresponding positions in the pheromone matrix to pheromone[h][l]=ρ*(maxPheromone - pheromone[h][l]). After resetting the value of each pheromone of the obtained pheromone[h][l] less than the value of minPheromone to minPheromone and greater than the value of maxPheromone to maxPheromone, enter the next iteration;

[0229] Where h and l are the element subscripts at the corresponding positions in matrix C and the pheromone matrix, and h and l are arbitrary values;

[0230] In response to not being stagnant, determine to enter the next iteration.

[0231] In some embodiments, the channel determination module 205 specifically includes:

[0232] The working channel determination unit is configured to obtain the final global output path as the working channel after the end of the first round of iteration;

[0233] The protection channel determination unit is configured to obtain the final global output path as the protection channel after the end of the second round of iteration.

[0234] For the convenience of description, the above device is described by dividing it into various modules according to functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0235] The device in the above embodiment is used to implement the corresponding power communication service protection method based on the flexible Ethernet technology in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0236] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the power communication service protection method based on flexible Ethernet technology described in any one of the above embodiments.

[0237] Figure 3 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 310, a memory 320, an input / output interface 330, a communication interface 340, and a bus 350. Among them, the processor 310, the memory 320, the input / output interface 330, and the communication interface 340 are communicatively connected to each other inside the device through the bus 350.

[0238] The processor 310 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0239] The memory 320 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 320 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 320 and are called and executed by the processor 310.

[0240] The input / output interface 330 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0241] The communication interface 340 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module may implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).

[0242] The bus 350 includes a path for transmitting information between various components of the device, such as the processor 310, the memory 320, the input / output interface 330, and the communication interface 340.

[0243] It should be noted that although the above device only shows the processor 310, the memory 320, the input / output interface 330, the communication interface 340, and the bus 350, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification, and does not necessarily include all the components shown in the figure.

[0244] The electronic device of the above embodiment is used to implement the corresponding power communication service protection method based on the flexible Ethernet technology in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0245] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the power communication service protection method based on the flexible Ethernet technology as described in any of the above embodiments.

[0246] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0247] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the power communication service protection method based on the flexible Ethernet technology as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0248] Those of ordinary skill in the art should understand that: The discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples; Under the concept of the present disclosure, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present disclosure as described above. For the sake of brevity, they are not provided in detail.

[0249] In addition, for the sake of simplicity of explanation and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be entirely within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0250] Although the present disclosure has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0251] The embodiments of the present disclosure are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure shall be included within the protection scope of the present disclosure.

Claims

1. A power communication service protection method based on flexible Ethernet technology, characterized in that, Including: Obtain a power communication network based on a flexible Ethernet device; Determine physical nodes and physical links in the network according to the power communication network; Set the number of iterations of the ant colony optimization algorithm and the pheromone matrix; Use the ant colony optimization algorithm and the pheromone matrix for iteration. In each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and physical links to obtain an iterative output path; Determine the global output path according to the iterative output path; Update the pheromone matrix according to all the iterative output paths and the global output path obtained in each iteration process, and use the updated pheromone matrix for the next iteration process; In response to reaching the number of iterations, output the final global output path obtained in the last iteration process; Obtain the working channel and the protection channel of the power communication service according to the final global output path; The using the ant colony optimization algorithm and the pheromone matrix for iteration, in each iteration, select the physical nodes and the physical links, and connect the selected physical nodes and physical links to obtain an iterative output path, includes: In each iteration, use the ant colony optimization algorithm to preset multiple starting paths; In response to determining the next-hop node and physical link at the current position of the starting path for any one of the starting paths; Connect the starting path and multiple of the next-hop nodes and physical links to obtain a first iterative output path; Determine multiple first iterative output paths corresponding to the multiple starting paths; Use the objective function calculation method to calculate the objective function of each first iterative output path; wherein, the objective function consists of the channel average delay, the intersection degree of the working channel and the protection channel, and the service balance degree; calculate the delay generated by each physical link through the length of the physical link and the speed of light, and calculate the sum of the delays to obtain the channel average delay; the intersection degree of the working channel and the protection channel is the average of the node intersection degree and the link-level channel intersection degree, calculate the proportion of the same nodes other than the source and destination nodes used by the two channels to obtain the node intersection degree, and calculate the proportion of the same physical links used by the two channels to obtain the link-level channel intersection degree; use the mean square deviation of the service quantities carried by each physical link after normalization as the service balance degree; Compare the objective functions of the multiple first iterative output paths, and use the first iterative output path with the minimum objective function value as the iterative output path corresponding to this iteration process.

2. The method according to claim 1, wherein Before using the objective function calculation method to calculate the objective function of each first iterative path, further includes: Determine the calculation method of the objective function; The objective function includes: the objective function of the working channel and the objective function of the protection channel; In response to calculating the path of the working channel, determine that the objective function used for the working channel is: min{αT w +(1-α)CSE w} Among them, service num w (e a,b,c ) represents the number of working channels carried by the physical link e in the network, a, b, and c represent arbitrary natural numbers, a,b,c and represent the maximum and minimum values of the number of working channels of the physical links in the network, weight w (e a,b,c ) represents the value after the normalization of service num w (e a,b,c ), CSE w represents the service balance degree of the working channels in the network, represents the average value of weight w (e a,b,c ), |E| is the number of physical links, E represents the set of physical links, T w represents the channel delay of the current service working channel, represents the channel length of the working channel , i represents the i-th physical node interface, lightspeed represents the speed of light, α is a weight parameter, min{αT w +(1-α)CSE w} is the calculation formula of the final objective function; In response to calculating the path of the protection channel, determine that the objective function used for the protection channel is: min{[αT p +(1-α)CSE p ×e CI} Among them, service num p (e a,b,c ) represents the number of protection channels carried by the physical link e in the network, where a, b, and c represent arbitrary natural numbers. a,b,c and represent the maximum and minimum values of the number of protection channels of the physical link in the network, and weight p (e a,b,c ) represents the value of service num p (e a,b,c ) after normalization. CSE p represents the protection channel service balance degree in the network. represents the average value of weight p (e a,b,c ). |E| is the number of physical links, and T p represents the channel delay of the current service protection channel. represents the channel length of the protection channel . lightspeed represents the speed of light, and CI n represents the node intersection degree of the working channel and the protection channel of service s i . CI l represents the link-level channel intersection degree of the working channel and the protection channel of service s i . CI represents the channel intersection degree of the working channel and the protection channel of service s i i . represents the number of nodes where the working channel and the protection channel use the same nodes. represents the number of working channels. represents the number of protection channels. represents the number of physical links where the working channel and the protection channel use the same physical links. S represents the set of service s i . min{[αT p +(1-α)CSE p ×e CI} is the calculation formula of the final objective function, and α is the weight parameter.

3. The method according to claim 2, wherein In response to determining the next-hop node and physical link at the current position of the starting path for any one of the starting paths, includes: Based on the physical nodes and physical links in the network, obtain the list of identity numbers of all next-hop nodes that can be reached from the current location, denoted as isAllowed; From the list of identity numbers isAllowed, identify the physical links that meet the latency and bandwidth requirements; In response to the non-existence of the physical link for any of the next-hop nodes, determine to delete the next-hop nodes without the physical link from the list of identity numbers and then re-select the next-hop nodes; In response to the existence of the physical link for any of the next-hop nodes, determine the specific information of the next-hop node and the physical link: Calculate the probability of the physical link being selected: Among them, probability[k] is the probability that a certain physical link is selected, where k is an arbitrary number, and the nodeIdA and nodeIdB represent the node identity numbers at both ends of the selected physical link, OF k represents the objective function of the current path, pheromone[nodeIdA][nodeIdB] represents the pheromone on the selected physical link, θ + β = 1, and θ and β are parameters for adjusting weights; Perform the calculation of the probability of being selected for all next-hop nodes in the list of identity numbers isAllowed to obtain the probability array, denoted as probability; Sum all the values in the probability array to obtain the sum of probabilities, denoted as sum; Let all k ∈ isAllowed, such that the sum of the probabilities of all probability1[k] arrays is 1; Generate a random number between 0 and 1, and successively accumulate probability1[k]. When the accumulated value is greater than this random number, take the next-hop node and physical link corresponding to the current k value as the result; In response to the physical link connected to the next-hop node corresponding to the current k value meeting the latency and bandwidth requirements, determine that the selection is successful and record the information of the next-hop node and the physical link corresponding to the current k value; In response to the list of identity numbers isAllowed being empty, determine that the selection fails, perform initialization, and then re-select the next-hop nodes.

4. The method according to claim 1, characterized in that, The determination of the global output path based on the iterative output path includes: Take the iterative output path obtained in the first iteration as the global output path; During the next iteration, compare the objective function of the obtained iterative output path with the objective function of the global output path, and update the path with the minimum objective function as the global output path.

5. The method according to claim 1, wherein The update of the pheromone matrix based on all iterative output paths and the global output path obtained in each iterative process, and the use of the updated pheromone matrix for the next iterative process also includes: Obtain the best path change information through the difference set between the set of physical links of the iterative output path obtained in each iterative process and the set of physical links of the global output path of the current iteration; Update the pheromone matrix according to the best path change information.

6. The method according to claim 5, wherein The update of the pheromone matrix according to the best path change information includes: Calculate pheromone[a][b]' = pheromone[a][b] * ρ for all values in the pheromone matrix, where pheromone[a][b] refers to each pheromone in the pheromone matrix, pheromone[a][b]' is the updated value corresponding to pheromone[a][b], a and b are arbitrary values, and ρ is the proportion of pheromone remaining after each iteration; For all physical links e included in the best path change information c,d,e ∈E c,d , calculate pheromone[c][d]' = pheromone[c][d] + 1 / OF(iteratorOptimalPath), where E c,d represents the set of all physical links connecting physical node c and physical node d, e c,d,e represents a physical link in E c,d e represents the serial number of the physical link in the set, OF(iteratorOptimalPath) is the objective function of the iterative output path, pheromone[c][d] refers to the pheromone corresponding to each physical path included in the best path change information in the pheromone matrix, pheromone[c][d]' is the updated value of the corresponding pheromone[c][d], and c and d are arbitrary values; For all physical links e included in the global output path f,g,e ∈E f,g , calculate pheromone[f][g]' = pheromone[f][g] + 1 / OF(globalOptimalPath), where f,g E represents the set of all physical links connecting physical node f and physical node g, e f,g,e represents E f,g in, e represents the serial number of the physical link in the set, OF(globalOptimalPath) is the objective function of the global output path, pheromone[f][g] refers to the pheromone corresponding to each physical path included in the global output path in the pheromone matrix, pheromone[f][g]' is the updated value of the corresponding pheromone[f][g], and f and g are arbitrary values; Reset the elements in the pheromone matrix that are less than minPheromone and non-zero to minPheromone, where minPheromone is the lower bound of the element values in the pheromone matrix; Reset the elements in the pheromone matrix that are greater than maxPheromone to maxPheromone, where maxPheromone is the upper bound of the element values in the pheromone matrix; Update maxPheromone, Obtain the updated pheromone matrix.

7. The method according to claim 5, characterized in that, After updating the pheromone matrix according to the best path change information, it further includes: Determine whether the updated pheromone matrix is stagnant, including: Obtain the solution set matrix A obtained after the previous iteration and the solution set matrix B obtained after the current iteration. When the element in the solution set matrix A and the solution set matrix B is the physical link included in the first iteration output path, the element is represented by the character x; when the element in the matrix A and the matrix B is not the physical link included in the first iteration output path, the element is represented by the character y; Add the solution set matrix A and the solution set matrix B to obtain a matrix C composed of multiple elements of x, y, and z, where z is the value obtained by adding two characters x; Calculate the proportion of the elements with the value of z in the matrix C in the sum of the number of elements with the values of x and z; Determine that the updated pheromone matrix is stagnant according to the proportion being greater than or equal to the first value; Determine that the pheromone matrix is not stagnant according to the proportion being less than the first value; In response to being stagnant, determine to use a smoothing mechanism for the pheromone matrix, including: According to the positions of the elements with the value of z in the matrix C, change the pheromone pheromone[h][l] at the corresponding positions in the pheromone matrix. Change the corresponding pheromone to pheromone[h][l] = ρ * (maxPheromone - pheromone[h][l]). After resetting the value of each pheromone of the obtained pheromone[h][l] that is less than minPheromone to minPheromone and greater than maxPheromone to maxPheromone, enter the next iteration, where h and l are the subscripts of the corresponding elements in the matrix C and the pheromone matrix, and h and l are arbitrary values; In response to not being stagnant, determine to enter the next iteration.

8. The method according to claim 1, characterized in that The obtaining of the working channel and the protection channel of the power communication service according to the final global output path includes: After the end of the first round of iteration, the obtained final global output path is the working channel; After the end of the second round of iteration, the obtained final global output path is the protection channel.

9. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Ant colony algorithm implementation method and device for construction of mesh transmission system

    CN113068224A