There are currently many clinical issues plaguing digestive oncologists, including the impact of dietary habits on the occurrence of early gastrointestinal cancer, the association between irritable bowel syndrome, ulcerative colitis, and early gastrointestinal cancer, the expected changes in gastrointestinal cancer after IBS, IBD, and susceptibility gene mutations, and the mechanisms by which susceptibility gene mutations in gastrointestinal cancer lead to different diseases. Meanwhile, as a carcinogen, betel nut is also prone to cancer and emotional disorders, and there are also many doctor-patient conflicts in the current clinical treatment of digestive tract tumors. To address the aforementioned issues, the research team analyzed dietary habits data using SOM clustering algorithm and isolated forest algorithm. Based on bioinformatics, new therapies have been developed for the pathogenesis and immune pathways of various cancers in the digestive system. Using network pharmacology methods, explore the toxicological mechanism of betel nut and its mechanism in mediating emotional disorders. Molecular docking is used to elucidate drug prediction. Based on four AI algorithms, the occurrence of gastrointestinal cancer was predicted through dietary habits. Using computer vision technology to address the deficiencies in early clinical reporting of cancer. This article provides clinical doctors with new treatment tools.