SUMMARYContext awareness is viewed as one of the most important goals in the pervasive computing paradigm. As one kind of context awareness, danger awareness describes and detects dangerous situations around a user, and provides services such as warning to protect the user from dangers. One important problem arising in danger-aware systems is that the description/definition of dangerous situations becomes more and more complex, since many factors have to be considered in such description, which brings a big burden to the developers/users and thereby reduces the reliability of the system. It is necessary to develop a flexible reasoning method, which can ease the description/definition of dangerous situations by reasoning dangers using limited specified/predefined contexts/rules, and increase system reliability by detecting unspecified dangerous situations. Some reasoning mechanisms based on context similarity were proposed to address the above problems. However, the current mechanisms are not so accurate in some cases, since the similarity is computed from only basic knowledge, e.g. nature property, such as material, size etc, and category information, i.e. they may cause false positive and false negative problems. To solve the above problems, in this paper we propose a new flexible and accurate method from feature point of view. Firstly, a new ontology explicitly integrating basic knowledge and danger feature is designed for computing similarity in danger-aware systems. Then a new method is proposed to compute object similarity from both basic knowledge and danger feature point of views when calculating context similarity. The method is implemented in an indoor ubiquitous test bed and evaluated through experiments. The experiment result shows that the accuracy of system can be effectively increased based on the comparison between system decision and estimation of human observers, comparing with the existing methods. And the burden of defining dangerous situations can be decreased by evaluating trade-off between the system's accuracy and burden of defining dangerous situations.