Context-aware architecture collects various context data from heterogeneous sensors and provides an intelligent service by exploiting the collected data. In this article we explain the generalized context-aware software architecture for heterogeneous smart environments. The proposed architecture integrates large-scale contexts from multiple heterogeneous sensors, and makes a semantic decision by fusing and reasoning about the collected contexts. Moreover, we discuss a designed architecture that manages communities between large numbers of heterogeneous information entities and enhances intelligence abilities.