Electric power communication system circuit route planning method and system and computer equipment
By using NetworkX framework and ant colony search and genetic algorithms in the power communication system, the problem that traditional methods are difficult to comprehensively consider multiple optimization goals is solved, and more efficient and reliable routing planning is achieved, which improves the stability and signal quality of the power communication system.
Patent Information
- Application Number
- CN202510554725.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The routing planning method of traditional power communication systems is difficult to comprehensively consider multiple optimization goals, resulting in low resource utilization, network congestion, and reduced communication quality. It is difficult to quickly complete new routing planning in the event of sudden failures, affecting the reliable operation of the power system.
The NetworkX framework is used to generate the initial topology, optimize the routing through ant colony search and genetic algorithm, comprehensively considering the total number of edges, total distance and total resource utilization, and enhancing the resolution and reliability of the routing.
It improves the rationality and efficiency of routing planning, enhances the reliability and stability of the power communication system, reduces the complexity of network maintenance, and improves signal transmission quality.
Smart Images

Figure CN120075127A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power communication, and particularly relates to a method, a system and a computer device for circuit routing planning of a power communication system. Background Art
[0002] In a power communication system, the quality of circuit routing planning directly affects the stability and efficiency of the operation of the power system. With the continuous expansion of the scale of the power network and the increasing complexity of service types, the drawbacks of traditional routing planning methods have become increasingly prominent.
[0003] From the perspective of optimization objectives, existing methods often only focus on a single index and are difficult to take into account the total number of edges, the total distance, and the total resource utilization rate. For example, some methods simply pursue the shortest total path distance, but ignore the reasonable allocation of link resources, resulting in excessive consumption of some link resources while other links are idle, and the overall resource utilization rate is low. When the power communication traffic surges, this one-sided planning method will cause network congestion, reduce the communication quality, and affect the reliable operation of the power system.
[0004] In terms of routing search efficiency, traditional methods perform poorly when facing large-scale power communication networks. Their algorithm complexity is high, the calculation process is long, and they cannot quickly give an effective routing scheme. When an emergency fault occurs in the power system and a new routing needs to be switched urgently, due to the slow search speed of traditional methods, it is difficult to complete the new routing planning in a short time, which may lead to the interruption of power communication and pose a serious threat to the safe and stable operation of the power system. Routing reliability and independence are also the shortcomings of traditional methods. Due to the lack of effective optimization of routing separation, there are many overlapping parts between multiple routes. Once a key node or link fails, it is very easy to cause multiple routes to fail simultaneously, expand the scope of the fault, and reduce the fault tolerance of the power communication system. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, a system and a computer device for circuit routing planning of a power communication system, which can comprehensively consider multiple optimization objectives, improve the rationality and efficiency of routing planning, and enhance the reliability and stability of the power communication system.
[0006] The technical solution of the present invention is as follows: One of the technical solutions of the present invention is to provide a method for circuit routing planning of a power communication system, including: Generating an initial topology in the NetworkX framework by adding node information including ID, name, and type, and link information including the ID, name, distance, resource utilization rate, and type of two-end network elements, and screening the connected subgraph with the largest number of nodes including the start and end nodes as the effective network topology graph based on connected component analysis; Define the best routing multi-objective optimization function with the shortest total number of edges, the shortest total distance, and the lowest total resource utilization rate; Copy the effective network topology diagram as the ant search space, strengthen the pheromone values of the necessary network elements and transmission segments, and set the pheromone evaporation range. Through multi-threaded concurrent execution of the ant colony search, each ant independently performs path exploration and combines with the pruning algorithm to eliminate invalid branches. Finally, candidate routes that meet the best routing multi-objective optimization function are screened to form an effective route set; Taking the effective route set as the input, encode and decode the effective route set through the genetic algorithm, calculate the separation degree and optimize the population, and divide out high-separation route groups that meet the separation requirements.
[0007] As a further option of this method, the step of generating the initial topology in the NetworkX framework further includes: Collect and organize node data and link data; among them, the node data includes various device nodes in the power communication system, and the link data is the physical or logical connection relationship between nodes; In the Python environment, with the help of the Graph() function of the NetworkX library, create an empty undirected graph object; Add the collected node information to the undirected graph object one by one and record its attributes; According to the collected link information, add link information between the corresponding nodes.
[0008] As a further option of this method, the initial topology is screened based on connected component analysis to generate an effective network topology diagram, which further includes: Use the connected_components() function provided by NetworkX to find all connected components in the initial topology diagram; Screen out the connected subgraphs that contain the start and end nodes, and select the one with the largest number of nodes as the effective network topology diagram; Among them, the process of screening the effective network topology diagram is mathematically described by the following formula: Let be the initial topology diagram, be the set of all connected components, then the effective network topology diagram is expressed as: ; Among them, represents the size of the node set in the connected component .
[0009] As a further option of this method, the function of the shortest total number of edges is: ; Among them, is the function for the shortest total number of edges, is an edge of the decision variable of the th transmission segment of a certain route, and its value is obtained from the power communication resource management system, is the number of transmission segments; The shortest total distance function is: ; Among them, is the shortest total distance function, is the distance attribute of the decision variable of the th transmission segment of a certain route, and its value is obtained from the power communication resource management system, is the number of transmission segments; The lowest total resource utilization rate function is: ; Among them, is the lowest total resource utilization rate function, is the resource utilization rate attribute of the decision variable of the th transmission segment of a certain route, and its value is obtained from the power communication resource management system, is the number of transmission segments; Using the non - dominated sorting algorithm for multi - objective optimization of the shortest total number of edges function, the shortest total distance function, and the lowest total resource utilization rate function, the multi - objective optimization function for the best route is: .
[0010] As a further option of this method, the pheromone value strengthening operation for the necessary network elements and transmission segments includes: According to actual requirements, determine which nodes or links must be included in the final route; In the replicated topology graph, add specific marker attributes to these necessary network elements; When setting the initial pheromone value, for the links related to the necessary network elements, their initial pheromone values should be significantly higher than those of other links.
[0011] As a further option of this method, the pheromone value strengthening calculation formula for the necessary network elements and transmission segments is: ; Among them, is the pheromone value on link , is the default initial pheromone value, is the strengthening increment, The size of which needs to be adjusted according to the specific problem to balance the exploration ability and convergence speed of the algorithm.
[0012] As a further option of this method, the evaporation formula for setting the pheromone evaporation range is: ; where is the pheromone value on link at the th iteration, is the pheromone value on link at the th iteration, and is the evaporation rate, which is used to control the reduction ratio of the pheromone value after each iteration.
[0013] As a further option of this method, the concurrent execution of the ant colony search step through multiple threads further includes: Each thread is responsible for controlling one or a group of ants to explore paths; Use a thread synchronization mechanism to ensure that only one thread can access and modify shared data at the same time; Among them, the thread synchronization mechanism includes mutex locks or semaphores.
[0014] As a further option of this method, the elimination of invalid branches by combining pruning algorithms includes real-time checking whether each path meets the pruning conditions. If not, the path is removed from the candidate set; Among them, the pruning conditions are: ; where , and are the cumulative total number of edges, total distance, and total resource utilization rate of the current path respectively, , and are the maximum allowable values of the total number of edges, total distance, and total resource utilization rate respectively.
[0015] As a further option of this method, the encoding and decoding steps of the effective routing set through genetic algorithms further include: The initial population represents possible routing schemes, and each individual in the population is a routing combination; Comprehensively consider the three optimization objectives of the total number of edges, total distance, and total resource utilization rate, and at the same time introduce the separation degree as an additional constraint condition to construct a fitness function; Screen out the non-dominated solution set through the non-dominated sorting algorithm and summarize it into an effective routing set; Among them, the fitness function is: ; where , , and are the maximum allowable values of the total number of edges, total distance, total resource utilization rate, and separation degree respectively, , , and are the cumulative total number of edges, total distance, total resource utilization rate, and separation degree of the current path respectively, is the weight coefficient; Among them, the separation degree of the current path is the reciprocal of the average overlap ratio between the current routing pairs: ; ; Among them, is the separation degree of the current routing group, represents the number of routes in the current routing group, represents the current route and is the overlap ratio between them, and represent the corresponding routes in the current routing group, and are the current routes and respectively contain the link sets.
[0016] As a further option of this method, the step of dividing the high-separation routing groups that meet the separation requirements further includes: Retain the 50% of the individuals with the highest fitness according to the probability distribution of fitness, and eliminate the remaining individuals; Continuously generate new individuals through crossover and mutation operations based on the 50% of the individuals with the highest fitness; Set the separation degree threshold, and screen out the routing groups that meet the requirements according to the separation degree threshold; Verify the screened routing groups that meet the requirements according to the constraint conditions; Among them, the calculation formula for the probability distribution of fitness is: ; Among them, is the probability that the th individual is selected, is the fitness value of the th individual, is the population size, is the sum of the fitness values of all individuals in the population, .
[0017] The second technical solution of the present invention is to provide a circuit routing planning system for a power communication system, including: Topology generation module: It is used to generate an initial topology in the NetworkX framework by adding node information including ID, name, and type, and link information including the ID, name, distance, resource utilization rate, and type of the two end network elements, and filter out the connected subgraph with the largest number of nodes including the start and end nodes as the effective network topology graph based on connected component analysis; Multi-objective optimization definition module: It is used to define the best routing multi-objective optimization function with the shortest total number of edges, the shortest total distance, and the lowest total resource utilization rate; Ant colony search module: It is used to copy the effective network topology graph as the ant search space, strengthen the pheromone values of the necessary network elements and transmission segments and set the pheromone evaporation range, execute ant colony search through multi-threaded concurrency. When each ant independently executes path exploration, it combines a pruning algorithm to eliminate invalid branches, and finally filters out candidate routes that meet the best routing multi-objective optimization function to form an effective route set; Genetic algorithm optimization module: It is used to take the effective route set as the input, encode and decode the effective route set through the genetic algorithm, calculate the separation degree and optimize the population, and divide out high-separation route groups that meet the separation requirements.
[0018] The third technical solution of the present invention is to provide a computer device, which includes: a processor and a memory. At least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a circuit routing planning method for a power communication system as described in the first technical solution.
[0019] The beneficial effects brought by the technical solutions provided in the embodiments of the present application at least include the following beneficial effects: Based on the node and link dynamic configuration capabilities of the NetworkX framework, key parameters such as device type and resource utilization rate can be quickly integrated, and interference from isolated nodes can be automatically eliminated through connected subgraph analysis, significantly reducing the amount of invalid data processing. This structured modeling method not only improves the topology generation efficiency but also provides a highly complete network architecture foundation for subsequent algorithms.
[0020] By integrating three optimization objectives of the total number of edges, transmission distance, and resource utilization rate, a composite optimization function is innovatively constructed, and a non-dominated sorting algorithm is combined to achieve dynamic balance of multi-dimensional indicators. Compared with traditional single-objective optimization, this method can synchronously optimize path complexity, signal quality, and resource load, enhance system redundancy while ensuring transmission efficiency, and provide a better global solution set for routing planning in complex network environments.
[0021] The collaborative mechanism of the multi-threaded ant colony algorithm and pruning strategy significantly shortens the path search time. Through pheromone reinforcement of necessary nodes, dynamic evaporation strategy, and real-time elimination of invalid branches, the local convergence problem of the traditional ant colony algorithm is effectively avoided. The multi-threaded concurrent execution significantly improves the exploration efficiency of large-scale networks, and at the same time reduces redundant calculations through pruning condition constraints, making the algorithm efficient and stable.
[0022] The high-separation routing group optimization technology based on genetic algorithm generates a multi-path combination with stronger independence through path overlap rate calculation and population iterative screening. This technology uses the separation index to quantify the differences between routes, and continuously optimizes the path distribution by combining crossover and mutation operations, significantly improving the system fault tolerance. The finally output high-separation routing group can minimize the impact of single-point failures and enhance the overall robustness of the power communication system.
[0023] This method starts from the actual operation and maintenance requirements, significantly reduces the network maintenance complexity through intelligent routing planning, and effectively improves the signal transmission quality by optimizing path selection. Its high-separation routing group design provides a reliable backup communication channel for the power system, especially suitable for high-reliability scenarios such as smart grids and energy Internet. The overall technical framework takes into account both efficiency and stability, providing a practical solution for the intelligent upgrade of the power communication network. Brief Description of the Drawings
[0024] Figure 1 It is a schematic diagram of the overall process of a circuit routing planning method for a power communication system; Figure 2 It is a detailed flowchart of step S100 of a circuit routing planning method for a power communication system; Figure 3 It is a detailed flowchart of step S200 of a circuit routing planning method for a power communication system; Figure 4 It is a detailed flowchart of step S300 of a circuit routing planning method for a power communication system; Figure 5 It is a detailed flowchart of step S400 of a circuit routing planning method for a power communication system. Detailed Embodiments
[0025] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0026] Traditional methods for circuit routing planning in power communication systems have many deficiencies. For example, in complex network environments, it is difficult to comprehensively consider multiple optimization objectives, resulting in the inability of the planned routes to balance factors such as path length, transmission distance, and resource utilization rate. To solve the above problems, please refer to Figure 1 , which shows a method for circuit routing planning in a power communication system provided by an embodiment of the present invention. The method includes: S100: Generate an initial topology in the NetworkX framework by adding node information including ID, name, and type, and link information including the ID, name, distance, resource utilization rate, and type of the two-end network elements. The initial topology filters the connected subgraph that contains the start and end nodes and has the largest number of nodes based on connected component analysis as the effective network topology graph.
[0027] S200: Define the best routing multi-objective optimization function with the shortest total number of edges, the shortest total distance, and the lowest total resource utilization rate.
[0028] S300: Copy the effective network topology graph as the ant search space, strengthen the pheromone values of the necessary network elements and transmission segments and set the pheromone evaporation range, and perform ant colony search through multi-threaded concurrency. When each ant independently performs path exploration, combine the pruning algorithm to eliminate invalid branches, and finally screen the candidate routes that meet the best routing multi-objective optimization function to form an effective route set.
[0029] S400: Take the effective route set as the input, encode and decode the effective route set through the genetic algorithm, calculate the separation degree and optimize the population, and divide the high-separation route groups that meet the separation requirements.
[0030] In the method for circuit routing planning in a power communication system, S100 is responsible for generating the effective network topology graph, providing a reliable architecture for subsequent routing planning work.
[0031] Please refer to Figure 2 , which shows a flowchart of S100 of an exemplary method for circuit routing planning in a power communication system of the present application. The content includes: S110: Collect and organize node data and link data to prepare the data basis for the initial topology.
[0032] The node data includes various device nodes in the power communication system, such as substations, routers, switches, etc. The attributes of each node include a unique identifier (ID), a name (Name), and a type (Type).
[0033] In a possible implementation, the node ID adopts a digital coding form. The node name provides an identification basis for the operator in an intuitive manner. Exemplarily, the node names are "XX Substation" and "YY Communication Base Station". The classification of node types clarifies the responsibilities of nodes in the network. Exemplarily, common types include substation nodes, communication base station nodes, switching nodes, etc.
[0034] Link data describes the physical or logical connection relationship between nodes, including the start node ID (Start_ID), end node ID (End_ID), distance (Distance), resource utilization rate (Resource_Utilization), and link type (Type).
[0035] S120: Build an initial topology using the NetworkX framework.
[0036] NetworkX is a powerful Python library dedicated to creating, operating, and studying complex network structures. NetworkX provides a convenient tool for building the initial topology of a power communication network.
[0037] In a possible implementation, the steps of building an initial topology using the NetworkX framework include: S121: In a Python environment, with the help of the Graph() function of the NetworkX library, create an empty undirected graph object.
[0038] S122: Add the collected node information to the undirected graph object one by one and record its attributes.
[0039] In a possible implementation, by traversing the node information list, for each node, use the add_node() function for the addition operation. During the addition process, specify the node ID and set its name and type.
[0040] S123: According to the collected link information, add link information between the corresponding nodes.
[0041] In a possible implementation, for each link, use the add_edge() function to add an edge between the start node and the end node. At the same time, set the attributes such as the ID, name, distance, resource utilization rate, and type of the network elements at both ends of the link to the corresponding link.
[0042] S130: Perform connected component analysis and screening to generate an effective network topology diagram.
[0043] After the initial topology is constructed, due to the complexity of the power communication network, there may be isolated nodes or unconnected subnets. To obtain a complete and effective network part, connected component analysis is required to filter out the connected subgraph that contains the start and end nodes and has the largest number of nodes.
[0044] In a possible implementation, the connected_components() function provided by NetworkX is used to find all the connected components in the initial topology graph. Then, the connected subgraphs that contain the start and end nodes are filtered out, and the one with the largest number of nodes is further selected as the effective network topology graph.
[0045] The process of filtering the effective network topology graph is mathematically described by the following formula: Let G be the initial topology graph and C(G) be the set of all connected components. Then the effective network topology graph can be expressed as: ; where represents the size of the node set in the connected component in.
[0046] S200 is one of the key steps in the circuit routing planning method of the power communication system. Its core task is to define a multi-objective optimization function based on the effective network topology graph. This process not only provides a direction constraint for the subsequent path search but also ensures the balance of the path planning in multiple dimensions.
[0047] Please refer to Figure 3 , which shows a flowchart of an exemplary circuit routing planning method S200 of the power communication system in this application. Its content includes: S210: On the premise of meeting the requirements of the power communication system, reduce the number of links passed by the routing and define the shortest total edge number function.
[0048] In path planning, the total number of edges is an important optimization goal, which directly affects the complexity of the path and the number of potential failure points. Specifically, the fewer the total number of edges, the simpler the path, the higher the transmission efficiency, and the lower the maintenance cost.
[0049] The shortest total edge number function is:
[0050] where is the shortest total edge number function, is the edge of the th transmission segment decision variable of a certain routing, and its value is obtained from the power communication resource management system, is the number of transmission segments; S220: Devote to minimizing the total transmission distance of the route and define the shortest total distance function.
[0051] In the power communication system, the transmission distance of the signal directly affects the signal quality and attenuation degree. Therefore, minimizing the total distance of the path can not only reduce signal loss but also improve transmission efficiency.
[0052] The shortest total distance function is: ; where, is the shortest total distance function, is the distance attribute of the decision variable of the th transmission segment of a certain route, and its value is obtained from the power communication resource management system, is the number of transmission segments.
[0053] S230: Aim to reduce the resource consumption of the entire route and define the lowest total resource utilization function.
[0054] In the power communication system, the resource utilization rate of the link is an important performance indicator, reflecting the current load situation of the link. In order to improve the reliability and redundancy of the system, path planning needs to select links with lower resource utilization rates as much as possible.
[0055] The lowest total resource utilization function is: ; where, is the lowest total resource utilization function, is the resource utilization rate attribute of the decision variable of the th transmission segment of a certain route, and its value is obtained from the power communication resource management system, is the number of transmission segments.
[0056] S240: Integrate the shortest total number of edges function, the shortest total distance function, and the lowest total resource utilization function to construct the multi-objective optimization function for the best route.
[0057] Perform multi-objective optimization on the shortest total number of edges function, the shortest total distance function, and the lowest total resource utilization function using the non-dominated sorting algorithm. The multi-objective optimization function for the best route is: .
[0058] In the circuit route planning method of the power communication system, S300 explores paths for the effective network topology diagram through the ant colony algorithm, combines the pruning algorithm to eliminate invalid branches, and finally screens out a set of candidate routes that satisfy the multi-objective optimization function for the best route.
[0059] Please refer to Figure 4, which shows a flowchart of an exemplary circuit routing planning method S300 for a power communication system in this application, and its content includes: S310: Copy the valid network topology diagram as the ant search space.
[0060] After completing S130, a connected subgraph containing the start and end nodes and having the largest number of nodes is obtained, that is, the valid network topology diagram. To ensure that the original topology diagram is not modified and to provide an independent search space for the ant colony algorithm, it is necessary to make a copy of the valid network topology diagram. The purpose of this step is to avoid direct operation on the original topology diagram and protect data integrity.
[0061] Specifically, through the deep copy technology, all node and link information of the valid network topology diagram is completely copied into a new undirected graph object. In this process, node information includes attributes such as ID, name, type, etc., while link information includes attributes such as start node ID, end node ID, distance, resource utilization rate, and type. Through replication, each ant can explore paths in an independent search space, thus ensuring the stability and scalability of the algorithm.
[0062] S320: Strengthen the pheromone values of the necessary network elements and transmission segments.
[0063] In a power communication system, some key nodes or links may be necessary points or segments in the routing planning. The existence of these necessary network elements will affect the search direction of the ant colony algorithm, so it is necessary to clearly identify them and strengthen their relevant pheromone values.
[0064] In a possible implementation manner, the specific operations for strengthening the pheromone values of the necessary network elements and transmission segments include: According to actual requirements, determine which nodes or links must be included in the final route. Exemplarily, a substation node may be regarded as a necessary network element.
[0065] In the copied topology diagram, add specific marker attributes to these necessary network elements for subsequent processing.
[0066] When setting the initial pheromone value, for the links related to the necessary network elements, their initial pheromone values should be significantly higher than those of other links.
[0067] In a possible implementation manner, the calculation formula for strengthening the pheromone values of the necessary network elements and transmission segments is: ; Among them, is the pheromone value on the link , is the default initial pheromone value, is the strengthening increment, Its size needs to be adjusted according to specific problems to balance the exploration ability and convergence speed of the algorithm.
[0068] S330: Set the pheromone evaporation range.
[0069] Pheromone evaporation is a key mechanism in the ant colony algorithm to prevent premature convergence. By regularly reducing the pheromone value, ants can be prompted to explore new paths, thereby improving the global search ability of the algorithm. To this end, a evaporation rate parameter is set to control the reduction ratio of the pheromone value after each iteration. The definition of the evaporation formula is as follows: ; where, is the pheromone value on link at the -th iteration, and is the evaporation rate (usually in the range of 0 to 1).
[0070] S340: Use multi-threaded concurrent execution for ant colony search.
[0071] To improve the efficiency of route search, multi-threaded concurrent execution is used for ant colony search. Multi-threading technology allows multiple ant path exploration tasks to be executed simultaneously, greatly shortening the search time.
[0072] In a multi-threaded environment, each thread is responsible for controlling one or a group of ants to perform path exploration. Each thread independently runs the path selection logic of the ant colony algorithm, including selecting the next node based on the pheromone value and heuristic information. The heuristic information can be a comprehensive consideration of factors such as the distance between nodes and resource utilization. Exemplarily, a link with a shorter distance and lower resource utilization has a higher heuristic value, and ants are more likely to choose such a link.
[0073] During multi-threaded execution, since multiple threads access and modify shared data such as pheromone values simultaneously, data inconsistency problems may occur. Therefore, a thread synchronization mechanism is required.
[0074] In one possible implementation, the thread synchronization mechanism includes a mutex or a semaphore to ensure that only one thread can access and modify the shared data at the same time.
[0075] S350: When ants independently execute path exploration, combine a pruning algorithm to eliminate invalid branches.
[0076] When each ant independently executes the path exploration task, it continuously selects the next node to construct a path. During this process, there may be some path branches that clearly do not meet the requirements, and these invalid branches will waste search time and computing resources. To improve the search efficiency, pruning algorithms are combined to eliminate these invalid branches.
[0077] Let , and be the maximum allowable values of the total number of edges, the total distance, and the total resource utilization rate respectively. Then the pruning condition is: ; Among them, , and are the cumulative total number of edges, the total distance, and the total resource utilization rate of the current path respectively.
[0078] During the ant exploration process, it is checked in real time whether each path meets the pruning condition. If not, the path is removed from the candidate set.
[0079] S360: Screen the candidate routes that meet the multi-objective optimization function of the best route, and form an effective route set.
[0080] In a possible implementation, the steps of forming the effective route set include: For each candidate route, calculate its performance on the multi-objective optimization function of the best route integrated by the shortest total number of edges function, the shortest total distance function, and the lowest total resource utilization rate function.
[0081] The candidate routes are sorted using the non-dominated sorting algorithm according to the performance results.
[0082] Through non-dominated sorting, all candidate routes are stratified according to the non-dominated relationship. The first layer is the completely non-dominated solution set, the second layer is the partially non-dominated solution set, and so on.
[0083] The non-dominated solution sets screened by non-dominated sorting are summarized into an effective route set. During this process, duplicate routes are removed, and the routes in the effective route set are sorted by priority according to actual needs.
[0084] In the circuit routing planning method of the power communication system, the goal of step S400 is to encode and decode the effective route set through the genetic algorithm, calculate the separation degree and optimize the population, and finally divide the high-separation route group that meets the separation requirements.
[0085] Please refer to Figure 5 , which shows a flowchart of an exemplary circuit routing planning method S400 of the present application, and its content includes: S410: Determine the basic framework of the genetic algorithm.
[0086] The genetic algorithm is a global optimization algorithm based on natural selection and genetic mechanisms. In this step, the core components of the genetic algorithm are defined, including population initialization, fitness function, selection strategy, crossover operator, and mutation operator.
[0087] Specifically, it includes: S411: Population initialization.
[0088] The initial population represents possible routing schemes. Each individual in the population is a routing combination, containing several valid routes from the start node to the end node. Each individual is represented in the form of a binary string or an integer array, where each bit corresponds to a certain route in the set of valid routes.
[0089] Exemplarily, if the set of valid routes contains 10 routes, each individual can be represented by a binary string of length 10. A value of "1" indicates the selection of this route, and a value of "0" indicates non-selection.
[0090] In a possible embodiment, the size of the initial population should be set according to actual needs, usually taking a value between 50 and 200.
[0091] S412: Fitness function.
[0092] Taking into account three optimization objectives of the total number of edges, total distance, and total resource utilization rate, and at the same time introducing the separation degree as an additional constraint condition.
[0093] In a possible embodiment, the fitness function is: ; Where 、 、 and are the maximum allowable values of the total number of edges, total distance, total resource utilization rate, and separation degree respectively, 、 、 and are the cumulative total number of edges, total distance, total resource utilization rate, and separation degree of the current path respectively, is the weight coefficient.
[0094] Among them, the separation degree is an important indicator to measure the independence of the routing group. A higher separation degree means less path overlap between routing groups, thereby improving the reliability and fault tolerance of the system.
[0095] In a possible implementation, let the route and Each contains a set of links and , then the overlap ratio between the two is: ; For the current routing group, its separation degree is the reciprocal of the average overlap ratio between the current routing pairs: ; Among them, is the separation degree of the current routing group, represents the number of routes in the current routing group, represents the route and the overlap ratio between them, and represent the corresponding routes in the current routing group.
[0096] S413: Selection strategy.
[0097] The selection strategy determines which individuals will be retained to participate in subsequent crossover and mutation operations.
[0098] In a possible implementation, calculate the probability distribution of fitness, and then randomly select individuals according to the probability distribution to form a new parental population.
[0099] Among them, the calculation formula for the probability distribution of fitness is: ; Among them, is the probability that the th individual is selected, is the fitness value of the th individual, is the population size, is the sum of the fitness values of all individuals in the population, .
[0100] S414: Crossover operator.
[0101] The crossover operator is one of the main means in genetic algorithms to generate new individuals. By exchanging part of the gene information of two parental individuals, offspring individuals are produced.
[0102] In a possible implementation, the crossover operator selects single-point crossover. That is, a random position is selected as the crossover point, and the gene information of the two parental individuals is exchanged at this position.
[0103] In a possible implementation, the crossover operator selects multi-point crossover. That is, gene exchange is allowed at multiple positions.
[0104] S415: Mutation operator.
[0105] The mutation operator further enhances the diversity of the population by randomly changing part of the gene information of individuals.
[0106] In a possible implementation, the mutation operator selects point mutation. That is, a gene position is randomly selected and its value is flipped.
[0107] In a possible implementation, the mutation operator selects insertion mutation. That is, a certain gene position is inserted into another position, thereby changing the overall structure of the individual.
[0108] S420: Optimize the population and divide the high-separation routing groups, verify the results and output.
[0109] After completing S410, the population is optimized, and high-separation routing groups that meet the separation requirements are selected from it.
[0110] In a possible implementation, population optimization includes eliminating individuals with lower fitness, retaining individuals with higher fitness, and continuously generating new individuals through crossover and mutation operations.
[0111] Exemplarily, during specific operations. In each generation of iteration, the population is sorted according to the fitness value, and the top 50% of the individuals are retained. The remaining individuals are used to generate new individuals through crossover and mutation operations and supplemented into the population.
[0112] When dividing the high-separation routing groups, a separation threshold is set, and the routing groups that meet the requirements are selected according to the separation threshold. If there are no routing groups that meet the requirements in the current population, continue to iterate until the maximum number of iterations is reached or the stop condition is met. If there are multiple eligible routing groups, further screening is performed according to other optimization objectives.
[0113] Finally, it is necessary to verify the divided high-separation routing groups to ensure that they meet all constraint conditions.
[0114] The verification process includes checking whether the routing groups meet the following conditions: each route belongs to the valid route set; the total number of edges, total distance, and total resource utilization rate of the routing group are all within an acceptable range. Each routing group is checked one by one for the above conditions, and the routing groups that do not meet the conditions are recorded. If all routing groups meet the requirements, the results are output; otherwise, return to the previous step to re-optimize the population.
[0115] This application also provides a circuit routing planning system for a power communication system, including: Topology generation module: It is used to generate an initial topology in the NetworkX framework by adding node information including ID, name, and type, as well as link information including the ID, name, distance, resource utilization rate, and type of the two end network elements, and filter out the connected subgraph that contains the start and end nodes and has the largest number of nodes as the effective network topology graph based on connected component analysis; Multi-objective optimization definition module: It is used to define the best routing multi-objective optimization function with the shortest total number of edges, the shortest total distance, and the lowest total resource utilization rate; Ant colony search module: It is used to copy the effective network topology graph as the ant search space, strengthen the pheromone values of the necessary network elements and transmission segments and set the pheromone evaporation range, perform ant colony search through multi-threaded concurrency. When each ant independently executes path exploration, it combines pruning algorithms to eliminate invalid branches, and finally filters out candidate routes that meet the best routing multi-objective optimization function to form an effective route set; Genetic algorithm optimization module: It is used to take the effective route set as the input, encode and decode the effective route set through the genetic algorithm, calculate the separation degree and optimize the population, and divide out high-separation route groups that meet the separation requirements.
[0116] This application also provides a computer device, which includes: a processor and a memory. At least one instruction, at least one program, a code set, or an instruction set is stored in the memory, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement a circuit routing planning method for a power communication system.
[0117] The basic principles of this application are described above in combination with specific embodiments. However, it should be noted that the advantages, advantages, effects, etc. mentioned in this application are only examples and not limitations. It cannot be considered that these advantages, advantages, effects, etc. are essential for each embodiment of this application. In addition, the above-disclosed specific details are only for the purpose of illustration and easy understanding, rather than limitations. The above details do not limit this application to necessarily adopt the above specific details to implement.
[0118] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any way. Words such as "including", "comprising", "having", etc. are open-ended words, meaning "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the word "and / or", and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0119] It should also be noted that in the devices, equipment and methods of the present application, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations shall be regarded as equivalent solutions of the present application.
[0120] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0121] The above are only the preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for planning a circuit route in a power communication system, characterized in that: include: In the NetworkX framework, the initial topology is generated by adding node information including ID, name and type, and link information including the ID, name, distance, resource utilization and type of the network elements at both ends. The initial topology selects the connected subgraph containing the start and end nodes and the largest number of nodes as the valid network topology based on the connected component analysis; Define the optimal routing multi-objective optimization function with the shortest total number of edges, the shortest total distance and the lowest total resource utilization; Copy the effective network topology as the ant search space, strengthen the pheromone values of the network elements and transmission segments that must be passed, and set the pheromone volatilization range. Perform ant colony search concurrently through multi-threading. When each ant independently performs path exploration, it combines the pruning algorithm to remove invalid branches, and finally selects the candidate routes that meet the multi-objective optimization function of the best route to form a valid route set. Taking the effective routing set as input, the effective routing set is encoded and decoded through genetic algorithm, the separation degree is calculated and the population is optimized, and the high separation routing group that meets the separation requirements is divided.
2. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The step of generating the initial topology in the NetworkX framework further includes: Collect and organize node data and link data; node data includes various equipment nodes in the power communication system, and link data is the physical or logical connection relationship between nodes; In the Python environment, create an empty undirected graph object with the help of the Graph() function of the NetworkX library; Add the collected node information to the undirected graph object one by one and record its attributes; According to the collected link information, link information is added between corresponding nodes.
3. A method for planning a circuit route for a power communication system according to claim 2, characterized in that: The initial topology further comprises: selecting a connected subgraph containing start and end nodes and having the largest number of nodes as a valid network topology graph based on connected component analysis: Use the connected_components() function provided by NetworkX to find all connected components in the initial topology graph; Filter out the connected subgraphs containing the start and end nodes, and select the one with the largest number of nodes as the valid network topology graph; The process of screening effective network topology graphs is mathematically described by the following formula: is the initial topology graph, is the set of all connected components, then the effective network topology graph It is expressed as: ; in, Represents connected components The size of the node set in .
4. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The function with the shortest total number of edges is: ; in, is the shortest function with the total number of edges, For a route The transmission segment decision variable edge, whose value is obtained from the power communication resource management system, is the number of transmission segments; The function with the shortest total distance is: ; in, is the shortest total distance function, For a route The distance attribute of the transmission segment decision variable is obtained from the power communication resource management system. is the number of transmission segments; The function with the lowest total resource utilization is: ; in, is the function with the lowest total resource utilization, For a route The resource utilization attribute of the decision variable of the transmission segment is obtained from the power communication resource management system. is the number of transmission segments; The function with the shortest total number of edges, the shortest total distance, and the lowest total resource utilization rate are optimized using the non-dominated sorting algorithm. The optimal routing multi-objective optimization function is: ; in, is the optimal routing multi-objective optimization function, is the shortest function with the total number of edges, is the shortest total distance function, It is the function with the lowest total resource utilization.
5. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The pheromone value enhancement operation of the necessary network elements and transmission segments includes: According to actual needs, determine which nodes or links must be included in the final route; In the copied topology, add specific marking attributes to these must-pass network elements; When setting the initial pheromone value, the initial pheromone value of the link related to the network element that must be passed should be significantly higher than that of other links.
6. A method for planning a circuit route for a power communication system according to claim 5, characterized in that: The pheromone value enhancement calculation formula of the necessary network elements and transmission segments is: ; in, For Link The pheromone value on is the default initial pheromone value, To strengthen the increment, The size of needs to be adjusted according to the specific problem to balance the algorithm's exploration ability and convergence speed.
7. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The volatilization formula for setting the volatilization range of pheromone is: ; in, For the The link The pheromone value on For the The link The pheromone value on is the volatilization rate, which is used to control the reduction ratio of the pheromone value after each iteration.
8. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The step of concurrently executing the ant colony search through multiple threads further includes: Each thread is responsible for controlling one or a group of ants to explore paths; Use thread synchronization mechanisms to ensure that only one thread can access and modify shared data at the same time; Among them, the thread synchronization mechanism includes a mutex lock or a semaphore.
9. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The method of removing invalid branches by combining the pruning algorithm includes checking in real time whether each path meets the pruning condition, and if not, removing the path from the candidate set; The pruning conditions are: ; in, , and are the cumulative total number of edges, total distance and total resource utilization of the current path respectively, , and are the maximum allowed values of the total number of edges, total distance and total resource utilization respectively.
10. A method for planning a circuit route for a power communication system according to claim 1, characterized in that: The step of encoding and decoding the effective route set by genetic algorithm further comprises: The initial population represents possible routing solutions, and each individual in the population is a routing combination; The fitness function is constructed by comprehensively considering the three optimization objectives of total number of edges, total distance and total resource utilization, and introducing separation degree as an additional constraint; The non-dominated solution set is screened out through the non-dominated sorting algorithm and summarized into a valid routing set; Among them, the fitness function is: ; in, , , and are the maximum allowable values of the total number of edges, total distance, total resource utilization and separation degree, respectively. , , and are the cumulative total number of edges, total distance, total resource utilization and separation of the current path, respectively. is the weight coefficient; Among them, the separation degree of the current path It is the inverse of the average overlap ratio between the current routing pairs: ; ; in, is the separation degree of the current routing group, Indicates the number of routes in the current routing group. Indicates the current route and The overlap ratio between and Represents the corresponding route in the current routing group. and For the current route and The collection of links contained respectively.
11. A method for planning a circuit route for a power communication system according to claim 10, characterized in that: The step of dividing the high separation routing group that meets the separation requirement further comprises: According to the probability distribution of fitness, retain the 50% of individuals with the highest fitness and eliminate the rest; Based on the 50% of individuals with the highest fitness, new individuals are continuously generated through crossover and mutation operations; Set a separation threshold, and filter out routing groups that meet the requirements according to the separation threshold; Verify the routing groups that meet the requirements according to the constraints; Among them, the probability distribution calculation formula of fitness is: ; in, For the The probability of an individual being selected is For the The fitness value of each individual, is the population size, is the sum of the fitness values of all individuals in the population, .
12. A circuit routing planning system for a power communication system, characterized in that: include: Topology generation module: used to generate the initial topology in the NetworkX framework by adding node information including ID, name and type and link information including the ID, name, distance, resource utilization and type of the network elements at both ends, and select the connected subgraph containing the start and end nodes and the largest number of nodes as the valid network topology graph based on the connected component analysis; Multi-objective optimization definition module: used to define the optimal routing multi-objective optimization function with the shortest total number of edges, the shortest total distance and the lowest total resource utilization; Ant colony search module: used to copy the effective network topology as the ant search space, strengthen the pheromone values of the network elements and transmission segments that must be passed, and set the pheromone volatilization range. Through multi-threaded concurrent execution of ant colony search, each ant independently performs path exploration and combines the pruning algorithm to remove invalid branches, and finally selects the candidate routes that meet the multi-objective optimization function of the best route to form a valid route set; Genetic algorithm optimization module: It is used to take the effective route set as input, encode and decode the effective route set through genetic algorithm, calculate the separation degree and optimize the population, and divide the high separation route group that meets the separation requirements.
13. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a circuit routing planning method for a power communication system as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Power communication network service routing method and device
CN101667972A
Method and device for route optimization of power communication network based on ant colony algorithm
CN104617985A
Distribution path optimization method based on ant colony algorithm
CN116227773A
Optimization management method and system for electric power communication network, and storage medium
CN116366527A
Internet of vehicles multi-path routing method based on deep reinforcement learning
CN118590962A