This paper presents a semantic similarity measurement algorithm aimed at enhancing ontology-based data integration systems, particularly in web query services. It emphasizes the importance of accurately mapping user input queries to relevant domain concepts within ontologies while addressing semantic conflicts through generated mapping rules. The proposed algorithm demonstrates improved precision and recall rates compared to traditional methods, thereby facilitating more efficient retrieval of information from domain-specific ontologies.