Traditional book catalogues divided the corpus of literature into four categories (sibu 四部). This system is quite probably derived from a physical arrangement in the four storerooms of the imperial library during the Jin period 晉 (265-420). Before the introduction of the four-part system, catalogues were divided into seven parts, as can be seen in Liu Xin's 劉歆 catalogue Qilüe 七略 (preserved as ch. 30 Yiwen zhi 藝文志 in the official dynastic history Hanshu 漢書) from the Han period 漢 (206 BCE-220 CE).
The earliest bibliography arranged in four parts was Xu Xun's 荀勗 Zhongjing xinbu 中經新簿, which is unfortunately lost. Xu's catalogue was divided into parts I (jia 甲: Confucian Classics, jing 經), II (yi 乙: Masters and Philosophers, zi 子), III (bing 丙, Historiography, shi 史), and IV (ding 丁: Belles-lettres and Collections, ji 集).
Li Chong 李充, compiler of the imperial catalogue Jin Yuandi sibu shumu 晉元帝四部書目, shortly later changed the order to Confucian Classics (including commentaries on them as well as books on music and the script), Historiography (and books on administration and statecraft), Masters and Philosophery, and Belles-lettres and Collections. This order was maintained until modern times.
The oldest surviving book catalogue (compiled under the supervision of Wei Zheng 魏征) with this order is ch. 32-35 Jingji zhi 經籍志 in the official dynastic history Suishu 隋書, compiled in the early Tang period 唐 (618-907). The subcategories to these four categories experienced profound changes over time.
The model was canonized in the 18th-century catalogue Siku quanshu zongmu tiyao 四庫全書總目提要 and the series Siku quanshu 四庫全書. Other examples for the use of the four-categories arrangement are the series Sibu congkan 四部叢刊 (1919) and Sibu beiyao 四部備要 (1936). Other collections also use this system implicitly.
Although Chinese libaries today use modern concepts of organizing their modern holdings, the traditional part is often still classified in the four-categories way, as it provides a reasonable and comfortable way of organizing and finding traditional literature.