# Smart Home Design Based on Computer Intelligent Simulation Analysis

Authors: Wenbo Zhang; Si Li
Journal: Scientific Programming
 (2022)

---

## Abstract

With the continuous development of the social economy, people from all walks of life attach great importance to the smart home design of artificial intelligence technology. In the context of the information age, people’s requirements for the quality of life are also gradually upgrading, and the requirements for home furnishing have also been upgraded from the traditional requirements of only living places to the expectation that a more intelligent, convenient, smart home has gradually been brought into life by people. The smart home system can integrate all control terminals into one system and implement on-site or remote control of home equipment using the computer terminal and mobile phone terminal, to realize the function of managing home equipment more conveniently and flexibly. Artificial intelligence technology as one of the important links adopts a structured design scheme to control and complete the design of the smart home system. Compared with most smart home systems on the market, this system also focuses on the safety precautions of the residential environment. It adopts infrared detectors for doors and windows and gravity sensing devices for indoor floors. The space-time barriers between home systems optimize and enhance the user’s living experience. The article first analyzes the architecture, mainstream technology, and characteristics of computer technology and then discusses the design and implementation of my country’s smart home system, providing strong support for subsequent research.


---

## Body

## 1. Introduction

With the rapid progress of computer technology and the continuous reduction in hardware costs [1, 2], virtual reality (VR) technology has ushered in a new wave of development, and many companies have begun to participate in the research and development of VR technology. Google of the United States developed the Google Cardboard product, Samsung of South Korea developed the Gear VR headset, and Sony of Japan developed the PlayStation headset. However, while the hardware equipment is booming, the lack of content seriously restricts the development and popularization of VR technology. At present, most companies try to expand the research direction and development prospects of VR technology by combining existing experience and new technical theories, especially the application of VR technology in the field of home improvement. The smart home is a new living concept based on the combination of many technologies [3–5]. As the pursuit of spiritual quality is becoming more and more personalized, the traditional two-dimensional design concept can no longer meet the needs of modern people. Smart home products [6–9] are relatively expensive equipment and show functional characteristics through specific physical objects, which are expensive and difficult to adapt to the individual needs of customers.The traditional home display method usually uses 3D renderings for visual simulation display [10], but this display method cannot realize the preview of the whole scene, which easily leads to the finished product being less than the customer’s psychological expectation. Therefore, more and more people begin to apply VR technology [11] to the home simulation display system. This display method can not only provide users with an immersive home experience but also realize the self-service design of home details such as floors, floor tiles, and wallpaper patterns [9]. In addition, the traditional home display method has a complex design and low drawing efficiency, while the home display method based on VR technology can be operated in batches, thereby improving work efficiency. To improve the display effect of home simulation [3] and realize immersive home display, this study proposes a home simulation display system based on virtual reality. The system is developed and designed based on HTC Vive VR equipment, fully considering the interaction between home display and users, and realizes personalized home decoration design. The simulation design and implementation results show that the proposed home display system can not only provide users with an immersive home experience but also can carry out modular design to improve the development efficiency.The basic principle of a smart home [12, 13] is to allow human beings to experience the progress and development of technology and bring convenience to human life. Firstly, the application scenarios of a smart home are analyzed, how the intelligent functions in the home are realized intelligently, and the virtual reality technology is used to express intelligence [14, 15]. Therefore, this simulation system combines 3D modeling, from the user’s point of view, and uses virtual reality technology to achieve a 3D demonstration of some functions of the smart home [16] control system. When the user clicks the relevant button, the simulation system will make a corresponding control response. Relying on ordinary residential quarters, this study takes the real simulation of the surrounding environment as the premise, fully excavates the basic needs of the residents as the criterion, fully demonstrates the convenience brought by the home to human beings, and completes a virtual simulation of a smart home with basic function demonstration system [17]. There are also many personalized smart home control methods, and the demonstration platform can be customized according to the user’s DIY.This study uses three-dimensional modeling technology, taking residential quarters as an example, to study the technology of a home simulation system. By collecting data and using SketchUp software to build and optimize the model of the simulation system, a realistic home scene model is constructed. The comprehensive use of the Unity3D rendering engine, combined with the virtual simulation system technology, realizes the intelligent simulation of the internal functions of the home, allowing users to feel the convenience brought by real smart home control on the computer [18]. The simulation system is easy to carry and provides convenience for smart home publicity, and at the same time, compared with the previous home control physical equipment, the simulation system costs less. This simulation system gives full play to the interactivity and autonomy of the 3D visual simulation technology in virtual reality and makes full use of the Unity3D rendering engine combined with the built-in ShaderLab shading language to further improve the rendering effect, creating a more realistic day, night, and indoor and outdoor effects. It improves the user’s sense of immersion and simulates various intelligent control functions in the home.Our work mainly studies the design of the smart home system, by analyzing the architecture of computer technology and the main features of its technology.


## 2. Overall Function Design of the System

### 2.1. Simulation System Function Design

To realize the personalized home design, the choice of various types of units, and hardcover rooms, this study proposes a home simulation display system based on virtual reality. The system realizes the roaming display, UI interaction, and scene switching of the rough house and DIY design, as shown in Figure1. For DIY design, personalized home design can be achieved by implementing functions such as home object interaction, handle prompts, furniture placement, and floor material switching. The establishment of the smart home virtual simulation system [19, 20] has three macroscopic tasks: (1) the planning and construction of the entire scene environment; (2) the interactive realization of indoor scenes; and (3) the interactive realization of outdoor scenes. The 3D scene model is realized by modeling software; the 3D engine design realizes the interactive roaming of indoor and outdoor scenes and the demonstration of indoor home functions. The design of the entire simulation system follows the waterfall model, which is gradually refined from top to bottom. Figure 1 shows the overall functional architecture of the system.Figure 1
Overall functional architecture of the system.The specific function design of each module is as follows: (1) the basic unit type module realizes the roaming display, UI interaction, and multi-scene switching of the home, and the user can realize the roaming by operating the handle. The purpose of this function is to achieve a global view of the layout of the house and use the UI menu to interact with the details of the home. (2) The self-service design module realizes the functions of personalized home design and user-independent switching of furniture and floor materials, object highlight display, and teleportation. As can be seen from the above figure, the simulation system mainly designs and realizes core functions such as intelligent simulation of internal components of the home in the virtual home scene, interactive roaming of the virtual scene, and dynamic simulation of the work of the housing pipeline.


### 2.2. Technical Process of Simulation System Implementation

The entire scene technical process mainly consists of three modules: data acquisition, SketchUp modeling, and Unity3D rendering. Firstly, the collected data are abstracted, the scene is set and planned, the house base map is made in AutoCAD, and the scene model is constructed using virtual modeling technology, material, and texture. After that, the construction of the simulation scene is improved in Unity3D, the required special effects are added to the environment, the virtual roaming of the scene is realized, and the program design simulation of the simulation system production is carried out for the functional demonstration in the home, and finally, the real-time rendering of the virtual environment is realized to complete the whole process. Figure2 is a block diagram of the system technology roadmap.Figure 2
System technology roadblock diagram.The technical route of design and implementation of a smart home virtual simulation system is as follows:(1)
Carrying out the overall design and planning of the scene, building indoor and outdoor virtual environment models, and determining the scale, implementation route, and development tools of the simulation system development scene(2)
Planning the area of the terrain; dividing the terrain area, the road interval, the number of street lamps, and the interval between the lamps; and setting the placement position of the home(3)
The construction of the entire scene, the setting of light effects, the simulation of the natural environment, the construction of indoor object models, etc(4)
The optimization, grouping, importing, and exporting preprocessing of 3D model to realize roaming interactive system(5)
Adding sky effects, light sources, trees, fountains, fallen leaves, sun halo, and other environmental special effects to the virtual scene in the Unity3D engine; setting the roaming mode; and realizing the interactive control operation of the home and indoor household facilities


### 2.3. Selection of System Development Tools

The basis for the establishment of the entire simulation system is the model, and the quality of the model will affect the efficiency of the entire simulation system, so the establishment of the model is very important. At present, in the 3D simulation system, macroscopically, the modeling methods can be divided into two types: preprocessing modeling and real-time modeling. Microscopically, it can be divided into three types: the first is to use 3D software to model; the second is to measure and model through instruments and equipment; and the third is to use images or videos to model.(1)
Using 3D Software to Model. You can see many excellent modeling software packages in the market, and the more well-known ones are 3D Max, SketchUp, Maya, and AutoCAD. The basic operations are to construct complex geometric scenes by rotating, extruding, stretching, or doing Boolean operations on the solid model. Using modeling software to build 3D models mainly includes geometric modeling, kinematic modeling, physical modeling, object behavior, and model segmentation.(2)
Modeling with Instruments. 3D scanner is also known as 3D digitizer. It is a device used to analyze a real-world object or environment to gather data on its shape and possibly its appearance (e.g., color). The collected real stereo color data will be used to convert into digital signals that can be recognized by computers, which can then be used to build digital 3D models.(3)
Modeling Based on Images or Videos. Image-based modeling and rendering (IBMR), referred to as IBMR, is a super-active research field in the current computer graphics community. Using IBMR technology, the information provided by the image is expressed by a three-dimensional model, which makes the entire transformation process convenient and fast.


#### 2.3.1. Selection of Modeling Software

(1) SketchUp. The elegance and ease of traditional pencil sketches and the speed and flexibility of modern digital technology are perfectly combined by SketchUp Master. Master Sketcher is completely different from how we usually let the design process match the software too much, and it was specially developed to match our design process. In the design process, we are usually used to start from an inaccurate scale and proportion to start the overall thinking and continue to add details as the thinking progresses. Of course, if you need to, you can easily and quickly make precise drawings. Unlike CAD, which is difficult to modify, Sketch Master allows us to easily solve various modifications that occur throughout the design process according to design goals. Figure 3 shows SketchUp modeling example diagram.Figure 3
SketchUp modeling example diagram.(2) Blender. Blender is a free and open-source 3D graphics and image software that provides a series of animated short film production solutions from modeling, animation, material, and rendering, to audio processing, video editing, etc. Blender has a variety of user interfaces that are easy to use in different jobs and has built-in advanced film and television solutions such as green screen keying, camera reverse tracking, mask processing, and post-junction compositing. Figure 4 is the logo of blender.Figure 4
Logo of blender.


### 2.4. Realization of Function Display of Custom Home

To achieve an immersive user experience effect, this study uses HTC Vive equipment to build a workstation and combines VR technology to realize the basic unit module and DIY design module. The specific implementation process includes four stages: resource collection and production, environment deployment, application development, and release testing. The specific operation details of each stage are shown in Figure5.Figure 5
System implementation details.


## 2.1. Simulation System Function Design

To realize the personalized home design, the choice of various types of units, and hardcover rooms, this study proposes a home simulation display system based on virtual reality. The system realizes the roaming display, UI interaction, and scene switching of the rough house and DIY design, as shown in Figure1. For DIY design, personalized home design can be achieved by implementing functions such as home object interaction, handle prompts, furniture placement, and floor material switching. The establishment of the smart home virtual simulation system [19, 20] has three macroscopic tasks: (1) the planning and construction of the entire scene environment; (2) the interactive realization of indoor scenes; and (3) the interactive realization of outdoor scenes. The 3D scene model is realized by modeling software; the 3D engine design realizes the interactive roaming of indoor and outdoor scenes and the demonstration of indoor home functions. The design of the entire simulation system follows the waterfall model, which is gradually refined from top to bottom. Figure 1 shows the overall functional architecture of the system.Figure 1
Overall functional architecture of the system.The specific function design of each module is as follows: (1) the basic unit type module realizes the roaming display, UI interaction, and multi-scene switching of the home, and the user can realize the roaming by operating the handle. The purpose of this function is to achieve a global view of the layout of the house and use the UI menu to interact with the details of the home. (2) The self-service design module realizes the functions of personalized home design and user-independent switching of furniture and floor materials, object highlight display, and teleportation. As can be seen from the above figure, the simulation system mainly designs and realizes core functions such as intelligent simulation of internal components of the home in the virtual home scene, interactive roaming of the virtual scene, and dynamic simulation of the work of the housing pipeline.


## 2.2. Technical Process of Simulation System Implementation

The entire scene technical process mainly consists of three modules: data acquisition, SketchUp modeling, and Unity3D rendering. Firstly, the collected data are abstracted, the scene is set and planned, the house base map is made in AutoCAD, and the scene model is constructed using virtual modeling technology, material, and texture. After that, the construction of the simulation scene is improved in Unity3D, the required special effects are added to the environment, the virtual roaming of the scene is realized, and the program design simulation of the simulation system production is carried out for the functional demonstration in the home, and finally, the real-time rendering of the virtual environment is realized to complete the whole process. Figure2 is a block diagram of the system technology roadmap.Figure 2
System technology roadblock diagram.The technical route of design and implementation of a smart home virtual simulation system is as follows:(1)
Carrying out the overall design and planning of the scene, building indoor and outdoor virtual environment models, and determining the scale, implementation route, and development tools of the simulation system development scene(2)
Planning the area of the terrain; dividing the terrain area, the road interval, the number of street lamps, and the interval between the lamps; and setting the placement position of the home(3)
The construction of the entire scene, the setting of light effects, the simulation of the natural environment, the construction of indoor object models, etc(4)
The optimization, grouping, importing, and exporting preprocessing of 3D model to realize roaming interactive system(5)
Adding sky effects, light sources, trees, fountains, fallen leaves, sun halo, and other environmental special effects to the virtual scene in the Unity3D engine; setting the roaming mode; and realizing the interactive control operation of the home and indoor household facilities


## 2.3. Selection of System Development Tools

The basis for the establishment of the entire simulation system is the model, and the quality of the model will affect the efficiency of the entire simulation system, so the establishment of the model is very important. At present, in the 3D simulation system, macroscopically, the modeling methods can be divided into two types: preprocessing modeling and real-time modeling. Microscopically, it can be divided into three types: the first is to use 3D software to model; the second is to measure and model through instruments and equipment; and the third is to use images or videos to model.(1)
Using 3D Software to Model. You can see many excellent modeling software packages in the market, and the more well-known ones are 3D Max, SketchUp, Maya, and AutoCAD. The basic operations are to construct complex geometric scenes by rotating, extruding, stretching, or doing Boolean operations on the solid model. Using modeling software to build 3D models mainly includes geometric modeling, kinematic modeling, physical modeling, object behavior, and model segmentation.(2)
Modeling with Instruments. 3D scanner is also known as 3D digitizer. It is a device used to analyze a real-world object or environment to gather data on its shape and possibly its appearance (e.g., color). The collected real stereo color data will be used to convert into digital signals that can be recognized by computers, which can then be used to build digital 3D models.(3)
Modeling Based on Images or Videos. Image-based modeling and rendering (IBMR), referred to as IBMR, is a super-active research field in the current computer graphics community. Using IBMR technology, the information provided by the image is expressed by a three-dimensional model, which makes the entire transformation process convenient and fast.


### 2.3.1. Selection of Modeling Software

(1) SketchUp. The elegance and ease of traditional pencil sketches and the speed and flexibility of modern digital technology are perfectly combined by SketchUp Master. Master Sketcher is completely different from how we usually let the design process match the software too much, and it was specially developed to match our design process. In the design process, we are usually used to start from an inaccurate scale and proportion to start the overall thinking and continue to add details as the thinking progresses. Of course, if you need to, you can easily and quickly make precise drawings. Unlike CAD, which is difficult to modify, Sketch Master allows us to easily solve various modifications that occur throughout the design process according to design goals. Figure 3 shows SketchUp modeling example diagram.Figure 3
SketchUp modeling example diagram.(2) Blender. Blender is a free and open-source 3D graphics and image software that provides a series of animated short film production solutions from modeling, animation, material, and rendering, to audio processing, video editing, etc. Blender has a variety of user interfaces that are easy to use in different jobs and has built-in advanced film and television solutions such as green screen keying, camera reverse tracking, mask processing, and post-junction compositing. Figure 4 is the logo of blender.Figure 4
Logo of blender.


## 2.3.1. Selection of Modeling Software

(1) SketchUp. The elegance and ease of traditional pencil sketches and the speed and flexibility of modern digital technology are perfectly combined by SketchUp Master. Master Sketcher is completely different from how we usually let the design process match the software too much, and it was specially developed to match our design process. In the design process, we are usually used to start from an inaccurate scale and proportion to start the overall thinking and continue to add details as the thinking progresses. Of course, if you need to, you can easily and quickly make precise drawings. Unlike CAD, which is difficult to modify, Sketch Master allows us to easily solve various modifications that occur throughout the design process according to design goals. Figure 3 shows SketchUp modeling example diagram.Figure 3
SketchUp modeling example diagram.(2) Blender. Blender is a free and open-source 3D graphics and image software that provides a series of animated short film production solutions from modeling, animation, material, and rendering, to audio processing, video editing, etc. Blender has a variety of user interfaces that are easy to use in different jobs and has built-in advanced film and television solutions such as green screen keying, camera reverse tracking, mask processing, and post-junction compositing. Figure 4 is the logo of blender.Figure 4
Logo of blender.


## 2.4. Realization of Function Display of Custom Home

To achieve an immersive user experience effect, this study uses HTC Vive equipment to build a workstation and combines VR technology to realize the basic unit module and DIY design module. The specific implementation process includes four stages: resource collection and production, environment deployment, application development, and release testing. The specific operation details of each stage are shown in Figure5.Figure 5
System implementation details.


## 3. Design and Implementation of the System Model

### 3.1. System Design

The design of smart home system [21] is mainly composed of security protection function, intelligent control of household appliances, and network communication. Various system operations are carried out by the intelligent security module, equipment control module, and wireless transmission module, respectively. The network communication is based on the wireless transmission module. Through the AP mode, the computer, mobile phone, and other devices can control the current mode. The intelligent control of home appliances is to use voice recognition to issue professional instructions to the system first and then control the operation of each system through the matrix keyboard. In terms of safety precautions, technologies such as video capture and human body detection are applied. When a human body passes by, the human body detection template will run immediately, turn on the camera, monitor the behavior and movements of people in the house at all times, save the data information, and transfer the picture to the mobile phone for mobile terminal.


#### 3.1.1. System Hardware Design

In terms of system hardware design, the STM32 development platform is used as the core control of the system, the cloud platform provided by China Mobile and the wireless communication Wi-Fi technology is used as the communication medium, and temperature and humidity, flame sensors, and photosensitive sensors are mainly used in sensing nodes, smoke sensors, and other devices, collecting home environment information in real time, and displaying relevant data through display devices; at the same time, the system controls and links home devices through multiple relays.The system adopts STM32F103 chip as the main controller, and its minimum system consists of power supply circuit, reset circuit, and crystal oscillator circuit. For the reset circuit, when the system is powered on, due to the existence of the capacitor, the NRST is at a low level. When the capacitor is fully charged, the reset pin (NRST) is at a high level, and the system works normally. After this pin is grounded, the system forms a manual reset. For the crystal oscillator circuit, the internal and external crystal oscillators can be switched, and the system is connected to an external 8 MHz crystal oscillator and a 32.768 kHz crystal oscillator, and the highest frequency multiplier of the system is 72 MHz.Considering that the system hardware devices are relatively complex and the number is large, this article only introduces some of the hardware. In the display terminal, the hardware design method of the IIC protocol is adopted. Compared with the design of the SPI protocol, this design method reduces the general IO ports of the system and saves hardware resources; in the control terminal, considering that the operating voltage of the system is inconsistent with the operating voltage of hardware devices such as relays. A level converter is designed through the LM393 chip to solve the misjudgment phenomenon caused by inconsistent levels between devices; at the sensing terminal, each sensor node retains direct output (0-1) and analog output The interface is convenient for system calls; in the transmission terminal, the Wi-Fi module of the ATK-ESP8266 model is chosen, which has fast transmission speed and stable network and only needs to keep two data interfaces and two power interfaces to work.


#### 3.1.2. System Software Design

In the software design of this system, it is mainly divided into sensor information collection at the perception layer, information transmission at the network layer, and multichannel relay control and data display at the application layer. Finally, the data obtained by the system are processed through a normalization algorithm.In the design of the main program of the system, the sensor module, display module, control module, communication module, etc., used in the system are first initialized. After the initialization is completed, it is connected to the cloud platform. When connected to the cloud platform, the system will sense that the data of the layer are uploaded to the cloud platform in real time and judged. If there is an abnormality, the system will activate the alarm function. At the same time, the user can issue commands through the cloud platform to control the home equipment and upload the status of the home equipment in real time.In the wireless communication node, the Wi-Fi module is mainly to perform related mode initialization settings. After the settings are completed, a TCP connection is established with the cloud platform. When the system is connected to the cloud platform, operations such as data uploading and command issuance can be performed.After the data processing completes the collection of monitoring information, the collected information is preprocessed and classified, and finally, the processed information is learned, the most suitable processing method is calculated, and the data are sent to the user through the PTZ. According to the characteristics of smart home diversity, the data are monitored in a direct and normalized way.The collected data are classified and processed by MATLAB software, various types of data are represented by graphs, and the size of the collected data and whether it is abnormal can be seen intuitively. At the same time, to ensure that abnormal information can be monitored and pushed to users, the data are analyzed through a normalization algorithm inside the system.


