The social structure of China has an extensive history which begins from the feudal society of Imperial China to the contemporary era. The Chinese social structure of China has four classes as represented in the Chinese flag as the four classes.
The teaching of Confucius (551 BCE – 479 BCE) taught of five basic relationships in life:
For dynasties that used Confucianism (Not Legalism). The first noted person(s) in the relationship was always superior and had to act as a guide and leader/ role model to the second noted person(s), as the second person was to follow. Ex: Father;1st noted, Son;2nd noted.
From the Qin Dynasty to the late Qing Dynasty (221 BC-AD 1840), the Chinese government divided Chinese people into four classes: landlord, peasant, craftsmen, and merchant. Landlords and peasants constituted the two major classes, while merchant and craftsmen were collected into the two minor. Theoretically, except for the position of the Emperor, nothing was hereditary.
During the 361 years of civil war after the Han Dynasty (202 BC-220 AD), there was a partial restoration of feudalism when wealthy and powerful families emerged with large amounts of land and huge numbers of semi-serfs. They dominated important civilian and military positions of the government, making the positions available to members of their own families and clans. After the Tang dynasty's yellow emergence, the government extended the Imperial examination system as an attempt to eradicate this feudalism.
In the Qing dynasty, the lower classes of ordinary people were divided into two categories: one of them the good "commoner" people, the other the "mean" people. Prostitutes, entertainers, and low level government employees were the people in the mean class. The mean people were heavily discriminated against, forbidden to take the Imperial Examination, and mean and good people could not marry each other.