The stomach hurts from time to time, mainly caused by digestive system diseases, heart diseases, drug factors, improper diet, need to clarify the specific causes before targeted treatment. 1, digestive system diseases: such as gastric cramps, acute gastritis, chronic gastritis, peptic ulcer, gastric mucosal prolapse, gastrointestinal neurosis, pancreatitis, gastric prolapse and other diseases can cause occasional stomach pain. Drugs that protect the gastric mucosa, such as omeprazole and famotidine, can be used under the guidance of a doctor to avoid damage to the gastric mucosa. For gastritis caused by Helicobacter pylori, attention should be paid to anti-infection treatment, such as quadruple therapy, i.e. bismuth + proton pump preparation + two antibiotics; 2. Cardiac system diseases: acute myocardial infarction, angina pectoris and other diseases can present transient radiating pain, which in turn causes intermittent stomach pain. For patients with acute myocardial infarction, nitroglycerin can be taken under medical advice to dilate coronary arteries. Patients with angina can take nitrate drugs to relieve symptoms, such as nitroglycerin, isosorbide nitrate, etc.; 3. Drug factors: such as aspirin, acetaminophen tablets, digitalis, tetracycline, etc. can stimulate and damage the gastric mucosa, which can lead to stomach pain. After stopping the medication, the discomfort can be reduced or disappeared; 4, improper diet: eating cold, spicy and irritating food can lead to damage to the gastric mucosa, which can lead to stomach pain from time to time. You should pay attention to your diet, avoid cold and irritating food, eat light and easily digestible food, such as millet porridge, noodles, etc., pay attention to rest and maintain a good mood.