SDN controller redistribution method and system based on particle swarm optimization

Through the SDN controller redistribution method based on particle swarm algorithm, the problem of load balancing and delay consideration in the satellite Internet is solved, load balancing and delay minimization are achieved, frequent switch migration is avoided, and system performance is improved.

CN120301852APending Publication Date: 2025-07-11CHINA ELECTRONICS TECH GRP NO 7 RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510454943.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The load balancing method of the SDN controller in the satellite Internet is insufficient in the global optimization capability, and cannot take into account load balancing and minimize delays, resulting in frequent switch migration and high communication delays.

Method used

The SDN controller redistribution method based on particle swarm algorithm is adopted. By calculating the propagation delay weight allocation between the controller and the switch, the particle swarm optimization algorithm is used to optimize the allocation ratio of the flow table request instructions, and load balancing between SDN controllers is realized and propagation delay is minimized.

Benefits of technology

Load balancing between SDN controllers is realized, frequent migration of switches is avoided, communication delay is reduced, and system stability and efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120301852A_ABST
    Figure CN120301852A_ABST
Patent Text Reader

Abstract

The invention provides an SDN (Software Defined Network) controller redistribution method based on a particle swarm optimization algorithm, which relates to the technical field of satellite internet, and comprises the following steps: firstly, calculating the average propagation time delay and the maximum propagation time delay of a controller in a period, and carrying out weighted distribution on the average propagation time delay and the maximum propagation time delay; the minimum weighted allocation result is used as a static deployment objective function of the SDN controller and is solved, and static deployment of the initial controller and initial allocation of the switch are completed, so that frequent switch migration is avoided; the method comprises the following steps: receiving a data stream sent by user equipment by using a switch, sending a flow table request instruction to an initial controller allocated by the switch, and if a processing load of the flow table request instruction exceeds a preset load threshold value of the initial controller, optimizing an allocation proportion of the flow table request instruction by using a particle swarm optimization algorithm, and distributing the flow table request instruction to the controller in the set range for the switch according to the optimized distribution proportion, thereby realizing load balancing between the SDN controllers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of satellite Internet, and more specifically, to a method and system for reallocating an SDN controller based on a particle swarm algorithm. Background Art

[0002] Satellite Internet is a new network service mode that realizes global Internet access based on satellite communication technology. Its core is to deploy satellites in the air to replace or supplement ground base stations, providing high-bandwidth, flexible and convenient Internet services for areas where traditional communication infrastructure is difficult to cover, such as ground, ocean, and remote areas. Satellite Internet is in a period of rapid development. Among them, low-earth orbit satellites have attracted more attention than other medium and high-latitude satellites due to their shorter communication delay and smaller transmission loss. Software Defined Network (SDN) technology, as a key technology for future satellite Internet, can achieve unified and flexible management and control of satellite Internet by decoupling the control plane and the data plane.

[0003] A satellite Internet system consists of low-earth orbit satellites, gateway stations, and a ground central controller. The low-earth orbit satellites operate in several orbital planes, and each satellite can directly communicate with four adjacent satellites in the same orbit and different orbits through inter-satellite links. As Figure 1 shown, in an SDN-based satellite Internet system, all satellites are SDN switches. Among them, some satellites can serve as SDN controllers. The control and switching functions of these satellites coexist in the same physical device but are logically separated. According to the SDN communication protocol, when a switch receives a new data stream, it will generate a flow table request message. Each SDN controller is responsible for a part of the flow tables of the SDN switches, that is, the rule set in the SDN switches, and is uniformly managed by the ground central controller. After the SDN switch requests and receives the flow table instructions from the SDN controller, it forwards the data packets according to the flow table.

[0004] However, the satellite Internet system is large in scale and has characteristics such as highly dynamic topology, uneven traffic distribution, and limited on-board resources, which pose great challenges to the deployment of SDN controllers.

[0005] The basic idea of the prior art is to regard the propagation delay between the switch and the controller as the management and control delay, and sacrifice the management and control delay to achieve load balancing among the controllers. In fact, in addition to the network topology, the relationship between the change of the management and control delay and the controller load is also very close. Due to the limited on-board resources, the increase in controller load caused by the increase in traffic will also increase the management and control delay. The prior art lacks the analysis of the impact of joint topology and traffic changes on the management and control delay, but performs controller reallocation after detecting topology changes or controller overload, which will inevitably lead to frequent migrations of switches and generate unnecessary migration overhead.

