add plug manage class and some utils function and simple msg process function