Traffic optimization method and device, electronic device, and computer-readable storage medium

By calculating a completely separate main path and backup path for each service, ensuring that the backup path can be quickly switched to the backup path when the network link fails, and ensuring path quality after the switching is solved, the problem that the existing technology cannot take into account the real-time and path quality of path switching, and achieving network load balancing and service continuity.

CN114095439BActive Publication Date: 2025-05-09ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010868603.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-25
Publication Date
2025-05-09
Estimated Expiration
2040-08-25

AI Technical Summary

Technical Problem

The prior art cannot take into account the real-time nature of path switching and the guarantee of path quality, resulting in the failure of network links, service switching may not be completed quickly or the path quality after the switch is poor.

Method used

Compute a completely separate first primary path and first backup path for each service to ensure that any link in the entire network meets the main path constraints and backup path constraints. The main path constraint ensures that the peak traffic of the link does not exceed the preset threshold under normal circumstances, and the backup path constraint ensures that the peak traffic does not exceed the preset threshold when switching to the backup path in the event of a link failure.

Benefits of technology

It realizes that when the network link fails, it can quickly switch to the backup path, ensure business continuity, and ensure path quality after switching, ensuring network load balancing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095439B_ABST
    Figure CN114095439B_ABST
Patent Text Reader

Abstract

The present application provides a traffic optimization method and device, an electronic device, and a computer-readable storage medium. The traffic optimization method includes: calculating a first path pair for each service respectively, so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition; wherein the first path pair includes: a completely separated first main path and a first backup path; the main path constraint condition includes: when the working path of each service in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to a first preset threshold; the backup path constraint condition includes: when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of the link on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communications, and in particular to a traffic optimization method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Traffic engineering has always been a major problem in Internet Protocol (IP) networks. With the development of network communication technology and network optimization, various traffic optimization solutions for various scenarios have emerged one after another. The relevant traffic optimization methods cannot take into account both the real-time performance of path switching and the guarantee of path quality. Summary of the invention

[0003] Embodiments of the present application provide a traffic optimization method and device, an electronic device, and a computer-readable storage medium.

[0004] In a first aspect, an embodiment of the present application provides a traffic optimization method, including:

[0005] Calculate the first path pair for each service respectively, so that any link in the entire network satisfies the primary path constraint condition and the backup path constraint condition;

[0006] The first path pair includes: a first main path and a first backup path that are completely separated;

[0007] The main path constraint condition includes: when the working path of each service in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to the first preset threshold;

[0008] The backup path constraint condition includes: when one or more services in the entire network switch the working path to the corresponding first backup path due to a link failure on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold.

[0009] In a second aspect, an embodiment of the present application provides an electronic device, including:

[0010] at least one processor;

[0011] A memory, wherein at least one program is stored in the memory. When the at least one program is executed by at least one processor, the at least one processor implements any one of the above-mentioned traffic optimization methods.

[0012] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned traffic optimization methods is implemented.

[0013] The traffic optimization method provided in the embodiment of the present application calculates a first path pair including a completely separated first main path and a first backup path for each service, so that when any one or more links in the entire network fail, the affected services can be instantly switched to the main and backup paths, thus achieving the real-time nature of the path switching; and any link in the entire network satisfies the main path constraint condition and the backup path constraint condition. The main path constraint condition is that when each service in the entire network works on the first main path, the first peak flow of any link is less than or equal to the first preset threshold value, and it is considered that the first main path achieves network load balancing; the backup path constraint condition is that when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of a link on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold value, and it is considered that the first backup path satisfies the network load balancing, thereby achieving that when any one or more links in the entire network fail, the affected services can be switched to a backup path with better quality, that is, a backup path that still satisfies the network load balancing, and the path quality guarantee of the path switching is achieved; in summary, the traffic optimization method provided in the embodiment of the present application takes into account both the real-time nature of the path switching and the guarantee of the path quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 A flow chart of a traffic optimization method provided by an embodiment of the present application;

[0015] Figure 2 A flowchart of a method for calculating a first path pair for each service provided in an embodiment of the present application;

[0016] Figure 3 A flow chart of a method for calculating a second path pair for each service provided in an embodiment of the present application;

[0017] Figure 4 A block diagram of a traffic optimization device provided in another embodiment of the present application;

[0018] Figure 5 A flowchart of a method for calculating a first path pair for each service using a genetic algorithm provided in Example 1 of an embodiment of the present application;

[0019] Figure 6 A flowchart of a backup path adjustment method provided in Example 2 of an embodiment of the present application;

[0020] Figure 7 A flow chart of a traffic optimization method provided for Example 3 of an embodiment of the present application;

[0021] Figure 8 A schematic diagram of a network controller provided for Example 4 of an embodiment of the present application;

[0022] Fig. 9 A flowchart of a traffic optimization method provided for Example 4 of an embodiment of the present application. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the technical solution of the present application, the traffic optimization method and device, electronic device, and computer-readable storage medium provided by the present application are described in detail below in conjunction with the accompanying drawings.

[0024] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make this application thorough and complete and to enable those skilled in the art to fully understand the scope of this application.

[0025] In the absence of conflict, the embodiments of the present application and the features therein may be combined with each other.

[0026] As used herein, the term "and / or" includes any and all combinations of at least one of the associated listed items.

[0027] The terms used herein are only used to describe specific embodiments and are not intended to limit the present application. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of at least one other feature, whole, step, operation, element, component and / or its group is not excluded.

[0028] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this application, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined herein.

[0029] Link failure can be considered as a special scenario in traffic engineering, that is, the traffic that can be carried by the failed link is zero.

[0030] Traffic optimization methods related to failure scenarios are divided into two categories. The first category is to temporarily calculate a backup path for the affected business and switch to the backup path when some links in the network fail. The second category is to calculate a backup path that is completely separated from the working path (i.e., the main path) in advance. When a link fails, it can directly switch to the backup path.

[0031] The above two types of traffic optimization methods have their own advantages and disadvantages. The first type of method can calculate a path with better quality for the service in real time according to the network status, but the service is still in a blocked state during the rerouting time, that is, the service is interrupted during the rerouting time, which means that the real-time nature of path switching cannot be met; the pre-set backup path provided by the second type of method can instantly switch to the backup path when a link fails, without the need for real-time calculation, ensuring the minimum impact on the service, but it cannot guarantee the quality of the pre-set path (it may be a congested link). In other words, the relevant traffic optimization methods cannot take into account both the real-time nature of path switching and the guarantee of path quality.

