Patients with stomach pain after eating walnuts are considered to be related to the fact that walnuts contain more oil. When a large amount of walnuts is eaten, the large amount of oil stimulates the secretion of gastric acid, causing increased damage to the gastric mucosa and resulting in stomach pain. So when this happens, try to avoid eating walnuts, or eat them in small amounts 1-2 hours after meals, and avoid eating them on an empty stomach. At the same time, further gastroscopy is recommended to understand whether there is chronic gastritis, gastric ulcer, gastroesophageal reflux disease, gastric cancer, etc. The diet should be warm, soft, light, vegetarian and fresh, avoiding the intake of raw, cold, spicy, greasy and other stimulating foods, avoiding strong tea, coffee, alcohol and other undesirable stimuli, avoiding overeating, eating less and more, chewing and swallowing slowly. You can exercise properly and ensure sufficient sleep time.