Method, system, device and storage medium for traffic load balancing in SDN network
By regularly querying switch information in the SDN network, periodically polling bandwidth usage, using genetic algorithms and artificial bee colony algorithms to train the BP neural network model, and predicting and configuring the optimal path, the problem of poor load balancing in the SDN network is solved and more efficient load balancing is achieved.
Patent Information
- Application Number
- CN202410936856.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-07-12
AI Technical Summary
In SDN networks, due to the delay in the controller's periodic access to network status information, the routing calculation results are not optimal, some links are heavily loaded, and the load balancing effect is poor.
By periodically querying switch port and link information and periodically polling to obtain bandwidth utilization, the BP neural network model is trained using genetic algorithms and artificial bee colony algorithms to predict the available bandwidth at the next moment, calculate the target path, and map flow table entries for configuration to achieve load balancing.
It improves the accuracy of bandwidth prediction, avoids network status information delay, enhances load balancing effect, and reduces congestion on some links in the network.
Smart Images

Figure CN118921324B_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] As SDN networks expand, they are facing issues like low flow table utilization and high matching and forwarding latency. To address these issues, network status information from multiple paths in the network topology can be obtained in real time and weighted to select the optimal scheduling path. However, since the link status information underlying routing calculations is constantly changing, the network status information obtained through periodic controller access has a certain latency, resulting in suboptimal routing calculations and congestion on some links in the network, leading to poor load balancing. 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 the 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, the method for traffic load balancing in an SDN network comprising:
[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 by the controller, wherein the statistical information includes bandwidth usage of each port;
[0007] Obtaining the available bandwidth usage of each port of each link at the next moment according to a preset simulation prediction model and the bandwidth usage 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;
[0008] Calculating the available bandwidth usage of each port of each link at the next moment to obtain a target path;
[0009] According to the target path mapping, the flow table items and configuration items are matched, and the flow table items are installed and the configuration items are issued to the access layer switch.
[0010] In conjunction with the first aspect, in one embodiment, before obtaining the available bandwidth usage rate of each port of each link at the next moment based on the preset simulation prediction model and the bandwidth usage rate of each port, the method further includes:
[0011] Obtaining network topology information of a preset BP neural network model and generating 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, each group of the weight threshold schemes including a weight and a threshold;
[0012] Determining target weights and target thresholds 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 conjunction with the first aspect, in one embodiment, determining the target weight and target threshold according to the preset operation rules, each group of the weight threshold schemes, and the obtained 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 meets the first preset condition, a target weight and a target threshold are obtained from the new population.
[0019] In conjunction with the first aspect, in one embodiment, determining the target weight threshold scheme from each group of weight threshold schemes according to a preset operation rule includes:
[0020] Dividing the plurality 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] Determining an operation stage for each cluster based on the genetic algorithm, the artificial bee colony algorithm, and each cluster in the preset operation rules, 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 embodiment, the target weight threshold scheme is calculated based on the acquired training data set to obtain the nectar 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] The nectar source density value is obtained 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.
[0029] In combination with the first aspect, in one embodiment, after calculating the target weight threshold scheme based on the acquired training data set to obtain the nectar 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 preset mutation operation rule is used to mutate the weight and threshold of the target weight threshold scheme to obtain a mutated target weight threshold scheme;
[0031] A 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 conjunction with the first aspect, in one embodiment, if it is determined that the new population satisfies the first preset condition, before obtaining the target weight and 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, determining 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, wherein 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, configured to obtain statistical information of each port and flow table of each switch through periodic polling by a controller, wherein the statistical information includes bandwidth usage of each port;
[0040] A link bandwidth prediction module, configured to obtain the available bandwidth usage rate of each port of each link at the next moment based on 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 using a genetic algorithm and / or an artificial bee colony algorithm;
[0041] A routing calculation module is used to calculate the available bandwidth usage of each port of each link at the next moment to obtain a target path;
[0042] The flow table entry installation module is used to install the flow table entry and issue the configuration item to the access layer switch according to the target path mapping to the matching flow table entry and configuration item.
[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 includes a processor, a memory, and an SDN network traffic load balancing program stored on the memory and executable by the processor, wherein when the SDN network traffic load balancing program 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. 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 described above are implemented.
[0045] The beneficial effects brought about by the technical solution provided by the embodiment of the present application include: periodically querying the information of each port and link of each switch; obtaining 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 utilization rate of each port; 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 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; mapping the target path 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 in the related art that the network status information obtained through periodic access of the 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, and adopting the preset simulation prediction model to improve the bandwidth prediction accuracy, avoid the delay of network status information, and 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 an apparatus 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 the device for traffic load balancing in the SDN network involved in the embodiment of the present application. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, 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 this application are explained to facilitate those skilled in the art to understand this application.
[0051] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this 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 this application. Figure 1 As shown in Figure 2, traffic load balancing methods in SDN networks include:
[0054] Step S10: Regularly query the port and link information of each switch;
[0055] For example, it mainly manages each switch node in the network and the port link information between each switch. Through the Netconf and OpenFlow related protocols, it regularly queries the switch port and link information 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 by 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 the bandwidth usage of each port, and the system saves the 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 based on a 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 using 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 a preset simulation prediction model and monitored switch port information. The preset simulation prediction model uses multiple stored historical bandwidth information to predict the port bandwidth utilization rate at the next moment. Before initializing weights and thresholds, the preset simulation prediction model combines the respective advantages of a genetic algorithm and / or an artificial bee colony algorithm to find the optimal initial weights and thresholds for the neural network. This addresses the problem of traditional BP neural networks being prone to falling into local optimality and resulting in low bandwidth prediction accuracy.
[0060] Step S40: Calculate the available bandwidth usage of each port of each link at the next moment to obtain a target path;
[0061] For example, by learning from historical port bandwidth data using a pre-configured BP neural network model, we can determine the optimal weight (W) and threshold (θ), thereby predicting the bandwidth utilization of each switch port at the next moment. At a future moment, when the source and destination addresses of traffic are known, we can exhaustively enumerate all paths through routing calculations. Then, we can use the predicted minimum port bandwidth utilization to find the optimal path at that future moment. We can also calculate the top n optimal paths for load balancing or active / standby protection, using the found optimal path as the target path.
[0062] The controller can periodically send messages to check the connectivity of the target path calculated by the routing to prevent the calculated path from 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, the flow table items and configuration items are matched, and the flow table items are installed and the configuration items are issued to the access layer switch.
[0064] Exemplarily, by mapping the target path to a matching flow table entry and configuration item, the flow table entry is installed and the configuration item is distributed to the access layer switch, thereby avoiding delays in network status information and improving load balancing effects.
[0065] In this embodiment, the information of each port and link of each switch is queried periodically; the statistical information of each port and flow table of each switch is obtained through periodic polling by 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 matching flow table items and configuration items are mapped to the access layer switch, and the flow table items are installed and the configuration items are issued. This solves the technical problem in the related art that the network status information obtained through periodic access by the controller 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 heavy and congested, and the load balancing effect to be poor. The preset simulation prediction model is used to improve the bandwidth prediction accuracy, avoid the delay in network status information, and improve the load balancing effect.
[0066] Furthermore, in one embodiment, before obtaining the available bandwidth usage rate of each port of each link at the next moment based on the preset simulation prediction model and the bandwidth usage rate of each port, the method further includes:
[0067] Obtain 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 the weight threshold schemes includes weights and thresholds; determine target weights and target thresholds according to preset operation rules, each group of the weight threshold schemes and the obtained training data set, wherein the preset operation rules include genetic algorithms and / or artificial bee colony algorithms; update the preset BP neural network model according to the target weights and the target thresholds 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 the initialization population is generated.
[0069] A target weight threshold scheme is determined from the weight threshold schemes described in each group according to a genetic algorithm; the target weight threshold scheme is calculated based on the obtained training data set to obtain a nectar source density value; if the nectar source density value is determined to be 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 the new population is determined to meet the first preset condition, the target weight and target threshold are obtained from the new population. Alternatively, a target weight threshold scheme is determined from the weight threshold schemes described in each group according to an artificial bee colony algorithm; the target weight threshold scheme is calculated based on the obtained training data set to obtain a nectar source density value; if the nectar source density value is determined to be less than the preset threshold, the 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 the new population is determined to meet the first preset condition, the target weight and target threshold are obtained 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 based on 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 meets the first preset condition, the target weight and target threshold are obtained from the new population.
[0070] Specifically, the method of determining the target weight threshold scheme from each group of weight threshold schemes according to the preset operation rules includes: dividing the multiple groups of weight threshold schemes into multiple clusters according to the preset ratio in the preset operation rules, wherein the clusters include a first cluster, a second cluster, a third cluster and a fourth cluster; determining the operation stage of each cluster based on the genetic algorithm, the artificial bee colony algorithm and each cluster in the preset operation rules, 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 the 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 the 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 the 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. 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, the genetic algorithm is executed once; if the current operation stage is determined to be the second operation stage, the 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, the 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, the artificial bee colony algorithm is executed once to determine the target weight threshold scheme.
[0072] The genetic algorithm includes selection and crossover rules. The selection rule selects two weight threshold schemes from the first cluster as the parent and parent groups. The crossover probability parameter in the crossover rule then determines whether to perform a crossover. Real number encoding has been established during the weight threshold scheme encoding phase. Single-point crossover involves randomly selecting a node in the weight threshold scheme and then crossing the nodes of the corresponding segments of the parent and parent groups to generate an optimal weight threshold scheme. This optimal weight threshold scheme is then used as the target weight threshold scheme.
[0073] The artificial bee colony algorithm (ABC) consists of a leader bee and a follower bee. The leader bee rule involves each leader bee in a cluster of weighted threshold schemes corresponding to a specific weighted threshold scheme. The leader phase involves sequentially performing a neighborhood search on each weighted threshold scheme within the set. When performing a neighborhood search on weighted threshold scheme A, the algorithm first selects a few nodes according to the rules. Then, a weighted threshold scheme B is randomly selected from the set of weighted threshold schemes. The corresponding nodes of the two schemes are swapped to generate a new weighted threshold scheme C. If the swapped nodes have the same data, the algorithm reselects weighted threshold scheme B until they are different. Finally, a greedy algorithm is used. If the fitness of the new weighted threshold scheme C is greater than that of scheme A, scheme C replaces weighted threshold scheme A; otherwise, it remains unchanged. The follower bee rule involves further neighborhood search based on the best weighted threshold schemes found by the leader bee. First, a superior weighted threshold scheme is selected from the set of weighted threshold schemes using a roulette wheel strategy. The same neighborhood search method as in the leader phase is then used. Finally, a greedy algorithm is used to select the best weighted threshold scheme and set it as the target weighted 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 the 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 dataset 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 a preset threshold. If the nectar source density value is determined to be less than the preset threshold, a domain search is performed on the target weight threshold solution using the preset scout bee rule to obtain a first weight and a first threshold, and a new population is generated. If the new population is determined to meet the first preset condition, the target weight and target threshold are obtained from the new population. For example, a domain search is performed on the target weight threshold solution using the scout bees in the preset scout bee rule. If other weight threshold solutions are found within the domain, the weights and thresholds of the other weight threshold solutions are obtained and used as the first weight and threshold. Alternatively, if multiple weight threshold solutions are found within the domain, the location of each weight threshold solution is obtained, and the weight threshold solution with a location close to the target weight threshold solution is selected. Generating a new population based on the first weight and the first threshold includes generating a new population based on the first weight and the first threshold solution separately. The new population includes the first weight and the first threshold obtained after initializing all weight threshold solutions within the population according to the preset operation rules. Alternatively, a new weight threshold scheme is generated using the first weight and the first threshold and placed into an initial 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 satisfied. 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. 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 the nectar source density is determined to be greater than or equal to a preset threshold, the weights and thresholds of the target weight threshold scheme are mutated using a preset mutation operation rule to obtain a mutated target weight threshold scheme. A domain search is performed on the mutated target weight threshold scheme using a preset scout bee rule to obtain a first weight and a first threshold, and a new population is generated. For example, if the nectar source density is determined to be greater than or equal to a preset threshold, the weights and thresholds of the target weight threshold scheme are mutated using a preset mutation operation rule, i.e., the weights and thresholds in the target weight threshold scheme are modified to obtain a mutated target weight threshold scheme. If multiple weight threshold schemes are found within the domain, the location of each weight threshold scheme is obtained, and a weight threshold scheme with a location 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 based on the first weight and the first threshold scheme. The new population includes the first weights and the first thresholds obtained for all weight threshold schemes in the initial population according to the preset operation rule. Alternatively, the new weight threshold scheme generated based on the first weight and the first threshold is added to the initial 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 value 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 meets 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 based on 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 meets 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 meet 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 compared with a preset number of iterations. If the number of iterations for the new population is greater than or equal to the preset number of iterations, the nectar source density values of each weighted threshold scheme are obtained from the new population. The weighted threshold scheme with the largest nectar source density value is selected, and the weight and threshold of the weighted threshold scheme with the largest nectar source density value are obtained as the target weight and target threshold. If the number of iterations for the new 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 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 falling into local optimality, resulting in low bandwidth prediction accuracy.
[0082] In a second aspect, an embodiment of the present application further 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 in Figure 1, the traffic load balancing system in the SDN network includes:
[0084] The network topology update module 10 is used to manage the switch nodes in the network and the link information between the ports of each switch, regularly query the switch ports and the link information, and update the network topology structure;
[0085] The network status monitoring module 20 is configured to obtain 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;
[0086] The link bandwidth prediction module 30 is configured to obtain the available bandwidth usage rate of each port of each link at the next moment based on 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 using a genetic algorithm and / or an artificial bee colony algorithm;
[0087] The routing calculation module 40 is used to calculate the available bandwidth usage of each port of each link at the next moment to obtain a target path;
[0088] The flow entry installation module 50 is configured to install the flow entry and issue the configuration item to the access layer switch according to the target path mapping to 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] Obtaining network topology information of a preset BP neural network model and generating 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, each group of the weight threshold schemes including a weight and a threshold;
[0091] Determining target weights and target thresholds 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 meets 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 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] Determining an operation stage for each cluster based on the genetic algorithm, the artificial bee colony algorithm, and each cluster in the preset operation rules, 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, the genetic algorithm including 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] The nectar source density value is obtained 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.
[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 preset mutation operation rule is used to mutate the weight and threshold of the target weight threshold scheme to obtain a mutated target weight threshold scheme;
[0110] A 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, determining 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 embodiment of the method for traffic load balancing in the above-mentioned SDN network, and their functions and implementation processes are not 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, a server, or other device with data processing capabilities.
[0118] Reference Figure 3 , Figure 3 Schematic diagram of the hardware structure of the device for traffic load balancing in the SDN network involved in the embodiment of the present application. 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, memory, and communication interface.
[0120] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces, which interconnect components within devices used to implement traffic load balancing in SDN networks. They also connect devices used to implement traffic load balancing in SDN networks to other devices (such as other computing devices or user devices). Physical interfaces can include Ethernet, fiber, or ATM interfaces; user devices can include displays and keyboards.
[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 that can call a program for traffic load balancing in an SDN network stored in a memory and execute the method for traffic load balancing in an SDN network provided in an 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 an SDN network is called can refer to the various embodiments of the method for traffic load balancing in an 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 to the present application and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[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 for description only 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 the "first", "second" and "third" to different types.
[0129] In the description of the embodiments of this application, the words "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 this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.
[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; “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 are included that appear in a specific order. However, it should be understood that these operations or steps may not be performed in the order in which they appear in the embodiments of the present application or may be performed in parallel. The sequence numbers of the operations are only used to distinguish between different operations, and the sequence numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be performed 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 the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, 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, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling 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 do not 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 by the controller, wherein the statistical information includes bandwidth usage of each port; Obtaining network topology information of a preset BP neural network model and generating 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, each group of the weight threshold schemes including a weight and a threshold; Determining target weights and target thresholds 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; Update the preset BP neural network model according to the target weight and the target threshold to generate a preset simulation prediction model; 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 meets the first preset condition, obtaining a target weight and a target threshold from the new population; Obtaining the available bandwidth usage of each port of each link at the next moment according to a preset simulation prediction model and the bandwidth usage 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; Calculating the available bandwidth usage of each port of each link at the next moment to obtain a target path; According to the target path mapping, the flow table items and configuration items are matched, and the flow table items are installed and the configuration items are issued to the access layer switch.
2. The method for traffic load balancing in an SDN network according to claim 1, wherein: Determining a target weight threshold scheme from each group of weight threshold schemes according to a preset operation rule includes: Dividing the plurality 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; Determining an operation stage for each cluster based on the genetic algorithm, the artificial bee colony algorithm, and each cluster in the preset operation rules, 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, the genetic algorithm including 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.
3. The method for traffic load balancing in an SDN network according to claim 1, wherein: The target weight threshold scheme is calculated based on 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; The nectar source density value is obtained 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.
4. The method for traffic load balancing in an SDN network according to claim 1, wherein: After calculating the target weight threshold scheme based on 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 preset mutation operation rule is used to mutate the weight and threshold of the target weight threshold scheme to obtain a mutated target weight threshold scheme; A 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.
5. The method for traffic load balancing in an SDN network according to claim 1, wherein: If it is determined that the new population satisfies the first preset condition, before obtaining the target weight and 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, determining 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.
6. 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, configured to obtain statistical information of each port and flow table of each switch through periodic polling by a controller, wherein the statistical information includes bandwidth usage of each port; Obtaining network topology information of a preset BP neural network model and generating 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, each group of the weight threshold schemes including a weight and a threshold; Determining target weights and target thresholds 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; Update the preset BP neural network model according to the target weight and the target threshold to generate a preset simulation prediction model; 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 meets the first preset condition, obtaining a target weight and a target threshold from the new population; A link bandwidth prediction module, configured to obtain the available bandwidth usage rate of each port of each link at the next moment based on a preset simulation 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 using a genetic algorithm and / or an artificial bee colony algorithm; A routing calculation module is used to calculate the available bandwidth usage of each port of each link at the next moment to obtain a target path; The flow table entry installation module is used to install the flow table entry and issue the configuration item to the access layer switch according to the target path mapping to the matching flow table entry and configuration item.
7. A device for traffic load balancing in an SDN network, characterized in that: The device for traffic load balancing in an SDN network includes a processor, a memory, and an SDN network traffic load balancing program stored on the memory and executable by the processor, wherein when the SDN network traffic load balancing program is executed by the processor, the steps of the method for traffic load balancing in an SDN network according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium 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 according to any one of claims 1 to 5 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