[0006] The prior art proposes a prediction-based SDN load balancing dual-weight switch migration method and system for satellite Internet. By real-time monitoring the controller load to construct a traffic collection matrix, using the LSTM-RNN model and historical sliding window data to train the model to predict future loads, switches can be migrated earlier to balance the load, thus reducing the time spent on migration. When selecting switches for migration, a dual-weight switch migration algorithm is adopted, which assigns weights to the current load and predicted load of each switch, simplifies the calculation, and avoids frequent movement of switches. However, the global optimization ability of this algorithm is insufficient, and it cannot take into account the two goals of load balancing and minimizing latency. When achieving load balancing, it may lead to a relatively high communication latency between switches. Summary of the Invention

[0007] To solve the problem that the current switch migration method for SDN load balancing has insufficient global optimization ability and cannot take into account both load balancing and minimizing latency, the present invention proposes a method and system for reallocating SDN controllers based on the particle swarm algorithm. By making full use of the periodicity and predictability of satellite operation, the initial allocation of controllers at the switch level is completed, avoiding frequent movement of switches. The particle swarm algorithm is used to optimize the allocation ratio of flow table request instructions, minimizing the propagation latency while achieving load balancing among SDN controllers.

[0008] To achieve the above technical effects, the technical solution of the present invention is as follows:

[0009] An SDN controller reallocation method based on the particle swarm algorithm, comprising the following steps:

[0010] S1. Based on the propagation latency between a controller and any switch it manages, calculate the average propagation latency and the maximum propagation latency of the controller within one cycle;

[0011] S2. Weightedly allocate the average propagation latency and the maximum propagation latency, take the minimized result of the weighted allocation as the objective function and solve it. Based on the solution result, allocate an initial controller to the switch to complete the static deployment of the initial controller;

[0012] S3. Use the switch to receive the data stream sent by the user device and use the switch to send a flow table request instruction to the initial controller allocated to it;

[0013] S4. Determine whether the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller. If so, trigger the controller reallocation mechanism and execute step S5; otherwise, send the flow table request instruction to the initially allocated controller;

[0014] S5. Optimize the allocation ratio of flow table request instructions using the particle swarm optimization algorithm. Based on the number of controllers within the set range of the switch, allocate the flow table request instructions to the controllers within the set range for the switch according to the optimized allocation ratio.

[0015] In this technical solution, first, based on the propagation delay between a controller and any switch it manages, calculate the average propagation delay and the maximum propagation delay of the controller within one cycle according to the topology of each time slice, and weightedly allocate the average propagation delay and the maximum propagation delay. Take the minimum of the weighted allocation results as the static deployment objective function of the SDN controller and solve it to complete the initial static deployment of the controller and the initial allocation of the switch, avoiding large-scale switch migration; use the switch to receive the data stream sent by the user device and send a flow table request instruction to its allocated initial controller. If the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller, use the particle swarm optimization algorithm to optimize the allocation ratio of the flow table request instructions, and allocate the flow table request instructions to the controllers within the set range for the switch according to the optimized allocation ratio, realizing the load balancing among SDN controllers.

[0016] Preferably, for the average propagation delay avgδ of the controller c within one cycle described in step S1 i the expression is: i

[0017]

[0018] where |S| is the size of the switch set, that is, the total number of switches in the network; T is the set of time slices within one cycle, that is, one time cycle T is divided into several time slices, and the time slice is a short time window. The propagation delay between the controller and the switch remains unchanged within one time slice, |T| is the cycle length, and δ ij (t) is the propagation delay between the controller and any switch it manages;

[0019] For the maximum propagation delay maxδ of c within one cycle described in step S1 i the expression is: i

[0020]

[0021] Preferably, the expression of the static deployment objective function Ω of the SDN controller described in step S2 is:

[0022]

[0023] where w1 and w2 are set weighting coefficients, avgδ i is the average propagation delay, maxδ​​i is the maximum propagation delay;

