# Construction of Hotel Resource Information Platform Based on the Internet of Things Technology

Authors: Yi Meng
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In order to meet the expectations and needs of hotel managers and hotel occupants, the author proposes a smart hotel system based on the six-domain model of the Internet of things. The system has designed the intelligent hotel guest control unified management cloud platform in detail, including hotel management, guest room management, equipment management, scene management, authority management, system management, Tmall wizard docking, WeChat applet interface, and MQTT client; we design a smart hotel room controller (RCU) hardware system based on Espressif ESP32 (WiFi Soc) and realize centralized management and control of curtains, lamps, air conditioners, and other equipment in hotel rooms; RCU connects to the MQTT server through WiFi and exchanges and controls data with the cloud intelligent platform by means of message subscription and publishing. At the same time, the equipment set of RCU can be arbitrarily cut and added according to the actual hotel scene, and the logic control function can be reconstructed and designed according to the user’s personalized requirements. In addition, considering the edge-cloud computing processing scheme, the framework of the system is designed and the software to simulate the edge-cloud computing system is finally used; the system simulation results show that the total failure rate of the edge-cloud computing structure is less than 5%, and the processing time of the task is relatively short.Conclusion. It can meet the needs of diversified application scenarios of smart hotels.


---

## Body

## 1. Introduction

With the rapid development of Internet technology, various industries all over the world have changed due to the Internet; for example, in the tourism and travel industries, many Internet companies have emerged, for example, Huazhu Group, Ctrip.com, eLong.com, and other well-known companies; the Internet has changed the tourism and travel industries. On the basis of that, the Internet has also affected the traditional hotel industry; it can be said that from the 1990s to the present, the hotel industry has seen the biggest changes in millennia and has also expanded rapidly in size. Due to the rapid expansion of the hotel industry in recent years, there is currently a very fierce competition in the industry; as a result, a large number of budget hotels were born in the country, which further stimulated the competition in the industry; therefore, there is a saying that “running a hotel is the least profitable business”. Indeed, the hotel has very little profit after removing operating costs, rent, shop assistants, etc. In addition, the hotel density is too high and the passenger flow is limited; hence, the situation of the industry needs to be changed urgently [1].Major group companies have also seen the situation in the industry, so they have launched their own high-end hotels to change the fate of traditional economy hotels. The most typical domestic hotel is the Orange Crystal Hotel, which is a design hotel, where the intelligent control system of the guest rooms is unique, so the hotel can be quickly promoted in China [2]. In recent years, due to the continuous development of the Internet of things technology, many intelligent control systems have appeared, such as the Internet of things remote control technology and smart home control systems in recent years [3]. At present, this type of technology has been applied maturely, and it is applied in many industries, such as high-end apartments, high-end hotels, and villas, as shown in Figure 1.Figure 1
Hotel resource information platform based on the Internet of things technology.


## 2. Literature Review

The Internet of Things technology has gradually improved the hotel service level, which provides technical conditions for effective integration of tourism resources. The application of Internet of Things technology in the construction of smart hotels mainly includes online booking, passenger check-in, and check-out. In addition, it also includes hotel registration, intelligent guidance, room application, electronic restaurant, online landscape, leisure and entertainment, one click check-out, and online evaluation. Din and Paul defined the connotation of intelligent hotel: through a complete intelligent system, the hotel will digitalize, intelligentize and network the operation, management and service, so as to achieve personalized, humanized service, and efficient management of the hotel [2]. Through research, it is believed that the era of big data promotes the transformation and upgrading of the hotel industry; with the development and application of smart hotels, hotel management will adopt a new model suitable for it [4]. Xie et al. believe that the construction of smart hotels is a new idea for the development of contemporary hotels under the Internet thinking [5]. Shi and Zhou studied a smart hotel system based on ZigBee wireless sensor technology, through which the hotel’s smart control can be realized [6]. Barnawi et al. believes that smart hotels should be promoted in three following areas: smart management, smart service, and smart control; the three levels form a cross-dimensional smart space with each other, covering not only the application of new technologies such as the Internet of things, data analysis, and control engineering but also new business models [7].With the development of the Internet of things technology, a multifunctional smart hotel control system is created more and more in line with the expectations and needs of hotel managers and hotel occupants. In view of this, this paper refers to the design idea of the top-level architecture of the six-domain model of the Internet of things and builds a smart hotel system based on the six-domain model of the Internet of things.


## 3. Research Methods

### 3.1. The Six-Domain Model of the Internet of Things

