Open Access Paper
2 February 2023 Design of gateway nodes for wireless sensor networks based on microservice architecture
Kequan Lin, Zhongkai Fan, Bo Liu, Yuxu Chen, Zhuqing Liu
Author Affiliations +
Proceedings Volume 12462, Third International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022); 1246204 (2023) https://doi.org/10.1117/12.2660961
Event: International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022), 2022, Xi'an, China
Abstract
As the control center of wireless sensor network, gateway plays a key role in the communication between internal network and external network. The wireless sensor network gateway mainly integrates the data of each sensor node and transmits the data to the remote terminal through wireless communication and Ethernet, and then performs corresponding processing according to the instructions issued by the monitoring center. However, the large amount of data transmission of gateway nodes in wireless sensor networks leads to the problem of high CPU occupancy, which has a negative impact on the resource allocation and utilization of the gateway. To this end, a wireless sensor network gateway node based on micro service architecture is designed. The hardware part selects the CC2530 chip integrated with 8051 CPU core and starts the gateway flash burning tool. The software part extracts the characteristics of wireless sensor networks and adjusts the layout of gateway and relay nodes based on the micro service architecture. Combined with the means of multi hop routing, set the grid spacing in the space, design a new address mapping layer according to the unidirectional transmission channel of communication data, and set the data communication standard of software application layer. The test results show that the average CPU occupation percentage of the designed WSN gateway node is 47.54%, which indicates that the designed WSN gateway node has more comprehensive functions after integrating the micro service architecture.

1.

INTRODUCTION

With outstanding features such as low power consumption, wireless sensor networks take the mode of wireless radio frequency communication and use communication nodes as the architecture to achieve data interaction. Since its introduction, wireless sensor networks have been widely used in many fields. At the same time, WSNs have received more attention in industries such as environmental monitoring and biomedicine because they can have good communication performance in areas with harsh geographical environments [1-2]. Especially in the canyon and volcanic areas, WSN has good performance. The use effect in environmental monitoring has directly promoted the development of the ecological environment protection process. In wireless sensor networks, the most common are sensor nodes and WSN gateways. The concept of gateway evolves from TCP / IP protocol. The significance of its existence is to provide communication media for two or more heterogeneous networks. In other words, the essence of gateway is an inter network connector. Affected by the properties of wireless sensors, sensor nodes also have the characteristics of high integration. From the perspective of influence scope, the sensor node and the WSN gateway interact with each other. Each sensor node forms a network through self-organization, and then transmits the collected data to the WSN gateway. In order to improve the communication transmission capacity, in recent years, its hardware equipment has been continuously upgraded to meet the application needs of relevant fields. At the sensor node level, the typical configuration also includes routing nodes, monitoring centers and terminal nodes. Respectively responsible for data collection, routing function and wireless transceiver and other functional modules of WSN. In addition to the basic physical information aggregation function, the WSN monitoring center also has the functions of fault management and safety verification. WSN is more convenient and flexible than traditional communication technology in the face of some application scenarios with high requirements for network communication technology. Especially in some large-scale rescue work, when the original network facilities cannot meet the work needs, the advantages of WSN are more obvious. In addition, in addition to data transmission with the management terminal via Ethernet, the gateway of the wireless sensor network also has corresponding expansion functions. By adjusting the deployment of nodes, additional devices such as displays can be provided. In the normal working mode, the gateway node maintains communication with the terminal through wired connection. In order to reduce the impact of the working environment on the overhead cost, ARM embedded technology is introduced to improve the application convenience and performance of the gateway at the lowest cost. Under the influence of the micro service architecture, the wired connection in the traditional work is converted into a wireless connection [3-5]. This mode not only breaks the original constraints, but also indirectly expands the application scope of gateway nodes. In the internal structure of WSN, the gateway node of wireless sensor network usually uses ZigBee protocol as the carrier to realize data interaction and other purposes. In practical applications, the gateway nodes of wireless sensor networks also need to have corresponding configuration functions. Therefore, the design needs to be based on software design and hardware design.

2.

HARDWARE DESIGN OF WIRELESS SENSOR GATEWAY NODE

In order to ensure that the designed wireless sensor gateway node can be put into use smoothly, ARM embedded technology needs to be introduced into the hardware design. The chip of the hardware part is the CC2530 chip integrated with 8051 CPU core, and the main frequency can reach 530mhz. At the same time, the circuit traces on the PCB board are used as signal lines for communication transmission. So as to start the gateway flash burning tool when the arm relay and the software are in the communication state. Open the gateway coordinator device, and download the compiled bootloader to flash via the USB device interface. JN5121 + arms3c2410 is adopted to meet the energy efficiency demand. The hardware configuration of the gateway node of the WSN is shown in Figure 1.

