Communication service route planning method and system based on genetic algorithm

By applying a routing planning method based on genetic algorithm in the power communication network, comprehensively considering multiple influencing factors and optimizing routing path selection, the problem of improper service routing in the power communication network is solved, and the network operation and maintenance efficiency and reliability are improved.

CN119520363APending Publication Date: 2025-02-25INFORMATION & COMM COMPANY OF QINGHAI ELECTRIC POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411580901.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively allocate service routes in power communication networks, resulting in excessive load load load-balancing strategies, and the problem of important services concentrated on certain paths.

Method used

The communication service routing planning method based on genetic algorithm is adopted. By comprehensively considering factors such as routing hops, voltage level, equipment failure rate, equipment reload rate and optical cable length, the gradient descent method is used to calculate the optimal weight combination, and the fitness function is used in the genetic algorithm to find the optimal route.

Benefits of technology

On the premise of ensuring the effective utilization of network resources, optimize the selection of routing paths, achieve more reasonable service configuration, and improve the operation and maintenance efficiency and reliability of the power communication network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520363A_ABST
    Figure CN119520363A_ABST
Patent Text Reader

Abstract

The invention discloses a communication service route planning method and system based on a genetic algorithm, and the method comprises the steps: carrying out the data processing of selected data, dividing a training sample and a test sample, and processing the cleaned optical path data into graph data; candidate routes meeting conditions are searched in graph data for services in the sample data; calculating the values of the voltage grade, the fault rate, the heavy load rate, the routing hop count and the optical cable length on each route, taking a service real route as a training sample, and calculating an optimal weight combination by using a gradient descent method; and in a test sample, combining the optimal weight in a genetic algorithm for calculation of a fitness function, searching an optimal route for a communication service by using the genetic algorithm, and outputting a result. According to the method, the service characteristics of the power communication network are combined with the genetic algorithm, so that the selection of the routing path can be optimized on the premise of ensuring the effective utilization of network resources, and more reasonable service configuration is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of electric power communication, relates to communication service routing planning, and specifically relates to a communication service routing planning method and system based on genetic algorithm. Background Art

[0002] With the rapid development of smart grids, more and more smart power terminals, sensors and portable devices are deployed in power communication networks. These devices provide grid operators and users with a variety of services such as monitoring, control, information collection and smart power consumption, making the collaborative communication between different subsystems in the power system more frequent. As a dedicated network for the power system, the power communication network mainly carries communication tasks related to power production and operation, including relay protection, stability control, dispatching automation and video conferencing. The main function of the relay protection service is to quickly disconnect the faulty equipment when a fault occurs in the power grid to ensure system safety; the stability control service is responsible for managing the load to prevent equipment overload; and the dispatching automation realizes the automatic collection of power grid operation data, thereby promoting the automation of simulation and verification. With the continuous deepening of smart grid construction, the services carried by the power communication network are increasing. Once a fault occurs, it will directly affect the safety and stability of the power grid. Due to the randomness of faults, the use of conventional shortest path routing strategies may cause some links to be overloaded, thus forming high-risk links. In view of the topological structure of the power communication network and the current demand distribution of communication services, it is necessary to scientifically allocate and select routing paths to meet the service requirements of communication services while ensuring the effective use of network resources. This has become a key task to improve the efficiency and level of network operation and maintenance. Therefore, how to reasonably allocate service routes has become an important topic in power communication research.

[0003] Currently, there are two main problems with path planning algorithms: one is the algorithm that relies on the shortest path strategy, which will cause some paths to be overloaded; the other is the algorithm with a load balancing strategy. Although it attempts to allocate business paths through bandwidth control, it is still difficult to avoid the problem of important businesses being concentrated on certain paths.

[0004] Therefore, a new technical solution is needed to solve these problems. Summary of the invention

[0005] Purpose of the invention: In order to overcome the deficiencies in the prior art, a communication service routing planning method and system based on genetic algorithm is provided. By combining the service characteristics of the power communication network with the genetic algorithm, the selection of routing paths can be optimized while ensuring the effective use of network resources, aiming to achieve more reasonable service configuration.

[0006] Technical solution: To achieve the above purpose, the present invention provides a communication service routing planning method based on genetic algorithm, comprising the following steps:

[0007] S1: Process the selected data and divide them into training samples and test samples, and process the cleaned optical path data into image data;

[0008] S2: Determine the starting site and the ending site according to the service data, and then obtain the starting device and the ending device corresponding to the service, and search for the candidate routes that meet the conditions in the graph data for the service in the sample data;