[0032] Figure 1 A flow chart of a traffic optimization method provided for one embodiment of the present application.

[0033] First, refer to Figure 1 An embodiment of the present application provides a traffic optimization method, including:

[0034] Step 100, respectively calculate the first path pair for each service so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition; wherein the first path pair includes: a completely separated first main path and a first backup path; the main path constraint condition includes: when the working path of each service in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to the first preset threshold; the backup path constraint condition includes: when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of the link on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold.

[0035] In some exemplary embodiments, the first path pair may be calculated for each service when a preset trigger condition is met. For example, the preset trigger condition may be receiving a batch service request, or in the case of network congestion, or in the case of a need for traffic optimization. The embodiments of the present application do not limit the specific trigger conditions, and the specific trigger conditions are not used to limit the protection scope of the embodiments of the present application.

[0036] In some exemplary embodiments, the first main path and the first backup path of the same service are completely separated, which means that there is no common link between the first main path and the first backup path of the same service, that is, any link on the first main path is different from any link on the first backup path.

[0037] In the embodiment of the present application, the purpose of completely separating the first primary path and the first backup path of the same service is to ensure that after any link on the first primary path fails (for example, is broken), the service can be successfully switched to the first backup path.

[0038] In some exemplary embodiments, the main path constraint condition includes: when the working path of each service in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to a first preset threshold.

[0039] In some exemplary embodiments, the first peak value of a link refers to the sum of the peak flows of all services carried on the link when the working path of each service in the entire network is the corresponding first main path. It is not difficult to understand that in this case, all services carried on the link are all services that pass through the link on the first main path (i.e., the first target service below). Then, the first peak flow of the link is the sum of the peak flows of all first target services; wherein, the first target service is the service that passes through the link on the first main path.

[0040] In some exemplary embodiments, the backup path constraint condition includes: when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of the link on the corresponding first main path, the second peak flow of the link is less than or equal to a second preset threshold.

[0041] In some exemplary embodiments, the second peak traffic of a link refers to the sum of the peak traffic of all services carried on the link when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of the link on the corresponding first primary path. It is not difficult to understand that in this case, all services carried on the link include: all services that are not affected by the link failure and the first primary path passes through the link, and all services that are affected by the link failure and the first backup path passes through the link.

[0042] In some exemplary embodiments, when determining whether the second peak flow of a link is less than or equal to a second preset threshold, it is necessary to consider all possible situations in which link failures may exist, calculate the second peak flow of the link for any possible situation, and determine whether the second peak flow of the link is less than or equal to the second preset threshold for any possible situation. Therefore, the process of determining whether the second peak flow of the link is less than or equal to the second preset threshold is very complicated and time-consuming.

[0043] In order to simplify the judgment process of whether the second peak flow of the link is less than or equal to the second preset threshold, it can be assumed that at most X links will fail. In this way, for a certain link 1, it is only necessary to consider the maximum peak flow of link 1 increased after the services of the first main path passing through the X links are switched to the primary and backup paths after any X links fail, that is, the sum of the peak flows of the services of the first main path passing through any one of the X failed links and the first backup path passing through link 1.

[0044] In order to calculate the maximum peak traffic added by link 1, the possible situations of various link failures are analyzed and found. A simple example is given here for illustration, and other complex situations are also applicable. For example, if the first main paths of the two services do not overlap (that is, there is no shared link), and the first backup paths of the two services pass through link 1, then when any link in the network fails, at most only one of the two services needs to switch to the first backup path, then the peak traffic added by link 1 is the peak traffic of any one of the two services. In order to simplify the calculation, the peak traffic added by link 1 can be the maximum value of the peak traffic of the two services, so that all situations are covered.

[0045] That is to say, all services passing through link 1 on the first backup path can be grouped so that the first main paths of all services in the same service group overlap; then the peak flow of each service group is calculated respectively, and the X service groups with the largest peak flow are selected; the sum of the peak flows of the selected X service groups (i.e., the X target service groups below) is the maximum peak flow increased by link 1. For example, the first backup paths of services S1, S2, S3, and S4 all pass through link 1, and the first main paths of services S1 and S2 overlap (such as both pass through link 2), the first main paths of services S3 and S4 overlap (such as both pass through link 3), and the first main paths of services S1, S3, and S4 also overlap (such as all pass through link 4). Then, services S1 and S2 can be divided into service group 1, services S3 and S4 can be divided into service group 2, and services S1, S3, and S4 can be divided into service group 3. Assuming that the peak flow of service group 1 is 40, the peak flow of service group 2 is 30, and the peak flow of service group 3 is 50, then the service group with the largest peak flow is service group 3, followed by service group 1, and the service group with the smallest peak flow is service group 2. If X is 1, then service group 3 is selected as the target service group; if X is 2, then service group 1 and service group 3 are selected as the target service groups.

[0046] Therefore, the second peak flow of the link can be expressed as: traffic_work_sum+traffic_slave_sum; wherein traffic_slave_sum is the sum of the peak flows of the selected X service groups (ie, the X target service groups below), and traffic_work_sum is the sum of the peak flows of the services of the first main path passing through the link (ie, the first target service below).

[0047] That is, the second peak flow of the link is the sum of the peak flow of the first target service plus the sum of the peak flows of X target service groups; wherein the peak flow of the target service group is the sum of the peak flows of all services included in the target service group; X is the maximum number of links that have failed;

[0048] The first target service is the service passing through the link on the first primary path, and the X target service groups are the X service groups with the largest peak traffic among all service groups obtained by dividing all services passing through the link on the first backup path;

[0049] Among all the services passing through the link on the first backup path, the services overlapping with the first main path are divided into the same service group.

[0050] It should be noted that the peak traffic of a service refers to the maximum value of the traffic of the service, which can be calculated based on the maximum bandwidth of the service, or obtained based on real-time statistics of the traffic of the service, or obtained in other ways. The specific method of obtaining it is not used to limit the protection scope of the embodiments of the present application.

