In service grid, the implementation of distributed computing lies in the solution to the problem of how services interchange information. It is imperative that services interfaces be described in a machine understandable way, which can provide a semantic foundation for the dynamic discovery and composition of services. The technique of service semantic annotation satisfies this requirement, which refers to annotate service description using machine understandable metadata from shared domain ontologies. In this paper, an effective approach to automatic semantic annotation of services is presented. The process of service annotation is divided into two phases of ontology annotation phase and concept annotation phase. Emphasis is put on the solution to the problem of ontology annotation and a corresponding algorithm is presented based on machine learning. The experiments on the service resources in real world show that this algorithm is highly practical.