Smart home has a broad market prospect and has become an indispensable part of modern life.Currently,home devices connected to the cloud focus more on improving networking control,control algorithms,and other aspects,while ignoring the improvement space for cloud side task allocation in the system,as well as related firmware code upgrade scalability,and control mode.For example,in task allocation,computing tasks are excessively concentrated in the cloud,and edge devices can only passively respond to instructions issued by cloud computing;In terms of firmware code upgrade scalability,device embedded code usually has a fixed version and cannot be upgraded quickly,limiting the ability of devices to carry intelligent algorithms for autonomous control,thereby affecting cloud side task allocation;In terms of control mode,due to uneven task allocation on the cloud side,it is difficult for the cloud to simultaneously take into account the training and calculation of predictive control algorithm models,making current device control algorithms mostly adopt feedback methods,with a single mode,and lacking predictive control capabilities that can respond to environmental changes in advance.Therefore,in view of the shortcomings of the above cloud home,based on the computing concept of cloud side collaboration,this article uses cloud technology,wireless network technology,embedded development,Android development,and other related hardware devices to design a cloud based home device control method.The research work done in this article includes:(1)To solve the problem of unreasonable cloud side task allocation,a smart home control method based on cloud side collaboration framework is designed.Cloud is used as a platform for data interaction and algorithm model training to conduct real-time monitoring,data transmission,and predictive control model training for different household devices,and edge devices are equipped with algorithm models to achieve autonomous predictive control.At the same time,according to the required sensor data,achieve cloud,device,and mobile control App monitoring data synchronization and App remote control functions;(2)To address the issue of difficulty in rapidly upgrading and expanding the firmware code of edge devices,the rapid update function of edge device code in the cloud home system is implemented.Through cloud server and mobile App,based on IAP(In-Application Programming)technology and Wi-Fi technology,remote fast burning of firmware embedded code is realized.In addition,MD5 encryption is performed on the code block data,and the code is sent in blocks.At the same time,the BKP register of the main control chip is used to achieve continuous transmission when the code is upgraded;(3)Aiming at the problem of single intelligent control mode,a predictive control method based on time series decomposition and neural network is designed.The multi-dimensional input feature prediction model STL-MLSTM(Seasonal and Trend decomposition using Loess,Multi-input Long-Short Term Memory)based on the STL(Seasonal and Trend decomposition using Loess)time series decomposition algorithm and LSTM(long-term and short-term memory)neural network is used for predictive control of the device.By predicting the time series of the control target combined with multi-dimensional inputs such as environmental characteristics and device output,the control amount of the household device in the next control cycle is given from the prediction results.Finally,experiments prove that the prediction accuracy of the prediction algorithm designed in this thesis is high;Using relevant hardware,the cloud based home device control method was actually deployed and functional tested.The device ran successfully,and the relevant functions were able to operate normally.Predictive control also achieved good results. |