Social bots exacerbate emotional chaos and network disorder during sudden public opinion outbreaks. Drawing on information ecology theory, we analyze how social bots as information person characteristics influence information characteristics represented by topic tendency and sentiment spreading and environmental characteristics represented by information diffusion and network influence, and further discuss the conditional role played by social bots in public opinion dynamics. By comparing different machine learning models, the study selects the XGBoost model with the highest accuracy to identify the type of social bots with specific automation features in the Chinese context. Meanwhile, based on the representative public health emergency, the study uses a large-scale social media dataset (N = 328539) to explore how social bots affect multi-dimensional public opinion dynamics in the information ecosystem. It was found that the information published by social bots and human users has an entirely different dissemination mechanism, and social bots have a significant impact on topic tendency, sentiment spreading, information diffusion, and network influence in cyberspace. Moreover, social bots also play an important moderating role in the information diffusion and network influence of affective information. Relevant findings provide a practical reference for the recognition and prevention of social bots, and help emergency management departments to stabilize public sentiments by intervening in the behavior of social bots, weakening the influence of negative public opinion, and promoting the management of public opinions in emergencies and the maintenance of network order.