Relationship between the restricted AKNS flows and the restricted KdV flows