Safe Data Transmission Architecture Based on Cloud for Internet of Things