In 2018, the international standard “Internet of Things Reference Architecture” (ISO/IEC30141 : 2018) led by my country was officially released [8]. The reference architecture is shown in Figure 2, which includes the user domain, the resource exchange domain, the service provision domain, the operation and maintenance management domain, the perception control domain, and the target object domain [9].Figure 2
Internet of things system reference architecture.The user domain identifies users of different IoT types, through which the perception and manipulation tasks of actual physical objects can be completed. From the overall classification of users, it can include government users, enterprise users, and public users.The resource exchange domain realizes the exchange and sharing of information resources between the IoT system and other systems. According to the function, it can be divided into the information resource exchange system and the market resource exchange system.The service provider domain is based on a large amount of data information on the hardware device side, carries out in-depth data processing and processing, such as cloud computing and artificial intelligence algorithms, and provides various service interfaces for different users in the user domain.The operation and maintenance control domain manages and ensures the reliability and safe operation of the IoT system and ensures that the corresponding application system complies with legal norms and industry norms.The perception control domain uses certain technical means to realize the perception and control of the target object; through different perception and execution functional units, the control operation and information collection of the target object are realized. In the prior art, the perception control domain includes sensor network systems, label identification systems, location information systems, audio and video acquisition systems, and intelligent equipment interface systems [10]. Among them, the intelligent equipment interface system has the functions of communication, protocol conversion, data processing, etc.; in practical applications, the intelligent equipment interface system can be integrated into the target object.The target object domain, that is, the “object” of the Internet of things that the Internet of things users are concerned about; it is the source of constructing a new value that is different from traditional products and services, the source of information resources in the perception and control domain, and the entity collection of information acquisition and control objects (including perception objects and control objects). The sensing object and the control object can adopt the way of communication interface or noncommunication interface, associated with the perception control domain, implementing the interface binding between the physical reality and the virtual world.


### 3.2. Design of Smart Hotel Systems Based on the Six-Domain Model

Based on the above design principles of the six-domain model of the Internet of things, a smart hotel system based on the Internet of things technology is constructed according to the standard structure of the system. Compared with the traditional hotel management system, the smart hotel includes the basic functions of the traditional hotel PMS (hotel management system) system, it has also added functions that allow passengers to go through a series of procedures such as self-check-in, room selection, and check-out through WeChat, APP, official account, and other means. Providing the intelligent guest control system for diversified scene setting and user habit setting, customers can control room lights, curtains, air conditioners, etc., through the AI voice recognition, APP operation, and other means, providing customers with tailor-made personalized service, greatly improving the check-in experience. Since the customer needs to monitor the equipment in the room in real time, the power consumption of the room equipment is detected and intelligently controlled through the intelligent algorithm, so as to achieve the effect of energy saving, emission reduction, and operation cost reduction. The intelligent hotel system can connect data with third-party food, entertainment and transportation systems, and conduct targeted marketing through big data to expand hotel marketing channels and reduce marketing costs while increasing hotel operating revenue [2].


### 3.3. The Edge Cloud Computing Solution

Compared with the cloud computing structure, the edge computing layer is introduced between the cloud center computing layer and the terminal node layer. The process of data uploading first passes through the edge layer and then transmits to the cloud center. For the top layer, it can be seen as decentralizing computing power [11]. We extend the original central infrastructure into a star, as shown in Figure 3.Figure 3
Star diagram of the edge computing node structure.Channels vary from layer to layer. Between the cloud center computing layer and the edge nodes, the wired WAN connection is usually used, and between the edge computing layer and the terminal node layer, there are various short-distance wireless connection methods, for example, WiFi, ZigBee, Bluetooth, and other connection methods, because the physical location is relatively close, usually an edge node, and its lower terminal nodes form a local network.Each part of the execution process of edge computing can be modularized. The entire edge computing process is abstracted into a core computing module, a task output module, an edge coordination module, and a network transmission module; the 4 modules together constitute the edge computing model. The relationship between modules is shown in Figure4. Among them, the core computing module includes edge nodes and cloud centers, which are mainly responsible for performing cloud tasks, and the core module includes edge computing modules and core computing modules. The task generation module is responsible for randomly generating tasks to be executed. The edge coordination module is responsible for decision-making; this layer decides how edge tasks are allocated and which host performs the tasks; although the computing power of edge devices is not comparable to that of central cloud devices, they can still undertake a small number of cloud tasks within the framework. The network transmission module is responsible for the process of network transmission, including the upload and download of processing tasks, and the WAN network has high latency and limited bandwidth, while the LAN network has low latency and high bandwidth [12].Figure 4
Flowchart of processing between modules.The author introduces a long short-term memory network (LSTM), which can effectively use the characteristics of the data information before and after, the variable composition sequence is fed into the LSTM for training. The LSTM realizes the protection and control of information through 3 gates. These three gates are input gate, forget gate, and output gate. The update of each gate is as follows [13]:(1)fi=σWf⋅ht−1,xt+bf,(2)ii=σWi⋅ht−1,xt+bi,(3)oi=σWo⋅ht−1,xt+bo.In the formula,fi is the input gate; ii is the forgetting gate; oi is the output gate; W and b are the weights and offsets of the corresponding threshold layers, respectively; and σ is the sigmoid activation function.


### 3.4. Design of Guest Control Systems for Smart Hotels

#### 3.4.1. Cloud Intelligent Platform Design

