AOS could regulate the relative gene expressions in the antibacterial peptides (AMPs), mTOR pathway and autophagy process, and significantly improved the α‐diversity of midgut microbiota and decreased the abundance of Klebsiella aerogenes, a kind of bacteria easily causing infections. This evidence concerns the gene MTOR and infection.