# Adaptive Clustering Algorithm for IIoT Based Mobile Opportunistic Networks

Authors: Yan Zhao; Farzana Akter
Journal: Security and Communication Networks
 (2022)

---

## Abstract

The clustering algorithms play a crucial role for energy saving solutions in mobile opportunistic networks. If the selection of cluster head is made appropriately, then the energy can be consumed optimally. The existing clustering algorithms do not consider the optimal selection of the cluster head resulting in low survival rates and high energy consumption rates in nodes. The adaptive clustering is required in Industrial Internet of Things (IIoT) based sophisticated networks where seamless connectivity is imperative for rapid communication. In order to meet this research gap, an adaptive clustering algorithm for mobile opportunistic networks is proposed within military bases that uses a heuristic algorithm (GA) for adaptive clustering. An analysis of the opportunity network at the connected military base is carried out and the mobile opportunity model is constructed using the adaptive clustering for the similar traffic. In a mobile machine network, the next hop node is determined by the node clustering principle. A LEACH clustering protocol enables communication between cluster heads and base stations based on single-hop and multihop cluster nodes. In order to perform adaptive clustering of mobile network nodes based on network partitioning and scheduling of clusters, genetic algorithms are used. The proposed approach can be applied to the IIoT systems in places where adaptive clustering is required to optimize energy consumption, to reduce latency rates, and to enhance the throughput of mobile networks. The experimental findings suggest that the proposed adaptive strategy is capable of optimizing energy consumption rates, reducing network latency, and boosting efficiency by increasing throughput in mobile opportunistic networks.


---

## Body

## 1. Introduction

The expansion of information and mobile technologies has brought great convenience to the lives of common people and industry [1]. The emergence of mobile networks and wireless networks has changed the conventional ways of industry systems to perform security oriented actions [2]. In the wireless network environment, there are many types of networks such as wireless sensor networks, ad hoc networks, social networks, mobile networks, and content based networks [3]. Mobile opportunistic Networks are the self-organizing latency tolerant networks which are attaining popularity these days due to their underlying structure [4]. The characteristic of having no preplanned transmission path between the source node and the destination node makes it different from fixed path selection networks where the information transmission is completed by the movement of the two nodes [5]. Mobile machine network has many application scenarios such as handheld device networking, vehicle networking, field data collection, and industry based security actions [6].An opportunistic network is one that is made up of linked nodes in wireless environment [7]. Walking distance is the maximum communication range between two linked nodes. Nodes are only momentarily linked and the network architecture may change as a result of node mobility or node activation/deactivation [8]. Opportunistic network is a kind of self-organized network [9] which does not need to have a complete link between the source node and the target node. The topology of an opportunistic network is changing spontaneously based on the prevailing scenarios [10]. The links are often interrupted and the network is often in an unreachable state, so nodes transmit information in a “store-port-forward” mode. The network has at least the following features:(i)
The finding of nodes: a network node can find additional network nodes that are within the direct communication range.(ii)
Message exchange with one hop: a node can transmit and receive any data to and from any other node within direct communication range.These characteristics of opportunistic network make traditional routing protocols and congestion control strategies incapable to suffice for the needs of opportunistic network environment [11]. It brings great challenges to routing design and congestion design while handling the nodes in mobile opportunistic networks [12]. In the existing literature, interference free clustering algorithms for mobile opportunistic networks (MONs) based on multiobjective optimization are proposed [13]. On the premise of ensuring no communication interference between clusters, many algorithms take network energy consumption and network coverage as optimization objectives [14]. The evolutionary and swarm intelligence based techniques are used in the existing literature to save energy in MONs [15]. Through simulation experiments, the influence of the number of nodes, the number of monitoring points, the communication radius, and the coverage radius of nodes on the results of adaptive clustering is determined. The network coverage after noninterference adaptive clustering is also analyzed [16]. The multiparameter weighted adaptive clustering algorithms are also proposed to locate the cluster head appropriately [17]. The adaptive clustering index based algorithms are also introduced into the weighted adaptive clustering algorithms where the link retention rate, node degree difference, and node residual energy are optimized [18]. Considering these four parameters, the network node with the maximum weight is selected as the cluster head by weighted combination. The above traditional methods combined with the characteristics of mobile opportunistic network designed and developed a variety of routing and forwarding algorithms and achieved progressive results [19]. However, many existing approaches provide energy saving solutions to MONs but in the process of data transmission, there are still problems such as underutilization of the network resources, high transmission security risk, and insufficient transmission performance. Therefore this paper proposes a new approach based on adaptive clustering for MONs to save energy.The major highlights are given below:(i)
In order to prolong the network lifetime, to reduce the underutilization of resources, and to increase the node survival rate, an adaptive clustering algorithm based on genetic algorithm (GA) is proposed.(ii)
A mobile opportunity model is designed to handle the changing environments and frequent changes of topologies.(iii)
The adaptive clustering method determines the members of the cluster according to the received signal strength and node connectivity of the nodes in the network.(iv)
A mechanism for single-hop and multiple-hop selection is devised in the proposed approach.(v)
LEACH clustering protocol is deployed to handle the random changes in the mobile opportunistic network.(vi)
The GA based adaptive approach is proposed to schedule the clustering tasks in an efficient manner. The results are obtained against energy consumption, network latency, and throughput to check the efficacy of the proposed model in IIoT based mobile networks.The paper is structured into five phases. It begins with the introduction, followed by the literature review. Then the proposed methods are described, followed by the discussion on the results. Finally, this article concludes the work presented in the paper.


## 2. Literature Review

