Energy-Efﬁcient Edge Optimization Embedded System Using Graph Theory with 2-Tiered Security

: The development of the Internet of Things (IoT) network has greatly beneﬁted from the ex-pansion of sensing technologies. These networks interconnect with wireless systems and collaborate with other devices using multi-hop communication. Besides data sensing, these devices also perform other operations such as compression, aggregation, and transmission. Recently, many solutions have been proposed to overcome the various research challenges of wireless sensor networks; however, energy efﬁciency with optimized intelligence is still a burning research problem that needs to be tack-led. Thus, this paper presents an energy-efﬁcient enabled edge optimization embedded system using graph theory for increasing performance in terms of network lifetime and scalability. First, minimum spanning trees are extracted using artiﬁcial intelligence techniques to improve the embedded system for response time and latency performance. Second, the extracted routes are provided with full protection against anonymous access in a two-tiered system. Third, the IoT systems collaborate with mobile sinks, and they need to be authenticated using lightweight techniques for the involvement in routing sensed information. Moreover, edge networks further provide the timely delivery of data to mobile sinks with less overhead on IoT devices. Finally, the proposed system is veriﬁed using simulations, revealing its signiﬁcance to existing approaches.


Introduction
Due to an emerging networking environment, the number of users and applications is growing exponentially. The traffic of data going through the base station also increases as the number of users increases. Device-to-device (D2D) communication is seen as one of the best ways to reduce the chance of cellular users losing service in 5G [1][2][3]. The cellular licensed band can be used for D2D communication in an underlay or an overlay mode [4,5]. Integrating sensors, embedded computing, and communication technologies are known as the Internet of Things (IoT). The IoT is designed to provide seamless services to everything, at any time, everywhere. After the internet and information and communication technology, IoT technologies play a critical role everywhere, especially in developing smart systems [6][7][8]. Accordingly, to researchers and the community, IoT will have a greater influence on society than the internet and information and communication technologies, which will benefit both sectors and society [9][10][11]. The usage of a prospective IoT system allows common systemlevel design challenges such as energy efficiency, robustness, scalability, interoperability, and security concerns to be addressed. A high degree of physical security is essential for wireless communications in the IoT to complement conventional security measures used at high levels since IoT is anticipated to convey significant and private information [12,13].
On the other hand, edge computing is a standard evolving to meet the rising networking needs from end devices to intelligent objects [14,15]. For reduced latency, increased security, and privacy, edge computing enables the processing to be offloaded from cloud data centers to the network edge and edge nodes [16,17]. However, due to the complex relationships between edge devices, edge servers, and cloud data centers, energy efficiency in edge computing has received far less attention than it has in cloud data centers. Much research has investigated the development of the optimizing system with the support of artificial intelligence [18,19]. They increased energy efficiency with improved data delivery, but it is still a hot problem and needs more attention. The proposed solution should be able to impose the least overhead on low-powered devices and avoid unnecessary data transferring.
The proposed system provides the main contributions as follows: i. It proposes an intelligent method for extracting minimal spanning trees using theory. ii.
The cost function is optimized using real-time parameters and, accordingly, end-toend routes are identified. iii.
It provides security on two main entrance points: from the IoT system to edge devices and from edge devices to mobile sinks. Such tiers protect against network threats and increase the reliability of the nodes. iv.
The proposed system is tested and validated in its performance in terms of resource management and energy efficiency.
The rest of the paper is organized in the following subsections. Section 2 presents the related work. Section 3 highlights the problem statement. Section 4 explains the overview of the proposed system with all its components. In Section 5, the simulation environment is explained, and in Section 6, experimental results and discussions are provided. Finally, Section 7 ends this research work with future directions.

