The common methods of treating H. pylori infection are medication and diet. First, the use of internal drug methods for treatment, including antibiotics, drugs to protect the gastric mucosa and drugs to inhibit the secretion of gastric acid, commonly used is a quadruple therapy, including an acid inhibitor, a bismuth agent and two antibiotics. Second, pay attention to dietary hygiene, H. pylori is contagious, the infection rate is high, can be spread through the mouth, hands, feces and unclean food and utensils, so pay attention to hygiene, develop the habit of washing hands after the stool and before meals. Third, you can always eat garlic, broccoli, cabbage and other foods with good bactericidal effect. Fourth, develop good eating habits and living habits, actively cooperate with the treatment, diet to light, easy to digest food, eat more vegetables, fruits, pay attention to rest to develop a good way of rest.