The existing literature is studied for energy saving solutions based on clustering algorithms. There are many approaches which attempt to save energy in mobile opportunistic networks as discussed in this section.The authors in [1] explore the existing algorithms for saving energy in wireless networks. The existing algorithms are examined and investigated, and then these algorithms are modified to produce better output in terms of reduction in consumption of energy in wireless networks. In [2], an adaptive and incremental training method is proposed for clustering process to save energy in WSNs. The proposed incremental process assists in training the data incrementally by selecting the incoming data from batches. The suggested incremental clustering method improves the accuracy of clustering and achieves better performance than the comparative approaches. The hierarchical clustering (HC) is known as powerful method for clustering of data and for extracting relevant information from the pool of data [3]. The recent advances in HC are allowing the usage of HC methods in wireless networks and opportunistic networks for faster processing of data and for saving the energy during communications. This article is proposing a divisive HC method and shows appropriate tree structure of data based on improved hierarchical clustering.In [4], a multilayer clustering strategy using capability weights is presented. The clustering is performed on the basis of dynamic changes in the network such as cluster density, node load, and residual energy. The weights are allocated as per the load on the nodes and the weights are subject to change on the basis of load on the nodes. The clusters are made dynamically. The proposed strategy reduces the load on the nodes by distributing the load as per the cluster head and it also improves the overall performance of the wireless network. In [5], the authors demonstrate that the opportunistic networks are effective representations for understanding and modeling complicated real-world phenomena. These networks are scale-free and dense in nature, and their degree distribution increases over the time. This research proposes a new expanding network model that generates dense scale-free networks with dynamically produced cutoffs. The link creation rule is based on a weak kind of preferred attachment that is based solely on the order connections between node degrees. The outcome proves accuracy in clustering. In [8], the authors describe interclustering technique for big-data communications which is based on energy saving technique. The data communication requires the speed and safety. The accuracy in clustering techniques allows the faster data transmission and safe transmission of data.In [9], the authors have proposed an energy efficient intracluster scheme for WSNs where a layered algorithm based on the energy density of the cluster is utilized to solve the problem of multihop path selection and data communication. In [10], the method in relay nodes is designed to protect the normal nodes’ privacy information and cluster heads’ information. The evaluation results show that the proposed scheme can securely transmit a large number of data packets while dissipating very little energy. In [11], the authors conduct a detailed security analysis of LEACH++ against black-hole, sink-hole, and selective forwarding attacks using a variety of attack patterns by forming accurate clusters. When the proposed method is compared to the existing anomaly-based detection schemes, the results of the experiments in network simulator-2 show that the proposed scheme is highly efficient; it achieves higher accuracy and detection rates with a very low false-positive rate. In [12], the authors have proposed energy saving scheme on the basis of multiple criteria such as intracluster distance, residual energy, sink distance, and cluster balancing factor. The simulations are performed under a variety of conditions. When the proposed work is compared to the well-known benchmarked clustering protocols, the obtained results show that the proposed protocol outperforms in terms of energy consumption, throughput, and network lifespan.The proposed protocol in [13] creates clusters that are both energy-efficient and scalable. This work proposes a vertical node partitioning scheme that employs a heuristic and shuffled frog leaping algorithm (SFLA) clustering technique for optimal scheduling of scientific dependent tasks. The results show that the SFLA with the clustering method outperforms the other scheduling techniques for saving the node energy. In [19], the authors propose a new recommendation system based on user-based collaborative filtering by combining the crow search with a genetically unified crossover operator. This combination of the crows search and GA can increase search diversity and avoid trapping at local minima. It has two phases; the first phase is about group formation and the second phase provides a top-N recommendation for an active user. In [20], the authors describe that the Recommender systems (RSs) have grown in popularity owing to their capacity to cope with massive amounts of data from many fields. They are regarded as information filtering systems that offer predictions or suggestions to users depending on their preferences. One of the most common recommendation system techniques is collaborative user-based filtering. In this article, they are following that technique by proposing a new hybrid to find a number of possible clusters of similar users to improve the recommendation process.The existing techniques have certain limitations such as computational time, space complexity, and energy consumption. In order to overcome the limitations of the existing work, this paper is proposing an adaptive clustering algorithm for the IIoT based opportunistic networks to save energy by forming the clusters in an intelligent and adaptive manner. The next section describes the proposed work.


## 3. Mobile Opportunistic Network Node Adaptive Clustering Routing Algorithm

This section describes the proposed methodology in a detailed manner using subsections.


### 3.1. Mobile Opportunity Model

Opportunistic network is a compassionate of self-organized network which uses the chance of convention generated by node movement to transmit information and realize communication between nodes. It adopts the “store-port-forward” information forwarding mode and this unique forwarding mode can realize the communication between nodes in the network environment with fast movement even in discontinuous link connectivity with frequent changes of topologies [21]. Based on the large number of nodes in the opportunistic network and the small storage capacity, it is difficult to provide energy saving solutions [22]. In recent years, a large number of mobile devices with short distance communication have been popularized and the opportunity network based on the carrier of human beings has been developed rapidly. Mobile opportunistic network creates encounter opportunities through the movement of each node and realizes the network communication between nodes but only the nodes in the same connected area can complete the communication. It is assumed that, at a certain time “s”, the network is composed of “t” different connected regions; Figure 1 shows the opportunistic network structure of two randomly connected regions at time ‘s.’Figure 1
Structure of mobile opportunity network.Figure1 represents the structure of mobile opportunity network with the nodes A, B, C, D, E, and F (belonging to connected region 1) and nodes G, H, I, J, and K (belonging to connected region 2), respectively. According to the characteristics of opportunistic network, all the nodes in connected region 1 can transfer data information to each other. For example, data information of node “A” can be transferred to B, C, D, E, and F, and data information of nodes in region 2 can be transferred to each other. If we want to transfer the data of node A to node H which does not belong to the same connected area then it is not feasible; we need to move the nodes to the same connected area. The opportunistic networks allow faster transmission of data.


#### 3.1.1. Node Adaptive Clustering Description

After the above description, the nodes in any connected region in Figure1 are now implemented as adaptive clustering processing using simulated environment. The adaptive clustering method is utilized to determine the members of the cluster according to the received signal strength and node connectivity of the nodes in the network. The node grouping is performed according to the physical location correlation of the nodes with each other in the wireless opportunistic network. While establishing opportunistic network by diving it into regions as shown in Figure 1, “α” is defined as the evaluation scale constant which represents the maximum distance threshold value for data transmission between the nodes. In the network environment, the evaluation scale constant α is divided into several subregions, and a node “I” is randomly selected as the cluster head in each subregion.In simulated environment, a certain network regions selected at time “t” as the research entry point, and the following assumptions are made. Figure 2 represents the node connectivity graph of sub-networks. Now consider that there are n numbers of nodes which are randomly generated for 6 connected regions according to the correlation of physical locations.Figure 2
Node connectivity graph of subnetwork.The 6 clusters are formed at the same time, and the cluster heads are randomly designated. The cluster head will fuse the information data of the nodes within each cluster and represent the divided six clusters asU = {A, B, C, D, E, F}, in which each cluster can realize data forwarding. It is assumed that the current time “t” begins with the starting node “A” and the current network topology structure remains unchanged to form a network connectivity graph as shown in Figure 2.


#### 3.1.2. Next Hop Node Selection Process

Each cluster node stores the data information that has been processed by data fusion in each cluster and assumes the existence of connected graph in “T” in the network environment “M” at the current point of time. Starting from node A, the process of finding the optimal transmission path is as follows.(1)
Start state: only A is the current node in the cluster, namely,U = {A}, V = {B, C, E, F, D}.(2)
Starting from node A, the cost edges in V are compared and the logical distances between each node and initial node A are marked such asE (A, 3), B (A, 6), F (A, 5), C (A, ∞), and D (A, ∞), respectively. Through logical distance comparison, the current minimum edge is E (A, 3); that is, the next hop node is determined to be E; at this point, U = {A, E}, V = {B, C, F, D}.(3)
Update the cost edges of vertices and U in V, namely, B (E, 2), C (E, 6), F (A),(4)
F (A, ∞): by comparing the logical distance, it is found that the current minimum edge is B (E, 5); that is, the next hop node is determined to be B, when U = {A, E, B}, V = {C, F, D}.(6)
Update the cost edges of vertices andU in V, namely, C (B, 7), F (B, 4), F (B),(7)
By comparing the logical distance, it is found that the current minimum edge is F (B, 4); that is, the next hop node is F, at which clusterU = {A, E, B, F}, V = {C, D}.(8)
Update the cost edges of the vertices and U in V, that is, C (B, 7) andD (F, 1). By comparing the logical distance, the current minimum edge D (F, 1) is obtained; that is, the next hop node D is obtained where U = {A, E, B, F, D}, V = {C}.(9)
Update the cost edges of the vertices andU in V, that is, C (D, 4), to determine that the next hop node is C. At this point, U = {A, E, B, F, D, C}, and the path planning ends.(10)
The nodes inserted in the order of statistics areA, E, B, F, D, and C. Then A- > E-B - > F- > D- > C is the current optimal path.


### 3.2. LEACH Adaptive Clustering Protocol Modeling

One of the most significant difficulties in WSNs is to face the huge power consumption of the routing techniques. To minimize power consumption, the Low-Energy Adaptive Clustering Hierarchy (LEACH) clustering methodology is proposed. However, in LEACH, power consumption increases as the distance between the sink node and the cluster heads (CHs) grows. Since LEACH does not include routing, this disadvantage exposes distance as a big concern. Low latency, energy efficiency, and coverage are three critical issues in the design of routing protocols for wireless opportunistic networks. In this paper, we introduce a new protocol called Low Energy Adaptive Tier Clustering Hierarchy (LEATCH), which provides a good compromise between delay and energy consumption along with addressing the coverage issues. LEATCH is an adaptive clustering routing protocol with strong applicability in mobile opportunistic networks which can effectively balance node energy consumption and enhance network performance and network lifetime.In this model, the system can be represented as nine tuples as shown in SET 1.(1)Σ⩴≔C,O,A,M,R,E,G,S0,H.Considering the tuples represented in SET 1,A represents the agent, R represents the role that can be assigned to A, G represents the group which is a set of agents and their roles, and O represents all the conditions needed to achieve the goal. Since the constraint representation of e-cargo model needs to be optimized on the basis of the above mobile opportunistic network energy monitoring, the constraint set is added to optimize the e-cargo model, and then the EC cargo model with constraints is formed. According to the EC cargo, the LEATCH protocol model of network adaptive clustering routing is constructed. Then the network adaptive clustering routing based on multiconstraint fusion is comprehended. The details are as follows.(i)
Characterization of EC cargo in LEATCH protocolThe mobile opportunistic network studied in this paper has the following assumptions:(ii)
The network is composed of large-scale nodes with fixed location. All nodes are distributed randomly in the region, and there is only one fixed sink node, which is not constrained by energy.The power of opportunistic network nodes is controllable and can sleep or wake up autonomously.(iii)
It supports different MAC protocols.(iv)
The node is equipped with omnidirectional antenna which can sense the environment synchronously and periodically to realize data fusion.(v)
The usage of use multihop communication is made to transmit data to sink node.The definition is as follows.Definition 1.
Role of cluster is given by SET 2.(2)R⩴≔id,I,Ac,Ap.
The definition of role through 4 tuples is represented in SET 2 whereid represents the role identifier, I represents the set of messages, I⩴≔Min,Mout, Min represents a set of messages input to the relevant agent, Mout represents a set of messages output to the relevant role, and Min,Mout⊂M represents a set of messages. Ac represents the current set of agents for the role and Ap represents a set constructed by agents who can assign the role.
The roles are divided into three categories: cluster head, cluster member, and gateway. The character set is defined asR=rch,rgw,rcm. The cluster member role perceives the information and transmits it to the cluster head at the same time. The cluster head can not only collect the sensing information data but also receive the information data transmitted by the cluster members at the same time [23]. The gateway is mainly responsible for forwarding the data from the cluster head to the base station.Definition 2.
Agent in regions is given by SET 3.(3)A⩴≔id,Ro,Rc,Ng.
SET 3 represents the definition for agent, whereRo represents the set of roles such as cluster members or cluster heads, Rc represents the set of roles currently played, and Ng represents the group to which the current agent belongs.
Here, the agent can be a specific opportunistic network node or sink node.Definition 3.
Group is as follows.(4)G⩴≔id,e,Rg,Ag,J.
SET 4 represents the definition for group, wheree represents the current environment of g, Rg describes the set of roles in g, Ag describes the set of assigned agents, and J represents the binary formed by agents and roles, that is, J=ai,rj|ai∈Ag∧rj∈Rg.Definition 4.
Assignment is as follows.u:R⟶A. (5)
Supposeu represents the last assignment from R to A, similar to u:R⟶A, which is a subset of the Cartesian product R×A=ri,aj|ri∈R∧aj∈A of R and A.
In the mobile opportunistic network with adaptive clustering topology, the power consumption of the cluster head role is relatively large. In order to prevent the node with relatively low energy from taking charge of the cluster head role which makes more use of the power, the role allocation is more reasonable. The node constraints of opportunistic network should be considered in the process of cluster head role assignment. It includes constraints such as power and geographical location. Therefore, constraint mechanism is introduced to implement constraint assignment mechanism in opportunistic network nodes.Definition 5.
ConstraintCis as follows.
In mobile opportunistic networks with adaptive clustering topology, node constraints include a series of constraints such as energy, storage performance, processing performance, communication distance, and distribution location.Definition 6.
Constraint set is defined byCons. Cons=C1,C2,… (6)
In SET 6,Ci represents the ability to satisfy the constraints set forth in Definition 4.Definition 7.
Constraint assignment is as follows.
LetμCons:R×A=ri,ajri∈R∧aj∈AC1,C2,… be satisfiable. Based on Definitions 4 to 6, complex constraints are composed of a set of clauses with first-order logic properties.
According to the proposed model, there is a cooperative relationship among the roles in LEATCH which is manifested in the promotion relevance, report relevance, and request relevance.Definition 8.
Promotion relationships are as follows.
Suppose that the relation is a binaryri,rj. For ∀ri,rj∈R; if ri is promoted to rj through competition, then ri and rj are promoted, denoted as Δ=ri,rj.Definition 9.
Reporting relationships are as follows.
The relationship is defined as a binaryri,rj, assuming that ∀ri,rj∈R represents the role in the same cluster. If role rj is the superior of role ri, and the report can only be transmitted from ri to rj, then the relationship between the two is a report relationship, denoted as Θ=ri,rj.Definition 10.
Request relationship is as follows.
The relationship is defined as a binaryri,rj, according to Π, for ∀ri,rj∈R, assuming that role ri applies for role rj to provide services, and rj provides services for role ri; the relationship between them is a request relationship.


### 3.3. Modeling of Adaptive Clustering Protocol

