An SDN network resource allocation method, system, and storage medium
By using the SVM traffic classification model and routing strategy generation model in the SDN network, the packet traffic is split and the routing path is reasonably allocated, which solves the congestion and packet loss problems of traditional networks when facing diverse traffic, and achieves lower latency and higher throughput.
Patent Information
- Application Number
- CN202210091614.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-26
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-01-26
AI Technical Summary
When traditional networks face more than 85% of mouse flow and about 10% of elephant flow, network congestion and packet loss are prone to extremely poor user experience.
The pre-trained SVM traffic classification model is used to divide the packet traffic into elephant flow and mouse flow, and different path forwarding weights are configured according to different types of traffic. The forwarding paths of elephant flow and mouse flow are generated through the pre-trained routing strategy generation model, and the SDN network load balancing resource allocation is completed.
It reduces the end-to-end delay of the network, improves network throughput, improves network congestion problems, and improves user experience.
Smart Images

Figure CN114513816B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of network resource allocation, and particularly relates to a method, a system, and a storage medium for SDN network resource allocation. Background Art
[0002] In recent years, with the rapid development of the Internet, the scale of the network has become increasingly large. The popularity of social media, high-definition videos, online games, and 5G has led to a rapid growth in network traffic and a sharp increase in service demand. In the network environment of this huge traffic data, services exhibit characteristics such as randomness and imbalance. The traditional network architecture faces great challenges in this environment. Facing the situation that more than 85% of the flows in the network are mouse flows not exceeding 10KB, while about 10% of the elephant flows account for 90% of the total network transmission data, the traditional network static routing method is extremely prone to network congestion and packet loss, bringing a very poor user experience to users. There is an urgent need to construct an intelligent routing algorithm.
[0003] Compared with traditional networks, Software-Defined-Networking (SDN) can separate the network control logic from the underlying forwarding devices, realizing the decoupling of the data layer and the control layer and the centralization of the control logic. This enables network operation and maintenance personnel to flexibly select routing strategies to schedule the network through programmable interfaces with as little change to the hardware deployment as possible, thereby improving the Quality of Service (QoS) of the network.
[0004] Facing the situation that more than 85% of the flows in the network are mouse flows not exceeding 10KB, while about 10% of the elephant flows account for 90% of the total network transmission data, the currently commonly used routing algorithm is Open Path Short First (OPSF). This algorithm plans the routing method of the traffic in the network according to the link weights of the network topology. Although the computational complexity of generating the routing strategy is small, it often causes multiple large flows to collide in the network, easily resulting in network congestion. The shortest path first algorithm not only increases the transmission time of the traffic but also increases the risk of packet loss when some traffic overflows the switch cache. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, a system, and a storage medium for SDN network resource allocation, which split the data packet traffic into sub-flows and then allocate reasonable routing paths, reducing the end-to-end delay of the network, improving the network throughput, and alleviating the problem of network congestion.
[0006] To achieve the above object, the technical solution adopted by the present invention is:
[0007] In the first aspect of the present invention, a method for SDN network resource allocation is provided, including:
[0008] Use a pre-trained SVM traffic classification model to classify packet traffic into elephant flows and mouse flows; configure different path forwarding weights according to elephant flows and mouse flows;
[0009] Generate forwarding paths for elephant flows and mouse flows through a pre-trained routing policy generation model to complete SDN network load balancing resource allocation;
[0010] The training method of the SVM traffic classification model includes:
[0011] Obtain historical technical features in the SDN network and construct a database P;
[0012] Use the optimal hyperplane to construct an SVM traffic classification model, and train the SVM traffic classification model through the database P to obtain an SVM traffic classification model with a classification accuracy rate greater than the set value M.
[0013] Preferably, the method of using the optimal hyperplane to construct the SVM traffic classification model includes:
[0014] Set the SVM traffic classification model according to the hyperplane equation as:
[0015] f(x) = sign(ω T ·x + b)
[0016] In the formula, ω represents the weight of the features contained in the training instance; b represents the intercept of the hyperplane from the origin; sign() represents the sign function of the hyperplane equation ω T ·x + b; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P;
[0017] Convert the traffic classification problem in the network into an optimization problem of the constraint function, and obtain the relevant parameters for classifying traffic using the hyperplane by maximizing the minimum value of the distance D(i) from the point x i in the feature space to the hyperplane. The distance D(i) from the point x i in the feature space to the hyperplane is:
[0018]
[0019] In the formula, ω represents the weight of the features contained in the training instance; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; ||·|| represents the matrix norm; l represents the number of data groups in the database P;
[0020] Convert the problem of traffic classification in the network into an optimization problem of a constraint function, and optimize and solve the weights ω and the intercept b through the data in the database P to obtain the optimal separation hyperplane, including:
[0021] (1) When the data in the database P is linearly distributed, the expression formula of the constraint function is:
[0022]
[0023] s.t.y i ·(ω T ·x i +b)≥1 i=1,2...,l
[0024] (2) When the data in the database P is linearly distributed and the training samples are linearly inseparable, the expression formula of the constraint function is:
[0025]
[0026] s.t.y i ·(ω T ·x i +b)≥1-ξ i i=1,2…,l
[0027] In the formula, ω represents the weight of the features contained in the training instances; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; ||·|| represents the matrix norm; y i ∈{-1,+1} represents the class identifier, -1 represents the negative example, and +1 represents the positive example; l represents the number of data groups in the database P;
[0028] (3) When the data in the database P is non-linearly distributed, the expression formula of the constraint function is:
[0029]
[0030] s.t.y i ·(ω T ·K(x,x i )+b)≥1-ξ i I=1,2…,l
[0031]
[0032] In the formula, C is an adjustment parameter used to balance the distance and the training error, σ is the kernel parameter; ξ i represents the slack variable; l represents the number of data groups in the database P; ||·|| represents the matrix norm; x iIt represents the feature vector corresponding to the i-th group of data in database P; exp() represents the exponential function with the natural constant e as the base; y i It represents the feature vector x i The corresponding class label.
[0033] Preferably, the method for training the SVM traffic classification model through database P includes:
[0034] Normalize the traffic size f, the throughput T between nodes ij and the link utilization rate l ij in each group of data in database P to obtain the traffic mapping value f′, the throughput mapping value T′ between nodes ij and the link utilization rate mapping value l′ within the interval [0, 1] ij ;
[0035] Obtain the feature vector x[f′, b′ ij and the link utilization rate mapping value l′ ij ; Construct the feature vectors x[f′, b′ ij , l′ ij corresponding to each group of data and the class label y into the training data set D; ij , l′ ij and the class label y into the training data set D;
[0036] Divide the training data set D into a training set D tr and a test set D te according to a set ratio; Train the SVM traffic classification model through the training set D tr ; Use the test set D te to test the trained SVM traffic classification model and determine whether its classification accuracy rate is greater than the set value M.
[0037] Preferably, normalize the traffic size f, the throughput T between nodes ij and the link utilization rate l ij in each group of data in database P to obtain the traffic mapping value f′, the throughput mapping value T′ between nodes ij and the link utilization rate mapping value l′ ij , and the method includes:
[0038] Normalize the flow size f of the data packet, and the calculation formula is:
[0039]
[0040] In the formula, f represents the original attribute value of the data packet flow size, minf represents the minimum value of f, maxf is the maximum value of f, and f′ is the value of the normalized flow size f;
[0041] The inter - node throughput T of the data packet ij is normalized, and the calculation formula is:
[0042]
[0043] In the formula, T ij represents the original attribute value of the inter - node throughput, minT ij represents the minimum value of T ij maxT ij is the maximum value of T ij T′ ij is the normalized value of the inter - node throughput T ij ;
[0044] The inter - node throughput T of the data packet ij is normalized, and the calculation formula is:
[0045]
[0046] In the formula, l ij represents the original attribute value of the link utilization rate, minl ij represents the minimum value of l ij maxl ij is the maximum value of l ij l′ ij is the normalized value of the link utilization rate l ij ;
[0047] Preferably, the method of configuring different path forwarding weights according to elephant flows and mouse flows includes:
[0048] When the data - packet traffic is divided into elephant flows, use the K - shortest path algorithm to calculate K shortest paths between the i - th node and the j - th node in the SDN network. Select the weight of the sub - flow split from the elephant flow f ij to be transmitted between the i - th node and the j - th node and selected to be transmitted on the k th path as The expression formula is:
[0049]
[0050] In the formula, represents the sub - flow split from the elephant flow f ij selected to be transmitted on the k th path in the K - shortest path algorithm;
[0051] When the data - packet traffic is divided into mouse flows, configure the link weights through the data in the Q - learning database P.
[0052] Preferably, the training method of the routing policy generation model includes:
[0053] Obtain the transmission delay (d ij ) and throughput (t ij ) between nodes i and j in the SDN network to construct the feature matrix s of the initial state space. The feature matrices s between each pair of nodes form the state space S;
[0054] Select the action space a according to the feature matrix s; the action spaces a between each pair of nodes form the action space A(s); construct the Q-value calculation function Q(s, a) according to the feature matrix s and the action space a,
[0055] Normalize the end-to-end throughput T end , end-to-end delay D end and end-to-end link utilization rate L end in each group of data in the database P to obtain the end-to-end throughput mapping value T e ′ nd , end-to-end delay mapping value D′ end and link utilization rate mapping value L′ end within the interval [0, 1], and construct the reward function R; train the Q-value calculation function Q(s, a) through the reward function R corresponding to each group of data;
[0056] Generate the routing policy generation model, and the expression formula is:
[0057] π(s) = argmaxQ(s, a)
[0058] In the formula, argmaxQ(s, a) represents the parameter for calculating the Q-value calculation function Q(s, a).
[0059] Preferably, normalize the end-to-end throughput T end , end-to-end delay D end and end-to-end link utilization rate L end in each group of data in the database P to obtain the end-to-end throughput mapping value T′ end , end-to-end delay mapping value D′ end and link utilization rate mapping value L′ end within the interval [0, 1], and construct the reward function R; the method includes:
[0060] Normalize the end-to-end throughput T end to obtain the end-to-end throughput mapping value T′ end , and the expression formula is:
[0061]
[0062] In the formula, is the end-to-end throughput measured at the k-th time;
[0063] The end-to-end delay D end is normalized to obtain the end-to-end delay mapping value D' end , and the expression formula is:
[0064]
[0065] In the formula, is the end-to-end delay measured at the k-th time;
[0066]
[0067] In the formula, is the end-to-end link utilization rate measured at the k-th time;
[0068] A reward function R is constructed, and the expression formula is:
[0069] R = ω1 × T' end - ω2 × D' end - ω3 × L' end
[0070] In the formula, ω1 represents the weight of the end-to-end throughput mapping value T' end The weight of ω2 represents the end-to-end delay mapping value D' end The weight of ω3 represents the link utilization rate mapping value L' end The weights, ω1, ω2, ω3 ∈ [0, 1].
[0071] The second aspect of the present invention provides an SDN network resource allocation system, including:
[0072] A traffic classification module for classifying packet traffic into elephant flows and mouse flows by using a pre-trained SVM traffic classification model;
[0073] A configuration weight module for configuring different path forwarding weights according to elephant flows and mouse flows;
[0074] A resource allocation module generates forwarding paths for elephant flows and mouse flows through a pre-trained routing policy generation model to complete SDN network load balancing resource allocation.
[0075] The third aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the SDN network resource allocation are implemented.
[0076] Compared with the prior art, the beneficial effects of the present invention:
[0077] (1) The present invention uses a pre-trained SVM traffic classification model to classify packet traffic into elephant flows and mouse flows. The captured features include traffic size, throughput between nodes, and link utilization to form a feature matrix for training the SVM traffic classification model, improving the classification accuracy and speed of the traffic classification model.
[0078] (2) The present invention first disassembles elephant flows into sub-flows and uses the K-shortest path to formulate forwarding weights, reducing the congestion caused by elephant flows in network transmission, reducing the end-to-end delay, and increasing the end-to-end throughput.
[0079] (3) The present invention uses the current traffic size, link utilization, delay, and throughput to form the Q-learning initial state s, which better represents the network situation. Using ε-greedy and the reward function, the intelligent routing algorithm can converge to the optimal policy function faster with less training data. Description of the Drawings
[0080] Figure 1 is a flowchart of an SDN network resource allocation method provided by an embodiment of the present invention;
[0081] Figure 2 is a structural diagram of an SDN network resource allocation system provided by an embodiment of the present invention. Detailed Embodiments
[0082] The present invention will be further described below with reference to the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be used to limit the protection scope of the present invention.
[0083] Embodiment 1
[0084] As Figure 1 shown, an SDN network resource allocation method includes:
[0085] Using a pre-trained SVM traffic classification model to classify packet traffic into elephant flows and mouse flows;
[0086] The method for configuring different path forwarding weights according to elephant flows and mouse flows includes:
[0087] When the packet traffic is classified as an elephant flow, use the K-shortest path algorithm to calculate K shortest paths between the i-th node and the j-th node in the SDN network. For the elephant flow f to be transmitted between the i-th node and the j-th node ij split into sub-flows, select the weight for transmission on the k th path as The expression formula is:
[0088]
[0089] In the formula, represents the elephant flow f ij The selected sub-flow after splitting is the k th th path in the K-shortest path algorithm;
[0090] When the data packet flow is divided into mouse flows, the link weights are configured through the data in the Q-learning database P.
[0091] Generate the forwarding paths of elephant flows and mouse flows through a pre-trained routing policy generation model to complete the resource allocation of SDN network load balancing;
[0092] The training method of the SVM traffic classification model includes:
[0093] Obtain the historical technical features in the SDN network and construct the database P;
[0094] Set the SVM traffic classification model according to the hyperplane equation as:
[0095] f(x) = sign(ω T ·x + b)
[0096] In the formula, ω represents the weight of the features contained in the training instances; b represents the intercept of the hyperplane from the origin; sign() represents the sign function of the hyperplane equation ω T ·x + b; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P;
[0097] Transform the traffic classification problem in the network into an optimization problem of a constraint function. By maximizing the minimum value of the distance D(i) from the point x i in the feature space to the hyperplane, obtain the relevant parameters for classifying traffic using the hyperplane. The distance D(i) from the point x i in the feature space to the hyperplane is:
[0098]
[0099] In the formula, ω represents the weight of the features contained in the training instances; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; ||·|| represents the matrix norm; l represents the number of data groups in the database P.
[0100] Transform the traffic classification problem in the network into an optimization problem of a constraint function, and optimize and solve the weights ω and the intercept b through the data in the database P to obtain the optimal separating hyperplane, including:
[0101] (1) When the data in database P is linearly distributed; the training samples can be linearly separated, and SVM finds the optimal separating hyperplane by solving the following optimization problem to maximize the minimum value of D(i). The expression formula of the constraint function is:
[0102]
[0103] s.t.y i ·(ω T ·x i +b)≥1 i=1,2...,l
[0104] (2) When the data in database P is linearly distributed; the training samples are linearly inseparable, and there is no qualified hyperplane that can correctly classify each training sample. To relax the separable case to the inseparable case, the slack variable ξ i is introduced, and the expression formula of the constraint function is:
[0105]
[0106] s.t.y i ·(ω T ·x i +b)≥1-ξ i i=1,2…,l
[0107] In the formula, ω represents the weight of the features contained in the training instances; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in database P; ||·|| represents the matrix norm; y i ∈{-1,+1} represents the class identifier, -1 represents the negative example, and +1 represents the positive example; l represents the number of data groups in database P.
[0108] (3) When the data in database P is non-linearly distributed, SVM finds the optimal separating hyperplane by solving the following optimization problem to maximize the minimum value of D(i). The expression formula of the constraint function is:
[0109]
[0110] s.t.y i ·(ω T ·K(x,x i )+b)≥1-ξ i i=1,2…,l
[0111]
[0112] In the formula, C is the adjustment parameter used to balance the distance and the training error, σ is the kernel parameter; ξi denotes the slack variable; l denotes the number of data groups of database P; ||·|| denotes the matrix norm; x i denotes the eigenvector corresponding to the i-th group of data in database P; exp() denotes the exponential function with the natural constant e as the base; y i denotes the eigenvector x i corresponding class label.
[0113] Optimize and solve the weights ω and intercept b through the data of database P; the methods include:
[0114] Normalize the traffic size f, the throughput T between nodes ij and the link utilization rate l ij in each group of data in database P to obtain the traffic mapping value f′, the throughput mapping value T′ between nodes within the interval [0, 1] ij and the link utilization rate mapping value l′ ij ;
[0115] Normalize the flow size f of the data packet, and the calculation formula is:
[0116]
[0117] In the formula, f represents the original attribute value of the data packet flow size, minf represents the minimum value of f, maxf is the maximum value of f, and f′ is the value of the normalized processing of the flow size f;
[0118] Normalize the throughput T between nodes of the data packet ij and the calculation formula is:
[0119]
[0120] In the formula, T ij represents the original attribute value of the throughput between nodes, minT ij represents the minimum value of T ij maxT ij is the maximum value of T ij T′ ij is the value of the normalized processing of the throughput T between nodes ij ;
[0121] Normalize the throughput T between nodes of the data packet ij and the calculation formula is:
[0122]
[0123]
[0124] In the formula, l ijThe original attribute value representing the link utilization rate, minl ij Denoted as l ij The minimum value of, maxl ij For l ij The maximum value of, l′ ij Is the link utilization rate l ij The value after normalization, b ij Represents the bandwidth between node i and node j; u ij Denoted as the used bandwidth between node i and node j.
[0125] Through the traffic mapping value f′, the throughput mapping value T′ between nodes ij And the link utilization rate mapping value l′ ij Obtain the feature vector x[f′, b′ ij , l′ ij ; Construct the feature vectors x[f′, b′ ij , l′ ij corresponding to each group of data and the class label y into the training dataset D;
[0126] D = {(x1, y1), (x2, y2),..., (x l , y l )}
[0127] In the formula, x i ∈R n , y i ∈{+1, -1}, i = 1, 2,..., l; When the class label y is equal to +1, it is a positive example; When the class label y is -1, it is a negative example;
[0128] Divide the training dataset D into the training set D tr And the test set D te ; Train the SVM traffic classification model through the training set D tr ; Use the test set D te To test the trained SVM traffic classification model and determine whether its classification accuracy rate is greater than the set value M;
[0129] The calculation formula for the classification accuracy rate is:
[0130]
[0131] In the formula, TP represents the true positive example with correct classification, FP represents the false positive example with incorrect classification, and Precision is the classification accuracy rate;
[0132] When the classification precision rate is greater than the set value M, output the trained SVM traffic classification model; when the classification precision rate is less than the set value M, modify and adjust the parameters C and the kernel parameter σ to construct a new constraint function and retrain the SVM traffic classification model;
[0133] A training method for a routing policy generation model, including:
[0134] Obtain the transmission delay (d ij ) between nodes i and j in the SDN network and the throughput (t ij ) between nodes to construct the feature matrix s of the initial state space. The feature matrices s between each pair of nodes form the state space S;
[0135]
[0136] where d 11 represents the transmission delay between node 1 and node 1, and t1 represents the throughput between node 1 and node 1. If the starting positions of the nodes are the same node, the transmission delay and throughput are 0. If there is no link between two nodes, the transmission delay and throughput between the nodes are -1.
[0137] Select the action space a according to the feature matrix s; the specific method is:
[0138] According to the traffic classification, break down the elephant flow into multiple sub-flows. The action space a1(s) is composed of the weights of the sub-flows split from the elephant flow f ij selected to be transmitted on the k th th path, then
[0139]
[0140] In the formula, the link weights of the paths that are not the shortest paths calculated by the K-shortest path algorithm are set to 0.
[0141] Construct the action space a2 of the mouse flow. m r,t represents the vector composed of the link weights on the rth optional path at time t. Its action space is:
[0142] a2 = {m 1,t , …, m r,t , …, m n,t}
[0143] The action spaces a between each pair of nodes form the action space A(s); construct the Q-value calculation function Q(s, a) according to the feature matrix s and the action space a,
[0144] For each group of data in the database P, the end-to-end throughput T end and the end-to-end delay D endAnd the end-to-end link utilization rate L end Perform normalization to obtain the end-to-end throughput mapping value T' within the interval [0, 1] end , the end-to-end delay mapping value D' end and the link utilization rate mapping value L' end , and construct the reward function R; the method includes:
[0145] The end-to-end throughput T end Perform normalization to obtain the end-to-end throughput mapping value T' end , and the expression formula is:
[0146]
[0147] In the formula, is the end-to-end throughput measured at the k-th time;
[0148] The end-to-end delay D end Perform normalization to obtain the end-to-end delay mapping value D' end , and the expression formula is:
[0149]
[0150] In the formula, is the end-to-end delay measured at the k-th time;
[0151]
[0152] In the formula, is the end-to-end link utilization rate measured at the k-th time;
[0153] Construct the reward function R, and the expression formula is:
[0154] R = ω1 × T' end - ω2 × D' end - ω3 × L' end
[0155] In the formula, ω1 represents the weight of the end-to-end throughput mapping value T' end ω2 represents the weight of the end-to-end delay mapping value D' end ω3 represents the weight of the link utilization rate mapping value L' end , and ω1, ω2, ω3 ∈ [0, 1].
[0156] Train the Q-value calculation function Q(s, a) through the reward function R corresponding to each group of data; when selecting the action space a in the initial state s, the Q-value calculation function Q(s, a) can reach the maximum value; when the number of iterations n ≥ N and Q(s, a) converges, terminate the iteration.
[0157] Generate a routing policy generation model, and the expression formula is:
[0158] π(s)=argmaxQ(s,a)
[0159] In the formula, argmaxQ(s,a) represents calculating the parameter of the Q-value calculation function Q(s,a).
[0160] Embodiment 2
[0161] As Figure 2 shown, an SDN network resource allocation system includes:
[0162] A traffic classification module, which is used to classify packet traffic into elephant flows and mouse flows by using a pre-trained SVM traffic classification model;
[0163] A configuration weight module, which configures different path forwarding weights according to elephant flows and mouse flows;
[0164] A resource allocation module, which generates forwarding paths for elephant flows and mouse flows through a pre-trained routing policy generation model to complete SDN network load balancing resource allocation.
[0165] Embodiment 3
[0166] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps of the SDN network resource allocation.
[0167] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0168] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0169] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, so that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 or multiple blocks.
[0171] The above is only the preferred embodiment of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. An SDN network resource allocation method, characterized by including: Using a pre-trained SVM traffic classification model to classify packet traffic into elephant flows and mouse flows; Configuring different path forwarding weights according to elephant flows and mouse flows, specifically including: When the data packet traffic is divided into elephant flows, the K - shortest path algorithm is used to calculate K shortest paths between the i - th node and the j - th node in the SDN network, and the elephant flow f to be transmitted between the i - th node and the j - th node ij The sub - flows split from it are selected to be transmitted on the k th The weight of the path transmission is The expression formula is: In the formula, represents the elephant flow f ij The sub-flows into which it splits are selected as the k th th path in the K-shortest path algorithm; When the packet traffic is classified as a mouse flow, configuring link weights through the data in the Q-learning database P; Generating forwarding paths for elephant flows and mouse flows through a pre-trained routing policy generation model to complete SDN network load balancing resource allocation; The training method of the SVM traffic classification model includes: Obtaining historical technical features in the SDN network and constructing database P; Using the optimal hyperplane to construct the SVM traffic classification model, and training the SVM traffic classification model through database P to obtain an SVM traffic classification model with a classification accuracy rate greater than the set value M; The training method of the routing policy generation model includes: Obtain the transmission delay (d ij ) between the i-th and j-th nodes in the SDN network, and the throughput (t ij ) between the nodes to construct the feature matrix s of the initial state space. The feature matrices s between each pair of nodes form the state space S; The action space a selected according to the feature matrix s; the action spaces a between each node constitute the action space A(s); a Q-value calculation function Q(s, a) is constructed according to the feature matrix s and the action space a. For each group of data in database P, the end-to-end throughput T end , the end-to-end delay D end and the end-to-end link utilization L end are normalized to obtain the end-to-end throughput mapping value T′ within the interval [0, 1] end , the end-to-end delay mapping value D′ end and the link utilization mapping value L′ end , and a reward function R is constructed; the Q-value calculation function Q(s, a) is trained through the reward function R corresponding to each group of data; Generating a routing policy generation model, and the expression formula is: π(s)=argmaxQ(s,a) In the formula, argmaxQ(s,a) represents calculating the parameter of the Q-value calculation function Q(s,a).
2. The SDN network resource allocation method according to claim 1, characterized in that The method of using the optimal hyperplane to construct the traffic classification model includes: Setting the SVM traffic classification model according to the hyperplane equation as: f(x) = sign(ω T ·x + b) In the formula, ω represents the weight of the features contained in the training instance; b represents the intercept of the hyperplane from the origin; sign() represents the sign function of the hyperplane equation ω T ·x + b; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; Convert the traffic classification problem in the network into an optimization problem of a constraint function, and by maximizing the minimum value of the distance D(i) from the point x i in the feature space to the hyperplane, obtain the relevant parameters for classifying traffic using the hyperplane. The distance D(i) from the point x i in the feature space to the hyperplane is: In the formula, ω represents the weight of the features contained in the training instance; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; ||·|| represents the matrix norm; l represents the number of data groups in the database P; Converting the traffic classification problem in the network into an optimization problem of the constraint function, and optimizing and solving the weights ω and the intercept b through the data in database P to obtain the optimal separation hyperplane, including: (1) When the data in database P is linearly distributed, the expression formula of the constraint function is: s.t.y i ·(ω T ·x i +b)≥1 i=1,2…,l (2) When the data in database P is linearly distributed and the training samples are linearly inseparable, the expression formula of the constraint function is: s.t.y i ·(ω T ·x i +b)≥1-ξ i i=1,2…,l In the formula, ω represents the weight of the features contained in the training instance; b represents the intercept of the hyperplane from the origin; (·) T represents the transpose transformation of the matrix; x represents the feature vector corresponding to each group of data in the database P; ||·|| represents the matrix norm; y i ∈{-1, +1} represents the class identifier, -1 represents the negative example, and +1 represents the positive example; l represents the number of data groups in the database P; (3) When the data in database P is non-linearly distributed, the expression formula of the constraint function is: s.t·y i ·(ω T ·K(x, x i ) + b) ≥ 1 - ξ i i = 1, 2…, l In the formula, C is an adjustment parameter for balancing distance and training error, σ is the kernel parameter; ξ i represents the slack variable; l represents the number of data groups in database P; ||·|| represents the matrix norm; x i represents the feature vector corresponding to the i-th group of data in database P; exp() represents the exponential function with the natural constant e as the base; y i represents the feature vector x i corresponding class label.
3. The SDN network resource allocation method according to claim 2, characterized in that, The method of training the SVM traffic classification model through database P includes: Normalize the traffic volume \(f\), throughput \(T\) between nodes ij and link utilization rate \(l\) ij in each group of data in database \(P\) to obtain the traffic mapping value \(f'\), throughput mapping value \(T'\) between nodes ij and link utilization rate mapping value \(l'\) ij ; Through the traffic mapping value f′, the throughput mapping value T′ between nodes ij and the link utilization mapping value l′ ij Obtain the feature vector x[f′,b′ ij ,l′ ij ; Construct the feature vectors x[f′,b′ ij ,l′ ij corresponding to each group of data and the class label y into the training data set D; Divide the training dataset D into a training set D tr and a test set D te according to a set ratio; train the SVM traffic classification model using the training set D tr ; use the test set D te to test the trained SVM traffic classification model and determine whether its classification accuracy rate is greater than the set value M.
4. The SDN network resource allocation method according to claim 3, wherein Normalize the traffic volume \(f\), the throughput \(T\) between nodes ij and the link utilization rate \(l\) ij in each group of data in database \(P\) to obtain the traffic mapping value \(f'\), the throughput mapping value \(T'\) between nodes ij and the link utilization rate mapping value \(l'\) ij , and the method includes: Normalizing the flow size f of the packet, and the calculation formula is: In the formula, f represents the original attribute value of the packet flow size, minf represents the minimum value of f, maxf is the maximum value of f, and f′ is the value of the flow size f after normalization processing; Normalize the inter-node throughput T of the data packet ij using the following calculation formula: In the formula, T ij represents the original attribute value of the throughput between nodes, and minT ij represents the minimum value of T ij , maxT ij is the maximum value of T ij , and T′ ij is the value obtained by normalizing the throughput T ij between nodes; Normalize the inter-node throughput T of the data packet ij using the following calculation formula: In the formula, l ij represents the original attribute value of the link utilization rate, minl ij represents the minimum value of l ij , maxl ij is the maximum value of l ij , and l′ ij is the value obtained by normalizing the link utilization rate l ij .
5. The SDN network resource allocation method according to claim 1, characterized in that For each group of data in database P, the end-to-end throughput T end , the end-to-end delay D end and the end-to-end link utilization rate L end are normalized to obtain the end-to-end throughput mapping value T' end , the end-to-end delay mapping value D' end and the link utilization rate mapping value L' end within the interval [0, 1], and a reward function R is constructed; the method includes: The end-to-end throughput T end is normalized to obtain an end-to-end throughput mapping value T' end , and the expression formula is: In the formula, is the end-to-end throughput measured at the k-th time; The end-to-end delay D end is normalized to obtain an end-to-end delay mapping value D' end , and the expression formula is: In the formula, is the end-to-end delay measured at the k-th time; In the formula, is the end-to-end link utilization rate measured at the k-th time; Constructing a reward function R, and the expression formula is: R = ω1 × T′ end -ω2 × D′ end -ω3 × L′ end In the formula, ω1 represents the weight of the end-to-end throughput mapping value T′ end ; ω2 represents the weight of the end-to-end delay mapping value D′ end ; ω3 represents the weight of the link utilization mapping value L′ end ; and ω1, ω2, ω3 ∈ [0, 1].
6. An SDN network resource allocation system, characterized in that, Including: A traffic classification module for classifying packet traffic into elephant flows and mouse flows by using a pre-trained SVM traffic classification model; A weight configuration module for configuring different path forwarding weights according to elephant flows and mouse flows; A resource allocation module for generating forwarding paths for elephant flows and mouse flows through a pre-trained routing policy generation model to complete SDN network load balancing resource allocation; The weight configuration module configures different path forwarding weights according to elephant flows and mouse flows, specifically including: When the data packet traffic is divided into elephant flows, the K-shortest path algorithm is used to calculate K shortest paths between the i-th node and the j-th node of the source in the SDN network, and the elephant flow f to be transmitted between the i-th node and the j-th node ij The sub-flows split from are selected at the k th The weight of the path transmission is The expression formula is: In the formula, represents the elephant flow f ij The sub-flows split from it are selected as the k th th path in the K-shortest path algorithm; When the packet traffic is classified as a mouse flow, configuring link weights through the data in the Q-learning database P; The training method of the routing policy generation model in the resource allocation module includes: Obtain the transmission delay (d ij ) between node i and node j in the SDN network, and the throughput (t ij ) between nodes to construct the feature matrix s of the initial state space. The feature matrices s between each pair of nodes form the state space S; The action space a selected according to the feature matrix s; the action spaces a between each node constitute the action space A(s); a Q-value calculation function Q(s, a) is constructed according to the feature matrix s and the action space a. a ∈ A(s); Normalize the end-to-end throughput T end , end-to-end delay D end and end-to-end link utilization L end to obtain the end-to-end throughput mapping value T' within the interval [0, 1] end , end-to-end delay mapping value D' end and link utilization mapping value L' end , and construct the reward function R; train the Q-value calculation function Q(s, a) through the reward function R corresponding to each group of data; Generating a routing policy generation model, and the expression formula is: π(s)=argmaxQ(s,a) In the formula, argmaxQ(s,a) represents calculating the parameter of the Q-value calculation function Q(s,a).
7. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the program is executed by a processor, it implements the steps of SDN network resource allocation described in any one of claims 1 to 5.