A series of effects caused by temperature change are the biggest problems faced by biological systems. These irregular environmental characteristics have brought new challenges to people and even animal groups. The immune function of human intestinal flora has a great protective effect on other organs and the body environment. It can help the human body carry out intestinal digestion, food absorption, nutritional metabolism, and so on. Based on the above situation, this paper uses the time series prediction model to study the factors affecting the imbalance of intestinal flora in the process of temperature change. Firstly, biological experiments are carried out with animals to simulate the human environment. Based on the sequence information of historical temperature change parameters, a temperature prediction device based on time series model is proposed. The effects of air factors and carbon dioxide content on the prediction results are evaluated by statistical analysis. Secondly, in order to ensure the accuracy of the experimental data, the neural network algorithm is used to optimize the model, and the white blood cell count is used to analyze the influence of temperature change on the intestinal flora structure of the two organisms. Finally, the experimental results are applied to the human environment to analyze the research results. The results showed that with the irregular change of temperature, the number of intestinal flora and internal colony structure also changed. The richness index in the normal temperature environment is relatively large, which can effectively explain the high richness of intestinal microflora in the experimental population. Further analyze the subjects and distinguish the animals according to sex. The number of Bacteroides in the intestinal flora of male animals was higher than that of female animals, but this phenomenon disappeared immediately after physical ligation. In addition, the intestinal flora abundance of female animals is higher than that of male animals, and the metabolic level is faster.