## 4 Energy Efficient IIoT Algorithm  
### Proposal Overview  
[PERSON] et al. [23] and [PERSON] et al. [24] mentioned that most of sensor nodes involved in IIoT have static hierarchical routing, in order to avoid complicated routing which takes a long time to complete. These authors suggested that any IIoT architecture should have the following three layers (Figure 2).  
1. Control layer: In this layer, there are Control Nodes (CN) managing the Gateway Nodes (GN). Its objective is to collect data from the Sense nodes (SN) and send them to a cloud server, in order to obtain important information for higher layers. Thus, these nodes designate the GN based on their features.
2. Gateway layer: This layer has mostly devices capable of high-level processing because in this layer a routing protocol needs to be established, tending sometimes to be complex since they also manage the state of the sensors located in the lower layer. The GN forwards data measured by the SNs, routing them to the cloud through a CN for some other entity to process or interpret. The GN also calculate the times taken by the SN to share their data. Finally, there are no constraints for communication between GN.
3. Sense Layer: In an industrial area, information is collected by sensors located in a nearby perimeter area. SNs measure data, detect important environment variables, and send the information to GN. The SNs are divided into two large groups, namely Trigger-Based Sense Nodes (TBSN) and Periodic Sense Nodes (PSN), whose categorization is based on how they collect the data and their transmission-frequency. Thus, TBSNs send their data throughout the network when there is an event which exceeds certain threshold or for a particular event. If this threshold is not exceeded, this type of sensor is kept waiting. Otherwise, the PSN sends data with a frequency measured in regular time intervals and regulated by the GN. Both TBSN and PSN measure data and store them in an internal memory, and then transmit them from their communication ports.  
To suggest how sensor nodes could behave in a WSN, we used the work from [PERSON] and [PERSON] [25], since they were the first to introduce the term Swarm Intelligence (SI) and use it on their cellular robot system. Therefore, we consider an Artificial Intelligence (AI) tool to be an SI algorithm. Then, IS is an AI technique for studying the collective behavior to regulate non-centralized systems. In a basic SI system, agents interact with each other and with their environment autonomously. Each of these agents or sensor nodes is governed by simple rules and not by a hub sensor node. Despite that, they adequately solve their interactions or common actions, working out as a single entity with its own intelligence.  
Figure 2: Architecture into the sensing entities domain in three layers.  
The five greatest benefits of swarm intelligence are:  
1. Derivative-free optimization
2. Robustness
3. Flexibility
4. Easy administration and implementation
5. Low computational and economic costs  
Thus, schemes such as the one shown in Figure 2 making up a three-layer system and whose energy saving lies in the balance of traffic loads, avoiding point-to-point communication between SNs, are always communicating by means of a GN. On the contrary, we propose to merge the top two layers, i.e., form the control gateway layer and maintain the sense layer, as shown in Figure 3.  
With a two-layer system, our control link layer will control routing by adapting network topology from software, thus the gateways will decide who replicates the data obtained from SNs. That is why our energy saving proposal is not only to balance the traffic load avoiding point-to-point communications among sensors, but also the dynamic reconfiguration of the network.