Abstract:[Objective] This study aims to investigate how mixed bacteria modulate the oviposition preference of Drosophila through competition and to explore the effect of bacterial balance on Drosophila offspring based on the survival rate and developmental duration.[Methods] Lactobacillus plantarum, Escherichia coli, and the mixture of the two (hereinafter referred to as the mixture) were coated on the casein-sucrose-agar medium (food of Drosophila), respectively. The egg-laying behavior of Drosophila was assayed by a two-choice device. Bacterial count was calculated with the plate method and the effect of the mixture on the survival of Drosophila was evaluated based on the survival rate of pupa.[Results] Drosophila avoided laying eggs on the food that was fermented by E. coli at 37℃, while it was attracted to lay eggs on the food fermented by L. plantarum at 37℃. The mixture (at the ratio of 1:1) significantly repelled the oviposition of Drosophila, as manifested by the oviposition index (OI) of only -0.46, suggesting Drosophila oviposition preference is an ideal mode for studying the balance of mixed bacteria. Bacterial counting showed that E. coli dominated the medium, with the count 4.43 folds that of L. plantarum, which caused the oviposition avoidance of Drosophila. As expected, increase in the ratio of L. plantarum in the mixed bacteria mitigated or even reversed the oviposition avoidance of Drosophila to fermented diet, indicating that the inoculation ratio of bacteria affected the balance of the flora. With L. plantarum and E. coli mixed at equal ratio, the OI of Drosophila was 0.41 at 25℃, -0.06 at 30℃, and -0.45 at 35℃, suggesting temperature impacted bacterial balance. The metabolites of L. plantarum, particularly lactic acid, inhibited the growth of E. coli, which contributed to the oviposition preference of Drosophila. The survival rate of pupa was 14% when E. coli dominated and 91% when L. plantarum was dominant, indicating that the growth balance of the mixture influenced the survival rate of Drosophila.[Conclusion] Bacterial ratio and culturing temperature determined the final oviposition selection of Drosophila and Drosophila adjusted the oviposition behavior based on bacterial balance to facilitate the survival of offspring.