The three-layer conceptual model of the Internet of Things has a wide influence. It is very helpful for understanding the difference between the Internet of Things and the Internet. However, when it comes to development, looking at the architecture of the Internet of Things from a physical perspective makes it easier to see the software modules and hardware modules that make up the Internet of Things system, and it is easier to understand how to architect and develop the Internet of Things system.
Here we abstract four most basic and typical physical models of IoT systems. In these models, the cloud represents all applications that will be deployed on the cloud in the IoT system; the end represents IoT objects, including hardware entities and the software deployed on them; App, specifically represents applications running on mobile phones or tablets, typically iOS applications, Android applications and Windows applications; Gateway, also known as network connector or protocol converter, is essentially a special terminal, but the gateway realizes network interconnection above the network layer and rarely undertakes application functions like terminals, so it is listed separately, also including hardware entities and the software deployed on them.
1. Cloud + Terminal Physical Model of IoT System
The cloud + terminal model means that the IoT system is divided into two parts: cloud platform and terminal. In fact, from a physical perspective, the IoT hierarchical model is also the cloud + terminal model, because the network layer is ultimately implemented as some terminal and cloud platform functions. This division ignores the function of the system and emphasizes the physical form. The cloud + terminal model is the simplest type of network.
1.1 Technical Implementation
The cloud platform needs to implement a BS-structured website for people to manage through web pages; the cloud platform also needs to implement a communication interface to communicate with objects.
Terminal refers to the IoT terminal. In a broad sense, IoT terminals also include mobile phones and computers. Similarly, directly connected IoT terminals should include sensors, computing units, storage devices, etc. in hardware to realize local business functions; they also need to be connected to the Internet through network cables, or connected to the Internet through 2G, 3G, 4G. In terms of software, the traditional client-server architecture development can meet the application requirements of most IoT systems.
1.2 Advantages and Disadvantages
The advantages of the cloud + terminal structure are simple structure, mature technology, and relatively simple system implementation. The disadvantages are also obvious: the terminal cost is high and it is difficult to deploy on a large scale; if wireless connection is used, it may incur high operating costs.
1.3 Applications and Examples
The first IoT device mentioned in the first chapter of this book is the Coke vending machine named “The Only”. Traditional larger embedded systems, such as wired devices represented by ATM machines, mobile devices represented by mobile POS machines, smart terminals represented by robots, and their corresponding application systems are all examples of this network structure.
2. Cloud+App+End triangle model of IoT system
With the development of smart phones and mobile Internet, people's lives have been greatly changed, and most industry applications have also been changed. Mobility has become an element that must be considered in the design of current application systems, and IoT systems are no exception.
Mobile apps are added as an indispensable part to the cloud + end model, thus evolving into a triangular model of cloud + app + end. The schematic diagram of the cloud + app + end model is as follows:
2.1 Technical Implementation
The development tools, knowledge and skills required for cloud, terminal and App are quite different and are usually divided into three parts for development.
In addition to considering the communication with the end part, the development of the cloud part also needs to consider the communication with the App. The development of the end may be simpler than the development of the end under the "cloud model" because of the existence of the App, some human-computer interaction functions can be transferred to the App for implementation. It is also a popular design to design the terminal as a "dumb" terminal with only very simple human-computer interaction, and most of the human-computer interaction functions are implemented on the App. The common development of the App is the application development under the IOS platform and the Android platform. The background is connected to the IoT cloud platform, and the App runs on the smartphone.
2.2 Advantages and Disadvantages
The advantages of the cloud + App + terminal model are that the structure is relatively simple and the technology is mature. With the addition of the App, complex functions that require high system resources can be placed on the App, and the human-computer interaction experience can also be designed better. At the same time, due to the reduction of resource consumption on the other end, the cost of the entire system may be lower than the "cloud model".
The disadvantages are: the system complexity is increased and the R&D cost is high; to ensure the real-time communication between the App and the end, as well as the security requirements, it is necessary to establish multiple interaction methods between the App and the end, such as QR code, RFID, Bluetooth communication, etc.
2.3 Applications and Examples
Please wait for examples to be introduced in subsequent articles.
3. The cloud + app + gateway + end model of the IoT system
Both the cloud + end model and the cloud + app + end triangle model have important shortcomings, that is, the end needs to communicate directly with the cloud platform. Current technical means require the end to be connected to the Internet through a network port, or through 2G/3G/4G and the Internet. The former has poor mobility, while the latter has high operation and maintenance costs, which is not conducive to the promotion of the system.
A better solution is to add a gateway to the system, through which the terminal communicates with the cloud platform, as shown in the part marked 1 in the figure below:
3.1 Technical Implementation
The biggest change in the cloud+app+gateway+end model is the addition of the gateway part.
The IoT gateway is usually designed as a "middleware" to connect terminals to the IoT. It can access the Internet through optical fiber, Ethernet, dial-up, WiFi or 2G/3G/4G, and connect to IoT terminals through WiFi, Bluetooth, ZigBee, carrier, 485 and other communication methods.
Therefore, communication function is the first function of the gateway. In addition, the IoT gateway often has message processing function, business processing function, etc. A complex IoT gateway is even a small server that runs relatively complex applications to independently support the normal operation of the terminal locally (within the local area network).
3.2 Advantages and Disadvantages
The addition of the gateway allows the terminal to connect to the Internet of Things through some short-range communication protocols, especially short-range wireless protocols such as Bluetooth, WiFi, etc., which can effectively reduce the terminal cost while improving the convenience of use and installation; in addition, the gateway establishes a small local area network within its short range, and the local terminals in the local area network can work together, which enriches the application functions of the Internet of Things. Of course, the benefits of the addition of the gateway are not limited to this. The gateway can also act as the computing center or server of the local area network to share the computing and storage functions of the terminal; it can even establish a hotspot and directly connect to the mobile phone, so that without connecting to the cloud server, the mobile phone application can also directly interact with the Internet of Things system of the local area network. As shown in Figure 2 above, the mobile phone can interact directly with the terminal.
Since the gateway plays an important role in the Internet of Things system, it is also considered an important entrance to the Internet of Things. Since 2010, the development of both traditional routers and new Internet of Things gateways has received high attention and has made great progress.
The disadvantage of the cloud + app + gateway + terminal model is that the development of the IoT system is relatively complex: it includes the development of both the local area network and the wide area network; the number of levels of the IoT system increases further, which challenges the overall performance of the system; finally, the IoT system begins to consider more the collaborative work of various terminals within the local area network, so the requirements become much more complicated.
3.3 Applications and Examples
The smart home system is a typical example of this model: the smart home system usually provides a variety of discrete sensors, such as infrared, temperature and humidity, smoke, etc.; and a variety of controllers, such as door magnets, switches, alarms, etc.; all terminals are connected to a home gateway; the home gateway always maintains a connection with the cloud platform; the smart home system is also equipped with a mobile app to facilitate users to remotely control the terminal and obtain terminal event messages.
There are many variations of the cloud + app + gateway + terminal model. For example, a smartphone can be used as a special gateway, and the terminal can be connected to the Internet of Things through the smartphone. Another example is that the gateway is a "sensing device" and the terminal is connected to the Internet of Things through sensing, etc.
Smartphones as special gateways
Smartphones are rich in resources and support a wide range of hardware, making them ideal gateways. The terminal can be a sensor or a physical object that includes a sensor, supplemented by a communication module; in terms of connection, it can be connected to the mobile phone using an audio cable or USB cable, or it can be connected to the mobile phone via Bluetooth or Wifi. In terms of software, the terminal must implement the processing of sensor data collection and the communication function with the mobile phone, while the mobile phone at least includes the corresponding communication function, terminal management, and as an agent of things, interacting with the cloud platform.
As a gateway, the
"sensing device" has only a temporary, non-fixed connection with the terminal. This feature allows the sensing device to access an unlimited number of terminals. An example implementation is that a sensor that can be sensed, such as an RFID tag, needs to be added to the terminal, and the corresponding reading device is added to the IoT gateway, so that a large number of terminals can be connected to the IoT. In the connection from the terminal to the gateway, the reading technology is such as radio frequency, infrared, etc. In the gateway software, the terminal reading, processing, and forwarding need to be implemented.
4. Sensor network model of IoT system
A sensor network is a network composed of sensor nodes, among which wireless sensor network (WSN) is the main development direction. Systems that conform to this model are IoT systems that collect data through WSN. Due to the complexity of WSN, they usually need to be connected to the IoT cloud platform through an IoT gateway. As shown in the figure below.
4.1 Technical Implementation
The sensor network model does not access a single terminal. As a sub-network, WSN is different from IP networks in terms of communication protocols, network topology, network management, etc. The WSN networking protocols include 6LoWPAN, ZigBee, Z-Wave, etc. From the perspective of network topology, the most studied WSN is a multi-hop self-organizing network. In practical applications, there may also be point-to-point, star, and chain topologies. Most nodes in WSN networks have a sleep mechanism to achieve low or even micro power consumption. WSN is a relatively professional field, involving a lot of content. There are also many books on WSN, so I won’t repeat them here.
In terms of software, we still emphasize the importance of mobile apps, but in this model, mobile apps, if used in industry applications, are often run on handheld terminals. Mobile apps can view/control IoT gateways through the network. Especially in the industrial field, mobile apps are also required to have on-site management functions: functional requirements include on-site identification of gateways, direct communication, control of IoT gateways, indirect management of WSN network terminals through gateways, and so on.
The cloud implementation is very similar to the previous models, with the addition of WSN network configuration management and some implementation changes brought about by node dormancy, which will be described in detail in the following chapters.
4.2 Advantages and Disadvantages
In 2003, the American magazine "Technology Review" selected the top ten emerging technologies that will have a profound impact on human future life, and sensor networks were ranked first. The sensor network structure has its outstanding advantages.
The nodes can be a large number of cheap micro sensors, which are suitable for large-scale deployment in terms of cost and technical conditions.
Self-organizing networks can generally actively adapt to changes in node locations, have good stability, and the ability to adapt to harsh environments.
Low power consumption is an important research topic in WSN. The low power consumption of sensor nodes greatly enhances the availability of the network. A good sensor node can be used for several years without replacing the battery. This not only completely gets rid of the constraints of power lines, but also reduces maintenance costs and meets certain special business needs, such as scenarios where the battery cannot be replaced.
The shortcomings of the sensor network structure are that, from a technical point of view, the sensor network is still in its development stage; in terms of implementation, there are parts that are more difficult and points that need to be studied; from an industrial point of view, the industry is in an upward stage, marked by communication protocols (6LoWPAN, ZigBee, Z-Wave, etc.), there are several different technology camps coexisting in the market, which are incompatible with each other, and some related international standards are still being improved; finally, the prices of some major hardware products (such as chips) have not yet dropped to the level of supporting large-scale applications.
4.3 Applications and Examples
For the purpose of energy saving, wireless sensor networks are usually designed with a low transmission rate, and it is difficult to achieve real-time downlink control. In addition, from the perspective of the protocol, wireless sensor protocol networks are basically not based on IP, so in the process of accessing the platform, there is a lot of protocol conversion work, and the application is also complicated. Due to these two limitations, wireless sensor networks are more used in monitoring systems. For example, in agriculture and forestry, WSN networks can be used to monitor the growth environment, temperature, humidity, etc. of crops; in the field of environmental monitoring, WSN networks can monitor various parameters of rivers and oceans; in the field of intelligent transportation, WSN networks can control street lights, etc.
With the development of technology, for example, the ZigBee protocol begins to fully support IPv6, more and more protocols that support IP emerge, and the development of technologies in low-power chips, security, energy technology, etc. will continue to promote the wider application of wireless sensor networks in more fields.
|