Figure 1.

Hardware composition of wireless sensor gateway node

00004_PSISDG12462_1246204_page_2_1.jpg

It can be seen from Fig. 1 that after the infrastructure is completed, the hardware configuration also needs to provide the function of 1 G bit CRC check synchronously. In addition, after completing the wireless sensor networking steps, set the specified wince system image file 1 vk.nb0 to the bootloader download mode and burn it to the gateway. On the circuit side, when the gateway has no data communication or transmission demand, the working state is switched to the sleep mode. So as to reduce the overall power consumption of the gateway. In the operating state, provide 3.3 V stable DC power, and set the optimal differential load threshold of 115 + j180 ohms. In addition, in order to eliminate coupling and filter processing in the power supply part, the single ended antenna is selected to be used for 250 kbps data transmission and reception. Based on the above description, the steps of hardware design of wireless sensor gateway node are completed.

3.

SOFTWARE DESIGN OF WIRELESS SENSOR GATEWAY NODE

3.1

Extracting features of Wireless Sensor Networks

The application focus of WSN is to send the data information in the area to the management terminal. Therefore, its network node can be regarded as a micro embedded system. It needs to complete the task of data collection with other types of nodes. The biggest difference between WSN and wireless ad hoc network is that the former is to improve the utilization efficiency of resources, while the latter is usually to improve the quality of service by improving the bandwidth utilization. In addition to application characteristics, wireless sensor networks also have obvious network characteristics, as shown in Figure 2.

Figure 2.

Characteristics of wireless sensor network

00004_PSISDG12462_1246204_page_3_1.jpg

In general, the number of nodes in wireless sensor networks is large and the distribution is dense. When the environment is bad or the power supply of the sensor is insufficient, the problem of node failure is easy to occur. In this mode, the topology of wireless sensor networks will become more complex. From the perspective of scale, when the number of sensor nodes is large, the deployment density of nodes will be high. On the basis of scale, the self-organization of wireless sensor networks is mainly reflected in the dynamic adaptation to network topology [6-7]. When the application environment is complex, the hardware or software conditions of the gateway node of WSN need to have more operating space in terms of reliability and fault tolerance, regardless of hardware or software conditions. In practical applications, different application requirements have different emphasis on WSN performance requirements. WSN is a task-based network, which usually distinguishes gateway nodes by node identification. However, there is no necessary relationship between the node number has nothing to do with its location. As the core competitive advantage of WSN, communication capability is also an important standard to judge whether the coordinator node is a full-function device. Correspondingly, the communication capability is also a condition for measuring whether the control node is a reduced function device. After successful component WSN, communication between nodes must be realized according to existing rules. In the actual environment, the topology of ZigBee network can be basically divided into three types, and each has different application characteristics. In the three aspects of information collection node, gateway node and remote monitoring center, the data and information transmission between heterogeneous networks has always been the focus of application. In the area of target perception, the three part structure of WSN is also affected by each other. Based on the above description, the step of extracting the characteristics of the wireless sensor network is completed.

3.2

Adaptation of gateway relay node layout based on microservice architecture

The microservice architecture covers a number of practical microservice components, mainly including the gateway’s logging microservice and the registry microservice at two levels [8-10]. The logging microservice is mainly for the gateway node to obtain service information in real time during operation and play the role of online monitoring. When bugs occur in the gateway node, the call information between microservices is used as a basis to quickly locate the bug node that needs to be fixed [11]. In wireless sensor network gateways, the deployment of relay nodes is more complex than the more fixed location of gateway nodes and sensor nodes, and is more prone to some failures if not considered thoroughly enough. Most gateways ignore the constraints of the application scenario for the layout of relay nodes, but practice shows that this scenario is considered in an ideal state. Interference between two neighbouring nodes is a physical limitation that cannot be ignored. For example, when used in transport applications such as subways, the nodes of wireless sensors are generally laid out on the inside of tunnels underground. The train monitoring information is then transmitted to the gateway nodes by means of relay nodes, combined with multi-hop routing. The layout of the nodes in space, after taking full account of the communication performance and interference distance conditions, sets the grid spacing in space with the following mathematical expression:

00004_PSISDG12462_1246204_page_3_2.jpg

