Method, system and device for balancing traffic load in SDN (Software Defined Network) and storage medium
By using preset simulation prediction models in the SDN network to predict bandwidth usage at the next moment, the traffic forwarding path is optimized, and the load balancing problem caused by the delay of network status information in the SDN network is solved, and the load balancing effect is improved.
Patent Information
- Application Number
- CN202410936856.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The network status information obtained through controller periodic access in the SDN network has a delay, resulting in poor routing calculation results, resulting in large load on some links and poor load balancing effect.
By querying switch port and link information regularly, predict bandwidth usage at the next moment using a preset simulation prediction model (BP neural network model trained by genetic algorithm and artificial bee colony algorithm), calculate the target path, and map it into a flow table Items and configuration items are issued to optimize the traffic forwarding path.
It improves bandwidth prediction accuracy, reduces network status information delay, improves load balancing effect, and avoids link congestion.
Smart Images

Figure CN118921324A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communications, and in particular to a method, system, device and computer-readable storage medium for traffic load balancing in an SDN network. Background Art
[0002] At present, with the gradual expansion of the scale of SDN networks, problems such as low flow table utilization and high matching forwarding delay have emerged. To solve such problems, the network status information of multiple paths can be obtained in real time in the network topology and the optimal scheduling path can be selected by comprehensive weighting. Since the link status information based on the routing calculation is constantly changing, the network status information obtained through the controller periodic access has a certain delay, resulting in the result of the routing calculation not being the optimal traffic forwarding path, causing the load of some links in the network to be large and congested, and the load balancing effect is poor. Summary of the invention
[0003] The present application provides a method, system, device and computer-readable storage medium for traffic load balancing in an SDN network, which can solve the technical problem in the prior art that the network status information obtained through periodic access by a controller has a certain delay, resulting in the result of routing calculation not being the optimal traffic forwarding path, causing the load of some links in the network to be heavy and congested, and the load balancing effect to be poor.
[0004] In a first aspect, an embodiment of the present application provides a method for traffic load balancing in an SDN network, and the method for traffic load balancing in an SDN network includes:
[0005] Regularly query the port and link information of each switch;
[0006] Obtaining statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes bandwidth usage of each port;
[0007] According to the preset simulation prediction model and the bandwidth utilization rate of each port, the available bandwidth utilization rate of each port of each link at the next moment is obtained, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm;
[0008] Calculate the available bandwidth usage of each port of each link at the next moment to obtain the target path;
[0009] According to the target path mapping as matching flow table items and configuration items, flow table items are installed and configuration items are issued to the access layer switch.
[0010] In combination with the first aspect, in one implementation, before obtaining the available bandwidth usage rate of each port of each link at the next moment according to the preset simulation prediction model and the bandwidth usage rate of each port, the method further includes:
[0011] Acquire network topology information of a preset BP neural network model, and generate an initialization population, wherein the network topology information includes information of each network node, and the initialization population includes multiple groups of weight threshold schemes, and each group of weight threshold schemes includes a weight and a threshold;
[0012] Determine a target weight and a target threshold according to preset operation rules, each group of weight threshold schemes and the acquired training data set, wherein the preset operation rules include a genetic algorithm and / or an artificial bee colony algorithm;
[0013] The preset BP neural network model is updated according to the target weight and the target threshold to generate a preset simulation prediction model.
[0014] In combination with the first aspect, in one implementation, determining the target weight and the target threshold according to the preset operation rules, each group of the weight threshold schemes and the acquired training data set includes:
[0015] Determine a target weight threshold scheme from the weight threshold schemes of each group according to a preset operation rule;
[0016] Calculating the target weight threshold scheme according to the acquired training data set to obtain a nectar source density value;
[0017] If it is determined that the nectar source density value is less than a preset threshold, a preset scout bee rule is used to perform a field search on the target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population;
[0018] If it is determined that the new population satisfies the first preset condition, a target weight and a target threshold are obtained from the new population.
[0019] In combination with the first aspect, in one implementation, determining a target weight threshold scheme from each group of weight threshold schemes according to a preset operation rule includes:
[0020] Dividing the plurality of groups of weight threshold schemes into a plurality of clusters according to a preset ratio in a preset operation rule, wherein the clusters include a first cluster, a second cluster, a third cluster and a fourth cluster;
[0021] Based on the genetic algorithm, the artificial bee colony algorithm and each of the clusters in the preset operation rules, determining the operation stage of each of the clusters, wherein the operation stage includes a first operation stage, a second operation stage, a third operation stage and a fourth operation stage;
[0022] The first operation stage includes executing a genetic algorithm on the weight threshold scheme in the first cluster to determine a target weight threshold scheme, wherein the genetic algorithm includes a selection operation rule and a crossover operation rule;
[0023] The second operation stage includes executing an artificial bee colony algorithm once and a genetic algorithm twice on the weight threshold scheme in the second cluster to determine a target weight threshold scheme;
[0024] The third operation stage includes executing the artificial bee colony algorithm twice and the genetic algorithm once on the weight threshold scheme in the third cluster to determine the target weight threshold scheme;
[0025] The fourth operation stage includes executing an artificial bee colony algorithm on the weight threshold scheme in the fourth cluster to determine a target weight threshold scheme, wherein the artificial bee colony algorithm includes a leading bee operation rule and a following bee operation rule.
[0026] In combination with the first aspect, in one implementation, the target weight threshold scheme is calculated according to the acquired training data set to obtain the honey source density value, including:
[0027] Obtaining the sample data to be predicted, the predicted data value and the true value corresponding to the target weight threshold scheme in the training data set, as well as the number of the predicted data values and the number of samples in the training data set;
[0028] Based on the preset fitness formula, the number of predicted data values, the number of samples in the training data set, and the sample data to be predicted, the predicted data value, and the true value corresponding to the target weight threshold scheme, the honey source density value is obtained.
[0029] In combination with the first aspect, in one implementation, after calculating the target weight threshold scheme according to the acquired training data set to obtain the honey source density value, the method further includes:
[0030] If it is determined that the nectar source density value is greater than or equal to the preset threshold, the weight and threshold of the target weight threshold scheme are mutated using the preset mutation operation rule to obtain a mutated target weight threshold scheme;
[0031] The preset scout bee rule is used to perform a field search on the mutated target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population.
[0032] In combination with the first aspect, in one implementation, if it is determined that the new population satisfies the first preset condition, before obtaining the target weight and the target threshold from the new population, the method further includes:
[0033] Obtaining the number of iterations of the new population;
[0034] Determining whether a first preset condition is satisfied according to the number of iterations of the new population, wherein the first preset condition is a preset number of iterations;
[0035] If the number of iterations of the new population is greater than or equal to the preset number of iterations, it is determined that the new population meets the first preset condition;
[0036] If the number of iterations of the new population is less than the preset number of iterations, it is determined that the new population does not meet the first preset condition, and a new target weight and a new target threshold in the new population are determined according to a preset operation rule.
[0037] In a second aspect, an embodiment of the present application provides a system for traffic load balancing in an SDN network, and the system for traffic load balancing in an SDN network includes:
[0038] A network topology update module is used to manage each switch node in the network and the link information between the ports of each switch, regularly query each switch port and the link information, and update the network topology structure;
[0039] A network status monitoring module, used for obtaining statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes bandwidth usage of each port;
[0040] A link bandwidth prediction module, used to obtain the available bandwidth usage rate of each port of each link at the next moment according to a preset prediction model and the bandwidth usage rate of each port, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm;
[0041] A routing calculation module, used to calculate the available bandwidth usage rate of each port of each link at the next moment to obtain a target path;
[0042] The flow table item installation module is used to install the flow table items and send the configuration items to the access layer switch according to the target path mapping as matching flow table items and configuration items.
[0043] In a third aspect, an embodiment of the present application provides a traffic load balancing in an SDN network, wherein the traffic load balancing in the SDN network comprises a processor, a memory, and a traffic load balancing program in the SDN network stored in the memory and executable by the processor, wherein when the traffic load balancing program in the SDN network is executed by the processor, the steps of the method for traffic load balancing in the SDN network as described above are implemented.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a traffic load balancing program in an SDN network is stored, wherein when the traffic load balancing program in the SDN network is executed by a processor, the steps of the method for traffic load balancing in the SDN network as described above are implemented.
[0045] The beneficial effects brought by the technical solution provided by the embodiment of the present application include: by periodically querying the information of each port and link of each switch; by periodic polling of the controller, obtaining the statistical information of each port and flow table of each switch, wherein the statistical information includes the bandwidth utilization rate of each port; according to the preset simulation prediction model and the bandwidth utilization rate of each port, obtaining the available bandwidth utilization rate of each port of each link at the next moment, wherein the preset simulation prediction model is obtained by training the preset BP neural network model through genetic algorithm and / or artificial bee colony algorithm; calculating the available bandwidth utilization rate of each port of each link at the next moment to obtain the target path; according to the target path, mapping to matching flow table items and configuration items, installing flow table items and issuing configuration items for the access layer switch, solving the technical problem that the network status information obtained by periodic access of the controller in the related technology has a certain delay, resulting in the result of routing calculation is not the optimal traffic forwarding path, causing the load of some links in the network to be large and congested, and the load balancing effect is poor, and adopting a preset simulation prediction model to improve the accuracy of bandwidth prediction, avoid the delay of network status information, so as to improve the load balancing effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a flow chart of an embodiment of a method for traffic load balancing in an SDN network of the present application;
[0047] Figure 2 This is a functional module diagram of an embodiment of a device for traffic load balancing in an SDN network of the present application;
[0048] Figure 3 This is a schematic diagram of the hardware structure of a device for traffic load balancing in an SDN network involved in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0050] First, some technical terms in the present application are explained to facilitate those skilled in the art to understand the present application.
[0051] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0052] In a first aspect, an embodiment of the present application provides a method for traffic load balancing in an SDN network.
[0053] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the method for traffic load balancing in an SDN network of the present application. Figure 1 As shown, the method of traffic load balancing in the SDN network includes:
[0054] Step S10: Regularly query the port and link information of each switch;
[0055] Demonstration, it mainly manages each switch node in the network and the port link information between each switch. Through netconf, openflow related protocols, it regularly queries the port and link information of the switch and updates the network topology to provide basic data guarantee.
[0056] Step S20: acquiring statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes bandwidth usage of each port;
[0057] Exemplarily, the controller periodically polls to obtain statistical information of each port and flow table of the switch, wherein the statistical information includes bandwidth usage of each port, and the system saves bandwidth data of each port in the network topology as historical data.
[0058] Step S30: obtaining the available bandwidth utilization rate of each port of each link at the next moment according to the preset simulation prediction model and the bandwidth utilization rate of each port, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm;
[0059] Exemplarily, the available bandwidth of each link at the next moment is predicted based on the preset simulation prediction model and the information of each switch port obtained by monitoring. The preset simulation prediction model predicts the port bandwidth utilization rate at the next moment based on the saved multiple historical bandwidth information. Before initializing the weights and thresholds, the preset simulation prediction model combines the respective advantages of the genetic algorithm and / or the artificial bee colony algorithm to find the optimal initial weights and thresholds of the neural network, so as to solve the problem that the traditional BP neural network is prone to fall into the local optimum and causes the problem of low bandwidth prediction accuracy.
[0060] Step S40: Calculate the available bandwidth usage rate of each port of each link at the next moment to obtain the target path;
[0061] Demonstratively, by learning the historical port bandwidth data through the preset BP neural network model, the optimal weight (W) and threshold (θ) are obtained, so that the bandwidth utilization rate of each switch port at the next moment can be predicted. When the source address and destination address of the traffic are determined at a certain moment in the future, all paths can be exhaustively calculated through routing, and then the best path at a certain time in the future can be found through the predicted minimum port bandwidth utilization rate. The best top n paths can also be calculated for load balancing or active / standby protection, and the best path found is used as the target path.
[0062] The controller can periodically send messages to check the connectivity of the target path calculated by the route to avoid the calculated path being unreachable. If the calculated target path is significantly different from the existing path, it may cause traffic fluctuations. The existing path and the target path can be configured in load balancing mode at the same time to reduce traffic fluctuations.
[0063] Step S50: According to the target path mapping as matching flow table items and configuration items, flow table items are installed and configuration items are issued to the access layer switch.
[0064] Exemplarily, by mapping the target path to matching flow table items and configuration items, flow table items are installed and configuration items are issued to the access layer switch, thereby avoiding delays in network status information and improving load balancing effects.
[0065] In this embodiment, each port and link information of each switch is queried at regular intervals; statistical information of each port and flow table of each switch is obtained by periodic polling of the controller, wherein the statistical information includes the bandwidth utilization rate of each port; the available bandwidth utilization rate of each port of each link at the next moment is obtained according to the preset simulation prediction model and the bandwidth utilization rate of each port, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm; the available bandwidth utilization rate of each port of each link at the next moment is calculated to obtain a target path; according to the target path, the target path is mapped to matching flow table items and configuration items, and the flow table items are installed and the configuration items are issued for the access layer switch, so as to solve the technical problem that the network status information obtained by periodic access of the controller in the related art has a certain delay, resulting in that the result of the routing calculation is not the optimal traffic forwarding path, so that the load of some links in the network is large and congestion occurs, and the load balancing effect is poor, and the preset simulation prediction model is used to improve the bandwidth prediction accuracy, avoid the delay of network status information, and improve the load balancing effect.
[0066] Further, in one embodiment, before obtaining the available bandwidth usage rate of each port of each link at the next moment according to the preset simulation prediction model and the bandwidth usage rate of each port, the method further includes:
[0067] The network topology information of the preset BP neural network model is obtained, and an initialization population is generated, wherein the network topology information includes information of each network node, and the initialization population includes multiple groups of weight threshold schemes, and each group of the weight threshold schemes includes weights and thresholds; according to the preset operation rules, each group of the weight threshold schemes and the obtained training data set, the target weight and target threshold are determined, wherein the preset operation rules include genetic algorithms and / or artificial bee colony algorithms; according to the target weight and the target threshold, the preset BP neural network model is updated to generate a preset simulation prediction model.
[0068] Exemplarily, the preset BP neural network model is confirmed to obtain the network topology information of the preset BP neural network model. The network topology information includes the node information of the hidden layer in the preset BP neural network model, as well as the weights and thresholds in the information of each node. The obtained weights and thresholds are population encoded to generate an initialized population. For example, the weights and thresholds are encoded in the form of encoding, for example, the weights are encoded as W={W1, W2, ..., W n}, the threshold is encoded θ={θ1, θ2, ......, θ n}, the encoded weights and thresholds are represented by a one-dimensional matrix of preset length, each matrix is a set of weight threshold schemes, and an initialization population is generated.
[0069] Determine the target weight threshold scheme from the weight threshold schemes of each group according to the genetic algorithm; calculate the target weight threshold scheme according to the acquired training data set to obtain the nectar source density value; if it is determined that the nectar source density value is less than the preset threshold, use the preset scout bee rule to perform a field search on the target weight threshold scheme to obtain the first weight and the first threshold, and generate a new population; if it is determined that the new population meets the first preset condition, obtain the target weight and the target threshold from the new population. Alternatively, determine the target weight threshold scheme from the weight threshold schemes of each group according to the artificial bee colony algorithm; calculate the target weight threshold scheme according to the acquired training data set to obtain the nectar source density value; if it is determined that the nectar source density value is less than the preset threshold, use the preset scout bee rule to perform a field search on the target weight threshold scheme to obtain the first weight and the first threshold, and generate a new population; if it is determined that the new population meets the first preset condition, obtain the target weight and the target threshold from the new population. Alternatively, a target weight threshold scheme is determined from the weight threshold schemes of each group according to a genetic algorithm and an artificial bee colony algorithm; the target weight threshold scheme is calculated according to the acquired training data set to obtain a nectar source density value; if it is determined that the nectar source density value is less than a preset threshold, a preset scout bee rule is used to perform a field search on the target weight threshold scheme to obtain a first weight and a first threshold, and a new population is generated; if it is determined that the new population meets the first preset condition, the target weight and target threshold are obtained from the new population.
[0070] Specifically, the method of determining a target weight threshold scheme from each group of weight threshold schemes according to a preset operation rule includes: dividing multiple groups of weight threshold schemes into multiple clusters according to a preset ratio in the preset operation rule, wherein the clusters include a first cluster, a second cluster, a third cluster, and a fourth cluster; determining an operation stage of each cluster based on a genetic algorithm, an artificial bee colony algorithm, and each cluster in the preset operation rule, wherein the operation stage includes a first operation stage, a second operation stage, a third operation stage, and a fourth operation stage; the first operation stage includes executing a genetic algorithm on the weight threshold scheme in the first cluster once to determine a target weight threshold scheme. The target weight threshold scheme is determined, and the genetic algorithm includes a selection operation rule and a crossover operation rule; the second operation stage includes executing an artificial bee colony algorithm once and then executing the genetic algorithm twice on the weight threshold scheme in the second cluster to determine the target weight threshold scheme; the third operation stage includes executing the artificial bee colony algorithm twice and then executing the genetic algorithm once on the weight threshold scheme in the third cluster to determine the target weight threshold scheme; the fourth operation stage includes executing an artificial bee colony algorithm once on the weight threshold scheme in the fourth cluster to determine the target weight threshold scheme, wherein the artificial bee colony algorithm includes a leading bee operation rule and a following bee operation rule.
[0071] Exemplarily, multiple groups of weight threshold schemes are divided into four clusters according to a preset ratio, and the number of weight threshold schemes in the four clusters may be the same or different, and there is no limitation on this. The preset operation stage includes a first operation stage, a second operation stage, a third operation stage, and a fourth operation stage to determine the current operation stage. If the current operation stage is determined to be the first operation stage, a genetic algorithm is executed once; if the current operation stage is determined to be the second operation stage, an artificial bee colony algorithm is first executed once and the genetic algorithm is executed twice to determine the target weight threshold scheme; if the current operation stage is determined to be the third operation stage, an artificial bee colony algorithm is first executed twice and the genetic algorithm is executed once to determine the target weight threshold scheme; if the current operation stage is determined to be the fourth operation stage, an artificial bee colony algorithm is executed once to determine the target weight threshold scheme.
[0072] The genetic algorithm includes selection operation rules and crossover operation rules. The selection operation rules select two sets of weight threshold schemes from the first cluster as the parent and the mother, and then decide whether to perform the crossover operation according to the crossover probability parameter in the crossover operation rules. In the weight threshold scheme encoding stage, it has been determined to use the real number encoding method. Single-point crossover is to randomly select a node in the weight threshold scheme, and then cross the nodes of the corresponding fragments of the parent and the mother to generate an excellent weight threshold scheme, and use the excellent weight threshold scheme as the target weight threshold scheme.
[0073] The artificial bee colony algorithm includes the leading bee operation rules and the following bee operation rules. The leading bee operation rules include that each leading bee in the weight threshold scheme cluster corresponds to a weight threshold scheme. The leading stage is to let each scheme in the weight threshold scheme set perform neighborhood search in turn. When performing neighborhood search on weight threshold scheme A, first select several nodes from it according to the rules, then randomly select a weight threshold scheme B in the weight threshold set, exchange the corresponding nodes of the two schemes, and then generate a new weight threshold scheme C. If the exchanged node data is the same, reselect weight threshold scheme B until they are different. Finally, the idea of the greedy algorithm is adopted. If the fitness value of the new weight threshold scheme C is greater than the fitness value of scheme A, then scheme C replaces weight threshold scheme A, otherwise it remains unchanged. The following bee operation rules include further neighborhood search based on the excellent weight threshold scheme searched by the leading bee. First, select an excellent weight threshold scheme in the weight threshold scheme set, and also use the roulette strategy to select, then use the same neighborhood search method as the leading bee stage to search, and finally use the greedy algorithm to select an excellent weight threshold scheme, and use the excellent weight threshold scheme as the target weight threshold scheme.
[0074] Specifically, the target weight threshold scheme is calculated according to the acquired training data set to obtain the nectar source density value, including: obtaining the sample data to be predicted, the predicted data value and the true value corresponding to the target weight threshold scheme in the training data set, as well as the number of the predicted data values and the number of samples in the training data set; based on a preset fitness formula, the number of the predicted data values, the number of samples in the training data set, and the sample data to be predicted, the predicted data value, and the true value corresponding to the target weight threshold scheme, the nectar source density value is obtained.
[0075] For example, get the preset fitness formula The number of predicted data values k, the number of samples in the training data set m, y ij is the true value of the jth bandwidth of the i-th sample of the sample data to be predicted corresponding to the target weight threshold scheme, is the predicted data value of the jth sample of the i-th sample data to be predicted corresponding to the target weight threshold scheme, and E(w,b) is the nectar source density value.
[0076] The obtained nectar source density value is compared with the preset threshold value. If it is determined that the nectar source density value is less than the preset threshold value, the preset scout bee rule is used to perform a field search on the target weight threshold scheme to obtain the first weight and the first threshold value, and generate a new population; if it is determined that the new population meets the first preset condition, the target weight and the target threshold value are obtained from the new population. For example, the scout bee in the preset scout bee rule performs a field search on the target weight threshold scheme. When other weight threshold schemes are searched in the field, the weights and thresholds in the other weight threshold schemes are obtained, and the weights and thresholds in the other weight threshold schemes are used as the first weight and the first threshold value. Alternatively, when multiple weight threshold schemes are searched in the field, the position of each weight threshold scheme is obtained, and the weight threshold scheme whose position is close to the target weight threshold scheme is selected. Generating a new population based on the first weight and the first threshold value includes generating a new population with the first weight and the first threshold scheme separately, and the new population includes the first weight and the first threshold value obtained after initializing all weight threshold schemes in the population according to the preset operation rules. Alternatively, a new weight threshold scheme is generated by using the first weight and the first threshold and put into the initialization population to generate a new population. The number of weight threshold schemes in the new population is obtained, and the number of weight threshold schemes in the new population is compared with a preset number. If the number is greater than the preset number, it is determined that the first preset condition is met, and the nectar source density values of each weight threshold scheme are obtained from the new population, and the weight threshold scheme with the largest nectar source density value is selected, and the weight and threshold of the weight threshold scheme with the largest nectar source density value are obtained as the target weight and target threshold.
[0077] If it is determined that the nectar source density value is greater than or equal to the preset threshold, the preset mutation operation rule is used to mutate the weight and threshold of the target weight threshold scheme to obtain the mutated target weight threshold scheme; the preset scout bee rule is used to perform a field search on the mutated target weight threshold scheme to obtain the first weight and the first threshold, and a new population is generated. For example, when it is determined that the nectar source density value is greater than or equal to the preset threshold, the preset mutation operation rule is used to mutate the weight and threshold of the target weight threshold scheme, that is, the weight and threshold in the target weight threshold scheme are changed to obtain the mutated target weight threshold scheme. When multiple weight threshold schemes are searched in the field, the position of each weight threshold scheme is obtained, and the weight threshold scheme whose position is close to the mutated target weight threshold scheme is selected. Generating a new population based on the first weight and the first threshold includes generating a new population from the first weight and the first threshold scheme separately, and the new population includes the first weight and the first threshold obtained by all weight threshold schemes in the initialization population according to the preset operation rule. Alternatively, the new weight threshold scheme generated by the first weight and the first threshold is put into the initialization population to generate a new population. Obtain the number of weighted threshold schemes in the new population, compare the number of weighted threshold schemes in the new population with a preset number, if it is greater than the preset number, determine that the first preset condition is met, obtain the nectar source density values of each weighted threshold scheme from the new population, select the weighted threshold scheme with the largest nectar source density value, and obtain the weight and threshold of the weighted threshold scheme with the largest nectar source density value as the target weight and target threshold.
[0078] Specifically, if it is determined that the new population satisfies the first preset condition, then before obtaining the target weight and target threshold from the new population, it also includes: obtaining the number of iterations of the new population; determining whether the first preset condition is met according to the number of iterations of the new population, wherein the first preset condition is the preset number of iterations; if the number of iterations of the new population is greater than or equal to the preset number of iterations, determining that the new population satisfies the first preset condition; if the number of iterations of the new population is less than the preset number of iterations, determining that the new population does not satisfy the first preset condition, and determining a new target weight and a new target threshold in the new population according to a preset operation rule.
[0079] Exemplarily, the number of iterations for generating a new population is recorded, and the number of iterations is compared with the preset number of iterations. If the number of iterations of the population is greater than or equal to the preset number of iterations, the nectar source density values of each weight threshold scheme are obtained from the new population, and the weight threshold scheme with the largest nectar source density value is selected, and the weight and threshold of the weight threshold scheme with the largest nectar source density value are obtained as the target weight and target threshold. If the number of iterations of the population is less than the preset number of iterations, the new population is calculated according to the preset operation rules to determine the new target weight and the new target threshold.
[0080] After obtaining the target weight and target threshold, or obtaining a new target weight and new threshold, the target weight and target threshold, or the new target weight and new target threshold, are used to update the weight and threshold in the preset BP neural network model, or the loss value of the updated BP neural network model. If the loss value is less than or equal to the preset loss value, a preset simulation prediction model is generated; if the loss value is greater than the preset loss value, the target weight and threshold are re-acquired.
[0081] In this embodiment, a preset BP neural network model is trained by using a genetic algorithm and an artificial bee colony algorithm to obtain a simulation prediction model, so as to solve the problem that the traditional BP neural network is prone to fall into the local optimum, resulting in a low bandwidth prediction accuracy.
[0082] In a second aspect, an embodiment of the present application also provides a system for traffic load balancing in an SDN network.
[0083] In one embodiment, referring to Figure 2 , Figure 2 This is a functional module diagram of an embodiment of a system for traffic load balancing in an SDN network of the present application. Figure 2 As shown, the system for traffic load balancing in the SDN network includes:
[0084] The network topology update module 10 is used to manage each switch node in the network and the link information between the ports of each switch, regularly query each switch port and the link information, and update the network topology structure;
[0085] The network status monitoring module 20 is used to obtain the statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes the bandwidth usage rate of each port;
[0086] The link bandwidth prediction module 30 is used to obtain the available bandwidth usage rate of each port of each link at the next moment according to the preset prediction model and the bandwidth usage rate of each port, wherein the preset simulation prediction model is obtained by training the preset BP neural network model through genetic algorithm and / or artificial bee colony algorithm;
[0087] The routing calculation module 40 is used to calculate the available bandwidth usage rate of each port of each link at the next moment to obtain a target path;
[0088] The flow entry installation module 50 is used to install the flow entry and issue the configuration item to the access layer switch according to the target path mapping as the matching flow entry and configuration item.
[0089] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0090] Acquire network topology information of a preset BP neural network model, and generate an initialization population, wherein the network topology information includes information of each network node, and the initialization population includes multiple groups of weight threshold schemes, and each group of weight threshold schemes includes a weight and a threshold;
[0091] Determine a target weight and a target threshold according to preset operation rules, each group of weight threshold schemes and the acquired training data set, wherein the preset operation rules include a genetic algorithm and / or an artificial bee colony algorithm;
[0092] The preset BP neural network model is updated according to the target weight and the target threshold to generate a preset simulation prediction model.
[0093] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0094] Determine a target weight threshold scheme from the weight threshold schemes of each group according to a preset operation rule;
[0095] Calculating the target weight threshold scheme according to the acquired training data set to obtain a nectar source density value;
[0096] If it is determined that the nectar source density value is less than a preset threshold, a preset scout bee rule is used to perform a field search on the target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population;
[0097] If it is determined that the new population satisfies the first preset condition, a target weight and a target threshold are obtained from the new population.
[0098] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0099] Dividing the plurality of groups of weight threshold schemes into a plurality of clusters according to a preset ratio in a preset operation rule, wherein the clusters include a first cluster, a second cluster, a third cluster and a fourth cluster;
[0100] Based on the genetic algorithm, the artificial bee colony algorithm and each of the clusters in the preset operation rules, determining the operation stage of each of the clusters, wherein the operation stage includes a first operation stage, a second operation stage, a third operation stage and a fourth operation stage;
[0101] The first operation stage includes executing a genetic algorithm on the weight threshold scheme in the first cluster to determine a target weight threshold scheme, wherein the genetic algorithm includes a selection operation rule and a crossover operation rule;
[0102] The second operation stage includes executing an artificial bee colony algorithm once and a genetic algorithm twice on the weight threshold scheme in the second cluster to determine a target weight threshold scheme;
[0103] The third operation stage includes executing the artificial bee colony algorithm twice and the genetic algorithm once on the weight threshold scheme in the third cluster to determine the target weight threshold scheme;
[0104] The fourth operation stage includes executing an artificial bee colony algorithm on the weight threshold scheme in the fourth cluster to determine a target weight threshold scheme, wherein the artificial bee colony algorithm includes a leading bee operation rule and a following bee operation rule.
[0105] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0106] Obtaining the sample data to be predicted, the predicted data value and the true value corresponding to the target weight threshold scheme in the training data set, as well as the number of the predicted data values and the number of samples in the training data set;
[0107] Based on the preset fitness formula, the number of predicted data values, the number of samples in the training data set, and the sample data to be predicted, the predicted data value, and the true value corresponding to the target weight threshold scheme, the honey source density value is obtained.
[0108] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0109] If it is determined that the nectar source density value is greater than or equal to the preset threshold, the weight and threshold of the target weight threshold scheme are mutated using the preset mutation operation rule to obtain a mutated target weight threshold scheme;
[0110] The preset scout bee rule is used to perform a field search on the mutated target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population.
[0111] Furthermore, in one embodiment, the system for traffic load balancing in an SDN network further includes a new module for:
[0112] Obtaining the number of iterations of the new population;
[0113] Determining whether a first preset condition is satisfied according to the number of iterations of the new population, wherein the first preset condition is a preset number of iterations;
[0114] If the number of iterations of the new population is greater than or equal to the preset number of iterations, it is determined that the new population meets the first preset condition;
[0115] If the number of iterations of the new population is less than the preset number of iterations, it is determined that the new population does not meet the first preset condition, and a new target weight and a new target threshold in the new population are determined according to a preset operation rule.
[0116] Among them, the functional implementation of each module in the system for traffic load balancing in the above-mentioned SDN network corresponds to the steps in the method embodiment for traffic load balancing in the above-mentioned SDN network, and its functions and implementation processes are no longer repeated here one by one.
[0117] In a third aspect, an embodiment of the present application provides a device for traffic load balancing in an SDN network. The device for traffic load balancing in an SDN network may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0118] Reference Figure 3 , Figure 3 The hardware structure diagram of the device for traffic load balancing in the SDN network involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the device for traffic load balancing in the SDN network may include a processor, a memory, a communication interface, and a communication bus.
[0119] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0120] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to interconnect devices within the device for implementing traffic load balancing in the SDN network, and interfaces for interconnecting devices for implementing traffic load balancing in the SDN network with other devices (such as other computing devices or user devices). Physical interfaces can be Ethernet interfaces, optical fiber interfaces, ATM interfaces, etc.; user devices can be display screens (Display), keyboards (Keyboard), etc.
[0121] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0122] The processor may be a general-purpose processor, and the general-purpose processor may call the program for traffic load balancing in the SDN network stored in the memory, and execute the method for traffic load balancing in the SDN network provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the program for traffic load balancing in the SDN network is called may refer to the various embodiments of the method for traffic load balancing in the SDN network of the present application, and will not be repeated here.
[0123] Those skilled in the art will understand that Figure 3 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0124] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0125] The computer-readable storage medium of the present application stores a program for traffic load balancing in an SDN network, wherein when the program for traffic load balancing in an SDN network is executed by a processor, the steps of the method for traffic load balancing in an SDN network as described above are implemented.
[0126] Among them, the method implemented when the program for traffic load balancing in the SDN network is executed can refer to the various embodiments of the method for traffic load balancing in the SDN network of the present application, and will not be repeated here.
[0127] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0128] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0129] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0130] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0131] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0133] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for traffic load balancing in an SDN network, characterized in that: The method for traffic load balancing in the SDN network includes: Regularly query the port and link information of each switch; Obtaining statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes bandwidth usage of each port; According to the preset simulation prediction model and the bandwidth utilization rate of each port, the available bandwidth utilization rate of each port of each link at the next moment is obtained, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm; Calculate the available bandwidth usage of each port of each link at the next moment to obtain the target path; According to the target path mapping as matching flow table items and configuration items, flow table items are installed and configuration items are issued to the access layer switch.
2. The method for traffic load balancing in an SDN network as claimed in claim 1, characterized in that: Before obtaining the available bandwidth usage rate of each port of each link at the next moment according to the preset simulation prediction model and the bandwidth usage rate of each port, the method further includes: Acquire network topology information of a preset BP neural network model, and generate an initialization population, wherein the network topology information includes information of each network node, and the initialization population includes multiple groups of weight threshold schemes, and each group of weight threshold schemes includes a weight and a threshold; Determine a target weight and a target threshold according to preset operation rules, each group of weight threshold schemes and the acquired training data set, wherein the preset operation rules include a genetic algorithm and / or an artificial bee colony algorithm; The preset BP neural network model is updated according to the target weight and the target threshold to generate a preset simulation prediction model.
3. The method for traffic load balancing in an SDN network as claimed in claim 2, characterized in that: Determining the target weight and target threshold according to the preset operation rules, the weight threshold schemes of each group and the acquired training data set includes: Determine a target weight threshold scheme from the weight threshold schemes of each group according to a preset operation rule; Calculating the target weight threshold scheme according to the acquired training data set to obtain a nectar source density value; If it is determined that the nectar source density value is less than a preset threshold, a preset scout bee rule is used to perform a field search on the target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population; If it is determined that the new population satisfies the first preset condition, a target weight and a target threshold are obtained from the new population.
4. The method for traffic load balancing in an SDN network as claimed in claim 3, characterized in that: Determining a target weight threshold scheme from each group of weight threshold schemes according to a preset operation rule includes: Dividing the plurality of groups of weight threshold schemes into a plurality of clusters according to a preset ratio in a preset operation rule, wherein the clusters include a first cluster, a second cluster, a third cluster and a fourth cluster; Based on the genetic algorithm, the artificial bee colony algorithm and each of the clusters in the preset operation rules, determining the operation stage of each of the clusters, wherein the operation stage includes a first operation stage, a second operation stage, a third operation stage and a fourth operation stage; The first operation stage includes executing a genetic algorithm on the weight threshold scheme in the first cluster to determine a target weight threshold scheme, wherein the genetic algorithm includes a selection operation rule and a crossover operation rule; The second operation stage includes executing an artificial bee colony algorithm once and a genetic algorithm twice on the weight threshold scheme in the second cluster to determine a target weight threshold scheme; The third operation stage includes executing the artificial bee colony algorithm twice and the genetic algorithm once on the weight threshold scheme in the third cluster to determine the target weight threshold scheme; The fourth operation stage includes executing an artificial bee colony algorithm on the weight threshold scheme in the fourth cluster to determine a target weight threshold scheme, wherein the artificial bee colony algorithm includes a leading bee operation rule and a following bee operation rule.
5. The method for traffic load balancing in an SDN network as claimed in claim 3, characterized in that: The target weight threshold scheme is calculated according to the acquired training data set to obtain the honey source density value, including: Obtaining the sample data to be predicted, the predicted data value and the true value corresponding to the target weight threshold scheme in the training data set, as well as the number of the predicted data values and the number of samples in the training data set; Based on the preset fitness formula, the number of predicted data values, the number of samples in the training data set, and the sample data to be predicted, the predicted data value, and the true value corresponding to the target weight threshold scheme, the honey source density value is obtained.
6. The method for traffic load balancing in an SDN network as claimed in claim 3, characterized in that: After calculating the target weight threshold scheme according to the acquired training data set to obtain the nectar source density value, the method further includes: If it is determined that the nectar source density value is greater than or equal to the preset threshold, the weight and threshold of the target weight threshold scheme are mutated using the preset mutation operation rule to obtain a mutated target weight threshold scheme; The preset scout bee rule is used to perform a field search on the mutated target weight threshold scheme to obtain a first weight and a first threshold, and generate a new population.
7. The method for traffic load balancing in an SDN network as claimed in claim 3, characterized in that: If it is determined that the new population satisfies the first preset condition, before obtaining the target weight and the target threshold from the new population, the method further includes: Obtaining the number of iterations of the new population; Determining whether a first preset condition is satisfied according to the number of iterations of the new population, wherein the first preset condition is a preset number of iterations; If the number of iterations of the new population is greater than or equal to the preset number of iterations, it is determined that the new population meets the first preset condition; If the number of iterations of the new population is less than the preset number of iterations, it is determined that the new population does not meet the first preset condition, and a new target weight and a new target threshold in the new population are determined according to a preset operation rule.
8. A system for traffic load balancing in an SDN network, characterized in that: The system for traffic load balancing in the SDN network includes: A network topology update module is used to manage each switch node in the network and the link information between the ports of each switch, regularly query each switch port and the link information, and update the network topology structure; A network status monitoring module, used for obtaining statistical information of each port and flow table of each switch through periodic polling of the controller, wherein the statistical information includes bandwidth usage of each port; A link bandwidth prediction module, used to obtain the available bandwidth usage rate of each port of each link at the next moment according to a preset prediction model and the bandwidth usage rate of each port, wherein the preset simulation prediction model is obtained by training a preset BP neural network model through a genetic algorithm and / or an artificial bee colony algorithm; A routing calculation module, used to calculate the available bandwidth usage rate of each port of each link at the next moment to obtain a target path; The flow table item installation module is used to install the flow table items and send the configuration items to the access layer switch according to the target path mapping as matching flow table items and configuration items.
9. A traffic load balancing in an SDN network, characterized in that: The traffic load balancing in the SDN network includes a processor, a memory, and a traffic load balancing program in the SDN network stored in the memory and executable by the processor, wherein when the traffic load balancing program in the SDN network is executed by the processor, the steps of the method for traffic load balancing in the SDN network as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a traffic load balancing program in an SDN network, wherein when the traffic load balancing program in the SDN network is executed by a processor, the steps of the method for traffic load balancing in an SDN network as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
SDN link distribution method based on BP neural network
CN110198280A
SDN load balancing method and system based on Q-learning
CN113347108A
Air quality prediction method and device, equipment and storage medium
CN113610297A
Big data fault diagnosis method for aeronautical manufacturing equipment
CN115952824A
Performance of artificial neural network models in the presence of instrumental noise and measurement errors
US20030191728A1