We build a cloud-based intelligent platform to realize intelligent, automated, and unified management of hotel room guest control systems, including hotel management, room management, equipment management, scene management, authority management, system management, Tmall wizard docking, WeChat applet interface, and MQTT client. The RCU controller connects to the MQTT server through WiFi, so that the RCU and the cloud intelligent platform can subscribe and publish messages through, realize interaction, and control functions. The cloud intelligent platform follows the third-party docking protocol standard, connect third-party smart products to the system platform, and can bind and control the RCU system in each room, realizing the free expansion of third-party intelligent products, such as docking with Tmall Genie to realize the AI voice control of various devices in hotel rooms. The user management module is designed to implement hierarchical authority management for hotel personnel, system administrators, and hotel check-in users. The API extension interface provides user APP, WeChat applet, and docking PMS [14].The business process of the cloud intelligent platform system [15, 16] (as shown in Figure 5) is as follows:(1)
Log in to the system administrator account, create a hotel, for example, create a Hanting Hotel, save, and exit.(2)
Log in to the hotel management system account, select the Hanting Hotel created in the previous step, and log in to the hotel management account.(3)
Create room types, for example, the hotel contains double room, standard room, etc. The RCU devices corresponding to different room types contain different sets of devices, and the RCU logic modules need to be reconstructed and configured, generate matching RCU device sets, and control logic.(4)
The user connects the Tmall Genie and the hotel guest control system RCU to the Internet through the WiFi network and open the Tmall Genie APP to bind the corresponding AI speaker. Then, open the background of the smart hotel guest control system, log in to the hotel administrator account, and click on the hotel guest control management interface. Create a room based on the previously saved room type, enter the room number, and bind the room number to the RCU scanned in the system; at the same time, bind the Tmall Genie to the RCU device, configure speech recognition entries and user execution scenarios, and associate with the RCU command; after the configuration is completed, the room is released and saved to the database. The RCU configuration topic is published through the MQTT server, and the RCU receives configuration data by subscribing to the topic, reconstructs and upgrades local devices and logical devices, and restarts to take effect [17].(5)
At this point, users who stay in the hotel can control the equipment in the room, such as lamps, curtains, and scenes, through the voice of the Tmall Genie. Hotel users can also log in to the WeChat applet and control the equipment in the room through the mobile terminal interface. Hotel managers can also use the intelligent cloud system background and control and detect the logical state of each device in the room RCU [18].Figure 5
The business process of the terminal intelligent platform system.


#### 3.4.2. Smart Room Controller (RCU) Design

In order to meet the personalized customization of smart hotels, as well as diversified scene configurations and applications, it is required that the RCU can also be configured and logically reconfigurable according to customized requirements. In the design, the equipment used in the hotel occasion should be exhausted as much as possible, and each equipment should be atomized according to the equipment attributes and functional events; this atomic equipment will be added and deleted according to the actual needs of the equipment, achieving free expansion. Each atomic device directly constructs the function event dynamic cross table, configures the cross table, and realize the local control logic reconstruction function.(1) Hardware Design. The RCU main control adopts the super cost-effective ESP32 WiFi SOC designed by Espressif. The chip integrates a dual-mode SOC chip for 2.4 GHz WiFi and Bluetooth, and an Ethernet MAC controller for dedicated DMA. Integrated Xtensa® 32 bit LX6 single/dual-core processor, with a computing power up to 600 MIPS and the highest CPU frequency up to 240 MHz, with rich peripheral resources, integrates a maximum of 448 KB ROM and 520 KB SRAM on-chip and support external expansion of a maximum of 16 MB FLASH memory. And software resources support rich routines, such as Modbus routines, and MQTT routines, and can speed up product development cycle. The hardware structure of RCU is shown in Figure 6 [19]. For various hotel room equipment, such as weak current switch panels, light relay panels, door magnets, curtains, house numbers, music panels, through Modbus access, and wireless RF technology, users can access devices in the 2.4 GHz frequency band such as ZigBee and Bluetooth. This design also takes into account the reasons such as wall penetration and signal interference, and uses Sub1G to access wireless devices.Figure 6
RCU hardware structure.(2) Software Logic Design. The RCU software layer consists of Free-RTOS system software package, the WiFi network configuration management process (Smart-Config), the abnormal daemon process, the MQTT client service process, the device management configuration process, the device logic control process, the device table, the device scene table, and the device binding table; it consists of Modbus adapter interface, wireless device adapter interface, and drivers for each peripheral module (WiFi, KEY, LED, serial port). The MQTT client service process implements the communication between the RCU and the cloud MQTT server, receives control and configuration instructions from the cloud intelligent platform through message subscription and publishing, and performs corresponding device control and device status reporting; the software running process is shown in Figure 7. The device logic control process periodically scans the devices in the system and reads the hardware device status, when the state of a device changes, the process generates corresponding control logic according to the logic of the device table and the device binding table, and publish the upstream message queue of the device status update to the MQTT client service process. At the same time, the process needs to process the downlink message queue from the MQTT client service process, if the received downlink message is a device control command, it will directly control the hardware device, if the received message queue is the device configuration, the device configuration management process will be started to modify and logically reconstruct the local device. The abnormal daemon will monitor and control the above processes, and once an abnormal error occurs, the corresponding error handling mechanism will be triggered to ensure the stability of the system.Figure 7
RCU software design process.(3) Main Controller Module Circuit Design. In the PCB of electronic products, the lower layer is the reference plane, and the upper layer is a circuit board model of a transmission line type called a microstrip line. The copper thickness, linearity and green oil thickness of the transmission line, the dielectric thickness between the bottom surfaces, and the dielectric parameters of the circuit board uniformly determine the value of the characteristic impedance of the microstrip line. The bottom copper layer is the reference plane of the transmission line, which can be a ground plane or a power plane. The recommended calculation formula of microstrip line parameters is shown in (4)Z0=87sqrtEr+1.41∗1n5.98H0.8W+T.Among them, W is the line width,T is the copper thickness of the trace, H is the distance from the trace to the reference plane, and Er is the dielectric constant of the PCB board material. The formula for calculating the total current flowing through the previous loop is shown in(5)I1=VISO1+−Vf3.3K=6.9ma.Therefore, the passing current of the front-end loop is 6.9 ma, and the transmission ratio of the front-end stage is 6.9 ma.