Based on the above contents, the constraint is introduced, and the adaptive clustering protocol model is constructed as shown in Figure3.Figure 3
Modeling of LEATCH adaptive clustering protocol based on EC cargo.The running process of adaptive clustering mobile machine network comprises all the agents in the network with specific assigned roles for the opportunistic network based on their own constraints and the constraints of the external environment. By using LEATCH adaptive clustering protocol in the clustering stage, cluster head roles and cluster members form a cluster structure according to the scheme given in LEATCH adaptive clustering protocol. Then the network proceeds for the stable stage where each cluster member and cluster head communicates, and cluster heads play their respective roles in the same layer of opportunistic networks to communicate and transmit data within their respective communication range. In Figure3, the node agent realizes the role assignment according to the constraints combined with LEATCH adaptive clustering protocol and forms the cluster by the association between the node agents, by the association between the cluster members and the cluster heads. When the mobile machine network is running, the node agent realizes the role assignment and reassignment based on constraints and then it performs the interaction on the basis of respective roles and completes the tasks assigned by the system. From the view of role collaboration, the network can be understood as a network in which node agents assign corresponding roles, and node agents in different roles complete designated application operations based on their own state information. Each node agent in the network realizes the given goals. An adaptive cluster-based mobile machine network architecture under is shown in Figure 4.Figure 4
Architecture of mobile opportunistic network based on adaptive clustering.In general, the mobile opportunistic network can be divided into several regions, and each region can also be divided into multiple clusters. There may be hierarchical relationship between clusters; for example, the cluster head ofg1,…,gn becomes a higher level cluster g11. In cluster g1, cluster head role communicates with member role in g1. The higher level cluster head role and the lower level cluster head implement a series of operations such as data transmission, energy control, and communication. Finally, according to the cluster head role in each region, the sink node communicates with the sink node. At this time, the sink node processes the data and transmits it to the base station which forms an adaptive clustering mobile opportunity network to complete the real-time interaction with the external networks or users.Based on the above model, an improved LEACH adaptive clustering protocol based is proposed. In the improved scheme, the system manager gives the network role specification and constraint definition at the initial stage of the network operations. When the cluster head is elected, the node agent of the opportunistic network runs the LEATCH adaptive clustering protocol based on its own constraints and environmental constraints to assign itself the cluster head or the role of the cluster members. When the cluster is formed, the cluster head begins to broadcast cluster-head messages and the members based on the message strength received. It computes the Euclidean distance between the cluster members and the cluster head nodes accordingly and negotiates with the cluster head whose distance is closest to them to allow the cluster head to enter into the stable stage. When the network is stable, the internal information data communication mode of the cluster structure is single-hop, and then the cluster head’s responsibility is to collect the data transmitted by the cluster members; meanwhile, the cluster head has the data fusion performance. The cluster heads allow communication between the cluster members and the base station in single-hop and multihop fusion.


## 3.1. Mobile Opportunity Model

Opportunistic network is a compassionate of self-organized network which uses the chance of convention generated by node movement to transmit information and realize communication between nodes. It adopts the “store-port-forward” information forwarding mode and this unique forwarding mode can realize the communication between nodes in the network environment with fast movement even in discontinuous link connectivity with frequent changes of topologies [21]. Based on the large number of nodes in the opportunistic network and the small storage capacity, it is difficult to provide energy saving solutions [22]. In recent years, a large number of mobile devices with short distance communication have been popularized and the opportunity network based on the carrier of human beings has been developed rapidly. Mobile opportunistic network creates encounter opportunities through the movement of each node and realizes the network communication between nodes but only the nodes in the same connected area can complete the communication. It is assumed that, at a certain time “s”, the network is composed of “t” different connected regions; Figure 1 shows the opportunistic network structure of two randomly connected regions at time ‘s.’Figure 1
Structure of mobile opportunity network.Figure1 represents the structure of mobile opportunity network with the nodes A, B, C, D, E, and F (belonging to connected region 1) and nodes G, H, I, J, and K (belonging to connected region 2), respectively. According to the characteristics of opportunistic network, all the nodes in connected region 1 can transfer data information to each other. For example, data information of node “A” can be transferred to B, C, D, E, and F, and data information of nodes in region 2 can be transferred to each other. If we want to transfer the data of node A to node H which does not belong to the same connected area then it is not feasible; we need to move the nodes to the same connected area. The opportunistic networks allow faster transmission of data.


### 3.1.1. Node Adaptive Clustering Description

After the above description, the nodes in any connected region in Figure1 are now implemented as adaptive clustering processing using simulated environment. The adaptive clustering method is utilized to determine the members of the cluster according to the received signal strength and node connectivity of the nodes in the network. The node grouping is performed according to the physical location correlation of the nodes with each other in the wireless opportunistic network. While establishing opportunistic network by diving it into regions as shown in Figure 1, “α” is defined as the evaluation scale constant which represents the maximum distance threshold value for data transmission between the nodes. In the network environment, the evaluation scale constant α is divided into several subregions, and a node “I” is randomly selected as the cluster head in each subregion.In simulated environment, a certain network regions selected at time “t” as the research entry point, and the following assumptions are made. Figure 2 represents the node connectivity graph of sub-networks. Now consider that there are n numbers of nodes which are randomly generated for 6 connected regions according to the correlation of physical locations.Figure 2
Node connectivity graph of subnetwork.The 6 clusters are formed at the same time, and the cluster heads are randomly designated. The cluster head will fuse the information data of the nodes within each cluster and represent the divided six clusters asU = {A, B, C, D, E, F}, in which each cluster can realize data forwarding. It is assumed that the current time “t” begins with the starting node “A” and the current network topology structure remains unchanged to form a network connectivity graph as shown in Figure 2.


### 3.1.2. Next Hop Node Selection Process

Each cluster node stores the data information that has been processed by data fusion in each cluster and assumes the existence of connected graph in “T” in the network environment “M” at the current point of time. Starting from node A, the process of finding the optimal transmission path is as follows.(1)
Start state: only A is the current node in the cluster, namely,U = {A}, V = {B, C, E, F, D}.(2)
Starting from node A, the cost edges in V are compared and the logical distances between each node and initial node A are marked such asE (A, 3), B (A, 6), F (A, 5), C (A, ∞), and D (A, ∞), respectively. Through logical distance comparison, the current minimum edge is E (A, 3); that is, the next hop node is determined to be E; at this point, U = {A, E}, V = {B, C, F, D}.(3)
Update the cost edges of vertices and U in V, namely, B (E, 2), C (E, 6), F (A),(4)
F (A, ∞): by comparing the logical distance, it is found that the current minimum edge is B (E, 5); that is, the next hop node is determined to be B, when U = {A, E, B}, V = {C, F, D}.(6)
Update the cost edges of vertices andU in V, namely, C (B, 7), F (B, 4), F (B),(7)
By comparing the logical distance, it is found that the current minimum edge is F (B, 4); that is, the next hop node is F, at which clusterU = {A, E, B, F}, V = {C, D}.(8)
Update the cost edges of the vertices and U in V, that is, C (B, 7) andD (F, 1). By comparing the logical distance, the current minimum edge D (F, 1) is obtained; that is, the next hop node D is obtained where U = {A, E, B, F, D}, V = {C}.(9)
Update the cost edges of the vertices andU in V, that is, C (D, 4), to determine that the next hop node is C. At this point, U = {A, E, B, F, D, C}, and the path planning ends.(10)
The nodes inserted in the order of statistics areA, E, B, F, D, and C. Then A- > E-B - > F- > D- > C is the current optimal path.


## 3.1.1. Node Adaptive Clustering Description

After the above description, the nodes in any connected region in Figure1 are now implemented as adaptive clustering processing using simulated environment. The adaptive clustering method is utilized to determine the members of the cluster according to the received signal strength and node connectivity of the nodes in the network. The node grouping is performed according to the physical location correlation of the nodes with each other in the wireless opportunistic network. While establishing opportunistic network by diving it into regions as shown in Figure 1, “α” is defined as the evaluation scale constant which represents the maximum distance threshold value for data transmission between the nodes. In the network environment, the evaluation scale constant α is divided into several subregions, and a node “I” is randomly selected as the cluster head in each subregion.In simulated environment, a certain network regions selected at time “t” as the research entry point, and the following assumptions are made. Figure 2 represents the node connectivity graph of sub-networks. Now consider that there are n numbers of nodes which are randomly generated for 6 connected regions according to the correlation of physical locations.Figure 2
Node connectivity graph of subnetwork.The 6 clusters are formed at the same time, and the cluster heads are randomly designated. The cluster head will fuse the information data of the nodes within each cluster and represent the divided six clusters asU = {A, B, C, D, E, F}, in which each cluster can realize data forwarding. It is assumed that the current time “t” begins with the starting node “A” and the current network topology structure remains unchanged to form a network connectivity graph as shown in Figure 2.


## 3.1.2. Next Hop Node Selection Process

Each cluster node stores the data information that has been processed by data fusion in each cluster and assumes the existence of connected graph in “T” in the network environment “M” at the current point of time. Starting from node A, the process of finding the optimal transmission path is as follows.(1)
Start state: only A is the current node in the cluster, namely,U = {A}, V = {B, C, E, F, D}.(2)
Starting from node A, the cost edges in V are compared and the logical distances between each node and initial node A are marked such asE (A, 3), B (A, 6), F (A, 5), C (A, ∞), and D (A, ∞), respectively. Through logical distance comparison, the current minimum edge is E (A, 3); that is, the next hop node is determined to be E; at this point, U = {A, E}, V = {B, C, F, D}.(3)
Update the cost edges of vertices and U in V, namely, B (E, 2), C (E, 6), F (A),(4)
F (A, ∞): by comparing the logical distance, it is found that the current minimum edge is B (E, 5); that is, the next hop node is determined to be B, when U = {A, E, B}, V = {C, F, D}.(6)
Update the cost edges of vertices andU in V, namely, C (B, 7), F (B, 4), F (B),(7)
By comparing the logical distance, it is found that the current minimum edge is F (B, 4); that is, the next hop node is F, at which clusterU = {A, E, B, F}, V = {C, D}.(8)
Update the cost edges of the vertices and U in V, that is, C (B, 7) andD (F, 1). By comparing the logical distance, the current minimum edge D (F, 1) is obtained; that is, the next hop node D is obtained where U = {A, E, B, F, D}, V = {C}.(9)
Update the cost edges of the vertices andU in V, that is, C (D, 4), to determine that the next hop node is C. At this point, U = {A, E, B, F, D, C}, and the path planning ends.(10)
The nodes inserted in the order of statistics areA, E, B, F, D, and C. Then A- > E-B - > F- > D- > C is the current optimal path.


## 3.2. LEACH Adaptive Clustering Protocol Modeling

One of the most significant difficulties in WSNs is to face the huge power consumption of the routing techniques. To minimize power consumption, the Low-Energy Adaptive Clustering Hierarchy (LEACH) clustering methodology is proposed. However, in LEACH, power consumption increases as the distance between the sink node and the cluster heads (CHs) grows. Since LEACH does not include routing, this disadvantage exposes distance as a big concern. Low latency, energy efficiency, and coverage are three critical issues in the design of routing protocols for wireless opportunistic networks. In this paper, we introduce a new protocol called Low Energy Adaptive Tier Clustering Hierarchy (LEATCH), which provides a good compromise between delay and energy consumption along with addressing the coverage issues. LEATCH is an adaptive clustering routing protocol with strong applicability in mobile opportunistic networks which can effectively balance node energy consumption and enhance network performance and network lifetime.In this model, the system can be represented as nine tuples as shown in SET 1.(1)Σ⩴≔C,O,A,M,R,E,G,S0,H.Considering the tuples represented in SET 1,A represents the agent, R represents the role that can be assigned to A, G represents the group which is a set of agents and their roles, and O represents all the conditions needed to achieve the goal. Since the constraint representation of e-cargo model needs to be optimized on the basis of the above mobile opportunistic network energy monitoring, the constraint set is added to optimize the e-cargo model, and then the EC cargo model with constraints is formed. According to the EC cargo, the LEATCH protocol model of network adaptive clustering routing is constructed. Then the network adaptive clustering routing based on multiconstraint fusion is comprehended. The details are as follows.(i)
Characterization of EC cargo in LEATCH protocolThe mobile opportunistic network studied in this paper has the following assumptions:(ii)
The network is composed of large-scale nodes with fixed location. All nodes are distributed randomly in the region, and there is only one fixed sink node, which is not constrained by energy.The power of opportunistic network nodes is controllable and can sleep or wake up autonomously.(iii)
It supports different MAC protocols.(iv)
The node is equipped with omnidirectional antenna which can sense the environment synchronously and periodically to realize data fusion.(v)
The usage of use multihop communication is made to transmit data to sink node.The definition is as follows.Definition 1.
Role of cluster is given by SET 2.(2)R⩴≔id,I,Ac,Ap.
The definition of role through 4 tuples is represented in SET 2 whereid represents the role identifier, I represents the set of messages, I⩴≔Min,Mout, Min represents a set of messages input to the relevant agent, Mout represents a set of messages output to the relevant role, and Min,Mout⊂M represents a set of messages. Ac represents the current set of agents for the role and Ap represents a set constructed by agents who can assign the role.
The roles are divided into three categories: cluster head, cluster member, and gateway. The character set is defined asR=rch,rgw,rcm. The cluster member role perceives the information and transmits it to the cluster head at the same time. The cluster head can not only collect the sensing information data but also receive the information data transmitted by the cluster members at the same time [23]. The gateway is mainly responsible for forwarding the data from the cluster head to the base station.Definition 2.
Agent in regions is given by SET 3.(3)A⩴≔id,Ro,Rc,Ng.
SET 3 represents the definition for agent, whereRo represents the set of roles such as cluster members or cluster heads, Rc represents the set of roles currently played, and Ng represents the group to which the current agent belongs.
Here, the agent can be a specific opportunistic network node or sink node.Definition 3.
Group is as follows.(4)G⩴≔id,e,Rg,Ag,J.
SET 4 represents the definition for group, wheree represents the current environment of g, Rg describes the set of roles in g, Ag describes the set of assigned agents, and J represents the binary formed by agents and roles, that is, J=ai,rj|ai∈Ag∧rj∈Rg.Definition 4.
Assignment is as follows.u:R⟶A. (5)
Supposeu represents the last assignment from R to A, similar to u:R⟶A, which is a subset of the Cartesian product R×A=ri,aj|ri∈R∧aj∈A of R and A.
In the mobile opportunistic network with adaptive clustering topology, the power consumption of the cluster head role is relatively large. In order to prevent the node with relatively low energy from taking charge of the cluster head role which makes more use of the power, the role allocation is more reasonable. The node constraints of opportunistic network should be considered in the process of cluster head role assignment. It includes constraints such as power and geographical location. Therefore, constraint mechanism is introduced to implement constraint assignment mechanism in opportunistic network nodes.Definition 5.
ConstraintCis as follows.
In mobile opportunistic networks with adaptive clustering topology, node constraints include a series of constraints such as energy, storage performance, processing performance, communication distance, and distribution location.Definition 6.
Constraint set is defined byCons. Cons=C1,C2,… (6)
In SET 6,Ci represents the ability to satisfy the constraints set forth in Definition 4.Definition 7.
Constraint assignment is as follows.
LetμCons:R×A=ri,ajri∈R∧aj∈AC1,C2,… be satisfiable. Based on Definitions 4 to 6, complex constraints are composed of a set of clauses with first-order logic properties.
According to the proposed model, there is a cooperative relationship among the roles in LEATCH which is manifested in the promotion relevance, report relevance, and request relevance.Definition 8.
Promotion relationships are as follows.
Suppose that the relation is a binaryri,rj. For ∀ri,rj∈R; if ri is promoted to rj through competition, then ri and rj are promoted, denoted as Δ=ri,rj.Definition 9.
Reporting relationships are as follows.
The relationship is defined as a binaryri,rj, assuming that ∀ri,rj∈R represents the role in the same cluster. If role rj is the superior of role ri, and the report can only be transmitted from ri to rj, then the relationship between the two is a report relationship, denoted as Θ=ri,rj.Definition 10.
Request relationship is as follows.
The relationship is defined as a binaryri,rj, according to Π, for ∀ri,rj∈R, assuming that role ri applies for role rj to provide services, and rj provides services for role ri; the relationship between them is a request relationship.


