Disclosure of Invention
In view of this, the present invention provides a virtual network function scheduling method for 5G network slices based on prediction, which can monitor a network state through a prediction mechanism, predict a minimum requirement of a service function chain on resources according to a queue information characteristic of the network slice, provide a dynamic scheduling and resource allocation scheme for the service function chain VNF based on the result, schedule underlying resources in a time dimension, protect the resources without reserving the underlying network, find a communication path where the virtual network can obtain the maximum resources, implement online mapping of the network slice, and reduce an overall average scheduling delay of multiple network slices.
In order to achieve the purpose, the invention provides the following technical scheme:
a virtual network function scheduling method based on prediction for 5G network slices specifically comprises the following steps:
s1: under the application scene of a 5G network slice, aiming at the service function chain characteristics of dynamic change of service flow, establishing a network model of a service function chain queue based on time delay, a service function chain queue model and a multi-queue time delay model;
s2: establishing a multi-queue cache model, and determining the priority of a slice request and the lowest service rate to be provided according to the size of a slice service queue at different moments in order to prevent queue data from being lost when the cache space is limited;
s3: dispersing time into a series of continuous time windows, taking queue information in the time windows as training data set samples, and establishing a flow perception model based on prediction;
s4: and searching a scheduling method of the VNF under the condition of meeting the resource constraint that the cache of the slice service queue does not overflow according to the predicted size of each slice service queue and the corresponding lowest service rate.
Further, in step S1, the network model of the delay-based service function chain queue is:
the virtual network topology is represented by a weighted undirected graph G ═ V, E, where V represents a set of virtual nodes and E represents a set of virtual links; b is
mRepresenting the total output link bandwidth of node m, shared by the virtual links connected to that node, for a network slice S
iThe set of virtual network functions handling the service request is denoted as F
i={f
i1,f
ij,...f
iJ},i∈[1,|S|]
z,j∈[1,|F
i|]
zWhere S denotes the set of all network slices and J denotes F
iThe number of middle VNFs; for the VNFs that make up the service function chain, denoted by f, where f
ijRepresenting a network slice S
iThe jth VNF that needs to be scheduled; order to
Representing the ability to perform a virtualized network function f
ijOf a virtual node set, wherein
Further, in step S1, the service function chain queue model is:
let Γ ═ 1.·, T.., T } denote the set of timeslots over which the network operates, where the duration of each timeslot T is defined as T
s(ii) a Thus in time slot t, f is performed
ijThe first virtual link connected with the node is allocated with bandwidth resources
Represents; order to
Represents a slice S
iNode execution of f within time slot t
ijThe actual service rate provided; q
i(t) denotes a slice S within a time slot t
iThe queue length of (a), i.e. the number of packets waiting to be transmitted;
assuming that each slice leases a corresponding number of cache resources for caching a corresponding one of the traffic data, order A for each queue
i(t) represents the arrival process of the data packet, assuming packet arrival process A due to the randomness of the data generated by the aperiodic application of the virtual network user
i(t) compliance parameter is λ
iThe packet arrival processes of all users are distributed independently in different scheduling time slots, i.e. the successive arrival time intervals follow mutually independent lambda
iA negative exponential distribution of; let M
i(t) represents the packet size, assuming that the packet size follows an average of
Is distributed exponentially, the average processing rate of the data packets is
The queue length update process is therefore represented as:
wherein the content of the first and second substances,
indicating the number of data packets processed in time slot t.
Further, in step S1, the multi-queue delay model is:
the time delay comprises queuing time delay, processing time delay and transmission time delay; order to
Respectively represent slices S
iAverage queuing delay of an arriving data packet queue before the data packet queue is processed by each node in the whole network, average processing delay on a corresponding virtual node in the whole network and average transmission delay of data packet queue transmitted on a corresponding link in the whole network; data stream of a network slice is arranged at the mostThe average difference value between the time point of the last node after processing and the time point of the network slice request arrival is defined as the average scheduling delay, is represented by tau, and satisfies the following conditions:
processing time delay X
iProcessing latency of VNF executed by multiple virtual nodes
Is composed of
Since the packet size obeys an average of
Is distributed exponentially, so
Respectively obey parameters of
Are independent of each other, i.e. are irish distributions:
the average processing delay of a packet can be derived from the characteristics of the Ireland distribution as follows:
similarly, the average transmission delay of the data packet is:
the average queuing delay is:
wherein
Representing execution of f in a service function chain
ijThe latency distribution function of the node.
Therefore, the network slice SiThe total average scheduling delay of the data packets is as follows:
wherein the packet size obeys an average value of
The distribution of indices; w
i(t) represents the execution of f in the service function chain
ijOf nodes, in particular W
i(t)=P(W
i1+W
ij+...+W
iJT is less than or equal to t). The optimization objective of the present invention is to minimize the overall average scheduling delay of the VNF of the service function chain requested by multiple network slices in the network, which is expressed as: min τ, where τ is max { τ
1,τ
2,...,τ
i}。
Further, in step S2, the multi-queue cache model is:
dynamic resource scheduling is typically related to queue buffer status (e.g., remaining buffer size and current queue length), packet arrival rate, etc. The longer the queue length of the virtual network in the system, the greater the delay of the data buffered by the virtual network, so that the delay performance of the virtual network can be directly influenced and the overflow probability of the queue buffer of the virtual network can be reduced by dynamically adjusting the scheduling of resources. In the present invention only the slice service queue overflow situation is considered, since a queue underflow means that the resources allocated to process the slice service are sufficient and will not cause data lossMiss, queue overflow means that the resources allocated to handle the slice traffic are not sufficient, resulting in a loss of bits when the queue length reaches the slice buffer ceiling.
Represents the maximum buffer length allowed by the ith slice queue, and the length of the queue changes dynamically with the arrival rate of the data packets, so that every T passes
sThe deployment of the service function chain and the allocation of resources are optimized once. If at the current T
sThe length of the ith queue in the queue is larger than that corresponding to the queue at the moment
Indicating that there is bit overflow and bit loss occurs. Thus, the optimization problem can be described as providing an appropriate service rate to ensure that the queue length is less than
In order to reduce the average bit loss rate of the slice and realize effective allocation of resources, the invention calculates the lowest service rate required for preventing the overflow of the slice queue, and for any t, the increment of the length of the ith slice queue can be expressed as:
Ii(t)=Ai(t)-Di(t)
for the start of any t +1 slots, the length of the ith slice queue can be expressed as:
Qi(t+1)=Qi(t)+Ii(t)
the slice queue does not overflow and needs to satisfy:
the service rate can be obtained to satisfy:
further, in step S3, the flow sensing model based on prediction is:
the invention aims to maximize the service rate on the premise of ensuring that each slice queue does not overflow, so that the system performance reaches a relative balance between throughput and fairness, effectively improves the system throughput while ensuring the fairness, and minimizes the overall average scheduling delay of a network. Due to A
i(t) is determined by the arrival of the data packet in the time slot t and has certain randomness, so the invention adopts a prediction method based on the LSTM to predict the minimum service rate which ensures that the slice queue does not overflow in advance
And according to the predicted result, a deployment mode for optimizing the service function chain and a resource allocation strategy are made in advance, so that the network efficiency is improved.
The requirement of the lowest resource for preventing the queue from overflowing in the buffer is influenced by the data packet arrival rate A of the service requested by the user
iAnd queue length Q at the previous time
iThe influence of (2) can be taken as a slicing feature by observing or monitoring the queue length in the current cache and the historical data of the arrival rate of the data packets of the service requested by the user. Specifically, in the virtual network G ═ (V, E), for the jth VNF of the service function chain ith, order
Representing the minimum resource (e.g., CPU resources, memory resources, etc. of the VNF) requirement to prevent queue overflow, the present invention only considers the use of CPU resources for the sake of simplicity. So slicing S
iIs characterized by: x is the number of
i=[A
i,Q
i]Wherein A is
iIndicating packet arrival rate, Q
iIndicating the queue length at the last time; defining a discrete time window of length epsilon, dividing the discrete time window into a plurality of discrete time segmentsThe data in the time window is taken as a historical data sample, so that in the range from the historical time t-epsilon to t, the data set input by the network model is represented as:
the samples of each sample set are different, and after sample data is preprocessed, an LSTM model is constructed for forward calculation, including state calculation and output calculation; and then reverse training weights are performed to improve the performance of the prediction.
Further, the forward calculation in the prediction-based traffic perception model specifically refers to: performing a calculation of a state of each slice by performing an iterative process using a sigma (W) (sigmoid activation function) associated with each slice, the result of the state calculation being used in an output calculation to determine a resource demand prediction value; the method specifically comprises the following steps:
(1) observing the arrival rate of data packets of a user request service and recording the queue length of a certain amount of data packets after being processed;
(2) calculating the hidden layer state and the long-term unit state of the network layer by using the obtained slice state;
(3) the results of the last two steps are used to determine a predicted resource requirement value.
To achieve accurate prediction of VNF resource requirements, the weighting function requires iterative training, which requires the use of data such as input x to the neural network and target output ξ, the goal of the training being to minimize a penalizing quadratic cost function:
wherein the first term of the penalizing quadratic cost function is a standard error term,
in order to predict the value of the target,
is the true value; the second term is a penalty function, and beta' is a constant term; the goal of the training is to find the best weight W (characteristic of the fitting data) so that the cost function is minimized, and the training algorithm is based on a gradient descent optimization algorithm.
Further, the backward training in the prediction-based flow perception model specifically includes the following steps:
(1) when the iteration number k is 0, initializing the weight W, and calculating the output value of each neuron in a forward direction, namely ft,it,ct,ot,htValues of five vectors, ft,it,ct,ot,htRespectively showing a forgetting gate, an input gate, a unit state, an output gate and a hidden layer.
(2) Reversely calculating the error term delta value of each neuron; the back propagation of the LSTM error term includes two directions: one is the backward propagation along the time, namely, the error term of each moment is calculated from the current t moment; the other is to propagate the error term to the upper layer;
(3) calculating the gradient of each weight by using a Back Propagation (BPTT) algorithm according to the corresponding error term; the update weight is shown as follows:
wherein the content of the first and second substances,
indicates the learning rate, G
wA penalty quadratic cost function is represented.
Further, in step S4, the method for scheduling the service function chain VNF includes: solving the optimal path scheduled by the VNF by adopting ant colony algorithm modeling so as to realize the deployment problem of the service function chain; the problem is based on the predicted minimum service rate that ensures that the slice queue does not overflow as described in step S3
On the premise of meeting the minimum resource requirement, searching an optimal service function chain deployment path through a maximum and minimum ant colony algorithm to obtain a maximum resource allocation scheme, so as to minimize the overall VNF scheduling delay; the overall scheduling delay is calculated by the delay model of the multi-queue described in step S1.
Further, the method for deploying the multiple service function chains based on the maximum and minimum ant colony algorithm comprises the following specific steps:
(1) initializing parameters such as ant scale, pheromone factors, heuristic function importance degree factors, pheromone volatilization factors, pheromone constants, maximum iteration times and the like;
(2) updating a virtual node set which is accessed by the VNFs of the service function chain in the tabu table;
(3) determining a node set which can be selected by the next VNF according to the tabu table;
determining a next node for processing a VNF module in a roulette manner according to the state transition probability on the premise that the virtual node can process the VNF; therefore, while a part of ants are ensured to follow a VNF scheduling strategy with higher pheromone, a new local optimal solution can be found through a random scheduling strategy; wherein the state transition probability is defined as:
wherein c represents f
ij-1K denotes a next node,
indicates that f can be executed
ijAlpha represents an pheromone factor, and the value of the pheromone factor reflects the degree of influence of the motion behavior of the ants on the pheromone concentration in the searching process; beta is an importance degree factor of the heuristic function, the function is to reflect the relative importance of the heuristic function in the state transition probability, the larger beta is, the more ant can determine the state transition probability by the greedy rule, eta
kA heuristic function is represented;
(4) after all VNFs in one ant complete the scheduling strategy according to the scheduling strategy, distributing the computing resources and the output link bandwidth resources on the virtual machine to the corresponding VNFs and the corresponding links in a proportional fair manner, and meanwhile, carrying out weighted calculation on the distributed resources in order to ensure the continuity of processing of data packets at each node to finally obtain corresponding resources distributed by each VNF and each link;
(5) the specific updating process of the pheromone is as follows: 1) reducing the concentration of all pheromones by p%; 2) for each ant in each iteration process, the sum of the resources correspondingly distributed by the path selection is converted into the variation amount of the pheromone, so that the pheromone is updated; because different paths of each ant are selected to cause different allocated resources, the updated pheromone concentration matrix has different results on corresponding different nodes.
(6) Updating the pheromone concentration volatilization coefficient, the pheromone factor, the heuristic function importance degree factor, the pheromone concentration and other parameters through the maximum and minimum intervals; and repeating the steps, and finding the scheduling solution of the VNFs of the optimal service function chain after finishing multiple iterations.
The invention has the beneficial effects that: aiming at the problem of queue backlog generated by data accumulation caused by service requests changing in a time domain under a 5G network slice scene, a service function chain queue model and a cache model based on time delay are established, instead of only stopping work on solving the problem of resource scheduling on a single scheduling period; on the basis, a traffic perception model based on the LSTM neural network is established to predict the future resource minimum demand condition of the service slice. According to the prediction result, a dynamic service function chain VNF scheduling and resource allocation scheme is provided, and a dynamic deployment model for realizing a plurality of service function chains based on the maximum and minimum ant colony algorithm is established. The prediction method of the invention not only has good prediction effect, but also dynamically schedules the virtual network resources on the time sequence, more conforms to the actual network condition, optimizes the time delay of the slicing service and improves the performance of the network service.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
FIG. 1 is a diagram illustrating an example scenario in which embodiments of the present invention may be applied. As shown in fig. 1, different types of slices represent different service types, and from left to right, there are an infinite virtual network user, a virtual network management platform, a virtual network function scheduling layer, and a physical resource pool. In the system, a cloud server in a physical resource pool provides various types of physical network resources including computing resources, cache resources, link bandwidth resources and the like, and a virtual network management platform realizes the scheduling of a virtual network function module and the flexible allocation of the physical network resources according to the service state of a virtual network user, QoS requirements and the like. In order to more effectively distribute physical resources and realize efficient utilization of the physical resources, the virtual network management platform designed by the invention comprises a service request unit, a load analysis module, a resource management entity, a network state monitoring entity, a virtual network scheduler and the like, wherein the service request unit is used for caching data packets newly arrived by each slice user, the load analysis module is used for analyzing the cache load characteristics of each slice, predicting the load state of the next period and preventing a queue from overflowing the resources required to be provided by the lowest service rate of the cache, the virtual network scheduler determines the deployment scheme of each service function chain according to the evaluation result of the load analysis module, and the resource management entity distributes the optimal physical resource quantity obtained by each virtual network function module after the service function chain is deployed, so that the QoS requirement of each network slice is ensured. The network state monitoring entity is used for observing the real-time state of each physical resource.
The invention aims to predict the lowest resource demand of the service function chain in the next period by monitoring the cache load state and the data packet arrival rate of the user request slicing service in real time, and based on the result, the virtual network scheduler and the resource management entity realize the service provision according to the formulated scheduling and resource allocation scheme of the VNF.
Fig. 2 is a flowchart of scheduling based on virtual network functions in the present invention, where the size and number of data packets requested by a network slice service are random, and the lowest resource demand of the next cycle service function chain is predicted according to the traffic characteristics and the cache load characteristics of the network slice, so as to implement virtual network function scheduling and dynamic resource allocation in the time dimension. As shown in fig. 2, the steps are as follows:
step 201: generating a full-connection type virtual network topological structure, wherein the types of virtual network function modules which can be processed by virtual nodes, different types of network slices and service function chains for realizing the slice service are formed;
step 202: establishing a service function chain queue model and a cache model based on time delay;
step 203: collecting historical data packet arrival data of the network slices and historical buffer queue length (namely buffer load);
step 204: predicting the minimum requirement of service function chain resources by adopting an LSTM-based neural network model for the collected data, wherein a gradient descent optimization algorithm is adopted in the training method;
step 205: judging whether the punishment secondary cost function exceeds a threshold, if so, returning to 203; otherwise, go on to step 205;
step 206: executing a plurality of service function chain deployment operations based on a maximum and minimum ant colony algorithm to realize VNF scheduling and dynamic resource allocation;
step 207: calculating the overall scheduling time delay of the network slices after resource allocation based on the multi-queue time delay model established in the step 202; returning to the step 203 to predict the resource requirement of the next period;
FIG. 3 is a diagram of a model of a queue system in the present invention, slicing S at time slot tiQueue length of (Q)i(t) indicates that the parameter also indicates the number of packets waiting to be transmitted, and for each queue order A, assuming that a corresponding number of cache resources are leased for each slice for caching a corresponding one of the traffic datai(T) represents the arrival process of the data packet, and the queue length can be dynamically changed along with the change of the arrival rate of the data packet due to the randomness of data generated by the aperiodic application of the virtual network user, so that each time T passes throughsThe deployment mode of the primary service function chain and the allocation of resources are dynamically optimized according to the queue length. I.e. by dynamically adjusting the service rate DiAnd (t) maximizing the service rate on the premise of ensuring that the current queue cache does not overflow, so that the system performance reaches a relative balance between throughput and fairness, the system throughput is effectively improved while the fairness is ensured, and the overall average scheduling time delay of the network is minimized.
FIG. 4 is a schematic diagram of a resource demand prediction model based on the LSTM neural network in the present invention, in which the demand of the lowest resource for preventing queue overflow in the buffer is received by the packet arrival rate A of the service requested by the user
iAnd queue length Q at the previous time
iTherefore, the monitored historical data of the queue length in the current buffer and the arrival rate of the data packet of the service requested by the user is firstly used as the slice characteristics by the load analysis module, that is, the characteristics of each slice i can be expressed as: x is the number of
i=[A
i,Q
i]To represent historical slice states and historical arrival rates of packets, a time window of discrete length epsilon is defined, and the data in the time window is taken as a historical data sample, namely: x ═ x (t-epsilon), …, x (t), where the samples in each sample set are different, and the sample data is preprocessed and passed through
c
t=f⊙c
t-1+i
t⊙g
t、h
t=o
t⊙tanh(c
t) The constructed LSTM network performs a prediction of the minimum resource requirements of the service function chain. Where σ and ⊙ denote the activation function sigmoid and the element-level product, respectively. The prediction process comprises two steps of forward calculation and reverse training, and the training algorithm adopts a gradient descent optimization algorithm.
Fig. 5 is a diagram of LSTM neuron structure in the present invention, the model uses a state h (hidden layer) to represent the input characteristics of each slice load, c is a unit state to store the long-term state, and x represents the input of the neural network, i.e. the historical data sample. It can be seen that at time t, there are three of these neuron inputs: input value x of the network at the present momenttThe output value h of the neuron at the previous timet-1And cell state c at the previous timet-1The neuron outputs are two: neuron output value h at current momenttCurrent cell state ct。
Fig. 6 is a flowchart of deployment of multiple service function chains based on the maximum and minimum ant colony algorithm in the present invention, as shown in fig. 6, the steps are as follows:
step 601: inputting a prediction result of the minimum requirement of the VNF resources of the service function chain;
step 602: initializing parameters such as ant scale, pheromone factors, heuristic function importance degree factors, pheromone volatilization factors, pheromone constants, maximum iteration times and the like;
step 603: calculating the state transition probability of each ant and scheduling the VNF in the form of roulette;
step 604: calculating the calculation resources distributed to the VNF and the bandwidth resources of the link according to a proportional fair mode on the deployment result of the service function chain of each ant;
step 605: updating an pheromone matrix, wherein the updating comprises two steps, 1) the concentration of all pheromones is reduced by p%, and 2) for each ant in each iteration process, the sum of resources correspondingly distributed by path selection is converted into the variation of the pheromone, so that the updating of the pheromone is realized;
step 606: judging whether the local optimal solution is trapped, if so, continuing to execute the step 607; if not, returning to 603 for next iteration;
step 607: and updating the pheromone concentration volatilization coefficient rho, the pheromone factor alpha, the heuristic function importance degree factor beta and the pheromone concentration tau, and returning to 603 for next iteration.
Finally, it is noted that the above-mentioned preferred embodiments illustrate rather than limit the invention, and that, although the invention has been described in detail with reference to the above-mentioned preferred embodiments, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the scope of the invention as defined by the appended claims.