Next Article in Journal
Historical Anatomy of the Devotional Sculpture of Our Lady of Grace: Scientific and Patrimonial Contributions to the History of Southern Brazil
Previous Article in Journal
Degeneration and Its Discontents: Rereading Nordau in Context
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Digital Humanities Study of Chinese Granary Systems Based on the Twenty-Six Dynastic Histories

by
Jiamin Wan
School of History and Culture, Hunan Normal University, No. 36 Lushan Road, Yuelu District, Changsha 410081, China
Histories 2026, 6(2), 29; https://doi.org/10.3390/histories6020029
Submission received: 19 January 2026 / Revised: 16 March 2026 / Accepted: 7 April 2026 / Published: 10 April 2026
(This article belongs to the Section Digital and Computational History)

Abstract

Granary systems formed a core institutional foundation of state governance, famine relief, and social stabilization in premodern China. Using the complete corpus of the Twenty-Six Dynastic Histories, this study employs digital humanities methods—including text preprocessing, word-frequency analysis, collocation analysis, time-series comparison, and geographic co-occurrence analysis—to examine the long-term evolution and institutional structure of three major granary types: ever-normal granaries (ChangpingCang), charitable granaries (Yicang), and community granaries (Shecang). The results reveal significant temporal and spatial variation closely associated with dynastic stability, fiscal capacity, and disaster conditions. Ever-normal granaries evolved from early formation in the Western Han to institutional consolidation in the Tang, peak expansion in the Song, and functional diversification thereafter, operating as a centralized mechanism integrating price regulation, fiscal management, and famine relief. Charitable and community granaries, by contrast, display increasingly differentiated roles, reflecting a shift toward localized and socially embedded relief in later periods. Spatial analysis further demonstrates a hierarchical deployment pattern centered on political and agrarian cores and extended through transport corridors and frontier zones. Overall, the study highlights a multilayered relief system combining state authority and social participation, offering a data-driven reinterpretation of Chinese charity and governance.

1. Introduction

Grain production and storage have always been central to governance in ancient Chinese dynasties, directly affecting the stability of state power and the orderly functioning of society. For centuries, rulers commonly adopted proactive grain-storage strategies, constructing large-scale official and communal granaries to establish a system in which “accumulation serves as the foundation of the state.” The Liji: Wangzhi states, “A state without nine years of reserves is insufficient; without six years of reserves it is in urgency; without three years of reserves, it is not truly a state” (Hu n.d.), clearly illustrating the close relationship between grain reserves and the continuity of state authority. Over time, the granary system was continuously inherited, expanded, and institutionalized, gradually evolving into a key pillar of the state governance structure. In ancient society, the most important granary institutions related to famine relief were the charitable granaries, ever-normal granaries, and community granaries. By stabilizing grain prices, adjusting surpluses and shortages, and providing disaster relief, these institutions effectively maintained the stability of the agricultural economy and local society. This system, which combined state leadership with social cooperation, evolved continuously over the long historical trajectory and eventually became an essential component of governance philosophy and institutional arrangements in ancient China, playing an irreplaceable role in stabilizing the regime, improving livelihoods, and promoting social balance.
However, historical sources from ancient China are generally fragmented and largely focused on institutional records; they rarely provide specialized accounts of granaries, and relevant content is highly dispersed. This posed significant challenges for traditional research methods relying on manual reading, extraction, and comparison. Given such a vast and scattered corpus, comprehensive and detailed utilization was nearly impossible, leaving previous studies largely confined to partial evidence or fragmented analyses.
Owing to these difficulties, systematic research on the granary system emerged relatively late. It was not until 1958 that Wang conducted preliminary research on the Charitable Granaries and land tax system of the Tang dynasty (X. Wang 1958). Subsequent studies primarily focused on the three dynasties with highly developed granary systems: Tang (M. Zhang 2019; H. Yang 2005), Song (F. Yang 2012; Xu and Yan 2006), and Qing (Y. Zhang 1993; He 2019; J. Yang 2024). These studies provided an important foundation for understanding the institutional structure and operational mechanisms of China’s historical grain-relief system. However, due to the strong continuity of Chinese historical institutions (Chung 2011; Jin and Zhang 2025), existing research often concentrates on a single dynasty or region, relying mainly on traditional textual interpretation and case studies, and lacks systematic, long-term, macro-level investigations of the evolution of granary institutions.
In recent years, the rise in digital humanities has offered new analytical approaches for historical research (Le Deuff 2018). By conducting quantitative analyses of large-scale historical texts, researchers can detect long-term historical structures and trends beyond conventional close reading. Methods such as word-frequency analysis, text mining, and corpus-based approaches have been widely applied in literary studies, intellectual history, and cultural history (Brennan 2018). Nevertheless, the application of digital humanities in the study of Chinese institutional history remains relatively limited, particularly in exploring institutional evolution using extensive official historical records, leaving considerable room for further research (Ye et al. 2026). It is important to note that digital humanities methods are not intended to replace traditional narrative-based historical research; rather, they serve as supplementary tools that enable deeper textual analysis, reveal latent themes, and provide new perspectives. In this study, the combination of digital humanities approaches and traditional historical interpretation allows us to observe the evolution of the granary system at a macro level while preserving detailed understanding of institutional narratives.
Building on this context, this paper integrates digital humanities approaches with traditional historical analysis, using the Twenty-Six Dynastic Histories as the primary textual corpus to systematically quantify and analyze vocabulary related to granary systems. The objectives of this study are fourfold:
  • To examine the dynamic evolution of the significance of granary systems throughout Chinese history through word frequency statistics.
  • To investigate the influence of centralized imperial governance on the development and operation of granary institutions.
  • To explore the similarities, differences, and interactions between official and private granary systems in ancient China.
  • To demonstrate how digital humanities methods can serve as a paradigm for macro-level studies in Chinese social history and related fields.
By analyzing word frequencies, this study captures the varying degrees of attention devoted to granary institutions across different historical periods, as well as fluctuations in policy intensity and institutional density. From a long-term perspective, granary systems were not static but evolved under the combined effects of political structures, fiscal capacity, agricultural production patterns, and the frequency and severity of natural disasters. Applying time-series analysis to granary-related term frequencies enables the identification of key moments of institutional transformation, including the rise and decline of different types of granaries—such as ever-normal granaries, charitable granaries, and community granaries—as well as shifts in the allocation of storage-related authority between central and local governments.
Through this quantitative historical approach, the paper clarifies both continuities and discontinuities within China’s granary system, providing insights into long-term policy trends in famine relief, grain price regulation, and the maintenance of social stability.

2. Research Materials and Methods

2.1. Research Materials

The primary research materials for this study are drawn from the compilation of China’s traditional official histories, the Twenty-Six Dynastic Histories (Ershiliu Shi). China has maintained a long-standing historiographical tradition (Morgan 2006), and among existing research sources, the Twenty-Four Dynastic Histories undoubtedly constitute the most central and authoritative foundation. As official dynastic histories compiled by successive regimes, the Twenty-Four Dynastic Histories cover the period from the Three Sovereigns and Five Emperors to the end of the Ming dynasty (Chongzhen reign), comprising 3213 volumes and over 40 million characters. During the Republic of China period (1912–1949), additional official histories were compiled, including the New History of Yuan (Xin Yuanshi) and the Draft History of Qing (Qing Shigao). Together, these constitute the Twenty-Six Dynastic Histories, comprehensive historiographical works encompassing politics, economy, society, and culture, and serving as foundational resources for the study of China’s historical granary systems. This corpus preserves extensive records on the functioning of state institutions, including fiscal management, grain storage, and famine relief, thus providing a critical historical basis for investigating the evolution of granary institutions in ancient China.
The Twenty-Six Dynastic Histories texts used in this study were not directly sourced from printed editions, but rather from digitized historical databases. In recent years, classical Chinese official histories have been systematically digitized and made widely accessible through various academic platforms (Li et al. 2019; Miao and Le 2025). The corpus used here is derived from publicly released digital editions of the Twenty-Six Dynastic Histories, and the original texts were subjected to necessary cleaning and formatting to construct a research corpus suitable for textual analysis. While minor differences may exist among different digital versions—such as punctuation, layout, or character forms—the substantive historical content is largely consistent and does not materially affect macro-level statistical analyses. In the course of this study, the following publicly available online tools and platforms were utilized (see Table 1).

2.2. Research Focus

