Intelligent and Efficient IoT Through the Cooperation of TinyML and Edge Computing