The word semantic similarity calculation is the basis of keyword search in the field of semantic web information retrieval. In view of the deficiency of semantic similarity computation in the existing algorithms, this paper discussed the influence of node depth on the semantic similarity, and presented an improved similarity calculation method based on the nearest common ancestor node, which can represent the depth of the two sememe nodes that need to compute the similarity. The simulation was carried out by using simple biological ontology and HowNet system architecture data, and the comparison with the original algorithm was done. The results prove the correctness and rationality of the improved method.