The types of grain storage systems in ancient China were diverse, with multiple forms of official and private granaries existing across different periods. To ensure clarity of research objectives and comparability of analytical results, this study focuses on the three most representative granary systems documented in historical Chinese sources: the Changping granary (Changping Cang), the Yicang granary (Yicang), and the Shecang granary (She Cang).
The Changping system originated in the Western Han dynasty, with the primary purpose of regulating grain market prices through official storage, maintaining prices at a relatively stable level over the long term. As a typical government-run granary, the grain stored in Changping granaries belonged to the imperial court, and local officials were not authorized to allocate it arbitrarily. Its basic operational mechanism followed the principle of “storing in years of abundance, releasing in years of shortage.” During years of abundant harvests and declining prices, the government purchased grain from local producers at relatively high prices to prevent “low grain prices harming farmers”; during famine years or periods of rising prices, the government sold stored grain below market rates to alleviate shortages and stabilize the market, thus avoiding “high grain prices harming the people” (Pan 2017). Therefore, Changping granaries were not only a crucial component of the state grain reserve system but also an important institutional tool for traditional state regulation of the grain market.
The Yicang system emerged during the Sui dynasty, with its core objective being the storage of grain for disaster relief and assistance to the poor. Unlike the primarily government-established Changping granaries, Yicang granaries could be set up either by official authorities or by local social actors, reflecting a certain degree of public welfare orientation. Their operation typically involved accumulating grain in years of plenty and opening the granaries during famine or lean periods to provide relief or offering loans of grain to impoverished households to alleviate livelihood difficulties. During the Tang and Song dynasties, the Yicang system further developed, gradually becoming an integral part of the traditional disaster relief framework (F. Yang 2012). In the Yuan dynasty, the government also established Yicang at the local community level and formulated detailed regulations concerning the collection, management, and use of Yicang grain.
The Shecang system represented a further development of the Yicang system. Before the Southern Song dynasty, Yicang granaries were mostly located in urban areas under government management, which made it difficult to cover vast rural regions in practice. To address this issue, during the Southern Song, Zhu Xi promoted the establishment of Shecang granaries in rural areas, supervised by government authorities and organized by local gentry, mainly intended for grain storage and famine relief (Xu 2007). During the Ming and Qing dynasties, the Shecang system further integrated with local governance mechanisms such as village agreements (xiangyue) and mutual-aid groups (bao-jia), playing an important role in rural relief and social mutual assistance, and gradually becoming a key component of the local grain reserve system (H. Wang 2004).
Overall, the Changping, Yicang, and Shecang granaries respectively represent three different levels of grain reserve systems: state regulation, social welfare, and local mutual aid. This study focuses on records related to these three systems, conducting quantitative and analytical investigations to examine their institutional practices and historical narrative characteristics across different periods.

2.3. Methods

2.3.1. Text Cleaning

Before conducting word frequency analysis, it is essential to preprocess the Twenty-Six Dynastic Histories texts to ensure the reliability of the results. In historical sources, the character “仓” (Cang, meaning granary or storehouse) does not have a single, uniform meaning. While it predominantly refers to granary systems, it also occurs in non-institutional contexts, such as personal names (Cangjie, Cangci) or as descriptive words indicating states (canzu, cancu). To ensure that the statistical results accurately reflect the textual density of granary and relief institutions across dynasties, these polysemous cases must be identified and removed. However, sampling and comparison across the texts show that such non-institutional occurrences of “仓” are extremely rare, and their semantic deviation has minimal impact on macro-level statistics, insufficient to alter overall trends.
Conversely, terms referring to granary-related offices or official positions—such as Ta Cang Ling (Governor of the Grand Granary), Shaofu Ta Cang, and Si Cang—as well as other designations directly related to grain storage or market regulation, are considered integral components of the granary system and should be included in the analysis to preserve the completeness of institutional vocabulary.
From a technical perspective, this study first employed automated text retrieval and word segmentation tools to identify all occurrences of the character “仓” within the corpus, followed by automatic classification based on a pre-established keyword list. The results of automated identification were then subjected to manual sampling verification to ensure reliability. Sampling checks indicated that non-institutional occurrences of “仓” account for a very small proportion of the corpus, exerting only limited influence on overall statistical trends (see Table 2). Combining automated identification with manual verification, the potential error rate in text recognition is estimated to be low, insufficient to affect the overall historical trends of granary-related vocabulary.

2.3.2. Topic Analysis

After completing text cleaning, topic analysis was employed to grasp the structural characteristics of discussions related to grain storage and disaster relief in the Twenty-Six Dynastic Histories at a macro level. Topic analysis is a common text-mining technique that identifies latent topics in large-scale textual corpora by statistically analyzing the co-occurrence patterns of words, thereby revealing the main thematic structures contained within the texts.
Specifically, this study applies the Latent Dirichlet Allocation (LDA) topic model (Blei et al. 2003) to analyze the corpus. LDA probabilistically assigns words in the text to different topics and identifies representative keyword combinations for each topic by computing the probability distributions of words across topics. Compared with traditional methods that rely on manual reading for thematic induction, the LDA model can extract statistically meaningful topic structures from large-scale corpora, making it widely used in digital humanities research.
In this study, the preprocessed Twenty-Six Dynastic Histories texts were input into the topic model. After multiple training iterations, several latent topics were generated. The content of each topic was then interpreted and summarized based on its high-frequency keywords. During the analysis, particular attention was given to topics related to grain storage, warehouse management, disaster relief, and grain price regulation, in order to identify the primary contexts in which the granary system is represented in official historical narratives.

2.3.3. Word Segmentation and Frequency Analysis

Building on the results of topic analysis, this study further employed word segmentation and frequency analysis to quantitatively examine the distribution of granary system-related terms in the Twenty-Six Dynastic Histories (Kurumada et al. 2013). Classical Chinese texts generally lack explicit word boundaries; therefore, segmentation techniques are required to divide continuous text into meaningful lexical units suitable for subsequent statistical analysis.
In practice, the preprocessed corpus was first subjected to automated word segmentation. This process was then combined with manual verification to identify and filter keywords related to the granary system. The primary terms of interest included “仓” (Cang), “常平仓” (Changping Cang), “义仓” (Yicang), and “社仓” (Shecang), which are closely associated with the state and local grain storage institutions.
After segmentation, the frequency of each relevant keyword was computed and categorized according to different historical periods. By comparing the occurrence counts across dynasties or historical stages, the study aimed to observe, at a macro level, the degree of attention to the granary system in official historical narratives and its temporal evolution.

2.3.4. Concordance Analysis

Following topic modeling and keyword frequency analysis, concordance analysis was applied to examine the specific textual contexts in which granary system terms appear (Nasukawa and Nagano 2001). Unlike analyses that rely solely on quantitative statistics, concordance analysis emphasizes the holistic reading of text segments containing the target keywords, allowing for an assessment of their functional and institutional significance within historical narratives.
Specifically, text segments containing keywords such as “Cang,” “ChangpingCang,” “Yicang,” and “Shecang” were extracted based on the segmentation and frequency results, and the relevant passages were systematically organized. These textual contexts were then closely read and interpreted to analyze how the granary system appeared in different narrative settings. For instance, in some records, granary institutions are frequently mentioned alongside famine relief or disaster aid, reflecting their vital role in social assistance during emergencies (Tian et al. 2024). In other contexts, granary references are associated with fiscal regulation, grain price stabilization, or local governance (Shiue 2005), illustrating the institutional function of granaries within the broader framework of state economic management.

3. Word Frequency Statistics and Analysis of Granary Terms in Ancient China