[0051] In some exemplary embodiments, in order to achieve load balancing in the entire network when any link in the entire network satisfies the main path constraint condition and the backup path constraint condition, the first preset threshold value and the second preset threshold value can be determined based on the average flow of the entire network. For example, the first preset threshold value and the second preset threshold value can directly adopt the average flow of the entire network, or can be slightly higher than the average flow of the entire network. In this way, when any link in the entire network satisfies the main path constraint condition and the backup path constraint condition, the network load balancing can be basically guaranteed, and at least it can be guaranteed that each link in the network will not experience link congestion.

[0052] In some exemplary embodiments, Figure 2 As shown, calculating the first path pair for each service includes:

[0053] Step 200: Calculate a second path pair for each service respectively; wherein the second path pair includes: a completely separated second main path and a second backup path.

[0054] In some exemplary embodiments, the second path pair may be calculated for each service in a variety of ways. For example, the second path pair may be calculated in a manner known to those skilled in the art, as long as the second primary path and the second backup path of the second path pair of each service are completely separated; or the method proposed in the embodiment of the present application (the specific calculation method is described below) may be used for calculation. These achievable calculation methods are all within the protection scope of the embodiments of the present application.

[0055] It should be noted that although many methods can calculate the second path pair including a completely separated second main path and a second backup path, not every method can calculate the first path pair so that any link in the entire network satisfies the main path constraint condition. Therefore, in the subsequent process, it is necessary to determine whether any link in the entire network satisfies the main path constraint condition.

[0056] Step 201: If any link in the entire network satisfies the main path constraint condition and there is at least one link that does not satisfy the backup path constraint condition, adjust the second backup path corresponding to at least one service of the second backup path passing through the target link so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition, and use the adjusted second path pair as the first path pair; wherein the target link is a link that does not satisfy the backup path constraint condition.

[0057] In some exemplary embodiments, if there is at least one link that does not satisfy the main path constraint condition, it means there is no solution, and the process is directly terminated.

[0058] In some exemplary embodiments, in order to ensure that any link in the entire network satisfies the main path constraint conditions and the backup path constraint conditions, the second backup path corresponding to at least one service of the second backup path passing through the target link can be adjusted once or more. If after one adjustment, there is still at least one link that does not satisfy the backup path constraint conditions, the second backup path corresponding to at least one service of the second backup path passing through the target link continues to be adjusted until any link in the entire network satisfies the main path constraint conditions and the backup path constraint conditions, or the program running time is greater than or equal to the preset time threshold, and the second path pair after the last adjustment is output as the first path pair.

[0059] It should be noted that, although the first path pair output after the last adjustment when the corresponding program running time is greater than or equal to the preset time threshold only meets the main path constraint condition but not the backup path constraint condition, in this case, only individual links of the second path pair output after the last adjustment will be congested, which is acceptable in practical applications as long as the congestion level is within an acceptable range.

[0060] In some exemplary embodiments, adjusting the second backup path corresponding to at least one service passing through the target link on the second backup path includes:

[0061] Cut off the second backup path of at least one service other than the second target service among the services passing through the target link on the second backup path, so that the target link satisfies the backup path constraint condition; wherein the second target service is a service that cannot be cut off the second backup path;

[0062] For each service whose second backup path is cut off, the cut off second backup path is used as a must-avoid constraint to calculate a new first backup path.

[0063] In some exemplary embodiments, the second backup path of the service may be cut in a variety of ways.

[0064] For example, you can first filter out the services whose second backup paths pass through the target link, and then cut the second backup paths of the filtered services one by one. Each time you cut the second backup path of a service, determine whether the target link meets the backup path constraint. If the target link does not meet the backup path constraint, continue to cut the second backup path of the next service until the target link meets the backup path constraint. If the target link meets the backup path constraint, calculate a new second backup path for each service whose second backup path is cut. Specifically, when cutting the second backup paths of the services one by one, you can cut them according to the order of the service numbers, or according to the length of the second backup paths of the services, or according to other orders of the services.

[0065] For another example, all services that need to be cut off the second backup path can be directly screened out so that the target link meets the backup path constraint condition, and then the second backup path of all screened services can be cut off at one time. Specifically, when screening all services that need to be cut off the second backup path, the second peak flow of the target link can be subtracted from the sum of the peak flows of all services whose second backup paths are cut off to determine whether the obtained difference is less than or equal to the second preset threshold. If the obtained difference is less than or equal to the second preset threshold, the services involved in the calculation are screened out; if the obtained difference is greater than the second preset threshold, other services are continuously screened until the obtained difference is less than or equal to the second preset threshold.

[0066] Of course, other cutting methods may also be used. The specific cutting method is not used to limit the protection scope of the embodiments of the present application and will not be described in detail here.

[0067] In some exemplary embodiments, adjusting the second backup path corresponding to at least one service passing through the target link on the second backup path further includes:

[0068] If calculating a new second backup path for a certain service fails, the second backup path of the certain service is restored to the pruned second backup path, and the certain service is added to the second target service;

[0069] Re-execute the second backup path of at least one service other than the second target service among the services passing through the target link through the second backup path, so that the target link satisfies the backup path constraint condition.

[0070] In an embodiment of the present application, when calculating a new second backup path for each service whose second backup path is cut, treating the cut second backup path as a must-avoid path means that the calculated new second backup path and the second backup path as a must-avoid path should belong to the same service. For example, the cut second backup path of service 1 is path 1, and the new second backup path of service 1 is path 2; the cut second backup path of service 2 is path 3, and the new second backup path of service 2 is path 4; then, when calculating path 2, only path 1 is used as a must-avoid path, and path 3 is not used as a must-avoid path; similarly, when calculating path 4, only path 3 is used as a must-avoid path, and path 1 is not used as a must-avoid path. The same applies to other situations, which will not be elaborated here.

[0071] In an embodiment of the present application, when a new second backup path is calculated for each service of the second backup path that has been cut off, the second backup path that has been cut off is used as a must-avoid path, avoiding recalculation on the second backup path that has been cut off, thereby improving optimization efficiency and reducing the risk of entering an infinite loop.