## 3.3. Modeling of Adaptive Clustering Protocol

Based on the above contents, the constraint is introduced, and the adaptive clustering protocol model is constructed as shown in Figure3.Figure 3
Modeling of LEATCH adaptive clustering protocol based on EC cargo.The running process of adaptive clustering mobile machine network comprises all the agents in the network with specific assigned roles for the opportunistic network based on their own constraints and the constraints of the external environment. By using LEATCH adaptive clustering protocol in the clustering stage, cluster head roles and cluster members form a cluster structure according to the scheme given in LEATCH adaptive clustering protocol. Then the network proceeds for the stable stage where each cluster member and cluster head communicates, and cluster heads play their respective roles in the same layer of opportunistic networks to communicate and transmit data within their respective communication range. In Figure3, the node agent realizes the role assignment according to the constraints combined with LEATCH adaptive clustering protocol and forms the cluster by the association between the node agents, by the association between the cluster members and the cluster heads. When the mobile machine network is running, the node agent realizes the role assignment and reassignment based on constraints and then it performs the interaction on the basis of respective roles and completes the tasks assigned by the system. From the view of role collaboration, the network can be understood as a network in which node agents assign corresponding roles, and node agents in different roles complete designated application operations based on their own state information. Each node agent in the network realizes the given goals. An adaptive cluster-based mobile machine network architecture under is shown in Figure 4.Figure 4
Architecture of mobile opportunistic network based on adaptive clustering.In general, the mobile opportunistic network can be divided into several regions, and each region can also be divided into multiple clusters. There may be hierarchical relationship between clusters; for example, the cluster head ofg1,…,gn becomes a higher level cluster g11. In cluster g1, cluster head role communicates with member role in g1. The higher level cluster head role and the lower level cluster head implement a series of operations such as data transmission, energy control, and communication. Finally, according to the cluster head role in each region, the sink node communicates with the sink node. At this time, the sink node processes the data and transmits it to the base station which forms an adaptive clustering mobile opportunity network to complete the real-time interaction with the external networks or users.Based on the above model, an improved LEACH adaptive clustering protocol based is proposed. In the improved scheme, the system manager gives the network role specification and constraint definition at the initial stage of the network operations. When the cluster head is elected, the node agent of the opportunistic network runs the LEATCH adaptive clustering protocol based on its own constraints and environmental constraints to assign itself the cluster head or the role of the cluster members. When the cluster is formed, the cluster head begins to broadcast cluster-head messages and the members based on the message strength received. It computes the Euclidean distance between the cluster members and the cluster head nodes accordingly and negotiates with the cluster head whose distance is closest to them to allow the cluster head to enter into the stable stage. When the network is stable, the internal information data communication mode of the cluster structure is single-hop, and then the cluster head’s responsibility is to collect the data transmitted by the cluster members; meanwhile, the cluster head has the data fusion performance. The cluster heads allow communication between the cluster members and the base station in single-hop and multihop fusion.


## 4. Adaptive Clustering Algorithm Based on Genetic Algorithm

### 4.1. Cluster Classification and Adaptive Clustering Scheduling Method

The partition of clusters in opportunistic networks can transfer messages more efficiently. This algorithm uses the number of successful transfers as the index to divide the cluster into adaptive clusters.The process of clustering can be summarized as follows:(i)
First, initialize the local cluster classCi = {di}, Ei = an empty set; ⟶ second, when di and dj have successfully transferred the message, if there is no dj -related record in Ei, then add the dj to Ei; ⟶third, there is the number of times di and dj merge in Ei, which is called Eij. If one of the following conditions exists, then di requests information (Ej and Cj) from dj and updates it as follows:(1)
Eij exceeds the threshold value.(2)
The DJ is already a member of Ci.(3)
There is end of the time period for di.(4)
Eij is greater than the threshold.(5)
If the request succeeds, thendj add to local cluster Ci.Clustering Algorithm(i)
begin(ii)
LocalCommunity(currentNode_di) = {currentNode_di}(iii)
Ei←(a,b)← di(iv)
⟶foreach messageOf(currentNode_di) asm do(v)
if TransferDone(m,encounterNode_dj) then(vi)
if dj NotIn(Ei) then(vii)
⟶Add tuple(dj,1) To Eielse if dj In(Ei) then(viii)
b = b+1(ix)
end if(x)
ifb ≥ α then(xi)
⟶AddToCommunity(dj,LocalCommunity(currentNode_di))(xii)
end if(xiii)
endThe adaptive clustering operator is an important index to describe the comprehensive processing ability of the new clustering method, which is directionally associated with the specific information conditions of the task target. The so-called adaptive clustering is a hierarchical coordination method for multiconcurrent task data which can distribute the data nodes in each level equally and transmit the data to the redundant nodes in the form of information flow. The transmission of data takes place in a faster manner if the multiconcurrent tasks are performed by faster communication between the cluster head nodes and cluster members. In the above case, letη represent the utilization parameter of the task target and let ω represent the node permission value in the adaptive clustering processing criterion as shown in (5)k=sω∫i=1eηdf⋅ada.In (5), s represents the transmission basis vector of multiconcurrent tasks in the opportunistic networking environment, s and i represent the upper and lower boundary values of adaptive clustering extraction, f represents the qualitative indicators related to multiconcurrent task data, and a represents the average value of extracted data.


