Objective To use Ultra-Performance Liquid Chromatography-Mass Spectrometry(UPLC-MS)technology to analyze the components of Trichosanthis Radix(Tianhuafen),combined with techniques in network pharmacology and molecular docking to explore the mechanism of Tianhuafen in preventing and treating diabetes.Methods Used UPLC-MS technology,we analyzed the water extract of Tianhuafen,obtained its components and structures,and screened for potential active ingredients.The Swiss Target Prediction database was employed for target prediction of potential active ingredients.We collected diabetes-related disease targets from the GeneCards database and took the intersection of the two sets of targets.Subsequently,we used the STRING website and Cytoscape software to construct a protein-protein interaction network and screened for core targets.These core targets were then imported into the Metascape website for GO and KEGG analysis.Results UPLC-MS analysis identified 15 components of Tianhuafen,and 6 potential active ingredients were screened,including Cucurbitacin D.Analysis revealed 61 targets for Tianhuafen in preventing and treating diabetes.GO enrichment analysis mainly involved processes related to lipid metabolism and oxidative stress,such as fatty acid metabolism,monocarboxylic acid metabolism,and steroid hydroxylase activity.KEGG enrichment analysis primarily encompassed pathways closely related to diabetes prevention and treatment,including insulin resistance,endocrine resistance,and the AGE-RAGE signaling pathway in diabetic complications.Molecular docking revealed that Tianhuafen may improve diabetes by targeting key points such as STAT3,MAPK14,and PIK3CA through Cucurbitacin D.Conclusion Trichosanthis Radix has the potential effect of preventing and treating diabetes,and its mechanism may be to improve insulin resistance and endocrine resistance through active ingredients such as Cucubitacin D,regulate AGE-RAGE and other signal pathways,thus playing a role in preventing and treating diabetes.