Abstract:At present, there are some problems such as low energy saving efficiency and large indoor temperature fluctuation in the control methods of mushroom air conditioning in factory production. An energy saving control method based on convolutional neural network (CNN), gated recurrent unit neural network (GRU) and self-attention mechanism was proposed. The CNN-GRU-Attention combined neural network was used as the prediction model, and the prediction error compensation and the dynamic updating mechanism of the prediction model data set were combined to achieve accurate prediction of indoor temperature in mushroom houses. The control quantity of air conditioning was established as the objective function of state quantity, and the weight coefficient of the objective function was defined by entropy weight method and subjective method, respectively. The optimal control sequence of air conditioning in the control time domain was solved by non-dominated sorting genetic algorithm Ⅱ (NSGA-Ⅱ), and the rolling optimization and feedback mechanism were integrated to realize the accurate and energy-saving control of the greenhouse environment. The experimental results showed that the CNN-GRU-Attention indoor temperature prediction model proposed in mushroom house showed that the previous 30min data had the best effect in predicting the indoor temperature in the future 10min. On a typical intra-day the maximum root mean square error of prediction accuracy was 0.122℃, the minimum coefficient of determination was 0.807, and the maximum mean absolute percentage error was 0.611%. The model predictive control method of mushroom air conditioning had a good anti-interference ability in weather fluctuation. Compared with threshold switching method and PID method, the energy consumption of air conditioning can be saved by 21% and 14%, respectively. In terms of temperature control accuracy, the root mean square error was decreased by 72% and 46%, respectively.