CN114745322B - Video flow routing method based on genetic algorithm in SDN environment - Google Patents
Video flow routing method based on genetic algorithm in SDN environment Download PDFInfo
- Publication number
- CN114745322B CN114745322B CN202210301100.2A CN202210301100A CN114745322B CN 114745322 B CN114745322 B CN 114745322B CN 202210301100 A CN202210301100 A CN 202210301100A CN 114745322 B CN114745322 B CN 114745322B
- Authority
- CN
- China
- Prior art keywords
- paths
- path
- population
- fitness
- individuals
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/122—Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/30—Routing of multiclass traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
- H04L45/306—Route determination based on the nature of the carried application
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/38—Flow based routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/50—Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Theoretical Computer Science (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Genetics & Genomics (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Physiology (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application provides a video stream routing method based on a genetic algorithm in an SDN environment, which has the technical key points that: extracting message header information after the received initial message data is a routing request so as to obtain source and destination switch information and application layer protocol types; judging whether the initial message data is video streaming media or not according to the source and destination exchanger information and the application layer protocol type, if not, obtaining a first transmission path by Dijstra calculation to guide transmission, and if so, obtaining a service data stream; if the video streaming media is the video streaming media, a genetic algorithm is used for obtaining a second transmission path between the source and the destination, and the second transmission path is issued to the corresponding switch so as to guide the transmission of the video streaming media; when the first transmission path or the second transmission path is blocked, a genetic algorithm is used for re-planning the paths so as to guide transmission. At least the transmission performance problem of the streaming media service in the related technology is solved, thereby further improving the video service quality.
Description
Technical Field
The application relates to the technical field of Internet, in particular to a video stream routing method based on a genetic algorithm in an SDN environment.
Background
The rise and rapid development of internet technology has promoted the development of video services, and people's life and work are constantly being changed by a series of streaming media video applications such as live video, video on demand, video conferencing, and surveillance video. With the upgrade and innovation of network technology, more and more service flow data will be provided on the internet, and the application of streaming media will gradually occupy the half-wall river mountain of the network traffic, and if a better video viewing effect is desired, sufficient network bandwidth, low delay and low packet loss rate need to be ensured in the video transmission process, but the conventional network has great limitation to meet the transmission requirements of various videos, and resources cannot be provided limitlessly. The service has very strict QoS requirement, but the traditional network architecture at present has a plurality of defects, and the transmission of the streaming media service can not be completely satisfied, so that the transmission performance of the streaming media service is poor.
In the related art, aiming at the dilemma of video streaming media in network transmission, the IETF proposes a lot of service quality mechanisms and models to try to solve the problem, but the mechanisms and models are built on a distributed network architecture, so that global network state information is difficult to collect, so that the situation that a data transmission strategy cannot be changed in time often occurs, the service quality of the video streaming media cannot be effectively ensured, and when a large number of data requests are overlapped, a transmission path is easy to become congested, so that the transmitted video data can reach an opposite end only after a long time or can be directly discarded due to the overlong congestion time, and the service quality of the video is seriously affected.
Based on the above technical requirements, how to improve the transmission performance of the streaming media service and improve the video service quality is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a video stream routing method based on a genetic algorithm in an SDN environment, which at least solves the transmission performance problem of streaming media service in the related technology, thereby further improving the video service quality.
In one embodiment of the present application, a method for routing a video stream based on a genetic algorithm in an SDN environment is provided, where the method includes:
receiving initial message data, obtaining effective data in the initial message data, extracting message header information of the initial message data after judging that the initial message data is a routing request, and analyzing the message header information to obtain source and destination exchanger information and application layer protocol types;
judging whether the initial message data is video streaming media according to the source and destination exchanger information and the application layer protocol type, if not, obtaining a first transmission path through Dijstra calculation, and transmitting the first transmission path to a corresponding exchanger to guide the transmission of the service data stream;
if the video streaming media is the video streaming media, a genetic algorithm is used for obtaining a second transmission path between the source and the destination, and the second transmission path is issued to the corresponding switch so as to guide the transmission of the video streaming media;
when the first transmission path or the second transmission path is blocked, a genetic algorithm is used for re-planning the paths, and when the re-planned new path is different from the old path, the new path is used for issuing the new path to a corresponding switch so as to guide transmission.
In one embodiment, the genetic algorithm comprises:
setting four parameters of M, L, N and K, wherein M is an initial population number, L is a next generation population number, and N and K are termination conditions for judging whether an algorithm is stopped;
initializing a population, randomly generating an initial population, counting the number M of the population, and calculating the fitness of individuals in the population;
executing elite selection operator, performing cross operation on the rest individuals, and performing mutation treatment on the selected cross individuals according to mutation probability;
judging whether the number of the new population meets the requirement, and if the number of the new population does not meet the requirement, returning to continue to execute the elite selection operator;
if the number of the new population meets the requirement, preserving all chromosomes which do not appear before and meet the Qos requirement;
judging whether the number of the chromosomes meeting the requirements reaches N, if the number reaches N, selecting an optimal individual according to the fitness of the chromosomes, outputting a result, and ending the algorithm;
if the number does not reach N, judging whether the iteration number reaches K, if the iteration number does not reach K, returning to continuously calculate the fitness of the individuals in the population, and continuing the operation;
if the iteration number reaches K, selecting the optimal individual according to the fitness of the individuals in the population, outputting a result, and ending the algorithm.
In one embodiment, the population initialization design includes:
randomly arranging all exchanger nodes, and randomly generating part of paths from a starting point to a terminal point to serve as an initial population;
and storing the paths generated each time into a path set, discarding the paths if the newly generated paths are already in the set, and adding the paths into the path set if the newly generated paths are not in the path set until the number of the populations is reached.
In one embodiment, the calculating the fitness of the individuals in the population includes:
the smaller the value of the preset fitness function is, the more excellent the path is, and the fitness calculation function of the path i is as follows: f (i) = (f) delay (i)+f loss (i))÷2;
Wherein f delay (i) Is a delay fitness calculation function represented by path i:
wherein sum is i (delay) is the sum of the delays of path i, n is the number of individuals in a generation of population,
wherein sum is i The sum of the packet loss rates of (loss) paths i, n being the number of individuals in a generation of population.
In one embodiment, the elite selection operator comprises:
setting the number of elite paths to be reserved each time and the number of common paths to be reserved randomly;
for the first generation group, the paths are arranged in sequence from small to large according to the fitness value, elite paths with better fitness are selected from the paths according to the set quantity value, and the paths are directly copied to the next generation;
and executing the cross operation on the rest paths according to the set quantity value, and transmitting the rest paths into the next generation.
In an embodiment, the genetic algorithm includes generating a new path by a crossover operator, the crossover operator including:
and (3) intersecting all the individuals left after the elite selection operator, wherein the intersecting rule is to randomly select two paths in the remaining paths, if more than one identical switch node exists in the two paths except the source switch node and the destination switch node, randomly selecting one node in the identical switch nodes as an intersecting point to execute intersecting operation, namely, exchanging the front switch node and the rear switch node of the two paths respectively by taking the intersecting point as a central axis, and obtaining two new paths.
In one embodiment, the genetic algorithm includes increasing an algorithm search range by a mutation operator, the mutation operator including:
presetting a variation probability;
traversing all next generation individuals after elite selection operators and crossing operators, traversing a path each time, generating a random number by using a random generator, and comparing the random number with a variation rate;
if the mutation rate is larger than the random value, randomly selecting a switch node in the path, and randomly resetting the switch node to a new value.
According to the embodiment of the application, the SDN network architecture has the characteristics of separation of transfer control and programmability, the complexity of network management is simplified, network resources can be flexibly called, and compared with a traditional network, the SDN network architecture improves the transmission of streaming media video. The QoS routing strategy utilizes the programmability of SDN network and the characteristic of periodically obtaining network link information, applies genetic algorithm to QoS routing and can execute dynamic routing strategy, when network is congested, calculates new transmission path for video streaming media, optimizes the updating sequence of streaming table, solves the problem of streaming table consistency, avoids the problems of streaming interruption, packet loss and the like caused by dynamic routing, and improves the transmission performance of video streaming media.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute an undue limitation to the application. In the drawings:
FIG. 1 is an alternative flow diagram according to an embodiment of the present application;
FIG. 2 is a flowchart of an alternative route management module implementation according to an embodiment of the present application;
FIG. 3 is an alternative population initialization flow diagram according to an embodiment of the present application;
FIG. 4 is an alternative fitness value calculation flowchart according to an embodiment of the present application;
FIG. 5 is an alternative elite operator selection flow chart according to an embodiment of the present application;
FIG. 6 is an alternative crossover operator flow diagram according to an embodiment of the present application;
FIG. 7 is an alternative mutation operator flow diagram according to an embodiment of the present application;
FIG. 8 is an alternative algorithm termination flow chart according to an embodiment of the present application;
fig. 9 is a flowchart of an alternative genetic algorithm to solve QoS routes according to embodiments of the present application.
Detailed Description
The present application will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
As shown in fig. 1, a video stream routing method based on a genetic algorithm in an SDN environment is provided, where the method includes:
s202, receiving initial message data, obtaining effective data in the initial message data, extracting message header information of the initial message data after judging that the initial message data is a route request, and analyzing the message header information to obtain source and destination exchanger information and application layer protocol types;
s204, judging whether the initial message data is video streaming media according to the source and destination exchanger information and the application layer protocol type, if not, calculating to obtain a first transmission path through Dijstra (Dijstra algorithm) to send the first transmission path to a corresponding exchanger so as to guide the transmission of the service data stream;
s206, if the video streaming media is the video streaming media, a genetic algorithm is used for obtaining a second transmission path between the source and destination switches, and the second transmission path is issued to the corresponding switch so as to guide the transmission of the video streaming media;
and S208, when the first transmission path or the second transmission path is blocked, a genetic algorithm is used for re-planning the paths, and when the re-planned new path is different from the old path, the new path is used for being issued to the corresponding switch so as to guide transmission.
In the SDN (Software Defined Network) software-defined network, the transmission of the data stream depends on the action of the flow table entry in the flow table, and if the data stream matches the flow table entry in a certain flow table, the data stream is transmitted according to the action specified by the flow table entry; if the packet is not matched with any flow table, the information of the packet is generally sent to a management module of the routing controller for different processing. The controller can carry out QoS (Quality ofService) routing based on a genetic algorithm after distinguishing the video streaming media data streams, and service data streams with other priorities can carry out minimum hop count routing.
Analyzing the received message by a routing management module in the Ryu controller on the SDN controller to obtain effective data therein, wherein the effective data mainly comprises flow tables of various control behaviors, after the routing management module determines that actions of flow table items in the flow tables are routing requests, the routing management module further processes the message by using a classified issuing method, firstly, extracting message header information in the message, then analyzing data in the message header to obtain information of a source and destination switch and an application layer protocol, and if the analyzed result is a service flow with a non-highest priority, calculating a transmission path by the controller, and then issuing the flow table to a corresponding switch to guide transmission of the service data flow. If the highest priority video fluid is obtained by parsing, a genetic algorithm is required to obtain a transmission path between source and destination switches. If the transmission path is congested, the path is re-planned, if the new path is different from the buffer path, the new path is directly added, the old path is deleted, the flow table is issued according to the new path, if the new path is the same as the buffer path, the network is indicated to have overall congestion, and at this time, the video streaming media can be scheduled preferentially at the ports only by means of a queue scheduling strategy, so that the problem caused by congestion is reduced most probably. .
As shown in fig. 2, in one embodiment, the genetic algorithm includes:
s1, setting four parameters of M, L, N and K, wherein M is an initial population number, L is a next generation population number, and N and K are termination conditions for judging whether an algorithm is stopped;
s2, initializing a population, randomly generating an initial population, counting the number M of the population, and calculating the fitness of individuals in the population;
s3, executing elite selection operators, performing cross operation on the rest individuals, and performing mutation treatment on the selected cross individuals according to mutation probability;
s4, judging whether the number of the new population meets the requirement, and if the number of the new population does not meet the requirement, returning to continue to execute the elite selection operator;
s5, if the number of the new population meets the requirement, storing all chromosomes which do not appear before and meet the Qos requirement;
s6, judging whether the number of the chromosomes meeting the requirement reaches N, if so, selecting an optimal individual according to the fitness of the chromosomes, outputting a result, and ending the algorithm;
s7, if the number does not reach N, judging whether the number of the iterations reaches K, if the number of the iterations does not reach K, returning to continuously calculate the fitness of the individuals in the population, and continuing the operation;
and S8, if the iteration number reaches K, selecting the optimal individual according to the fitness of the individual in the population, outputting a result, and ending the algorithm.
It should be noted that, applying the genetic algorithm to solve the practical problem requires initializing to generate chromosomes, which are the objects of the algorithm operation. Population initialization generally needs to consider two points, namely the mode adopted by the initialization and the size of the population.
As shown in fig. 3, in one embodiment, the population initialization design includes:
randomly arranging all exchanger nodes, and randomly generating part of paths from a starting point to a terminal point to serve as an initial population;
and storing the paths generated each time into a path set, discarding the paths if the newly generated paths are already in the set, and adding the paths into the path set if the newly generated paths are not in the path set until the number of the populations is reached.
The specific method for initializing the population is as follows: the paths from the starting point to the end point are randomly generated as an initial population, and before the algorithm executes the operation of selecting the adjacent nodes which are not marked, all the adjacent nodes which are not marked are required to be arranged randomly, so that the selection of the next hop is completely random, and the randomness of the path generation is ensured. When the node has an unmarked adjacent point, firstly judging whether the node is a source point, if not, continuing searching until the point of which the adjacent node is not completely marked is found, stopping searching of an algorithm, adding the adjacent node into a path linked list, and repeating the operation until a path connecting the source point and the destination point is obtained. Each generated path is saved to a path set, and if the newly generated path is in the set, the new path is discarded and is not used for constructing the population; if the newly generated path is not in the set, the new path is added into the path set until the number of the population is reached, so that the operation reduces the repetition of individuals and can effectively improve the diversity of population genes and the searching breadth.
As shown in fig. 4, in an embodiment, the calculating the fitness of the individuals in the population includes:
the smaller the value of the preset fitness function is, the more excellent the path is, and the fitness calculation function of the path i is as follows: f (i) = (f) delay (i)+f loss (i))÷2;
Wherein f delay (i) Is a delay fitness calculation function represented by path i:
wherein sum is i (delay) is the sum of the delays of path i, n is the number of individuals in a generation of population,
wherein sum is i The sum of the packet loss rates of (loss) paths i, n being the number of individuals in a generation of population.
It should be noted that the fitness is used to determine whether a chromosome is good or bad, and the value is calculated according to the fitness function. Various evolutionary operations in genetic algorithms all need to take fitness values of chromosomes as a measurement standard, so that the design of fitness functions becomes a key step in the genetic algorithm, and has a great influence on the convergence speed of the algorithm and whether a proper solution can be found.
The specific method for calculating the fitness comprises the following steps: before chromosome fitness calculation, a fitness calculation formula is designed, and besides the fitness formula, a linked list containing path link information and QoS performance parameters of each link are required to be obtained. And finally, calculating the fitness of each chromosome according to the fitness function. When designing the fitness function, the calculation of the delay and the packet loss rate is divided by the sum of all the corresponding performance values of the chromosomes of the generation, so after obtaining the path linked list and the QoS performance parameters, the sum of all the corresponding performance values of the chromosomes should be calculated so as to calculate the fitness of each performance.
As shown in fig. 5, in one embodiment, the elite selection operator includes:
setting the number of elite paths to be reserved each time and the number of common paths to be reserved randomly;
for the first generation group, the paths are arranged in sequence from small to large according to the fitness value, elite paths with better fitness are selected from the paths according to the set quantity value, and the paths are directly copied to the next generation;
and executing the cross operation on the rest paths according to the set quantity value, and transmitting the rest paths into the next generation.
It should be noted that, the implementation of the genetic operator includes a selection operator, a crossover operator, a mutation operator and an algorithm termination, which are described as follows:
the selection operator judges whether an individual has stronger vitality according to the fitness of the individual. The selection operator performs operations of excellent individual retention and inheritance to the next generation or generation of child individuals using crossover operators. The genetic operator adopts an elite selection strategy, and the strategy directly inherits excellent individuals in each generation of population to the next generation without crossing operators.
The specific method for selecting operators comprises the following steps: the elite selection strategy takes the current population as input, calculates fitness values of individuals in the input population, sorts the fitness values according to the fitness values after obtaining the fitness values of the individuals, then selects better individuals in the population according to a preset retention rate, directly copies the better individuals to the next generation, and the retention rate is set to be 10%; and traversing the rest individuals, generating a random value by using a random generator every time the individuals are traversed, comparing the random value with the selectivity, and if the selectivity is larger than the random value, setting the individual as the individual in the next generation population, wherein the selectivity is set to be 1%, and the random value generated by the random generator is between 0 and 1. .
As shown in fig. 6, in one embodiment, the genetic algorithm includes generating a new path by a crossover operator that includes:
and (3) intersecting all the individuals left after the elite selection operator, wherein the intersecting rule is to randomly select two paths in the remaining paths, if more than one identical switch node exists in the two paths except the source switch node and the destination switch node, randomly selecting one node in the identical switch nodes as an intersecting point to execute intersecting operation, namely, exchanging the front switch node and the rear switch node of the two paths respectively by taking the intersecting point as a central axis, and obtaining two new paths.
It should be noted that, the crossover operator is an operation of gene exchange on a chromosome, and the crossover operation will obtain a new gene combination, i.e. a new individual, so as to expand the search space of the algorithm.
The specific method of the crossover operator is as follows: and (3) crossing all the individuals left after the elite selection strategy, wherein the crossing rule is to randomly select two chromosomes in the remaining chromosomes, if the two chromosomes have more than one identical gene except the head and tail genes, the crossing operation is performed in a mode of randomly selecting crossing gene loci, and as a loop condition possibly exists in a path formed after crossing, judging whether the genes of a new chromosome formed after crossing are repeated or not is needed so as to exclude the chromosome with the loop, if no repeated genes exist in the new chromosome, the new chromosome can be used as a next generation new chromosome, whether all the chromosomes are crossed is judged, and if the new chromosome is not crossed, the method returns to continue randomly selecting the chromosome.
As shown in fig. 7, in one embodiment, the genetic algorithm includes increasing the algorithm search range by a mutation operator, the mutation operator including:
presetting a variation probability;
traversing all next generation individuals after elite selection operators and crossing operators, traversing a path each time, generating a random number by using a random generator, and comparing the random number with a variation rate;
if the mutation rate is larger than the random value, randomly selecting a switch node in the path, and randomly resetting the switch node to a new value.
It should be noted that, the mutation operator can expand the diversity of genes, increase the search range of the algorithm, prevent the occurrence of local optimal solution to a certain extent, and the mutation probability and mutation mode are the basis for realizing the mutation operator.
The mutation operator specifically comprises the following steps: and traversing all the next generation individuals after selection and crossing by using a random resetting mode, generating a random number by using a random generator every time one individual is traversed, comparing the random number with a variation rate, acquiring a random gene position if the variation rate is larger than the random value, acquiring the gene value randomly in a reasonable range, and endowing the acquired random value to the gene.
In one embodiment, as shown in fig. 8, the termination check determines when the algorithm is running is terminated, and when the number of paths meeting the demand reaches the N value set before, the genetic algorithm is terminated, and the path with the best fitness is taken as the solution. In this embodiment, the algorithm termination determines when the running algorithm is terminated, and the algorithm termination exemplary designs two ways to terminate the running of the algorithm, firstly, the iteration number reaches a set value, the algorithm will not continue to execute, and the best path is returned; and secondly, the genetic algorithm can be terminated and a path with the best adaptability can be returned when the N value set during the initialization of the algorithm is needed, namely, when the number of stored chromosomes (paths) meeting the requirements reaches N. This is done because the QoS control is very sensitive to time requirements, and the improvement of the algorithm convergence speed can improve the routing efficiency and improve the performance of QoS control.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application and are intended to be comprehended within the scope of the present application.
Claims (1)
1. A video stream routing method based on a genetic algorithm in an SDN environment, the method comprising:
receiving initial message data, obtaining effective data in the initial message data, extracting message header information of the initial message data after judging that the initial message data is a routing request, and analyzing the message header information to obtain source and destination exchanger information and application layer protocol types;
judging whether the initial message data is video streaming media according to the source and destination exchanger information and the application layer protocol type, if not, obtaining a first transmission path through Dijstra calculation, and transmitting the first transmission path to a corresponding exchanger to guide the transmission of the service data stream;
if the video streaming media is the video streaming media, a genetic algorithm is used for obtaining a second transmission path between the source and the destination, and the second transmission path is issued to the corresponding switch so as to guide the transmission of the video streaming media;
when the first transmission path or the second transmission path is blocked, a genetic algorithm is used for re-planning the paths, and when the re-planned new path is different from the old path, the new path is used for issuing the new path to a corresponding switch so as to guide transmission;
the genetic algorithm comprises:
setting four parameters of M, L, N and K, wherein M is an initial population number, L is a next generation population number, and N and K are termination conditions for judging whether an algorithm is stopped;
initializing a population, randomly generating an initial population, counting the number M of the population, and calculating the fitness of individuals in the population;
executing elite selection operator, performing cross operation on the rest individuals, and performing mutation treatment on the selected cross individuals according to mutation probability;
judging whether the number of the new population meets the requirement, and if the number of the new population does not meet the requirement, returning to continue to execute the elite selection operator;
if the number of the new population meets the requirement, preserving all chromosomes which do not appear before and meet the Qos requirement;
judging whether the number of the chromosomes meeting the requirements reaches N, if the number reaches N, selecting an optimal individual according to the fitness of the chromosomes, outputting a result, and ending the algorithm;
if the number does not reach N, judging whether the iteration number reaches K, if the iteration number does not reach K, returning to continuously calculate the fitness of the individuals in the population, and continuing the operation;
if the iteration number reaches K, selecting the optimal individual according to the fitness of the individual in the population, outputting a result, and ending the algorithm;
the population initialization design comprises the following steps:
randomly arranging all exchanger nodes, and randomly generating part of paths from a starting point to a terminal point to serve as an initial population;
storing the paths generated each time into a path set, discarding the paths if the newly generated paths are already in the set, and adding the paths into the path set if the newly generated paths are not in the path set until the number of the populations is reached;
the calculating the fitness of the individuals in the population comprises the following steps:
the smaller the value of the preset fitness function is, the more excellent the path is, and the fitness calculation function of the path i is as follows: f (i) = (f) delay (i)+f loss (i))÷2;
Wherein f delay (i) Is a delay fitness calculation function represented by path i:
wherein sum is i (delay) is the sum of the delays of path i, n is the number of individuals in a generation of population,
wherein sum is i (loss) sum of packet loss rates for path i, n being the number of individuals in a generation population;
the elite selection operator comprises:
setting the number of elite paths to be reserved each time and the number of common paths to be reserved randomly;
for the first generation group, the paths are arranged in sequence from small to large according to the fitness value, elite paths with better fitness are selected from the paths according to the set quantity value, and the paths are directly copied to the next generation;
performing cross operation on the rest paths according to the set quantity value, and transmitting the rest paths to the next generation;
the genetic algorithm includes generating a new path by a crossover operator, the crossover operator including:
the method comprises the steps of intersecting all individuals left after elite selection operators, wherein the rule of intersecting is to randomly select two paths in the remaining paths, if more than one identical switch node exists in the two paths except for a source switch node and a destination switch node, randomly selecting one node in the identical switch nodes as an intersection point to execute intersecting operation, namely, exchanging front and rear switch nodes of the two paths respectively by taking the intersection point as a central axis, so as to obtain two new paths;
the genetic algorithm includes increasing an algorithm search range by a mutation operator, the mutation operator including:
presetting a variation probability;
traversing all next generation individuals after elite selection operators and crossing operators, traversing a path each time, generating a random number by using a random generator, and comparing the random number with a variation rate;
if the mutation rate is larger than the random value, randomly selecting a switch node in the path, and randomly resetting the switch node to a new value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210301100.2A CN114745322B (en) | 2022-03-24 | 2022-03-24 | Video flow routing method based on genetic algorithm in SDN environment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210301100.2A CN114745322B (en) | 2022-03-24 | 2022-03-24 | Video flow routing method based on genetic algorithm in SDN environment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114745322A CN114745322A (en) | 2022-07-12 |
CN114745322B true CN114745322B (en) | 2023-07-07 |
Family
ID=82277948
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210301100.2A Active CN114745322B (en) | 2022-03-24 | 2022-03-24 | Video flow routing method based on genetic algorithm in SDN environment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114745322B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116156592B (en) * | 2022-12-27 | 2023-08-22 | 深圳市宇通联发科技有限公司 | Low-delay wireless transmission method, device, communication management equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633544B1 (en) * | 1998-06-24 | 2003-10-14 | At&T Corp. | Efficient precomputation of quality-of-service routes |
CN110535770A (en) * | 2019-08-30 | 2019-12-03 | 西安邮电大学 | A kind of video flowing method for intelligently routing based on QoS perception under SDN environment |
CN113759927A (en) * | 2021-09-16 | 2021-12-07 | 重庆邮电大学 | Warehousing robot path planning method based on artificial bee colony-adaptive genetic algorithm |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6868292B2 (en) * | 2000-09-14 | 2005-03-15 | The Directv Group, Inc. | Device control via digitally stored program content |
US8874477B2 (en) * | 2005-10-04 | 2014-10-28 | Steven Mark Hoffberg | Multifactorial optimization system and method |
US8996427B2 (en) * | 2010-07-19 | 2015-03-31 | Tapicu, Inc. | Method for a system that solves multimedia resource discovery and retrieval problem sets |
US8730817B2 (en) * | 2010-12-07 | 2014-05-20 | At&T Intellectual Property I, L.P. | Methods and apparatus to determine network link weights |
-
2022
- 2022-03-24 CN CN202210301100.2A patent/CN114745322B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6633544B1 (en) * | 1998-06-24 | 2003-10-14 | At&T Corp. | Efficient precomputation of quality-of-service routes |
CN110535770A (en) * | 2019-08-30 | 2019-12-03 | 西安邮电大学 | A kind of video flowing method for intelligently routing based on QoS perception under SDN environment |
CN113759927A (en) * | 2021-09-16 | 2021-12-07 | 重庆邮电大学 | Warehousing robot path planning method based on artificial bee colony-adaptive genetic algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN114745322A (en) | 2022-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Iwata et al. | ATM routing algorithms with multiple QoS requirements for multimedia internetworking | |
EP3809646A1 (en) | Routing tables for forwarding packets between switches in a data center network | |
CN107454019B (en) | Dynamic bandwidth allocation method, device, equipment and storage medium for software defined network | |
CN107294852B (en) | Network routing method using topology dispersed short path set | |
CN1359218A (en) | Data structure and storage medium for realizing multi-protocol habel exchange system engineering | |
Kamath et al. | Routing and admission control in general topology networks with poisson arrivals | |
Haeri et al. | Intelligent deflection routing in buffer-less networks | |
Oida et al. | An agent-based routing system for QoS guarantees | |
CN113472671B (en) | Method, device and computer readable storage medium for determining multicast route | |
CN114745322B (en) | Video flow routing method based on genetic algorithm in SDN environment | |
CN107995121B (en) | Method for counting flow in software defined network based on wildcard | |
US6515965B1 (en) | Available bit rate flow control for service allocation in a packet network | |
Cattelan et al. | Iterative design space exploration for networks requiring performance guarantees | |
CN114500354A (en) | Switch control method, device, control equipment and storage medium | |
Hoceini et al. | K-shortest paths Q-routing: a new QoS routing algorithm in telecommunication networks | |
Li et al. | A data forwarding mechanism based on deep reinforcement learning for deterministic networks | |
CN116455824A (en) | Network traffic load balancing method based on reinforcement learning | |
Cameron et al. | Prioritized deflection routing in optical burst switching networks | |
Chooprateep et al. | Video path selection for traffic engineering in SDN | |
Liu et al. | Ppo-based reliable concurrent transmission control for telemedicine real-time services | |
Aboelela et al. | Fuzzy generalized network approach for solving an optimization model for routing in B‐ISDN | |
Kandavanam et al. | A hybrid genetic algorithm/variable neighborhood search approach to maximizing residual bandwidth of links for route planning | |
Felstaine et al. | Crankback prediction in hierarchical ATM networks | |
Andrade et al. | Analysis of selection and crossover methods used by genetic algorithm-based heuristic to solve the lsp allocation problem in mpls networks under capacity constraints | |
Lau et al. | Preemption with rerouting to minimize service disruption in connection-oriented networks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |