1 Introduction

To support Internet communities, the IoE connects a huge number of smart communication objects and integrates them with heterogeneous networks [1, 2]. They develop many critical applications such as smart buildings, security, target tracking, industrial automation, etc. A wireless sensor network (WSN) typically comprises thousands of small, low-cost sensor nodes with limited computing, communication, memory, and power capabilities [3, 4]]. Such technologies are one of the many viable data sources for network systems and produce a massive amount of data. Emerging 5G and beyond networks have been proposed to offer connectivity for enormous devices and the Internet of Things (IoT), which can be widely referred to as an IoE. With these next-generation networks, massive amounts of data will be produced, processed, stored, and shared everywhere, at any time [5, 6]. Recently, cloud computing has become crucial because of the constantly growing IoT network [7, 8]. It remains the best approach for performing complex and high-cost computations. Moreover, provides scalable solutions for huge data processing. However, data latency and privacy are some major research objectives in the cloud-based paradigm. Many machine learning-based methods have been proposed to solve the process of data aggregation and routing issues for IoT-based constraint networks and drastically reduce the disturbance of wireless channels [9,10,11]. However, the collaboration of heterogeneous IoE demands for edge computing to bring the data processing closer towards the source network. Furthermore, as all the devices are operated on the open medium and they are accessble through entire channel, thus, providing security is also an essential functionality for such communication technologies. Although edge networks are offering maintainable and timely data delivery performance for wireless technologies, it is prone to network threats and compromised sensitive information with unauthorized devices association [12,13,14]. Thus, with the rising complexity of IoE deployment, we require a lightweight solution that can detect communication irregularities and provide an alternate paradigm for their successful accomplishment. The goal of this research is to demonstrate considerable performance for IoE-based applications in the effective management of heterogeneous resources, energy efficiency, bandwidth requirements, and privacy. This research reveals smart big data management using a secured cloud-edge system. Through load balancing, it controls the network's resources and evenly distributes the communication tasks across connected devices. This paper outline the contributions as follows.

  1. i.

    It develops an effective routing technique that facilitates intelligent communication for IoE services using particle swarm optimization. The fitness function effectively generates quality-aware routes.

  2. ii.

    The proposed system maintains a high computing solution that keeps data flowing effectively and conserves energy through the use of mobile edge devices and artificial intelligence techniques. It not only lessens the chances of data loss but simultaneously manages the timely delivery.

  3. iii.

    In addition, the mobile edges offer a harmless method for data aggregation, storage, and processing to increase trust in cloud systems.

  4. iv.

    Extensive experiments show the efficacy of the proposed protocol for managing network resources and data accessibility.

The rest of the research paper is organized as follows. Section 2 underlines the related work. Section 3 formulates the problem statement. Section 4 discusses the detail of the proposed protocol and its working stages. Section 5 exhibits the experimental results along with their comparison against the existing solution. In the end, Sect. 6 provides the conclusion and future work.

2 Related work

Edge computing provides valuable services for advanced development in IoE-enabled technologies. It controls the topology and data management near the cloud system and efficiently manages the resource distribution [15, 16]. However, smart devices [17, 18] offer real-time data aggregation and improve performance in a distributed manner. However, many solutions often fail to meet remote users' rising demands, especially for big data management with the least computing power and security for constraint nodes [19, 20]. Thus, many recent solutions explore network edges for manipulating operations and attaining a high response time [21,22,23]. Authors in [24], proposed fog-based healthcare for decreasing energy consumption with improved delivery delay. Its performance is evaluated in terms of network delay and energy usage with the cloud-based solution and experimental results demonstrate the better performance of the proposed solution. Moreover, it also suggested significant methods for improving the management of fog devices, especially in healthcare solutions.

The authors [25], the authors proposed an efficient WSN model for Adaptive Coverage and Connectivity (ACC) to provide optimum coverage for all target items, whereas the mathematical model assures coverage rate. Furthermore, its second strategy addresses network connection and energy usage. Unlike current systems, the proposed ACC plan can maintain the network for a long period with improved delivery performance. Numerous fields, including object recognition, WSNs, image processing, environment mapping, and localization, have made extensive use of data mining. WSN is being used by the IoT as a crucial platform for data sensing and communication. On the collected sampled by sensor nodes, mining of spatial and temporal data is carried out for efficiency. This research [26], therefore, proposes a redundancy removal approach that minings the acquired data to choose the appropriate data before forwarding it to a base station or a cluster head (CH) in the WSN. Numerous simulations were run, and the resulting data demonstrated that the proposed solution performed better than competing schemes.

In [27], a unique IC-MADS, a lightweight cross-layer trust computing approach, was proposed for man-in-a-middle attack (MIMA). Two key contributions to the IC-MADS are cross-layer attack detection and energy-efficient clustering. The CH selection algorithm was proposed by utilizing a probabilistic computation and evaluation method. The probability of each sensor node is calculated using variables such as residual energy, base station distance, and node degree factors. The CH is determined by the node with the highest probability value. This fixes the load balancing and energy imbalance issues. To identify MIMA attackers in the network, node evaluation was introduced using the cross-layer trust evaluation approach. The threshold value is compared against the aggregated values of the trust for each sensor node to determine whether the node is an attacker or not. The energy-efficient hierarchical routing protocol for wireless sensor networks based on fog computing (EEHFC) is proposed by the authors [28] and aims to improve data transmission with effective energy consumption. Because fog computing can maximize the limited power supply of WSNs and scale to meet the demands of IoT applications, it is included in the proposed protocol. Additionally, it enhanced the ant colony optimization algorithm that may be utilized to produce the optimal path for sensor nodes with efficient network transmissions.

Authors in [29] suggested a Cloud-IoMT-based big data analytics framework. The data from wearable sensors such as body temperature, glucose, heartbeat, and chest were sent to an integrated cloud with a data analytics layer. Data acquired during COVID-19 monitoring and surveillance may be processed in parallel using Hadoop MapReduce cloud database technologies. With IoMT devices connected to the cloud and powerful data analytics layer, clinicians can quickly track, evaluate, and approve data from various wearable sensors. It may assist monitor patient health issues internationally, reducing workloads and stress on healthcare providers, and improving medical diagnostic and treatment outcomes. In [30], Ambient Intelligence assisted Health Monitoring System (AmIHMS) with the Internet of things is proposed to monitor the students' health. With the Ami environment, the constraint sensor nodes are explored for collecting medical data. Furthermore, the cloud handles the big data and transferring to network users with a manageable network structure. Based on simulation results, it was observed that the proposed AmIHMS improves the data reliability and accessibility of other popular methods. Table 1 summarizes the limiations and contributions of the recent work.

Table 1 Summarization of related discussion

3 Problem statement

IoT systems have been extensively used to produce several reliable applications with some level of intelligence. Additionally, edge computing manages the reduction of data routing latency toward cloud services. It has been observed that numerous solutions have been presented to enhance the functionality of IoT networks but at the expense of significant data loss and frequent route failures. The majority of solutions reduce the response time for emergency operations, are unable to handle high-density traffic across restricted devices, and inefficiently use the system's capacity. Furthermore, many hardware-oriented communication systems make extensive use of sensor-based systems with IoT-cloud computing. However, providing security is a significant research challenge for heterogeneous applications, especially in mobile networks.

4 Proposed protocol

This section divides the working processes of the proposed protocol into the following sub-sections. Also, it comprised diagrammatical notations and algorithms for the developed components.

4.1 Overview

In this section, we first present a brief introduction of the SDM-DLB protocol, and later its developed components are discussed. It is made up of numerous sensors that are randomly deployed. The edge devices provide intermediate-level services between sensors and cloud platforms. Edge devices are mobile and require all the information regarding the network region. In the proposed SDM-DLB protocol, sensors flood their initial information to edge devices, and accordingly, they maintain the local schema in memory. Each edge device only stores the information of those sensors that are in their radius range. The edge devices provide two main functionalities. Firstly, all the smart data collected from sensors are collected and aggregated on network edges. Secondly, not only data is aggregated on network edges, but on the other side, the authenticity of incoming data is also verified. Using artificial intelligence techniques, the proposed SDM-DLB protocol determines the optimized solution in iterations. Figure 1 illustrates the developed components of the proposed system. It has three main components; system setup, artificial intelligence optimization, and edge computing-enabled security. The system setup, sensors, edges, and other devices are deployed in the communication field and initially, all the feasible solutions are identified. The second component extracted random solutions and explored fitness functions using an iterative process to compute the global with an optimal solution. In the end, sensors and edge devices are secured against privacy and security attacks, which ensures a reliable communication network and increases the authenticity of trusted data.

Fig. 1
figure 1

Working components of the proposed SDM-DLB protocol

4.2 Secured and intelligent sensing distributed protocol with cloud-edge

In this section, we present the detail and description of the processes that are developed for the proposed protocol. It offers an energy-efficient optimal solution for heterogeneous devices using an artificial intelligence approach. The proposed protocol aims to decrease the communication cost with a minimum length taken by the source node regarding forwarding the IoE data towards network edges. Also, it provides an efficient data sensing solution and intelligently identified the data threats. In the beginning, the sensor nodes identify their neighboring list using its transmission power. If no neighbors are identified, the sensor increases its transmission power by amount α and recomputes the neighboring list. Once neighbors are determined, then they need to share their information such as identity \(ID\), energy \(e\), location \(l,\) and memory space \(m\) towards the source node. Accordingly, the source node stores the obtained information inside its local memory. Additionally, the same information is forwarded towards mobile edges to maintain the structure for global data. In the proposed SDM-DLB protocol, nodes execute particle swarm optimization algorithms collaboratively to extract the optimized forwarders for sending collected data toward network edges. PSO is an iterative learning procedure that measures the changes of network parameter by computing the cost function for a feasible solution [31]. It is a stochastic-based optimization technique that utilizes the intelligence and movement of swarms. In PSO, the concept of interface between agents is explored for solving a problem and offering the optimal solution by reducing the search space. For example, let us consider \(N\) is the number of sensors if we are at node \(x\) ε \(N\), then goal state \(g\) can be defined as Eq. 1.

$$x \to g:f(x),\,m(x,y)$$
(1)

where \(f(x)\) is the set of initial feasible solutions (\({t}_{1}, {t}_{2}, \ldots, {t}_{k}\)), and \(m( x, y)\) is the cost value. To determine the set of intermediate forwarders \(y{^{\prime}}\) from source node \(x\) to goal state \(g\), the process is defined in Eq. 2.

$$m\left( x, y\right)=g\left(m\left(x, {y}^{^{\prime}}\right) \right| {y}^{^{\prime}}\varepsilon f(x))$$
(2)

For each solution, a fitness value \(f(t)\) is determined by using collected information and advertising the computed value. \(f(t)\) is determined using weighted computing based on energy \(e\) and channel reliability \({c}_{r},\) as defined in Eq. 3.

$$max f\left(t\right)=\alpha .e+\beta .{c}_{r}$$
(3)

where

$${c}_{r}=1/{Round}_{time} + 1/{path}_{length}$$
(4)

\(f(t)\) value is utilized to compute the local best \(LB\) and global best \(GB\) for the initial solutions. In case, if the computed \(LB\) is better than the previous \(LB\) in history then the current \(\mathrm{LB}\) value is set as a new \(LB\). However, \(GB\) is the best value of the optimal global solution.

To attain security and mutual authentication between mobile edges and sensors, random numbers, and public keys are utilized, as given below.

$${s\to {n}_{i}:E}_{{n}_{i}}({r}_{i}, {e}_{id})$$
(5)
$${{n}_{i}\to s: E}_{si}({r}_{i}, {r}_{j})$$
(6)
$${s\to {n}_{i}: E}_{{n}_{i}}({r}_{j})$$
(7)

Initially, the edge device sends an encrypted message using the node's public key \({n}_{i}\). The encrypted message comprised of a random number \({r}_{i}\) and identity of the edge device \({e}_{id}\). The node \({n}_{i}\) recovers the random number \({r}_{i}\) from message derived from Eq. 5 and returns a random number \({r}_{j}\) by using public key of edge device si, as defined in Eq. 6. Afterward, the edge device resends the encrypted random number \({r}_{j}\) to the node \({n}_{i}\) as defined in Eq. 7. Accordingly, edge device \({e}_{id}\) and node \({n}_{i}\) jointly authenticate each other using encrypted random numbers. To generate the session key \({s}_{k}\) between \({n}_{i}\) and \({e}_{id}\), the non-reversible function \(f\) is used as given in Eq. 8.