Literature Work
The IoT provides an internet-connected civilization where smart objects gather data and monitor environmental conditions. IoT deployment is hard and needs edge computing for the processing of real-time data and improved system performance [20][21][22]. Energy efficiency is one of the most demanding issues in IoT scenarios, as sensors, actuators, and smart devices are battery-powered devices with limited constraints. In [23] authors discuss utilizing an edge-IoT platform and a social computing framework to design a smart energy-efficient building system. The system was evaluated in a public venue, and the results illustrate edge computing's energy efficiency and framework benefits. The benefits include reduced IoT-edge-to-cloud data transfer, computation, and network costs. The authors of [24] studied the possibilities of merging blockchain with SDN. They presented a safe, energy-efficient blockchain-enabled SDN controller architecture for IoT networks utilizing a cluster topology and novel routing protocol. With the elimination of proofof-work (POW) and the adoption of an effective authentication strategy with distributed trust, the design uses both public and private blockchains for peer-to-peer (P2P) communication between IoT devices and SDN controllers. In addition, the cluster-based routing protocol provided better throughput, lower latency, and lower energy consumption than EESCFD, SMSN, AODV, AOMDV, and DSDV. Network devices provide real-time data to gateways and remote servers for processing and display. Data transferred by these devices are subject to hostile attacks; thus, privacy and integrity must be maintained. In [25], the authors introduced LightIoT, a lightweight and secure connectivity method for healthcare infrastructure devices. LightIoT was initialized, paired, and authenticated. These steps assure data reliability by creating safe sessions among communication entities (wearable, gateways, and a remote server). Statistical findings showed that their technique was lightweight, robust, and resilient against various adversarial attacks and incurred substan-tially lower computational and communication costs for transmitted data than previous approaches. The authors of [26] also presented a cooperative offloading approach based on the Lagrangian suboptimal convergent computation offloading algorithm (LSCCOA) for multiaccess MEC in a dispersed Internet of Things (IoT) network. A computational rivalry amongst SCDs for limited resources impeding job offloading for MEC is explored in a high-demand IoT network. The proposed suboptimal computational approach is applied to accomplish task offloading that is optimized at the cloud edge server without transferring it to the centralized network. In the form of a mixed-integer optimal solution, this led to a minimum weighted total of transmit power consumption and outputs. In addition, the resulting fast-convergent suboptimal method is used to solve the non-deterministic polynomial-time (NP) hard problem. To increase lifespan using a trustworthy approach, trust-based energy efficient data collecting with an unmanned aerial vehicle (TEEDC-UAV) scheme is proposed [27]. Firstly, an ant colony-based unmanned aerial vehicle (UAV) trajectory optimization technique is developed. This approach forms the most data anchors in the working field with the shortest route and improves network lifetime. To increase the trust for collected data, trust reasoning and evolution are presented and ensure the degree of privacy in sensor nodes. The issue of network throughput optimization for an IRS-assisted multihop MEC network is investigated in [28], where it is necessary to jointly optimize the IRS's phase shifts and the relays' resource allocation. However, it is challenging to address the studied problem by simply using known optimization techniques because of the coupling among the transmission lines of different hops generated by the utilization of the IRS and the complex multi-hop network topology. Fortunately, it has been demonstrated that the network throughput may be accurately approximated by the second smallest eigenvalue of the network Laplacian matrix by taking advantage of the underlying structure of the network topology and spectral graph theory. In [29], the authors have proposed a novel solution for optimizing security with IoT networks. The proposed approach implements the IoT security framework among devices using dominating sets and centrality measures. The findings show that the network's overall security improved, while there was a nominal effect on network traffic. In [30], the authors have presented a trust management system (TMS) for large-scale IoT systems called Trust2Vec. The proposed TMS can manage trust relationships in large-scale IoT systems and can counter large-scale trust attacks that are carried out by a large number of malicious devices. To navigate the trust relationship between devices and compute trust network embeddings, Trust2Vec uses a random-walk network exploration algorithm. This allows it to analyze the latent network structure of trust relationships even when there is no direct trust rating between two malicious devices. It also proposed a network embeddings community identification technique that recognizes and prevents communities of malicious nodes to detect large-scale attacks such as self-promotion and badmouthing.

