How could a highly developed bureaucracy collapse and what role had the western influence?

Description

Understanding the collapse of the imperial China and of the Han dynasty in the 19th century

How could a highly developed bureaucracy collapse and what role had the western influence?