## 3.1. The Six-Domain Model of the Internet of Things

In 2018, the international standard “Internet of Things Reference Architecture” (ISO/IEC30141 : 2018) led by my country was officially released [8]. The reference architecture is shown in Figure 2, which includes the user domain, the resource exchange domain, the service provision domain, the operation and maintenance management domain, the perception control domain, and the target object domain [9].Figure 2
Internet of things system reference architecture.The user domain identifies users of different IoT types, through which the perception and manipulation tasks of actual physical objects can be completed. From the overall classification of users, it can include government users, enterprise users, and public users.The resource exchange domain realizes the exchange and sharing of information resources between the IoT system and other systems. According to the function, it can be divided into the information resource exchange system and the market resource exchange system.The service provider domain is based on a large amount of data information on the hardware device side, carries out in-depth data processing and processing, such as cloud computing and artificial intelligence algorithms, and provides various service interfaces for different users in the user domain.The operation and maintenance control domain manages and ensures the reliability and safe operation of the IoT system and ensures that the corresponding application system complies with legal norms and industry norms.The perception control domain uses certain technical means to realize the perception and control of the target object; through different perception and execution functional units, the control operation and information collection of the target object are realized. In the prior art, the perception control domain includes sensor network systems, label identification systems, location information systems, audio and video acquisition systems, and intelligent equipment interface systems [10]. Among them, the intelligent equipment interface system has the functions of communication, protocol conversion, data processing, etc.; in practical applications, the intelligent equipment interface system can be integrated into the target object.The target object domain, that is, the “object” of the Internet of things that the Internet of things users are concerned about; it is the source of constructing a new value that is different from traditional products and services, the source of information resources in the perception and control domain, and the entity collection of information acquisition and control objects (including perception objects and control objects). The sensing object and the control object can adopt the way of communication interface or noncommunication interface, associated with the perception control domain, implementing the interface binding between the physical reality and the virtual world.


## 3.2. Design of Smart Hotel Systems Based on the Six-Domain Model

Based on the above design principles of the six-domain model of the Internet of things, a smart hotel system based on the Internet of things technology is constructed according to the standard structure of the system. Compared with the traditional hotel management system, the smart hotel includes the basic functions of the traditional hotel PMS (hotel management system) system, it has also added functions that allow passengers to go through a series of procedures such as self-check-in, room selection, and check-out through WeChat, APP, official account, and other means. Providing the intelligent guest control system for diversified scene setting and user habit setting, customers can control room lights, curtains, air conditioners, etc., through the AI voice recognition, APP operation, and other means, providing customers with tailor-made personalized service, greatly improving the check-in experience. Since the customer needs to monitor the equipment in the room in real time, the power consumption of the room equipment is detected and intelligently controlled through the intelligent algorithm, so as to achieve the effect of energy saving, emission reduction, and operation cost reduction. The intelligent hotel system can connect data with third-party food, entertainment and transportation systems, and conduct targeted marketing through big data to expand hotel marketing channels and reduce marketing costs while increasing hotel operating revenue [2].


## 3.3. The Edge Cloud Computing Solution

Compared with the cloud computing structure, the edge computing layer is introduced between the cloud center computing layer and the terminal node layer. The process of data uploading first passes through the edge layer and then transmits to the cloud center. For the top layer, it can be seen as decentralizing computing power [11]. We extend the original central infrastructure into a star, as shown in Figure 3.Figure 3
Star diagram of the edge computing node structure.Channels vary from layer to layer. Between the cloud center computing layer and the edge nodes, the wired WAN connection is usually used, and between the edge computing layer and the terminal node layer, there are various short-distance wireless connection methods, for example, WiFi, ZigBee, Bluetooth, and other connection methods, because the physical location is relatively close, usually an edge node, and its lower terminal nodes form a local network.Each part of the execution process of edge computing can be modularized. The entire edge computing process is abstracted into a core computing module, a task output module, an edge coordination module, and a network transmission module; the 4 modules together constitute the edge computing model. The relationship between modules is shown in Figure4. Among them, the core computing module includes edge nodes and cloud centers, which are mainly responsible for performing cloud tasks, and the core module includes edge computing modules and core computing modules. The task generation module is responsible for randomly generating tasks to be executed. The edge coordination module is responsible for decision-making; this layer decides how edge tasks are allocated and which host performs the tasks; although the computing power of edge devices is not comparable to that of central cloud devices, they can still undertake a small number of cloud tasks within the framework. The network transmission module is responsible for the process of network transmission, including the upload and download of processing tasks, and the WAN network has high latency and limited bandwidth, while the LAN network has low latency and high bandwidth [12].Figure 4
Flowchart of processing between modules.The author introduces a long short-term memory network (LSTM), which can effectively use the characteristics of the data information before and after, the variable composition sequence is fed into the LSTM for training. The LSTM realizes the protection and control of information through 3 gates. These three gates are input gate, forget gate, and output gate. The update of each gate is as follows [13]:(1)fi=σWf⋅ht−1,xt+bf,(2)ii=σWi⋅ht−1,xt+bi,(3)oi=σWo⋅ht−1,xt+bo.In the formula,fi is the input gate; ii is the forgetting gate; oi is the output gate; W and b are the weights and offsets of the corresponding threshold layers, respectively; and σ is the sigmoid activation function.