[0072] The traffic optimization method provided in the embodiment of the present application calculates a first path pair including a completely separated first main path and a first backup path for each service, so that when any one or more links in the entire network fail, the affected services can be instantly switched to the main and backup paths, thus achieving the real-time nature of the path switching; and any link in the entire network satisfies the main path constraint condition and the backup path constraint condition. The main path constraint condition is that when each service in the entire network works on the first main path, the first peak flow of any link is less than or equal to the first preset threshold value, and it is considered that the first main path achieves network load balancing; the backup path constraint condition is that when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of a link on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold value, and it is considered that the first backup path satisfies the network load balancing as much as possible, thereby achieving that when any one or more links in the entire network fail, the affected services can be switched to a backup path with better quality, that is, a backup path that still satisfies the network load balancing, that is, the path quality guarantee of the path switching is achieved; in summary, the traffic optimization method provided in the embodiment of the present application takes into account both the real-time nature of the path switching and the guarantee of the path quality.

[0073] In some exemplary embodiments, Figure 3 As shown, calculating the second path pair for each service includes:

[0074] Step 300, obtain M first chromosome individuals; wherein a gene position in the first chromosome individual includes: a third path pair of a business, the third path pair includes: a completely separated third main path and a third backup path; M is an integer greater than or equal to 1 and less than or equal to a third preset threshold.

[0075] In some exemplary embodiments, the third preset threshold may be set arbitrarily according to actual conditions, for example, it may be set to 300.

[0076] In some exemplary embodiments, in the first iteration cycle, obtaining M first chromosome individuals includes:

[0077] Generate an initial chromosome individual; wherein a gene position in the initial chromosome individual includes: a fourth path pair of a business, and the fourth path pair includes: a completely separated fourth main path and a fourth backup path;

[0078] Calculate the fitness of each initial chromosome individual separately;

[0079] The initial chromosome individuals are sorted according to their fitness, and the first M initial chromosome individuals are selected as the M first chromosome individuals.

[0080] In some exemplary embodiments, in the initial state, only one initial chromosome individual may be generated, or two or more initial chromosome individuals may be generated, which is not limited in the embodiments of the present application.

[0081] If the number of initial chromosome individuals generated is less than or equal to the third preset threshold, M is equal to the number of initial chromosome individuals generated; if the number of initial chromosome individuals generated is greater than the third preset threshold, M is equal to the third preset threshold.

[0082] It should be noted that when generating the initial chromosome individuals, the fourth main path calculated for the business should meet the constraints of the business itself, such as must-pass nodes, must-avoid nodes, delay, etc.

[0083] In some exemplary embodiments, the fourth path pair can be calculated for each business in a random order, and the dijkstra algorithm can be used to calculate the fourth path pair for each business, and then the calculated fourth path pair is filled in the gene position corresponding to the business; for the business that fails to calculate the fourth path pair, a predetermined special character (such as null) is filled in the gene position corresponding to the business as the initial chromosome individual.

[0084] In some exemplary embodiments, in the second or subsequent iteration cycles, obtaining M first chromosome individuals includes:

[0085] Calculate the fitness of each first chromosome individual in the previous iteration, and calculate the fitness of each second chromosome individual in the previous iteration;

[0086] All first chromosome individuals and second chromosome individuals of the previous iteration are sorted according to fitness, and the top M chromosome individuals are selected as the M first chromosome individuals of the next iteration.

[0087] It should be noted that if the total number of all first chromosome individuals and second chromosome individuals in the previous round of iteration is less than or equal to the third preset threshold, then M is equal to the total number of all first chromosome individuals and second chromosome individuals in the previous round of iteration; if the total number of all first chromosome individuals and second chromosome individuals in the previous round of iteration is greater than the third preset threshold, then M is equal to the third preset threshold.

[0088] Step 301: Perform predetermined processing on M first chromosome individuals to obtain N second chromosome individuals; wherein the predetermined processing includes: mutation; or crossover and mutation; N is an integer greater than or equal to 1.

[0089] In some exemplary embodiments, performing predetermined processing on M first chromosome individuals to obtain N second chromosome individuals includes:

[0090] When M is equal to 1, the M first chromosome individuals are mutated to obtain N second chromosome individuals;

[0091] When M is greater than 1 and less than or equal to the third preset threshold, the M first chromosomes are crossed to obtain N1 crossover chromosome individuals, and the M first chromosomes are mutated to obtain N2 mutated chromosome individuals. The N1 crossover chromosome individuals and the N2 mutated chromosome individuals are N second chromosome individuals; wherein N1 and N2 are both integers greater than or equal to 1.

[0092] In some exemplary embodiments, mutating M first chromosome individuals to obtain N second chromosome individuals includes:

[0093] For each first chromosome individual, obtain the mutation probability of each gene position of the first chromosome individual;

[0094] If the mutation probability of a certain gene position is greater than or equal to a fourth preset threshold, recalculate the third path pair for the service corresponding to the certain gene position, and use the recalculated third path pair as the path pair of a certain gene position in the second chromosome individual;

[0095] If the mutation probability of a certain gene position is less than a fourth preset threshold, the third path pair of a certain gene position in the first chromosome individual is used as the path pair of a certain gene position in the second chromosome individual.

[0096] In some exemplary embodiments, respectively obtaining the mutation probability of each gene position of the first chromosome individual includes:

[0097] For each gene position of the first chromosome individual, the first peak flow of each link on the third main path of the gene position is calculated respectively, and the maximum value of the first peak flows of all links is taken as the mutation probability of the gene position.

[0098] In an embodiment of the present application, the maximum value of the first peak flow of all links on the third main path of the gene position is used as the mutation probability of the gene position, and when the mutation probability is greater than or equal to the fourth preset threshold, the third path pair is recalculated. That is to say, if the maximum value of the first peak flow of all links on the third main path is greater than or equal to the fourth preset threshold, it is considered that the probability of congestion on the third main path is relatively high, and the third path pair needs to be recalculated to seek a possible better solution.

[0099] In some exemplary embodiments, performing crossover on M first chromosome individuals to obtain N1 crossover chromosome individuals includes:

[0100] For any two first chromosome individuals, the advantages and disadvantages of each gene position in the two first chromosome individuals are compared respectively, and the third path pair of the more superior gene position is used as the path pair of the gene position of the crossover chromosome individual.

[0101] In some exemplary embodiments, comparing the pros and cons of each gene position in two first chromosome individuals comprises:

[0102] For each gene position, the first peak flow of each link on the third main path of the gene positions in the two first chromosome individuals is calculated respectively. The gene position of the first chromosome individual with a higher maximum value among the first peak flows of all links is the suboptimal gene position, and the gene position of the first chromosome individual with a lower maximum value among the first peak flows of all links is the more optimal gene position.

[0103] In the embodiment of the present application, the advantages and disadvantages of the gene positions are compared based on the maximum value of the first peak flow of all links on the third main path of the gene position, and the gene position with a higher maximum value of the first peak flow of all links on the third main path is considered to be a suboptimal gene position, and the gene position with a lower maximum value of the first peak flow of all links on the third main path is considered to be a more optimal gene position, thereby ensuring that each gene position in the cross-chromosome individual comes from a more optimal gene position, that is, each gene position is a more optimal solution.

[0104] It should be noted that the purpose of crossover and mutation of chromosome individuals is to seek better chromosome individuals.

[0105] Step 302: Select the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals, and determine whether the convergence condition is met; if the convergence condition is met, use the path pair of each gene position in the best chromosome individual as the second path pair of the service corresponding to the gene position.

[0106] In some exemplary embodiments, selecting the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals comprises:

[0107] Among the M first chromosome individuals and the N second chromosome individuals, the chromosome individual that meets the preset conditions is taken as the optimal chromosome individual;

[0108] The preset conditions include: the average peak flow of the entire network is the smallest; or the first peak flow of the link with the largest first peak flow is the smallest.

[0109] In some exemplary embodiments, selecting the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals comprises:

[0110] The chromosome individuals whose gene position is at least one of the predetermined special characters in the M first chromosome individuals and the N second chromosome individuals are eliminated, and the chromosome individuals that meet the preset conditions are selected from the remaining chromosome individuals as the optimal chromosome individuals.

[0111] In some exemplary embodiments, the average peak flow of the entire network can be obtained by calculating the first peak flow of each link separately when the main path of each gene position in the chromosome individual is used as the working path of the corresponding service, and then taking the average of the first peak flows of all links.

[0112] In some exemplary embodiments, the chromosome individual with the smallest first peak flow of the link with the largest first peak flow refers to, when the main path of each gene position in the chromosome individual is used as the working path of the corresponding business, the first peak flow of each link is calculated separately, and the maximum value of the first peak flows of all links is taken, and the chromosome individual with the smallest maximum value is obtained.

[0113] In some exemplary embodiments, when the convergence conditions are met, it is possible to first determine whether the optimal chromosome individual is a feasible solution. If the optimal chromosome individual is a feasible solution, the path pair of each gene position in the optimal chromosome individual is used as the second path pair of the business corresponding to the gene position; if the optimal chromosome individual is not a feasible solution, the process is terminated.

[0114] In some exemplary embodiments, the criterion for determining whether the optimal chromosome individual is a feasible solution is that when the bandwidth of each link is allocated according to the main path of each gene position in the optimal chromosome individual, the bandwidth of each link will not be insufficient. That is, for each link, if the sum of the bandwidths required by the main paths of all services passing through the link is greater than the maximum bandwidth of the link, it means that the link bandwidth will be insufficient; if the sum of the bandwidths required by the main paths of all services passing through the link is less than or equal to the maximum bandwidth of the link, it means that the link bandwidth will not be insufficient.

[0115] In some exemplary embodiments, respectively calculating the second path pair for each service further includes:

[0116] If the convergence condition is not met, M first chromosome individuals are re-obtained, and the step of performing predetermined processing on the M first chromosome individuals to obtain N second chromosome individuals is continued until the convergence condition is met.

[0117] In some exemplary embodiments, the convergence condition includes: the optimal chromosome individuals obtained from multiple consecutive iterations are the same; or the number of iterations is greater than or equal to a preset number.

[0118] In the embodiment of the present application, the second path pair is calculated for each business based on the genetic algorithm. Since the better chromosome individual is obtained based on the first peak flow of the link during the crossover and mutation process, the optimal chromosome individual finally outputted makes the first peak flow of each link in the whole network as small as possible, so that the output optimal chromosome individual satisfies the main path constraint condition as much as possible, that is, the network load balancing is achieved as much as possible. At the same time, it also means that if the output optimal chromosome individual cannot meet the main path constraint condition, it means that there is no solution under the current conditions, that is, the optimal solution cannot be found.

[0119] In a second aspect, an embodiment of the present application provides an electronic device, including:

[0120] at least one processor;

[0121] A memory, wherein at least one program is stored in the memory. When the at least one program is executed by at least one processor, the at least one processor implements any one of the above-mentioned traffic optimization methods.

[0122] Among them, the processor is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH).

[0123] In some embodiments, the processor and the memory are connected to each other through a bus, and further connected to other components of the computing device.

[0124] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the above-mentioned traffic optimization methods is implemented.

[0125] Figure 4 A block diagram of the composition of a traffic optimization device provided in another embodiment of the present application.

[0126] Fourthly, refer to Figure 4 Another embodiment of the present application provides a traffic optimization device, including:

[0127] The path calculation module 401 is used to calculate the first path pair for each service respectively, so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition; wherein the first path pair includes: a completely separated first main path and a first backup path; the main path constraint condition includes: when the working path of each service in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to the first preset threshold; the backup path constraint condition includes: when one or more services in the entire network switch the working path to the corresponding first backup path due to a failure of the link on the corresponding first main path, the second peak flow of the link is less than or equal to the second preset threshold.

[0128] In some exemplary embodiments, the first peak flow of the link is the sum of the peak flows of all first target services; wherein the first target services are services passing through the link on the first main path.

[0129] In some exemplary embodiments, the second peak flow of the link is the sum of the peak flows of all first target services plus the sum of the peak flows of X target service groups; wherein the peak flow of the target service group is the sum of the peak flows of all services included in the target service group; X is the maximum number of links that have failed;

[0130] The first target service is the service passing through the link on the first primary path, and the X target service groups are the X service groups with the largest peak traffic among all service groups obtained by dividing all services passing through the link on the first backup path;

[0131] Among all the services passing through the link on the first backup path, the services overlapping with the first main path are divided into the same service group.

[0132] In some exemplary embodiments, the path calculation module 401 is specifically configured to:

[0133] Calculate a second path pair for each service respectively; wherein the second path pair includes: a completely separated second main path and a second backup path;