[0009] S3: Calculate the voltage level, failure rate, overload rate, route hop count, and cable length on each route and the actual service route as training samples, and use the gradient descent method to calculate the optimal weight combination of voltage level, failure rate, overload rate, route hop count, and cable length;

[0010] S4: In the test sample, the optimal weight combination is used in the genetic algorithm for calculating the fitness function, and the genetic algorithm is used to find the optimal route for the communication service and output the result.

[0011] Furthermore, the data in step S1 includes service data, optical path data, optical cable segment data, fiber core data, site data, network element data, fault record data, etc. The service data includes fields: service number, service name, starting site, ending site, service type, rate, whether it is a dedicated fiber core service, etc.; the optical path data includes fields: optical path number, optical path name, starting device, ending device, etc.; the optical cable segment data includes fields: optical cable segment number, optical cable segment name, starting site, ending site, voltage level, optical cable segment length, etc.; the fiber core data includes fields: fiber core number, fiber cable segment, fiber core number, optical path number, etc.; the site data includes fields: site number, site name, voltage level, etc.; the network element data includes fields: network element number, network element name, system, site, etc. Based on these data, in order to realize the effective planning of power communication service routing, the present invention adopts genetic algorithm for systematic analysis, aiming to deeply explore the key indicators affecting the security and stability of service routing. During the planning process, multiple factors are first considered, including the number of route hops, voltage level, equipment failure rate, equipment overload rate, and optical cable length, to comprehensively evaluate the pros and cons of each path. This multi-dimensional evaluation method ensures that the selected path can fully meet business needs in terms of security and reliability.

[0012] Furthermore, the data processing in step S1 includes:

[0013] A1: Abnormal data cleaning: Delete any empty rows of business number, start site, or end site in the business data, delete duplicate rows, and process empty and duplicate values ​​for other data in the same way;

[0014] A2: Service data and network data: The processed service data and network data are associated with each other through the site field to obtain the service start and end device information;

[0015] A3: Network data and site data: Associate network data and site data by site number to obtain information such as voltage level of the device;

[0016] A4: NE data and fault record data: Associate NE data and fault record data according to NE number to obtain information such as NE failure rate and overload rate;

[0017] A5: Optical path data, fiber core data, and optical cable segment data: Associate the optical path data and fiber core data through the optical path number to obtain the optical cable segment to which the optical path belongs. Then associate the previously associated data with the optical cable segment data through the optical cable segment number to obtain the optical cable segment to which the optical path belongs, the length of the optical cable segment, and other information.

[0018] A6: The data associated in step A5 is associated with the data obtained in steps A3 and A4 through the network element number to obtain information such as the optical path number, the starting device, the ending device, the length of the optical cable segment, the failure rate, the overload rate, and the voltage level;

[0019] A7: With devices as nodes and optical paths between devices as edges, a complex optical path topology is constructed; each device node contains attributes such as failure rate, overload rate and voltage level; the length of the optical cable is used as the attribute of the edge, and the attributes of the node and the edge are normalized using a normalization formula; based on the starting device and the ending device given by the business data, the topK independent routes are planned for the business on the optical path topology. According to the "three routes" principle, K=3 in the present invention.

[0020] The construction of the optical path topology diagram in step A7 includes: abstracting the devices in the power communication network as nodes, and considering the optical fiber connections between the devices as links; thus, the network is represented as an undirected weighted graph G = (V, E), where V = {v1, v2, ... v n} represents the set of device nodes in the network, E = {e 12 ,e 13 ,…e (n-1)n} represents the set of links in the network topology; |V| represents the number of nodes in the network topology, |E| represents the number of links in the network topology, and e ij ∈E represents node v i and v j There are links between them, where nodes and links contain attribute values, including equipment failure rate, overload rate, voltage level, optical cable length, etc.; for any node combination pi,j = {v i ,v k ,…v j}, whose starting and ending nodes are v i and v j , if there are no duplicate nodes in the set pi,j and there is no cycle in the subgraph, then pi,j is v i and v j A valid route in .

[0021] Furthermore, in step A7, due to the different methods of calculating the above-mentioned measurement indicators, the calculation results vary greatly, so it is necessary to normalize the indicator values ​​respectively. The normalization formula is as follows:

[0022]

[0023] Among them, x max Represents the maximum value in x, and uses the above formulas to normalize the number of routing hops and the voltage level cable length.

[0024] Furthermore, in the planning process, multiple factors are first considered comprehensively, including the number of route hops, voltage level, equipment failure rate, equipment overload rate and optical cable length, so as to comprehensively evaluate the pros and cons of each path. Different weights need to be given to each factor, and the present invention uses a gradient descent algorithm to find the best weight combination.