### 3.2. System Implementation

Nowadays, computer technology and 5G technology are becoming more and more mature, and high technology has gradually been integrated into people’s daily life. As an important way to implement computer technology, smart home system is mainly reflected in the three aspects of upper computer, lower computer, and terminal control, as shown in Figure6.Figure 6
Schematic diagram of remote control template.


#### 3.2.1. Host Computer Level

The host computer level includes data interaction, front-end control, Web page control module, and app control module. The back-end Django technology and the front-end Vue.js technology are used to complete Web page development. Being able to produce API objects helps to reduce the complexity of background management. Window + Frame + Html code is used to implement control, and finally, the communication between the server and API.Ajax is realized, and the information is transmitted to the cloud SVN/GIT server.


#### 3.2.2. Lower Computer Level

The lower computer is composed of a wireless transmission module, manual control module, voice playback module, backup power module, and other components. The single-chip system module is mainly implemented by the STM32F103VET6 single-chip microcomputer, and the voice playback module is completed by the most advanced iFLYTEK module, which constitutes the XFS5152-TTS voice synthesis module. The voice system is controlled. The speech recognition module is based on the Micro Snow LD3320 speech recognition module. The chip used is produced and designed by a specific company. This chip can run independently without the help of other chips. The equipment control module can reasonably control items such as doors and curtains. The driving stepper motor is very different from the voice recognition system. It uses the TB6600HG chip. The construction process of this chip is very complicated, and the current can reach 5 A. The driver has 5 subdivision modes, such as 1/16, 1/81, and 1/1, which can work stably in any environment. The manual control module uses matrix keys, and the keyboard module is mainly based on the 4 × 4 scale of external expansion and in-line keys, which is more stable than other keys.


#### 3.2.3. Terminal Control

The terminal control module consists of a TFT LCD. It is the main project of ALIENTEK. It has the characteristics of wide viewing angle and low consumption. It can work at ultralow temperature. It can also collect humidity data, light intensity, and air quality in the air through the display camera, which is conducive to user perception.The system selects the XFS5152-TTS voice module, which can synthesize Chinese and English voices, as well as play and record functions. The stepper motor is driven by a PWM constant current bipolar sine wave micro-stepper motor to drive a single chip, which has a reset function and a standby function, which can protect the parts due to built-in overheating in time. AP mode is like a mobile phone hotspot function, any Wi-Fi-related device can be connected, and it has a lot in common with the network bottom device mode. In this system, ESP8266 mainly uses the USART3 carrier to maintain communication with the microcontroller. It can also use the SSID mode and UDP broadcast mode of the mobile phone Wi-Fi terminal to broadcast. The broadcast uses the ESP8266 module, which can be directly connected to the router to keep the entire network unobstructed, which is conducive to remote control through mobile phones. In addition, the system has upgraded the sensitivity control system and safety protection system. In terms of energy, a backup power supply is added, which is usually used to save data and instructions that have not been saved in time when an unexpected power failure occurs. In terms of antitheft prevention, it not only designs traditional image monitoring technology but also incorporates the latest infrared detection technology and gravity sensing technology. All residential door locks are equipped with face recognition technology, which is convenient for users to enter while saving the traditional key to open the door. In addition, an infrared receiving module and an infrared transmitting module are set above the door panel and on the top ceiling. These two modules are directly connected to the door lock switch. When the door lock is normally opened, the infrared detector will be turned off for a period of time. It will not be activated until the resident reenters, and then, it will enter a state of 24/7 persistent monitoring. If nonresident personnel enter, it is illegal entry, and then, the two infrared modules will not be closed normally. When the door panel is pushed open by an external force, it will directly trigger the security system and issue a special alarm to remind the residents. At the exposed windows of the residence, an infrared detection module is also set up and connected to the alarm system. In addition to the infrared technology in the doors and windows, a gravity sensing system is also placed on the indoor floor to form an all-around protection for the house. When a serious change in gravity is detected, the alarm system will be automatically triggered. The wireless technology module can control the communication Web page in a remote way and can realize remote control on the intelligent terminal.


## 3.1. System Design

The design of smart home system [21] is mainly composed of security protection function, intelligent control of household appliances, and network communication. Various system operations are carried out by the intelligent security module, equipment control module, and wireless transmission module, respectively. The network communication is based on the wireless transmission module. Through the AP mode, the computer, mobile phone, and other devices can control the current mode. The intelligent control of home appliances is to use voice recognition to issue professional instructions to the system first and then control the operation of each system through the matrix keyboard. In terms of safety precautions, technologies such as video capture and human body detection are applied. When a human body passes by, the human body detection template will run immediately, turn on the camera, monitor the behavior and movements of people in the house at all times, save the data information, and transfer the picture to the mobile phone for mobile terminal.


### 3.1.1. System Hardware Design

In terms of system hardware design, the STM32 development platform is used as the core control of the system, the cloud platform provided by China Mobile and the wireless communication Wi-Fi technology is used as the communication medium, and temperature and humidity, flame sensors, and photosensitive sensors are mainly used in sensing nodes, smoke sensors, and other devices, collecting home environment information in real time, and displaying relevant data through display devices; at the same time, the system controls and links home devices through multiple relays.The system adopts STM32F103 chip as the main controller, and its minimum system consists of power supply circuit, reset circuit, and crystal oscillator circuit. For the reset circuit, when the system is powered on, due to the existence of the capacitor, the NRST is at a low level. When the capacitor is fully charged, the reset pin (NRST) is at a high level, and the system works normally. After this pin is grounded, the system forms a manual reset. For the crystal oscillator circuit, the internal and external crystal oscillators can be switched, and the system is connected to an external 8 MHz crystal oscillator and a 32.768 kHz crystal oscillator, and the highest frequency multiplier of the system is 72 MHz.Considering that the system hardware devices are relatively complex and the number is large, this article only introduces some of the hardware. In the display terminal, the hardware design method of the IIC protocol is adopted. Compared with the design of the SPI protocol, this design method reduces the general IO ports of the system and saves hardware resources; in the control terminal, considering that the operating voltage of the system is inconsistent with the operating voltage of hardware devices such as relays. A level converter is designed through the LM393 chip to solve the misjudgment phenomenon caused by inconsistent levels between devices; at the sensing terminal, each sensor node retains direct output (0-1) and analog output The interface is convenient for system calls; in the transmission terminal, the Wi-Fi module of the ATK-ESP8266 model is chosen, which has fast transmission speed and stable network and only needs to keep two data interfaces and two power interfaces to work.


### 3.1.2. System Software Design

In the software design of this system, it is mainly divided into sensor information collection at the perception layer, information transmission at the network layer, and multichannel relay control and data display at the application layer. Finally, the data obtained by the system are processed through a normalization algorithm.In the design of the main program of the system, the sensor module, display module, control module, communication module, etc., used in the system are first initialized. After the initialization is completed, it is connected to the cloud platform. When connected to the cloud platform, the system will sense that the data of the layer are uploaded to the cloud platform in real time and judged. If there is an abnormality, the system will activate the alarm function. At the same time, the user can issue commands through the cloud platform to control the home equipment and upload the status of the home equipment in real time.In the wireless communication node, the Wi-Fi module is mainly to perform related mode initialization settings. After the settings are completed, a TCP connection is established with the cloud platform. When the system is connected to the cloud platform, operations such as data uploading and command issuance can be performed.After the data processing completes the collection of monitoring information, the collected information is preprocessed and classified, and finally, the processed information is learned, the most suitable processing method is calculated, and the data are sent to the user through the PTZ. According to the characteristics of smart home diversity, the data are monitored in a direct and normalized way.The collected data are classified and processed by MATLAB software, various types of data are represented by graphs, and the size of the collected data and whether it is abnormal can be seen intuitively. At the same time, to ensure that abnormal information can be monitored and pushed to users, the data are analyzed through a normalization algorithm inside the system.


## 3.1.1. System Hardware Design

In terms of system hardware design, the STM32 development platform is used as the core control of the system, the cloud platform provided by China Mobile and the wireless communication Wi-Fi technology is used as the communication medium, and temperature and humidity, flame sensors, and photosensitive sensors are mainly used in sensing nodes, smoke sensors, and other devices, collecting home environment information in real time, and displaying relevant data through display devices; at the same time, the system controls and links home devices through multiple relays.The system adopts STM32F103 chip as the main controller, and its minimum system consists of power supply circuit, reset circuit, and crystal oscillator circuit. For the reset circuit, when the system is powered on, due to the existence of the capacitor, the NRST is at a low level. When the capacitor is fully charged, the reset pin (NRST) is at a high level, and the system works normally. After this pin is grounded, the system forms a manual reset. For the crystal oscillator circuit, the internal and external crystal oscillators can be switched, and the system is connected to an external 8 MHz crystal oscillator and a 32.768 kHz crystal oscillator, and the highest frequency multiplier of the system is 72 MHz.Considering that the system hardware devices are relatively complex and the number is large, this article only introduces some of the hardware. In the display terminal, the hardware design method of the IIC protocol is adopted. Compared with the design of the SPI protocol, this design method reduces the general IO ports of the system and saves hardware resources; in the control terminal, considering that the operating voltage of the system is inconsistent with the operating voltage of hardware devices such as relays. A level converter is designed through the LM393 chip to solve the misjudgment phenomenon caused by inconsistent levels between devices; at the sensing terminal, each sensor node retains direct output (0-1) and analog output The interface is convenient for system calls; in the transmission terminal, the Wi-Fi module of the ATK-ESP8266 model is chosen, which has fast transmission speed and stable network and only needs to keep two data interfaces and two power interfaces to work.


## 3.1.2. System Software Design

In the software design of this system, it is mainly divided into sensor information collection at the perception layer, information transmission at the network layer, and multichannel relay control and data display at the application layer. Finally, the data obtained by the system are processed through a normalization algorithm.In the design of the main program of the system, the sensor module, display module, control module, communication module, etc., used in the system are first initialized. After the initialization is completed, it is connected to the cloud platform. When connected to the cloud platform, the system will sense that the data of the layer are uploaded to the cloud platform in real time and judged. If there is an abnormality, the system will activate the alarm function. At the same time, the user can issue commands through the cloud platform to control the home equipment and upload the status of the home equipment in real time.In the wireless communication node, the Wi-Fi module is mainly to perform related mode initialization settings. After the settings are completed, a TCP connection is established with the cloud platform. When the system is connected to the cloud platform, operations such as data uploading and command issuance can be performed.After the data processing completes the collection of monitoring information, the collected information is preprocessed and classified, and finally, the processed information is learned, the most suitable processing method is calculated, and the data are sent to the user through the PTZ. According to the characteristics of smart home diversity, the data are monitored in a direct and normalized way.The collected data are classified and processed by MATLAB software, various types of data are represented by graphs, and the size of the collected data and whether it is abnormal can be seen intuitively. At the same time, to ensure that abnormal information can be monitored and pushed to users, the data are analyzed through a normalization algorithm inside the system.