## 3.4. Design of Guest Control Systems for Smart Hotels

### 3.4.1. Cloud Intelligent Platform Design

We build a cloud-based intelligent platform to realize intelligent, automated, and unified management of hotel room guest control systems, including hotel management, room management, equipment management, scene management, authority management, system management, Tmall wizard docking, WeChat applet interface, and MQTT client. The RCU controller connects to the MQTT server through WiFi, so that the RCU and the cloud intelligent platform can subscribe and publish messages through, realize interaction, and control functions. The cloud intelligent platform follows the third-party docking protocol standard, connect third-party smart products to the system platform, and can bind and control the RCU system in each room, realizing the free expansion of third-party intelligent products, such as docking with Tmall Genie to realize the AI voice control of various devices in hotel rooms. The user management module is designed to implement hierarchical authority management for hotel personnel, system administrators, and hotel check-in users. The API extension interface provides user APP, WeChat applet, and docking PMS [14].The business process of the cloud intelligent platform system [15, 16] (as shown in Figure 5) is as follows:(1)
Log in to the system administrator account, create a hotel, for example, create a Hanting Hotel, save, and exit.(2)
Log in to the hotel management system account, select the Hanting Hotel created in the previous step, and log in to the hotel management account.(3)
Create room types, for example, the hotel contains double room, standard room, etc. The RCU devices corresponding to different room types contain different sets of devices, and the RCU logic modules need to be reconstructed and configured, generate matching RCU device sets, and control logic.(4)
The user connects the Tmall Genie and the hotel guest control system RCU to the Internet through the WiFi network and open the Tmall Genie APP to bind the corresponding AI speaker. Then, open the background of the smart hotel guest control system, log in to the hotel administrator account, and click on the hotel guest control management interface. Create a room based on the previously saved room type, enter the room number, and bind the room number to the RCU scanned in the system; at the same time, bind the Tmall Genie to the RCU device, configure speech recognition entries and user execution scenarios, and associate with the RCU command; after the configuration is completed, the room is released and saved to the database. The RCU configuration topic is published through the MQTT server, and the RCU receives configuration data by subscribing to the topic, reconstructs and upgrades local devices and logical devices, and restarts to take effect [17].(5)
At this point, users who stay in the hotel can control the equipment in the room, such as lamps, curtains, and scenes, through the voice of the Tmall Genie. Hotel users can also log in to the WeChat applet and control the equipment in the room through the mobile terminal interface. Hotel managers can also use the intelligent cloud system background and control and detect the logical state of each device in the room RCU [18].Figure 5
The business process of the terminal intelligent platform system.


### 3.4.2. Smart Room Controller (RCU) Design