In formula (1), p, q represents the communication radius weighting factor between the relay node and the sensor node respectively, E represents the communication distance of the gateway, εmax represents the maximum value of the sensor node and σ represents the compensation parameter of the monitoring area. According to the calculation results of formula (1), the grid spacing generally needs to account for half of the communication distance. In other words, when the overall communication distance of the actual WSN is 130 m, the grid spacing is generally about 60 m. In order to arrive at a more accurate figure, the strength of the wireless signal should also be varied with the help of corresponding hardware equipment, and the layout of the relay nodes should be adjusted in time. The irreversibility factor of the communication path is derived based on the known effective communication radius of the node for the purpose of providing effective topology control for the gateway. The irreversibility factor of the communication path is calculated by the formula:

00004_PSISDG12462_1246204_page_4_1.jpg

In formula (2), T, F denotes the communication path irreversibility reference vector of the sensor node and the relay node, respectively, and M, H denotes the coordinate vector of any two adjacent relay nodes, respectively. It is well known that, as an important means of transport, most trains are in motion for long periods of time. Therefore, the node layout of the gateway is usually such that it avoids the key locations where the trains are running, which can actually be seen as a layout constraint. In cyberspace, the area where the relay nodes need to be laid is circled and the area is divided into a number of grids. The intersection points between the grids are considered as microservice nodes of the gateway due to the distance lower bound condition between the nodes. Based on this, the steps to adapt the layout scheme of the gateway relay nodes based on the microservice architecture are completed.

3.3

Setting software application layer data communication standards

In environments lacking support from wired networks, the software application layer of a wireless sensor network needs to set data communication standards to enhance the gateway’s versatility in other networks. In order to enable communication of nodes in heterogeneous networks, the differences between the ZigBee protocol and the TCP/IP protocol need to be masked first. And according to the needs of the application scenario, a data transmission protocol that meets the requirements is developed. Wireless sensor network gateway nodes must communicate based on ZigBee protocol when communicating data. [12-13]. Therefore the communication data in the network has to be encapsulated before communication, according to the standardised format of the protocol. In addition to designing the corresponding data communication protocol in the protocol stack, a new address mapping layer can also be designed in the wireless sensor network gateway, based on the unidirectional transmission channel of the communication data. The software application layer data communication standard is set to meet the need for protocol conversion and to improve the communication efficiency of the gateway nodes at the same time. If serial data belonging to different protocol types want to start data communication, the format of the serial data must be adapted to the gateway’s application layer communication standard. The data communication protocol is marked by 0x3F in hexadecimal and extends the maximum number of node devices in the ZigBee network to an interval that meets the application requirements. As the state of the gateway node itself affects the final communication effect, the communication data transfer rate of the gateway node, therefore, cannot exceed the overall communication capacity of the gateway. The node’s communication data transfer rate is then calculated as:

00004_PSISDG12462_1246204_page_4_2.jpg

In formula (3), ϖ denotes the starting sensor node on the communication path and s denotes the number of nodes. Based on formula (3), the power expression between the gateway transmitting node and the receiving node in a wireless sensor network is derived as:

00004_PSISDG12462_1246204_page_4_3.jpg

In formula (4), K denotes the wavelength of the wireless signal, μ denotes the transmission power of the gateway node, ψ denotes the reception power of the gateway node, η denotes the antenna gain, and Y denotes the distance between the gateway transmission and reception nodes. For gateways, each individual node can be seen as a wireless monolith with its corresponding wireless RF endpoint, all with a corresponding network address as the architecture. The service components in the microservice architecture are able to describe the wireless channels in the gateway through multiple endpoints. At the same time, in the application layer of the gateway, data communication standards can redefine the communication address of the virtual link with the help of fields of 8 bits and above. When a gateway node moves to a common endpoint, it sends a communication request to the coordinator according to the protocol of the application interface. Considering the scalability and versatility of the gateway application, a dynamic management model is adopted for the parameters of the hardware configuration. At the same time, the wireless sensor network gateway will involve the need for remote communication, and Socket is selected as the technical support for the software application layer data communication standard [14-15]. Based on the communication characteristics of the gateway application layer data, the interaction between the gateway and the remote host consists of three links. When an access request is issued for the communication data, the routing node transmits the information to the gateway and feeds the information back to the remote host. On the basis of the above description, the steps to set the software application layer data communication standard are completed.

4.

APPLICATION TESTING

4.1

Test environment

