Therefore, these predicted herbs and herbal ingredients have great potential to improve the prognosis of gastric cancer patients by acting on the targets TLR4 and KRAS, and provide alternative options and direction for anti-gastric cancer herbal research. The gene discussed is KRAS; the disease is gastric cancer.