Word frequency analysis can reflect, to some extent, the level of attention each dynasty devoted to granary systems and the relative activity of granary-related matters. However, due to differences in the length and detail of historical records, absolute word counts alone may be misleading. For instance, the History of Song (Song Shi) and the Draft History of Qing (Qing Shi Gao) each contain approximately five million characters, whereas histories of fragmented regimes, such as the Book of Wei (Wei Shu) and the Book of Northern Qi (Bei Qi Shu), include only around one hundred thousand characters—an order-of-magnitude difference that inevitably affects absolute word frequencies.
To account for these discrepancies, it is necessary to calculate the relative proportion of granary-related terms within each text, combining absolute and relative frequencies to achieve a more objective assessment (see Table 3).
From the perspective of the absolute word frequency of the character Cang (“仓”) in the Twenty-Six Dynastic Histories, the importance of granary systems in state governance and social relief in ancient China is clearly evident. In the three official histories from the pre-Qin to the Han dynasties—the Records of the Grand Historian (Shi Ji), the Book of Han (Han Shu), and the Book of Later Han (Hou Han Shu)—the frequency of Cang increased from 73 to 196, indicating that, following the consolidation of central authority, the state began to treat granary management as a key institutional arrangement for disaster relief and social stability. During the Han period, the granary system expanded continuously: institutions such as the Tai Cang and Yicang became increasingly formalized. Granaries were no longer merely auxiliary components of economic management but served as critical instruments for maintaining social order and implementing benevolent policies. The link between granary management and disaster relief was strengthened during this period, laying the structural foundation for later charitable institutions.
During the Wei, Jin, and Northern and Southern Dynasties, the character Cang appeared frequently in historical records, e.g., 213 times in the Book of Wei (Wei Shu) and 210 times in the History of the Northern Dynasties (Bei Shi), reflecting the role of granaries in stabilizing society and reconstructing the economy amid prolonged warfare and political upheaval. Given the recurrent social disruptions, disaster relief through granaries became almost a routine tool of governance. Many regimes established Changping Cang, Yicang, or strengthened local granary networks to alleviate famine and stabilize displaced populations; the consistently high frequency of Cang in the texts reflects this institutional demand.
By the Sui and Tang dynasties, China’s ancient granary system reached its first peak. The Old Book of Tang (Jiu Tang Shu) records Cang 468 times and the New Book of Tang (Xin Tang Shu) 403 times, indicating that the granary system had entered a mature stage of institutionalization and nationwide networking. From the central Tai Cang to local Yicang and Changping Cang, and further to the opening of granaries during famines, the functions of the granary system extended far beyond economic management, becoming a core component of the state’s charitable apparatus. The complexity of the system and its nationwide network also accounts for the substantial increase in related records.
In the Song, Yuan, Ming, and Qing dynasties, the word frequency remained high or continued to rise. The History of Song (Song Shi) records Cang 854 times, the History of Yuan (Yuan Shi) 686 times, the New History of Yuan (Xin Yuan Shi) 527 times, the History of Ming (Ming Shi) 845 times, and notably, the Draft History of Qing (Qing Shi Gao) 1383 times, reflecting the highly bureaucratized nature of the granary system in the context of a large, unified empire. With population growth, frequent disasters, and a stable fiscal system, the state granary system became increasingly extensive, and its disaster relief functions became more mature and normalized. Granaries were used not only for famine relief but also for market regulation and price stabilization, forming a composite system that combined charitable, economic, and political functions. Higher word frequencies indicate more complex and sophisticated granary operations recorded in the historical texts and also reflect the state’s active role in securing the welfare of its populace.
From the perspective of the per-ten-thousand (‱) distribution of the character Cang (“仓”) in the Twenty-Six Dynastic Histories (see Figure 1), the relative frequency exhibits clear phase-specific differences across historical periods, reflecting the evolving trajectory of China’s granary and relief systems in response to changes in state structure, fiscal systems, and social risk. During the Han period, the Records of the Grand Historian (Shi Ji) and the Book of Han (Han Shu) show frequencies of 1.18‱ and 1.57‱, respectively, while the Book of Later Han (Hou Han Shu) is 1.12‱, remaining generally between 1.0‱ and 1.6‱. This indicates a stable application of granary and fiscal systems after the early empire’s institutional foundations had been established. The frequency density below 2‱ suggests that, although granary management held an important role in governance, the institutional system had not yet reached a high level of complexity.
During the Three Kingdoms to Western Jin period, the frequency density fluctuates, with the Records of the Three Kingdoms (San Guo Zhi) at 1.76‱ and the Book of Jin (Jin Shu) at 1.20‱. These variations are closely related to the frequent regional granary mobilizations and institutional inconsistency caused by prolonged warfare. The Northern and Southern Dynasties show a pronounced north–south disparity: the southern dynasties’ histories, such as the Book of Southern Qi (Nan Qi Shu, 0.93‱), Book of Liang (Liang Shu, 0.50‱), and Book of Chen (Chen Shu, 0.61‱), are generally lower, whereas the northern dynasties’ records, including the Book of Wei (Wei Shu, 1.76‱) and the History of the Northern Dynasties (Bei Shi, 1.58‱), are significantly higher. This reflects structural factors such as greater political-military pressures, frequent disasters, and the northern states’ heavy reliance on granary management, demonstrating a “strong north, weak south” pattern in the granary system during this period.
During the Sui and Tang dynasties, the relative frequency of Cang rose overall, reaching its first peak. The Book of Sui (Sui Shu) registers 2.36‱, while the Old Book of Tang (Jiu Tang Shu) and the New Book of Tang (Xin Tang Shu) show 1.96‱ and 2.01‱, respectively, all substantially higher than previous dynasties. This increase reflects the unified empire’s establishment of a nationwide, multifunctional granary system following institutional integration. The maturation of the Changping Cang and Yicang systems during the Sui and Tang made granaries a key measure for disaster relief, price stabilization, and the maintenance of local social order, which in turn increased the density of related records in the historical texts.
During the Five Dynasties period, frequency density dropped sharply, with the Old History of the Five Dynasties (Jiu Wu Dai Shi, 0.75‱) and the New History of the Five Dynasties (Xin Wu Dai Shi, 0.60‱), consistent with the collapse of central fiscal and granary systems during political instability. The weakening of institutional narratives led to fewer granary-related records.
From the Song dynasty onward, China’s granary system entered a second institutional peak. The History of Song (Song Shi) reaches 1.80‱, while the Histories of Liao, Jin, and Yuan record 1.70‱, 3.67‱, and 2.73‱, respectively, reflecting the combined effects of increasing institutional complexity and fiscal pressure. Notably, the History of Yuan (Yuan Shi) frequency of 3.67‱ is among the highest in the series, closely related to the Yuan dynasty’s military fiscal reliance on granary logistics, the diversification of its economic structure, and the detailed recording conventions of official and fiscal institutions. For example, “Sending envoys to open the granaries to relieve the soldiers stationed in Datong and their subordinates suffering from hunger” (Song n.d.).
The Ming and Qing dynasties maintained high relative frequencies, with the History of Ming (Ming Shi) at 2.56‱ and the Draft History of Qing (Qing Shi Gao) at 2.64‱, reflecting the further consolidation of granary functions in late imperial governance. The multi-tiered system of official granaries, Yicang, and She Cang, combined with extensive relief practices, made granaries essential infrastructure for sustaining local society and responding to disasters, resulting in persistently high documentation density.

4. Relief Mechanisms and Functions of the Changping Cang