The application test environment was built with two parts: hardware configuration and software deployment. The hardware configuration of the computer is as follows: Pentium(R) Dual-Core CPU, 2 G RAM, 64 MB SDRAM, 32 MB Flash, 2.20 GHz, 100M/1 G network card, s3c2410 processor with ARM9 architecture and 3-way UART interface. Software architecture: Linux host with Redhat system, embedded boaWeb server, SQLServer database. After successful download and debugging inside the gateway, connect the emulator to the gateway JTAG interface and import the gateway application. Before the test, it is also necessary to use 40 pin FFC flexible cable as a tool to connect MC3 9i with the gateway motherboard. After the processor is started normally, enter the test page.

4.2

Test results

In order to fully reflect the application effect of wireless sensor network gateway nodes in the paper, cloud-based wireless sensor network gateway nodes, edge computing-based wireless sensor network gateway nodes, and ARM-based wireless sensor network gateway nodes were selected for comparison tests with them respectively. The CPU usage percentages of the four types of gateway nodes were tested under different concurrency conditions respectively, and the test results are shown in Table 1-3:

Table 1.

CPU usage percentage of concurrent 550 gateway nodes(%)

Number of concurrentCloud-based gateway nodes for wireless sensor networksEdge computing-based gateway nodes for wireless sensor networksARM-based gateway nodes for wireless sensor networksWireless sensor network gateway nodes in the text
15036.1533.0835.1628.22
25033.3136.1437.2527.19
35034.0632.3734.3327.36
45036.2834.5534.4726.21
55035.6933.4636.5125.04

Table 2.

CPU usage percentage of concurrent 1050 gateway nodes(%)

Number of concurrentCloud-based gateway nodes for wireless sensor networksEdge computing-based gateway nodes for wireless sensor networksARM-based gateway nodes for wireless sensor networksWireless sensor network gateway nodes in the text
65062.5858.5460.4853.97
75059.7462.1759.0552.48
85060.1660.2558.1448.51
95028.2259.1664.9349.36
105061.9362.3762.2250.29

Table 3.

CPU usage percentage of concurrent 1550 gateway nodes(%)

Number of concurrentCloud-based gateway nodes for wireless sensor networksEdge computing-based gateway nodes for wireless sensor networksARM-based gateway nodes for wireless sensor networksWireless sensor network gateway nodes in the text
115077.4474.7676.1465.17
125078.1575.9175.2764.45
135079.0376.3573.5563.20
145082.1677.1876.4966.91
155076.8574.0774.3264.79

From Table 1 to Table 3, we can see that when the number of concurrency is 550, the CPU usage percentages of the wireless sensor network gateway node in the text, and the other three wireless sensor network gateways are 26.80%, 35.10%, 33.86%, and 35.54% respectively; when the number of concurrency is 1050, the CPU usage percentages of the wireless sensor network gateway node in the text, and the other three wireless sensor network gateway nodes in the text, and the other three wireless sensor networks when the number of concurrency is 1050, are: 50.92%, 54.53%, 60.50%, and 60.96%, respectively; When the number of concurrency is 1550, the percentage of CPU usage for the wireless sensor network gateway node in the text, compared to the other three wireless sensor network gateways, is 64.90%, 78.73%, 75.65% and 75.15% respectively. This results in an average CPU usage percentage of 47.54% for the wireless sensor network gateway node, 56.12% for the cloud-based wireless sensor network gateway node, 60.18% for the edge computing-based wireless sensor network gateway node, and 57.22% for the ARM-based wireless sensor network gateway node in the paper. The average CPU usage percentage of ARM-based wireless sensor network gateway nodes was 57.22%. The test results prove that the wireless sensor network gateway node in the paper outperforms the other three wireless sensor network gateways in terms of CPU usage percentage.

5.

CONCLUSION

This research uses the microservice architecture as an entry point to design a new gateway node. Shortcomings in data transmission and data communication are improved, providing a more comprehensive application strategy for expanding the range of applications of wireless sensor network gateway nodes. The details of the use of the gateway are optimised while enriching the research in academia. Subsequent work will continue to improve the stability of the gateway nodes.

ACKNOWLEDGMENTS

This work is supported by China Southern Power Grid Digital Grid Group Co., Ltd “South Grid cloud platform (phase III) construction” project (JY-KF-03-YP-21-005-TQ).

REFERENCES

[1] 

GOPAL, R., and S. VIJAYAKUMAR, “MOVEMENT PREDICTION AND ALERT GENERATION IN SLACK USING MOTION SENSORS INTEGRATED WITH MOBILE ADHOC NETWORKS,” in IEEE International Conference on Electrical, (2017). Google Scholar