[0025] Under the condition of limiting the number of route hops, the depth-first search method is used to find all candidate routes for the service, and the route hops, voltage level, failure rate, overload rate, cable length value on each route and the actual route of the service are calculated as training samples.

[0026] The method of using the gradient descent method to calculate the optimal weight combination in step S3 includes:

[0027] B1: Initialization:

[0028] Use the gradient descent method to solve the weights in the following model. The model function is as follows:

[0029] F(x)=αV+β(1-F)+γ(1-L)+δ(1-D)+η(1-C)

[0030] Among them, V, F, L, D, C are respectively the voltage level, equipment failure rate, equipment overload rate, routing hops, and optical cable length, which are normalized data; the voltage level is positive, the equipment failure rate, equipment overload rate, routing hops, and optical cable length are negative, the smaller the better, α, β, γ, δ, η are the weight coefficients of the indicators respectively;

[0031] Loss function: Calculate the Jaccard similarity loss:

[0032]

[0033] Where θ represents the weight parameter, r pi θ represents the route predicted using weights, r ti For the real route;

[0034] B2: Calculate gradient: Calculate the gradient of the loss function for each weight separately;

[0035] B3: Update weights: Update weights according to learning rate and gradient;

[0036] B4: Continuously iterate and optimize, and when the termination condition is reached, output the optimal weight combination.

[0037] Furthermore, the process of using the genetic algorithm to find the optimal route for the communication service in step S4 includes:

[0038] C1: Network topology processing

[0039] In order to improve the search efficiency, the nodes and links in the network are first preprocessed to remove nodes and links whose overload rate, failure rate, voltage level, and optical cable segment length exceed the preset threshold. This step only retains resources with good performance, thereby reducing the computational burden in the subsequent search process.

[0040] C2: Initialization parameters

[0041] Set the parameters such as genetic generation = 300, population size = 30, mutation rate = 0.01, crossover rate = 0.75;

[0042] C3: Chromosome encoding

[0043] After gene encoding, the chromosome is composed of a queue of nodes from the source node to the target node; for example, the chromosome encoding of a relay protection service from source node A to target node Z can be expressed as: "ABC-...-Z". In this encoding, the first gene (node) is the source node of the service, and the second gene is the node directly connected to the source node, which can be selected randomly or based on a heuristic algorithm; this process is carried out in sequence until the target node is reached, forming a complete service path;

[0044] C4: Initialize the population

[0045] The Dijkstra algorithm is used to find the shortest path between the source node and the target node. The shortest path here refers to the one with the shortest number of routing hops. The algorithm can effectively traverse the graph structure and find all possible shortest paths. Among all the paths found, in order to further optimize the initialization population of the algorithm, N = 30 paths are randomly selected as the initial population.

[0046] C5: Establishing fitness function

[0047] According to the fitness function, the quality of individuals in the population can be distinguished. The greater the fitness, the better the individual. The present invention takes into account the impact of indicators such as equipment failure rate, overload rate, routing hop count, voltage level and optical cable segment length on routing, and thus establishes the fitness function of the routing planning strategy for the communications industry:

[0048]

[0049] Among them, V, F, L, D, and C are voltage level, equipment failure rate, equipment overload rate, routing hop count, and optical cable length respectively; α, β, γ, δ, and η are weight coefficients of the indicators respectively; V max ,D max , C max are respectively the voltage level, the number of routing hops, and the maximum length of the optical cable, which are used for normalization processing to ensure that all parameters are compared at the same level; the weight coefficient is the optimal weight combination output in step B4;

[0050] C6: performs selection, crossover and mutation operations;

[0051] C7: When the number of iterations reaches the specified threshold or the change in fitness meets the conditions, it stops and outputs the individuals of the last generation and the fitness value;

[0052] C8: Sort the fitness values ​​of all individuals in the last generation from large to small, and select three routes with larger fitness as the business routing path output according to the principle of route independence.

[0053] Furthermore, the operation selected in step C6 is specifically:

[0054] D1: Calculate the fitness value of each individual in the current population according to the fitness function;

[0055] D2: According to "roulette selection" calculate the probability of each individual being selected:

[0056]

[0057] Among them, f(i) is the fitness of individual i, and N is the population size;

[0058] D3: Randomly generate a number between (0,1] and select individuals according to the cumulative probability; repeat multiple times until the required number of individuals are selected.

[0059] Furthermore, the crossover operation in step C6 is specifically as follows:

[0060] The crossover operation refers to selecting two individuals from the parent population, exchanging some of the genes of the two parent individuals, and generating two new offspring individuals.

