Secure Device and Knowledge Discovery in Internet of Things