The Changping Cang was an official state-established granary system in ancient China, primarily designed to stabilize grain prices and maintain social order. As early as the early Warring States period, Li Kui of Wei proposed the concept of pingdi (“price leveling”) in the Fa Jing, laying the intellectual foundation for the Changping Cang system. During the reign of Emperor Xuan of the Western Han, Geng Shouchang formally submitted a memorial advocating the establishment of the first Changping Cang:
“He petitioned that all border commanderies build granaries, to purchase grain when prices were low and sell when prices were high, benefiting farmers. This was named the ‘Changping Cang’, which facilitated the people” (Ban and Shigu n.d.).
The core mechanism of the Changping Cang can be summarized as “buy when prices are low, sell when prices are high,” thereby preventing severe social unrest caused by extreme fluctuations in grain prices. Although the primary aim was market stabilization, during periods of famine or disaster, the Changping Cang also served a relief function, providing a material and institutional basis for state-sponsored assistance. This system transformed emergency aid into a stable and continuous organizational practice, forming the institutional foundation of official charity.
Therefore, by conducting textual mining with Changping Cang as a keyword, one can uncover the structural relationship between state relief systems and social charitable traditions, offering insights into how the ancient charitable system was generated, evolved, and operated within the framework of state governance (see Table 4).
As shown in Table 4, the frequency of the term “Changping” in the Twenty-Six Dynastic Histories exhibits a highly uneven distribution, reflecting the historical trajectory of the formation, maturation, and institutionalization of the Changping Cang system in ancient China. From the pre-Qin period to the early Han dynasty, the term appears very rarely—either zero or only a few times—indicating that the Changping Cang had not yet been fully established prior to its formal implementation under Emperor Wu of the Western Han. Its role in state economic regulation and grain loan mechanisms was relatively minor. In the Han Shu, it occurs seven times, suggesting the emergence of a nascent system in the mid-to-late Western Han, although primarily in the form of policy notes rather than a fully structured institution.
During the Wei, Jin, and Southern and Northern Dynasties, the overall frequency remains low, typically ranging from 0 to 3 occurrences per historical text, reflecting the limited fiscal capacity and the absence of a stable administrative structure in times of turmoil. Consequently, the Changping Cang could not be broadly implemented, and relief efforts largely relied on local or temporary measures rather than a centrally controlled, permanent granary system.
The system reached its peak during the Sui and Tang dynasties. In the Sui Shu, the term appears 14 times, while the Old Tang Shu and New Tang Shu record 64 and 27 occurrences, respectively, indicating that the Tang dynasty represented the key period in which the Changping Cang was formalized and stabilized. The high frequency in the Old Tang Shu reflects the state’s administrative need to regulate grain prices, provide famine relief, and maintain the equal-field system and market stability, making the Changping Cang a critical institutional element. Notably, the frequency difference between the Old Tang Shu and the New Tang Shu is attributable to their editorial focus: the former emphasizes administrative and policy entries, whereas the latter is more biographical, leading to fewer institutional entries.
In the Song Shi, the frequency of “Changping” rises dramatically to 690 occurrences, far exceeding any other official history. By the Song dynasty, the Changping Cang had evolved from a mechanism primarily intended for famine relief and price stabilization into a comprehensive institutional tool integrating grain reserves, market regulation, fiscal operations, and social stability maintenance. This evolution was largely driven by tax reforms, which shifted from per capita levies to household- and asset-based taxation, particularly accounting for grain production. Economic and fiscal reforms under Wang Anshi, such as the Green Sprouts Law, Equalization of Taxes Law, and Labor Recruitment Law, strengthened state control over agricultural production, commodity circulation, and local finance, positioning the Changping Cang as a central support within this systemic framework. Through grain storage, market intervention, and redistribution, it became an important instrument of macroeconomic governance.
Moreover, Song dynasty sources themselves are extensive and rich in institutional records. The Song Shi incorporated numerous official archives, imperial edicts, and institutional compilations, preserving detailed information on administrative and fiscal structures (Lee 2026). Compared with earlier histories, Song sources provide a more granular account of economic institutions and governance mechanisms, which partly explains the exceptionally high frequency of “Changping” in these texts.
The Song dynasty also faced sustained military pressure from northern regimes such as the Liao, Western Xia, and later the Jin, with northern grain-producing regions lost following the fall of the Northern Song (Han 2025). To maintain a large standing army and secure border defense, the state needed a stable and efficient military grain supply system. In this context, the logistical and military function of the granary system was significantly strengthened. In addition to the Changping Cang, numerous military granaries were established along key transportation nodes and strategic regions, forming a nationwide network for grain transport and storage. This system allowed rapid allocation of grain resources in wartime, ensuring troop sustenance and operational capability (Lorge 2017). The dual economic and military functions of the granary system elevated its importance in state governance, contributing to the dense recording of granary-related matters in historical texts.
By contrast, northern regimes such as the Liao, Jin, and Yuan show markedly lower frequencies (Liao Shi 0, Jin Shi 18, Yuan Shi 35), suggesting that although these dynasties adopted certain Central Plains institutions, the Changping Cang did not become their core price-leveling mechanism. These differences are attributable to retained nomadic traditions, as well as structural differences in fiscal systems and social governance compared to agrarian Central Plains dynasties. The 27 occurrences in the New Yuan Shi largely reflect later institutional supplementation rather than the original documentation. During the Ming and Qing, the frequency remains relatively low (Ming Shi 10, Qing Shi Gao 64), indicating that although the Changping Cang system persisted, famine relief and grain storage had gradually shifted toward a more diversified granary structure—including She Cang, Yicang, and Guang Chu Cang—rendering the Changping Cang no longer the sole or primary institution.
Overall, the historical trajectory of the Changping Cang in ancient China follows four main phases: its inception in the Western Han, institutionalization in the Tang, peak during the Song, and diversification through the Yuan, Ming, and Qing. This pattern reflects temporal differences in state fiscal capacity, political stability, governance philosophy, and disaster management techniques across Chinese history.
Based on textual compilation and statistical analysis, the Twenty-Six Dynastic Histories contain a total of 968 passages related to “Changping,” comprising 375,495 characters. The sheer volume of material makes comprehensive manual reading and analysis impractical, necessitating the adoption of co-occurrence analysis methods from digital humanities. Co-occurrence analysis, or neighbor-word statistics, is a textual analytical technique that identifies the words most frequently appearing immediately adjacent to a target term, thereby revealing its contextual associations. Concepts in language rarely exist in isolation; they tend to co-occur with specific vocabulary within fixed syntactic structures, institutional contexts, or narrative patterns, forming stable collocations or semantic chains. By statistically examining the most common left- and right-neighboring words of a target term, one can reconstruct its usage context and better understand its functional and semantic roles across particular eras and genres (see Table 5).
From the frequency structure, numerous administrative and regional terms such as “transport,” “various circuits,” “Jiangxi,” “Western Zhejiang,” “Jiangdong,” “Eastern Zhejiang,” “Hunan,” and “Hubei” rank prominently, reflecting the spatial and bureaucratic dimension of the Changping Cang. Terms related to grain storage and famine relief, such as “Changping,” “Yicang,” “Guanghui Cang,” and “granary,” exhibit a pattern of concentrated occurrence within the Twenty-Six Dynastic Histories. Although the Changping Cang was established in the Han dynasty and the Yicang was more common during the Wei, Jin, Southern and Northern Dynasties and the Sui–Tang period, most detailed narrative accounts of institutional processes, administrative operations, and large-scale organizational adjustments are concentrated in Song dynasty sources. Consequently, in a unified corpus analysis, the neighbor-word structure of these terms reflects a pronounced “Song-era” characteristic. For instance, the right-neighbor frequency of “Yicang” far exceeds its left-neighbor frequency, indicating that it primarily appears in historical texts as an object of policy implementation or administrative execution. By contrast, the near one-to-one balance of left- and right-neighbors for “Changping” suggests that it is narrated both as a central institution and as an operational mechanism, consistent with the institutionalized and systematized nature of the Changping Cang in the Song dynasty.
Fiscal-control terms such as “Green Sprouts,” “interest on loans,” “salt and iron,” “official lands,” “principal,” and “grain and money” appear across dynasties but primarily in Song dynasty institutional regulations. The 1:12 neighbor-word ratio of “grain and money” indicates its common appearance as a central fiscal agency task. Policy-heavy terms such as “Green Sprouts” and “interest on loans” frequently co-occur with reform keywords like “Wang Anshi” and “Xining,” further demonstrating that the institutional record within the Twenty-Six Dynastic Histories is strongly anchored in Song-era governance.
Additionally, the prevalence of negation terms such as “insufficient,” “cannot,” and “not able” indicates that the historical narratives not only emphasize the institutional structures of granaries, market prices, fiscal measures, and famine relief but also highlight difficulties, conflicts, and execution challenges. Such narrative patterns appear throughout the Twenty-Six Dynastic Histories. For example, in the third year of Jianzhao during the reign of Emperor Yuan of Han, a self-critical edict noted, “Due to insufficient funds, the people repeatedly failed to pay, making it impossible to supply corvée labor to the central and local governments” (Ban and Shigu n.d.). Similar accounts are most prevalent in Song sources, such as: “On the day of Gengyin, an edict was issued to lend rice to the people in Jiang, Zhejiang, and the two Huai regions affected by drought; for areas with insufficient resources, loans were issued with money in advance” (Toqto’a n.d.a); “If the resources in this circuit are insufficient, neighboring circuits are drawn upon; if the neighbors are insufficient, then Huainan is called upon—how can the people bear such burden?” (Toqto’a n.d.b).
When analyzing the full corpus, the linguistic features inevitably reflect a “Song-era” orientation. The frequency patterns, collocation structures, and semantic clusters of institutional terms demonstrate that Song dynasty institutional experience dominates the narrative space regarding granaries, fiscal policy, administration, and famine management. Mechanistically, the frequent co-occurrence of terms like “various circuits,” “transport,” and “supervision” indicates that the Changping Cang functioned as a state-controlled granary institution, coordinated centrally and dispatched through circuit-level transport networks. The repeated appearance of regional terms such as “Jiangxi,” “Western Zhejiang,” “Jiangdong,” “Western Capital,” “Huainan,” “Guangdong,” and “Guangxi” demonstrates that the system had a nationwide layout, though coverage of the northwest was relatively limited. The central government executed storage, transportation, and price-leveling tasks through cross-regional allocation and bureaucratic inspection.
From a disaster management perspective, words like “flood and drought,” “insufficient,” and “hungry people” frequently appear as right-neighbors, followed by references to relief measures such as “sale at controlled price” and “distribution,” illustrating that the Changping Cang operated as an emergency mechanism triggered by crop failures, floods, or famine. Simultaneously, price-control terms like “standardized prices,” “light and heavy,” and “cheap and expensive” co-occur, indicating that the system not only performed relief functions but also stabilized markets and regulated prices by selling grain at controlled prices, purchasing at appropriate times, and adjusting market rates to prevent harm to farmers or consumers, thus constituting a classical state-level price-stabilization model.
Regarding specific relief content, terms such as “grain and money,” “principal,” and “interest” show that the Changping Cang operations encompassed not only grain redistribution but also financial circulation and monetary operations. During years of abundant harvest, grain purchase built up a financial base, which, combined with interest mechanisms, ensured long-term operation of the granary. Consequently, the Changping Cang exhibits a triadic functional structure of storage, transportation, and lending. Disaster relief remains its most prominent role, with the co-occurrence of “flood and drought,” “insufficient,” and “hungry people” indicating large-scale grain sales at controlled prices or direct distribution to alleviate famine and stabilize local society. The simultaneous presence of terms like “Green Sprouts,” “exemption from corvée,” and “official lands” demonstrates the integration of the Changping Cang within broader state fiscal and social policies. It was not merely a component of the grain management system but embedded within agricultural loans, taxation, and state land operations, collectively serving as a comprehensive tool for managing public welfare and societal burden.
Overall, the institutional representation of the Changping Cang in the Twenty-Six Dynastic Histories encompasses three dimensions: (1) as a state apparatus for grain price regulation, centered on the semantic field of “light and heavy” and “cheap and expensive”; (2) as an emergency platform for famine relief, tasked primarily with addressing “flood and drought,” “insufficient,” and “hungry people”; and (3) as a critical hub within fiscal and social relief systems, closely associated with reformist institutions such as “Green Sprouts,” “exemption from corvée,” and the Ministry of Revenue. This multifunctionality positions the Changping Cang as a pivotal institutional node linking market regulation, disaster relief, and fiscal governance, reflecting both economic rationality and the state’s logic of maintaining social stability through granary administration.

5. Relief Mechanisms and Operational Features of Yicang and She Cang