[0134] The flow optimization device also includes:

[0135] The constraint verification module 402 is used to determine whether any link in the entire network satisfies the primary path constraint condition and the backup path constraint condition;

[0136] The backup path adjustment module 403 is used to adjust the second backup path corresponding to at least one service of the second backup path passing through the target link if any link in the entire network satisfies the main path constraint condition and there is at least one link that does not satisfy the backup path constraint condition, so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition, and the adjusted second path pair is used as the first path pair; wherein the target link is a link that does not satisfy the backup path constraint condition.

[0137] In some exemplary embodiments, the path calculation module 401 is specifically configured to:

[0138] Obtain M first chromosome individuals; wherein a gene position in the first chromosome individual includes: a third path pair of a service, the third path pair includes: a completely separated third main path and a third backup path; M is an integer greater than or equal to 1 and less than or equal to a third preset threshold;

[0139] Performing predetermined processing on the M first chromosome individuals to obtain N second chromosome individuals; wherein the predetermined processing includes: mutation; or crossover and mutation; N is an integer greater than or equal to 1;

[0140] The best chromosome individual is selected from the M first chromosome individuals and the N second chromosome individuals to determine whether the convergence condition is met; if the convergence condition is met, the path pair of each gene position in the best chromosome individual is used as the first path pair of the business corresponding to the gene position.

[0141] In some exemplary embodiments, the path calculation module 401 is further configured to:

[0142] If the convergence condition is not met, M first chromosome individuals are re-obtained, and the step of performing predetermined processing on the M first chromosome individuals to obtain N second chromosome individuals is continued until the convergence condition is met.

[0143] In some exemplary embodiments, the path calculation module 401 is specifically used to implement the following method to perform predetermined processing on M first chromosome individuals to obtain N second chromosome individuals:

[0144] When M is equal to 1, the M first chromosome individuals are mutated to obtain N second chromosome individuals;

[0145] When M is greater than 1 and less than or equal to the third preset threshold, the M first chromosomes are crossed to obtain N1 crossover chromosome individuals, and the M first chromosomes are mutated to obtain N2 mutated chromosome individuals. The N1 crossover chromosome individuals and the N2 mutated chromosome individuals are N second chromosome individuals; wherein N1 and N2 are both integers greater than or equal to 1.

[0146] In some exemplary embodiments, the path calculation module 401 is specifically used to implement the following method to mutate M first chromosome individuals to obtain N second chromosome individuals:

[0147] For each first chromosome individual, obtain the mutation probability of each gene position of the first chromosome individual;

[0148] If the mutation probability of a certain gene position is greater than or equal to a fourth preset threshold, recalculate the third path pair for the service corresponding to the certain gene position, and use the recalculated third path pair as the path pair of a certain gene position in the second chromosome individual;

[0149] If the mutation probability of a certain gene position is less than a fourth preset threshold, the third path pair of a certain gene position in the first chromosome individual is used as the path pair of a certain gene position in the second chromosome individual.

[0150] In some exemplary embodiments, the path calculation module 401 is specifically used to respectively obtain the mutation probability of each gene position of the first chromosome individual in the following manner:

[0151] For each gene position of the first chromosome individual, the first peak flow of each link on the third main path of the gene position is calculated respectively, and the maximum value of the first peak flows of all links is taken as the mutation probability of the gene position.

[0152] In some exemplary embodiments, the path calculation module 401 is specifically configured to implement the following method to crossover M first chromosome individuals to obtain N1 crossover chromosome individuals:

[0153] For any two first chromosome individuals, the advantages and disadvantages of each gene position in the two first chromosome individuals are compared respectively, and the third path pair of the more superior gene position is used as the path pair of the gene position of the crossover chromosome individual.

[0154] In some exemplary embodiments, the path calculation module 401 is specifically used to implement the comparison of the pros and cons of each gene position in the two first chromosome individuals in the following manner:

[0155] For each gene position, the first peak flow of each link on the third main path of the gene positions in the two first chromosome individuals is calculated respectively. The gene position of the first chromosome individual with a higher maximum value among the first peak flows of all links is the suboptimal gene position, and the gene position of the first chromosome individual with a lower maximum value among the first peak flows of all links is the more optimal gene position.

[0156] In some exemplary embodiments, the path calculation module 401 is specifically used to select the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals in the following manner:

[0157] Among the M first chromosome individuals and the N second chromosome individuals, the chromosome individual that meets the preset conditions is taken as the optimal chromosome individual;

[0158] The preset conditions include: the average peak flow of the entire network is the smallest; or the first peak flow of the link with the largest first peak flow is the smallest.

[0159] In some exemplary embodiments, the backup path adjustment module 403 is specifically configured to adjust the second backup path corresponding to at least one service passing through the target link on the second backup path in the following manner:

[0160] Cut off the second backup path of at least one service other than the second target service among the services passing through the target link on the second backup path, so that the target link satisfies the backup path constraint condition; wherein the second target service is a service that cannot be cut off the second backup path;

[0161] The path calculation module 401 is also used for:

[0162] For each service whose second backup path is pruned, the pruned second backup path is used as a must-avoid constraint to calculate a new second backup path.

[0163] In some exemplary embodiments, the backup path adjustment module 403 is further configured to:

[0164] If calculating a new second backup path for a certain service fails, the second backup path of the certain service is restored to the pruned second backup path, and the certain service is added to the second target service;

[0165] Re-execute the second backup path of at least one service other than the second target service among the services passing through the target link through the second backup path, so that the target link satisfies the backup path constraint condition.

[0166] The specific implementation process of the above-mentioned traffic optimization device is the same as the specific implementation process of the traffic optimization method in the aforementioned embodiment, which will not be repeated here.

[0167] Several examples are listed below to illustrate in detail the specific implementation process and specific application scenarios of the above-mentioned traffic optimization method. The examples listed are only for the convenience of explanation and are not intended to limit the protection scope of the embodiments of the present application.

[0168] Example 1

[0169] This example describes the process of using a genetic algorithm to calculate the first path pair for each service, such as Figure 5 As shown, including:

[0170] Step 500: Generate initial chromosome individuals.

[0171] In this step, a gene position in the initial chromosome individual includes: a fourth path pair of a business, and the fourth path pair includes: a completely separated fourth main path and a fourth backup path.

