Integrable structure, W-symmetry and AGT relation