A key aspect of ubiquitous computing is using sensor networks to effectively and unobtrusively infer human activities in their environment. A typical top-down method is to first label and decompose activities as sequences of actions with certain probabilities, and then use these predefined activity models for recognition and prediction. This method, however, does not capture the internal goals of different actions, and it only deals with those explicitly defined activity models. In this article, inspired by traditional activity theory [1] and qualitative process theory [2], we present a goaldirected human activity computing model. A formal activity ontology is proposed so as to capture the internal semantic relations between different atomic activities such as actions and processes. Several representative inference rules are introduced to predict the future activities in terms of the proposed activity ontology and the history of actions.