[0172] In this step, when generating the initial chromosome individuals, the fourth main path calculated for the business should meet the constraints of the business itself, such as must-pass nodes, must-avoid nodes, delay, etc.

[0173] Step 501: Calculate the fitness of each chromosome individual.

[0174] In this step, in the first iteration cycle, the fitness of each initial chromosome individual needs to be calculated separately; in the second or subsequent iteration cycles, the fitness of each first chromosome individual and second chromosome individual of the previous iteration needs to be calculated.

[0175] Step 502: According to the fitness of the chromosome individuals, the top M chromosome individuals are selected as the M first chromosome individuals.

[0176] In this step, in the first iteration cycle, if the number of initial chromosome individuals generated is less than or equal to the third preset threshold, then M is equal to the number of initial chromosome individuals generated; if the number of initial chromosome individuals generated is greater than the third preset threshold, then M is equal to the third preset threshold.

[0177] In the second or subsequent iteration cycles, if the total number of all first chromosome individuals and second chromosome individuals in the previous iteration is less than or equal to the third preset threshold, then M is equal to the total number of all first chromosome individuals and second chromosome individuals in the previous iteration; if the total number of all first chromosome individuals and second chromosome individuals in the previous iteration is greater than the third preset threshold, then M is equal to the third preset threshold.

[0178] That is to say, in this step, the maximum number of chromosome individuals screened out is the third preset threshold.

[0179] Step 503, determine whether M is equal to 1. When M is equal to 1, execute step 404; when M is greater than 1 and less than or equal to the third preset threshold, execute step 505.

[0180] Step 504 , mutate the M first chromosome individuals to obtain N second chromosome individuals; proceed to step 506 .

[0181] Step 505, cross the M first chromosomes to obtain N1 crossover chromosome individuals, mutate the M first chromosomes to obtain N2 mutated chromosome individuals, the N1 crossover chromosome individuals and the N2 mutated chromosome individuals are N second chromosome individuals; wherein N1 and N2 are both integers greater than or equal to 1; proceed to step 506.

[0182] Step 506: Select the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals.

[0183] Step 507 , determine whether the convergence condition is met; if the convergence condition is met, execute step 508 ; if the convergence condition is not met, return to step 501 .

[0184] Step 508: Use the path pair of each gene position in the optimal chromosome individual as the second path pair of the service corresponding to the gene position.

[0185] Example 2

[0186] This example describes the adjustment process of the backup path. Figure 6 As shown, including:

[0187] Step 600: Filter out links that do not meet the backup path constraint conditions as target links.

[0188] Step 601: Select a target link and filter out services on the second backup path that pass through the selected target link.

[0189] Step 602 , determining whether the screened services include a second target service, wherein the second target service is a service that cannot be cut off the second backup path; if yes, executing step 603 ; if no, executing step 604 .

[0190] Step 603 , trim one of the screened services except the second target service; and continue to execute step 605 .

[0191] Step 604 , cut out one of the screened services; and continue to execute step 605 .

[0192] Step 605 , determine whether the target link meets the backup path constraint condition, if yes, execute step 606 , if no, return to step 602 .

[0193] Step 606: For each service whose second backup path is pruned, a new second backup path is calculated by taking the pruned second backup path as a necessary constraint condition.

[0194] Step 607 : Whether all services of the pruned second backup path are calculated successfully, if yes, execute step 609 ; if no, execute step 608 .

[0195] Step 608 : restore the second backup path of the service that failed to be calculated to the pruned second backup path, add the service that failed to be calculated to the second target service, and return to step 602 .

[0196] Step 609: Check whether all target links have been processed. If so, end this process; if not, return to step 601.

[0197] Example 3

[0198] This example describes the traffic optimization process, as shown in 7, including:

[0199] Step 700: Calculate a second path pair for each service respectively; wherein the second path pair includes: a completely separated second main path and a second backup path.

[0200] Step 701: determine whether any link in the entire network satisfies the primary path constraint condition. If yes, execute step 702; if not, end this process.

[0201] Step 702 , determine whether any link in the entire network satisfies the backup path constraint condition, if yes, execute step 703 ; if no, execute step 704 .

[0202] Step 703: Output the second path pair after the last adjustment.

[0203] Step 704: adjust the second backup path corresponding to at least one service of the target link through the second backup path; wherein the target link is a link that does not meet the backup path constraint condition; and return to step 702.

[0204] Example 4

[0205] The traffic optimization method of the embodiment of the present application can be applied to a variety of scenarios, such as network traffic engineering, fault fast rerouting, fault simulation, etc. Figure 8 An application example of the traffic optimization method is given by taking a network controller as an example. Figure 8As shown, the traffic optimization method in the embodiment of the present application belongs to a sub-algorithm in the algorithm library. The network controller identifies network congestion by receiving messages or active queries from network devices, and solves network congestion by calling the path computation element (PCE); the PCE obtains the service information stored in the topology management module and the database, and calls the algorithm interface corresponding to the traffic optimization method in the embodiment of the present application in the algorithm library to complete network traffic optimization.

[0206] Specifically, Fig. 9 As shown in FIG. 1 , the traffic optimization and path switching process includes:

[0207] Step 900: When network congestion occurs, the network controller receives a congestion message from a device or identifies a congestion risk, and calls the algorithm corresponding to the traffic optimization method of an embodiment of the present application to calculate a first path pair for the service that satisfies the service's own constraints, the main path constraints, and the backup path constraints.

[0208] Step 901: After the service is switched to the new primary path, network congestion disappears and all services are carried on a path with higher quality.

[0209] Step 902: When a network failure occurs, after the network controller receives the failure message, it does not need to call any path calculation algorithm and can directly switch the primary and backup paths for the service based on the previously calculated backup path. After the switch, the network is still load balanced and the service is still carried on a higher quality path.

[0210] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0211] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present application as set forth in the appended claims.

Claims