Problem Statement
Researchers conclude that IoT systems are extensively used in several smart applications, including healthcare, smart homes, security surveillance, and the military. However, the limited resources explicitly reduce the performance results in terms of integrity and response interval. Furthermore, it is clear that a variety of solutions have been proposed to secure the IoT platform, but doing so results in more messages passing over the communication links, which negatively impacts the platform's sustainability. Additionally, the majority of the solutions do not make intelligent decisions, which usually results in retransmissions and incurs network congestion. Based on these constraints, our proposed system integrates edge computing with SDN controllers, which provide security using blockchain technology and intelligence utilizing graph theory.

Energy-Efficient Enabled Reliable Edge-SDN Protocol with Graph Theory
This section presents our proposed energy-efficient reliable edge network using graph theory. The proposed system learns from environmental and node behaviors. It not only offers a fault-tolerant solution but, on the other hand, also prevents communication paradigms from external attacks. It consists of two layers. One layer is among IoT components and edge networks, and the second layer is among edge networks to mobile sinks. Moreover, the SDN controller supervises the overall communication with its intelligent decisions and improves the constraint utilization for the nodes. The phases of network creation, protocol communications, message flow, and security are all explained in this section. The SDN controller checks the network surroundings randomly, and, when it obtains unauthorized access, it sends alert messages to devices.

System Model
We model the network system with sensors N, edges, and sink nodes. Furthermore, SDN controllers are considered in the proposed system for efficient management of device constraints. Nodes belong to a particular group and each group is associated with the gateway. All the groups and nodes have unique identities. The received signal strength indicator (RSSI) determines the distance between nodes. The border nodes are considered edge nodes and have sufficient intelligence to make local decisions. All the edges are interconnected with each other to formulate a routing chain and provide the necessary information among network structures to the SDN controller. We assume the following network assumptions: i.
Nodes are randomly deployed in the targeted area. ii.
Nodes are static with mobile gateways. iii.
Gateways can perform data aggregation and maintain proximity tables. iv.
Tables are not static and frequently change the information when any event incurs. v.
Sensor nodes cannot direct communication with edge devices. vi.
If the residual energy of any node is below the threshold, its flag value is zero.

Discussion
In this section, we present the discussion of the proposed system. The various states of the proposed system and their interactions are depicted in Figure 1. Firstly, network nodes and devices need to register with the nearest gateway device, and later, the weighted condition is evaluated for the generation of subgraphs. Edge devices frequently transmit the network information to the SDN controller, which helps the system to cope with network monitoring. Once all is in control, the data are verified and nodes participate in the blockchain technology [31] to ensure security with integrity. Initially, each node begins to create its memory table with the received information of the neighbors. Then, each neighbor floods their local information with other nodes that reside in the same transmission range. Let us assume the initial routes are denoted by r 1 , r 1 , r 1 , . . . . , r 1 . In the proposed system, whenever any node needs to transmit either its sense data or attributes, it follows any available route from the identified set, as defined below.
subject to i ε N In the proposed system, the nodes are organized in an undirected and weighted graph G(N, E). The nodes have no circuit, and each edge has a single weighted value. The weighted value indicates the route cost. The combination of sub-routes made a cumulative cost W(T), as given in Equation (2).
All the identified minimum spanning trees are considered as the groups. In the group's proximity, edge devices are located for data aggregation and transmission toward the SDN layer. Our system utilizes the concept of graph theory. It identifies minimum spanning trees from Graph G. Each minimum spanning tree is referred to as a subset of Graph G. Moreover, the proposed system identifies primary and secondary minimum spanning trees as defined below. S1, S2 ε G(N, E) In the proposed system, we explore the Krushkal algorithm for identifying subgraphs or minimum spanning trees [32]. The weighted cost is optimized rather than a single distance value and computed using dynamic attributes of the network. We consider energy e, link lost lnl, and latency_time l t parameters for the evaluation of the minimum weighted cost of each link, as given in Equation (4).
In Equation (4), e is computed based on the consumed power in sending and receiving the data packets, as given below.
where Pr is receiving power, Pt is transmission power, K denotes the number of data packets, and N is defined as nodes. In the local table, the entry of any node is maintained until its energy consumption is less than the preset threshold, as defined in Equation (6).
Link interference determines the performance of the connected link among consecutive nodes. The link interference is the combination of the data lost DL and error computation EC, as given in Equation (7).
Whenever either data loss or the error ratio increases, the link performance obtained the least priority, and such a link is avoided from consideration in a communication system. To determine the latency time for a particular link, the proposed system utilizes the round-trip time (RTT) in flooding of some beacon messages, m. Thus, l_t can be determined, as given in Equation (8).
Moreover, in the proposed system, the outcome of all the metrics is forwarded to the SDN controller, and it creates a record of the individual route. The proposed system explores the intelligence of the SDN controller, which, whenever the value of the computed metrics decreases to a certain threshold, sends the reformulation of a route with the support of an edge device. The proposed system uses the Krushkal algorithm to construct a routing path with a minimum weighted cost: i. Firstly, the source node selects the edge from its neighbor based on the minimum weighted cost min(w_i) ii.
Moreover, it is continuously monitored so that the selected edge does not create a loop. iii.
Finally, the execution of the Krushkal algorithm stops if edges m − 1 are included in the route. Figure 2 depicts the flowchart of the proposed system in terms of subgraph-based data transmission for IoT networks. The proposed system comprised two main components. First, each node in the network initialization process needs to be registered with the nearest gateways. Later, nodes are organized into undirected weighted graphs and based on the optimal condition, and the proposed system extracts various spanning trees. Among these spanning trees, the proposed system selects the minimum one for routing the IoT data with the support of gateways.  Figure 2 depicts the flowchart of the proposed system in terms of subgraph-ba data transmission for IoT networks. The proposed system comprised two main com nents. First, each node in the network initialization process needs to be registered with nearest gateways. Later, nodes are organized into undirected weighted graphs and ba on the optimal condition, and the proposed system extracts various spanning tr Among these spanning trees, the proposed system selects the minimum one for rout the IoT data with the support of gateways.