[0061] Furthermore, the mutation operation in step C6 is specifically as follows: the mutation operation is to change certain genes on the chromosome with a very small mutation probability p to retrieve better genes.

[0062] The present invention also provides a communication service routing planning system based on genetic algorithm, the system includes a network interface, a memory and a processor; wherein,

[0063] The network interface is used to receive and send signals during the process of sending and receiving information with other external network elements;

[0064] The memory is used to store computer program instructions that can be executed on the processor;

[0065] The processor is used to execute the steps of a communication service routing planning method based on a genetic algorithm when running the computer program instructions.

[0066] The present invention establishes a service routing planning model based on a genetic algorithm. A genetic algorithm (GA) is an adaptive global optimization probability search algorithm formed by simulating the genetic and evolutionary processes of organisms in a natural environment. It represents the solution of a problem as a "chromosome" survival of the fittest process, through the continuous evolution of the "chromosome" group from generation to generation, including operations such as replication, crossover and mutation, until certain performance indicators and convergence conditions are met, so as to obtain the optimal solution or satisfactory solution to the problem. The essence of GA is a group iterative optimization process, and its two most notable features are implicit parallelism and global solution space search.

[0067] Electric power communication services usually need to ensure stable and fast data transmission, with high reliability and real-time requirements. When planning routes for electric power communication services, the selection of routes should ensure multiple redundancies to cope with equipment failures or network interruptions, avoid the impact of single point failures on the system, and ensure that a backup route can be quickly switched when a route fails. The present invention can effectively improve the overall performance and reliability of electric power communication services by using genetic algorithms to quickly find multiple independent routes for services.

[0068] Beneficial effects: Compared with the prior art, the present invention introduces genetic algorithms into the establishment of the business routing planning model. The introduction of genetic algorithms not only significantly improves the search efficiency, but also makes it possible to quickly find K independent optimal paths in a complex network environment. Through a continuous optimization process, the algorithm can gradually evolve a routing solution that better meets actual needs, thereby improving the operation and maintenance efficiency of the power communication network. And by combining the business characteristics of the power communication network with the genetic algorithm, it is possible to optimize the selection of routing paths while ensuring the effective use of network resources, aiming to achieve a more reasonable business configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 is a flow chart of the method of the present invention;

[0070] Figure 2 A diagram of the process of finding an optimal route for a communication service using a genetic algorithm;

[0071] Figure 3 It is a schematic diagram of cross operation;

[0072] Figure 4 It is a schematic diagram of mutation operation;

[0073] Figure 5 This is a topological diagram of a provincial power communication subnet in this embodiment;

[0074] Figure 6 This is the service routing path diagram obtained in this embodiment. DETAILED DESCRIPTION

[0075] The present invention is further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent forms of modifications to the present invention by those skilled in the art all fall within the scope defined by the claims attached to this application.

[0076] like Figure 1 As shown, the present invention provides a communication service routing planning method based on genetic algorithm, comprising the following steps:

[0077] S1: Process the selected data and divide them into training samples and test samples, and process the cleaned optical path data into image data;

[0078] The data includes service data, optical path data, optical cable segment data, fiber core data, site data, network element data, fault record data, etc. The service data includes fields: service number, service name, starting site, ending site, service type, rate, whether it is a dedicated fiber core service, etc.; the optical path data includes fields: optical path number, optical path name, starting device, ending device, etc.; the optical cable segment data includes fields: optical cable segment number, optical cable segment name, starting site, ending site, voltage level, optical cable segment length, etc.; the fiber core data includes fields: fiber core number, fiber cable segment, fiber core number, optical path number, etc.; the site data includes fields: site number, site name, voltage level, etc.; the network element data includes fields: network element number, network element name, system, site, etc. Based on these data, in order to realize the effective planning of power communication service routing, the present invention adopts genetic algorithm for systematic analysis, aiming to deeply explore the key indicators affecting the security and stability of service routing. During the planning process, multiple factors are first considered, including the number of route hops, voltage level, equipment failure rate, equipment overload rate, and optical cable length, to comprehensively evaluate the pros and cons of each path. This multi-dimensional evaluation method ensures that the selected path can fully meet business needs in terms of security and reliability.

[0079] Data processing includes:

[0080] A1: Abnormal data cleaning: Delete any empty rows of business number, start site, or end site in the business data, delete duplicate rows, and process empty and duplicate values ​​for other data in the same way;

[0081] A2: Service data and network data: The processed service data and network data are associated with each other through the site field to obtain the service start and end device information;

[0082] A3: Network data and site data: Associate network data and site data by site number to obtain information such as voltage level of the device;

