Implementation of the Middleware System Using Effective Memory Structure in M2M Network