[0024] The objective function is a linear programming function. The objective function is solved using a linear programming function solving algorithm, and the solution result is used as the optimal satellite node for static deployment of the SDN controller. An initial controller is assigned to the switch according to the shortest distance between the switch and the controller, and the initial controller static deployment is completed.

[0025] Preferably, the flow table is a set of rules for processing data streams. When the switch receives a new data stream and there is no matching flow table locally in the switch, a flow table request instruction is sent to the initially assigned controller. For the controller, if the load of processing the flow table request instruction is less than the preset threshold of the controller, no reallocation of the controller is required; if the load of processing the flow table request instruction exceeds the preset threshold of the controller, controller reallocation is performed, and the flow table request instruction is proportionally allocated to different controllers.

[0026] Preferably, step S5 includes the following process:

[0027] S51. Initialize the position and velocity of each particle individual in the particle swarm;

[0028] S52. Calculate the fitness corresponding to the position of each particle individual in the particle swarm, and update the optimal position of the particle individual based on the fitness;

[0029] S53. Update the global optimal position and the number of iterations of the particle swarm based on the optimal position of the particle individual;

[0030] S54. Determine whether the number of iterations is less than the maximum number of iterations. If so, update the velocity of the particle based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and update the position of the particle based on the updated velocity of the particle, and return to S52; if the number of iterations is not less than the maximum number of iterations, allocate the flow table request instruction to the controller within the set range for the switch according to the optimized allocation ratio.

[0031] Preferably, the particle individual position x i is the ratio of the switch to allocate the flow table request instruction to the controller within the set range, and the expression is:

[0032] x i = {x i1 , x i2 , …, x id , …, x iD}

[0033] where i = 1, 2, …, N, d ∈ D, N is the particle swarm size, D represents the number of known controllers within the set range of the switch, and x id(t) represents the proportion of the flow table request instructions sent by the switch to the d-th controller within the range in the total flow table request instructions sent by the switch.

[0034] Preferably, the process of initializing the positions and velocities of each particle individual in the particle swarm in step S51 is as follows:

[0035] Randomly initialize the positions of each particle;

[0036] Set the initial velocity value of each particle to 0.

[0037] Preferably, the expression of the fitness function F for calculating the fitness of the position of the particle individual is:

[0038] F = α·ξ l +β·ξ d

[0039] where α and β are the influence weight parameters of the fitness function F, and ξ l is the load difference between controllers, and ξ d is the average propagation delay between the switch and the controller d;

[0040] Update the optimal position p of the particle individual based on the fitness, and the process is as follows: i :

[0041] Compare the fitness of the particle individual i in the d-th dimension at time t and time t + 1, and select the one with the smaller fitness as the optimal position p of the particle individual i in the d-th dimension id , and the expression is:

[0042]

[0043] Integrate the optimal positions of the particle individual i in all solution space dimensions D to obtain the optimal position p of the particle individual i i , and the expression is:

[0044] p i = {p i1 , p i2 , …, p id , …, p iD}.

[0045] Preferably, the global optimal position g of the particle swarm in step S53 is the position of the particle individual with the smallest fitness selected from the optimal positions of all particle individuals, and the expression is:

[0046] g = min{F(p1), F(p2), …, F(p N )}

[0047] The expression for updating the iteration number is:

[0048] I = I + 1.

[0049] Preferably, the process of step S54 is as follows:

[0050] Determine whether the iteration number I is less than the maximum iteration number I max , if so, update the velocity of particle individual i in dimension d based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and the expression is:

[0051] v id (t + 1) = wv id (t) + c1r1(p id -x id (t)) + c2r2(g d -x id (t)

[0052] where w is the inertia weight, r1 and r2 are random numbers in [0, 1], c1 and c2 are the local learning factor for adjusting the individual part and the global learning factor for adjusting the social part respectively, and g d is the global optimal position of the particle swarm in dimension d;

[0053] The inertia weight w is a linearly decreasing inertia weight, and the expression is:

[0054] w = w max -((w max -w min ) / I max ) × I

[0055] where w max is the maximum value of the inertia weight, and w min is the minimum value of the inertia weight;

[0056] Based on the updated velocity v id (t + 1) of particle individual i, update the position x id (t + 1) of particle individual i, and the expression is:

[0057] x id (t + 1) = x id (t) + v id (t + 1)

[0058] Return to S52 to update the optimal position of the particle individual again;

[0059] When the iteration number I is not less than the maximum iteration number I max , output the current global optimal position g of the particle swarm as the optimal allocation ratio.

[0060] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:

[0061] The present invention proposes a method for reallocating SDN controllers based on the particle swarm optimization algorithm. First, based on the propagation delay between a controller and any switch it manages, and taking the topology of each time slice as the basis, the average propagation delay and the maximum propagation delay of the controller within one cycle are calculated, and the average propagation delay and the maximum propagation delay are weighted and allocated. The minimum value of the weighted allocation result is used as the static deployment objective function of the SDN controller and solved, completing the initial static deployment of the controller and the initial allocation of switches, avoiding large-scale switch migrations; the switch receives the data stream sent by the user device and sends a flow table request instruction to its allocated initial controller. If the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller, the particle swarm optimization algorithm is used to optimize the allocation ratio of the flow table request instruction. According to the optimized allocation ratio, the flow table request instruction is allocated to the controller within the set range for the switch, realizing load balancing among SDN controllers. Description of the Drawings

[0062] Figure 1 A schematic diagram showing the SDN-based satellite Internet proposed in the background art of the present invention;

[0063] Figure 2 A schematic flowchart showing a method for reallocating SDN controllers based on the particle swarm optimization algorithm proposed in Embodiment 1 of the present invention;

[0064] Figure 3 A schematic diagram showing the controller reallocation mechanism proposed in Embodiment 2 of the present invention;

[0065] Figure 4 A schematic flowchart showing the process of optimizing the allocation ratio of the flow table request instruction by using the particle swarm optimization algorithm proposed in Embodiment 2 of the present invention. Detailed Embodiments

[0066] The drawings are only for illustrative purposes and should not be construed as limitations on this patent;

[0067] For better illustration of this embodiment, some parts of the drawings are omitted, enlarged or reduced, and do not represent the actual size;

[0068] For those skilled in the art, it is understandable that some well-known content descriptions in the drawings may be omitted.

[0069] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.

[0070] The description of the positional relationship in the drawings is only for illustrative purposes and should not be construed as limitations on this patent;

[0071] Embodiment 1

[0072] This embodiment proposes a method for reallocating SDN controllers based on the particle swarm optimization algorithm. The schematic diagram of the process of this method can be seen in Figure 2 , and it includes the following steps:

[0073] S1. Based on the propagation delay between a controller and any switch it manages, calculate the average propagation delay and the maximum propagation delay of the controller within one cycle;

[0074] S2. Weightedly allocate the average propagation delay and the maximum propagation delay, take the minimization of the weighted allocation result as the objective function and solve it. Based on the solution result, allocate an initial controller for the switch to complete the static deployment of the initial controller;

[0075] S3. Use the switch to receive the data stream sent by the user device, and use the switch to send a flow table request instruction to the initial controller allocated to it;

[0076] S4. Determine whether the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller. If so, trigger the controller reallocation mechanism and execute step S5; otherwise, send the flow table request instruction to the initially allocated controller;

[0077] S5. Use the particle swarm optimization algorithm to optimize the allocation ratio of the flow table request instruction. Based on the number of controllers within the set range of the switch, allocate the flow table request instruction for the switch to the controllers within the set range according to the optimized allocation ratio.

[0078] In this embodiment, first, based on the propagation delay between a controller and any switch it manages, and taking the topology of each time slice as the basis, calculate the average propagation delay and the maximum propagation delay of the controller within one cycle and weightedly allocate the average propagation delay and the maximum propagation delay. Take the minimization of the weighted allocation result as the objective function for the static deployment of the SDN controller and solve it to complete the static deployment of the initial controller and the initial allocation of the switch, avoiding large-scale switch migrations; use the switch to receive the data stream sent by the user device and send a flow table request instruction to the initial controller allocated to it. If the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller, use the particle swarm optimization algorithm to optimize the allocation ratio of the flow table request instruction, and allocate the flow table request instruction for the switch to the controllers within the set range according to the optimized allocation ratio, realizing the load balancing among SDN controllers.

[0079] Embodiment 2

[0080] In this embodiment, for the average propagation delay avgδ of the controller c within one cycle described in step S1 i i The expression is: ​

[0081]

[0082] Where, |S| is the size of the switch set, that is, the total number of switches in the network; T is the set of time slices in a period, that is, a time period T is divided into several time slices, and the time slice is a short time window. The propagation delay between the controller and the switch remains unchanged within a time slice, |T| is the period length, and δ ij (t) is the propagation delay between the controller and any switch it manages;

[0083] The maximum propagation delay maxδ of c within one period described in step S1 i has the following expression: i is:

[0084]

[0085] In this embodiment, the expression of the SDN controller static deployment objective function Ω described in step S2 is:

[0086]

[0087] Where, w1 and w2 are set weighting coefficients, avgδ i is the average propagation delay, and maxδ i is the maximum propagation delay;

[0088] The objective function is a linear programming function. The linear programming function solving algorithm is used to solve the objective function. The solution result reflects the minimum point that comprehensively averages the propagation delay and the maximum propagation delay under the given weights. The solution result is used as the optimal satellite node for the SDN controller static deployment, and the initial controller is allocated to the switch according to the shortest distance between the switch and the controller to complete the initial controller static deployment.

[0089] In this embodiment, the flow table is a set of rules for processing data streams. When the switch receives a new data stream and there is no matching flow table locally in the switch, it sends a flow table request instruction to the initially allocated controller; for the controller, if the load of processing the flow table request instruction is less than the preset threshold of the controller, there is no need to perform controller reallocation to avoid frequent migration of the switch; if the load of processing the flow table request instruction exceeds the preset threshold of the controller, controller reallocation is performed, and the flow table request instruction is proportionally allocated to different controllers to avoid controller overload.

[0090] Specifically, the schematic diagram of the controller reallocation mechanism is as Figure 3 shown. The load of controller 2 for processing the flow table request instruction exceeds its preset threshold, and controller reallocation is performed. 20% of the flow table request instructions are sent to controller 1.

[0091] In this embodiment, step S5 includes the following process. The schematic flow diagram of using the particle swarm optimization algorithm to optimize the allocation ratio of flow table request instructions is as Figure 4 shown;

[0092] S51. Initialize the position and velocity of each particle individual in the particle swarm;

[0093] S52. Calculate the fitness corresponding to the position of each particle individual in the particle swarm, and update the optimal position of the particle individual based on the fitness;

[0094] S53. Update the global optimal position and iteration times of the particle swarm based on the optimal position of the particle individual;

[0095] S54. Determine whether the iteration times are less than the maximum iteration times. If so, update the velocity of the particle based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and update the position of the particle based on the updated velocity of the particle, then return to S52; if the iteration times are not less than the maximum iteration times, allocate the flow table request instructions to the controllers within the set range for the switch according to the optimized allocation ratio.

[0096] In this embodiment, the position x of the particle individual i is the ratio of the flow table request instructions allocated by the switch to the controllers within the set range, and the expression is:

[0097] x i ={x i1 ,x i2 ,…,x id ,…,x iD}

[0098] where i = 1, 2, …, N, d ∈ D, N is the particle swarm size, D represents the number of known controllers within the set range of the switch, and x id (t) represents the ratio of the flow table request instructions sent by the switch to the d-th controller within the range to the total flow table request instructions sent by the switch.

[0099] In this embodiment, the process of initializing the position and velocity of each particle individual in step S51 is as follows:

[0100] Randomly initialize the position of each particle;

[0101] Set the initial velocity value of each particle to 0.

[0102] In this embodiment, the expression of the fitness function F for calculating the fitness of the position of the particle individual is:

[0103] F = α·ξl +β·ξ d

[0104] where α and β are influence weight parameters of the fitness function F, and ξ l is the load difference between controllers, and ξ d is the average propagation delay between the switch and controller d;

[0105] Update the optimal position p of the particle individual based on the fitness, and the process is as follows: i , the process is:

[0106] Compare the fitness of particle individual i in dimension d at time t and t + 1, and select the one with the smaller fitness as the optimal position p of particle individual i in dimension d id , and the expression is:

[0107]

[0108] Integrate the optimal positions of particle individual i in all solution space dimensions D to obtain the optimal position p of particle individual i i , and the expression is:

[0109] p i ={p i1 , p i2 , …, p id , …, p iD}.

[0110] In this embodiment, the global optimal position g of the particle swarm in step S53 is the position of the particle individual with the smallest fitness selected from the optimal positions of all particle individuals, and the expression is:

[0111] g = min{F(p1), F(p2), …, F(p N )}

[0112] The expression for updating the iteration number is:

[0113] I = I + 1.

[0114] In this embodiment, the process of step S54 is as follows:

[0115] Judge whether the iteration number I is less than the maximum iteration number I max , if so, update the velocity of particle individual i in dimension d based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and the expression is:

[0116] v id (t + 1) = wv id (t) + c1r1(p id - x id (t)) + c2r2(gd -x id (t))

[0117] Among them, w is the inertia weight, r1 and r2 are random numbers in [0, 1], c1 and c2 are respectively the local learning factor for adjusting the individual part and the global learning factor for adjusting the social part, and g d is the global optimal position of the particle swarm in the d dimension;

[0118] The inertia weight w is a linearly decreasing inertia weight, and the expression is:

[0119] w = w max -((w max -w min ) / I max )×I

[0120] Among them, w max is the maximum value of the inertia weight, and w min is the minimum value of the inertia weight;

[0121] Based on the updated velocity v id (t + 1) of particle individual i, update the position x id (t + 1) of particle individual i, and the expression is:

[0122] x id (t + 1) = x id (t) + v id (t + 1)

[0123] Return to S52 and update the optimal position of the particle individual again;

[0124] When the number of iterations I is not less than the maximum number of iterations I max , output the global optimal position g of the current particle swarm as the optimal allocation ratio.

[0125] Obviously, the above embodiments of the present invention are only examples for clearly explaining the present invention, and are not limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the claims of the present invention.

Claims

1. A method for reallocating an SDN controller based on a particle swarm optimization algorithm, characterized in that It includes the following steps: S1. Calculate the average propagation delay and the maximum propagation delay of the controller within one period based on the propagation delay between the controller and any switch it manages; S2. Weightedly allocate the average propagation delay and the maximum propagation delay, take the minimized result of the weighted allocation as the objective function and solve it. Based on the solution result, allocate an initial controller for the switch to complete the static deployment of the initial controller; S3. Use the switch to receive the data stream sent by the user device and use the switch to send a flow table request instruction to the initial controller allocated to it; S4. Determine whether the processing load of the flow table request instruction exceeds the preset load threshold of the initial controller. If so, trigger the controller reallocation mechanism and execute step S5; otherwise, send the flow table request instruction to the initially allocated controller; S5. Use the particle swarm optimization algorithm to optimize the allocation ratio of the flow table request instruction. Based on the number of controllers within the set range of the switch, allocate the flow table request instruction for the switch to the controllers within the set range according to the optimized allocation ratio.

2. The SDN controller reallocation method based on the particle swarm algorithm according to claim 1, characterized in that, The average propagation delay avgδ of the controller c within one period described in step S1 i is i expressed as: where |S| is the size of the switch set, i.e., the total number of switches in the network; T is the set of time slices in a period, i.e., a time period T is divided into several time slices, and the time slice is a short time window. The propagation delay between the controller and the switch remains unchanged within a time slice, |T| is the period length, and δ ij (t) is the propagation delay between the controller and any switch it manages; The maximum propagation delay maxδ of c within one period described in step S1 i is expressed as follows: i ​ 3. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 2, characterized in that, The expression of the objective function Ω for the static deployment of the SDN controller described in step S2 is: where w1 and w2 are set weighting coefficients, avgδ i is the average propagation delay, and maxδ i is the maximum propagation delay; The objective function is a linear programming function. Use the linear programming function solving algorithm to solve the objective function, take the solution result as the optimal satellite node for the static deployment of the SDN controller, and allocate an initial controller for the switch according to the shortest distance between the switch and the controller to complete the static deployment of the initial controller.

4. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 3, characterized in that, The flow table is a set of rules for processing data streams. When the switch receives a new data stream and there is no matching flow table locally in the switch, it sends a flow table request instruction to the initially allocated controller; if the load for processing the flow table request instruction is less than the preset threshold of the controller, no controller reallocation is performed; if the load for processing the flow table request instruction exceeds the preset threshold of the controller, controller reallocation is performed and the flow table request instruction is proportionally allocated to different controllers.

5. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 4, characterized in that Step S5 includes the following processes: S51. Initialize the position and velocity of each particle individual in the particle swarm; S52. Calculate the fitness corresponding to the position of each particle individual in the particle swarm and update the optimal position of the particle individual based on the fitness; S53. Update the global optimal position and the iteration number of the particle swarm based on the optimal position of the particle individual; S54. Determine whether the iteration number is less than the maximum iteration number. If so, update the velocity of the particle based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and update the position of the particle based on the updated velocity of the particle, then return to S52; if the iteration number is not less than the maximum iteration number, allocate the flow table request instruction for the switch to the controllers within the set range according to the optimized allocation ratio.

6. The method for reassigning an SDN controller based on a particle swarm algorithm according to claim 5, wherein The individual position x of the particle i is the proportion of the flow table request instructions allocated by the switch to the controllers within the set range, and the expression is: x i = {x i1 , x i2 , …, x id , …, x iD} where \(i = 1, 2, \ldots, N\), \(d\in D\), \(N\) is the size of the particle swarm, \(D\) represents the number of known controllers within the range set by the switch, and \(x\) id (t) represents the proportion of the flow table request instructions sent by the switch to the \(d\)-th controller within the range to the total flow table request instructions sent by the switch.

7. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 6, characterized in that, The process of initializing the position and velocity of each particle individual in the particle swarm described in step S51 is: Randomly initialize the position of each particle; Set the initial value of the velocity of each particle to 0.

8. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 7, characterized in that, The expression of the fitness function F for calculating the fitness of the position of the particle individual is: F = α·ξ l + β·ξ d where α and β are influence weight parameters of the fitness function F, and ξ l is the load difference between controllers, and ξ d is the average propagation delay between the switch and controller d; Update the optimal position p of the particle individual based on fitness i , and the process is as follows: Compare the fitness of particle individual i in dimension d at time t and time t+1, and select the one with the smaller fitness as the optimal position p of particle individual i in dimension d id , and the expression is: Integrate the optimal positions of particle individual i in all solution space dimensions D to obtain the optimal position p of particle individual i i , and the expression is: p i = {p i1 , p i2 , …, p id , …, p iD}。 9. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 8, characterized in that, The global optimal position g of the particle swarm described in step S53 is the position of the particle individual with the smallest fitness among the optimal positions of all particle individuals, and the expression is: g = min{F(p1), F(p2), …, F(p N )} The expression for updating the iteration number is: I = I + 1.

10. A method for reallocating an SDN controller based on a particle swarm algorithm according to claim 9, characterized in that, The process of step S54 is: Determine whether the iteration count I is less than the maximum iteration count I max , if so, update the velocity of particle individual i in dimension d based on the current optimal position of the particle individual and the current global optimal position of the particle swarm, and the expression is: v id (t + 1)= wv id (t)+ c1r1(p id -x id (t))+ c2r2(g d -x id (t)) where \( w \) is the inertia weight, \( r_1 \) and \( r_2 \) are random numbers in \([0, 1]\), \( c_1 \) and \( c_2 \) are the local learning factor for adjusting the individual part and the global learning factor for adjusting the social part respectively, and \( g \) d is the global optimal position of the particle swarm in the \( d \)-dimensional space; The inertia weight w is a linearly decreasing inertia weight, and the expression is: w = w max -((w max -w min ) / I max )×I Among them, w max is the maximum value of the inertia weight, and w min is the minimum value of the inertia weight; Based on the velocity v of particle individual i after update id (t + 1), update the position x of particle individual i id (t + 1), the expression is: x id (t + 1)= x id (t)+ v id (t + 1) Return to S42 to update the optimal position of the particle individual again; When the number of iterations I is not less than the maximum number of iterations I max output the global optimal position g of the current particle swarm as the optimal allocation ratio.

Citation Information

Cited By

  • NAND flash memory data migration method

    CN122131985A