Academic Journal of Science and Technology ISSN: 2771-3032 | Vol. 4, No. 2, 2022 116 Research on IOT Control module for Smart Kitchen Based on AIOT Technology Liang Wang Beijing Gas Group Co.,Ltd., Beijing 100089, China Abstract: In the Internet of Things, the smart kitchen field has broad market prospects and development potential. In order to solve the problems of wireless kitchen electric system in smart kitchen, such as lack of universality, poor autonomy and controllability, vulnerability to network attacks which lead to illegal data theft. In this paper, an IOT control module for smart kitchen based on AIOT is proposed. Through the design of module hardware and MQTT communication protocol, problems such as few wireless links supported by the IOT control module and no national security algorithm for security authentication can be solved. It can connect various smart kitchen appliances in the smart kitchen system and ensure the security of data. Keywords: AIOT, Smart Kitchen, IOT Control module, MQTT. 1. Introduction The status of Internet of Things technology in the country's development has gradually increased to a strategic level. In order to support the development of Internet of Things technology, the country has also formulated many related favorable policies. In recent years, the global smart home market has begun to expand. In order not to fall behind the global market, the Chinese government has also added smart home to the nine key Internet of Things applications. In the field of smart home technology, smart kitchen is an indispensable item, which has a very broad market prospect and development potential[1]. As the most dangerous area in the home, there are many potential safety problems in the kitchen. There are many electrical appliances with relatively high power in the kitchen. When the electrical appliance is connected too much and the load is too large or the circuit is old, it is easy to cause electricity hazards. Improper use of gas cookers in the kitchen can also bring many dangers, leading to safety hazards in the kitchen. In the early stage, smart home appliances were basically wired networks, but wired networks had great limitations because of the cumbersome lines. At the same time, the high cost and poor convenience also caused the early smart home to be unable to popularize on a large scale [2]. Until the emergence of wireless networking technology based on AIOT, people can easily control the kitchen condition through electronic devices, greatly reducing security risks. The wireless characteristics of AIOT do not require complex wiring, reduce costs, and provide a guarantee for the safety of the kitchen without affecting the aesthetics and comfort[3]. At present, most wireless kitchen electrical systems only support one or two kinds of links, which lacks universality in the application of smart kitchen systems. At the same time, it lacks algorithm-based encryption and decryption functions, which can easily cause the perception layer data to be illegally stolen due to network attacks, it has security risks and poor autonomy and controllability. To solve the above problems, this paper proposes a smart kitchen IOT control module that supports multiple wireless links, multiple protocol types, and strong autonomy and controllability, based on national secret algorithm encryption and decryption, adopts MQTT transmission protocol, which can adapt to multiple protocols and support multi-level structure. 2. IOT Control Module 2.1. Scheme of IOT Control Module With the rapid development of AIOT technology, the Internet of Things has been widely used in the field of smart kitchen. At present, the kitchen electrical appliances in the home kitchen have all integrated the IOT communication module, such as gas meter, gas cooker, gas water heater, range hood, wall hanging furnace, etc., which can realize intelligent information interaction based on WiFi, Bluetooth, ZigBee and other wireless links. The system scheme of the smart kitchen is divided into three layers. The perception control layer acts as the bottom layer to measure and sense data, the network communication layer acts as the middle layer to transmit data, and the application service layer acts as the top layer to make intelligent decisions and interact with users. The smart kitchen system scheme is shown in Figure 1. 117 Figure 1. Smart Kitchen System Scheme As the network communication layer device in the smart kitchen system, the IOT control module receives the physical information and its own status information collected by various kitchen appliances in the perception control layer, and uploads these data information to the server of application service layer through the communication network. After the server stores, analyzes and processes these data information, generates corresponding control commands in combination with the user's control operations at the APP, and then sends them to the corresponding kitchen appliances at the perception control layer through the smart kitchen IOT control module, thus realizing the monitoring and management of the kitchen appliances at the bottom. The IOT control module uses the MQTT protocol. MQTT protocol is a message transmission protocol based on publish/subscribe mode of client server architecture. Its design concept is simple, standard and easy to realize. These features make it a good choice for many scenarios, especially in limited environments such as machine to machine communications (M2M) and the Internet of Things. Like HTTP protocol, MQTT protocol is also an application layer protocol. It works at the application layer of the TCP/IP four layer model and is built on the TCP/IP protocol. The biggest advantage of MQTT protocol is that it can provide real-time and reliable messaging services to connect remote devices with very little code and limited bandwidth. As a low overhead, low bandwidth instant messaging protocol, it has been widely used. 2.2. Hardware Design of IOT Control Module The smart kitchen IOT control module includes the main control unit, external interface unit, wireless transmission unit, data storage unit, power supply unit and national security unit. The external interface unit, wireless transmission unit and data storage unit are respectively connected with the main control unit, and the wireless transmission unit is also connected with the national security unit. The power supply unit supplies power to other units except the external interface unit. The hardware composition of the IOT control module is shown in Figure 2. 118 Figure 2. Hardware Composition of the IOT Control Module The external interface unit includes power input interface, ZigBee antenna interface, Bluetooth antenna interface, 5G/4G antenna interface, WiFi antenna interface and USB interface. The power input interface as the power supply interface module. ZigBee antenna interface, Bluetooth antenna interface and WiFi antenna interface as the wireless link interface module for information interaction with the sensing layer kitchen electrical appliances. 5G/4G antenna interface as the wireless link interface module for communication with the application layer. USB interface as the configuration interface module and the data backup interface. ZigBee antenna interface, Bluetooth antenna interface, 5G/4G antenna interface and WiFi antenna interface can all be connected to the national security unit. The wireless transmission unit includes DTU module and SIM card slot module. The DTU module uses the ESP32- PICO-D4 chip as the RF transceiver chip of the WiFi and Bluetooth link, the CC2430F64RTC chip as the RF transceiver chip of the ZigBee link, and the RG200UCNAA chip as the RF transceiver chip of the 5G link. The SIM card slot selects Micro SIM specification. The main control unit selects RK3399 chip as the core processor module to run the Linux operating system. RK3399 chip is a low-power, high-performance processor. It integrates dual core Cortex-A72, quad core Cortex-A53 and an independent NEON coprocessor. RK3399 chip supports multiformat video decoders, including H.264/H.265/VP9up to 4Kx2K/60f decoders. In particular, the H.264/H.265 decoder supports 10 bit encoding. It also supports 1080p/MVC/VP8 encoder, 1080p, high-quality JPEG encoder/decoder, special image preprocessor and post- processor. The national security unit selects LKT4305GM chip, which conforms to the commercial security detection 119 standard GM/T 0008-2012 security chip password detection standard security level II, supports SM1/SM2/SM3/SM4/SM7 national security algorithm, and enables the smart kitchen IOT control module to have the national security hardware and software encryption function. The storage unit includes FLASH chip and EMMC chip. FLASH chip uses W25Q16JWUUIQ to store configuration information; EMMC chip uses THGBMHG6C1LBAWL (A2J) to encrypt and back up all communication data streams. The power supply unit adopts DC/DC three-stage step- down rectification mode, the input voltage is 12V. First, the voltage is reduced to 5V through the TPS56320 chip to power the national secret chip. Then, the voltage is reduced from 5V to 3.3V through the MP1495 chip to power the wireless transmission unit, the main control unit, and the storage unit. Finally, the voltage is reduced from 3.3V to 1.8V through TLV1117LV18DCYR chip to power the main control unit. 3. Design of MQTT Communication Protocol for IOT Control Module In the application layer protocol, the ISO standard protocol MQTT (message queuing telemetry transmission) on TCP/IP is used as the protocol for the IOT control module of the smart kitchen. In addition to the characteristics of instant messaging, the low overhead and bandwidth consumption of the MQTT protocol enable it to provide stable, accurate and real-time connections to remote devices in low-bandwidth, high- latency or unreliable network environments with very little code and very low power consumption [4].At the same time, its versatility makes it easy for terminal systems based on this protocol to expand equipment types and business types, and it can also directly interface with open cloud platforms that are also based on this protocol [5]. 3.1. General Framework of MQTT Protocol The hierarchical structure of MQTT based smart kitchen platform is shown in Figure 3. Figure 3. Hierarchical structure of MQTT based smart kitchen platform The hierarchical structure of MQTT based smart kitchen platform is mainly composed of smart kitchen service platform, IOT control module, MQTT control terminal and various kitchen electrical appliances. The smart kitchen service platform includes a first-level MMR IOT control module and an MQTT control terminal. The first-level MMR IOT control module is composed of various transparent transmission modules, and the MQTT control terminal is composed of various PC and mobile terminals. The first-level MMR IOT control module controls kitchen appliances through WiFi, Bluetooth, and ZigBee, such as gas meters, gas cookers, gas water heater, range hoods, wall hanging furnace, etc. The first-level MMR IOT control module is also divided into a second-level IOT control module. The detailed information of each part of the control terminal is as follows: Smart kitchen service platform: Provide system management modules, including user registration, user login and verification of home extranet appliances, appliances activation and appliances access. In addition, it also provides a message publishing/ordering, which enables each MQTT client to interact by pushing the information of the MQTT client. MQTT control terminal: A terminal device that enables interaction between people and devices. On the one hand, it receives message feedback from various smart kitchen appliances, and on the other hand, it provides an interface so that users can send control instructions. IOT control module based on MQTT message routing: It is a key transmission center in a multi-level network, and it has two functions. The first function use is protocol conversion, message passing. It can receive different types of communications from different types of kitchen ware 120 companies, convert the information in the form of MQTT, and then publish it in the form of MQTT. At the same time, the information received is the information on the MQTT control terminal, which is converted into the information in the form of related protocols and transmitted to the corresponding heterogeneous kitchen. The second function use is MQTT message routing. The IOT control system adopts a multi-level concatenation method to realize multi-level information routing based on physical control. The smart kitchen service platform sends information to the sub-IOT controller of the IOT according to specific forwarding laws, and then transmits the information through the IOT. Kitchen electrical appliance: Mainly refers to kitchen electrical appliances such as gas meters, gas cookers, gas water heater, range hoods, wall hanging furnace, etc. On the one hand, upload the information to the MQTT control terminal, and on the other hand, receive the control information sent by the user. 3.2. Design of Multi-Protocol Adaptation The multi-protocol adaptation layer needs to realize the multi-protocol adaptation function. On the one hand, the data packets from the kitchen electrical appliance will be converted into communication protocols and encapsulated with messages, and then released to the superior IOT control module or the smart kitchen service platform for message distribution. On the other hand, the message from the superior IOT control module or the smart kitchen service platform is forwarded or unpacked, and then assembled into a data packet of the corresponding communication protocol of the kitchen electrical appliance, and then the data packet is sent to the kitchen electrical appliance. The multi-protocol adaptation layer protocol adaptation structure of the IOT control module designed is shown in Figure 4. Figure 4. Schematic diagram of the protocol adaptation structure of the multi-protocol adaptation layer It can be seen that the protocol adaptation structure of the multi-protocol adaptation layer is as follows: Data uplink protocol adaptation process: The first step is to protocol detect the free protocol data packets of various kitchen electrical appliances. The second step is that after the detection, the corresponding Bridge is called by the corresponding detected protocol. The third step is to remove the data endpoint from the free protocol data packet. The payload part of the MQTT data packet presented later needs to be encoded into JSON format. Data downlink protocol adaptation process: The first step is to get the data endpoint after MQTT packet parsing. The second step is to query the local database with its data endpoint to obtain the information and communication protocol of kitchen electrical appliances. The third step is to call the corresponding Bridge according to actual needs, and encode the data endpoint into a data packet in the communication format of kitchen electrical appliances. 4. Summary Most of the current IOT control modules only support one or two kinds of links, which lacks universality in the application of smart kitchen systems. In addition, it lacks the encryption and decryption function based on the national secret algorithm, and is vulnerable to illegal theft of the perception layer data due to network attacks, with potential security risks and poor autonomy and controllability. To solve these problems, this paper provides a IOT control module that supports multiple wireless links, multiple protocol types and has strong autonomy and controllability, and is encrypted and decrypted based on the national secret algorithm. The MQTT transmission protocol is adopted to solve the problem that the IOT control module in the existing technology supports few wireless links and does not support the national security algorithm for security authentication. It can interface with various intelligent kitchen appliances in the smart kitchen system and ensure data security. References [1] Xiaobin Ma. Smart Home, Smart Life [J]. Television Technology, 2014, 38 (S1): 54-58+66. [2] Haotian Wang. Analysis on the Development of Internet of Things Smart Home [J]. Information System Engineering, 2016, (06): 38. [3] Hao Wang. Design of temperature and humidity acquisition and control program based on Zigbee technology and QT platform [J]. Software Engineering, 2018, 21 (09): 48-50. [4] Heng Ren, Yue Ma, Haibo Yang, Zhengfeng Jia. Message Push Server Based on MQTT Protocol [J]. Computer System Application, 2014, 23 (03): 77-82. [5] Yiyong Wang. Design and Implementation of MVC Based Intelligent Home Gateway System [J]. Computer Age, 2017, (01): 16-17+20.