The key of ontology mapping is to compute concepts similarities. In order to decrease errors, the computation of similarity should consider the influences of relations and attributes. In this paper, a computation method of similarity based on PSO is put forward. At first, the semantic similarity of concepts is computed. Then compute the relation similarity and the attribute similarity. In order to decrease the computation quantity, the attribute priority is specified by PSO algorithm. At last, the attribute with high priority is chosen according to the user need. Take two ontologies as example and specify the attribute priority. Experiments results show that this calculative method can improve the precision of results and reduce the calculated quantities.