In order to meet the personalized customization of smart hotels, as well as diversified scene configurations and applications, it is required that the RCU can also be configured and logically reconfigurable according to customized requirements. In the design, the equipment used in the hotel occasion should be exhausted as much as possible, and each equipment should be atomized according to the equipment attributes and functional events; this atomic equipment will be added and deleted according to the actual needs of the equipment, achieving free expansion. Each atomic device directly constructs the function event dynamic cross table, configures the cross table, and realize the local control logic reconstruction function.(1) Hardware Design. The RCU main control adopts the super cost-effective ESP32 WiFi SOC designed by Espressif. The chip integrates a dual-mode SOC chip for 2.4 GHz WiFi and Bluetooth, and an Ethernet MAC controller for dedicated DMA. Integrated Xtensa® 32 bit LX6 single/dual-core processor, with a computing power up to 600 MIPS and the highest CPU frequency up to 240 MHz, with rich peripheral resources, integrates a maximum of 448 KB ROM and 520 KB SRAM on-chip and support external expansion of a maximum of 16 MB FLASH memory. And software resources support rich routines, such as Modbus routines, and MQTT routines, and can speed up product development cycle. The hardware structure of RCU is shown in Figure 6 [19]. For various hotel room equipment, such as weak current switch panels, light relay panels, door magnets, curtains, house numbers, music panels, through Modbus access, and wireless RF technology, users can access devices in the 2.4 GHz frequency band such as ZigBee and Bluetooth. This design also takes into account the reasons such as wall penetration and signal interference, and uses Sub1G to access wireless devices.Figure 6
RCU hardware structure.(2) Software Logic Design. The RCU software layer consists of Free-RTOS system software package, the WiFi network configuration management process (Smart-Config), the abnormal daemon process, the MQTT client service process, the device management configuration process, the device logic control process, the device table, the device scene table, and the device binding table; it consists of Modbus adapter interface, wireless device adapter interface, and drivers for each peripheral module (WiFi, KEY, LED, serial port). The MQTT client service process implements the communication between the RCU and the cloud MQTT server, receives control and configuration instructions from the cloud intelligent platform through message subscription and publishing, and performs corresponding device control and device status reporting; the software running process is shown in Figure 7. The device logic control process periodically scans the devices in the system and reads the hardware device status, when the state of a device changes, the process generates corresponding control logic according to the logic of the device table and the device binding table, and publish the upstream message queue of the device status update to the MQTT client service process. At the same time, the process needs to process the downlink message queue from the MQTT client service process, if the received downlink message is a device control command, it will directly control the hardware device, if the received message queue is the device configuration, the device configuration management process will be started to modify and logically reconstruct the local device. The abnormal daemon will monitor and control the above processes, and once an abnormal error occurs, the corresponding error handling mechanism will be triggered to ensure the stability of the system.Figure 7
RCU software design process.(3) Main Controller Module Circuit Design. In the PCB of electronic products, the lower layer is the reference plane, and the upper layer is a circuit board model of a transmission line type called a microstrip line. The copper thickness, linearity and green oil thickness of the transmission line, the dielectric thickness between the bottom surfaces, and the dielectric parameters of the circuit board uniformly determine the value of the characteristic impedance of the microstrip line. The bottom copper layer is the reference plane of the transmission line, which can be a ground plane or a power plane. The recommended calculation formula of microstrip line parameters is shown in (4)Z0=87sqrtEr+1.41∗1n5.98H0.8W+T.Among them, W is the line width,T is the copper thickness of the trace, H is the distance from the trace to the reference plane, and Er is the dielectric constant of the PCB board material. The formula for calculating the total current flowing through the previous loop is shown in(5)I1=VISO1+−Vf3.3K=6.9ma.Therefore, the passing current of the front-end loop is 6.9 ma, and the transmission ratio of the front-end stage is 6.9 ma.


## 3.4.1. Cloud Intelligent Platform Design

We build a cloud-based intelligent platform to realize intelligent, automated, and unified management of hotel room guest control systems, including hotel management, room management, equipment management, scene management, authority management, system management, Tmall wizard docking, WeChat applet interface, and MQTT client. The RCU controller connects to the MQTT server through WiFi, so that the RCU and the cloud intelligent platform can subscribe and publish messages through, realize interaction, and control functions. The cloud intelligent platform follows the third-party docking protocol standard, connect third-party smart products to the system platform, and can bind and control the RCU system in each room, realizing the free expansion of third-party intelligent products, such as docking with Tmall Genie to realize the AI voice control of various devices in hotel rooms. The user management module is designed to implement hierarchical authority management for hotel personnel, system administrators, and hotel check-in users. The API extension interface provides user APP, WeChat applet, and docking PMS [14].The business process of the cloud intelligent platform system [15, 16] (as shown in Figure 5) is as follows:(1)
Log in to the system administrator account, create a hotel, for example, create a Hanting Hotel, save, and exit.(2)
Log in to the hotel management system account, select the Hanting Hotel created in the previous step, and log in to the hotel management account.(3)
Create room types, for example, the hotel contains double room, standard room, etc. The RCU devices corresponding to different room types contain different sets of devices, and the RCU logic modules need to be reconstructed and configured, generate matching RCU device sets, and control logic.(4)
The user connects the Tmall Genie and the hotel guest control system RCU to the Internet through the WiFi network and open the Tmall Genie APP to bind the corresponding AI speaker. Then, open the background of the smart hotel guest control system, log in to the hotel administrator account, and click on the hotel guest control management interface. Create a room based on the previously saved room type, enter the room number, and bind the room number to the RCU scanned in the system; at the same time, bind the Tmall Genie to the RCU device, configure speech recognition entries and user execution scenarios, and associate with the RCU command; after the configuration is completed, the room is released and saved to the database. The RCU configuration topic is published through the MQTT server, and the RCU receives configuration data by subscribing to the topic, reconstructs and upgrades local devices and logical devices, and restarts to take effect [17].(5)
At this point, users who stay in the hotel can control the equipment in the room, such as lamps, curtains, and scenes, through the voice of the Tmall Genie. Hotel users can also log in to the WeChat applet and control the equipment in the room through the mobile terminal interface. Hotel managers can also use the intelligent cloud system background and control and detect the logical state of each device in the room RCU [18].Figure 5
The business process of the terminal intelligent platform system.


## 3.4.2. Smart Room Controller (RCU) Design