Compared with the Changping Cang, the Yicang and She Cang appeared much later and became prominent only after the Tang and Song periods. The Yicang originated in the Sui dynasty, established under the initiative of Changsun Ping, initially organized at the level of local communities (“she”), with grain voluntarily donated by residents for mutual aid during local famines. In the fifth year of Emperor Wen of Sui’s Kaibao era, an edict decreed the establishment of Yicang in May: “On the day of Jia Shen, an edict was issued to set up Yicang” (Wei n.d.). Over subsequent dynasties, the Yicang gradually evolved into a government-led storage system, while retaining certain features of its community-based origin.
In terms of function and operational mechanism, the Yicang and She Cang exhibit significant similarities. As noted by Fang Guancheng, Governor of Zhili during the Qing dynasty, “The Yicang began with Changsun Ping in the Sui; by the Song dynasty under Zhu Zi, its layout and regulations were fully established. Though named by communities (she), it followed the same principles as the Yi system” (Zhao 1928). Modern scholars further argue that, at least after the Song dynasty, these types of granaries, though nominally distinguished by administrative functions, were in practice largely interchangeable. They could all serve as military granaries under normal circumstances, and during times of famine, each could participate in relief, lending, and controlled grain distribution (Li 2012). Therefore, for analytical purposes, the Yicang and She Cang systems can be treated as a unified category.
From the distribution of word frequencies (see Table 6), Yicang (Charitable Granary) and Shecang (Community Granary) exhibit clear temporal patterns in the Twenty-Six Dynastic Histories, with their institutional focus and historical contexts becoming evident.
The high frequency of Yicang is concentrated in the History of Song (79 occurrences), Old Book of Tang (37 occurrences), and the histories of the Yuan and Qing dynasties, such as the History of Yuan (36 occurrences) and Draft History of Qing (33 occurrences). During these peak periods, Yicang functioned as a state-led official granary, primarily serving as a quasi-official relief system that accumulated grain during normal years and distributed it during famines. It complemented the Changping granary system. In the Song dynasty, numerous records reflect a dual-track relief system centered on Changping and Yicang, especially under the context of a civil-oriented governance and strengthened local control, with Yicang playing a significant role in famine relief, supplementing Changping, and stabilizing public sentiment. The relatively high frequencies in the Yuan and Qing histories indicate that Yicang continued to play a role in frontier, multiethnic governance and local order maintenance, often in the form of a state-supervised, locally managed grain system.
In contrast, Shecang appears less frequently overall but shows a higher concentration in the later period. Records from the Tang dynasty (Old Book of Tang: 5 occurrences; New Book of Tang: 6 occurrences) and the Song dynasty (20 occurrences) indicate that Shecang already functioned as a grassroots, community-based mutual aid system, primarily compensating for gaps in the official granary network in rural areas. In the Ming and Qing dynasties, its frequency increased significantly, reaching 61 occurrences in the Draft History of Qing, reflecting its prominent institutional role in the late period. The Qing dynasty’s emphasis on local self-governance and grassroots organizations such as village agreements and local units contributed to the expansion of Shecang, with operations relying on community participation rather than central fiscal support (Zuo and Zhou 2023). During the frequent droughts and floods of the mid-to-late Qing period, Shecang served as an important supplement to the official relief system, emphasizing the principles of “self-storage, self-management, and self-relief,” reflecting the state’s strategy of delegating parts of relief to local communities.
Overall, Yicang demonstrates a vertical, state-centered institutional logic, particularly during periods of strong central authority, serving as a critical component of the official relief system within the state grain administration. Shecang, by contrast, exhibits a more localized and socialized character, particularly in the Ming and Qing dynasties, reflecting grassroots self-governance. The institutional logic of Yicang is top-down, official relief, whereas Shecang operates horizontally as a village-based mutual aid mechanism. The historical rise and fall in their word frequencies illustrate the evolution of China’s ancient relief system from a state-centered approach toward a composite structure of parallel state and social mechanisms.
From the overall semantic structure of the co-occurrence terms for Yicang (Charitable Granary) (see Table 7), its institutional logic exhibits a pronounced state-centered character. Terms such as Changping and Changping Granary indicate that Yicang operated in conjunction with the Changping system within the state grain administration, together forming the institutional framework for price stabilization and famine preparedness. The frequent occurrence of scale-related terms like wanshi (“ten thousand shi”) and qianshi (“thousand shi”) emphasizes the strict record-keeping of granary quantities and transportation volumes, highlighting Yicang’s material capacity based on large-scale grain reserves. Words related to administrative implementation, such as various prefectures, teaching the people, and re-establishment, suggest that the operation of Yicang relied on the promotion and reconstruction by prefectural and county-level authorities, reflecting the system’s universality and recoverability. Disaster-related terms, including hungry people, floods and droughts, famine, and insufficient, predominantly appear as right-neighbor words, indicating that Yicang was typically activated following disaster reports and functioned as a key node in the state’s emergency response. Its co-occurrence with policy terms such as exempt from labor and for preparedness further demonstrates that Yicang’s role extended beyond grain storage and redistribution to encompass the protection of local livelihoods, regulation of labor and taxation, and the maintenance of social stability. Overall, Yicang represents a relief mechanism driven by the state, activated by disasters, and supported by institutionalized grain reserves, serving as an important instrument for embedding central authority into local governance.
In contrast, the semantic field of Shecang (Community Granary) reflects more localized and socialized characteristics (see Table 7). Shecang frequently co-occurs with terms such as provincial governor, officials, and supervisors, indicating that its operation depended on local administrative oversight, representing a typical “official-supervised, community-operated” structure. High-frequency co-occurrences with bao-jia (local militia units), villages, schools, and yi-xue (charity schools) show that Shecang was deeply embedded in rural social networks, interacting with local self-governance institutions such as village units, community schools, and local agreements. The frequent appearance of Zhu Xi indicates that Shecang was historically associated with rural moral education and gentry governance, reflecting the system’s strong Confucian-local self-rule orientation. Disaster-related terms such as hungry people, insufficient, and cannot remain central in its context, but Shecang lacks scale terms like wanshi, instead co-occurring with words such as accumulation, agriculture and sericulture, and markets and towns, indicating that its material foundation relied on local community contributions and routine accumulation rather than state fiscal input. Thus, Shecang functioned as a community-level emergency and mutual aid mechanism, representing a social support structure within a devolved relief system.
A comparison of the semantic fields of Yicang and Shecang highlights significant differences in institutional nature, governance logic, and functional positioning. Yicang, integrated with the state grain administration, emphasizes cross-regional allocation, large-scale storage, and administrative coordination, serving as a “state granary” that addresses macro-level price stabilization and famine relief. Shecang, embedded in village communities, focuses on local mutual aid, moral education, and gentry governance, functioning as a “community granary” suitable for routine local accumulation and temporary emergency relief. The former relies on state capacity, while the latter is based on local social structures; the former manages “volume” at a systemic level, whereas the latter responds to “points” of need. Together, they form a vertical structure of the ancient relief system, effectively linking state-led aid with local self-help, exemplifying the coordinated operation of administrative and social forces in traditional Chinese governance.

6. Statistical Analysis of Granary Geographic Distribution and Dispatching

Ancient granary systems were not merely technical mechanisms for grain storage, distribution, and disaster relief; they were deeply embedded within the state governance framework and social structures. Their operational effectiveness was closely linked to geographic distribution, population density, transportation networks, and natural environmental conditions. By conducting a co-occurrence analysis of geographic terms within the textual sources, this study reveals, at a macro level, the deployment priorities and functional differences in granary systems across different regions.
Based on the co-occurrence analysis of geographic terms (see Table 8), the spatial distribution of Yicang, Shecang, and Changping granaries exhibits clear regional concentrations (see Figure 2). The official and quasi-official granary systems of ancient China can be conceptualized as having core, secondary, and peripheral zones in terms of spatial deployment.
First, regions such as Henan, Shaanxi, Hedong, Jiangnan, and Shandong—traditional political and agricultural centers—ranked highest across three indicators: co-occurrence frequency, co-occurrence value, and textual mentions. Ancient Chinese granaries were not scattered randomly but were highly concentrated in major grain-producing areas, densely populated regions, and fiscal hubs of successive dynasties. This finding reflects that grain storage for famine relief was not merely a local welfare measure but a foundational institutional arrangement embedded in the broader governance structure. Its operational logic was closely tied to the fiscal capacity of the dynasty, the canal transport system, and the administrative reach. Among these, Henan, Hedong, and Hebei in the Central Plains registered the highest frequencies, consistent with their historical roles as core regions in the imperial grain administration system (Wu et al. 2019). This concentration relates both to the Central Plains’ political centrality and its economic significance as a major grain-producing and densely populated area. The frequent textual references to these regions indicate the state’s close attention to grain allocation and famine relief there, highlighting the prioritization of granary deployment in strategic areas to consolidate rule and maintain social stability.
Beyond the Central Plains, regions such as Jiangnan, Shandong, and Fujian exhibited relatively stable granary co-occurrences, though less concentrated than in the Central Plains. These economically developed and densely populated regions demonstrate that granary systems served a dual purpose in the historical records: supporting local economic needs while participating in national grain redistribution. In Jiangnan, granary records are closely associated with canal transport, local relief, and grain price regulation. The economic significance of granaries in these regions lies not only in securing regional grain supply but also in enabling the state to mobilize resources and stabilize livelihoods during disasters. This suggests that the local deployment of granaries considered both economic functionality and social governance, forming an institutional pattern of interaction between state and local levels.
Notably, some geographic nodes such as TaiCang, Chang’an, Huainan, and Jiangxi, although not among the highest in co-occurrence frequency, hold prominent symbolic and strategic significance. TaiCang, as a central granary hub, frequently co-occurs with Changping and Yicang granaries, reflecting its core role in macro-level grain dispatch and fiscal management. Chang’an, long the imperial capital, appears frequently not only to satisfy the capital’s grain security needs but also as a hub in the national grain transport network. Huainan and Jiangxi, as key nodes of canal transport, had granary systems whose stability directly influenced grain delivery and local supply. Overall, the spatial distribution of granaries was organized around grain-producing regions, administrative centers, and transport nodes, forming an institutional grid shaped by the state’s strategic considerations for grain allocation and disaster relief.
From the perspective of institutional type and regional function, Yicang and Shecang granaries appear predominantly in densely populated agricultural regions such as Hebei, Hubei, and Jiangxi. Their functions were primarily oriented toward local relief and grassroots assistance, emphasizing mutual aid within communities and the stabilization of livelihoods. In contrast, Changping granaries were concentrated in the Central Plains and areas with strong administrative structures, highlighting the state’s capacity for centralized grain price regulation and famine relief. This spatial differentiation indicates that granary systems assumed distinct responsibilities across regions: while Yicang and Changping granaries reflect central macro-level control, Shecang granaries are rooted in local communities and rely on village-based organizations, together forming a multi-tiered and complementary relief system.
Furthermore, frontier or strategic transport regions such as Gansu, Liaoyang, and the Western Regions, despite their relatively low frequency of mentions, carried special institutional functions. Granary arrangements in these areas were not only used for famine relief but also for securing frontier supply lines and supporting the operation of the military farming (tuntian) system. In historical records, their institutional significance is often represented as nodal or situational, reflecting the state’s governance and resource management capacity in remote regions.
Notably, regions such as Guandong, Guangping, and areas associated with the Chanyu exhibit higher-than-average textual distance metrics, with some exceeding 20, indicating that references to granaries in these locales often span long textual distances. This pattern suggests that granary mentions in these areas primarily relate to frontier governance, military provisioning, or non-routine contexts. Granary operations here were not part of regular mechanisms but were temporarily activated in response to warfare, population migration, border stabilization, or sudden disasters. Such contextualized deployment demonstrates that the spatial distribution of ancient Chinese granaries was far from homogeneous, instead reflecting a differentiated pattern of central and peripheral allocation shaped by regional political status, economic structures, and governance needs.

