{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,25]],"date-time":"2026-10-25T12:29:24Z","timestamp":1792931364154,"version":"4.5.0"},"reference-count":51,"publisher":"MDPI AG","issue":"4","license":[{"start":{"date-parts":[[2022,2,11]],"date-time":"2022-02-11T00:00:00Z","timestamp":1644537600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Sensors"],"abstract":"<jats:p>Aiming at the intrusion detection problem of the wireless sensor network (WSN), considering the combined characteristics of the wireless sensor network, we consider setting up a corresponding intrusion detection system on the edge side through edge computing. An intrusion detection system (IDS), as a proactive network security protection technology, provides an effective defense system for the WSN. In this paper, we propose a WSN intelligent intrusion detection model, through the introduction of the k-Nearest Neighbor algorithm (kNN) in machine learning and the introduction of the arithmetic optimization algorithm (AOA) in evolutionary calculation, to form an edge intelligence framework that specifically performs the intrusion detection when the WSN encounters a DoS attack. In order to enhance the accuracy of the model, we use a parallel strategy to enhance the communication between the populations and use the L\u00e9vy flight strategy to adjust the optimization. The proposed PL-AOA algorithm performs well in the benchmark function test and effectively guarantees the improvement of the kNN classifier. We use Matlab2018b to conduct simulation experiments based on the WSN-DS data set and our model achieves 99% ACC, with a nearly 10% improvement compared with the original kNN when performing DoS intrusion detection. The experimental results show that the proposed intrusion detection model has good effects and practical application significance.<\/jats:p>","DOI":"10.3390\/s22041407","type":"journal-article","created":{"date-parts":[[2022,2,13]],"date-time":"2022-02-13T20:34:45Z","timestamp":1644784485000},"page":"1407","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":171,"title":["An Enhanced Intrusion Detection Model Based on Improved kNN in WSNs"],"prefix":"10.3390","volume":"22","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-7216-3576","authenticated-orcid":false,"given":"Gaoyuan","family":"Liu","sequence":"first","affiliation":[{"name":"College of Intelligent Equipment, Shandong University of Science and Technology, Tai\u2019an 271000, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Huiqi","family":"Zhao","sequence":"additional","affiliation":[{"name":"College of Intelligent Equipment, Shandong University of Science and Technology, Tai\u2019an 271000, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Fang","family":"Fan","sequence":"additional","affiliation":[{"name":"College of Intelligent Equipment, Shandong University of Science and Technology, Tai\u2019an 271000, China"},{"name":"College of Computer Science and Engineering, Shandong University of Science and Technology, Qingdao 266590, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Gang","family":"Liu","sequence":"additional","affiliation":[{"name":"College of Intelligent Equipment, Shandong University of Science and Technology, Tai\u2019an 271000, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Qiang","family":"Xu","sequence":"additional","affiliation":[{"name":"College of Computer Science and Engineering, Shandong University of Science and Technology, Qingdao 266590, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0126-9944","authenticated-orcid":false,"given":"Shah","family":"Nazir","sequence":"additional","affiliation":[{"name":"Department of Computer Science, University of Swabi, Swabi 23430, Pakistan"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2022,2,11]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Haseeb, K., Din, I.U., Almogren, A., and Islam, N. (2020). An Energy Efficient and Secure IoT-Based WSN Framework: An Application to Smart Agriculture. Sensors, 20.","DOI":"10.3390\/s20072081"},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"807","DOI":"10.1109\/TC.2013.13","article-title":"A Semantic Approach to Host-Based Intrusion Detection Systems Using Contiguousand Discontiguous System Call Patterns","volume":"63","author":"Creech","year":"2014","journal-title":"IEEE Trans. Comput."},{"key":"ref_3","doi-asserted-by":"crossref","unstructured":"Vokorokos, L., and Bal\u00e1\u017d, A. (2010, January 5\u20137). Host-Based Intrusion Detection System. Proceedings of the 2010 IEEE 14th International Conference on Intelligent Engineering Systems, Las Palmas, Spain.","DOI":"10.1109\/INES.2010.5483815"},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"229","DOI":"10.1016\/S0031-3203(02)00026-2","article-title":"Host-Based Intrusion Detection Using Dynamic and Static Behavioral Models","volume":"36","author":"Yeung","year":"2003","journal-title":"Pattern Recognit."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"37","DOI":"10.3233\/JCS-1999-7103","article-title":"NetSTAT: A Network-Based Intrusion Detection System","volume":"7","author":"Vigna","year":"1999","journal-title":"J. Comput. Secur."},{"key":"ref_6","unstructured":"Bivens, A., Palagiri, C., Smith, R., Szymanski, B., and Embrechts, M. (2002, January 10\u201313). Network-Based Intrusion Detection Using Neural Networks. Proceedings of the Intelligent Engineering Systems through Artificial Neural Networks, St. Louis, MO, USA."},{"key":"ref_7","unstructured":"Snapp, S.R., Brentano, J., Dias, G.V., Goan, T.L., Heberlein, L.T., Ho, C.-L., Levitt, K.N., Mukherjee, B., Smaha, S.E., and Grance, T. (1991, January 1\u20134). DIDS (Distributed Intrusion Detection System)\u2014Motivation, Architecture, and an Early Prototype. Proceedings of the 14th National Computer Security Conference, Washington, DC, USA."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"69","DOI":"10.1504\/IJAHUC.2012.045549","article-title":"A Survey of Intrusion Detection Systems for Wireless Sensor Networks","volume":"9","author":"Farooqi","year":"2012","journal-title":"Int. J. Ad Hoc Ubiquitous Comput."},{"key":"ref_9","unstructured":"Doumit, S.S., and Agrawal, D.P. (2003, January 13\u201316). Self-Organized Criticality & Stochastic Learning Based Intrusion Detection System for Wireless Sensor Networks. Proceedings of the IEEE Military Communications Conference, MILCOM 2003, Boston, MA, USA."},{"key":"ref_10","first-page":"178","article-title":"Misuse-Based Intrusion Detection Using Bayesian Networks","volume":"1","author":"Tylman","year":"2010","journal-title":"Int. J. Crit. Comput. Syst."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"18","DOI":"10.1016\/j.cose.2008.08.003","article-title":"Anomaly-Based Network Intrusion Detection: Techniques, Systems and Challenges","volume":"28","year":"2009","journal-title":"Comput. Secur."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"152","DOI":"10.1016\/j.jocs.2017.03.006","article-title":"Anomaly-Based Intrusion Detection System through Feature Selection Analysis and Building Hybrid Efficient Model","volume":"25","author":"Aljawarneh","year":"2018","journal-title":"J. Comput. Sci."},{"key":"ref_13","unstructured":"Sermanet, P., Chintala, S., and Lecun, Y. (2012, January 11\u201315). Convolutional Neural Networks Applied to House Numbers Digit Classification. Proceedings of the 21st International Conference on Pattern Recognition (ICPR2012), Tsukuba, Japan."},{"key":"ref_14","doi-asserted-by":"crossref","first-page":"5","DOI":"10.1023\/A:1010933404324","article-title":"Random Forests","volume":"45","author":"Breiman","year":"2001","journal-title":"Mach. Learn."},{"key":"ref_15","first-page":"4","article-title":"Naive (Bayes) at Forty: The Independence Assumption in Information Retrieval","volume":"Volume 1398","author":"Lewis","year":"1998","journal-title":"Proceedings of the 10th European Conference on Machine Learning"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"660","DOI":"10.1109\/21.97458","article-title":"A survey of decision tree classifier methodology","volume":"21","author":"Safavian","year":"1991","journal-title":"IEEE Trans. Syst. Man Cybern."},{"key":"ref_17","doi-asserted-by":"crossref","first-page":"750","DOI":"10.1109\/T-C.1975.224297","article-title":"A Branch and Bound Algorithm for Computing K-Nearest Neighbors","volume":"100","author":"Fukunaga","year":"1975","journal-title":"IEEE Trans. Comput."},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1002\/cpe.5252","article-title":"Detection of Hidden Data Attacks Combined Fog Computing and Trust Evaluation Method in Sensor-Cloud System","volume":"33","author":"Zhang","year":"2021","journal-title":"Concurr. Comput. Pract. Exp."},{"key":"ref_19","doi-asserted-by":"crossref","unstructured":"Khan, M.A., Khan, M.A., Jan, S.U., Ahmad, J., Jamal, S.S., Shah, A.A., Pitropakis, N., and Buchanan, W.J. (2021). A Deep Learning-Based Intrusion Detection System for Mqtt Enabled Iot. Sensors, 21.","DOI":"10.3390\/s21217016"},{"key":"ref_20","doi-asserted-by":"crossref","unstructured":"Kelli, V., Argyriou, V., Lagkas, T., Fragulis, G., Grigoriou, E., and Sarigiannidis, P. (2021). Ids for Industrial Applications: A Federated Learning Approach with Active Personalization. Sensors, 21.","DOI":"10.3390\/s21206743"},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"290","DOI":"10.1016\/j.eswa.2005.07.019","article-title":"An Effective Refinement Strategy for kNN Text Classifier","volume":"30","author":"Tan","year":"2006","journal-title":"Expert Syst. Appl."},{"key":"ref_22","doi-asserted-by":"crossref","unstructured":"Liang, X., Gou, X., and Liu, Y. (2012, January 21\u201323). Fingerprint-Based Location Positoning Using Improved kNN. Proceedings of the 2012 3rd IEEE International Conference on Network Infrastructure and Digital Content, Beijing, China.","DOI":"10.1109\/ICNIDC.2012.6418711"},{"key":"ref_23","first-page":"1407","article-title":"PSO-based adaptively normalized weighted kNN classifier","volume":"11","author":"Chen","year":"2015","journal-title":"J. Comput. Inf. Syst."},{"key":"ref_24","doi-asserted-by":"crossref","unstructured":"Xu, H., Fang, C., Cao, Q., Fu, C., Yan, L., and Wei, S. (2018, January 20\u201321). Application of a Distance-Weighted KNN Algorithm Improved by Moth-Flame Optimization in Network Intrusion Detection. Proceedings of the 2018 IEEE 4th International Symposium on Wireless Systems within the International Conferences on Intelligent Data Acquisition and Advanced Computing Systems (IDAACS-SWS), Lviv, Ukraine.","DOI":"10.1109\/IDAACS-SWS.2018.8525572"},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"46","DOI":"10.1016\/j.advengsoft.2013.12.007","article-title":"Grey Wolf Optimizer","volume":"69","author":"Mirjalili","year":"2014","journal-title":"Adv. Eng. Softw."},{"key":"ref_26","doi-asserted-by":"crossref","first-page":"438","DOI":"10.1016\/j.patrec.2006.08.016","article-title":"Simultaneous Feature Selection and Feature Weighting Using Hybrid Tabu Search\/K-Nearest Neighbor Classifier","volume":"28","author":"Tahir","year":"2007","journal-title":"Pattern Recognit. Lett."},{"key":"ref_27","doi-asserted-by":"crossref","unstructured":"Glover, F., and Laguna, M. (1998). Tabu Search, Handbook of Combinatorial Optimization, Springer.","DOI":"10.1007\/978-1-4615-6089-0"},{"key":"ref_28","doi-asserted-by":"crossref","first-page":"65","DOI":"10.1007\/BF00175354","article-title":"A Genetic Algorithm Tutorial","volume":"4","author":"Whitley","year":"1994","journal-title":"Stat. Comput."},{"key":"ref_29","doi-asserted-by":"crossref","first-page":"341","DOI":"10.1023\/A:1008202821328","article-title":"Differential Evolution\u2014A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces","volume":"11","author":"Storn","year":"1997","journal-title":"J. Glob. Optim."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"51","DOI":"10.1016\/j.advengsoft.2016.01.008","article-title":"The Whale Optimization Algorithm","volume":"95","author":"Mirjalili","year":"2016","journal-title":"Adv. Eng. Softw."},{"key":"ref_31","unstructured":"Chu, S.-C., Tsai, P., and Pan, J.-S. (2006, January 7\u201311). Cat Swarm Optimization. Proceedings of the 9th Pacific Rim International Conference on Artificial Intelligence, Guilin, China."},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"495","DOI":"10.1007\/s00521-015-1870-7","article-title":"Multi-Verse Optimizer: A Nature-Inspired Algorithm for Global Optimization","volume":"27","author":"Mirjalili","year":"2016","journal-title":"Neural Comput. Appl."},{"key":"ref_33","doi-asserted-by":"crossref","first-page":"104","DOI":"10.1016\/j.knosys.2016.06.029","article-title":"QUasi-Affine TRansformation Evolutionary (QUATRE) Algorithm: A Cooperative Swarm Based Algorithm for Global Optimization","volume":"109","author":"Meng","year":"2016","journal-title":"Knowl.-Based Syst."},{"key":"ref_34","doi-asserted-by":"crossref","first-page":"113609","DOI":"10.1016\/j.cma.2020.113609","article-title":"The Arithmetic Optimization Algorithm","volume":"376","author":"Abualigah","year":"2021","journal-title":"Comput. Methods Appl. Mech. Eng."},{"key":"ref_35","doi-asserted-by":"crossref","first-page":"67","DOI":"10.1109\/4235.585893","article-title":"No Free Lunch Theorems for Optimization","volume":"1","author":"Wolpert","year":"1997","journal-title":"IEEE Trans. Evol. Comput."},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Iliyasu, A.M., and Fatichah, C. (2017). A Quantum Hybrid PSO Combined with Fuzzy K-NN Approach to Feature Selection and Cell Classification in Cervical Cancer Detection. Sensors, 17.","DOI":"10.20944\/preprints201711.0193.v1"},{"key":"ref_37","doi-asserted-by":"crossref","first-page":"67","DOI":"10.1145\/200836.200853","article-title":"A Decomposition of Multidimensional Point Sets with Applications to K-Nearest-Neighbors and N-Body Potential Fields","volume":"42","author":"Callahan","year":"1995","journal-title":"J. ACM"},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"3089","DOI":"10.1029\/1999WR900028","article-title":"A K-Nearest-Neighbor Simulator for Daily Precipitation and Other Weather Variables","volume":"35","author":"Rajagopalan","year":"1999","journal-title":"Water Resour. Res."},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Yang, X.S., and Deb, S. (2009, January 9\u201311). Cuckoo Search via L\u00e9vy Flights. Proceedings of the 2009 World Congress on Nature & Biologically Inspired Computing (NaBIC), Coimbatore, India.","DOI":"10.1109\/NABIC.2009.5393690"},{"key":"ref_40","first-page":"809","article-title":"A Parallel Particle Swarm Optimization Algorithm with Communication Strategies","volume":"21","author":"Chang","year":"2005","journal-title":"J. Inf. Sci. Eng."},{"key":"ref_41","first-page":"499","article-title":"\u03ba NN Algorithm with Data-Driven k Value","volume":"Volume 8933","author":"Cheng","year":"2014","journal-title":"Proceedings of the International Conference on Advanced Data Mining and Applications, 10th International Conference, ADMA 2014"},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"21853","DOI":"10.1007\/s11042-019-7498-3","article-title":"An Adaptive Fuzzy K-Nearest Neighbor Approach for MR Brain Tumor Image Classification Using Parameter Free Bat Optimization Algorithm","volume":"78","author":"Kaur","year":"2019","journal-title":"Multimed. Tools Appl."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"104049","DOI":"10.1016\/j.engappai.2020.104049","article-title":"Digital Watermarking with Improved SMS Applied for QR Code","volume":"97","author":"Pan","year":"2021","journal-title":"Eng. Appl. Artif. Intell."},{"key":"ref_44","doi-asserted-by":"crossref","unstructured":"Marriwala, N., and Rathee, P. (November, January 30). An Approach to Increase the Wireless Sensor Network Lifetime. Proceedings of the 2012 World Congress on Information and Communication Technologies, Trivandrum, India.","DOI":"10.1109\/WICT.2012.6409128"},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"26","DOI":"10.1109\/65.283931","article-title":"Network Intrusion Detection","volume":"8","author":"Mukherjee","year":"1994","journal-title":"IEEE Netw."},{"key":"ref_46","doi-asserted-by":"crossref","unstructured":"Shi, Y., Tian, Y., Kou, G., Peng, Y., and Li, J. (2011). Network Intrusion Detection. Optimization Based Data Mining: Theory and Applications, Springer. Advanced Information and Knowledge Processing.","DOI":"10.1007\/978-0-85729-504-0"},{"key":"ref_47","doi-asserted-by":"crossref","first-page":"120","DOI":"10.1016\/j.knosys.2015.12.022","article-title":"SCA: A Sine Cosine Algorithm for Solving Optimization Problems","volume":"96","author":"Mirjalili","year":"2016","journal-title":"Knowl.-Based Syst."},{"key":"ref_48","doi-asserted-by":"crossref","first-page":"4731953","DOI":"10.1155\/2016\/4731953","article-title":"WSN-DS: A Dataset for Intrusion Detection Systems in Wireless Sensor Networks","volume":"2016","author":"Almomani","year":"2016","journal-title":"J. Sens."},{"key":"ref_49","doi-asserted-by":"crossref","first-page":"68","DOI":"10.1109\/LNET.2019.2901792","article-title":"On the Feasibility of Deep Learning in Sensor Network Intrusion Detection","volume":"1","author":"Otoum","year":"2019","journal-title":"IEEE Netw. Lett."},{"key":"ref_50","doi-asserted-by":"crossref","unstructured":"Almaiah, M.A. (2021). A New Scheme for Detecting Malicious Attacks in Wireless Sensor Networks Based on Blockchain Technology, Springer.","DOI":"10.1007\/978-3-030-74575-2_12"},{"key":"ref_51","doi-asserted-by":"crossref","first-page":"183","DOI":"10.1016\/j.procs.2015.08.331","article-title":"Neighbor Node Trust Based Intrusion Detection System for WSN","volume":"63","author":"Sajjad","year":"2015","journal-title":"Procedia Comput. Sci."}],"container-title":["Sensors"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/4\/1407\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T22:17:59Z","timestamp":1760134679000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1424-8220\/22\/4\/1407"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2022,2,11]]},"references-count":51,"journal-issue":{"issue":"4","published-online":{"date-parts":[[2022,2]]}},"alternative-id":["s22041407"],"URL":"https:\/\/doi.org\/10.3390\/s22041407","relation":{},"ISSN":["1424-8220"],"issn-type":[{"value":"1424-8220","type":"electronic"}],"subject":[],"published":{"date-parts":[[2022,2,11]]}}}