[0083] A4: NE data and fault record data: Associate NE data and fault record data according to NE number to obtain information such as NE failure rate and overload rate;

[0084] A5: Optical path data, fiber core data, and optical cable segment data: Associate the optical path data and fiber core data through the optical path number to obtain the optical cable segment to which the optical path belongs. Then associate the previously associated data with the optical cable segment data through the optical cable segment number to obtain the optical cable segment to which the optical path belongs, the length of the optical cable segment, and other information.

[0085] A6: The data associated in step A5 is associated with the data obtained in steps A3 and A4 through the network element number to obtain information such as the optical path number, the starting device, the ending device, the length of the optical cable segment, the failure rate, the overload rate, and the voltage level;

[0086] A7: With devices as nodes and optical paths between devices as edges, a complex optical path topology is constructed; each device node contains attributes such as failure rate, overload rate, and voltage level; the optical cable length is used as the attribute of the edge, and the attributes of the node and edge are normalized using a normalization formula; based on the starting device and the ending device given by the business data, topK independent routes are planned for the business on the optical path topology. According to the "three routes" principle, K=3 in this embodiment.

[0087] The construction of the optical path topology diagram includes: abstracting the devices in the power communication network as nodes, and considering the optical fiber connections between the devices as links; therefore, the network is represented as an undirected weighted graph G = (V, E), where V = {v1, v2, ... v n} represents the set of device nodes in the network, E = {e 12 ,e 13 ,…e (n-1)n} represents the set of links in the network topology; |V| represents the number of nodes in the network topology, |E| represents the number of links in the network topology, and e ij ∈E represents node v i and v j There are links between them, where nodes and links contain attribute values, including equipment failure rate, overload rate, voltage level, optical cable length, etc.; for any node combination pi,j = {v i ,v k ,…v j}, whose starting and ending nodes are v i and v j , if there are no duplicate nodes in the set pi,j and there is no cycle in the subgraph, then pi,j is v i and v j A valid route in .

[0088] Due to the different methods of calculating the above metrics, the calculation results vary greatly, so it is necessary to normalize the indicator values ​​respectively. The normalization formula is as follows:

[0089]

[0090] Among them, x max Represents the maximum value in x, and uses the above formulas to normalize the number of routing hops and the voltage level cable length.

[0091] S2: Determine the starting site and the ending site according to the service data, and then obtain the starting device and the ending device corresponding to the service, and search for the candidate routes that meet the conditions in the graph data for the service in the sample data;

[0092] S3: Calculate the voltage level, failure rate, overload rate, route hop count, and cable length on each route and the actual service route as training samples, and use the gradient descent method to calculate the optimal weight combination of voltage level, failure rate, overload rate, route hop count, and cable length;

[0093] In the planning process, multiple factors are first considered, including the number of route hops, voltage level, equipment failure rate, equipment overload rate and optical cable length, so as to comprehensively evaluate the pros and cons of each path. Different weights need to be given to each factor, and the present invention uses a gradient descent algorithm to find the best weight combination.

[0094] Under the condition of limiting the number of route hops, the depth-first search method is used to find all candidate routes for the service, and the route hops, voltage level, failure rate, overload rate, cable length value on each route and the actual route of the service are calculated as training samples.

[0095] Methods for calculating the optimal weight combination using gradient descent include:

[0096] B1: Initialization:

[0097] Use the gradient descent method to solve the weights in the following model. The model function is as follows:

[0098] F(x)=αV+β(1-F)+γ(1-L)+δ(1-D)+η(1-C)

[0099] Among them, V, F, L, D, C are respectively the voltage level, equipment failure rate, equipment overload rate, routing hops, and optical cable length, which are normalized data; the voltage level is positive, the equipment failure rate, equipment overload rate, routing hops, and optical cable length are negative, the smaller the better, α, β, γ, δ, η are the weight coefficients of the indicators respectively;

[0100] Loss function: Calculate the Jaccard similarity loss:

[0101]

[0102] Where θ represents the weight parameter, r pi θ represents the route predicted using weights, r ti For the real route;

[0103] B2: Calculate gradient: Calculate the gradient of the loss function for each weight separately;

[0104] B3: Update weights: Update weights according to learning rate and gradient;

[0105] B4: Continuously iterate and optimize, and when the termination condition is reached, output the optimal weight combination.

[0106] S4: In the test sample, the optimal weight combination is used in the genetic algorithm for calculating the fitness function, and the genetic algorithm is used to find the optimal route for the communication service and output the result.

[0107] like Figure 2 As shown, the process of using genetic algorithm to find the optimal route for communication business includes:

[0108] C1: Network topology processing

