How did the social structure of the Tang and Song dynasties reflect Confucian traditions?

How did the social structure of the Tang and Song dynasties reflect Confucian traditions?