In order to meet the personalized customization of smart hotels, as well as diversified scene configurations and applications, it is required that the RCU can also be configured and logically reconfigurable according to customized requirements. In the design, the equipment used in the hotel occasion should be exhausted as much as possible, and each equipment should be atomized according to the equipment attributes and functional events; this atomic equipment will be added and deleted according to the actual needs of the equipment, achieving free expansion. Each atomic device directly constructs the function event dynamic cross table, configures the cross table, and realize the local control logic reconstruction function.(1) Hardware Design. The RCU main control adopts the super cost-effective ESP32 WiFi SOC designed by Espressif. The chip integrates a dual-mode SOC chip for 2.4 GHz WiFi and Bluetooth, and an Ethernet MAC controller for dedicated DMA. Integrated Xtensa® 32 bit LX6 single/dual-core processor, with a computing power up to 600 MIPS and the highest CPU frequency up to 240 MHz, with rich peripheral resources, integrates a maximum of 448 KB ROM and 520 KB SRAM on-chip and support external expansion of a maximum of 16 MB FLASH memory. And software resources support rich routines, such as Modbus routines, and MQTT routines, and can speed up product development cycle. The hardware structure of RCU is shown in Figure 6 [19]. For various hotel room equipment, such as weak current switch panels, light relay panels, door magnets, curtains, house numbers, music panels, through Modbus access, and wireless RF technology, users can access devices in the 2.4 GHz frequency band such as ZigBee and Bluetooth. This design also takes into account the reasons such as wall penetration and signal interference, and uses Sub1G to access wireless devices.Figure 6
RCU hardware structure.(2) Software Logic Design. The RCU software layer consists of Free-RTOS system software package, the WiFi network configuration management process (Smart-Config), the abnormal daemon process, the MQTT client service process, the device management configuration process, the device logic control process, the device table, the device scene table, and the device binding table; it consists of Modbus adapter interface, wireless device adapter interface, and drivers for each peripheral module (WiFi, KEY, LED, serial port). The MQTT client service process implements the communication between the RCU and the cloud MQTT server, receives control and configuration instructions from the cloud intelligent platform through message subscription and publishing, and performs corresponding device control and device status reporting; the software running process is shown in Figure 7. The device logic control process periodically scans the devices in the system and reads the hardware device status, when the state of a device changes, the process generates corresponding control logic according to the logic of the device table and the device binding table, and publish the upstream message queue of the device status update to the MQTT client service process. At the same time, the process needs to process the downlink message queue from the MQTT client service process, if the received downlink message is a device control command, it will directly control the hardware device, if the received message queue is the device configuration, the device configuration management process will be started to modify and logically reconstruct the local device. The abnormal daemon will monitor and control the above processes, and once an abnormal error occurs, the corresponding error handling mechanism will be triggered to ensure the stability of the system.Figure 7
RCU software design process.(3) Main Controller Module Circuit Design. In the PCB of electronic products, the lower layer is the reference plane, and the upper layer is a circuit board model of a transmission line type called a microstrip line. The copper thickness, linearity and green oil thickness of the transmission line, the dielectric thickness between the bottom surfaces, and the dielectric parameters of the circuit board uniformly determine the value of the characteristic impedance of the microstrip line. The bottom copper layer is the reference plane of the transmission line, which can be a ground plane or a power plane. The recommended calculation formula of microstrip line parameters is shown in (4)Z0=87sqrtEr+1.41∗1n5.98H0.8W+T.Among them, W is the line width,T is the copper thickness of the trace, H is the distance from the trace to the reference plane, and Er is the dielectric constant of the PCB board material. The formula for calculating the total current flowing through the previous loop is shown in(5)I1=VISO1+−Vf3.3K=6.9ma.Therefore, the passing current of the front-end loop is 6.9 ma, and the transmission ratio of the front-end stage is 6.9 ma.


## 4. Analysis of Results

### 4.1. Simulation Description

EdgeCloudSim is a simulation environment simulation software for edge scenarios based on CloudSim, which can effectively simulate actual scenarios, building multiple data centers, virtual machines, and simulating users and user tasks can also modularize workflows.In EdgeCloudSim, there are 3 transport structures for internal structure settings, denoted as single-layer, multilayer, and multilayer structures with edge arranger [20]. Among them, the single-layer structure means that the information cloud task only runs in the area of the edge server; The multilayer structure means that cloud tasks can be uploaded to the common cloud platform; the multilayer structure with edge orchestrator can also offload single-layer tasks to adjacent edge nodes. For the first task, simulating the face recognition task. In the actual situation, the camera terminal at the door of the room collects images, stores and initiates a request for face recognition, and can perform operations such as opening the door and alarming according to the recognition result. The computing tasks under the three structures are simulated respectively, and the results are statistically processed. It is set that the task needs to upload the face image to be recognized, the image size is 1 500 kB, and the task recognition result needs to be returned at the same time, where the data size is 15 kB. The second task is the information task, the upload data is 25 kB, and the download data is 20 kB.


### 4.2. Simulation Result Analysis of Face Recognition Task