7. Conclusions

This study, centered on the Twenty-Six Dynastic Histories, combines digital humanities methods with traditional historical analysis to conduct a long-term, macro-level examination of China’s ancient granary system. By systematically analyzing word frequencies and textual contexts of granary-related terms, this research attempts to overcome the limitations of conventional studies that focus on specific dynasties or localities, aiming instead to grasp the dynamic trajectory of the granary system throughout Chinese history. The results indicate that the granary system evolved continuously as a governance tool under the intertwined influences of political structure, fiscal capacity, agricultural production, and the frequency of natural disasters. By analyzing temporal variations in word frequency, we can not only identify critical nodes of institutional transformation but also trace the rise and decline of different types of granaries and the deeper logic behind these changes.
Regarding the dynamic importance of institutions, the frequency distribution of granary-related terms shows significant fluctuations across historical periods, closely linked to dynastic cycles, political stability, and the degree of centralization. The study shows that attention to granary issues tends to be higher during periods of dynastic prosperity, when a stable central government has both the capacity and incentive to intervene in the economy and maintain social stability through institutional mechanisms. Conversely, in periods of dynastic decline or political fragmentation, word frequencies often decrease, reflecting both gaps in textual records and the waning of state control and institutional effectiveness. Thus, changes in word frequency can serve as a quantitative proxy for state governance capacity and the operational effectiveness of the granary system.
The influence of centralized rule on the granary system is evident: official granaries show higher word frequencies than private or community granaries in most periods, highlighting the state’s dominant role in grain storage and regulation. The Changping granary, as the core mechanism for price stabilization, relies heavily on central fiscal support and the execution capability of local officials; its effectiveness is directly linked to the implementation of imperial edicts. This suggests that granary operations were deeply embedded in the state’s power structure, with their rise and decline reflecting the evolving dynamics between central and local authorities.
Although private granaries such as Yicang and Shecang have lower overall word frequencies, they show noticeable growth in specific periods, particularly when local communities’ autonomy increased or central fiscal resources could not fully cover relief needs. Official and private granaries were not strictly opposed; in practice, they formed a complementary and interactive system. Official granaries primarily provided macro-level regulation and large-scale relief, while private granaries were closer to local communities, flexibly addressing localized food shortages or disasters. Their coordinated design reflects the “co-governance of state and society” embedded in Chinese historical governance.
From the perspective of digital humanities, this study demonstrates the feasibility and unique value of quantitative analysis of large-scale historical texts. Traditional historical research relies on close reading and case studies, which reveal micro-level institutional operations but struggle to capture long-term, large-scale trends. Word frequency statistics and temporal analysis, by contrast, can map the rise and fall of institutional attention, uncover latent patterns that conventional reading may miss, and provide data-driven insight into institutional continuity and discontinuity. For instance, the temporal frequency analysis of terms like Changping, Yicang, and Shecang clearly shows the appearance, decline, and resurgence of different granary types in the historical record.
However, digital methods have limitations: fluctuations in word frequency do not always directly equate to changes in institutional importance. Factors such as the survival of documents, editorial choices, and compiler biases may all influence results. Therefore, quantitative analysis must be integrated with traditional contextual interpretation to avoid the pitfall of “replacing history with numbers.”

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/histories6020029/s1, Table S1: Related Chinese Ancient Texts and Papers.

Funding