1. A traffic optimization method, comprising: Calculate the first path pair for each service respectively, so that any link in the entire network satisfies the primary path constraint condition and the backup path constraint condition; Wherein, the first path pair includes: a first main path and a first backup path that are completely separated; The main path constraint condition includes: when the working path of each of the services in the entire network is the corresponding first main path, the first peak flow of the link is less than or equal to a first preset threshold; The backup path constraint condition includes: when one or more of the services in the entire network switches the working path to the corresponding first backup path due to a failure of a link on the corresponding first primary path, the second peak flow of the link is less than or equal to a second preset threshold; The first peak flow of the link is the sum of the peak flows of all first target services; wherein the first target service is the service of the first main path passing through the link; The second peak flow of the link is the sum of the peak flows of all first target services plus the sum of the peak flows of X target service groups; wherein the peak flow of the target service group is the sum of the peak flows of all services included in the target service group; and X is the maximum number of links that have failed; The first target service is the service on the first primary path passing through the link, and the X target service groups are the X service groups with the largest peak traffic among all service groups obtained by dividing all services on the first backup path passing through the link; Among all the services passing through the link on the first backup path, services overlapping with the first primary path are divided into the same service group.

2. The traffic optimization method according to claim 1, wherein: The calculating of the first path pair for each service respectively comprises: Calculate a second path pair for each of the services respectively; wherein the second path pair includes: a completely separated second main path and a second backup path; If any link in the entire network satisfies the main path constraint condition, and there is at least one link that does not satisfy the backup path constraint condition, adjust the second backup path corresponding to at least one of the services of the second backup path passing through the target link, so that any link in the entire network satisfies the main path constraint condition and the backup path constraint condition, and use the adjusted second path pair as the first path pair; wherein the target link is the link that does not satisfy the backup path constraint condition.

3. The traffic optimization method according to claim 2, wherein: The calculating of the second path pair for each service respectively comprises: Acquire M first chromosome individuals; wherein a gene position in the first chromosome individual includes: a third path pair of the service, the third path pair includes: a completely separated third main path and a third backup path; M is an integer greater than or equal to 1 and less than or equal to a third preset threshold; Performing predetermined processing on the M first chromosome individuals to obtain N second chromosome individuals; wherein the predetermined processing includes: mutation; or crossover and mutation; N is an integer greater than or equal to 1; Select the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals, and determine whether the convergence condition is met; if the convergence condition is met, use the path pair of each gene position in the best chromosome individual as the second path pair of the business corresponding to the gene position.

4. The traffic optimization method according to claim 3, wherein: The method of performing predetermined processing on the M first chromosome individuals to obtain the N second chromosome individuals comprises: When M is equal to 1, the M first chromosome individuals are mutated to obtain N second chromosome individuals; When M is greater than 1 and less than or equal to the third preset threshold, the M first chromosomes are crossed to obtain N1 crossover chromosome individuals, and the M first chromosomes are mutated to obtain N2 mutated chromosome individuals, and the N1 crossover chromosome individuals and the N2 mutated chromosome individuals are N second chromosome individuals; wherein N1 and N2 are both integers greater than or equal to 1.

5. The traffic optimization method according to claim 4, wherein: The step of mutating the M first chromosome individuals to obtain the N second chromosome individuals comprises: For each of the first chromosome individuals, respectively obtain the mutation probability of each of the gene positions of the first chromosome individual; If the mutation probability of a certain gene position is greater than or equal to a fourth preset threshold, recalculate the third path pair for the service corresponding to the certain gene position, and use the recalculated third path pair as the path pair of the certain gene position in the second chromosome individual; If the mutation probability of the certain gene position is less than the fourth preset threshold, the third path pair of the certain gene position in the first chromosome individual is used as the path pair of the certain gene position in the second chromosome individual.

6. The traffic optimization method according to claim 5, wherein: The step of respectively obtaining the mutation probability of each gene position of the first chromosome individual comprises: For each gene position of the first chromosome individual, the first peak flow of each link on the third main path of the gene position is calculated respectively, and the maximum value of the first peak flows of all the links is taken as the mutation probability of the gene position.

7. The traffic optimization method according to claim 4, wherein: The method of performing crossover on M first chromosome individuals to obtain N1 crossover chromosome individuals comprises: For any two of the first chromosome individuals, the advantages and disadvantages of each gene position in the two first chromosome individuals are compared respectively, and the second path pair of the better gene position is used as the path pair of the gene position of the crossover chromosome individual.

8. The traffic optimization method according to claim 7, wherein: The step of comparing the pros and cons of each gene position in the two first chromosome individuals comprises: For each of the gene positions, the first peak flow of each of the links on the third main path of the gene positions in the two first chromosome individuals is calculated respectively, the gene position of the first chromosome individual with a higher maximum value among the first peak flows of all the links is the suboptimal gene position, and the gene position of the first chromosome individual with a lower maximum value among the first peak flows of all the links is the more optimal gene position.

9. The traffic optimization method according to claim 3, wherein: The selecting the best chromosome individual from the M first chromosome individuals and the N second chromosome individuals comprises: Among the M first chromosome individuals and the N second chromosome individuals, the chromosome individual that meets the preset conditions is used as the optimal chromosome individual; The preset conditions include: the average peak flow of the entire network is the smallest; or the first peak flow of the link with the largest first peak flow is the smallest.

10. The traffic optimization method according to claim 2, wherein: The step of adjusting the second backup path corresponding to at least one service of the first backup path passing through the target link includes: Cut off the second backup path of at least one service other than the second target service among the services passing through the target link through the second backup path, so that the target link satisfies the backup path constraint condition; wherein the second target service is a service that cannot be cut off the second backup path; For each of the services whose second backup paths are cut off, the cut off second backup paths are used as necessary constraints to calculate new first backup paths.

11. The traffic optimization method according to claim 10, wherein the adjusting the second backup path corresponding to at least one service passing through the target link further comprises: If calculation of the new second backup path for a certain service fails, restoring the second backup path of the certain service to the pruned second backup path, and adding the certain service to the second target service; Re-execute the second backup path of cutting off at least one service other than the second target service among the services passing through the target link on the second backup path, so that the target link satisfies the backup path constraint condition.

12. An electronic device comprising: at least one processor; A memory, wherein at least one program is stored in the memory, and when the at least one program is executed by the at least one processor, the at least one processor implements the traffic optimization method according to any one of claims 1-11.

13. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the traffic optimization method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Genetic algorithm-based alternate route configuration method and system

    CN108494678A

  • Power grid wide area control service communication path selection method, and server

    CN108833271A