{'fraction_non_alphanumeric': 0.016763848396501458, 'fraction_numerical': 0.0029154518950437317, 'mean_word_length': 5.184684684684685, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Clustered Routing Method in the Internet of Things Using a Moth‐Flame Optimization Algorithm

Internet of Things (IoT) is a set of interrelated devices on the Internet platform that can receive and send data to make human life more efficient and convenient. Clustering is a useful data collection method in the IoT that selectively cuts energy consumption by forming IoT nodes into some clusters. The cluster head can control all cluster nodes, and all intracluster and intercluster connections are made through it. Due to the NP‐Hard nature of the clustering problem, a moth‐flame optimization algorithm is proposed to select the minimum number of necessary clusters for routing in this article. This scheme is extracted from the life cycle of moths and enables effective communication by creating the optimal number of clusters. The proposed fitness function consists of the sum of the distances, the amount of energy remaining, and the degree of the nodes. The obtained experimental results are compared to different clustering algorithms, such as whale optimization algorithm, novel chemical reaction optimization, and cuckoo search optimization. The simulation using MATLAB clearly showed that the proposed method has a low number of cluster head nodes and the most balanced clusters. It also improves lifetime by at least 14.59% compared to the mentioned techniques.