After the simulation of EdgeCloudSim, the simulation results are shown in Figure8. Experimental results The X-axis represents the number of devices, the Y-axis represents the feedback results of the tasks performed, and the two curves represent two different transmission structures. By analyzing the simulation results, the characteristics of the edge-cloud computing system are given. It should be noted that under the single-layer structure, tasks will only be submitted to edge nodes, and will not be uploaded to cloud computing via WAN network [21].Figure 8
Failure rate of face recognition cloud tasks.Figure8 shows the task failure rates in face recognition applications under different architectures. It can be seen that with the increase of the number of devices, especially after more than 200 devices, the task failure rate of the single-layer and double-layer structure will increase significantly. The analysis shows that the high probability of task failure occurs on the LAN side, which is due to the limited performance of edge devices, the virtual machine used to process the task was unable to process the received task, causing the task to fail. From this, it can be seen that, the processing power of the virtual machine is a key factor in determining the probability of mission failure. Correspondingly, in a structure with an edge orchestrator, since it is possible to decide how to allocate tasks according to the utilization of the virtual machine of the local edge node, that is, whether to allocate it to an idle edge node or upload it to the cloud. Under this structure, if the number of devices increases, the failure rate of the task can still be maintained at a very low level, and the total failure rate is less than 5% [22, 23].In terms of processing time, since the virtual machine performance of the central node is better than that of the edge, the processing time of the task is also relatively short. For the single-layer structure, the processing delay is all concentrated in the edge nodes. It can also be noticed that with the increase of the number of devices, the processing time of the single-layer structure and the two-layer structure increases rapidly, and there are certain difficulties in dealing with multiple tasks, this is also in line with the increase in processing equipment, reasons for the increase in task failure rate in single- and two-layer structures. Comparing the task processing time of the two-layer structure and the two-layer structure with edge orchestrator, it can be seen that the structure with edge orchestrator can offload tasks to other edge nodes, the overall processing latency is better than the two-layer structure [24–26].


## 4.1. Simulation Description

EdgeCloudSim is a simulation environment simulation software for edge scenarios based on CloudSim, which can effectively simulate actual scenarios, building multiple data centers, virtual machines, and simulating users and user tasks can also modularize workflows.In EdgeCloudSim, there are 3 transport structures for internal structure settings, denoted as single-layer, multilayer, and multilayer structures with edge arranger [20]. Among them, the single-layer structure means that the information cloud task only runs in the area of the edge server; The multilayer structure means that cloud tasks can be uploaded to the common cloud platform; the multilayer structure with edge orchestrator can also offload single-layer tasks to adjacent edge nodes. For the first task, simulating the face recognition task. In the actual situation, the camera terminal at the door of the room collects images, stores and initiates a request for face recognition, and can perform operations such as opening the door and alarming according to the recognition result. The computing tasks under the three structures are simulated respectively, and the results are statistically processed. It is set that the task needs to upload the face image to be recognized, the image size is 1 500 kB, and the task recognition result needs to be returned at the same time, where the data size is 15 kB. The second task is the information task, the upload data is 25 kB, and the download data is 20 kB.


## 4.2. Simulation Result Analysis of Face Recognition Task

After the simulation of EdgeCloudSim, the simulation results are shown in Figure8. Experimental results The X-axis represents the number of devices, the Y-axis represents the feedback results of the tasks performed, and the two curves represent two different transmission structures. By analyzing the simulation results, the characteristics of the edge-cloud computing system are given. It should be noted that under the single-layer structure, tasks will only be submitted to edge nodes, and will not be uploaded to cloud computing via WAN network [21].Figure 8
Failure rate of face recognition cloud tasks.Figure8 shows the task failure rates in face recognition applications under different architectures. It can be seen that with the increase of the number of devices, especially after more than 200 devices, the task failure rate of the single-layer and double-layer structure will increase significantly. The analysis shows that the high probability of task failure occurs on the LAN side, which is due to the limited performance of edge devices, the virtual machine used to process the task was unable to process the received task, causing the task to fail. From this, it can be seen that, the processing power of the virtual machine is a key factor in determining the probability of mission failure. Correspondingly, in a structure with an edge orchestrator, since it is possible to decide how to allocate tasks according to the utilization of the virtual machine of the local edge node, that is, whether to allocate it to an idle edge node or upload it to the cloud. Under this structure, if the number of devices increases, the failure rate of the task can still be maintained at a very low level, and the total failure rate is less than 5% [22, 23].In terms of processing time, since the virtual machine performance of the central node is better than that of the edge, the processing time of the task is also relatively short. For the single-layer structure, the processing delay is all concentrated in the edge nodes. It can also be noticed that with the increase of the number of devices, the processing time of the single-layer structure and the two-layer structure increases rapidly, and there are certain difficulties in dealing with multiple tasks, this is also in line with the increase in processing equipment, reasons for the increase in task failure rate in single- and two-layer structures. Comparing the task processing time of the two-layer structure and the two-layer structure with edge orchestrator, it can be seen that the structure with edge orchestrator can offload tasks to other edge nodes, the overall processing latency is better than the two-layer structure [24–26].


## 5. Conclusion

The smart hotel system based on the six-domain model of the Internet of Things realizes the intelligent and unified management of the hotel system through the cloud intelligent platform, including hotel management, guest room management, equipment management, scene management, authority management, system management, Tmall Genie docking, WeChat applet interface, and MQTT client. The emergence of edge computing has broadened the application scenarios for cloud computing, and the edge side allows some cloud tasks to be processed locally, the transmission delay is shortened, the processing time of the task is reduced, and a good running environment can be provided for delay-sensitive applications. Hotel users can control room lights, curtains, air conditioners, etc. through WeChat applet, cloud background, AI voice recognition, and other means, and provide customers with tailor-made personalized scene services, greatly improving the check-in experience; In addition, the unified management platform can also help hotel managers to complete the management of the daily operation of the hotel more conveniently, saving human and financial costs.



---

*Source: 4898550-2022-09-22.xml*