Aiming at the problem that it is difficult to achieve high privacy security and low time consumption in the process of user terminals resource allocation, this paper proposes a computing resource allocation strategy considering privacy protection mechanism in edge computing environment. Firstly, the problem is modelled as partially observable Markov decision process, and a reinforcement learning algorithm is proposed to minimize the failure rate of tasks. Secondly, the privacy entropy is used to protect the privacy information data, and computing tasks are divided into several different types of data to measure the uncertainty of computing tasks. Finally, the time consumption and the data privacy security degree of user terminals are quantified by using time computing model and privacy entropy value, and a multi‐objective optimization problem model is established. Experiments show that the system energy consumption of the proposed method in the worst case is also less than 20 J, which is better than the two comparison methods. This method not only reduces the system energy consumption, but also enhances the security of data distribution and transmission.