| With the continuous improvement of the quality of life of the public,people’s demand for home life intelligent services is increasing.At present,most of the smart home systems are still in the simple environmental data collection and mechanical equipment control stage.Sensors are seldom used to "sense" the indoor environment.Therefore,this paper designs a smart home system based on situational awareness.The system is divided into three parts: perceptual layer,network layer and application layer.The perceptual layer is composed of terminal,coordinator and main controller.The terminal shall be responsible for the collection of indoor environmental information and the control of equipment;the coordinator shall not only have all the functions of the terminal node,but also realize the data exchange between the terminal and the main control terminal;the main control terminal shall be responsible for receiving,displaying and uploading the environmental data on the one hand,and receiving the control instructions sent by the user from the mobile phone APP,speech recognition module,etc.,and sending the instructions to the coordinator,and at the same time,sending an alarm message when the indoor carbon monoxide concentration exceeds the standard by using the SIM900 module.The network layer realizes the data interaction between the sensing layer and the cloud platform.The application layer provides mobile APP,touch screen and speech recognition for users to control the device in different occasions.More importantly,the system can determine the current situation by sensing the change of environmental parameters,and then realize the intelligent control of household devices with the control strategy in line with the daily habits of users.It has the advantages of high efficiency and good sense of experience.In this paper,a prediction model based on Attention LSTM is established to predict the air conditioning power consumption according to the indoor temperature and humidity.The main research results of this paper are as follows:(1)Through the functional requirement analysis,the hardware structure of the system is determined,the environment information perception,equipment control,personalized scenario mode configuration and carbon monoxide warning functions required by the smart home system are developed and completed,and the above functions can work normally.(2)The system proposes a smart home control scheme based on situational awareness,which can realize the automatic switching of four scenario modes,namely,rest,wake,automatic and leave home,according to the current environmental parameters,and each scenario mode and the state of its associated devices can be customized by users,and has the advantages of good flexibility and high intelligence.(3)Using Tensor Flow platform to build a Attention LSTM-based prediction model of air-conditioning electricity consumption,and using mean square error(MSE),explained variance score(EVS)and R2 determination coefficient(R2_score)as the model prediction performance evaluation indicators,the index results show that the prediction model designed in this paper has good performance in prediction accuracy and model fitting degree. |