[2] 

Thouhid, Shaik, “Analysis of Water Contamination and Reporting Using Wireless Sensors Network,” Journal of Physics: Conference Series, 1964 (6), IOP Publishing,2021). Google Scholar

[3] 

Mendonça, N. C., Box, C., Manolache, C., & Ryan, L., “The monolith strikes back: Why istio migrated from microservices to a monolithic architecture,” IEEE Software, 38 (05), 17 –22 (2021). https://doi.org/10.1109/MS.2021.3080335 Google Scholar

[4] 

Raj, V., & Sadam, R., “Performance and complexity comparison of service oriented architecture and microservices architecture,” International Journal of Communication Networks and Distributed Systems, 27 (1), 100 –117 (2021). https://doi.org/10.1504/IJCNDS.2021.116463 Google Scholar

[5] 

Mateus-Coelho, N., Cruz-Cunha, M., & Ferreira, L. G., “Security in microservices architectures,” Procedia Computer Science, 181 1225 –1236 (2021). https://doi.org/10.1016/j.procs.2021.01.320 Google Scholar

[6] 

Mohanraj, Renuka, “Mid Square Hash Bezier Secured Routing for IoT Enabled Wireless Sensor Networks,” (2020). Google Scholar

[7] 

Karatas, M., & Onggo, B. S., “Optimising the barrier coverage of a wireless sensor network with hub-and-spoke topology using mathematical and simulation models,” Computers & Operations Research, 106 36 –48 (2019). https://doi.org/10.1016/j.cor.2019.02.007 Google Scholar

[8] 

Daoud, M., El Mezouari, A., Faci, N., Benslimane, D., Maamar, Z., & El Fazziki, A., “A multi-model based microservices identification approach,” Journal of Systems Architecture, 118 102200 (2021). https://doi.org/10.1016/j.sysarc.2021.102200 Google Scholar

[9] 

Alexandre, M., da Silva, P., Cesário, V., & Araújo, C., “A Decoupled Health Software Architecture using Microservices and OpenEHR Archetypes,” International Journal of Computer Applications, 975 8887 (2020). Google Scholar

[10] 

Lee, S., Han, J., Kwon, J., & Kim, J., “Design and validation of service composition based on microservices architecture for cloud-native IoT-cloud services,” KIISE Transactions on Computing Practices, 26 (3), 123 –134 (2020). https://doi.org/10.5626/KTCP.2020.26.3.123 Google Scholar

[11] 

Al-Debagy, O., & Martinek, P., “A metrics framework for evaluating microservices architecture designs,” Journal of Web Engineering, 341 –370 (2020). Google Scholar

[12] 

Santos-González, I., Rivero-García, A., Burmester, M., Munilla, J., & Caballero-Gil, P., “Secure lightweight password authenticated key exchange for heterogeneous wireless sensor networks,” Information Systems, 88 101423 (2020). https://doi.org/10.1016/j.is.2019.101423 Google Scholar

[13] 

Islam, N., Hossain, M. I., & Rahman, A., “A Comprehensive Analysis of Quality of Service (QoS) in ZigBee Network through Mobile and Fixed Node,” Journal of Computer and Communications, 10 (3), 86 –99 (2022). https://doi.org/10.4236/jcc.2022.103006 Google Scholar

[14] 

Hoque, M. M., Rashed, M. G., Kabir, M. H., Abadin, A. F. M. Z., & Pramanik, M. I., “EAGBRP: A Gateway Based Routing Protocol for Heterogeneous Wireless Sensor Networks,” Journal of Scientific Research, 13 (2), 467 –481 (2021). https://doi.org/10.3329/jsr.v13i2.50005 Google Scholar

[15] 

Xu, Y. F., & Node, D. L. Z., “Redeployment of wireless sensor network based on leapfrog algorithm,” Computer Simulation, 38 (10), 328 –332 (2021). Google Scholar
© (2023) COPYRIGHT Society of Photo-Optical Instrumentation Engineers (SPIE). Downloading of the abstract is permitted for personal use only.
Kequan Lin, Zhongkai Fan, Bo Liu, Yuxu Chen, and Zhuqing Liu "Design of gateway nodes for wireless sensor networks based on microservice architecture", Proc. SPIE 12462, Third International Symposium on Computer Engineering and Intelligent Communications (ISCEIC 2022), 1246204 (2 February 2023); https://doi.org/10.1117/12.2660961
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Sensor networks

Data communications

Sensors

Relays

Standards development

Wireless communications

Network architectures

Back to Top