Phased achievement of the major bidding project “A General History of Chinese Charity” (11&ZD091) funded by the National Social Science Fund of China.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article/Supplementary Materials. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Ban, Gu, and Yan Shigu. n.d. Tang dynasty commentary. In Book of Han: Annals of Emperor Yuan, Bainaben ed. Beijing: Zhonghua Book Company, p. 9. (In Chinese)
  2. Berman, Merrick Lex. 2001. Toponyms and Feature Classifications for the China Historical GIS. Cambridge: Harvard Yenching Institute. [Google Scholar]
  3. Blei, David M., Andrew Y. Ng, and Michael I. Jordan. 2003. Latent Dirichlet allocation. Journal of Machine Learning Research 3: 993–1022. [Google Scholar]
  4. Brennan, Claire. 2018. Digital humanities, digital methods, digital history, and digital outputs: History writing and the digital revolution. History Compass 16: e12492. [Google Scholar] [CrossRef] [Scilit]
  5. Chen, Yu-Wen, Ko-Hua Yap, and Joey Ying Lee. 2013. Tianditu: China’s first official online mapping service. Media, Culture & Society 35: 234–49. [Google Scholar] [CrossRef] [Scilit]
  6. Chung, Jae Ho. 2011. Central-local dynamics: Historical continuities and institutional resilience. In Mao’s Invisible Hand. Cambridge: Harvard University Asia Center, pp. 297–320. [Google Scholar]
  7. Han, Maoli. 2025. Migration, agricultural innovation, and the southward economic shift in China. In Fifteen Topics in Historical Geography of China. Singapore: Springer, pp. 99–113. [Google Scholar]
  8. He, Weiguo. 2019. Grain reserve data and the operation of the ever-normal granary system during the Qianlong reign. Qing History Studies, 2. (In Chinese) [Google Scholar]
  9. Hu, Guang. n.d. Ming dynasty. In Complete Commentary on the Book of Rites (Liji Daquan), Siku Quanshu ed. Beijing: Jinghua Publishing House, p. 33. (In Chinese)
  10. Jin, Taijun, and Zhenbo Zhang. 2025. Historical lessons and practical rationale of national coordinated governance in China. Journal of Asian Governance 2: 107–29. [Google Scholar] [CrossRef] [Scilit]
  11. Kurumada, Chigusa, Stephan C. Meylan, and Michael C. Frank. 2013. Zipfian frequency distributions facilitate word segmentation in context. Cognition 127: 439–53. [Google Scholar] [CrossRef] [Scilit]
  12. Le Deuff, Olivier. 2018. Digital Humanities: History and Development. Hoboken: John Wiley & Sons. [Google Scholar]
  13. Lee, Tsong-han. 2026. Historiography of the Song dynasty (960–1279). In The Routledge Companion to East Asian Historiography. London: Routledge, pp. 81–103. [Google Scholar] [CrossRef] [Scilit]
  14. Li, Huarui. 2012. The development and transformation of the famine-relief granary system in the Song dynasty. Jinan Historical Studies 1: 497. (In Chinese) [Google Scholar]
  15. Li, Mingjie, Zhang Xianke, and Chen Mengshi. 2019. Review of Research Progress on the Digitization of Ancient Chinese Books (2009–2019). Beijing: Chinese Academy of Sciences. [Google Scholar]
  16. Liu, Caihua, Quangui Wan, Zhaonian Sun, and Shufeng Kong. 2025. Analysing the change management process for digital transformation involving citizens using textual analysis techniques. Acta Scientiarum. Technology 47. [Google Scholar] [CrossRef] [Scilit]
  17. Lorge, Peter. 2017. Military institutions as a defining feature of the Song dynasty. Journal of Chinese History 1: 269–95. [Google Scholar] [CrossRef] [Scilit]
  18. Miao, Yijie, and Zhang Le. 2025. Digitization of ancient Chinese books in the context of digital humanities: Research overview and future prospects. Social Sciences and Humanities 2: 61–67. [Google Scholar] [CrossRef] [Scilit]
  19. Morgan, David. 2006. The evolution of two Asian historiographical traditions. In Companion to Historiography. London: Routledge, pp. 11–22. [Google Scholar]
  20. Nasukawa, Tetsuya, and Tohru Nagano. 2001. Text analysis and knowledge mining system. IBM Systems Journal 40: 967–84. [Google Scholar] [CrossRef] [Scilit]
  21. Pan, Yi. 2017. Traditional rural welfare: The state and welfare thoughts. In Rural Welfare in China. Cham: Springer, pp. 39–55. [Google Scholar] [CrossRef] [Scilit]
  22. Shiue, Carol H. 2005. The political economy of famine relief in China, 1740–1820. Journal of Interdisciplinary History 36: 33–55. [Google Scholar] [CrossRef] [Scilit]
  23. Song, Lian. n.d. Ming dynasty. In History of Yuan (Yuanshi), Bainaben ed. Beijing: Commercial Press, pp. 16–26. (In Chinese)
  24. Tian, Fangyu, Yun Su, and Zijian Gong. 2024. How did ancient China prevent the transition from extreme drought to famine? Taking the Wanli drought of the Ming dynasty as an example. International Journal of Disaster Risk Reduction 110: 104618. [Google Scholar] [CrossRef] [Scilit]
  25. Toqto’a. n.d.a. Yuan dynasty. In History of Song (Songshi): Annals, Bainaben ed. Beijing: Commercial Press, vol. 35, p. 11. (In Chinese)
  26. Toqto’a. n.d.b. Yuan dynasty. In History of Song (Songshi): Treatise, Bainaben ed. Beijing: Commercial Press, vol. 45, p. 15. (In Chinese)
  27. Tu, Hsieh-Chang, Jieh Hsiang, I-Mei Hung, and Chijui Hu. 2020. DocuSky, a personal digital humanities platform for scholars. Journal of Chinese History 4: 564–80. [Google Scholar] [CrossRef] [Scilit]
  28. Wang, Huogen. 2004. Granary administration and grassroots social control in the Ming dynasty: A case study of reserve granaries and community granaries. Journal of Longyan Teachers College 22: 44–46. (In Chinese) [Google Scholar]
  29. Wang, Jun, Siyu Duan, Binghao Fu, Liangcai Gao, and Qi Su. 2024. Evol project: A comprehensive online platform for quantitative analysis of ancient literature. Humanities and Social Sciences Communications 11: 291. [Google Scholar] [CrossRef] [Scilit]
  30. Wang, Xinye. 1958. On the land tax of charitable granaries in the Tang dynasty and the content of the Two-Tax system. Wenshi Zhe, 4. (In Chinese) [Google Scholar]
  31. Wei, Zheng. n.d. Tang dynasty. In Book of Sui (Suishu), Bainaben ed. Beijing: Commercial Press, p. 41. (In Chinese)
  32. Wu, Shuanglei, Yongping Wei, Brian Head, Yan Zhao, and Scott Hanna. 2019. The development of ancient Chinese agricultural and water technology from 8000 BC to 1911 AD. Palgrave Communications 5: 77. [Google Scholar] [CrossRef] [Scilit]
  33. Xu, Xiuwen. 2007. A brief discussion of the community granary system in the Southern Song dynasty. Hebei Academic Journal 4: 114–17. (In Chinese) [Google Scholar]
  34. Xu, Xiuwen, and Rongsu Yan. 2006. On charitable granaries in the Song dynasty. Hebei Academic Journal 26: 115–18. (In Chinese) [Google Scholar]
  35. Yang, Fang. 2012. On the establishment and operation of charitable granaries in the Song dynasty. Agricultural History of China 31: 82–92. (In Chinese) [Google Scholar]
  36. Yang, Haimin. 2005. Research on the granary system in grain logistics activities during the Tang dynasty. Journal of Guizhou University for Nationalities (Philosophy and Social Sciences) 5: 131–34. (In Chinese) [Google Scholar]
  37. Yang, Jinping. 2024. Reexamining the proportion of community granaries in Southwest China during the Yongzheng–Qianlong period. Qing History Studies 2: 151. (In Chinese) [Google Scholar]
  38. Ye, Wenhao, Qiankun Xu, Xue Zhao, and Dongbo Wang. 2026. Construction of the Twenty-Four Dynastic Histories ancient-modern part-of-speech tagged corpus. npj Heritage Science 14: 97. [Google Scholar] [CrossRef] [Scilit]
  39. Zhang, Meiling. 2019. A study of the ever-normal granary system in the Tang dynasty. ShouCang, 15. (In Chinese) [Google Scholar]
  40. Zhang, Yan. 1993. A discussion of the ever-normal granary system in the Qing dynasty. Qing History Studies 4: 28. (In Chinese) [Google Scholar]
  41. Zhao, Erxun. 1928. Draft History of Qing (Qing Shi Gao), Guanwai 2nd ed. Beijing: Commercial Press, p. 21. (In Chinese) [Google Scholar]
  42. Zuo, Ping, and Chengmin Zhou. 2023. Town autonomy and civil society: The county council of the late Qing dynasty centered on Nanbu county government archives. Journal of Chengdu University (Social Sciences) 4: 79–80. [Google Scholar]
