This study aims at evaluating efficacy and safety of berberine hydrochloride, amoxicillin and rabeprazole triple therapy versus bismuth-containing quadruple therapy(amoxicillin, clarithromycin, rabeprazole and bismuth) in the first eradication treatment of H. pylori. It is hypothesized that berberinehydrochloride, amoxicillin and rabeprazole triple therapy is non-inferior to bismuth-containing quadruple therapy. Patients diagnosed with H. pylori infection will be randomly divided into one of the above treatments. At week 6 follow-up visits, a urea breath test,rapid urease test or helicobacter pylori stool antigen test will be performed to confirm eradication.