[0109] In order to improve the search efficiency, the nodes and links in the network are first preprocessed to remove nodes and links whose overload rate, failure rate, voltage level, and optical cable segment length exceed the preset threshold. This step only retains resources with good performance, thereby reducing the computational burden in the subsequent search process.

[0110] C2: Initialization parameters

[0111] Set the parameters such as genetic generation = 300, population size = 30, mutation rate = 0.01, crossover rate = 0.75;

[0112] C3: Chromosome encoding

[0113] After gene encoding, the chromosome is composed of a queue of nodes from the source node to the target node; for example, the chromosome encoding of a relay protection service from source node A to target node Z can be expressed as: "ABC-...-Z". In this encoding, the first gene (node) is the source node of the service, and the second gene is the node directly connected to the source node, which can be selected randomly or based on a heuristic algorithm; this process is carried out in sequence until the target node is reached, forming a complete service path;

[0114] C4: Initialize the population

[0115] The Dijkstra algorithm is used to find the shortest path between the source node and the target node. The shortest path here refers to the one with the shortest number of routing hops. The algorithm can effectively traverse the graph structure and find all possible shortest paths. Among all the paths found, in order to further optimize the initialization population of the algorithm, N = 30 paths are randomly selected as the initial population.

[0116] C5: Establishing fitness function

[0117] According to the fitness function, the quality of individuals in the population can be distinguished. The greater the fitness, the better the individual. The present invention takes into account the impact of indicators such as equipment failure rate, overload rate, routing hop count, voltage level and optical cable segment length on routing, and thus establishes the fitness function of the routing planning strategy for the communications industry:

[0118]

[0119] Among them, V, F, L, D, and C are voltage level, equipment failure rate, equipment overload rate, routing hop count, and optical cable length respectively; α, β, γ, δ, and η are weight coefficients of the indicators respectively; V max ,D max , C max are respectively the voltage level, the number of routing hops, and the maximum length of the optical cable, which are used for normalization processing to ensure that all parameters are compared at the same level; the weight coefficient is the optimal weight combination output in step B4;

[0120] C6: performs selection, crossover and mutation operations;

[0121] The selection operations are:

[0122] D1: Calculate the fitness value of each individual in the current population according to the fitness function;

[0123] D2: According to "roulette selection" calculate the probability of each individual being selected:

[0124]

[0125] Among them, f(i) is the fitness of individual i, and N is the population size;

[0126] D3: Randomly generate a number between (0,1] and select individuals according to the cumulative probability; repeat multiple times until the required number of individuals are selected.

[0127] The crossover operation is as follows:

[0128] The crossover operation refers to selecting two individuals from the parent population, exchanging some genes of the two parent individuals, and generating two new offspring individuals. Figure 3 As shown, in this embodiment, two paths from a service source node A to a destination node Z are shown, namely, two parents in the population, and some genes of the two parents are selected for exchange. Node B and node C are two common nodes, and node C is randomly selected as the intersection point to obtain two new offspring individuals.

[0129] The mutation operation is as follows: The mutation operation changes some genes on the chromosome with a very small mutation probability p to retrieve better genes. Figure 4 As shown, in this embodiment, an individual is randomly selected as a mutation object. Figure 4 In the random selection of mutation gene F, retain all genes before gene F, and find the shortest path from mutation point F to point Z to ensure that after the mutation, there is a valid link between each pair of adjacent nodes.

[0130] C7: When the number of iterations reaches the specified threshold or the change in fitness meets the conditions, it stops and outputs the individuals of the last generation and the fitness value;

[0131] C8: Sort the fitness values ​​of all individuals in the last generation from large to small, and select three routes with larger fitness as the business routing path output according to the principle of route independence.

[0132] This embodiment also provides a communication service routing planning system based on a genetic algorithm, which includes a network interface, a memory and a processor; wherein the network interface is used to realize the reception and transmission of signals during the process of sending and receiving information between other external network elements; the memory is used to store computer program instructions that can be run on the processor; the processor is used to execute the steps of the above-mentioned consensus method when running the computer program instructions.

[0133] The present embodiment also provides a computer storage medium, which stores a computer program, and the method described above can be implemented when the processor executes the computer program. The computer readable medium can be considered to be tangible and non-temporary. Non-limiting examples of non-temporary tangible computer-readable media include non-volatile memory circuits (such as flash memory circuits, erasable programmable read-only memory circuits or mask read-only memory circuits), volatile memory circuits (such as static random access memory circuits or dynamic random access memory circuits), magnetic storage media (such as analog or digital tapes or hard drives) and optical storage media (such as CDs, DVDs or Blu-ray discs), etc. The computer program includes processor executable instructions stored on at least one non-temporary tangible computer-readable medium. The computer program may also include or rely on stored data. The computer program may include a basic input / output system (BIOS) that interacts with the hardware of a special-purpose computer, a device driver that interacts with a specific device of a special-purpose computer, one or more operating systems, user applications, background services, background applications, etc.

