This paper aims to analyze the syndromes,treatment characteristics,and medication rules of diabetes recorded in ancient books.Methods:Chinese Medical Classics,which recorded literature on the treatment of diabetes from the pre-Qin Dynasty to the Ming and Qing Dynasties,was taken as the data source.Based on the cloud platform of ancient and modern medical records (V2.3.5),various methods were used to explore the syndrome differentiation ideas and medication rules of diabetes.Results:A total of 993 literature and 497 drugs were included.Seven core syndromes and five treatment methods were obtained.The top three with the highest proportions were heat excess and yin deficiency (26.21%),Qi and yin deficiency (11.70%),and kidney yin deficiency (9.57%),and the most commonly used treatment methods were clearing heat and nourishing yin (15.3%),supplementing qi and nourishing yin (11.1%),and nourishing kidney yin (5.2%).Through frequency analysis,20 commonly used drugs were selected.They were ophiopogon japonicus,licorice,ginseng,poria cocos,etc; the drugs are mainly cold,mild-natured,and sweet,entering the lung,kidney,stomach,and spleen meridian.The compatibility of drugs commonly used for diabetes included ginseng-ophiopogon japonicus,trichosanthin-ophiopogon japonicus,ginseng-licorice,etc.Three clusters of traditional Chinese medicine,three traditional Chinese medicine combinations,and 50 compatibility rules were obtained.Conclusion:Heat excess and yin deficiency,Qi and yin deficiency,and kidney yin deficiency are the common syndrome types of diabetes.Clearing heat and nourishing Yin,nourishing yin and tonifying kidney,strengthening spleen and Qi,and traditional Chinese medicine with corresponding effects are commonly used in the treatment of diabetes.In addition,data mining technology can be used to mine and analyze ancient literature from multiple levels and angles,so as to provide a reliable theoretical basis and technical support for the modern clinical treatment of diabetes.