| Container cloud is chosen by Internet companies and manufacturing companies due to deployment quickly and lightweight of container and facing greater challenges.When a large number of task requests are passed to the container cloud platform,they will be finished faster than traditional cloud platform due to the container virtualization technology,which makes container cloud platform requires a more efficient task allocation method to match the overall efficiency.The task allocation strategy that Docker Swarm comes with can't balance the load on each resource node,leading to problems such as low resource utilization,load imbalance,and long time span.To solve the problems above,the task characteristics and attributes in container cloud environment are studied,and a fast method of task classification based on random forest is proposed.According to the classification result,the tasks of the same category are evenly distributed to different available resource nodes of sub-cluster to be executed.When the load of the sub-cluster reaches the threshold,the new sub-cluster is reopened.Classification accuracy is a key indicator of the random forest model,and it is affected by two important factors,the number of base classifiers and the sample size used to train each base classifier.The fireworks algorithm is used to optimize the structure of random forest.According to the convergence of random forest,when the number of base classifiers reaches a certain value,the generalization error of the model will converge to a minimum value.Thus,the optimal random forest classification model for task allocation is well trained.With the fireworks algorithm easy to fall into the local optimum,the parameters of the random forest are set repeatedly to the same value when iteration.To enhance the global search ability of the fireworks algorithm,is to increase the classification accuracy of random forests,and improve the performance of container cloud task allocation strategy based on random forest model.A improved fireworks algorithm with directional function is proposed in this paper that the mutation rate of mutant individuals is adjusted adaptively by the difference between the optimal two generations of optimal fitness values.All algorithms are implemented by MATLAB,the improved random forest model is compared with other typical classification algorithms with the standard data set.The experimental results show that the accuracy of the improved random forest model on the test data set is higher than that of BP neural network,random forest,random forests optimized by genetic algorithm and random forests optimized by unmodified fireworks algorithms.The Cloud Sim 4.0 simulation platform is used to validate the effectiveness of the container cloud task allocation strategy based on the improved random forest.The experimental results show that whether the condition is in load balancing or in the shortest time span,the task allocation strategy based on the improved random forest model is superior to BP-based allocation strategy,random forest-based allocation strategy and Docker Swarm's own Random allocation strategy on different task sets.In conclusion,the improved random forest model is applied to the container cloud task allocation strategy,making the strategy a good performance in balancing the load of each resource node and shortening the minimum time span under container cloud environment. |