[0134] In order to verify the effectiveness and effect of the method of the present invention, this embodiment applies the method and system of the present invention to an example, as follows:

[0135] In order to verify the reliability and effectiveness of the algorithm in routing planning for power communication services, this embodiment is verified on the power communication subnet topology of a certain province, involving a total of 29 device nodes and 45 optical links. The topology is as follows: Figure 5 shown.

[0136] In this topology, it is necessary to plan three independent routes that meet the principle of "dual devices / dual interfaces, three routes" for a certain relay protection service or a single-port 2M service [9,29]. The source node, sink node and service type of the service can be queried through the service data, and the voltage level, overload rate, failure rate and other attribute information of the nodes in the topology can be determined, and the length of the link and other information can be determined.

[0137] In the test sample, the genetic algorithm is used to plan the route of the service. The genetic algorithm can also achieve good results in the present invention, but the iteration time is long. The method of the present invention can plan two independent routes for the service, and the service only has two independent routes that meet the conditions. Figure 6 As shown in the figure, the algorithm plans two independent routes that meet the requirements for a certain protection single-port 2M service [9,29], route 1: [9-1-26-11-29] and route 2: [9-12-8-16-17-29].

Claims

1. A communication service routing planning method based on genetic algorithm, characterized in that: The steps include: S1: Process the selected data and divide them into training samples and test samples, and process the cleaned optical path data into image data; S2: Determine the starting site and the ending site according to the service data, and then obtain the starting device and the ending device corresponding to the service, and search for the candidate routes that meet the conditions in the graph data for the service in the sample data; S3: Calculate the voltage level, failure rate, overload rate, route hop count, and cable length on each route and the actual service route as training samples, and use the gradient descent method to calculate the optimal weight combination of voltage level, failure rate, overload rate, route hop count, and cable length; S4: In the test sample, the optimal weight combination is used in the genetic algorithm for calculating the fitness function, and the genetic algorithm is used to find the optimal route for the communication service and output the result.

2. A communication service routing planning method based on genetic algorithm according to claim 1, characterized in that: The data in step S1 includes service data, optical path data, optical cable segment data, fiber core data, site data, network element data, and fault record data.

3. A communication service routing planning method based on genetic algorithm according to claim 1, characterized in that: The data processing in step S1 includes: A1: Abnormal data cleaning: Delete any empty rows of business number, start site, or end site in the business data, delete duplicate rows, and process empty and duplicate values ​​for other data in the same way; A2: Service data and network data: The processed service data and network data are associated with each other through the site field to obtain the service start and end device information; A3: Network data and site data: Associate network data and site data through site numbers to obtain voltage level information of the device; A4: NE data and fault record data: Associate NE data and fault record data according to NE number to obtain NE failure rate and overload rate information; A5: Optical path data, fiber core data, and optical cable segment data: associate the optical path data with the fiber core data through the optical path number to obtain the optical cable segment to which the optical path belongs. Then, associate the previously associated data with the optical cable segment data through the optical cable segment number to obtain the optical cable segment to which the optical path belongs and the length of the optical cable segment. A6: Associating the data after association in step A5 with the data obtained in steps A3 and A4 through the network element number, obtaining the optical path number, starting device, ending device, optical cable segment length, failure rate, overload rate, and voltage level information; A7: Take devices as nodes and optical paths between devices as edges to build a complex optical path topology. Take the length of optical cables as the attribute of edges and use the normalization formula to normalize the attributes of nodes and edges. Based on the starting and ending devices given by the business data, plan the top K independent routes for the business on the optical path topology.

4. A communication service routing planning method based on genetic algorithm according to claim 3, characterized in that: The construction of the optical path topology diagram in step A7 includes: abstracting the devices in the power communication network as nodes, and considering the optical fiber connections between the devices as links; thus, the network is represented as an undirected weighted graph G = (V, E), where V = {v1, v2, ... v n } represents the set of device nodes in the network, E = {e 12 ,e 13 ,…e (n-1)n } represents the set of links in the network topology; |V| represents the number of nodes in the network topology, |E| represents the number of links in the network topology, and e ij ∈E represents node v i and v j There are links between nodes and links, where nodes and links contain attribute values; for any node combination in the network p(i,j) = {v i ,v k ,…v j }, whose starting and ending nodes are v i and v j , if there are no duplicate nodes in the set p(i,j) and there is no cycle in the subgraph, then p(i,j) is v i and v j A valid route in .