### 4.2. Cluster Head Selection Using Evolutionary Algorithm

The basic idea of using evolutionary algorithm is to search for a given target from a randomly generated population. Firstly, each individual in the population is regarded as a candidate solution to the problem and then the fitness function value is calculated as a criterion for evaluating the quality of chromosomes. Genetic algorithm (GA) is a promising algorithm of global optimization which is self-organized and produces optimal results with the help of crossover and mutation operators. The workflow diagram of GA is shown in Figure5.Figure 5
Flow chart of GA.The main steps of the genetic algorithm are described below:(A)
Population initialization: according to the population size, the initial population is randomly generated. A population is a collection of a number of individuals.(B)
Calculate the fitness value: the fitness value of each individual is calculated according to the fitness function; as in our problem statement, the fitness function is based on Euclidean distance to make the clusters of similar nodes. The fitness value of each individual is calculated during each iteration. The individuals in the calculated population are arranged according to the order from high to low fitness values and the individuals with large fitness values are ranked first.(C)
Selection operation: according to the given selection operator, the good individual is selected as the parent sample and then the good parent is inherited to the next generation of population according to a predetermined probability. The principle of GA selection is that the greater the fitness value, the greater the chance of being selected and to form better clusters for saving the energy.(D)
Cross computing: the selected parent is cross-operated according to the crossover operator function. Every two individuals produce two new individuals by intersection, replacing the original one, while the one that does not intersect remains unchanged. Cross paternal chromosomes will interchange with each other to produce two new chromosomes.(E)
Variation operation: the chromosomal mutation will be performed after the crossover operation. Genetic algorithms also have a fixed mutation probability, usually defined as a mutation probability of 0.1 or less than 0.1. According to this probability, the new chromosomes change at random points in time, usually at a locus that changes the chromosomes, such as 0 to 1 or 1 to 0.(F)
Repeat the above operation steps until the prescribed number of iterations or the established conditions are satisfied.GA is applied to the energy-saving design of cluster head selection in opportunistic network for routing on the basis of adaptive clustering algorithm. In this section, GA is used to redesign a new method to select cluster head by combining the residual energy of nodes, neighbor node density, and transmission distance. Firstly, the sensor nodes are divided into several adaptive clusters according to the specified number of cluster heads, and then the optimal transmission path of the nodes is calculated according to the energy consumption formula of the network. The procedure of selecting the optimal cluster head based on GA is as follows:(1)
The collection of initial data: at the beginning of the network operation, the base station broadcasts the query message, and then the LEATCH algorithm traverses all the node information in the sensor network and sends it to the base station.(2)
Individual code: in wireless sensor opportunistic networks, the serial number of each node is unique. Chromosomal individuals are encoded in decimal code and each node has a unique sequence number corresponding to the gene encoding of the individual chromosome.(3)
Population initialization: after receiving the information of all sensor nodes, the base station collates and analyzes them. The average energy of all nodes is calculated and compared with the energy of each node which is greater than its average energy and is worth entering the candidate population.(4)
Calculate the fitness value: the fitness value of an individual is calculated by equation (2), the fitness value is sorted from high to low, and the entry steps of the individual with high fitness value are obtained.(6)fitness=α×1di+β×1Numberi+γ×N×En∑iNEi,wheredi is the transmission distance between nodes, Numberi is the density of neighbor nodes, En is the residual energy, and α, β, γ are the weight coefficients of each parameter, and the weight coefficients are determined according to the influence fitness and α + β + γ  = 1.(5)
Genetic manipulation: crossover and mutation operations are carried out to keep diversity in the solutions. The operation is performed iteratively until the decision condition is satisfied. The optimal individual population can be obtained, and the optimal population is the set of optimal cluster heads.


## 4.1. Cluster Classification and Adaptive Clustering Scheduling Method

The partition of clusters in opportunistic networks can transfer messages more efficiently. This algorithm uses the number of successful transfers as the index to divide the cluster into adaptive clusters.The process of clustering can be summarized as follows:(i)
First, initialize the local cluster classCi = {di}, Ei = an empty set; ⟶ second, when di and dj have successfully transferred the message, if there is no dj -related record in Ei, then add the dj to Ei; ⟶third, there is the number of times di and dj merge in Ei, which is called Eij. If one of the following conditions exists, then di requests information (Ej and Cj) from dj and updates it as follows:(1)
Eij exceeds the threshold value.(2)
The DJ is already a member of Ci.(3)
There is end of the time period for di.(4)
Eij is greater than the threshold.(5)
If the request succeeds, thendj add to local cluster Ci.Clustering Algorithm(i)
begin(ii)
LocalCommunity(currentNode_di) = {currentNode_di}(iii)
Ei←(a,b)← di(iv)
⟶foreach messageOf(currentNode_di) asm do(v)
if TransferDone(m,encounterNode_dj) then(vi)
if dj NotIn(Ei) then(vii)
⟶Add tuple(dj,1) To Eielse if dj In(Ei) then(viii)
b = b+1(ix)
end if(x)
ifb ≥ α then(xi)
⟶AddToCommunity(dj,LocalCommunity(currentNode_di))(xii)
end if(xiii)
endThe adaptive clustering operator is an important index to describe the comprehensive processing ability of the new clustering method, which is directionally associated with the specific information conditions of the task target. The so-called adaptive clustering is a hierarchical coordination method for multiconcurrent task data which can distribute the data nodes in each level equally and transmit the data to the redundant nodes in the form of information flow. The transmission of data takes place in a faster manner if the multiconcurrent tasks are performed by faster communication between the cluster head nodes and cluster members. In the above case, letη represent the utilization parameter of the task target and let ω represent the node permission value in the adaptive clustering processing criterion as shown in (5)k=sω∫i=1eηdf⋅ada.In (5), s represents the transmission basis vector of multiconcurrent tasks in the opportunistic networking environment, s and i represent the upper and lower boundary values of adaptive clustering extraction, f represents the qualitative indicators related to multiconcurrent task data, and a represents the average value of extracted data.


## 4.2. Cluster Head Selection Using Evolutionary Algorithm