Figure 1. Line Chart of the Relative Frequency of “Cang” (Granary) Terms (per Ten Thousand Characters).
Figure 1. Line Chart of the Relative Frequency of “Cang” (Granary) Terms (per Ten Thousand Characters).
Histories 06 00029 g001
Figure 2. Heatmap of Co-occurrence for Three Types of Granaries. Notes: Some place names refer to broader regions; in such cases, the main administrative center is used as the reference point. The grayscale in the heatmap is primarily determined by word frequency.
Figure 2. Heatmap of Co-occurrence for Three Types of Granaries. Notes: Some place names refer to broader regions; in such cases, the main administrative center is used as the reference point. The grayscale in the heatmap is primarily determined by word frequency.
Histories 06 00029 g002
Table 1. Online databases used in this study.
Table 1. Online databases used in this study.
Network Resource DatabaseDescriptionFunction
Shidianguji“Shidianguji” is a digital ancient-text platform jointly developed by Peking University and ByteDance. Since the launch of its beta version in October 2022, it has expanded from digitizing 390 classical works to over 2200. (Wang et al. 2024)Used to obtain the original digital texts of the Twenty-Six Dynastic Histories. The platform also facilitates preliminary corpus construction and text preprocessing, including downloading, organizing, and cleaning the historical texts before further computational analysis.
Weiciyun An online text-processing platform featuring correlation analysis, network relationship generation, high-frequency word clouds, and other functions. (Liu et al. 2025)Used to construct topic models related to granary systems and to conduct word segmentation and word-frequency analysis. The platform also assists in identifying high-frequency keywords and exploring the semantic relationships among terms in the corpus.
DocuSky Digital Humanities Academic Research Platform Developed by National Taiwan University, this platform provides a range of digital humanities tools for text format conversion, tagging and database construction, as well as text mining and analysis. (Tu et al. 2020)Used for tagging and annotating historical place names appearing in the texts. This process helps standardize geographic references and supports subsequent spatial analysis and historical interpretation.
China Historical Place Name Query System Developed collaboratively by Academia Sinica (Taiwan), its Computing Center, and the Research Center for Humanities and Social Sciences GIS. The system offers two main search methods: place names and maps. (Berman 2001)Used for tagging and annotating historical place names appearing in the texts. This process helps standardize geographic references and supports subsequent spatial analysis and historical interpretation.
Tianditu A government website established by China’s natural resources authorities to provide public online geographic information services and promote the open sharing of geospatial data. (Chen et al. 2013)Used for tagging and annotating historical place names appearing in the texts. This process helps standardize geographic references and supports subsequent spatial analysis and historical interpretation.
Table 2. Text cleaning and assessment of data errors.
Table 2. Text cleaning and assessment of data errors.
ItemMethod DescriptionStatistical MetricEstimated RangeNotes
Automated Identification ScopeIdentify occurrences of “仓 (Cang)” and related terms in textual contexts using text retrieval and segmentation toolsTotal automatically identified textsEntire corpusUsed to construct the initial analysis corpus
Manual Sampling ProportionRandomly select a subset of automatically identified texts for manual context verificationSampling proportion5%Used to validate the reliability of automatic classification
Sampling Check ScopeExamine each sampled text context individuallyNumber of checked samples300 text contextsRandomly sampled according to corpus size
Automated Identification AccuracyDegree of consistency between automatic classification results and manual judgmentAccuracy97%Indicates overall reliability of automatic identification
Estimated Error RangeProportion of inconsistencies between automatic results and manual judgmentError rate3–6%Limited impact on overall statistical trends
Statistical Confidence LevelConfidence in the statistical inference of the sampling check resultsConfidence level95%Standard confidence interval in statistics
Table 3. Word Frequency and Relative Proportion of the Term cang (仓) in the Twenty-Six Dynastic Histories.
Table 3. Word Frequency and Relative Proportion of the Term cang (仓) in the Twenty-Six Dynastic Histories.
Book TitleWord FrequencyTotal CharactersProportion (‱)
Records of the Grand Historian (Shiji)73616,7001.18
Book of Han (Hanshu)142904,6001.57
Book of the Later Han (Hou Hanshu)1961,753,7001.12
Records of the Three Kingdoms (Sanguozhi)97552,0001.76
Book of Jin (Jinshu)1681,401,1001.20
Book of Song (Songshu, Liu Song)105984,7001.07
Book of Southern Qi (Nan Qi Shu)33355,7000.93
Book of Liang (Liangshu)18359,0000.50
Book of Chen (Chenshu)12197,7000.61
Book of Wei (Weishu)2131,207,2001.76
Book of Northern Qi (Bei Qi Shu)20154,9001.29
Book of Zhou (Zhoushu)30313,9000.96
History of the Northern Dynasties (Beishi)2101,328,0001.58
History of the Southern Dynasties (Nanshi)66800,9000.82
Book of Sui (Suishu)196829,0002.36
Old Book of Tang (Jiu Tangshu)4682,388,6001.96
New Book of Tang (Xin Tangshu)4032,000,5002.01
Old History of the Five Dynasties (Jiu Wudai Shi)28372,8000.75
New History of the Five Dynasties (Xin Wudai Shi)21348,2000.60
History of Song (Songshi)8544,738,0001.80
History of Liao (Liaoshi)31425,4000.73
History of Jin (Jinshi)1881,108,0001.70
History of Yuan (Yuanshi)6861,868,4003.67
New History of Yuan (Xin Yuanshi)5271,929,1002.73
History of Ming (Mingshi)8453,306,7002.56
Draft History of Qing (Qing Shi Gao)13835,246,0002.64
Notes: Word Frequency refers to the absolute number of occurrences of the target term in each dynastic history. Total Characters indicate the size of each text corpus, measured by the total number of Chinese characters. Proportion (‱) represents normalized frequency, calculated as occurrences per 10,000 characters (permyriad), allowing for comparability across texts of substantially different lengths. All data are derived from a digitized full-text corpus of the Twenty-Six Dynastic Histories, processed using uniform text-cleaning and counting procedures.
Table 4. Word-Frequency Statistics of “Changping” (Ever-Normal Granary) in the Twenty-Six Dynastic Histories.
Table 4. Word-Frequency Statistics of “Changping” (Ever-Normal Granary) in the Twenty-Six Dynastic Histories.
PeriodRepresentative HistoriesCount
Pre-Qin & Early HanShiji, Hanshu7
Eastern Han–Six DynastiesHou Hanshu–Chenshu9
Northern DynastiesWeishu–Suishu17
Tang & Five DynastiesJiu/Xin Tangshu91
SongSongshi690
Liao–YuanLiao Shi–Xin Yuan Shi80
Ming–QingMing Shi, Qing Shi Gao74
Total 968
Table 5. Top 75 Collocates of “Changping” (Ever-Normal Granary).
Table 5. Top 75 Collocates of “Changping” (Ever-Normal Granary).
WordTotalLeft NeighborRight NeighborWordTotalLeft NeighborRight NeighborWordTotalLeft NeighborRight Neighbor
Transport (Zhuanyun)392712Huainan743Kaifeng431
Community Granary (Yicang)39336West Circuit761Lizhou431
Various Circuits28262Insufficient615Shaanxi440
Jiangxi23194Judicial Commissioner651Water Conservancy404
Zhexi22211Official Farmland633Regulations440
Jiangdong21165Water Control651Implementation413
Envoy18117Jingdong642Judicial Office413
Ever-Normal Granary1899Supervisor615Surplus Funds422
Zhedong17161Impossible624Chongning (Reign)413
Labor Exemption16313Xining (Reign)642Hedong431
Fiscal Intendant1697Flood & Drought541Shandong330
Fujian14104Market Regulation541Weight & Price303
Finance & Grain13112Unable550Subordinate Officials303
Jingxi13112Guanghui Granary505Prefectures321
Ministry of Revenue1248Wang Anshi541Storage303
Liangzhe1183Interest Funds514Officials321
Hubei11101Arrangements514Price Disparity312
Hunan11101East Circuit541Restoration330
Public Affairs1037Shortly After514Particularly Severe330
Hebei954Guangxi532Famine Victims312
Green Sprouts936Guangdong550Not Allowed330
Various Prefectures862Capital Region440Military Farms321
Salt & Iron716Zhenguan (Reign)431Tribute Grain312
Ten Thousand Shi752Salt & Iron Commissioner404Officials (Minor)312
Money & Goods707Capital Funds404Various Offices321
Table 6. Distribution of Yicang and Shecang by Dynasty.
Table 6. Distribution of Yicang and Shecang by Dynasty.
TermSuishu–Xin TangshuJiu–Xin Wudai ShiSongLiaoshiJinshiYuanshi–Xin YuanshiMingQingshigao
Yicang (Charitable Granary)12, 37, 120, 0797036, 15633
Shecang (Community Granary)0, 5, 60, 020001, 11061
Table 7. Statistical Table of Folk Storage Word Frequency and Adjacent Word High Frequency.
Table 7. Statistical Table of Folk Storage Word Frequency and Adjacent Word High Frequency.
Yicang (Charitable Granary)Shecang (Community Granary)
WordTotalLeftRightWordTotalLeftRight
Changping (Ever-Normal)39363Changping (Ever-Normal)642
Wan Shi (10,000 shi)12210Yicang422
Qian Shi (1000 shi)633Xunfu (Provincial Gov.)431
Jimin (Starving People)532Baojia422
Zhuzhou (Prefectures)431Buzu (Insufficient)321
Baixing (Common People)422Zhu Xi330
ChangpingCang422Xuexiao (Schools)321
Shecang422Xiangcun (Villages)321
Fuzhi (Restoration)440Huguang312
Beihuang (Preparedness)404Guanfèi (Official Exp.)202
Shuihan (Flood & Drought)303Yousi (Authorities)211
Mianyi (Labor Exempt.)312Jimin (Starving People)202
Shuili (Water Control)321Bude (Not Allowed)202
Jiaomin (Educating People)303Jiajing (Reign)211
Buzu (Insufficient)312Buneng (Unable)211
Furen (Wealthy People)303Kexing (Feasible)202
Jiqin (Severe Famine)202Shanxi220
Fangshui (Flood Control)202Yixue (Charitable School)211
Jiashen (Cyclical Year)211Nongsang (Agriculture)220
Gengchen (Cyclical Year)202Shizhen (Market Town)202
Wangong (Nobles)211Jianli (Establishment)211
Shaoxing (Reign)303Li Guangdi211
Shenlong (Reign)211Dufu (Gov.-General)211
Table 8. Geographic Co-occurrence Frequencies of the Three Types of Granary Systems.
Table 8. Geographic Co-occurrence Frequencies of the Three Types of Granary Systems.
WordCo-Occurrence FrequencyCo-Occurrence ValueTerm FrequencyTotal FrequencyInstancesCorrelationAverage Distance
Henan368053138320.30193.16
Shaanxi23473782230.27325.26
Hedong20472776160.20979.00
Jiangnan18302362170.24176.35
Shandong15272198140.18939.57
TaiCang13201726130.33582.46
Fujian13191766130.16074.15
Chang’an12552648100.41577.80
Zhejiang12261930120.32304.92
Hubei12191760120.15277.00
Jiangxi12171494120.11325.08
Guangdong11181543100.17397.00
Hebei11161189110.12582.55
Sichuan10151547100.16997.40
Gansu913101490.37415.22
Tongzhou910102190.26485.11
Liaoyang912111990.34944.78
Guandong818121570.371718.71
Zhili81892480.24713.88
Yunnan813133980.20673.00
Huainan813106480.10654.38
Chanyu748464760.44728.17
Guangping71671750.372730.60
Huai’an7881570.27175.00
Jiangsu711111870.27176.14
Notes: Instances: The total number of times the target term co-occurs with another term in the corpus, reflecting the absolute frequency of co-occurrence. Correlation: The statistical measure of association between the target term and the co-occurring term, indicating the strength of their relationship in the text. Values closer to 1 represent stronger co-occurrence. Average Distance: The mean textual distance (in words or characters) between the target term and the co-occurring term, showing how closely they appear within the text. Smaller values indicate tighter contextual proximity, while larger values suggest more dispersed or indirect associations.
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wan, J. A Digital Humanities Study of Chinese Granary Systems Based on the Twenty-Six Dynastic Histories. Histories 2026, 6, 29. https://doi.org/10.3390/histories6020029

AMA Style

Wan J. A Digital Humanities Study of Chinese Granary Systems Based on the Twenty-Six Dynastic Histories. Histories. 2026; 6(2):29. https://doi.org/10.3390/histories6020029

Chicago/Turabian Style

Wan, Jiamin. 2026. "A Digital Humanities Study of Chinese Granary Systems Based on the Twenty-Six Dynastic Histories" Histories 6, no. 2: 29. https://doi.org/10.3390/histories6020029

APA Style

Wan, J. (2026). A Digital Humanities Study of Chinese Granary Systems Based on the Twenty-Six Dynastic Histories. Histories, 6(2), 29. https://doi.org/10.3390/histories6020029

Article Metrics

Back to TopTop