Being lack of the context around user, the retrieval results mostly do not fulfill user's expectation in traditional semantic retrieval applications. Rich semantic information is hidden in retrieval context. Context also contains much implicit logic relations between users and resources, which can help machines to understand users' demands better. Reasoning over contexts automatically can forecast user's search intentions and help improving retrieval efficiency greatly. In order to make full use of contexts, a model for semantic knowledge retrieval based on context (SKRC) is proposed in the paper. The mechanism of SKRC is to match between user context and resource context in retrieval. The user context ontology and information resource context ontology are discussed for describing context elements clearly and explicitly. And then the reasoning meta-rules and a matching algorithm between user context and information resource context are proposed as the foundation to refine results of knowledge retrieval.