## 3.2. System Implementation

Nowadays, computer technology and 5G technology are becoming more and more mature, and high technology has gradually been integrated into people’s daily life. As an important way to implement computer technology, smart home system is mainly reflected in the three aspects of upper computer, lower computer, and terminal control, as shown in Figure6.Figure 6
Schematic diagram of remote control template.


### 3.2.1. Host Computer Level

The host computer level includes data interaction, front-end control, Web page control module, and app control module. The back-end Django technology and the front-end Vue.js technology are used to complete Web page development. Being able to produce API objects helps to reduce the complexity of background management. Window + Frame + Html code is used to implement control, and finally, the communication between the server and API.Ajax is realized, and the information is transmitted to the cloud SVN/GIT server.


### 3.2.2. Lower Computer Level

The lower computer is composed of a wireless transmission module, manual control module, voice playback module, backup power module, and other components. The single-chip system module is mainly implemented by the STM32F103VET6 single-chip microcomputer, and the voice playback module is completed by the most advanced iFLYTEK module, which constitutes the XFS5152-TTS voice synthesis module. The voice system is controlled. The speech recognition module is based on the Micro Snow LD3320 speech recognition module. The chip used is produced and designed by a specific company. This chip can run independently without the help of other chips. The equipment control module can reasonably control items such as doors and curtains. The driving stepper motor is very different from the voice recognition system. It uses the TB6600HG chip. The construction process of this chip is very complicated, and the current can reach 5 A. The driver has 5 subdivision modes, such as 1/16, 1/81, and 1/1, which can work stably in any environment. The manual control module uses matrix keys, and the keyboard module is mainly based on the 4 × 4 scale of external expansion and in-line keys, which is more stable than other keys.


### 3.2.3. Terminal Control

The terminal control module consists of a TFT LCD. It is the main project of ALIENTEK. It has the characteristics of wide viewing angle and low consumption. It can work at ultralow temperature. It can also collect humidity data, light intensity, and air quality in the air through the display camera, which is conducive to user perception.The system selects the XFS5152-TTS voice module, which can synthesize Chinese and English voices, as well as play and record functions. The stepper motor is driven by a PWM constant current bipolar sine wave micro-stepper motor to drive a single chip, which has a reset function and a standby function, which can protect the parts due to built-in overheating in time. AP mode is like a mobile phone hotspot function, any Wi-Fi-related device can be connected, and it has a lot in common with the network bottom device mode. In this system, ESP8266 mainly uses the USART3 carrier to maintain communication with the microcontroller. It can also use the SSID mode and UDP broadcast mode of the mobile phone Wi-Fi terminal to broadcast. The broadcast uses the ESP8266 module, which can be directly connected to the router to keep the entire network unobstructed, which is conducive to remote control through mobile phones. In addition, the system has upgraded the sensitivity control system and safety protection system. In terms of energy, a backup power supply is added, which is usually used to save data and instructions that have not been saved in time when an unexpected power failure occurs. In terms of antitheft prevention, it not only designs traditional image monitoring technology but also incorporates the latest infrared detection technology and gravity sensing technology. All residential door locks are equipped with face recognition technology, which is convenient for users to enter while saving the traditional key to open the door. In addition, an infrared receiving module and an infrared transmitting module are set above the door panel and on the top ceiling. These two modules are directly connected to the door lock switch. When the door lock is normally opened, the infrared detector will be turned off for a period of time. It will not be activated until the resident reenters, and then, it will enter a state of 24/7 persistent monitoring. If nonresident personnel enter, it is illegal entry, and then, the two infrared modules will not be closed normally. When the door panel is pushed open by an external force, it will directly trigger the security system and issue a special alarm to remind the residents. At the exposed windows of the residence, an infrared detection module is also set up and connected to the alarm system. In addition to the infrared technology in the doors and windows, a gravity sensing system is also placed on the indoor floor to form an all-around protection for the house. When a serious change in gravity is detected, the alarm system will be automatically triggered. The wireless technology module can control the communication Web page in a remote way and can realize remote control on the intelligent terminal.


## 3.2.1. Host Computer Level

The host computer level includes data interaction, front-end control, Web page control module, and app control module. The back-end Django technology and the front-end Vue.js technology are used to complete Web page development. Being able to produce API objects helps to reduce the complexity of background management. Window + Frame + Html code is used to implement control, and finally, the communication between the server and API.Ajax is realized, and the information is transmitted to the cloud SVN/GIT server.


## 3.2.2. Lower Computer Level

