Particle swarm optimization (PSO) is widely used to solve complex optimization problems. However, classical PSO may be trapped in local optima and fails to converge to global optimum. In this paper, the concept of the self particles and the random particles is introduced into classical PSO to keep the particle diversity. All particles are divided into the standard particles, the self particles and the random particles according to special proportion. The feature of the proposed algorithm is analyzed and several testing functions are performed in simulation study. Experimental results show that, the proposed PDPSO algorithm can escape from local minima and significantly enhance the convergence precision.