Based on a known Lie algebra, we get its two semi-simple subalgebras which are ideals. Two loop algebras corresponding to the two ideals are introduced, respectively, which are used to establish isospectral problems. It follows that two integrable hierarchies which are generalized forms of the AKNS hierarchy and the KN hierarchy are worked out.