Serverless is a new computing paradigm with lightweight and agile characteristics,due to the particularity of its architecture,some new security threats are introduced on the basis of the origi-nal cloud security issues.To address the problem that it is difficult to accurately select the optimal defense strategy in unknown offensive and defensive scenarios,a defense strategy is proposed based on the diversified ideas of MTD from the aspects of virtualization layer and application layer.The Q-Learning algorithm with Boltzmann exploration is combined with the replication dynamic equation to construct an evolutionary game model with an exploration mechanism from the perspective of bound-ed rationality.Defenders can continuously carry out trial and error,exploration,implementation in repeated offensive and defensive confrontations,and finally obtain the optimal defense strategy and the maximum benefit.Experiments show that the evolutionary game model introducing the exploration mechanism is predictable and has strong stability at the equilibrium point of the evolutionary game.