IoT-Security with SDN Architecture
The proposed system provides the security for a two-tier architecture. In the f phase, nodes establish secure sessions with gateway nodes, and in the second phase g way nodes communicate securely with SDN using the collaboration of edge devices. main security measurements and computing costs are performed in the SDN control In the beginning, the sensor nodes are requested by edge nodes so their information   Figure 2 depicts the flowchart of the proposed system in terms of subgraph-based data transmission for IoT networks. The proposed system comprised two main components. First, each node in the network initialization process needs to be registered with the nearest gateways. Later, nodes are organized into undirected weighted graphs and based on the optimal condition, and the proposed system extracts various spanning trees. Among these spanning trees, the proposed system selects the minimum one for routing the IoT data with the support of gateways.

IoT-Security with SDN Architecture
The proposed system provides the security for a two-tier architecture. In the first phase, nodes establish secure sessions with gateway nodes, and in the second phase gateway nodes communicate securely with SDN using the collaboration of edge devices. The main security measurements and computing costs are performed in the SDN controller. In the beginning, the sensor nodes are requested by edge nodes so their information can

IoT-Security with SDN Architecture
The proposed system provides the security for a two-tier architecture. In the first phase, nodes establish secure sessions with gateway nodes, and in the second phase gateway nodes communicate securely with SDN using the collaboration of edge devices. The main security measurements and computing costs are performed in the SDN controller. In the beginning, the sensor nodes are requested by edge nodes so their information can be registered in the SDN controller. The registration packet RQ is composed of node identity Nid, energy Nenergy, and time stamp TS fields, as given in Equation (9). RQ = (Nid, Nenergy, TS) Inside the table, the SDN controller also stores the neighbor identities. In the proposed system, the SDN controller acts as a key distribution center (KDC) and also has global knowledge of the entire network. Once the SDN controller receives the request of the nodes, it verifies their identities using its table. If they are authentic, the SDN controller generates secret keys s_k for ni nodes that are digitally signed by its master key MK, as given below.
Upon receiving the keys, nodes verify them, and once the outcome is positive, the node registers itself in the blockchain. The blockchain is the combination of the hash values in the form of a chain, and this technology is executed until the entire route is fully secured against privacy and integrity attacks. The chain comprises various data blocks, and each block is separately encrypted with digital signs to ensure its authentication. Each device uses the principle of blockchain in a distributed manner and provides the system with the highest degree of reliability. The encryption of each block is performed with a one-time pad and data bits key by using the xor operation. The digital hashes offer the integrity of the devices. Any third-party or intermediate device is not permitted to access the IoT data until it has permission. The data-originating node can control its data and in which way it can be accessed by other devices. Figure 3 illustrates the working principle of the proposed system for ensuring security with the support of SDN controllers. On receiving the IoT data, the gateways further forward it to the edge layer for reducing the response time. Moreover, the data are also verified at edge devices, and, accordingly, the information regarding the data and the network is sent to the SDN controller. In this way, the SDN controller keeps the updated information about the network, and, if in any case, the performance is unsatisfactory, the SDN controller sends the warning message to the edge device to reformulate the routing process. After completing the routing phase and authentication processes, the proposed system explores blockchain technology, and nodes register themselves in the chain to ensure integrity with privacy.
be registered in the SDN controller. The registration packet is composed of nod identity , energy , and time stamp fields, as given in Equation (9). = ( , , ) ( Inside the table, the SDN controller also stores the neighbor identities. In the propose system, the SDN controller acts as a key distribution center (KDC) and also has glob knowledge of the entire network. Once the SDN controller receives the request of th nodes, it verifies their identities using its table. If they are authentic, the SDN controll generates secret keys _ for nodes that are digitally signed by its master key as given below.
Upon receiving the keys, nodes verify them, and once the outcome is positive, the nod registers itself in the blockchain. The blockchain is the combination of the hash values the form of a chain, and this technology is executed until the entire route is fully secure against privacy and integrity attacks. The chain comprises various data blocks, and eac block is separately encrypted with digital signs to ensure its authentication. Each devi uses the principle of blockchain in a distributed manner and provides the system with th highest degree of reliability. The encryption of each block is performed with a one-tim pad and data bits key by using the xor operation. The digital hashes offer the integrity the devices. Any third-party or intermediate device is not permitted to access the IoT da until it has permission. The data-originating node can control its data and in which wa it can be accessed by other devices. Figure 3 illustrates the working principle of the pr posed system for ensuring security with the support of SDN controllers. On receiving th IoT data, the gateways further forward it to the edge layer for reducing the response tim Moreover, the data are also verified at edge devices, and, accordingly, the informatio regarding the data and the network is sent to the SDN controller. In this way, the SD controller keeps the updated information about the network, and, if in any case, the pe formance is unsatisfactory, the SDN controller sends the warning message to the edg device to reformulate the routing process. After completing the routing phase and authe tication processes, the proposed system explores blockchain technology, and nodes regi ter themselves in the chain to ensure integrity with privacy.

Simulations
This section explains the proposed system's network design and evaluation resul and other work. We simulated the network environment based on the varying size of da and the number of nodes. Nodes were deployed randomly with gateway and edge node SDN controllers had no limitations in terms of constraints. We tested the experiments o a Core i7 laptop on Ubuntu operating with 32 GB RAM and 1 TB hard drive. The resul

Simulations
This section explains the proposed system's network design and evaluation results and other work. We simulated the network environment based on the varying size of data and the number of nodes. Nodes were deployed randomly with gateway and edge nodes. SDN controllers had no limitations in terms of constraints. We tested the experiments on a Core i7 laptop on Ubuntu operating with 32 GB RAM and 1 TB hard drive. The results were evaluated for throughput, packet drop ratio, propagation delay, and node overhead. The simulations were run with 75 to 375 nodes, and data sizes varied from 10 to 50 KB. The simulation was run for 5000 s. Nodes had a homogeneous structure in terms of resources. However, the initial energy of the nodes starts from 3j to 6j. We performed 15 simulations to evaluate the results. The transmission power of the nodes was fixed to 10 m. The network dimension was set to 5000 m × 5000 m. The number of gateways and edge devices was set to 10 and 5. Malicious nodes were also distributed in the simulated environment to evaluate the proposed system's link interruption and data accuracy performance. Table 1 shows the simulation parameters that were utilized in the experiments.

Results and Discussion
This section provides the experimental discussion in terms of various network metrics. The evaluation metrics are considered throughput, packet drop ratio, propagation delay, and node overhead. In terms of network throughput, the proposed system performed better than the previous work, as shown in Figure 4a,b. The proposed system significantly increased network throughput by an average of 19% and 22%, respectively, as shown by the experiment's findings. This is because the proposed system uses graph theory and extracts the spanning trees based on the minimum cost. Moreover, the routes were updated by exploring the link lost rate and latency parameters. It provided the timely delivery of actual data packets with efficient bandwidth utilization. The proposed security algorithm also increased the system's strength using private keys and eliminated the false packets from the actual data. Figure 5a,b compare the performance result of the proposed system with related solutions in terms of propagation delay. It was observed that as nodes and data sizes increased, the propagation delay also increases. However, the experimental results show that the proposed system improved the propagation delay by 19% and 31% on average. This was due to the artificial intelligence approach and computing of the cost function for determining optimal routes. Furthermore, the subgraphs offered the shortest routes with link evaluation and led to a lower cost for the communication channels. Moreover, the proposed system minimized most harmful attacks from the IoT layer, and edge devices intelligently secured channels towards the SDN controller. Figure 6a,b illustrate how the SDS-GIoT protocol outperformed in contrast to other solutions in terms of the packet drop ratio. The performance results illustrate that when the number of nodes and data sizes grew, the packet loss fraction also rose. However, compared to other related work, the proposed system reduced packet loss rates by an average of 39% and 41%. This is because network resources are managed well, and the system is trained using graph theory principles. Moreover, the SDN controller continuously monitors the network flow and, whenever the performance is not satisfied, the SDN controller gives instructions to the edge device to reroute the data using various conditions. Furthermore, routing tables were updated, and those nodes were removed by the SDN controller, whose energy was less than the threshold. In comparison to the majority of the related work, the communication links were regularly monitored for latency and data loss. Whenever a harmful activity was carried out, the relevant warning messages were logged in the forwarding tables, and nodes were notified about the situation. The experimental findings of the proposed system are compared with other work in terms of nodes overhead, as illustrated in Figure 7a,b. It was observed that the node overhead increased as the number of nodes and data sizes increased. However, the proposed system balanced the energy load on the nodes and accordingly reduced the excessive overheads for the network. It was noticed that the proposed system improved the nodes' overhead by an average of 28% and 37%, respectively. This is because of the use of intelligent computing, which increased the stability of the IoT network with the collaboration of edge computing.
Furthermore, the proposed system balanced network traffic load using SDN controller monitoring. The SDN controller had all the information about the network due to exploring the agents' capabilities. Accordingly, it efficiently decreased the additional overhead on the nodes and links for formulating routing paths. Moreover, SDN acts as a KDC and further minimized the overhead on the constraint nodes to ensure data security.
that the node overhead increased as the number of nodes and data sizes incr ever, the proposed system balanced the energy load on the nodes and acc duced the excessive overheads for the network. It was noticed that the prop improved the nodes' overhead by an average of 28% and 37%, respectively cause of the use of intelligent computing, which increased the stability of the with the collaboration of edge computing.
Furthermore, the proposed system balanced network traffic load using S ler monitoring. The SDN controller had all the information about the networ ploring the agents' capabilities. Accordingly, it efficiently decreased the add head on the nodes and links for formulating routing paths. Moreover, SDN a and further minimized the overhead on the constraint nodes to ensure data s

Conclusions
The IoT provides significant growth in the development of smart things and applications. It combines with sensors, gateways, and many network services to provide an efficient communication system. However, most of the proposed solutions in the literature

Conclusions
The IoT provides significant growth in the development of smart things and applications. It combines with sensors, gateways, and many network services to provide an efficient communication system. However, most of the proposed solutions in the literature