The basic idea of using evolutionary algorithm is to search for a given target from a randomly generated population. Firstly, each individual in the population is regarded as a candidate solution to the problem and then the fitness function value is calculated as a criterion for evaluating the quality of chromosomes. Genetic algorithm (GA) is a promising algorithm of global optimization which is self-organized and produces optimal results with the help of crossover and mutation operators. The workflow diagram of GA is shown in Figure5.Figure 5
Flow chart of GA.The main steps of the genetic algorithm are described below:(A)
Population initialization: according to the population size, the initial population is randomly generated. A population is a collection of a number of individuals.(B)
Calculate the fitness value: the fitness value of each individual is calculated according to the fitness function; as in our problem statement, the fitness function is based on Euclidean distance to make the clusters of similar nodes. The fitness value of each individual is calculated during each iteration. The individuals in the calculated population are arranged according to the order from high to low fitness values and the individuals with large fitness values are ranked first.(C)
Selection operation: according to the given selection operator, the good individual is selected as the parent sample and then the good parent is inherited to the next generation of population according to a predetermined probability. The principle of GA selection is that the greater the fitness value, the greater the chance of being selected and to form better clusters for saving the energy.(D)
Cross computing: the selected parent is cross-operated according to the crossover operator function. Every two individuals produce two new individuals by intersection, replacing the original one, while the one that does not intersect remains unchanged. Cross paternal chromosomes will interchange with each other to produce two new chromosomes.(E)
Variation operation: the chromosomal mutation will be performed after the crossover operation. Genetic algorithms also have a fixed mutation probability, usually defined as a mutation probability of 0.1 or less than 0.1. According to this probability, the new chromosomes change at random points in time, usually at a locus that changes the chromosomes, such as 0 to 1 or 1 to 0.(F)
Repeat the above operation steps until the prescribed number of iterations or the established conditions are satisfied.GA is applied to the energy-saving design of cluster head selection in opportunistic network for routing on the basis of adaptive clustering algorithm. In this section, GA is used to redesign a new method to select cluster head by combining the residual energy of nodes, neighbor node density, and transmission distance. Firstly, the sensor nodes are divided into several adaptive clusters according to the specified number of cluster heads, and then the optimal transmission path of the nodes is calculated according to the energy consumption formula of the network. The procedure of selecting the optimal cluster head based on GA is as follows:(1)
The collection of initial data: at the beginning of the network operation, the base station broadcasts the query message, and then the LEATCH algorithm traverses all the node information in the sensor network and sends it to the base station.(2)
Individual code: in wireless sensor opportunistic networks, the serial number of each node is unique. Chromosomal individuals are encoded in decimal code and each node has a unique sequence number corresponding to the gene encoding of the individual chromosome.(3)
Population initialization: after receiving the information of all sensor nodes, the base station collates and analyzes them. The average energy of all nodes is calculated and compared with the energy of each node which is greater than its average energy and is worth entering the candidate population.(4)
Calculate the fitness value: the fitness value of an individual is calculated by equation (2), the fitness value is sorted from high to low, and the entry steps of the individual with high fitness value are obtained.(6)fitness=α×1di+β×1Numberi+γ×N×En∑iNEi,wheredi is the transmission distance between nodes, Numberi is the density of neighbor nodes, En is the residual energy, and α, β, γ are the weight coefficients of each parameter, and the weight coefficients are determined according to the influence fitness and α + β + γ  = 1.(5)
Genetic manipulation: crossover and mutation operations are carried out to keep diversity in the solutions. The operation is performed iteratively until the decision condition is satisfied. The optimal individual population can be obtained, and the optimal population is the set of optimal cluster heads.


## 5. Experimental Results and Analysis

The network software developed by Helsinki University of Technology is used in this experiment for creating the opportunistic networking environment. Other algorithms are implemented to test the proposed methods on the opportunistic networks. This is open source software developed by Helsinki University of Technology with Java language which is especially used for the simulation experimentation of opportunistic networks. The process of one processing simulation events is shown through the graphical interface which is more intuitive and having visualization impacts to observe and study the simulation process. At present, most of the opportunistic network simulation experiments are completed through this software.The specific parameters of the experiment are shown in Table1.Table 1
Experimental parameters.
ParameterParameter valueSimulation area300m × 300 mNode mobility modelRandomWalkDecay period3600 sNode speed0.5～1.5 m/s3Transmission range0 mNumber of nodes10～100个Node communication modeBluetoothNode cache space50 MMessage size500 KB～1 MBTransmission speed2 Mb/sMessage generation interval25s～35In order to verify the correctness of the proposed algorithm, the simulation software is implemented in this section. The proposed algorithm is compared with the multiobjective algorithm and multiparameter weighted clustering algorithm. In the simulation experiment, the sensor nodes in the network area are randomly deployed in a 100 m∗ 100 m network area and the coordinate position of the base station node is set in the plane area with coordinates (50, 50). The initial energy of each sensor node is set to 1.0 J, and the packets of 2000 byte length are generated. In the simulation experiment, the number of sensor nodes is 100 and the shortest effective communication distance of wireless sensor networks is set to radio runtime measurement (RRM). When the distance between sensor node and cluster head node is less than RRM, the communication mode between node and cluster head node is single hop communication model. If the distance between node and cluster head node is greater than RRM, the multihop network communication model is adopted. This flexible combination method of single hop communication and multihop communication can effectively reduce the energy consumption in the network. The algorithm is compared with the multiobjective based WSN clustering algorithm and multiparameter weighted clustering algorithm from the remaining nodes of the network. The network energy consumption and the data received by the base station are also considered during comparative study.Figure6 shows the simulation results of the proposed algorithm which are compared with the two state-of-the-art algorithms presented in [5] and [6] and also the results are analyzed.Figure 6
Comparison of the number of surviving nodes in different algorithms.It can be seen from Figure6 that as the number of iterations increases, the number of remaining nodes in the improved algorithm is always higher than the number of surviving nodes in the multiobjective based algorithm (MOA) [5] and multiparameter weighted clustering algorithm (MPWCA) [6]. The proposed adaptive clustering algorithm has gone through about 490 times of energy exhaustion, while the MOA [5] and MPWCA [6] have been consumed about 340 times of energy which is 44.12% longer than the network lifetime. Therefore, the proposed clustering algorithm is superior to the traditional algorithm in energy consumption.Figure7 shows the relationship between the energy consumption and the number of iterations. It mainly analyzes and compares the energy consumption rates of the three clustering algorithms. The slope of the proposed algorithm is obviously smaller than that of the other two traditional clustering algorithms (MOA [5] and MPWCA [6]). It shows that the improved adaptive algorithm can balance energy consumption between nodes more effectively, save energy better, and prolong the lifetime of the network in a better manner.Figure 7
Comparison of data transmission volume of different algorithms.


## 6. Conclusion

In order to solve the problems of poor self-adaptive clustering algorithm, low survivability of nodes, and high energy consumption, a novel adaptive algorithm for IIoT oriented mobile networks is proposed in this paper. LEACH is an adaptive clustering routing protocol that can effectively balance node energy consumption, improve network performance, and extend network lifetime in mobile opportunistic networks. Based on LEACH protocol, a new clustering mechanism is designed. Genetic algorithm (GA) is used to select the optimal cluster head, to optimize the survival rate, and to reduce the network energy consumption. However, due to time constraints, this study does not fully consider the resource constraints of nodes in real life environment, but the proposed model performs well against the presumed assumptions. An adaptive clustering algorithm for mobile opportunistic networks within IIoT based opportunistic networks employs a heuristic genetic algorithm. The opportunity network at the connected military base is analyzed, and accordingly mobile opportunity model is realized. The proposed adaptive clustering based mechanism allowz the mobile network to achieve high throughput and high transmission rate and also optimizes the energy consumption rate of nodes. In the future, real life constraints will be considered in the study to make the algorithm more robust for real life environment.



---

*Source: 3872214-2022-05-06.xml*