Study the charging process of moving quantum batteries inside cavity