The ancient Chinese civilization has a history spanning nearly 4,000 years and was ruled by a succession of dynasties. Key dynasties included the Xia, Shang, Zhou, Qin, and Han dynasties. The Shang dynasty invented writing, while the Qin dynasty unified laws and built projects like the Great Wall. The long-lasting Han dynasty explored other regions, established the Silk Road for trade, and instituted merit-based government appointments. Chinese philosophy included Confucianism which emphasized social order, Daoism focusing on nature, and Buddhism teaching the path to non-existence through nirvana.