The lower computer is composed of a wireless transmission module, manual control module, voice playback module, backup power module, and other components. The single-chip system module is mainly implemented by the STM32F103VET6 single-chip microcomputer, and the voice playback module is completed by the most advanced iFLYTEK module, which constitutes the XFS5152-TTS voice synthesis module. The voice system is controlled. The speech recognition module is based on the Micro Snow LD3320 speech recognition module. The chip used is produced and designed by a specific company. This chip can run independently without the help of other chips. The equipment control module can reasonably control items such as doors and curtains. The driving stepper motor is very different from the voice recognition system. It uses the TB6600HG chip. The construction process of this chip is very complicated, and the current can reach 5 A. The driver has 5 subdivision modes, such as 1/16, 1/81, and 1/1, which can work stably in any environment. The manual control module uses matrix keys, and the keyboard module is mainly based on the 4 × 4 scale of external expansion and in-line keys, which is more stable than other keys.


## 3.2.3. Terminal Control

The terminal control module consists of a TFT LCD. It is the main project of ALIENTEK. It has the characteristics of wide viewing angle and low consumption. It can work at ultralow temperature. It can also collect humidity data, light intensity, and air quality in the air through the display camera, which is conducive to user perception.The system selects the XFS5152-TTS voice module, which can synthesize Chinese and English voices, as well as play and record functions. The stepper motor is driven by a PWM constant current bipolar sine wave micro-stepper motor to drive a single chip, which has a reset function and a standby function, which can protect the parts due to built-in overheating in time. AP mode is like a mobile phone hotspot function, any Wi-Fi-related device can be connected, and it has a lot in common with the network bottom device mode. In this system, ESP8266 mainly uses the USART3 carrier to maintain communication with the microcontroller. It can also use the SSID mode and UDP broadcast mode of the mobile phone Wi-Fi terminal to broadcast. The broadcast uses the ESP8266 module, which can be directly connected to the router to keep the entire network unobstructed, which is conducive to remote control through mobile phones. In addition, the system has upgraded the sensitivity control system and safety protection system. In terms of energy, a backup power supply is added, which is usually used to save data and instructions that have not been saved in time when an unexpected power failure occurs. In terms of antitheft prevention, it not only designs traditional image monitoring technology but also incorporates the latest infrared detection technology and gravity sensing technology. All residential door locks are equipped with face recognition technology, which is convenient for users to enter while saving the traditional key to open the door. In addition, an infrared receiving module and an infrared transmitting module are set above the door panel and on the top ceiling. These two modules are directly connected to the door lock switch. When the door lock is normally opened, the infrared detector will be turned off for a period of time. It will not be activated until the resident reenters, and then, it will enter a state of 24/7 persistent monitoring. If nonresident personnel enter, it is illegal entry, and then, the two infrared modules will not be closed normally. When the door panel is pushed open by an external force, it will directly trigger the security system and issue a special alarm to remind the residents. At the exposed windows of the residence, an infrared detection module is also set up and connected to the alarm system. In addition to the infrared technology in the doors and windows, a gravity sensing system is also placed on the indoor floor to form an all-around protection for the house. When a serious change in gravity is detected, the alarm system will be automatically triggered. The wireless technology module can control the communication Web page in a remote way and can realize remote control on the intelligent terminal.


## 4. System Implementation and Testing

Since the VR-based virtual reality home simulation system has certain requirements on software and hardware, this article uses HTC Vive equipment to build a workstation and uses the following development environment and tools to realize the functions of each module of the system. The system environment is as follows: Windows 10, 64-bit system, Nvidia GeForce GTX 1080 GPU, and IntelⓇ Core(TM) i7-7700 CPU, VR development kit is DOTween (HOTween v2) 1.1.640, Virtual Reality Toolkit 3.2.1, and SteamVR Plugin 1.2.3.Figure7 is a visual display of the point cloud data collected by the device in this study. Figure 8 shows the results obtained after modeling the set of point cloud data.Figure 7
Point cloud data collected by the device.Figure 8
Modeling results.This study also implements user-defined interactive operations and implementation effects, as shown in Figure9. Users can interact with the movement, zoom, and holographic projection of the modeling results.Figure 9
User interaction results.
(a)(b)To verify the effectiveness of the model optimization in this study, Table1 shows the computation time and memory occupied by the algorithm before and after model optimization. As can be seen from Table 1, the optimization can significantly save memory and reduce computation time.Table 1
Comparison of computational events and memory occupied by algorithms before and after optimization of different models.
NumberModelMemory footprint (MB)Elapsed time (s)1Before optimization5481.62After optimization4171.052Before optimization4331.24After optimization3590.873Before optimization8451.97After optimization7661.84


## 5. Conclusion

This study proposes a computer-based smart home [21] simulation display system to achieve personalized home design, diverse unit types, and decoration choices. The system uses the interface function module to realize the interaction between the system and the user and adopts the basic apartment type roaming module to realize the apartment type roaming function, and the hardcover model room display module provides the user’s self-service design function. The scene rendering function, handle prompt, home placement, and floor material switching based on HTC Vive show that the home display method designed in this study can not only provide users with an immersive virtual home effect experience but also has high drawing efficiency and operational low-cost advantage. To sum up, with the continuous popularization of information technology, computer technology has a huge space for development. It can connect with different items in an intelligent way and finally realize intelligent management and control. At the same time, the complete application of computer technology in smart homes can not only improve the safety of smart homes [22, 23] but also improve people’s quality of life. It completely breaks the space and time constraints of traditional home management, better improves the intelligent level of home life, and allows people to enjoy it more comfortably [24, 25].



---

*Source: 1620540-2022-08-25.xml*