$${S}_{k}:f({r}_{i}, {r}_{j})$$
(8)

Now, using Eq. 9, data encryption E is obtained for the message \({d}_{i}\) and session key \({S}_{k}.\)

$${E}\left({d}_{i}\right)={d}_{i}\oplus {S}_{k}$$
(9)

4.3 Edge-cloud communication with authentication and data security

This section presents the working of SDM-DLB protocol to secure and authentic communication of edges and cloud servers. It explores the Blum-Blum-Shub pseudorandom bit generator [32] based on Eq. 10.

$${X}_{n+1}= {X}_{n}^{2}mod m$$
(10)

where \({\mathrm{X}}_{\mathrm{n}}\) is the generated secret key for the edge device a \({e}_{id}\) and cloud server \(c\). \(m\) is the product of two large prime \(p\) and \(q\). \({X}_{0}\) is the seed integer value and co-prime to \(m\). After generating the secret key, the cloud server \(c\) further encrypts it using master key \(K\) and concatenates a timestamp as defined in Eq. 11.

$${c\to e}_{id}: {E}_{K}{(X}_{n},\mathrm{t})$$
(11)

The edge device \({e}_{id}\) obtained the encrypted secret key \(X_n\) and recovered it using the master key of cloud server \(c\), after decrypting process the edge device \({e}_{id}\) verifies the authenticity of cloud server \(c\). Afterward, the data encryption is obtained for the message \({d}_{i}\) by computing the xor operation using the secret key \(X_n\) as given in Eq. 12.

$$E: xor(X_n , d_i)$$
(12)

Figures 2 and 3 show the functionalities of the SDM-DLB protocol. The PSO method is used during the iteration process to achieve effective routing and detection of link failure. It provides low latency, energy-efficient edge environment and enables network architecture for accessing required information closer to the source nodes. Additionally, the optimal local and global evaluations provide reliable outcomes by examining fitness functions with trustworthy energy and channel characteristics. Both the RTT and loss probability cope with identifying more trustable channels from the identified solutions and increase resource efficient utilization with edge computing. In addition to providing timely large data collection from the IoE environment, the mobile edges also play a crucial intermediary function in overcoming data security. In the proposed system, mobile edges cooperate with the IoE network and cloud-based technologies to produce shared random numbers using encrypted secret keys. It provides a secure way for nodes' negotiations and avoids the possibility of hostile machines recovering the network data. As a result, it explored an intelligent communication model with high bandwidth and secure access to assure reliable smart facilities. Algorithm 1 governs the procedural steps for the development of the SDM-DLB protocol.

Fig. 2
figure 2

Workflow of the IoE edge routing

Fig. 3
figure 3

Workflow of the node negotiation with security

figure f

5 Experimental discussion

This section presents the experimental environment and discussion on results. The proposed SDM-DLB protocol is analyzed and verified using simulation tests. Sensors are randomly distributed over the dimension size 1000 m × 1000 m. The transmission range of distributed sensors is set to 10 m. All the sensors are mobile and send their latest position periodically. Initially, the nodes are set for initial energy with 5 J. We supposed 2 static sink nodes. Edge devices are 20 in number and periodically flood the positioning messages to advertise their latest location. We deployed malicious nodes with 2 to 10 in number. The malicious nodes are abnormal that are compromised by network threats and attackers. Such nodes send frequent irrelevant data on the communication channels and make them congested. Also, they can drop the data packets over the transmission medium. The packet size is set as 32 bytes. The number of sensors are varying from 200 to 1000. The speed of the deployed sensors is varying from 10 to 50 m/s. Table 2 illustrates the parameters of the simulation configuration. The proposed SDM-DLB protocol is tested based on energy consumption, end-to-end delay, network cost, and success rate performance metrics.

Table 2 Simulation parameters

