Text this: Green energy management in internet of things based on quality of service composition