  The automation of High-Level Context (HLC) reasoning across intelligent
systems at scale is imperative because of the unceasing accumulation of
contextual data, the trend of the fusion of data from multiple sources (e.g.,
sensors, intelligent systems), and the intrinsic complexity and dynamism of
context-based decision-making processes. To mitigate the challenges posed by
these issues, we propose a novel Hierarchical Ontology-State Modeling (HOSM)
framework CSM-H-R, which programmatically combines ontologies and states at the
modeling phase and runtime phase for attaining the ability to recognize
meaningful HLC. It builds on the model of our prior work on the Context State
Machine (CSM) engine by incorporating the H (Hierarchy) and R (Relationship and
tRansition) dimensions to take care of the dynamic aspects of context. The
design of the framework supports the sharing and interoperation of context
among intelligent systems and the components for handling CSMs and the
management of hierarchy, relationship, and transition. Case studies are
developed for IntellElevator and IntellRestaurant, two intelligent applications
in a smart campus setting. The prototype implementation of the framework
experiments on translating the HLC reasoning into vector and matrix computing
and presents the potential of using advanced probabilistic models to reach the
next level of automation in integrating intelligent systems; meanwhile, privacy
protection support is achieved in the application domain by anonymization
through indexing and reducing information correlation. An implementation of the
framework is available at https://github.com/songhui01/CSM-H-R.