In terms of energy consumption, we compared the performance of the proposed SDM-DLB protocol to the existing solution. Figure 4a and b depict the assessment of the proposed SDM-DLB protocol and related work, and it is noticed that the proposed solution increases the efficiency of energy use by 19% and 22% on average in terms of varying sensors and their mobility speed. On the other hand, it has been observed that the energy consumption rate increases as the number of devices increases. Nevertheless, the SDM-DLB protocol provides an intelligent energy solution using a fitness function by integrating the channels' reliability and selection of updated routes based on local optimality. Due to the low number of control messages and retransmissions, the proposed SDM-DLB protocol also offers uniform energy consumption for the IoT network and improves network stability. Additionally, routing strategies are only altered when network edges become aware of the unstable condition of the network.

Fig. 4
figure 4

a Energy consumption with varying sensors, b Energy consumption with varying speed of sensors

The evaluation of the proposed SDM-DLB protocol and existing solutions is shown in Fig. 5a and b, and it was found that the proposed SDM-DLB protocol impressively reduces the end-to-end delay by 17% and 18% as an average for varying sensors and their mobility speed. It is because edge devices have been integrated over the targeting area's perimeter and can handle the quick transport of sensor data to cloud systems using the intelligent decision of the PSO algorithm. Additionally, eliminating the overburdened nodes from routing decisions highly increases the route's lifetime and accordingly, it improves the delivery of messages. The edges between IoT sensors and cloud systems deliver the collected timely and made the decision system closer to the source nodes. Also, congested links are coped using channel reliability parameters, and only such nodes are incorporated in routing processes whose success rate is high. Moreover, the security solution decreases unwanted traffic across the open transmission system and stops malicious devices from sending false routing messages and requests.

Fig. 5
figure 5

a End-to-end delay with varying sensors, b End-to-end delay with varying speed of sensors

In terms of network complexity, Fig. 6a and b demonstrate the performance assessment of the proposed SDM-DLB protocol for varying sensors with their mobility speed. Observations indicate that the proposed SDM-DLB protocol lowers the ratio of network cost in terms of flooding of malicious packets and drop rate as compared to other work. It was revealed that performance was improved by an average of 14% to 17% respectively in the presence of malicious nodes. It is a result of the devices' mutual authentication by utilizing the generation of random numbers and the production of private/public keys. Also, security measurement helps the routing process to reduce the harmful attacks for the proposed SDM-DLB protocol, and ultimately decreases the additional data retransmission. The random numbers and secret keys facilitate the rapid verification of unsafe devices and the accomplishment of the IoE system's data availability. In addition, the edge devices are more resilient and operate as a supervisor for sensor data arriving from constrained devices; after appropriate authentication, the obtained data is sent to the application user with the computing intelligence.

Fig. 6
figure 6

a Network cost with varying sensors, b Network cost with varying speed of sensors

The success rate of the proposed SDM-DLB protocol and the existing solutions is shown in Fig. 7a and b. The proposed SDM-DLB protocol increases the delivery ratio as compared to other work by an average of 15% and 16% under various sensors and their speed. This is because the proposed SDM-DLB protocol employs a PSO for effectively learning the communication process using the fitness function, and regulating the power distribution among sensors. The iterative process of PSO learning supports the IoE networks with the capacity to formulate more robust and efficient routing paths. Moreover, the intelligent decision-making composite function reduces the probability of data loss and interruption. The proposed SDM-DLB protocol reevaluates routing paths wherever malicious entry is found by processing the route request packets and accordingly it discarding the risk indicators.

Fig. 7
figure 7

a Success rate with varying sensors, b Success rate with varying speed of sensors

6 Conclusion

This study describes a secured and intelligent solution for dynamic application environments based on the IoE. Utilizing cloud-edge computing, it promises to deliver high-performance computing approach with efficient resource management and load balancing. In addition, the proposed protocol found efficient solutions with the optimal local and global fitness functions using the PSO approach. The fitness function employs the energy and channel’s reliability parameters to provide a stable network connection with minimal latency. In addition, network edges preserve data collection and storage against network threats while imposing minute costs on distributed and restricted hardware devices. A system with efficient nodes’ decision-making and the provision of trusted services in a realistic situation is offered to control real-time activities. Extensive testing was conducted, and the findings demonstrated that the proposed protocol significantly improved than existing work. In future studies, we will incorporate deep learning to train the proposed protocol and overcome distributed security attacks.