5. A communication service routing planning method based on genetic algorithm according to claim 3, characterized in that: The normalization processing formula in step A7 is as follows: Among them, x max Represents the maximum value in x, and uses the above formulas to normalize the number of routing hops and the voltage level cable length.

6. A communication service routing planning method based on genetic algorithm according to claim 1, characterized in that: The method of using the gradient descent method to calculate the optimal weight combination in step S3 includes: B1: Initialization: Use the gradient descent method to solve the weights in the following model. The model function is as follows: F(x)=αV+β(1-F)+γ(1-L)+δ(1-D)+η(1-C) Among them, V, F, L, D, C are the normalized data of voltage level, equipment failure rate, equipment overload rate, routing hops, and optical cable length respectively; voltage level is positive, equipment failure rate, equipment overload rate, routing hops, and optical cable length are negative, α, β, γ, δ, η are the weight coefficients of the indicators respectively; Loss function: Calculate the Jaccard similarity loss: Where θ represents the weight parameter, r pi (θ) represents the route predicted using weights, r ti For the real route; B2: Calculate gradient: Calculate the gradient of the loss function for each weight separately; B3: Update weights: Update weights according to learning rate and gradient; B4: Continuously iterate and optimize, and when the termination condition is reached, output the optimal weight combination.

7. A communication service routing planning method based on genetic algorithm according to claim 6, characterized in that: The process of using the genetic algorithm to find the optimal route for the communication service in step S4 includes: C1: Network topology processing First, the nodes and links in the network are pre-processed to delete the nodes and links whose overload rate, failure rate, voltage level, and optical cable segment length exceed the preset thresholds; C2: Initialization parameters Set the parameters of genetic generation, population size, mutation rate, and crossover rate; C3: Chromosome encoding After gene encoding, the chromosome is composed of a queue of nodes from the source node to the target node. In the encoding, the first gene is the source node of the business, and the second gene is the node directly connected to the source node, which can be selected by random selection or based on a heuristic algorithm. This process is carried out in sequence until the target node is reached, forming a complete business path. C4: Initialize the population Using Dijkstra's algorithm, find the shortest path between the source node and the target node. The shortest path here refers to the one with the shortest number of routing hops. Among all the paths found, in order to further optimize the initial population of the algorithm, randomly select N paths as the initial population. C5: Establishing fitness function Taking into account the impact of equipment failure rate, overload rate, routing hop count, voltage level and optical cable segment length on routing, a fitness function for the routing planning strategy of the communications industry is established: Among them, V, F, L, D, and C are voltage level, equipment failure rate, equipment overload rate, routing hop count, and optical cable length respectively; α, β, γ, δ, and η are weight coefficients of the indicators respectively; V max ,D max , C max are respectively the voltage level, the number of routing hops, and the maximum length of the optical cable, which are used for normalization processing to ensure that all parameters are compared at the same level; the weight coefficient is the optimal weight combination output in step B4; C6: performs selection, crossover and mutation operations; C7: When the number of iterations reaches the specified threshold or the change in fitness meets the conditions, it stops and outputs the individuals of the last generation and the fitness value; C8: Sort the fitness values ​​of all individuals in the last generation from large to small, and select the route as the business routing path output based on the principle of route independence.

8. A communication service routing planning method based on genetic algorithm according to claim 7, characterized in that: The selection operation in step C6 is specifically: D1: Calculate the fitness value of each individual in the current population according to the fitness function; D2: Calculate the probability of each individual being selected according to "roulette selection": Among them, f(i) is the fitness of individual i, and N is the population size; D3: Randomly generate a number between (0,1] and select individuals according to the cumulative probability; repeat multiple times until the required number of individuals are selected.

9. A communication service routing planning method based on genetic algorithm according to claim 7, characterized in that: The crossover operation in step C6 is specifically as follows: The crossover operation refers to selecting two individuals from the parent population, exchanging some genes of the two parent individuals, and generating two new offspring individuals. The mutation operation is specifically as follows: the mutation operation changes certain genes on the chromosome with a very small mutation probability p to retrieve better genes.

10. A communication service routing planning system based on genetic algorithm, characterized in that: The system includes a network interface, a memory and a processor; wherein, The network interface is used to receive and send signals during the process of sending and receiving information with other external network elements; The memory is used to store computer program instructions that can be executed on the processor; The processor is used to execute the steps of a communication service routing planning method based on a genetic algorithm according to any one of claims 1 to 9 when running the computer program instructions.