A multi-objective optimization task scheduling method based on a secure cloud
By building a task scheduling model in the secure cloud and optimizing the artificial fish school algorithm, the problem of task scheduling in the existing technology is solved, multi-objective optimization is achieved, the efficiency and resource utilization of task scheduling are improved, and the cost is reduced.
Patent Information
- Application Number
- CN202210294811.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-01-25
- Filing Date
- 2022-03-24
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-03-24
AI Technical Summary
When scheduling tasks in secure clouds, the prior art mainly takes completion time as an indicator, and fails to effectively consider execution costs and load balancing, resulting in waste of virtual resources and high execution costs, and deteriorates with the increase in the number of tasks.
A multi-objective optimization task scheduling method based on security cloud is proposed. By building a task scheduling model, the artificial fish school algorithm is optimized, and multi-objective optimization is carried out with the indicators of execution cost, load balancing and task completion time to achieve a relatively optimal task scheduling strategy.
This method can effectively reduce task completion time, improve the real-time and effectiveness of network security, improve the utilization rate of virtual security resources, save operational costs, and meet complex scheduling needs.
Smart Images

Figure CN114741955B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a multi-objective optimization task scheduling method based on a security cloud, and belongs to the technical field of artificial intelligence. Background Art
[0002] With the rapid development of network technology, the security problem of computer networks has become a serious practical problem. Therefore, the security cloud has emerged as the times require. The security cloud is a cloud that provides security protection services. After cloudifying the security infrastructure, it provides overall security services to customers. It adopts cloud computing technology, builds and integrates virtual security component resources, and uses software-defined network technology (SDN) to introduce service traffic into the security component resource pool. The traffic is detected, analyzed, and cleaned by the security cloud, and then re-injected into the user service side, thus ensuring network security.
[0003] In the security cloud, task scheduling is a combinatorial optimization problem. The result of task scheduling is related to the efficiency of the entire security cloud facility and plays a very crucial role in improving the quality of user services. The task scheduling of the security cloud refers to the process of evenly distributing various massive abnormal traffic to each virtual resource in the security component resource pool through the security cloud data center proxy. This process realizes the mapping relationship between abnormal traffic and security virtual resources. The quality of the task scheduling strategy will directly affect user satisfaction and the efficiency of security virtual resources in processing tasks. A good task scheduling strategy can effectively reduce the completion time of tasks, thereby improving the real-time performance and effectiveness of network security, and can also improve the utilization rate of various virtual security resources, greatly reducing energy consumption and saving operating costs. Therefore, how to meet complex scheduling requirements under multiple constraints is the key problem to be solved in current cloud security scheduling.
[0004] Since the task scheduling of the security cloud belongs to the NP problem, it is not feasible to calculate all possible task scheduling strategies and select an optimal scheduling strategy, because the complexity of this method will increase exponentially with the increase in the number of tasks and virtual security resources. Therefore, when solving such problems, conventional algorithms with deterministic time complexity are no longer applicable. And heuristic algorithms, which are non-deterministic time complexity algorithms, can obtain sub-optimal solutions that are infinitely close to the optimal solution through algorithm improvement and iteration. Therefore, heuristic algorithms are one of the better methods to solve such problems.
[0005] Currently, most of the existing scheduling strategies mainly use the completion time as the main indicator, and do not consider the execution cost and load balancing. Therefore, although the real-time performance of tasks is guaranteed, it causes waste of virtual resources and expensive execution costs, and this situation deteriorates with the increase in the number of tasks. Summary of the Invention
[0006] The present invention provides a multi-objective optimization task scheduling method based on a security cloud. This method conducts multi-objective optimization using the completion time, execution cost, and load balance as evaluation indicators, thereby obtaining a relatively optimal security cloud task scheduling method under current conditions, ensuring the real-time performance and effectiveness of network security, improving the utilization rate of virtual security component resources, and saving operating costs.
[0007] To solve the above technical problems, the technical solutions adopted by the present invention are as follows:
[0008] A multi-objective optimization task scheduling method based on a security cloud, comprising the following steps:
[0009] 1) Construct a task scheduling model in a security cloud environment;
[0010] 2) Optimize the artificial fish swarm algorithm to generate an optimal allocation plan with execution cost, load balance, and task completion time as indicators, and achieve multi-objective optimization task scheduling based on the security cloud
[0011] The above method is reasonable, real-time, efficient, load-balanced, and low-cost.
[0012] In the prior art, the task scheduling algorithms in the cloud environment do not consider multiple optimization objectives comprehensively. For example: Most task scheduling algorithms take the task completion time as the optimization objective, which leads to an imbalance in the load of the entire virtual resources under the condition of minimizing the execution time, resulting in a serious polarization phenomenon in the utilization rate of virtual resources, increasing the energy consumption of the entire cloud system, and bringing expensive execution costs; moreover, most task scheduling strategies mainly study the task scheduling problems in the cloud environment and do not conduct in-depth research on the task scheduling problems in the security cloud environment. The above method proposes an efficient and reasonable multi-objective optimization task scheduling strategy for the matching problem between virtual security resources and scheduling tasks in the existing security cloud environment, effectively overcoming the problems existing in the prior art.
[0013] The above task scheduling model includes:
[0014] 101: Abnormal traffic subtasks (hereinafter referred to as tasks) F = {f1, f2,..., f i ,..., f m}, where f i represents the i-th task, i ∈ {1, 2, 3,..., m}, m is the number of tasks, and the attribute values of f i can be expressed as: f i = {f i-length , f i-fileSize , f i-outputSize , f i-type , f i-level}, the meanings of each attribute value respectively represent the length of task f i , the size before execution, the size after execution, the category, and the risk level;
[0015] 102: Virtual security component resources, hereinafter referred to as virtual resources, R = {r1, r2,..., r j ,..., r n}, where r j represents the jth virtual resource, j ∈ {1, 2, 3,..., n}, n is the number of virtual resources, and the attribute value of r j can be expressed as: r j = {r j-mips , r j-bw , r j-ram , r j-pesNumber , r j-size , r j-type}, and the meanings of each attribute value respectively represent the computing power, bandwidth, operating memory, number of cpus, storage space size, and category of the virtual resource r j ;
[0016] 103: The execution time of the task on the virtual resource. Among them, since the task has different risk levels, the execution time is not only related to the length of the task, but also related to the risk level of the task:
[0017]
[0018] 104: The transmission time of the task on the virtual resource:
[0019]
[0020] 105: The time consumed by the virtual resource to process a task is the sum of the transmission time and the execution time:
[0021] c ij = exe ij + trans ij
[0022] 106: Multiple tasks allocated on the virtual resource are processed serially, while multiple virtual resources run in parallel. The expression is as follows:
[0023]
[0024] totalTime = max(rComplete j )
[0025] Among them, rComplete j is the virtual resource r jThe completion time, where totalTime is the total task completion time.
[0026] 107: The processing cost of a task includes the sum of the computing cost, bandwidth cost, memory cost, and storage cost on virtual resources. Considering the heterogeneity in a secure cloud environment, there are various virtual resources with different performances. Therefore, the unit cost is used for accumulation:
[0027]
[0028] exeCost ij = exe ij × r j-mips × r j-pesNumber × rUnitMipsCost
[0029] transCost ij = trans ij × r j-bw × rUnitBwCost
[0030] ramCost ij = c ij × r j-ram × rUnitRamCost
[0031] sizeCost ij = c ij × r j-size × rUnitSiizeCost
[0032] Among them, totalCost is the total execution cost, and exeCost ij , transCost ij , ramCost ij , sizeCost ij are the computing cost, bandwidth cost, memory cost, and storage cost required for virtual resource r j to complete task f i respectively.
[0033] 108: The load of a virtual resource not only needs to consider the length of the tasks allocated to this virtual resource but also the performance of this virtual resource. Among them, η1 and η2 are the weight coefficients of the computing power and bandwidth size of the virtual resource respectively. The smaller the loadEvaluation value, the more balanced the load of each virtual resource. The virtual machine load formula is as follows:
[0034]
[0035]
[0036]
[0037] 109: Considering that task completion time, cost, and load balancing are different evaluation metrics with different dimensions and dimension units, in order to eliminate the dimensional influence between multiple metrics, it is necessary to normalize them to solve the comparability between different metrics. The normalization formulas for each metric are as follows:
[0038]
[0039]
[0040]
[0041] Among them, f time , f cost , f load are the normalized task completion time, execution cost, and load balancing of virtual resources respectively. totalTime min , totalCost min are the minimum values of task completion time and execution cost respectively. totalTime max , totalCost max are the maximum values of task completion time and execution cost respectively.
[0042] For the three evaluation metrics of task completion time, cost, and load balancing, the most commonly used methods to transform multiple objectives into a single objective are the linear weighted method, the constraint method, and the linear programming method. Considering the heterogeneity and dynamics of the security cloud environment, a linear weight dynamic allocation strategy is introduced to dynamically allocate weights to the three metrics of time, cost, and load balancing. The expression is as follows:
[0043] F = λ1 × f time + λ2 × f cost + λ3 × f load
[0044]
[0045] The smaller the value of the fitness function F, the more reasonable the allocation scheme. Among them, λ1 is the preference degree of the algorithm for task completion time, λ2 is the preference degree of the algorithm for cost, λ3 is the preference degree of the algorithm for load balancing, iter max is the maximum number of iterations of the artificial fish swarm, and iter cur is the current number of iterations of the artificial fish swarm;
[0046] Table 1 Meanings of the abbreviated letters in the above expressions
[0047]
[0048]
[0049] In the above step 2), the fitness function F proposed in step 1) is used as the optimization objective of the artificial fish swarm algorithm in step 2) to generate an optimal allocation scheme with execution cost, load balancing, and task completion time as indicators, realizing multi-objective optimization task scheduling based on a secure cloud.
[0050] In the above step 2), the artificial fish swarm algorithm is optimized, including the following steps:
[0051] Step 201: Initialize each parameter in the artificial fish swarm algorithm: the total number of artificial fish Sum, step size Step, field of view View, number of attempts Attempt, crowding factor δ, maximum number of iterations iter max and threshold t, etc.;
[0052] Step 202: Tent chaos initialization: Randomly generate an m-dimensional random vector, Perform iteration according to formula (a) to obtain the chaos sequence S;
[0053] Step 203: Map the chaos sequence S to the original space according to formula (b) to generate the initial population X;
[0054] Step 204: Calculate the fitness of each artificial fish, and record the state of the artificial fish with the optimal objective function on the bulletin board;
[0055] Step 205: Evaluate and compare the clustering and chasing behaviors of each artificial fish, select the most suitable behavior for the current artificial fish to move. If the constraint conditions are not met, then perform the foraging behavior or random swimming behavior;
[0056] Step 206: The artificial fish performs the selected behavior and updates the state information of the artificial fish. At the same time, update the state of the optimal artificial fish on the bulletin board;
[0057] Step 207: If the global optimal solution has not changed after the algorithm iterates continuously for t times and the current number of iterations is less than the maximum number of iterations, then perform crossover and mutation operations. At the same time, update the state of the optimal artificial fish on the bulletin board;
[0058] Step 208: Judge whether the termination condition is satisfied. If not, jump to step 205; otherwise, jump to step 209
[0059] Step 209: Return the optimal allocation scheme.
[0060] When the artificial fish swarm algorithm solves optimization problems, it usually uses randomly generated data as the initial population information. This can lead to uneven population distribution, making it difficult to retain the diversity of the population and prone to falling into the local optimal solution, resulting in a poor optimization result for the algorithm. Therefore, the present invention introduces a chaos mapping mechanism in the initialization process of the artificial fish swarm.
[0061] Chaos is a common phenomenon existing in nonlinear systems. A chaotic variable has the characteristics of randomness, ergodicity, and regularity within a certain range. According to research, the Tent mapping can produce better results compared to other mappings. Therefore, in view of the characteristics of the artificial fish swarm algorithm, in step 202, the Tent mapping with good ergodicity and fast convergence speed is used to generate a chaotic sequence, and its expression is as follows:
[0062]
[0063] where x l is the l-th random number generated.
[0064] Since there are small periods and unstable periodic points in the Tent chaotic sequence, to avoid the Tent chaotic sequence falling into small periodic points and unstable periodic points during iteration, a random variable is introduced into the original Tent chaotic mapping. The expression of the improved Tent chaotic mapping is as follows:
[0065]
[0066] After the Bernoulli shift transformation, the expression is as follows:
[0067]
[0068] where N is the number of artificial fish swarms; introducing the random variable not only maintains the randomness, ergodicity, and regularity of the Tent chaotic mapping, but also can effectively avoid iteration falling into small periodic points and unstable periodic points;
[0069] In view of the above description of the characteristics of the improved Tent mapping, combined with the characteristics of the artificial fish swarm algorithm in the secure cloud environment, the formula is adjusted as follows:
[0070]
[0071] where i is the number of the artificial fish and j is the task number;
[0072] The specific steps of using the Tent mapping to initialize the artificial fish swarm in steps 202 - 203 are as follows:
[0073] ①: Randomly generate an m-dimensional random vector,
[0074] ②: Iterate according to formula (a) to generate a chaotic sequence S;
[0075] ③: Map each chaotic component in the chaotic sequence S back to the original space according to formula (b), where a j , b j is the value range of the j-th dimensional variable, that is, the range of virtual resources;
[0076]
[0077] ④: From these chaotic sequences, an initial population X after the Tent mapping of s i can be obtained.
[0078] In the early stage of the artificial fish swarm algorithm, it is expected that the artificial fish has a larger field of view and step size, so that the algorithm has the ability to converge quickly and jump out of the local optimal solution. In the later stage of the algorithm, it is expected that the artificial fish has a smaller field of view and step size, so that the algorithm can perform precise search and improve the algorithm accuracy. Therefore, the field of view and step size of the artificial fish swarm algorithm have similar properties. In response to this phenomenon, in step 204, adopting a dynamic step size and field of view can make the algorithm achieve the best optimization effect.
[0079] In step 204, the Sigmoid function is adopted and deformed. The expression of the deformed Sigmoid function is:
[0080]
[0081] Since in the initial stage of the algorithm under the action of the function, the field of view and step size of the artificial fish are both enlarged, which helps the algorithm to converge quickly and jump out of the local optimal solution. The initial attenuation rate of the deformed Sigmoid function is relatively slow, so that the artificial fish has a long time to use a larger field of view and step size to understand the information of the optimization space and jump out of the local optimal to the global optimal; as the algorithm executes, the field of view and step size of the artificial fish gradually decrease under the action of the function, but still can maintain a relatively slow attenuation speed, so that the artificial fish has sufficient time to perform refined search in the global optimal neighborhood, improving the accuracy of the optimal solution;
[0082] The improved expressions of the step size and field of view are as follows:
[0083] dStep = Step × Sigmoid d
[0084] dView = View × Sigmoid d
[0085] where Step is the step size of the artificial fish and View is the field of view of the artificial fish.
[0086] In the above step 204, the artificial fish obtains dynamic step sizes and fields of view, which improves the convergence speed and optimization accuracy of the algorithm. However, there is still a situation: considering that when the artificial fish is moving from a local optimum to the global optimum, due to the fixed movement step size, it may cause the artificial fish to cross the global optimum point and rush towards another local optimum point, or wander around the global optimum point until the movement step size gradually decays and then converges to the global optimum point, thus affecting the convergence speed. In response to this situation, this application proposes an adaptive movement step size. In the foraging behavior, chasing behavior, and schooling behavior, if the artificial fish moves from state X i to X j (F(X i ) > F(X j ))), it moves according to the ratio coefficient based on the objective function values of the current state X i and the next state X j perceived in the field of view. That is, when F(X i ) is much greater than F(X j ), it indicates that the current position of the artificial fish is far from the global optimum point. Therefore, it moves as large a step size as possible towards state X j , thus accelerating the convergence speed of the algorithm; when F(X i ) is close to F(X j ), it indicates that the artificial fish is currently in the neighborhood of the optimum point. Therefore, only a small step size is needed to refine the search in its nearby neighborhood, improving the optimization accuracy of the algorithm;
[0087] For the current state of the artificial fish and the next state explored , their expressions are as follows:
[0088]
[0089]
[0090] where dView is the improved field of view, dStep is the improved step size, X next is the state of the current artificial fish after movement, is the direction of the artificial fish movement, is the ratio coefficient of the dynamic step size movement.
[0091] In step 207, in response to the situation that the artificial fish swarm algorithm is prone to falling into local optimal solutions in the later stage, a crossover and mutation mechanism is introduced. This enables the solution set to have a stronger ability to jump out of local optimal solutions, thus increasing the possibility of obtaining the global optimal solution. The specific rules are as follows: Set a threshold t. If the global optimal solution has not changed after the algorithm has iterated continuously for t times, then crossover and mutation operations are performed. The solution sets of the current iteration are arranged from the best to the worst, and then the optimal solution Xbest with the sub-optimal solution X subBest ;
[0092] Crossover operation: Assume there exist states and state Then:
[0093]
[0094] Mutation operation: Assume there exist states Then:
[0095]
[0096] In step 207, the crossover operation includes the following steps:
[0097] a: Perform a crossover operation on the selected optimal solution X best and the sub-optimal solution X subBest to generate new states X new1 and X new2 ;
[0098] b: Calculate F(X new1 ) and F(X new2 ), and take the minimum of the two as F(X new ); F(X) represents the fitness value;
[0099] c: Compare F(X new ) with the fitness value of the worst state F(X worst );
[0100] d: If the fitness value of the new state F(X new ) < F(X worst ), then add the new state X new to the solution set and delete the worst state X worst ; otherwise, the solution set remains unchanged.
[0101] In step 207, the mutation operation includes the following steps:
[0102] a: Perform a mutation operation on the optimal solution X best to generate a new state X new ;
[0103] b: Calculate F(X new ), and compare it with F(X worst );
[0104] c: If the fitness value of the new state F(X new ) < F(X worst ), then add the new state X new to the solution set and delete the worst state X worst, on the contrary, the solution set remains unchanged.
[0105] Coding is to map a problem into a model, which can make it more convenient and intuitive to solve the problem. When designing the artificial fish swarm algorithm, choosing the appropriate coding directly affects the convergence speed and optimization accuracy of the algorithm.
[0106] For the task scheduling problem in the secure cloud environment, multi-value coding is used to encode the task scheduling problem in the secure cloud environment. For the task scheduling problem of m tasks and n virtual resources, create an array Distribution[m] = (x1, x2,..., x m ), x i represents the allocation situation of the i-th task (i = 1, 2,..., m). For example, Distribution[4] = (2, 1, 3, 1) represents the allocation scheme of 4 tasks: the first task is processed on the second virtual resource, the second and fourth tasks are processed on the first virtual resource, and the third task is processed on the third virtual resource.
[0107] The above method can reasonably match large-scale virtual security resources with scheduling tasks, thus ensuring the real-time performance and effectiveness of network security, improving the utilization rate of virtual security resources, and saving operation costs.
[0108] Technologies not mentioned in the present invention shall refer to the prior art.
[0109] The present invention aims at the task scheduling problem in the secure cloud environment and proposes a multi-objective optimization task scheduling strategy based on the artificial fish swarm algorithm. This strategy uses Tent chaotic mapping to initialize the artificial fish swarm, effectively maintaining the diversity of the population, avoiding the algorithm falling into local optimum, and improving the global search ability. Secondly, the step size and vision attributes of the artificial fish swarm are dynamically optimized, and an adaptive moving step size is introduced to accelerate the global convergence speed of the algorithm and improve the optimization accuracy of the algorithm. Finally, a crossover and mutation mechanism is introduced to improve the ability of the algorithm to jump out of the local optimum solution. During the algorithm optimization, multi-objective optimization is carried out with execution time, cost, and load balance as evaluation indicators, so as to obtain the relatively optimal secure cloud task scheduling strategy under the current conditions. This strategy can reasonably match large-scale virtual security component resources with scheduling tasks, thus ensuring the real-time performance and effectiveness of network security, improving the utilization rate of virtual security component resources, and saving operation costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] Figure 1 It is a schematic diagram of the secure cloud task scheduling model described in the present invention.
[0111] Figure 2 It is the Sigmoid deformation diagram described in the present invention.
[0112] Figure 3 This is the schematic diagram of the crossover operation described in the present invention.
[0113] Figure 4 This is the schematic diagram of the mutation operation described in the present invention.
[0114] Figure 5 This is the schematic diagram of the improved artificial fish swarm algorithm process described in the present invention.
[0115] Figure 6 It is the comparison chart of convergence curves in the simulation experiment (Task Number = 50);
[0116] Figure 7 It is the comparison chart of convergence curves in the simulation experiment (Task Number = 500);
[0117] Figure 8 It is the comparison chart of task completion time under different task numbers in the simulation experiment;
[0118] Figure 9 It is the comparison chart of load balancing under different task numbers in the simulation experiment;
[0119] Figure 10 It is the comparison chart of execution cost under different task numbers in the simulation experiment; Detailed implementation manners
[0120] To better understand the present invention, the content of the present invention will be further clarified below in conjunction with embodiments, but the content of the present invention is not limited to the following embodiments.
[0121] What the present invention proposes is a multi-objective optimization task scheduling strategy based on a secure cloud. This strategy first models the task scheduling in a secure cloud environment, and then optimizes the artificial fish swarm algorithm. Utilizing the characteristics of the algorithm, such as strong robustness, parallel processing ability, and global optimization ability, the algorithm is combined with the secure cloud task scheduling model to achieve a real-time, efficient, load-balanced, and low-cost task scheduling strategy.
[0122] The task scheduling model includes:
[0123] 101: Abnormal traffic subtasks, hereinafter referred to as tasks, F = {f1, f2,..., f i ,..., f m}, where f i represents the i-th task, i ∈ {1, 2, 3,..., m}, m is the number of tasks, and the attribute value of f i can be expressed as: f i = {f i-length , f i-fileSize , fi-outputSize , f i-type , f i-level}, The meanings of each attribute value respectively represent the length, size before execution, size after execution, category, and risk level of task f i ;
[0124] 102: Virtual security component resources, hereinafter referred to as virtual resources, R = {r1, r2,..., r j ,..., r n}}, where r j represents the jth virtual resource, j ∈ {1, 2, 3,..., n}, n is the number of virtual resources, and the attribute value of r j can be expressed as: r j = {r j-mips , r j-bw , r j-ram , r j-pesNumber , r j-size , r j-type}}, The meanings of each attribute value respectively represent the computing power, bandwidth, operating memory, number of cpus, storage space size, and category of virtual resource r j ;
[0125] 103: The execution time of a task on a virtual resource. Among them, since tasks have different risk levels, the execution time is not only related to the length of the task, but also related to the risk level of the task:
[0126]
[0127] 104: The transmission time of a task on a virtual resource:
[0128]
[0129] 105: The time consumed by a virtual resource to process a task is the sum of the transmission time and the execution time:
[0130] c ij = exe ij + trans ij
[0131] 106: Multiple tasks allocated on a virtual resource are processed serially, while multiple virtual resources run in parallel. The expression is as follows:
[0132]
[0133] totalTime = max(rComplete j )
[0134] Among them, rCompletej is the completion time of the virtual resource r j , and totalTime is the total task completion time.
[0135] 107: The execution cost of a task includes the sum of the computing cost, bandwidth cost, memory cost, and storage cost on the virtual resource. Considering the heterogeneity in the secure cloud environment, there are various virtual resources with different performances. Therefore, the unit cost is used for accumulation:
[0136]
[0137] exeCost ij = exe ij × r j-mips × r j-pesNumber × rUnitMipsCost
[0138] transCost ij = trans ij × r j-bw × rUnitBwCost
[0139] ramCost ij = c ij × r j-ram × rUnitRamCost
[0140] sizeCost ij = c ij × r j-size × rUnitSizeCost
[0141] Among them, totalCost is the total execution cost, and exeCost ij , transCost ij , ramCost ij , sizeCost ij are the computing cost, bandwidth cost, memory cost, and storage cost required for the virtual resource r j to complete the task f i respectively.
[0142] 108: The load of a virtual resource not only needs to consider the length of the task allocated to this virtual resource, but also needs to consider the performance of this virtual resource. Among them, η1 and η2 are the weight coefficients of the computing power and bandwidth size of the virtual resource respectively. The smaller the loadEvaluation value, the more balanced the load of each virtual resource. The virtual machine load formula is as follows:
[0143]
[0144]
[0145]
[0146] 109: Considering that the task completion time, cost, and load balancing are different evaluation metrics with different dimensions and dimension units, therefore, in order to eliminate the dimensional influence among multiple metrics, it is necessary to normalize them to solve the comparability between different metrics. The normalization formulas for each metric are as follows:
[0147]
[0148]
[0149]
[0150] Among them, f time , f cost , f load are the normalized task completion time, execution cost, and load balancing of virtual resources respectively. totalTime min , totalCost min are the minimum values of the task completion time and execution cost respectively. totalTime max , totalCost max are the maximum values of the task completion time and execution cost respectively.
[0151] Introduce a linear weight dynamic allocation strategy to dynamically allocate weights to the three metrics of time, cost, and load balancing. The expression is as follows:
[0152] F = λ1 × f time + λ2 × f cost + λ3 × f load
[0153]
[0154] The smaller the value of the fitness function F, the more reasonable the allocation scheme. Among them, λ1 is the preference degree of the algorithm for the task completion time, λ2 is the preference degree of the algorithm for the cost, λ3 is the preference degree of the algorithm for the load balancing, iter max is the maximum iteration number of the artificial fish swarm, iter cur is the current iteration number of the artificial fish swarm;
[0155] Table 1 Meanings of the abbreviated letters in the above expressions
[0156]
[0157] Such as Figure 5As shown in the figure, in step 2), the artificial fish swarm algorithm is optimized, including the following steps:
[0158] Step 201: Initialize each parameter in the artificial fish swarm algorithm: the total number of artificial fish Sum, step size Step, field of view View, number of attempts Attempt, crowding factor δ, maximum number of iterations iter max and threshold t, etc.;
[0159] Step 202: Tent chaos initialization: Randomly generate an m-dimensional random vector, Iterate according to formula (a) to obtain the chaos sequence S;
[0160] Step 203: Map the chaos sequence S to the original space according to formula (b) to generate the initial population X;
[0161] Step 204: Calculate the fitness of each artificial fish, and record the state of the artificial fish with the optimal objective function on the bulletin board;
[0162] Step 205: Evaluate and compare the clustering and chasing behaviors of each artificial fish, select the most suitable behavior for the current artificial fish to move. If the constraint conditions are not met, then execute the foraging behavior or random swimming behavior;
[0163] Step 206: The artificial fish executes the selected behavior and updates the state information of the artificial fish. At the same time, update the state of the optimal artificial fish on the bulletin board;
[0164] Step 207: If the global optimal solution has not changed after the algorithm iterates continuously for t times and the current number of iterations is less than the maximum number of iterations, then perform crossover and mutation operations. At the same time, update the state of the optimal artificial fish on the bulletin board;
[0165] Step 208: Determine whether the termination condition is met. If not, jump to step 205, otherwise jump to step 209
[0166] Step 209: Return the optimal allocation plan.
[0167] When the artificial fish swarm algorithm solves optimization problems, it usually uses randomly generated data as the initial population information, which will lead to uneven population distribution, difficult to retain the diversity of the population, and easy to fall into the local optimal solution, thus resulting in poor optimization results of the algorithm. Therefore, the present invention introduces a chaos mapping mechanism in the initialization process of the artificial fish swarm.
[0168] Chaos is a common phenomenon existing in nonlinear systems. A chaotic variable has the characteristics of randomness, ergodicity, and regularity within a certain range. According to research, the Tent map can produce better results compared to other maps. Therefore, in view of the characteristics of the artificial fish swarm algorithm, in step 202, the Tent map with good ergodicity and fast convergence speed is used to generate a chaotic sequence, and its expression is as follows:
[0169]
[0170] where x l is the l-th random number generated.
[0171] Since there are small periods and unstable periodic points in the Tent chaotic sequence, in order to prevent the Tent chaotic sequence from falling into small periodic points and unstable periodic points during iteration, a random variable is introduced into the original Tent chaotic map. The expression of the improved Tent chaotic map is as follows:
[0172]
[0173] After the Bernoulli shift transformation, the expression is as follows:
[0174]
[0175] where N is the number of the artificial fish swarm; introducing the random variable not only maintains the randomness, ergodicity, and regularity of the Tent chaotic map, but also can effectively prevent iteration from falling into small periodic points and unstable periodic points;
[0176] In view of the above description of the characteristics of the improved Tent map, combined with the characteristics of the artificial fish swarm algorithm in the secure cloud environment, the formula is adjusted as follows:
[0177]
[0178] where i is the number of the artificial fish and j is the task number;
[0179] The specific steps of using the Tent map to initialize the artificial fish swarm in steps 202 - 203 are as follows:
[0180] ①: Randomly generate an m-dimensional random vector,
[0181] ②: Iterate according to formula (a) to generate a chaotic sequence S;
[0182] ③: Map each chaotic component in the chaotic sequence S back to the original space according to formula (b), where a j , b j is the value range of the j-th variable, that is, the range of virtual resources;
[0183]
[0184] ④: From these chaotic sequences, the initial population X after Tent mapping can be obtained by s i
[0185] In the early stage of the artificial fish swarm algorithm, it is expected that the artificial fish have a larger visual field and step size, so that the algorithm has the ability to converge quickly and jump out of the local optimal solution. In the later stage of the algorithm, it is expected that the artificial fish have a smaller visual field and step size, so that the algorithm can perform precise search and improve the algorithm accuracy. Therefore, the visual field and step size of the artificial fish swarm algorithm have similar properties. In view of this phenomenon, in step 204, adopting a dynamic step size and visual field can enable the algorithm to achieve the best optimization effect.
[0186] In step 204, the Sigmoid function is adopted and deformed. The expression of the deformed Sigmoid function is:
[0187]
[0188] Since in the initial stage of the algorithm under the function, the visual field and step size of the artificial fish are both enlarged, which helps the algorithm to converge quickly and jump out of the local optimal solution. The initial decay rate of the deformed Sigmoid function is relatively slow, so that the artificial fish has a longer time to adopt a larger visual field and step size to understand the information of the optimization space and jump out of the local optimal to the global optimal. As the algorithm executes, the visual field and step size of the artificial fish gradually decrease under the function, but still can maintain a relatively slow decay rate, so that the artificial fish has sufficient time to perform refined search in the global optimal neighborhood, improving the accuracy of the optimal solution;
[0189] The improved expressions of the step size and visual field are as follows:
[0190] dStep = Step × Sigmoid d
[0191] dView = View × Sigmoid d
[0192] where Step is the step size of the artificial fish and View is the visual field of the artificial fish.
[0193] In the above step 204, the artificial fish obtains dynamic step sizes and fields of view, which improves the convergence speed and optimization accuracy of the algorithm. However, there is still a situation: considering that when the artificial fish is moving from a local optimum to the global optimum, due to the fixed movement step size, it may cause the artificial fish to cross the global optimum point and rush towards another local optimum point, or wander around the global optimum point until the movement step size gradually decays and converges to the global optimum point, thus affecting the convergence speed. In response to this situation, this application proposes an adaptive movement step size. In the foraging behavior, following behavior, and schooling behavior, if the artificial fish moves from state X i to X j (F(X i ) > F(X j ))), it moves according to the ratio coefficient based on the objective function values of the current state X i and the next state X j perceived in the field of view. That is, when F(X i ) is much greater than F(X j ), it means that the current position of the artificial fish is far from the global optimum point. Therefore, it moves as large a step size as possible towards state X j , thus accelerating the convergence speed of the algorithm; when F(X i ) is close to F(X j ), it means that the artificial fish is currently in the neighborhood of the optimum point. Therefore, only a small step size is needed to refine the search in its nearby neighborhood, improving the optimization accuracy of the algorithm;
[0194] For the current state of the artificial fish and the next state explored their expressions are as follows:
[0195]
[0196]
[0197] Among them, dView is the improved field of view, dStep is the improved step size, X next is the state of the current artificial fish after movement, is the direction of the artificial fish movement, is the ratio coefficient of the dynamic step size movement.
[0198] In step 207, in response to the situation that the artificial fish swarm algorithm is prone to falling into local optimal solutions in the later stage, a crossover and mutation mechanism is introduced. This enables the solution set to have a stronger ability to jump out of local optimal solutions, thus increasing the possibility of obtaining the global optimal solution. The specific details are as follows: Set a threshold t. If the global optimal solution does not change after the algorithm iterates continuously for t times, then crossover and mutation operations are performed. The solution sets of the current iteration are arranged from the best to the worst, and then the optimal solution Xbest with the sub-optimal solution X subBest ; Figure 2 is a deformed Sigmoid schematic diagram when the number of iterations is 20 times;
[0199] Crossover operation: Suppose there exists a state and a state Then:
[0200]
[0201] Mutation operation: Suppose there exists a state Then:
[0202]
[0203] As Figure 3 shown, in step 207, the crossover operation includes the following steps:
[0204] a: Perform a crossover operation on the selected optimal solution X best and the sub-optimal solution X subBest to generate new states X new1 and X new2 ;
[0205] b: Calculate F(X new1 ) and F(X new2 ), and take the minimum of the two as F(X new );
[0206] c: Compare F(X new ) with the worst state F(X worst );
[0207] d: If the new state F(X new ) < F(X worst ), then add the new state X new to the solution set and delete the worst state X worst ; otherwise, the solution set remains unchanged.
[0208] As Figure 4 shown, in step 207, the mutation operation includes the following steps:
[0209] a: Perform a mutation operation on the optimal solution X best to generate a new state X new ;
[0210] b: Calculate F(X new ), and compare it with F(X worst );
[0211] c: If the new state F(X new ) < F(X worst), then the new state X new is added to the solution set, and the worst state X worst is deleted. Conversely, the solution set remains unchanged.
[0212] Figure 1 is a schematic diagram of the secure cloud task scheduling model described in the present invention. The scheduling process steps are as follows:
[0213] Step 101: The service traffic set module is responsible for receiving the service traffic tasks submitted by each user. After classifying and processing them, it forwards information such as tasks and parameters to the scheduling center;
[0214] Step 102: The traffic information system of the scheduling center determines the type and requirements of the tasks and performs scheduling prediction;
[0215] Step 103: The optimization center performs multi-objective optimization processing on the predicted scheduling plan, and then sends the processed scheduling plan to the plan evaluation module.
[0216] Step 104: The plan evaluation module selects the optimal scheduling plan according to the evaluation index and allocates each task to the virtual security component resources in each security component resource pool according to the optimal scheduling plan.
[0217] Simulation experiment:
[0218] We use the cloud computing simulation simulator CloudSim to simulate the task scheduling experiment. CloudSim is an extensible and general simulation framework that can build models and simulate task scheduling experiments in a cloud environment.
[0219] A. Experimental environment
[0220] We performed the experimental operations on a Linux 64-bit operating system. The processor is an Intel Xeon E5-2680, the memory is 64GB, and the experimental environment language is Java.
[0221] B. Parameter settings
[0222] The simulation experiment created 15 independent virtual resources and 50 - 500 independent tasks (the number of tasks starts from 50 and increases in units of 50, and the maximum number of tasks is 500). The specific parameter settings are shown in Table 2. In order to better simulate a real secure cloud platform and construct a reasonable and effective secure cloud task scheduling strategy, when creating virtual resources and tasks, the experimental parameters are randomly selected from the value range under the condition of uniform distribution to simulate different performance computing resources and tasks of different lengths.
[0223] Table 2 Secure cloud model parameter table
[0224]
[0225] Since the parameters of the algorithm have a great impact on the algorithm performance, under the condition of ensuring the same experimental environment, the common parameters of the algorithm should be set to be consistent. The specific parameter settings of the algorithm are shown in Table 3.
[0226] Table 3 Scheduling Algorithm Parameter Table
[0227]
[0228]
[0229] After referring to the pricing standard of Alibaba Cloud's cloud server, the pricing of resources such as CPU computing resources, memory, and bandwidth of virtual resources is determined as shown in Table 4.
[0230] Table 4 Unit Price Table of Virtual Security Resource Pool
[0231]
[0232] The convergence speed is as Figures 6 - 7 shown; the task completion time is as Figure 8 shown; the load balance is as Figure 9 shown; the execution cost is as Figure 10 shown.
[0233] The above method is slightly based on the secure cloud task scheduling model, combined with the artificial fish swarm algorithm, and multi-objective optimization is carried out on indicators such as its completion time, execution cost, and load balance, so that the scheduling strategy can effectively reduce the task completion time, improve the real-time performance and effectiveness of network security, and at the same time ensure the load balance of resources of each virtual security component, improve its resource utilization rate, greatly reduce energy consumption and save operation costs, meeting the needs of users and service providers.
Claims
1. A multi-objective optimization task scheduling method based on a secure cloud, characterized in that: It includes the following steps: 1) Construct a task scheduling model in a secure cloud environment; 2) Optimize the artificial fish swarm algorithm to generate an optimal allocation scheme with execution cost, load balance, and task completion time as indicators, and achieve multi-objective optimization task scheduling based on the secure cloud; The task scheduling model includes: 101: Abnormal traffic subtask, hereinafter referred to as task, F = {f1, f2,..., f i ,..., f m}, where f i represents the i-th task, i ∈ {1, 2, 3,..., m}, m is the number of tasks, and the attribute values of f i can be expressed as: f i = {f i-length , f i-fileSize , f i-outputSize , f i-type , f i-level}, and the meanings of each attribute value respectively represent the length, size before execution, size after execution, category, and risk level of task f i ; 102: Virtual security component resources, hereinafter referred to as virtual resources, R = {r1, r2,..., r j ,..., r n}, where r j represents the j-th virtual resource, j ∈ {1, 2, 3,..., n}, n is the number of virtual resources, and the attribute value of r j can be expressed as: r j = {r j-mips , r j-bw , r j-ram , r j-pesNumber , r j-size , r j-type}, and the meanings of each attribute value respectively represent the computing power, bandwidth, operating memory, number of CPUs, storage space size, and category of the virtual resource r j ; 103: The execution time of a task on virtual resources. Since tasks have different risk levels, the execution time is not only related to the length of the task but also to the risk level of the task: 104: The transmission time of a task on virtual resources; 105: The time consumed by virtual resources to process a task is the sum of the transmission time and the execution time: c ij = exe ij + trans ij 106: Multiple tasks allocated on virtual resources are processed serially, while multiple virtual resources run in parallel. The expression is as follows: totalTtme = max(rComplete j ) where rComplete j is the completion time of the virtual resource r j , and totalTime is the total task completion time; 107: The execution cost of a task includes the sum of the computing cost, bandwidth cost, memory cost, and storage cost on virtual resources. Considering the heterogeneity in the secure cloud environment, there are various virtual resources with different performances. Therefore, unit costs are used for accumulation: exeCost ij = exe ij × r j-mips × r j-pesNumber × rUnitMipsCost transCost ij = trans ij × r j-bw × rUnitBwCost ramCost ij = c ij × r j-ram × rUnitRamCost sizeCost ij = c ij × r j-size × rUnitSizeCost Among them, totalCost is the total execution cost, exeCost ij , transCost ij , ramCost ij , sizeCost ij are the computing cost, bandwidth cost, memory cost, and storage cost required for the virtual resource r j to complete the task f i respectively; 108: The load of virtual resources not only needs to consider the length of tasks allocated on the virtual resources but also the performance of the virtual resources. Among them, η1 and η2 are the weight coefficients of the computing power and bandwidth size of the virtual resources respectively. The smaller the loadEvaluation value, the more balanced the load of each virtual resource. The virtual machine load formula is as follows: 109: Considering that task completion time, cost, and load balance are different evaluation indicators with different dimensions and dimension units, in order to eliminate the dimensional influence between multiple indicators, it is necessary to perform normalization processing on them to solve the comparability between different indicators. The normalization processing formulas for each indicator are as follows: Among them, f time , f cost , f load are respectively the normalized task completion time, execution cost, and load balance of virtual resources. totalTime min , totalCost min are respectively the minimum values of the task completion time and the execution cost. totalTime max , totalCost max are respectively the maximum values of the task completion time and the execution cost; Introduce a linear weight dynamic allocation strategy to perform dynamic weight allocation on the three indicators of time, cost, and load balance. The expression is as follows: F = λ1 × f time + λ2 × f cur + λ3 × f load The smaller the value of the fitness function F, the more reasonable the allocation scheme. Among them, λ1 is the preference degree of the algorithm for the task completion time, λ2 is the preference degree of the algorithm for the cost, λ3 is the preference degree of the algorithm for the load balance, and iter max is the maximum number of iterations of the artificial fish swarm, and iter cur is the current number of iterations of the artificial fish swarm; Table 1 The meanings of the abbreviated letters in the above expressions 2. The multi-objective optimization task scheduling method based on a secure cloud according to claim 1, wherein: In step 2), the artificial fish swarm algorithm is optimized, including the following steps: Step 201: Initialize each parameter in the artificial fish swarm algorithm: the total number of artificial fish Sum, step size Step, visual field View, number of attempts Attempt, crowding factor δ, and maximum number of iterations iter max and threshold t; Step 202: Tent chaos initialization: Randomly generate an m-dimensional random vector, Perform iteration according to formula (a) to obtain a chaotic sequence S; formula (a) is: where i is the artificial fish number and j is the task number; Step 203: Map the chaotic sequence S to the original space according to Equation (b) to generate the initial population X; Equation (b) is: where a j , b j is the value range of the j-th dimensional variable, that is, the range of virtual resources; Step 204: Calculate the fitness of each artificial fish and record the state of the artificial fish with the optimal objective function on the bulletin board; Step 205: Evaluate and compare the clustering and following behaviors of each artificial fish, select the most suitable behavior for the current artificial fish to move. If the constraint conditions are not met, then perform the foraging behavior or random swimming behavior; Step 206: The artificial fish executes the selected behavior and updates the state information of the artificial fish. At the same time, update the state of the optimal artificial fish on the bulletin board; Step 207: If the global optimal solution has not changed after the algorithm iterates continuously for t times and the current iteration number is less than the maximum iteration number, then perform crossover and mutation operations. At the same time, update the state of the optimal artificial fish on the bulletin board; Step 208: Judge whether the termination condition is met. If not, jump to step 205. Otherwise, jump to step 209; Step 209: Return the optimal allocation scheme.
3. The multi-objective optimization task scheduling method based on a security cloud according to claim 2, characterized in that: In step 202, the Tent mapping is used to generate a chaotic sequence. The expression is as follows: where x l is the l-th random number generated; Introduce a random variable into the original Tent chaotic map. The expression of the improved Tent chaotic map is as follows: The expression after Bernoulli shift transformation is as follows: Where N is the number of artificial fish swarms; introducing a random variable not only maintains the randomness, ergodicity, and regularity of the Tent chaotic map, but also can effectively avoid the iteration falling into small periodic points and unstable periodic points; Regarding the above description of the characteristics of the improved Tent map, combined with the characteristics of the artificial fish swarm algorithm in the secure cloud environment, the formula is adjusted as follows: Where i is the number of the artificial fish and j is the task number; The specific steps of steps 202 - 203 are as follows: ①: Randomly generate an m-dimensional random vector, ②: Iterate according to formula (a) to generate a chaotic sequence S; ③: Map each chaotic component in the chaotic sequence S back to the original space according to formula (b), where a j , b j is the value range of the j-th dimensional variable, that is, the range of virtual resources; ④: From these chaotic sequences, we can get i The initial population X after Tent mapping.
4. The multi-objective optimization task scheduling method based on a secure cloud according to claim 2, characterized in that: In step 204, adopting a dynamic step size and vision can make the algorithm achieve the best optimization effect: Adopt the Sigmoid function and transform it. The expression of the transformed Sigmoid function is: Since at the initial stage of the algorithm, under the action of the function, the vision and step size of the artificial fish are both enlarged, which helps the rapid convergence of the algorithm and getting out of the local optimal solution. The attenuation speed of the transformed Sigmoid function is relatively slow at the initial stage, so that the artificial fish has a long time to use a larger vision and step size to understand the information of the optimization space and get out of the local optimal and head towards the global optimal; As the algorithm executes, the vision and step size of the artificial fish gradually decrease under the action of the function, but still can maintain a relatively slow attenuation speed, so that the artificial fish has sufficient time to perform a refined search in the global optimal neighborhood, improving the accuracy of the optimal solution; The expressions of the improved step size and vision are as follows: dStep = Step × Sigmoid d dVie = View × Sigmoid d Where Step is the step size of the artificial fish and View is the vision of the artificial fish.
5. The multi-objective optimization task scheduling method based on a secure cloud according to claim 4, wherein: In step 204, an adaptive moving step size is adopted. In foraging behavior, following behavior, and schooling behavior, if the artificial fish moves from state X i to X j and (F(X i ) > F(X j )) at this time, it moves according to the ratio of the objective function values of the current state X i and the next state X j perceived in the field of vision as the proportional coefficient, that is, when F(X i ) is much greater than F(X j ), it indicates that the current position of the artificial fish is far from the global optimal point. Therefore, it moves as large a step size as possible to approach state X j , thus accelerating the convergence speed of the algorithm; when F(X i ) is close to F(X j ), it indicates that the artificial fish is currently in the neighborhood of the optimal point. Therefore, only a small step size is required to refine the search in its nearby neighborhood to improve the optimization accuracy of the algorithm; For the current state of the artificial fish and the next state to be explored Their expressions are as follows: Among them, dView is the improved field of view, dStep is the improved step size, and X next is the state after the current artificial fish moves, is the direction of the artificial fish movement, is the proportionality coefficient for dynamic step size movement.
6. The multi-objective optimization task scheduling method based on a security cloud according to claim 2, characterized in that: In step 207, set a threshold t. If the global optimal solution does not change after the algorithm iterates continuously for t times, perform crossover and mutation operations, arrange all the solution sets of the current iteration from the best to the worst, and then select the optimal solution X best and the sub-optimal solution X subBest ; Crossover operation: Suppose there exist states and state Then: Mutation operation: Assume there exists a state Then:
7. The multi-objective optimization task scheduling method based on a secure cloud according to claim 2, wherein: In step 207, the crossover operation includes the following steps: a: For the selected optimal solution X best and the sub-optimal solution X subBest perform a crossover operation to generate a new state X new1 and X new2 ; b: Calculate F(X new1 ), and F(X new2 ), and take the minimum of the two as F(X new ); c: Compare F(X new ) with the worst state F(X worst ); d: If the new state F(X new ) < F(X worst ), then add the new state X new to the solution set and delete the worst state X worst ; otherwise, the solution set remains unchanged.
8. The multi-objective optimization task scheduling method based on a security cloud according to claim 2, wherein: In step 207, the mutation operation includes the following steps: a: Perform mutation operation on the optimal solution X best to generate a new state X new ; b: Calculate F(X new ), and compare it with F(X worst ); c: If the new state F(X new ) < F(X worst ), then add the new state X new to the solution set and delete the worst state X worst , otherwise, the solution set remains unchanged.