Proceedings of the 9th International Conference on Computer Engineering and Networks [1st ed.] 9789811537523, 9789811537530

This book gathers papers presented at the 9th International Conference on Computer Engineering and Networks (CENet2019),

447 75 43MB

English Pages XVI, 1176 [1123] Year 2021

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Front Matter ....Pages i-xvi
Front Matter ....Pages 1-1
Design of Collaboration Engine for Large-Scale Heterogeneous Clusters (Hui Zhao, Haifeng Wang)....Pages 3-11
Research on Multi-stage GPU Collaborative Model (Longxiang Zhang, Haifeng Wang)....Pages 13-22
HSO Algorithm for RRAP Problem in Three-State Device Network (Dongkui Li)....Pages 23-33
A Method of Service Function Chain Arrangement for Load Balancing (Zhan Shi, Zanhong Wu, Ying Zeng)....Pages 35-42
The Optimal Implementation of Khudra Lightweight Block Cipher (Xiantong Huang, Lang Li, Ying Guo)....Pages 43-53
Droop Control of Microgrid Based on Genetic Optimization Algorithm (Yongqi Tang, Xinxin Tang, Jiawei Li, Mingqiang Wu)....Pages 55-65
Research and Implementation of a Remote Monitoring Platform for Antarctic Greenhouse (Kaiyan Lin, Chang Liu, Junhui Wu, Jie Chen, Huiping Si)....Pages 67-79
Application Research in DC Charging Pile of Full-Bridge DC–DC Converter Based on Fuzzy Control (Binjun Cai, Tao Xiang, Tanxin Li)....Pages 81-91
Performance Analysis of Multi-user Chaos Measurement and Control System (Lili Xiao, Guixin Xuan, Yongbin Wu)....Pages 93-100
Effect of Magnetic Field on the Damping Capability of Ni52.5Mn23.7Ga23.8/Polymer Composites (Xiaogang Sun, Xiaomin Peng, Lian Huang, Qian Tang, Sheng Liu)....Pages 101-107
Knock Knock: A Binary Human–Machine Interactive Channel for Smartphone with Accelerometer (Haiyang Wang, Huixiang Zhang, Zhipin Gu, Wenteng Xu, Chunlei Chen)....Pages 109-116
Remote Network Provisioning with Terminals Priority and Cooperative Relaying for Embedded SIM for NB-IoT Reliability (Yuxiang Lv, Yang Yang, Ping Ma, Yawen Dong, Wei Shang)....Pages 117-125
Design of a Fully Programmable 3D Graphics Processor for Mobile Applications (Lingjuan Wu, Wenqian Zhao, Dunshan Yu)....Pages 127-134
Outer Synchronization Between Complex Delayed Networks with Both Uncertain Parameters and Unknown Topological Structure (Zhong Chen, Xiaomei Tian, Tianqi Lei, Junyao Chen)....Pages 135-143
Discussion on the Application of Digital Twins in the Wear of Parts (Fuchun Xie, Zhiyang Zhou)....Pages 145-153
Research on Key Algorithms of Segmented Spectrum Retrieval System (Jianfeng Tang, Jie Huang)....Pages 155-163
Research on Fuzzy Control Strategy for Intelligent Anti-rear-end of Automobile (Shihan Cai, Xianbo Sun, Yong Huang, Hecui Liu)....Pages 165-181
Design and Optimization of Wind Power Electric Pitch Permanent Magnet Synchronous Servo Motor (Weicai Xie, Xiaofeng Li, Jie Li, Shihao Wang, Li He, Lei Cao)....Pages 183-191
Design of Step Servo Slave System Based on EtherCAT (Liang Zheng, Zhangyu Lu, Zhihua Liu, Chongzhuo Tan)....Pages 193-205
Investigation of Wind Turbine Blade Defect Classification Based on Deep Convolutional Neural Network (Ting Li, Yu Yang, Qin Wan, Di Wu, Kailin Song)....Pages 207-213
Research on Weakening Cogging Torque of Permanent Magnet Synchronous Wind Generator (Quansuo Xiang, Qiuling Deng, Xia Long, Mengqing Ke, Qun Zhang)....Pages 215-223
Research on Edge Network Resource Allocation Mechanism for Mobile Blockchain (Qiang Gao, Guoyi Zhang, Jinyu Zhou, Jia Chen, Yuanyuan Qi)....Pages 225-232
MATSCO: A Novel Minimum Cost Offloading Algorithm for Task Execution in Multiuser Mobile Edge Computing Systems (Jin Tan, Wenjing Li, Huiyong Liu, Lei Feng)....Pages 233-241
Medical Data Crawling Algorithm Based on PageRank (Maojie Hao, Peng Shu, Zhengan Zhai, Liang Zhu, Yang Yang, Jianxin Wang)....Pages 243-253
The Alarm Feature Analysis Algorithm for Communication Network (Xilin Ji, Xiaodan Shi, Jinxi Han, Yonghua Huo, Yang Yang)....Pages 255-265
Front Matter ....Pages 267-267
Analysis of User Suspicious Behavior in Power Monitoring System Based on Text Vectorization and Unsupervised Machine Learning (Jing Wang, Ye Liang, Lingyun Wu, Chengjiang Liu, Peng Yang)....Pages 269-279
Prediction of Coal Mine Accidental Deaths for 5 Years Based on 14 Years Data Analysis (Yousuo Joseph Zou, Jun Steed Huang, Tong Xu, Anne Zou, Bruce He, Xinyi Tao et al.)....Pages 281-289
Patent Prediction Based on Long Short-Term Memory Recurrent Neural Network (Yao Zhang, Qun Wang)....Pages 291-299
Chinese Aspect-Level Sentiment Analysis CNN-LSTM Based on Mixed Vector (Kangxin Cheng, Zhili Wang, Jiaqi Liu)....Pages 301-310
Prediction of RNA Structures with Pseudoknots Using Convolutional Neural Network (Sixin Tang, Shiting Li, Jing Chen)....Pages 311-319
An Improved Attribute Value-Weighted Double-Layer Hidden Naive Bayes Classification Algorithm (Huanying Zhang, Yushui Geng, Fei Wang)....Pages 321-331
An Improved Fuzzy C-Means Clustering Algorithm Based on Intuitionistic Fuzzy Sets (Fei Wang, Yushui Geng, Huanying Zhang)....Pages 333-345
SFC Orchestration Method Based on Energy Saving and Time Delay Optimization (Zanhong Wu, Zhan Shi, Ying Zeng)....Pages 347-356
Predict Oil Production with LSTM Neural Network (Chao Yan, Yishi Qiu, Yongqiong Zhu)....Pages 357-364
Improved Fatigue Detection Using Eye State Recognition with HOG-LBP (Bin Huang, Renwen Chen, Wang Xu, Qinbang Zhou, Xu Wang)....Pages 365-374
Portrait Style Transfer with Generative Adversarial Networks (Qingyun Liu, Feng Zhang, Mugang Lin, Ying Wang)....Pages 375-382
Impossible Differential Analysis on 8-Round PRINCE (Yaoling Ding, Keting Jia, An Wang, Ying Shi)....Pages 383-395
Multi-step Ahead Time Series Forecasting Based on the Improved Process Neural Networks (Haijian Shao, Chunlong Hu, Xing Deng, Dengbiao Jiang)....Pages 397-404
An Improved Quantum Nearest-Neighbor Algorithm (Ying Zhang, Bao Feng, Wei Jia, Cheng-Zhuo Xu)....Pages 405-413
A Trend Extraction Method Based on Improved Sliding Window (Ming Lu, Yongteng Sun, Hao Duan, Zuguo Chen)....Pages 415-422
Three-Dimensional Dense Study Based on Kinect (Qin Wan, Yueping Xiao, Jine Yan, Xiaolin Zhu)....Pages 423-429
A Cascaded Feature Fusion Residual Network for Image Super-resolution (Wang Xu, Renwen Chen, Bin Huang, Qinbang Zhou, Yaoyu Wang)....Pages 431-439
Spp-U-net: Deep Neural Network for Road Region Segmentation (Yang Zhang, Dawei Luo, Dengfeng Yao, Hongzhe Liu)....Pages 441-445
Research on the Computational Model of Problem-Based Tutoring (Yan Liu, Qiang Peng, Lin Liu)....Pages 447-459
Research on Face Recognition Algorithms and Application Based on PCA Dimension Reduction and LBP (Kangman Li, Ruihua Nie)....Pages 461-470
Research on Algorithms for Setting up Advertising Platform Based on Minimum Weighted Vertex Covering (Ying Wang, Yaqi Sun, Qinyun Liu)....Pages 471-479
Lane Detection Based on DeepLab (Mingzhe Li)....Pages 481-487
Hybrid Program Recommendation Algorithm Based on Spark MLlib in Big Data Environment (Aoxiang Peng, Huiyong Liu)....Pages 489-498
A Deep Learning Method for Intrusion Detection by Spatial and Temporal Feature Extraction (Haizhou Cao, Wenjie Chen, Shuai Ye, Ziao Jiao, Yangjie Cao)....Pages 499-508
Network Traffic Prediction in Network Security Based on EMD and LSTM (Wei Zhao, Huifeng Yang, Jingquan Li, Li Shang, Lizhang Hu, Qiang Fu)....Pages 509-518
An Introduction to Quantum Machine Learning Algorithms (Rongji Li, Juan Xu, Jiabin Yuan, Dan Li)....Pages 519-532
Front Matter ....Pages 533-533
Design of Seat Selecting System for Self-study Room in Library Based on Smart Campus (Jiujiu Yu, Jishan Zhang, Liqiong Pan, Cuiping Wang, Gang Xiao)....Pages 535-543
An Optimized Scheme of Information Hiding-Based Visual Secret Sharing (Yi Zou, Lang Li, Ge Jiao)....Pages 545-553
Constructions of Lightweight MDS Diffusion Layers from Hankel Matrices (Qiuping Li, Lang Li, Jian Zhang, Junxia Zhao, Kangman Li)....Pages 555-563
Power Analysis Attack on a Lightweight Block Cipher GIFT (Jian Zhang, Lang Li, Qiuping Li, Junxia Zhao, Xiaoman Liang)....Pages 565-574
Research and Development of Fine Management System for Underground Trackless Vehicles (Xu Liu, Guan Zhou Liu, Feng Jin, Xiao Lv, Yuan-Sheng Zhang, Zhong-Ye Jiang)....Pages 575-584
A Certificate-Based Authentication for SIP in Embedded Devices (Jie Jiang, Lei Zhao)....Pages 585-590
An Anti-Power Attack Circuit Design for Block Cipher (Ying Jian Yan, Zhen Zheng)....Pages 591-599
A New Data Placement Approach for Heterogeneous Ceph Storage System (Fei Zheng, Jiping Wang, Xuekun Hao, Hongbing Qiu)....Pages 601-609
Construction-Based Secret Image Sharing (Xuehu Yan, Guozheng Yang, Lanlan Qi, Jingju Liu, Yuliang Lu)....Pages 611-623
A Novel AES Random Mask Scheme Against Correlation Power Analysis (Ge Jiao, Lang Li, Yi Zou)....Pages 625-633
Deployment Algorithm of Service Function Chain with Packet Loss Rate Optimization (Yingjie Jiang, Xing Wang, Tao Zhao, Ying Wang, Peng Yu)....Pages 635-645
Security Count Query and Integrity Verification Based on Encrypted Genomic Data (Jing Chen, Zhiping Chen, Linai Kuang, Xianyou Zhu, Sai Zou, Zhanwei Xuan et al.)....Pages 647-654
Homological Fault Attack on AES Block Cipher and Its Countermeasures (Ning Shang, Jinpeng Zhang, Yaoling Ding, Caisen Chen, An Wang)....Pages 655-665
Researching on AES Algorithm Based on Software Reverse Engineering (Qingjun Yuan, Siqi Lu, Zongbo Zhang, Xi Chen)....Pages 667-675
MC-PKS: A Collaboration Public Key Services System for Mobile Applications (Tao Sun, Shule Chen, Jiajun Huang, Yamin Wen, Changshe Ma, Zheng Gong)....Pages 677-686
Security Analysis and Improvement of User Authentication Scheme for Wireless Body Area Network (Songsong Zhang, Xiang Li, Yong Xie)....Pages 687-694
Research and Implementation of Hybrid Encryption System Based on SM2 and SM4 Algorithm (Zhiqiang Wang, Hongyu Dong, Yaping Chi, Jianyi Zhang, Tao Yang, Qixu Liu)....Pages 695-702
STL-FNN: An Intelligent Prediction Model of Daily Theft Level (Shaochong Shi, Peng Chen, Zhaolong Zeng, Xiaocheng Hu)....Pages 703-711
WeChat Public Platform for Customers Reserving Bank Branches Based IoT (Jie Chen, Xiaoman Liang, Jian Zhang)....Pages 713-723
Metadata Management Algorithm Based on Improved LSM Tree (Yonghua Huo, Ningling Ge, Jinxi Han, Kun Wang, Yang Yang)....Pages 725-733
A Text Information Hiding Method Based on Sentiment Word Substitution (Fufang Li, Han Tang, Liangchen Liu, Binbin Li, Yuanyong Feng, Wenbin Chen et al.)....Pages 735-744
Research on Information Hiding Based on Intelligent Creation of Tang Poem (Fufang Li, Binbin Li, Yongfeng Huang, WenBin Chen, Lingxi Peng, Yuanyong Feng)....Pages 745-755
Design and Evaluation of Traffic Congestion Index for Yancheng City (Fei Ding, Yao Wang, Guoxiang Cai, Dengyin Zhang, Hongbo Zhu)....Pages 757-766
A Survey on Anomaly Detection Techniques in Large-Scale KPI Data (Ji Qian, Guangfu Zeng, Zhiping Cai, Shuhui Chen, Ningzheng Luo, Haibing Liu)....Pages 767-776
A Counterfactual Quantum Key Distribution Protocol Based on the Idea of Wheeler’s Delayed-Choice Experiment (Nan Xiang)....Pages 777-783
A Non-intrusive Appliances Load Monitoring Method Based on Hourly Smart Meter Data (Chunhe Song, Zhongfeng Wang, Shuji Liu, Libo Xu, Dapeng Zhou, Peng Zeng)....Pages 785-799
Design and Implementation of VxWorks System Vulnerability Mining Framework Based on Dynamic Symbol Execution (Wei Zheng, Yu Zhou, Boheng Wang)....Pages 801-811
Front Matter ....Pages 813-813
Deep Web Selection Based on Entity Association (Song Deng, Wen Luo, Xueke Xu)....Pages 815-825
Bayesian-Based Efficient Fault Location Algorithm for Power Bottom-Guaranteed Communication Networks (Xinzhan Liu, Weijian Li, Peng Liu, Huiqing Li)....Pages 827-835
Fault Diagnosis Algorithm for Power Bottom-Guaranteed Communication Network Based on Random Forest (Zhan Shi, Ying Zeng, Zhengfeng Zhang, Tingbiao Hu)....Pages 837-845
Design of a Real-Time Transmission System for TV- and Radar-Integrated Videos (Yingdong Chu)....Pages 847-854
Research on Automated Penetration Testing Framework for Power Web System Integrating Property Information and Expert Experience (Zesheng Xi, Jie Cui, Bo Zhang)....Pages 855-865
VNF Deployment Method Based on Multipath Transmission (Zhan Shi, Ying Zeng, Zanhong Wu)....Pages 867-874
Service Chain Orchestration Based on Deep Reinforcement Learning in Intent-Based IoT (Zhan Shi, Ying Zeng, Zanhong Wu)....Pages 875-882
Design and Implementation of Wi-Fi-Trusted Authentication System Based on Blockchain (Qiang Gao, Zhifeng Tian, Yao Dai)....Pages 883-891
Efficient Fault Location Algorithm Based on D-Segmentation for Data Network Supporting Quantum Communication (Kejun Xie, Ziyan Zhao, Dequan Gao, Bozhong Li, Hao Chen)....Pages 893-900
Equipment Fault Prediction Method in Power Communication Network Based on Equipment Frequency Domain Characteristics (Ruide Li, Zhirong Peng, Xi Yang, Tianyi Zhang, Cheng Pan)....Pages 901-909
VNF Placement and Routing Algorithm for Energy Saving and QoS Guarantee (Ying Zeng, Zhan Shi, Zanhong Wu)....Pages 911-919
Research on IoT Architecture and Application Scheme for Smart Grid (Dedong Sun, Wenjing Li, Xianjiong Yao, Hui Liu, Jinlong Chai, Kunyi Xie et al.)....Pages 921-928
A Method of Dynamic Resource Adjustment for 5G Network Slice (Qinghai Ou, Jigao Song, Yanru Wang, Zhiqiang Wang, Yang Yang, Diya Ran et al.)....Pages 929-936
Network Slice Access Selection Scheme for 5G Network Power Terminal Based on Grey Analytic Hierarchy Process (Yake Zhang, Xiaobo Jiao, Xin Yang, Erpeng Yang, Jianpo Du, Yueqi Zi et al.)....Pages 937-944
Resource Allocation Mechanism in Electric Vehicle Charging Scenario for Ubiquitous Power-IoT Coverage Enhancement (Yao Wang, Yun Liang, Wenfeng Tian, Xiaoyan Sun, Xiyang Yin, Liang Zhu et al.)....Pages 945-954
Computation Resource Allocation Based on Particle Swarm Optimization for LEO Satellite Networks (Shan Lu, Fei Zheng, Wei Si, Mengqi Liu)....Pages 955-962
Security Analysis and Protection for Charging Protocol of Smart Charging Pile (Jiangpei Xu, Xiao Yu, Li Tian, Jie Wang, Xiaojun Liu)....Pages 963-970
The Power Distribution Control Strategy of Fully Active Hybrid Energy Storage System Based on Sliding Mode Control (Zhangyu Lu, Chongzhuo Tan, Liang Zheng)....Pages 971-978
Secure Communication with Two-Stage Beamforming for Wireless Energy and Jamming Signal Based on Power Beacon (Dandan Guo, Jigao Song, Xuanzhong Wang, Xin Wang, Yanru Wang)....Pages 979-990
A Research of Short-Term Wind Power Prediction Based on Support Vector Regression (Shixiong Bai, Feng Huang)....Pages 991-996
Droop Control Strategy of Microgrid Parallel Inverter Under Island Operation (Xia Long, Qiuling Deng, Quansuo Xiang, Mengqing Ke, Qun Zhang)....Pages 997-1002
ZigBee-Based Architecture Design of Imperceptible Smart Home System (Juanli Kuang, Lang Li)....Pages 1003-1011
Data Collection of Power Internet of Things Sensing Layer Based on Path Optimization Strategy (Xianjiong Yao, Dedong Sun, Qinghai Ou, Yilong Chen, Liang Zhu, Diya Ran et al.)....Pages 1013-1020
STFRC: A Multimedia Stream Congestion Control Algorithm Based on TFRC (Fuzhe Zhao, Yuqing Huang)....Pages 1021-1030
Multi-controller Cooperation High-Efficiency Device Fault Diagnosis Algorithm for Power Communication Network in SDN Environment (Ruide Li, Zhenchao Liao, Minghua Tang, Jiajun Chen, Weixiong Li)....Pages 1031-1039
Service Recovery Algorithm for Power Communication Network Based on SDN Multi-mode Channel (Deru Guo, Xutian He, Guanqiang Lin, Cizhao Luo, Baiwei Zhong)....Pages 1041-1049
A Multi-channel Aggregation Selection Mechanism Based on TOPSIS in Electric Power Communication Network (Deru Guo, Peifang Song, Cizhao Luo, Shuqing Li, Feida Jiang)....Pages 1051-1061
Fault Diagnosis and CAN Bus/Ethernet Redundancy Design of a Monitoring and Control System (Weizhi Geng, Daojun Fu, Mengxin Wu)....Pages 1063-1070
Terminal Communication Network Fault Diagnosis Algorithm Based on TOPSIS Algorithm (Ran Li, Haiyang Cong, Fanbo Meng, Diying Wu, Yi Lu, Taiyi Fu)....Pages 1071-1079
Real-Time Pricing Method Based on Lyapunov for Stochastic and Electric Power Demand in Smart Grid (Yake Zhang, Yucong Li, Diya Ran)....Pages 1081-1087
Resource Allocation Algorithm for Power Bottom-Guaranteed Communication Network Based on Network Characteristics and Historical Data (Xinzhan Liu, Zhongmiao Kang, Yingze Qiu, Wankai Liu)....Pages 1089-1096
An Outlier Detection Algorithm for Electric Power Data Based on DBSCAN and LOF (Hongyan Zhang, Bo Liu, Peng Cui, You Sun, Yang Yang, Shaoyong Guo)....Pages 1097-1106
Power Anomaly Data Detection Algorithm Based on User Tag and Random Forest (JianXun Guo, Bo Liu, Hongyan Zhang, Qiang Li, Shaoyong Guo, Yang Yang)....Pages 1107-1115
Optimal Distribution in Wireless Mesh Network with Enhanced Connectivity and Coverage (Hao Zhang, Siyuan Wu, Changjiang Zhang, Sujatha Krishnamoorthy)....Pages 1117-1128
A Traffic Anomaly Detection Method Based on Gravity Theory and LOF (Xiaoxiao Zeng, Yonghua Huo, Yang Yang, Liandong Chen, Xilin Ji)....Pages 1129-1137
Construction of Management and Control Platform for Bus Parking and Maintenance Field Under Hybrid Cloud Computing Mode (Ying-long Ge)....Pages 1139-1150
A Data Clustering Method for Communication Network Based on Affinity Propagation (Junli Mao, Lishui Chen, Xiaodan Shi, Chao Fang, Yang Yang, Peng Yu)....Pages 1151-1160
Priority-Based Optimal Resource Reservation Mechanism in Wireless Sensor Networks for Smart Grid (Hongfa Li, Jianfa Pu, Duanyun Chen, Yongtian Xie, Wenming Fang, Shimulin Xie)....Pages 1161-1168
Energy-Efficient Clustering and Multi-hop Routing Algorithm Based on GMM for Power IoT Network (Yuanjiu Li, Junrong Zheng, Hongpo Zhang, Xinsheng Ye, Zufeng Liu, Jincheng Li)....Pages 1169-1176
Recommend Papers

Proceedings of the 9th International Conference on Computer Engineering and Networks [1st ed.]
 9789811537523, 9789811537530

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

Advances in Intelligent Systems and Computing 1143

Qi Liu · Xiaodong Liu · Lang Li · Huiyu Zhou · Hui-Huang Zhao   Editors

Proceedings of the 9th International Conference on Computer Engineering and Networks

Advances in Intelligent Systems and Computing Volume 1143

Series Editor Janusz Kacprzyk, Systems Research Institute, Polish Academy of Sciences, Warsaw, Poland Advisory Editors Nikhil R. Pal, Indian Statistical Institute, Kolkata, India Rafael Bello Perez, Faculty of Mathematics, Physics and Computing, Universidad Central de Las Villas, Santa Clara, Cuba Emilio S. Corchado, University of Salamanca, Salamanca, Spain Hani Hagras, School of Computer Science and Electronic Engineering, University of Essex, Colchester, UK László T. Kóczy, Department of Automation, Széchenyi István University, Gyor, Hungary Vladik Kreinovich, Department of Computer Science, University of Texas at El Paso, El Paso, TX, USA Chin-Teng Lin, Department of Electrical Engineering, National Chiao Tung University, Hsinchu, Taiwan Jie Lu, Faculty of Engineering and Information Technology, University of Technology Sydney, Sydney, NSW, Australia Patricia Melin, Graduate Program of Computer Science, Tijuana Institute of Technology, Tijuana, Mexico Nadia Nedjah, Department of Electronics Engineering, University of Rio de Janeiro, Rio de Janeiro, Brazil Ngoc Thanh Nguyen , Faculty of Computer Science and Management, Wrocław University of Technology, Wrocław, Poland Jun Wang, Department of Mechanical and Automation Engineering, The Chinese University of Hong Kong, Shatin, Hong Kong

The series “Advances in Intelligent Systems and Computing” contains publications on theory, applications, and design methods of Intelligent Systems and Intelligent Computing. Virtually all disciplines such as engineering, natural sciences, computer and information science, ICT, economics, business, e-commerce, environment, healthcare, life science are covered. The list of topics spans all the areas of modern intelligent systems and computing such as: computational intelligence, soft computing including neural networks, fuzzy systems, evolutionary computing and the fusion of these paradigms, social intelligence, ambient intelligence, computational neuroscience, artificial life, virtual worlds and society, cognitive science and systems, Perception and Vision, DNA and immune based systems, self-organizing and adaptive systems, e-Learning and teaching, human-centered and human-centric computing, recommender systems, intelligent control, robotics and mechatronics including human-machine teaming, knowledge-based paradigms, learning paradigms, machine ethics, intelligent data analysis, knowledge management, intelligent agents, intelligent decision making and support, intelligent network security, trust management, interactive entertainment, Web intelligence and multimedia. The publications within “Advances in Intelligent Systems and Computing” are primarily proceedings of important conferences, symposia and congresses. They cover significant recent developments in the field, both of a foundational and applicable character. An important characteristic feature of the series is the short publication time and world-wide distribution. This permits a rapid and broad dissemination of research results. ** Indexing: The books of this series are submitted to ISI Proceedings, EI-Compendex, DBLP, SCOPUS, Google Scholar and Springerlink **

More information about this series at http://www.springer.com/series/11156

Qi Liu Xiaodong Liu Lang Li Huiyu Zhou Hui-Huang Zhao •







Editors

Proceedings of the 9th International Conference on Computer Engineering and Networks

123

Editors Qi Liu School of Computer and Software Nanjing University of Information Science and Technology Nanjing, Jiangsu, China Lang Li College of Computer Science and Technology Hengyang Normal University Hengyang, Hunan, China

Xiaodong Liu School of Computing Edinburgh Napier University Edinburgh, UK Huiyu Zhou Department of Informatics University of Leicester Leicester, UK

Hui-Huang Zhao College of Computer Science and Technology Hengyang Normal University Hengyang, Hunan, China

ISSN 2194-5357 ISSN 2194-5365 (electronic) Advances in Intelligent Systems and Computing ISBN 978-981-15-3752-3 ISBN 978-981-15-3753-0 (eBook) https://doi.org/10.1007/978-981-15-3753-0 © Springer Nature Singapore Pte Ltd. 2021 This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use. The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, express or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd. The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721, Singapore

Preface

This conference proceedings is a collection of the papers accepted by the CENet2019—the 9th International Conference on Computer Engineering and Networks held on October 18–20, 2019, in Changsha, China. This proceedings contains four parts: The first part focuses on System Detection and Application (25 papers); second part Machine Learning and Application (26 papers); third part Information Analysis and Application (27 papers); fourth part Communication Analysis and Application (39 papers). Each part can be used as an excellent reference by industry practitioners, university faculties, research fellows, and undergraduates as well as graduate students who need to build a knowledge base of the most current advances and state-of-practice in the topics covered by this conference proceedings. This will enable them to produce, maintain, and manage systems with high levels of trustworthiness and complexity. Thanks to the authors for their hard work and dedication as well as the reviewers for ensuring the selection of only the highest-quality papers; their efforts made the proceedings possible. Nanjing, China Edinburgh, UK Hengyang, China Leicester, UK Hengyang, China

Qi Liu Xiaodong Liu Lang Li Huiyu Zhou Hui-Huang Zhao

v

Contents

System Detection Design of Collaboration Engine for Large-Scale Heterogeneous Clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Hui Zhao and Haifeng Wang Research on Multi-stage GPU Collaborative Model . . . . . . . . . . . . . . . Longxiang Zhang and Haifeng Wang

3 13

HSO Algorithm for RRAP Problem in Three-State Device Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dongkui Li

23

A Method of Service Function Chain Arrangement for Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zhan Shi, Zanhong Wu, and Ying Zeng

35

The Optimal Implementation of Khudra Lightweight Block Cipher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xiantong Huang, Lang Li, and Ying Guo

43

Droop Control of Microgrid Based on Genetic Optimization Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yongqi Tang, Xinxin Tang, Jiawei Li, and Mingqiang Wu

55

Research and Implementation of a Remote Monitoring Platform for Antarctic Greenhouse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kaiyan Lin, Chang Liu, Junhui Wu, Jie Chen, and Huiping Si

67

Application Research in DC Charging Pile of Full-Bridge DC–DC Converter Based on Fuzzy Control . . . . . . . . . . . . . . . . . . . . . . . . . . . Binjun Cai, Tao Xiang, and Tanxin Li

81

vii

viii

Contents

Performance Analysis of Multi-user Chaos Measurement and Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lili Xiao, Guixin Xuan, and Yongbin Wu

93

Effect of Magnetic Field on the Damping Capability of Ni52.5Mn23.7Ga23.8/Polymer Composites . . . . . . . . . . . . . . . . . . . . . . Xiaogang Sun, Xiaomin Peng, Lian Huang, Qian Tang, and Sheng Liu

101

Knock Knock: A Binary Human–Machine Interactive Channel for Smartphone with Accelerometer . . . . . . . . . . . . . . . . . . . . . . . . . . . Haiyang Wang, Huixiang Zhang, Zhipin Gu, Wenteng Xu, and Chunlei Chen

109

Remote Network Provisioning with Terminals Priority and Cooperative Relaying for Embedded SIM for NB-IoT Reliability . . . . Yuxiang Lv, Yang Yang, Ping Ma, Yawen Dong, and Wei Shang

117

Design of a Fully Programmable 3D Graphics Processor for Mobile Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lingjuan Wu, Wenqian Zhao, and Dunshan Yu

127

Outer Synchronization Between Complex Delayed Networks with Both Uncertain Parameters and Unknown Topological Structure . . . . Zhong Chen, Xiaomei Tian, Tianqi Lei, and Junyao Chen

135

Discussion on the Application of Digital Twins in the Wear of Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fuchun Xie and Zhiyang Zhou

145

Research on Key Algorithms of Segmented Spectrum Retrieval System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jianfeng Tang and Jie Huang

155

Research on Fuzzy Control Strategy for Intelligent Anti-rear-end of Automobile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shihan Cai, Xianbo Sun, Yong Huang, and Hecui Liu

165

Design and Optimization of Wind Power Electric Pitch Permanent Magnet Synchronous Servo Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . Weicai Xie, Xiaofeng Li, Jie Li, Shihao Wang, Li He, and Lei Cao

183

Design of Step Servo Slave System Based on EtherCAT . . . . . . . . . . . Liang Zheng, Zhangyu Lu, Zhihua Liu, and Chongzhuo Tan

193

Investigation of Wind Turbine Blade Defect Classification Based on Deep Convolutional Neural Network . . . . . . . . . . . . . . . . . . Ting Li, Yu Yang, Qin Wan, Di Wu, and Kailin Song

207

Research on Weakening Cogging Torque of Permanent Magnet Synchronous Wind Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quansuo Xiang, Qiuling Deng, Xia Long, Mengqing Ke, and Qun Zhang

215

Contents

ix

Research on Edge Network Resource Allocation Mechanism for Mobile Blockchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Qiang Gao, Guoyi Zhang, Jinyu Zhou, Jia Chen, and Yuanyuan Qi

225

MATSCO: A Novel Minimum Cost Offloading Algorithm for Task Execution in Multiuser Mobile Edge Computing Systems . . . . . . . . . . Jin Tan, Wenjing Li, Huiyong Liu, and Lei Feng

233

Medical Data Crawling Algorithm Based on PageRank . . . . . . . . . . . . Maojie Hao, Peng Shu, Zhengan Zhai, Liang Zhu, Yang Yang, and Jianxin Wang The Alarm Feature Analysis Algorithm for Communication Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xilin Ji, Xiaodan Shi, Jinxi Han, Yonghua Huo, and Yang Yang

243

255

Machine Learning Analysis of User Suspicious Behavior in Power Monitoring System Based on Text Vectorization and Unsupervised Machine Learning . . . Jing Wang, Ye Liang, Lingyun Wu, Chengjiang Liu, and Peng Yang Prediction of Coal Mine Accidental Deaths for 5 Years Based on 14 Years Data Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yousuo Joseph Zou, Jun Steed Huang, Tong Xu, Anne Zou, Bruce He, Xinyi Tao, and Sam Zhang

269

281

Patent Prediction Based on Long Short-Term Memory Recurrent Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yao Zhang and Qun Wang

291

Chinese Aspect-Level Sentiment Analysis CNN-LSTM Based on Mixed Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kangxin Cheng, Zhili Wang, and Jiaqi Liu

301

Prediction of RNA Structures with Pseudoknots Using Convolutional Neural Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sixin Tang, Shiting Li, and Jing Chen

311

An Improved Attribute Value-Weighted Double-Layer Hidden Naive Bayes Classification Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Huanying Zhang, Yushui Geng, and Fei Wang

321

An Improved Fuzzy C-Means Clustering Algorithm Based on Intuitionistic Fuzzy Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fei Wang, Yushui Geng, and Huanying Zhang

333

SFC Orchestration Method Based on Energy Saving and Time Delay Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zanhong Wu, Zhan Shi, and Ying Zeng

347

x

Contents

Predict Oil Production with LSTM Neural Network . . . . . . . . . . . . . . Chao Yan, Yishi Qiu, and Yongqiong Zhu Improved Fatigue Detection Using Eye State Recognition with HOG-LBP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bin Huang, Renwen Chen, Wang Xu, Qinbang Zhou, and Xu Wang

357

365

Portrait Style Transfer with Generative Adversarial Networks . . . . . . Qingyun Liu, Feng Zhang, Mugang Lin, and Ying Wang

375

Impossible Differential Analysis on 8-Round PRINCE . . . . . . . . . . . . . Yaoling Ding, Keting Jia, An Wang, and Ying Shi

383

Multi-step Ahead Time Series Forecasting Based on the Improved Process Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Haijian Shao, Chunlong Hu, Xing Deng, and Dengbiao Jiang

397

An Improved Quantum Nearest-Neighbor Algorithm . . . . . . . . . . . . . Ying Zhang, Bao Feng, Wei Jia, and Cheng-Zhuo Xu

405

A Trend Extraction Method Based on Improved Sliding Window . . . . Ming Lu, Yongteng Sun, Hao Duan, and Zuguo Chen

415

Three-Dimensional Dense Study Based on Kinect . . . . . . . . . . . . . . . . Qin Wan, Yueping Xiao, Jine Yan, and Xiaolin Zhu

423

A Cascaded Feature Fusion Residual Network for Image Super-resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wang Xu, Renwen Chen, Bin Huang, Qinbang Zhou, and Yaoyu Wang

431

Spp-U-net: Deep Neural Network for Road Region Segmentation . . . . Yang Zhang, Dawei Luo, Dengfeng Yao, and Hongzhe Liu

441

Research on the Computational Model of Problem-Based Tutoring . . . Yan Liu, Qiang Peng, and Lin Liu

447

Research on Face Recognition Algorithms and Application Based on PCA Dimension Reduction and LBP . . . . . . . . . . . . . . . . . . Kangman Li and Ruihua Nie

461

Research on Algorithms for Setting up Advertising Platform Based on Minimum Weighted Vertex Covering . . . . . . . . . . . . . . . . . . Ying Wang, Yaqi Sun, and Qinyun Liu

471

Lane Detection Based on DeepLab . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mingzhe Li Hybrid Program Recommendation Algorithm Based on Spark MLlib in Big Data Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Aoxiang Peng and Huiyong Liu

481

489

Contents

A Deep Learning Method for Intrusion Detection by Spatial and Temporal Feature Extraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . Haizhou Cao, Wenjie Chen, Shuai Ye, Ziao Jiao, and Yangjie Cao Network Traffic Prediction in Network Security Based on EMD and LSTM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wei Zhao, Huifeng Yang, Jingquan Li, Li Shang, Lizhang Hu, and Qiang Fu An Introduction to Quantum Machine Learning Algorithms . . . . . . . . Rongji Li, Juan Xu, Jiabin Yuan, and Dan Li

xi

499

509

519

Information Analysis Design of Seat Selecting System for Self-study Room in Library Based on Smart Campus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jiujiu Yu, Jishan Zhang, Liqiong Pan, Cuiping Wang, and Gang Xiao

535

An Optimized Scheme of Information Hiding-Based Visual Secret Sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yi Zou, Lang Li, and Ge Jiao

545

Constructions of Lightweight MDS Diffusion Layers from Hankel Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Qiuping Li, Lang Li, Jian Zhang, Junxia Zhao, and Kangman Li

555

Power Analysis Attack on a Lightweight Block Cipher GIFT . . . . . . . Jian Zhang, Lang Li, Qiuping Li, Junxia Zhao, and Xiaoman Liang Research and Development of Fine Management System for Underground Trackless Vehicles . . . . . . . . . . . . . . . . . . . . . . . . . . Xu Liu, Guan Zhou Liu, Feng Jin, Xiao Lv, Yuan-Sheng Zhang, and Zhong-Ye Jiang

565

575

A Certificate-Based Authentication for SIP in Embedded Devices . . . . Jie Jiang and Lei Zhao

585

An Anti-Power Attack Circuit Design for Block Cipher . . . . . . . . . . . Ying Jian Yan and Zhen Zheng

591

A New Data Placement Approach for Heterogeneous Ceph Storage System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fei Zheng, Jiping Wang, Xuekun Hao, and Hongbing Qiu Construction-Based Secret Image Sharing . . . . . . . . . . . . . . . . . . . . . . Xuehu Yan, Guozheng Yang, Lanlan Qi, Jingju Liu, and Yuliang Lu A Novel AES Random Mask Scheme Against Correlation Power Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ge Jiao, Lang Li, and Yi Zou

601 611

625

xii

Contents

Deployment Algorithm of Service Function Chain with Packet Loss Rate Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Yingjie Jiang, Xing Wang, Tao Zhao, Ying Wang, and Peng Yu Security Count Query and Integrity Verification Based on Encrypted Genomic Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jing Chen, Zhiping Chen, Linai Kuang, Xianyou Zhu, Sai Zou, Zhanwei Xuan, and Lei Wang

635

647

Homological Fault Attack on AES Block Cipher and Its Countermeasures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ning Shang, Jinpeng Zhang, Yaoling Ding, Caisen Chen, and An Wang

655

Researching on AES Algorithm Based on Software Reverse Engineering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Qingjun Yuan, Siqi Lu, Zongbo Zhang, and Xi Chen

667

MC-PKS: A Collaboration Public Key Services System for Mobile Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tao Sun, Shule Chen, Jiajun Huang, Yamin Wen, Changshe Ma, and Zheng Gong Security Analysis and Improvement of User Authentication Scheme for Wireless Body Area Network . . . . . . . . . . . . . . . . . . . . . . Songsong Zhang, Xiang Li, and Yong Xie Research and Implementation of Hybrid Encryption System Based on SM2 and SM4 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . Zhiqiang Wang, Hongyu Dong, Yaping Chi, Jianyi Zhang, Tao Yang, and Qixu Liu STL-FNN: An Intelligent Prediction Model of Daily Theft Level . . . . . Shaochong Shi, Peng Chen, Zhaolong Zeng, and Xiaocheng Hu WeChat Public Platform for Customers Reserving Bank Branches Based IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jie Chen, Xiaoman Liang, and Jian Zhang Metadata Management Algorithm Based on Improved LSM Tree . . . . Yonghua Huo, Ningling Ge, Jinxi Han, Kun Wang, and Yang Yang A Text Information Hiding Method Based on Sentiment Word Substitution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fufang Li, Han Tang, Liangchen Liu, Binbin Li, Yuanyong Feng, Wenbin Chen, and Ying Gao Research on Information Hiding Based on Intelligent Creation of Tang Poem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fufang Li, Binbin Li, Yongfeng Huang, WenBin Chen, Lingxi Peng, and Yuanyong Feng

677

687

695

703

713 725

735

745

Contents

Design and Evaluation of Traffic Congestion Index for Yancheng City . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Fei Ding, Yao Wang, Guoxiang Cai, Dengyin Zhang, and Hongbo Zhu A Survey on Anomaly Detection Techniques in Large-Scale KPI Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ji Qian, Guangfu Zeng, Zhiping Cai, Shuhui Chen, Ningzheng Luo, and Haibing Liu A Counterfactual Quantum Key Distribution Protocol Based on the Idea of Wheeler’s Delayed-Choice Experiment . . . . . . . . . . . . . Nan Xiang A Non-intrusive Appliances Load Monitoring Method Based on Hourly Smart Meter Data . . . . . . . . . . . . . . . . . . . . . . . . . . . Chunhe Song, Zhongfeng Wang, Shuji Liu, Libo Xu, Dapeng Zhou, and Peng Zeng Design and Implementation of VxWorks System Vulnerability Mining Framework Based on Dynamic Symbol Execution . . . . . . . . . . Wei Zheng, Yu Zhou, and Boheng Wang

xiii

757

767

777

785

801

Communication Analysis Deep Web Selection Based on Entity Association . . . . . . . . . . . . . . . . . Song Deng, Wen Luo, and Xueke Xu

815

Bayesian-Based Efficient Fault Location Algorithm for Power Bottom-Guaranteed Communication Networks . . . . . . . . . . . . . . . . . . Xinzhan Liu, Weijian Li, Peng Liu, and Huiqing Li

827

Fault Diagnosis Algorithm for Power Bottom-Guaranteed Communication Network Based on Random Forest . . . . . . . . . . . . . . . Zhan Shi, Ying Zeng, Zhengfeng Zhang, and Tingbiao Hu

837

Design of a Real-Time Transmission System for TV- and Radar-Integrated Videos . . . . . . . . . . . . . . . . . . . . . . . . . Yingdong Chu

847

Research on Automated Penetration Testing Framework for Power Web System Integrating Property Information and Expert Experience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zesheng Xi, Jie Cui, and Bo Zhang VNF Deployment Method Based on Multipath Transmission . . . . . . . . Zhan Shi, Ying Zeng, and Zanhong Wu Service Chain Orchestration Based on Deep Reinforcement Learning in Intent-Based IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zhan Shi, Ying Zeng, and Zanhong Wu

855 867

875

xiv

Contents

Design and Implementation of Wi-Fi-Trusted Authentication System Based on Blockchain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Qiang Gao, Zhifeng Tian, and Yao Dai

883

Efficient Fault Location Algorithm Based on D-Segmentation for Data Network Supporting Quantum Communication . . . . . . . . . . . Kejun Xie, Ziyan Zhao, Dequan Gao, Bozhong Li, and Hao Chen

893

Equipment Fault Prediction Method in Power Communication Network Based on Equipment Frequency Domain Characteristics . . . . Ruide Li, Zhirong Peng, Xi Yang, Tianyi Zhang, and Cheng Pan

901

VNF Placement and Routing Algorithm for Energy Saving and QoS Guarantee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ying Zeng, Zhan Shi, and Zanhong Wu

911

Research on IoT Architecture and Application Scheme for Smart Grid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dedong Sun, Wenjing Li, Xianjiong Yao, Hui Liu, Jinlong Chai, Kunyi Xie, Liang Zhu, and Lei Feng A Method of Dynamic Resource Adjustment for 5G Network Slice . . . Qinghai Ou, Jigao Song, Yanru Wang, Zhiqiang Wang, Yang Yang, Diya Ran, and Lei Feng Network Slice Access Selection Scheme for 5G Network Power Terminal Based on Grey Analytic Hierarchy Process . . . . . . . . . . . . . Yake Zhang, Xiaobo Jiao, Xin Yang, Erpeng Yang, Jianpo Du, Yueqi Zi, Yang Yang, and Lei Feng Resource Allocation Mechanism in Electric Vehicle Charging Scenario for Ubiquitous Power-IoT Coverage Enhancement . . . . . . . . Yao Wang, Yun Liang, Wenfeng Tian, Xiaoyan Sun, Xiyang Yin, Liang Zhu, and Diya Ran

921

929

937

945

Computation Resource Allocation Based on Particle Swarm Optimization for LEO Satellite Networks . . . . . . . . . . . . . . . . . . . . . . . Shan Lu, Fei Zheng, Wei Si, and Mengqi Liu

955

Security Analysis and Protection for Charging Protocol of Smart Charging Pile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jiangpei Xu, Xiao Yu, Li Tian, Jie Wang, and Xiaojun Liu

963

The Power Distribution Control Strategy of Fully Active Hybrid Energy Storage System Based on Sliding Mode Control . . . . . . . . . . . Zhangyu Lu, Chongzhuo Tan, and Liang Zheng

971

Secure Communication with Two-Stage Beamforming for Wireless Energy and Jamming Signal Based on Power Beacon . . . . . . . . . . . . . Dandan Guo, Jigao Song, Xuanzhong Wang, Xin Wang, and Yanru Wang

979

Contents

A Research of Short-Term Wind Power Prediction Based on Support Vector Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Shixiong Bai and Feng Huang Droop Control Strategy of Microgrid Parallel Inverter Under Island Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Xia Long, Qiuling Deng, Quansuo Xiang, Mengqing Ke, and Qun Zhang

xv

991

997

ZigBee-Based Architecture Design of Imperceptible Smart Home System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1003 Juanli Kuang and Lang Li Data Collection of Power Internet of Things Sensing Layer Based on Path Optimization Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . 1013 Xianjiong Yao, Dedong Sun, Qinghai Ou, Yilong Chen, Liang Zhu, Diya Ran, and Yueqi Zi STFRC: A Multimedia Stream Congestion Control Algorithm Based on TFRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1021 Fuzhe Zhao and Yuqing Huang Multi-controller Cooperation High-Efficiency Device Fault Diagnosis Algorithm for Power Communication Network in SDN Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1031 Ruide Li, Zhenchao Liao, Minghua Tang, Jiajun Chen, and Weixiong Li Service Recovery Algorithm for Power Communication Network Based on SDN Multi-mode Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . 1041 Deru Guo, Xutian He, Guanqiang Lin, Cizhao Luo, and Baiwei Zhong A Multi-channel Aggregation Selection Mechanism Based on TOPSIS in Electric Power Communication Network . . . . . . . . . . . 1051 Deru Guo, Peifang Song, Cizhao Luo, Shuqing Li, and Feida Jiang Fault Diagnosis and CAN Bus/Ethernet Redundancy Design of a Monitoring and Control System . . . . . . . . . . . . . . . . . . . . . . . . . . 1063 Weizhi Geng, Daojun Fu, and Mengxin Wu Terminal Communication Network Fault Diagnosis Algorithm Based on TOPSIS Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1071 Ran Li, Haiyang Cong, Fanbo Meng, Diying Wu, Yi Lu, and Taiyi Fu Real-Time Pricing Method Based on Lyapunov for Stochastic and Electric Power Demand in Smart Grid . . . . . . . . . . . . . . . . . . . . . 1081 Yake Zhang, Yucong Li, and Diya Ran

xvi

Contents

Resource Allocation Algorithm for Power Bottom-Guaranteed Communication Network Based on Network Characteristics and Historical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1089 Xinzhan Liu, Zhongmiao Kang, Yingze Qiu, and Wankai Liu An Outlier Detection Algorithm for Electric Power Data Based on DBSCAN and LOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1097 Hongyan Zhang, Bo Liu, Peng Cui, You Sun, Yang Yang, and Shaoyong Guo Power Anomaly Data Detection Algorithm Based on User Tag and Random Forest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1107 JianXun Guo, Bo Liu, Hongyan Zhang, Qiang Li, Shaoyong Guo, and Yang Yang Optimal Distribution in Wireless Mesh Network with Enhanced Connectivity and Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1117 Hao Zhang, Siyuan Wu, Changjiang Zhang, and Sujatha Krishnamoorthy A Traffic Anomaly Detection Method Based on Gravity Theory and LOF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1129 Xiaoxiao Zeng, Yonghua Huo, Yang Yang, Liandong Chen, and Xilin Ji Construction of Management and Control Platform for Bus Parking and Maintenance Field Under Hybrid Cloud Computing Mode . . . . . . 1139 Ying-long Ge A Data Clustering Method for Communication Network Based on Affinity Propagation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1151 Junli Mao, Lishui Chen, Xiaodan Shi, Chao Fang, Yang Yang, and Peng Yu Priority-Based Optimal Resource Reservation Mechanism in Wireless Sensor Networks for Smart Grid . . . . . . . . . . . . . . . . . . . . 1161 Hongfa Li, Jianfa Pu, Duanyun Chen, Yongtian Xie, Wenming Fang, and Shimulin Xie Energy-Efficient Clustering and Multi-hop Routing Algorithm Based on GMM for Power IoT Network . . . . . . . . . . . . . . . . . . . . . . . 1169 Yuanjiu Li, Junrong Zheng, Hongpo Zhang, Xinsheng Ye, Zufeng Liu, and Jincheng Li

System Detection

Design of Collaboration Engine for Large-Scale Heterogeneous Clusters Hui Zhao and Haifeng Wang

Abstract Aiming at the low utilization rate of intensive computing cores in large heterogeneous clusters and the high complexity of collaborative computing between GPU and multi-core CPUs, this paper aims to improve resource utilization and reduce programming complexity in heterogeneous clusters. A new heterogeneous cluster cooperative computing model and engine design scheme are proposed. The complexity of communication between nodes and cooperative mechanism within nodes is analyzed. Coarse-grained cooperative execution plan is represented by template technology, and fine-grained cooperative computing plan is created by finite automata. The experimental results validate the effectiveness of the collaborative engine. Comparing with the manual programming scheme, it is found that the computational performance loss is less than 4.2%. The collaborative computing engine can effectively improve the resource utilization of large-scale heterogeneous clusters and the programming efficiency of ordinary developers. Keywords Collaborative computing model · Finite automata · Computing engine · Template technology

1 Introduction With the development of large data applications, data-intensive computing has become an important area of high-performance computing. GPU general computing is very suitable for data-intensive tasks. Heterogeneous cluster built by GPU and multi-core CPU has become a major data processing solution [1]. It can effectively improve the computing performance and efficiency and has a wide application H. Zhao · H. Wang College of Information Science and Engineering, Linyi University, Shuangling Road, Linyi 276002, China H. Wang (B) Shandong Key Laboratory of Network, Research Institute of Linyi University, Shuangling Road, Linyi 276002, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_1

3

4

H. Zhao and H. Wang

prospect [2, 3]. In 2010, “Tianhe 1” supercomputer took the lead in adopting the heterogeneous system of GPU + CPU, using 7168 NVIDIA GPUs. And in the top ten supercomputers in the world, two systems adopt the structure of GPU + CPU. Industry has also begun to use GPU heterogeneous clusters to process large data. Cloud computing service Amazon provides users with GPU computing examples in EC2 cluster to accelerate the performance of oil exploration, meteorological analysis, image processing and other applications. In heterogeneous cluster of GPU, the cooperative computing behavior of GPU and multi-core CPU not only increases the density of computing resources within a single node, but also improves the utilization and efficiency of computing resources. At present, in the research of GPU and CPU collaborative computing, a large number of data-intensive algorithms have been transplanted to GPU to improve the performance. For example, to solve the problem of subset summation, GPU and CPU multi-core cooperative algorithm is proposed to solve the load balancing between two types of processors and the optimization of communication between nodes and nodes [4]; to query protein sequence data, GPU and multi-core CPU are used to reduce the operation time, mainly to implement two widely used sequence alignment algorithms, SW and NW, and to study the load balancing strategy between cluster nodes. Fine-grained collaborative operation process in nodes [5]; 3-D terrain reconstruction task in UAV perception system belongs to data-intensive real-time computing. Song et al. explored data access operation in GPU-CPU collaborative computation of 3-D reconstruction algorithm and achieved good acceleration effect [6]; proposed CPU/GPU collaborative algorithm for parallel difference algorithm and applied it to mass LIDAR point cloud generation digital. In the elevation model, researchers designed the first-in-first-out queue with concurrent access shared by CPU and GPU to manage tasks and proposed a collaborative framework of parallel collaborative difference [7]; proposed a collaborative parallel computing algorithm between CPU and GPU for local search in optimization algorithm; designed a HySyS prototype system to solve a series of combinatorial optimization problems [8]; Moim implements a collaborative computing system based on MapReduce mode. To decompose the three computing stages of MapReduce, it realizes task allocation and load balancing between GPU and CPU multi-core. However, there is a lack of research on the commonality of collaborative computing. In collaborative computing programming of GPU and multi-core CPU for different domains, users with different application backgrounds need to write GPU and CPU collaborative computing programs according to business logic. They should not only pay attention to the algorithm logic in their respective domains, but also to the collaborative computing logic. Therefore, the development of GPU collaborative computing program is very difficult, which requires users to have a thorough understanding of thread synchronization, data transmission between GPU and CPU and communication between network nodes. In order to reduce the programming difficulty of GPU collaborative computing, a complete design scheme of collaborative computing engine is proposed in this paper. Firstly, the common problems of collaborative processes in different computing jobs are extracted, and then, the

Design of Collaboration Engine …

5

collaborative logic processes in computing jobs are extracted to reduce the programming complexity of users by reducing repetitive programming. The organizational structure of this paper is as follows: Sect. 2 introduces the main problems to be solved by the collaborative computing engine; Sect. 3 provides the specific scheme for the design of the collaborative computing engine; Sect. 4 summarizes and looks forward to future work.

2 Problem Description Firstly, the main problems of collaborative computing between GPU and multi-core CPU are analyzed from the perspective of computing system. When GPU heterogeneous cluster processes large data jobs in a distributed way, the input data is divided into several data sets according to load balancing scheduling strategy. Each computing node is responsible for processing the corresponding data, and finally, the final results are summarized. In a single computing node, the data is divided into two parts, which are accomplished by GPU and multi-core CPU, respectively. Therefore, collaborative computing is divided into two parts: intra-node collaboration and inter-node collaboration. The input data of large data processing jobs is loaded into CPU memory by network or external memory. There are three areas in CPU memory: CPU memory area, buffer area and memory area exchanged with GPU. Among them, CPU memory area provides data to CPU computing core; memory area exchanged with GPU is the area where CPU control core transmits data to GPU; computing data is transferred to GPU display by exchange memory, and then computed by GPU and returned to CPU switching memory area; the buffer is paging memory, which is used to aggregate GPU and CPU calculation results in nodes [3]. It can be seen that the cooperative computing in a single node includes inter-thread synchronization, lock operation and complex data communication operation. On the other hand, the process of collaborative computing among nodes is as follows: each node process is responsible for the calculation and collaborative control of the node, and then keeps synchronization and data communication with other nodes in the network. Finally, the global collaborative computing results are summarized. Collaboration among nodes includes process synchronization and complex network communication operations. Secondly, the problem of collaborative computing is analyzed from the perspective of computing operations. User jobs are logically divided into two parts: domain algorithm logic and collaborative computing logic. The concrete realization forms of domain algorithm logic are GPU kernel function, CPU thread function and CPU data merging process. The design goal of the collaborative computing engine is to extract the collaborative computing logic, so that ordinary users only pay attention to the design of CUDA kernel function, thread function and merging process. After judging the characteristics of large data computing jobs, the cooperative execution plan between CPU computing core and GPU is generated and distributed to heterogeneous cluster nodes for execution. Collaborative execution planning is a coarse-grained activity sequence, which guides the calculation of GPU and multi-core CPU.

6

H. Zhao and H. Wang

3 Cooperative Computing Engine This section introduces the specific design scheme of the collaborative computing engine and the formal representation of the performance of collaborative computing.

3.1 Design of Cooperative Computing Engine The architecture of the collaborative computing engine is shown in Fig. 1. The collaborative computing engine is divided into two levels. Coarse-grained collaborative planning is used between computing nodes, while fine-grained collaborative planning is used within computing nodes. Jobs are extracted from job queues, and their types are judged. Cooperative planning templates are imported into template libraries according to job types to achieve basic task allocation and computing data deployment in a distributed network environment, and synchronization and concurrent operations between nodes are specified. On the other hand, fine-grained finite state machine (FSM) is used to generate cooperative execution plan. When a specific event occurs, the state changes are triggered and the corresponding actions or operations are executed to achieve more detailed cooperative computing function within the node.

Fig. 1 GPU structure diagram of cooperative computing engine

Design of Collaboration Engine …

7

The design of coarse-grained and fine-grained mixing has the following advantages: The template technology is used to realize the generation function of coarsegrained collaborative planning. Firstly, job types are classified simply, and corresponding collaborative computing models are provided according to different job types. This technology reduces the complexity of collaborative engine and improves the feasibility of implementation.

3.2 Template Cooperative Execution Plan Template technology is a knowledge expression method based on reuse technology and similarity principle of things. The basic idea is to abstract a framework template from a kind of similar things. Collaborative computing engine extracts common processes from collaborative processes among computing nodes and defines common processes as templates for reuse. Job collaborative computing flow for large data processing is shown in Fig. 2. Figure 2 shows the cooperative mode of MapReduce batch processing mode. Firstly, the reasonable deployment of input data is realized according to the load balancing strategy, and the data needed for calculation is obtained through the network transmission of each computing node [9]. Then, each computing node asynchronously completes its own computing tasks. The computing process of each node is synchronized [10]. The intermediate results are mixed and synchronized, and finally merged computing is realized. In this collaborative process framework, the differences among different computing jobs are data allocation strategy, data shuffling strategy and computing load balancing. Fig. 2 Inter-node collaborative process framework

8

H. Zhao and H. Wang

3.3 State Machine Execution Plan Finite state machine is used to generate fine-grained collaboration processes in real time. Finite state machine (FSM) is a mathematical model that represents finite states and the migration and action between states [11]. The CPU, GPU, memory, buffer and GPU display are regarded as different data storage and computing objects. The finite state machine (FSM) models the behavior of each object, describes the state sequence of the object in each computing stage, and how to respond to various external events.  FSM can be expressed as M = (Q, q0 , , δ, F), where Q is a non-empty finite  set of states, q ∈ Q, A state in which q is M; q0 is the start or start state of M; represents the input set of the system; δ is a state transition function; F is the set of termination states of M, if q ∈ F, q is the termination state of M. The cooperative operation process in GPU computing nodes is represented by FSM; Table 1 provides the basic state set and system input set. After modeling the collaborative computing process in nodes with finite state machine, the mapping between collaborative process and finite state machine is needed. Collaborative computing process is composed of several specific operation steps, which have some logical steps, including shunting, aggregation, parallel, jump. In finite state machines, all data-centric states, such as full memory area and empty GPU display memory area, are the relationship between producers and consumers. Therefore, the mapping idea is that every step of collaborative computing is regarded as a state, when one state migrates to another state under certain conditions, it is also considered as a step; when a state has multiple inputs, there must be aggregation in the process of collaboration, from different states to the same state. For example, Table 1 Symbol table of finite state machine system in node System state

System input

Symbol

Meaning

Symbol

Meaning

S0

Ready state

x1

Start threads or receive synchronization signals

S1

GPU computing end

x2

Terminate thread or task queue empty

S2

GPU computing end

x3

Terminate thread or task queue empty

S3

GPU full display area

x4

Transfer data to equipment

S4

CPU full memory area

x5

Loading data from external memory

S5

GPU display memory space

x6

Start GPU computing

S6

Cache full

x7

Memcpy data replication operation

S7

Cache space

x8

Memcpy data replication operation

S8

Calculation failure

x9

Abnormal, fault events

S9

Calculation successful

x 10

Calculate startup events

S 10

Mission queue full

x 11

Task entry operation

S 11

Mission queue empty

x 12

Merge computing end

Design of Collaboration Engine …

9

when a thread receives synchronization signals and the thread computation ends, the thread enters the ready state; when a state has multiple outputs, there must be shunting and concurrency in the collaborative process, which can be migrated from the current state to different states. From a technical point of view, a class is designed according to the finite state machine to generate fine-grained cooperative execution plan in real time, but the judgment of state migration will cause some performance loss.

4 Experiments and Analysis In order to verify the effectiveness of the function of the collaborative computing engine and the performance loss of the algorithm for generating the collaborative execution plan, a typical large data computing job was selected to carry out the experiment. GPU heterogeneous cluster with four computing nodes in the Laboratory Bed, Network is Gigabit Ethernet, GPU Computing Node is configured as GPU Tesla K40 with global memory 12 GB. CPU is Intel Xeon E5-2660 8 core, 2.2 GHz, 32 GB Memory and Hard disk 2T. The operating system is Ubuntu 14.04, CUDA 7.5. Selecting large-scale microblog analysis jobs and Sort jobs in Hibench [12] as collaborative computing jobs in heterogeneous clusters of GPU, microblog data analysis operation can flexibly control data size and belongs to typical data-intensive operation, which is very suitable for GPU computing; Sort job is an I/O-intensive large data processing job, whose input data, intermediate data and output data are the same size. In the experiment, the judgment part of computing job type is simplified, and the corresponding template is used directly for two kinds of jobs, while collaborative computing within nodes is the execution plan generated by engine. (Collaborative engine abbreviated as CE). The benchmark procedure for experimental comparison is written by more skilled personnel (short for MC). The actual computing time of microblog data analysis is relatively short. Table 2 shows that with the increase of microblog data size, the performance loss caused by the computational complexity of finite state machines in nodes decreases gradually. For such flow computing jobs with large input data and small output data, the performance loss can be controlled within 3%. The data scale of Sort job is large and the actual calculation time is relatively long. There are many types of cooperative state switching within nodes, so the performance loss of cooperative computing engine is between 3.1 and 4.2%. As can be seen from Table 3, the performance loss Table 2 Performance comparison table of microblog data analysis Data size (GB)

4

6

12

20

MC (s)

1.288

2.096

3.040

3.984

CE (s)

1.325

2.148

3.109

4.067

Performance loss (%)

2.9

2.5

2.3

2.1

10

H. Zhao and H. Wang

Table 3 SortPerformance comparison table Data size (GB)

40

63

85

105

126

150

MC (s)

41.21

55.22

102.36

126.52

156.31

190.28

CE (s)

42.47

57.15

106.04

131.70

162.87

198.27

3.1

3.5

3.6

4.1

4.2

4.2

Performance loss (%)

increases with the increase of data size in Port. Through performance tracking, it is found that because Sort belongs to I/O-intensive large data computing operations [13], the memory data area, GPU display data area and memory buffer area in the node will appear the phenomenon of local data waiting for synchronization lock, so the performance loss is larger than that of microblog data analysis. Typical large data computing jobs verify that the collaborative computing engine can effectively generate the collaborative execution plan. The results of microblog data analysis and Sort are consistent with the result of experts. The performance loss caused by co-generation logic can be controlled to the acceptable range of ordinary users.

5 Summary and Prospect In heterogeneous GPU clusters, multi-core CPU is a computational resource that is easily overlooked. CPU/GPU cooperative computing mode increases the computing resource density within a single node and can effectively improve the performance of parallel computing. Cooperative computing engine generates corresponding collaborative execution process for user jobs, which reduces the difficulty of user writing collaborative computing logic. The function of collaborative computing engine is validated by data-intensive flow computing tasks and I/O-intensive Sort tasks. The performance loss of collaborative computing is also controlled within acceptable range. However, when a finite state machine generates fine-grained cooperative operations within a node, the problem of multiple threads competing for lock resources is obvious in I/O-intensive tasks, resulting in greater performance loss than common tasks. In order to solve this problem, probabilistic finite state machine (PFSM) is introduced into the design of cooperative generation within nodes. Empirical probability is used to solve the problem of multi-state transition conflict. Acknowledgements This work was supported in part by the Shandong Province Key Research and Development Program of China (No. 2018GGX101005), the Shandong Province Natural Science Foundation, China (No. ZR2017MF050).

Design of Collaboration Engine …

11

References 1. Zhang, F., Zhai, J.D., He, B.S., et al.: Understanding co-running behavior on integrated CPU/GPU architectures. IEEE Trans. Parallel Distrib. Syst. 28(3), 905–918 (2017) 2. Zhang, H., Zhang, L.B., Wu, Y.J.: Large-scale graph data processing based on multi-GPU platform. J. Comput. Res. Dev. 55(2), 273–288 (2018) 3. Li, T., Dong, Q.K., et al.: Research on parallel computing mode of GPU task based on thread pool. Chin. J. Comput. 41(10), 2175–2192 (2018) 4. Wan, L.J., Li, K.L., Li, K.Q.: A novel cooperateive accelerated parallel two-list algorithm for solving the subset-sum problem on a hybrid CPU-GPU cluster. J. Parallel Distrib. Comput. 97, 112–123 (2016) 5. Zhou, W., Cai, Z.X., et al.: A multi-GPU protein database search model with hybrid alignment manner on distributed GPU clusters. Concurr. Comput. 30(8), 1–13 (2018) 6. Song, W., Zou, S.H., et al.: A CPU-GPU hybrid system of environment perception and 3D terrain reconstruction for unmanned ground vehicle. J. Inf. Process. Syst. 14(6), 1445–1456 (2018) 7. Wang, H.Y., Guan, X.F., Wu, H.Y.: A cooperative parallel spatial interpolation algorithm for CPU/GPU heterogeneous environment. Geomat. Inf. Sci. Wuhan Univ. 42(12), 1688–1695 (2017) 8. Vidal, P., Alba, E., Luna, F.: Solving optimization problems using a hybrid systolic search on GPU plus CPU. Soft. Comput. 21, 3227–3245 (2017) 9. Mengjun, X., Kyoung-Don, K., Can, B.: Moim: a multi-GPU mapreduce framework. In: 16th International Conference on CSE, 1279–1286 (2013) 10. Guo, M.S., Zhang, Y., Liu, T.: Research advances and prospect of recognizing textual entailment and knowledge acquisition. Chin. J. Comput. 40(4), 889–909 (2017) 11. Shan, J.H., Zhang, L., et al.: Extending timed abstract state machines for real-time embedded software. Acta Sci. Nat. Univ. Pekin. (2019). https://doi.org/10.13209/j.0479-8023.2019.005 12. Huang, S., Huang, J., et al.: The Hibench benchmark suite: characterization of the mapreducebased data analysis. In: IEEE International Conference on Data Engineering Workshops vol. 74, pp. 41–51 (2010) 13. Osama, A.A., Muhammad, J.I., et al.: Analyzing power and energy efficiency of bitonic mergesort based on performance evaluation. IEEE Access 6, 42757–42774 (2018)

Research on Multi-stage GPU Collaborative Model Longxiang Zhang and Haifeng Wang

Abstract GPU heterogeneous cluster is extensively utilized in the field of data analysis and processing. Nevertheless, research and studies on collaborative activity model in computing elements of GPU heterogeneous clusters are still inadequate. To conduct research on GPU and multi-core CPU cooperative computing from a theoretical perspective, a multi-stage cooperative computing model (p-DCOT) is established. Bulk synchronous parallel (BSP) model is the core of p-DCOT. Cooperative computing is divided into three layers: data layer, computing layer and communication layer. Computing and communication are described and formalized by matrix. Lastly, representative computing examines the effectiveness of model and parameter analysis. The collaborative computing model finds out the collaborative computing in big data analysis and processing. Keywords Collaborative model · Load balancing · Big data computing · GPU cluster

1 Introduction Large-scale data analysis and processing changes the development of highperformance computing. The emergence of high-performance computing platforms has changed from computing platforms to professional computing systems, which processes the big data in different industries [1]. The thread mechanism of GPU is capable of processing data-intensive calculation. Heterogeneous cluster of GPU and multi-core CPU create new opportunities for big data analysis and processing, which enhance calculation performance and improve efficiency [2]. An increasing number of research and studies on the role of GPU heterogeneous cluster in big data analysis and processing are carried out. Due to dynamic data input and random variation of calculation loading, calculation pattern, optimal operation, load balancing, reliability L. Zhang · H. Wang (B) School of Information Science& Engineering, Linyi Univesity, Shuangling Road, Linyi Shandong 276002, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_2

13

14

L. Zhang and H. Wang

and expansibility of GPU have been negatively affected[3, 4]. For this reason, the systems encounter various limitations. Related theories on cooperative computing of big data analysis and processing are inadequate [5–7]. In this paper, theoretical models analyze the general calculation rules and extensive forms of MapReduce, thereby conducting optimization studies. The studies focus on cooperative computation models of different computation patterns and establish a new theoretical model at multiple stages and levels. Moreover, as the theoretical tool of discussing GPU and multi-core cooperative computing, primary model parameters are analyzed and validity of models is verified.

2 Problem Description Assume GPU heterogeneous clusters include n nodes, and every node also involves CPU and GPU. If multi-core CPU has m cores, cybernetics cores are in interactive operation with GPU [8]. The remaining m − 1 are computing cores. Computing cores are divided into cooperative computing core (CCC) and standalone computing core (SCC). When it comes to big data processing and computing, cooperative computing cores and GPU divide data set, and complete cooperative and concurrent computing. Standalone computing cores are in charge of reduce or data aggregation within nodes. From this perspective, in GPU heterogeneous computing system, cooperative computing occurs among and within nodes. Therefore, computing and communicating process become more complicated.

3 Cooperative Computing Model 3.1 Overview of Cooperative Computing Model As is shown in Fig. 1, a big data computing task is completed in p stages. Each stage is divided into data layer, computing layer and communication layer. On data layer, cybernetics cores of CPU complete distributed mapping. On computer layer, cybernetics cores of CPU, computing cores and GPU conduct concurrent operation. On communication layer, data aggregation occurs among distributed nodes. Intermediate results of computing layer are transmitted and aggregated, in order to prepare data for the next stage of computing.

Research on Multi-stage GPU Collaborative Model Communication layer

Computing layer

15

T1

C1

T2

G1

C2

Data layer

D1

D2

Communication layer

T1

T2

Computing layer

Data layer

C1

G1

D1

C2

G2

Pi+1 stage

G2

Pi stage

D2

Fig. 1 Cooperative computing process of heterogeneous system

3.2 Formalized Description Cooperative calculation model is described by matrix. Formalized expression of p-DCOT model is shown as follows: p-DCOT = D((C + O)T ) p = D(C1 + O1 )T1 . . . D(C p + O p )T p

(1)

Equation (1) shows the p phase of iteration. The expansion equation of each computing phase is shown as follows. Formalization of the i stage:   D(Ci + Oi )Ti = β D1 D2 . . . Dn    ⎛  c1 0 0 0   o1     0 c2 0 0  0 ⎜    ⎜ × ⎝δi Wg   + (1 − δi )Wc  0 0 0 . . . 0    0 0 0 c  0 ni ⎡ ⎤ t1,1 t1,2 . . . t1,ni+1 ⎢ t2,1 t2,2 . . . t2,ni+1 ⎥ ⎥ ×⎢ ⎣ ... ... ... ... ⎦ tni,1 tni,2 . . . tni,ni+1

0 o2 0 0

0 0 ... 0

⎞ 0  0 ⎟ ⎟ 0 ⎠ oni 

(2)

16

L. Zhang and H. Wang

Equation (2) demonstrates: cooperation of ni computing nodes in the i phase of calculation. The diagonal elements of diagonal matrix C 1 to C ni indicate the concurrence computing of GPU nodes. The diagonal elements of diagonal matrix O1 to Oni represent the concurrence computing of GPU cooperative computing cores. Matrix addition shows the convergence of GPU computing and CPU multi-core computing. Parameters δi represent loading and allocation factors of GPU and CPU in the nodes. This parameter determines the data size for GPU and CPU to process in each node. Parameter βi is the loading and allocation factor that maps computing tasks to different machines. Weight matrix W g and W c represent the parameter matrix of GPU and CPU performance differences. Average matrix T represents the point-to-point communication status among the nodes. Element t ij represents the telecommunication relationship between node ni of the i phase and node nj of i + 1.

3.3 Parameter Analysis 1. GPU and CPU loading ratio δ in single computing node Assume that L is the data loading for single node. In single nodes, there are R cooperative computing cores and GPU. Peak performance of each cooperative computing core is Pcpu (assume they are isomorphic computing models. Cooperative computing cores have the same peak performances). Peak performance of GPU is PGPU . Obtain the loading ratio of GPU and CPU δ in the same locking range. Equation (3) shows the completion time of whole computational nodes: ⎧ ⎪ ⎨ Ttotal = max(Tgpu , Tcpu ) L×δ Tcpu = R×P cpu ⎪ ⎩ T = L(1−δ) gpu

(3)

Pgpu

In order to achieve the minimum completion time T total for the whole computing nodes, cooperative computing cores and GPU computing time should be equal to each other, which is shown in Eq. (4): L ×δ L(1 − δ) = R × Pcpu Pgpu

(4)

Equation (4) determines the loading ratio δ of GPU and CPU δ=

R Pgpu /Pcpu + R

(5)

In practical application, accelerate cooperative computing cores of GPU and CPU to replace peak performance ratio, i.e., s = Pgpu /Pcpu . Next, Eq. (5) is derived from approximation of Eq. (6).

Research on Multi-stage GPU Collaborative Model

δ=

1 s/R + 1

17

(6)

2. Loading ratio of multiple computing nodes and data in clusters Assume D is the load of entire operation data. The number of computational node is n. Ri is the number of cooperative computing cores within every computing node. Oi is the number of GPU. Then, the loading ratio factor βi of every computing node is: ⎧ ⎪ ⎨ Ttotal = max(T1 , . . . , Ti ) 1 T1 = R1 PcpuDβ (7) +O1 Pgpu ⎪ Dβi ⎩T = i Ri Pcpu +Oi Pgpu Oi × Pgpu n R × P cpu + i=1 i i=1 Oi × Pgpu

βi = n

(8)

4 Experimental Analysis The purpose of the experiment is to verify the correctness of conclusion for cooperative computing model and validity of model parameters according to typical big data computing tasks. Hardware configurations of computational nodes in test beds: Tesla K40 of GPU. 12 GB of video memory. Intel Xeon E5-2660 eight core of CPU. 2.2 GHz. 32 GB of internal storage. 2T of hard disk. Operating system is Ubuntu 14.04, CUDA 7.5.

4.1 Validity of Cooperative Computing Based on analysis of cooperative computing model: Increase of computing resources in the nodes enhances calculation performance. However, the complexity of multicore CPU and GPU cooperative computing increases at a less rate than calculation performance. For this reason, cooperative computing can improve the calculation performance of single nodes [9,10]. In this test, cooperative computing analyzes the massive data on Weibo, calculates the number of specific themes in the data of Weibo. For example, analyze the data frequency from the number of Weibo posts about a certain news event [11]. CUDA is used to compile the kernel function for GPU. Cybernetics core of one CPU activates the computing process at GPU terminal, and collection of final computing results. Adjust the number of threads of selfdesigned multithreading at CPU terminal. Test settings are shown as follows: Select one core as the cybernetics core of CPU to start GPU computing, and complete the communication between cooperative GPU and CPU calculation. The remaining

18

L. Zhang and H. Wang

CPU cores serve as cooperative computing cores. Then, the selected CPU merely handles controlling computational logic of GPU. It is not involved in basic solution of computing. In Fig. 2a, x-axis represents the data size of Weibo and y-axis shows the ratio of GPU and multi-core cooperative computing speed and reference computing speed. Internal storage of single computing node is 4 GB. Data size of Weibo increases from 200 MB to 5 GB. Cooperative computing speed is 3.7–4.8 times faster than GPU standalone computing. In the figure, as data scale increases, cooperative computing speed gradually increases as well. However, it reaches a low point at the level of 1500 MB. According to Fig. 2b, for processing 1500 MB of data on Weibo, the utilization ratio of internal memory increases compared with other cases. The data scale exceeds the limitation in internal storage of single node. For this reason, data is completed in two stages, thus it affects the speed of computing. When data size of

The Speed Ratio of Collaborate and Benchmark

5

4

3

2

1

0 0

500

1000 1500 2000 2500 3000 3500 4000 4500 5000 5500

The Data Size (MB)

(a) Ratio of cooperative computing and reference computing 100 CPU Memory

90 80

Utilization Rate (N)

Fig. 2 Contrastive analysis of cooperative computing and reference counting

70 60 50 40 30 20 10 0 0

1000

2000

3000

4000

5000

Data Size (MB)

(b) CPU and internal storage utilization

Research on Multi-stage GPU Collaborative Model

19

Table 1 Characteristics of Hibench benchmark program Task

Abbreviation

Map input

Intermediate data

Reduce output

Sort

st

120 GB

120 GB

120 GB

Word count

wc

200 GB

11.23 GB

4.1 GB

Tera sort

ts

1 TB

140 GB

1 TB

Bayesian classification

bc

78 GB

49 GB

43 GB

K-means cluster

kc

66 GB

330 KB

4.6 KB

Weibo reaches 2 GB, multiple iterations are required. Computing speed is stabilized and errors are reduced to verify the analysis of conclusion. The above test only examines the performance gains of cooperative computing in single computing node. In distributed computation, communication delay includes two sections: thread communication within nodes and process communication among nodes. Multi-nodal cooperative computing is carried out in GPU heterogeneous cluster of four nodes. Firstly, big data computing task is selected for Hibench benchmark program [12]. According to Table 1, the test is completed by big data computing task sort. Sort task is the most extreme form of computing, input data, intermediate communication data and output data are of the same scale. Therefore, it can examine whether communication within nodes and communication delay among nodes exceed performance gains after computing resource increases. Figure 3 compares GPU standalone computing, GPU multi-core cooperative computing. Data transmission and communication of sort computing is account for a high ratio in the entire computing process. It is a computing task with high costs of data communication and collaboration [13]. In the cooperative computing test, every node CPU has eight cores. One core is cybernetic computing core, and the other seven are cooperative computing cores. Among them, three cooperative computing cores are in charge of data merger. Four cooperative computing cores and GPU complete the same computational logic. For GPU computing, GPU handles sort computing logic. CPU core deals with final data merger. Cooperative computing includes four CPU computing core, and it also increases the cooperative cost of nodes. According to Fig. 3a, cooperative computing performance is superior to GPU computing, which increases by approximately 3.6–7.0%. According to Fig. 3b, CPU utilization rate of cooperative computing also increases significantly.

4.2 Parameter Verification of Cooperative Computing This section examines the accuracy of cooperative computing model in conforming parameters. Loading factor δ of CPU and GPU is single node that is taken as the example. Parameter δ is determined by Eq. (6). The peak value ratio of GPU and CPU is obtained from the test. In this regard, the computation speed ratio of GPU

20

L. Zhang and H. Wang

Fig. 3 Contrastive analysis of cooperative computation and GPU sorting computation

200 180 160

GPU Cooperative

Execution Time (s)

140 120 100 80 60 40 20 0 40

63

85

105

126

150

Data Size (GB)

(a) Performance ratio of cooperation and GPU computation 100

GPU Cooperation

90

Utilization Rate of CPU (%)

80 70 60 50 40 30 20 10 0 20

40

60

80

100

120

140

160

180

Data Size (GB)

(b) CPU utilization in the two circumstances

and single CPU core is about 20.1:1. Among the eight CPU cores, four cores handle cooperative computing. Hence, single node δ = 1/6(0.17). Input data size is divided into six portions: five portions for GPU computing, and one portion for cooperative computing of CPU. It is the parameter value decided by cooperative computing model. The test determines the optimum loading factor in the following way: Weibo data analysis is taken as the task. Search for optimum loading factor with step length of 0.05. Initial value CPU is allocated with 0.05 of loading. GPU is allocated with 0.95 of loading. Then, compare with reference computing (GPU computing without CPU cooperation). In Fig. 4, x-axis is ratio value allocated for GPU loading and y-axis is the ratio of cooperative computing and reference computing. According the figure, the acceleration ratio is favorable between 0.15 and 0.2. It basically complies with the parameter

Research on Multi-stage GPU Collaborative Model

21

Ratio of Collaborative Model and Benchmark

10 9 8 7 6 5 4 3 2 1 0 0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

Workloads Rate of CPU

Fig. 4 Loading factor parameter analysis within nodes

value 0.17 by cooperative computing model. Hence, the test verifies the validity of model analysis in determining the optimal parameter.

5 Summary In order to reveal the computational process of GPU heterogeneous cluster, a computing model at multiple stages and levels is established for various calculation patterns in big data computing. The model aims to abstract and simplify different structures of computing. It is not only the bridge for connecting hardware system with software system, but also an important tool to analyze cooperative computing performance. Based on exiting research, it gives overall consideration to limitation of CPU internal storage and GPU communication and enhances description on cooperative threading in nodes. The test conclusion verifies the validity of model analysis. Computing resource increase is discovered through typical big data computing tasks. Computing performance is significantly enhanced as computing performance growth is greater than cooperative communication delay. Next, the cooperative computing model carries out thorough analysis on the system performance of GPU heterogeneous cluster. System expansibility and reliability of counting process in different data sizes are analyzed, especially parameters that may influence expansibility and reliability. Acknowledgements This project is supported by Shandong Provincial Natural Science Foundation, China (No. ZR2017MF050), Project of Shandong Province Higher Educational Science and technology program (No. J17KA049), Shandong Province Key Research and Development Program of China (No. 2018GGX101005, 2017CXGC0701, 2016GGX109001).

22

L. Zhang and H. Wang

References 1. Zhao, X., Li, B.: A revised BSP-based massive graph computation model. Chin. J. Comput. 40(1), 223–234 (2017) 2. Zhang, Y., Zhang, Y.S., Chen, H., Wang, S.: GPU adaptive hybrid OLAP query processing model. J. Softw. 27(5), 1246–1265 (2016) 3. Mengjun, X., Kyoung-Don, K., Can, B.: Moim: a multi-GPU map reduce framework. In: 16th International Conference on CSE, 1279–1286 (2013) 4. Mohamed, H., Iman, E.A.: Real-time big data analysis framework on a CPU/GPU heterogeneous cluster. In: IEEE/ACM 3rd International Conference on BDCAT, 168–177 (2016) 5. Woohyuk, C., Won-Ki, J. Vispark: GPU-accelerated distributed visual computing using spark. In: IEEE Symposium on Large Data Analysis and Visualization, 125–126 (2015) 6. Chen, C., Li, K.L., et al.: Gflink: an in-memory computing architecture on heterogeneous CPUGPU clusters for big data. In: 45th International Conference on Parallel Processing, 542–551 (2016) 7. Valiant, L.G.: A bridging model for parallel computation. Commun. ACM 33(8), 103–111 (1990) 8. Huai, Y., Lee, R., Zhang, S., et al.: DOT: a matrix model for analyzing optimizing and deploying software for big data analytics in distributed systems. In: Proceedings of the 2nd ACM Symposium on Cloud Computing. ACM (2011) 9. Lu, X.Y.: Research on service evaluation. In: Resource Management and Data Communication in Cloud Computing (2012) 10. Luo, T.: Parallel computational model and performance optimization on big data (2016) 11. Zhou, W.X., Zhang, Y.S., Zhang, L.: Research on topic detection and expression method for Weibo hot events. In: Application Research of Computers. https://doi.org/10.19734/j.issn.10013695.2018.08.0601, last accessed 2019/5/20 12. Huang, S., Huang, J., Dai, J., et al: The Hibench benchmark suite: characterization of the mapreduce-based data analysis. In: IEEE International Conference on Data Engineering Workshops, vol. 74, pp. 41–51 (2010) 13. Osama, A.A., Muhammad, J.I., Saleh, M.E., et al: Analyzing power and energy efficiency of bitonic mergesort based on performance evaluation. IEEE Access 6, 42757–42774 (2018)

HSO Algorithm for RRAP Problem in Three-State Device Network Dongkui Li

Abstract The optimization problem studied in this paper is three-state devices networks reliability–redundancy allocation problem (RRAP). The RRAP model of three-state device network is established, and three-stage improved PSO algorithm and HSO algorithm are designed. The correctness and validity of the algorithm are verified by simulation of series system and complex network system bridge network. It is found that for series system and bridge network: (1) from the point of view of the optimal solution, the results of the improved HSO algorithm are slightly better than those of the improved PSO algorithm. (2) From the average solution point of view, the improved PSO algorithm is slightly better than the HSO algorithm. The results show that improving PSO algorithm and HSO algorithm are powerful tools to solve RRAP problem in three-state device network, but in general, the improved PSO algorithm is slightly better than the improved HSO algorithm. Both algorithms have the characteristics of easy understanding of the principle, fast convergence speed and easy programming on a microcomputer. Keywords Three-state device network · Reliability–redundancy allocation problem · Particle swarm optimization · Hybrid swarm algorithms · Model · Simulation · Optimal solution

1 Introduction Two-state reliability–redundancy allocation problems (RRAPs) are that the reliability and redundancy of components are decision variables, and the reliability of the system is the largest when a given constraint is satisfied. The mathematical model is nonlinear mixed-integer programming [1]. RRAP has attracted the attention of many scholars. Particle swarm optimization (PSO), genetic algorithm (GA) and hybrid swarm intelligence (GA-PSO) have been proposed [2–7]. Yeh W. C. et al. studied D. Li (B) Editorial Department of Journal, Baotou Teachers College, 014030 Baotou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_3

23

24

D. Li

the GRAP problem and gave the HSO algorithm [8–10]. Zeng J. C. and others discussed the theoretical basis of PSO algorithm [11], and Wang Z. C. et al. discussed the basic application of PSO algorithm in network reliability optimization [12, 13]. The problem of reliability optimization of three-state device network has also been raised by scholars [14–17]. Based on the above theoretical basis and the author’s work accumulated for many years [18–22], this paper establishes RRAP model of three-state devices networks and gives improved PSO and HSO algorithms.

2 Hypothesis and Model 2.1 Hypothesis Components and systems have and only have three states, namely (1) normal working state, open failure mode and shorted failure mode; (2) components’ cost, weight, shorted mode failure and open mode failure probability are known; (3) components’ shorted failure mode and open failure mode probability are statistically independent; (4) components are hot redundant and unrepairable.

2.2 Model Let the system (reliability is Rs , open failure mode probability Qs , shorted failure mode probability S s ) consists of n subsystems (reliability is Ri ). The structure of the whole system is generally a complex network structure (in particular, a series structure. The reliability of the whole system calculated by subsystems and components can be referred to in reference [18], which is not discussed separately here). Each component has open failure mode probability, shorted failure mode probability, reliability (reliability = 1 − open failure mode probability − shorted failure mode probability), cost, weight and volume. The whole system is constrained by cost, weight and volume. The open failure mode probability, shorted failure mode probability and redundancy of the components of the system are determined to maximize the reliability of the whole system, mathematical representation is:

s.t.

n  j=1

maxRs (R, X ) = Rs (q, s, X )

(1)

n      gi j r j , x j = gi j q j , s j , x j ≤ bi

(2)

j=1

where i = 1, 2, …, m, which means that there are m constraints and bi is a constant. Generally, m = 3, which are weight, cost and volume constraints, respectively; r j (qj ,

HSO Algorithm for RRAP Problem in Three-State Device Network

25

sj ), x j represents component reliability (open failure mode probability and shorted failure mode probability) vectors and redundancy vectors of subsystem j. R and X represent the reliability vector and component redundancy vector of the whole system, respectively. q and s are open failure mode probability vectors and shorted failure mode probability vectors of the whole system, respectively.

3 Coding and the Generation of New Solutions 3.1 Coding In the algorithm, the particle (solution) is constructed as follows: [X, s, q], that is, the row vector composed of positive integer row vector X representing the redundancy of components and the real numbers row vectors representing the shorted failure mode probability and open failure mode probability of components.

3.2 New Solution Generation Algorithms Let us set the component redundancy vector X; the variation range of components is [var1, var2]; among them, var1 and var2 are two positive integers, and var1 ≤ var2. The algorithm for generating a new redundancy vector of components is as follows: Algorithms 1 According to the algorithm of uniformly distributed random number generation, random generated |X| random positive integers in the interval [var1, var2], where |X| denotes the cardinality of vector X. In the shorted (open) failure mode probability vector s (q) of the component, the variation range of components is [s1, s2] ([q1, q2]), and s1, s2 (q1, q2) are real numbers that are larger than 0 and less than 1 (generally determined by test). The algorithm for generating a new shorted (open) failure mode probability vector of a component is as follows. Algorithms 2 According to the uniformly distributed random number generation algorithm, |X| random real numbers in the interval [s1, s2] ([q1, q2]) are generated.

3.3 Fitness Function In order to solve RRAP problem, it is necessary to transform constrained optimization problem (1–2) into unconstrained optimization problem; to solve this problem, the fitness function is introduced as follows:

26

D. Li

max f (q, s, X ) = Rs (s, q, X,) − 10α min(0, C0 − TC)2 − 10β min(0, W0 − TW)2 − 10γ min(0, V0 − TV)2

(3)

Here, α, β, γ are parameters and C 0 , W 0 and V 0 are the cost, weight and volume limits of the system respectively. TC, TW and TV are the cost, weight and volume of the system under the current solution (X, s, q).

4 Three-Stage Iterative PSO Algorithm 4.1 Three-Stage Iterative PSO Algorithms Algorithm 3 (pseudo-MATLAB code) Step 0 (initialization) sets the initial shorted (open) failure mode probability and redundancy S0 (Q0), X0 and initial particles [X0, S0, Q0]; stores system component cost, weight, volume and other parameters in the form of row vectors; and sets compression constants c1, c2. Determine the upper and lower bounds of component redundancy: varmax1 and varmin1; determine the upper and lower bounds of component shorted failure mode probability: varmax2 and varmin2; determine the upper and lower bounds of component open failure mode probability: varmax3 and varmin3. The upper and lower bounds velmax 1 and velmin 1 of the convergence rate of component redundancy (variable) are determined; the upper and lower bounds velmax 2 and velmin 2 of the convergence rate of shorted failure mode probability (variable) are determined; the upper and lower bounds velmax 3 and velmin 3 of the convergence rate of open failure mode probability (variable) are determined. Let n is the number of components, and nc is the number of particles. Let V = zeros (3n, nc ); E = X 0 ; ES = S 0 ; EQ = Q0 ; A = zeros (3n, nc ); B = zeros (3n, nc ); CA = zeros (1, nc ); CB = zeros (1, nc ); Z = zeros (1, nt ), where nt is the total number of iterations. Step 1 randomly generates nc particles satisfying system constraints and stores them in matrix A, and the corresponding fitness values are stored in CA. Then, nc particles satisfying system constraints are randomly generated and stored in matrix B, and the corresponding fitness values are stored in CB. Step 2 for t = 1:nt The dynamic inertia weight wt , wt = 0.9 − 0.5 * (t − 1)/nt , the cost TC, weight TW, volume TV and fitness e of the current optimal solution are calculated. for k=1:nc if CA (1, k)>CB (1, k) B (:, k) =A (:, k); end if CB (1, k)>e

HSO Algorithm for RRAP Problem in Three-State Device Network

27

The first n components of column k of B are assigned to E, and the middle and last n components are assigned to ES and EQ. end end for j=1:nc for i=1:n V(i,j)=wt V(i,j)+c1rand(B(i,j)-A(i,j))+c2rand(E(1,i)-A(i,j)); V(i+n,j)=wt *V(i+n,j)+c1rand(B(i+n,j)-A(i+n,j))+c2rand(ES(1,i)-A(i+n,j)); V(i+2n,j)=wt *V(i+2n,j)+c1rand(B(i+2n,j)-A(i+2n,j))+c2rand(EQ(1,i)A(i+2n,j)); end end Calculate TC, TW, TV while (TC or TW or TV do not satisfy constraints) for i=1:n V(i,j)=wt V(i,j)+c1rand(B(i,j)-A(i,j))+c2rand(E(1,i)-A(i,j)); V(i+n,j)=wt *V(i+n,j)+c1rand(B(i+n,j)-A(i+n,j))+c2rand(ES(1,i)-A(i+n,j)); V(i+2n,j)=wt *V(i+2n,j)+c1rand(B(i+2n,j)-A(i+2n,j))+c2rand(EQ(1,i)A(i+2n,j)); end end Calculate TC, TW, TV end end The fitness CA and CB of A and B is recalculated. end Z(:, t) = the reliability of solution (E, ES, EQ); end Disp (ES); disp (EQ); disp (E);the corresponding TC, TW, TV of the optimal solution are calculated. Disp (TC); disp (TW); disp (TV); plot (Z); Step 3—the algorithm ends.

4.2 Simulation The following tests were carried out on a microcomputer. The computer is configured with CPU of Intel (R) Core (TM) i5-6500 at 3.20Ghz 3.20 GHz, 8 GB memory, 600 GB hard disk, operating system of Windows 10 professional edition and programming software of MATLABR 2015b. The parameters of algorithm 3 are set to: n = 5, c1 = c2 = 1.4962; nc = 200, nt = 1000, α = β = γ = 2.

28

D. Li

Series System. The problem is described as follows: Under cost, weight and volume constraints, the reliability R and redundancy X of series–parallel system components are properly selected to maximize the reliability of the system. max f (s, q, X ) =

n n       1 − q(i, 1))xi − 1 − (1 − s(i, 1))xi i=1

s.t.

n  i=1



Ti

−tm ln Ri

n 

i=1

Ui 



X i + exp 

wi X i exp

i=1 n 

Xi 4

Xi 4

(4)

 ≤ C0

(5)

 ≤ W0

(6)

pi X i2 ≤ V0

(7)

i=1

where the parameters are as follows: T = [2.33e−5, 1.45e−5, 5.41e−6, 8.05e−5, 1.95e−5]; U = [1.5, 1.5, 1.5, 1.5, 1.5]; t m = 1000; W = [7, 8, 8, 6, 9]; P = [1, 2, 3, 4, 2]; C 0 = 175, W 0 = 200, V 0 = 110; Set the other parameters of the algorithm to be: varmin1 = 1, varmax1 = 3; velmax1 = 0.1, velmin1 = −0.1; varmin2 = 0.005, varmax2 = 0.3; velmax2 = 0.1, velmin2 = −0.1; varmin3 = 0.005, varmax3 = 0.3; velmax3 = 0.1, velmin3 = −0.1. Randomly run the algorithm 50 times. The results are as follows: Rmax = 0.999496; Rmin = 0.99796; Ravg = 0.998933; the overall running time is 831.72 s, and the optimal solution corresponds to s = [0.195074, 0.148502, 0.005, 0.3, 0.196676]; q = [0.005237, 0.005, 0.051983, 0.005, 0.005], X = [2, 2, 3, 2, 2], TC = 175, TW = 149.73, TV = 63. Bridge Network The constraints and parameters of the bridge network (see Fig. 1) are the same as 4.1, so that C 0 = 175, W 0 = 200, V 0 = 110. The short failure mode probability of the system is Ss = s1 ∗ (s2 + s4 ∗ (1 − s2) ∗ (s3 + (1 − s3) ∗ s5)) + s3 ∗ (1 − s1) ∗ (s2 ∗ (s5 + (1 − s5) ∗ s4) + (1 − s2) ∗ s4); The open failure mode probability of the system is Fig. 1 Bridge network

1

2 5

3

4

(8)

HSO Algorithm for RRAP Problem in Three-State Device Network

29

Qs = q2 ∗ (1 − q1) ∗ (q4 + (1 − q4) ∗ q3 ∗ q5) + q1 ∗ (q3 + (1 − q3) ∗ q4 ∗ (q2 + (1 − q2) ∗ q5));

(9)

The reliability of the system is Rs (R, X ) = 1 − Ss − Q s

(10)

Formulas (5–10) constitute the maximum reliability optimization model of the bridge network. The algorithm runs 50 times at random, and the results are Rmax = 0.999514; Rmin = 0.999421; Ravg = 0.999497, the overall running time is 639.41 s, and the optimal solution corresponding to s = [0.005, 0.005, 0.005, 0.005, 0.187495 ]; q = [0.194495, 0.099454, 0.095321, 0.287474, 0.005]; X = [2, 3, 3, 2, 1], TC = 175, TW = 156.04, TV = 67.

5 Improved HSO Algorithm 5.1 Algorithm Algorithms 4 (pseudo-MATLAB code) Step 0 (initialization) stores system component cost, weight, volume and other parameters in the form of row vectors and sets compression constant c1 = c2 = 0.5 and inertia weight w = 0.9. The upper and lower bounds varmax1 and varmin1 of component redundancy are determined. The upper and lower bounds varmax2 and varmin2 of shorted failure mode probability are determined. The upper and lower bounds of open failure mode probability varmax3 and varmin3 are determined. The upper and lower bounds velmax 1 and velmin 1 of the convergence rate of component redundancy (variable) are determined. The upper and lower bounds velmax 2 and velmin 2 of the convergence rate of shorted failure mode probability (variable) are determined. The upper and lower bounds velmax 3 and velmin 3 of convergence rate of open failure mode probability (variable) are determined. Let n be the number of components and nc be the number of particles. Let V = zeros (3n, nc ); A = zeros (3n, nc ); B = zeros (3n, nc ); CA = zeros (1, nc ); Z = zeros (1, nt ), where nt is the total number of iterations. Step 1 randomly generates nc particles satisfying system constraints and stores them in matrix A, and the corresponding fitness values are stored in CA, and then, matrix A is stored in matrix B (the current optimal initial value of each particle). Step 2 uses matrix A to find the global optimal value [Xgbest, sgbest, qgbest]; that is, sgbest (qgbest) is the global optimal shorted (open) failure mode probability vector of components and Xgbest is the global optimal redundancy vector of components.

30

D. Li

Step 3 for t = 1: nt Step 3.1 % for each particle (solution) in population A, the revised new values are stored in matrix Y according to the iteration formula of PSO algorithm, and then, each solution is revised according to step function [8]. for j=1:nc for i=1:n V(i,j)=wV(i,j)+c1rand(B(i,j)-A(i,j))+c2rand(Xgbest(1,i)-A(i,j)); V(i+n,j)=wt *V(i+n,j)+c1rand(B(i+n,j)-A(i+n,j))+c2rand(sgbest(1,i)-A(i+n,j)); V(i+2n,j)=wt *V(i+2n,j)+c1rand(B(i+2n,j)-A(i+2n,j))+c2rand(qgbest(1,i)A(i+2n,j)); Y (i, j) =round (A (i, j) +V (i, j)); Y (i+n, j) = (A (i+n, j) +V (i+n, j)); Y (i+2n, j) = (A (i+2n, j) +V (i+2n, j)); end m=rand (1); if (m>=0) && (m=0.55) && (m=0.75) && (m=0.95) && (m k (t), (delt = the fitness of X—the fitness of Y; K (t) = cos (3.1416 * delt ∧ 0.25 * t ∧ 2/ (1 * 10 ∧ 6))), X is replaced by Y. Step 3.3 if the fitness of each current particle in A is greater than the fitness of the current optimal value of the particle, the current optimal value of the particle is updated. If the fitness of the current optimal value of the particle is greater than that of the global optimal solution, the global optimal solution is updated. Step 3.4 records the shorted failure mode probability, open failure mode probability and reliability corresponding to the optimal solution. Step 4 outputs the optimal solution and the corresponding cost, weight and volume constraints, the shorted failure mode probability of the optimal solution, the open failure mode probability and reliability, and draws the convergence curve. Step 5—the algorithm terminates.

5.2 Simulation The computer hardware and software conditions for implementing algorithm 4 are the same as those in Sect. 4.2 above. The parameters of the algorithm are set to n = 5, c1 = c2 = 0.5; w = 0.9, nc = 200, nt = 1000, α = β = γ = 2. Series System. See Sect. 4.2 for system description and requirements. Other parameters are set to varmin1 = 1, varmax1 = 3; velmax1 = 0.1, velmin1 = −0.1; varmin2 = 0.005, varmax2 = 0.3; velmax2 = 0.1, velmin2 = −0.1; varmin3 = 0.005, varmax3 = 0.3; velmax3 = 0.1, velmin3 = −0.1. Randomly running the algorithm 50 times gives the result as follows: Rmax = 0.999501; Rmin = 0.945393; Ravg = 0.998161; the overall running time was 621.86 s; s = [0.204656, 0.144986, 0.005, 0.3, 0.177580]; q = [0.005, 0.005, 0.053772, 0.005, 0.005], X = [2, 2, 3, 2, 2], TC = 175, TW = 149.73, TV = 63 corresponding to the optimal solution. For the test case of series system, the simulation results show that (1) the improved HSO algorithm is better than the improved PSO algorithm in finding the optimal solution; (2) the improved PSO algorithm takes more time than the improved HSO algorithm; (3) from the perspective of average optimal solution, the improved PSO algorithm is slightly better than the improved HSO algorithm. Bridge Network. See Sect. 4.2 for system description and requirements. The algorithm parameters are set in Sect. 5.2 Series System. Randomly running the algorithm 50 times gives the result as follows: Rmax = 0.999514; Rmin = 0.994220; Ravg = 0.999356; the overall running time was 659.05 s, s = [0.005, 0.005, 0.005, 0.005, 0.184654]; q = [0.200225, 0.099008, 0.093516, 0.288714, 0.005], X = [2, 3, 3, 2, 1], TC = 175, TW = 156.04, TV = 67 corresponding to the optimal solution.

32

D. Li

For the test case of bridge network system, the simulation results show that (1) the optimal solution obtained by improved HSO algorithm is consistent with the optimal solution of improved PSO algorithm; (2) the improved HSO algorithm takes more time than the improved PSO algorithm; (3) from the perspective of average optimal solution, the improved PSO algorithm is slightly better than the improved HSO algorithm.

6 Conclusion In this paper, a three-state device network RRAP problem model is established, and two algorithms are designed to solve the problem. The simulation results show that the improved PSO algorithm is slightly better than the improved HSO algorithm. The insufficiency is that the range of parameters in this paper, such as shorted failure mode probability and open failure mode probability of system components, has set a relatively small range, which has not yet been able to test the impact of RRAP research, which will be the direction of our further efforts in the future. Acknowledgements This research was financially supported by the Inner Mongolia Natural Science Foundation Project (2018MS06031), Inner Mongolia University Science Research Project (NJZY17290).

References 1. Coit, D.W., Zio, E.: The evolution of system reliability optimization. Reliab. Eng. Syst. Saf. https://doi.org/10.1016/j.ress.2018.09.008 (2018) 2. Pant, S., Anand, D., Kishor, A., et al.: A particle swarm algorithm for optimization of complex system reliability. Int. J. Perform. Eng. 11(1), 33–42 (2015) 3. Sahoo, L., Banerjee, A., Bhunia, A.K., et al.: An efficient GA-PSO approach for solving mixedinteger nonlinear programming problem in reliability optimization. Swarm Evol. Comput. 19(12), 43–51 (2014) 4. Beji, N., Jarboui, B., Eddaly, M., et al.: A hybrid particle swarm optimization algorithm for the redundancy allocation problem. J. Comput. Sci. 1, 159–167 (2010) 5. Coelho, L.D.S.: An efficient particle swarm approach for mixed-integer programming in reliability-redundancy optimization applications. Reliab. Eng. Syst. Saf. 94, 830–837 (2009) 6. Xu, Z.J., Ma, C.W., Mei, Q.Z., et al.: Solving a system reliability optimization problem with genetic algorithms. J. Tsinghua Univ. (Natural Science Edition) 7, 54–57 (1998) 7. Zh, T.Z., Teng, C.X., Han, Z.G.: Application of genetic algorithms in system reliability optimization. Control Decis. Mak. 17(3), 378–384 (2002) 8. Yeh, W.C.: A new exact solution algorithm for a novel generalized redundancy allocation problem. Inf. Sci. 408(10), 182–197 (2017) 9. Chang, K.H., Kuo, P.Y.: An efficient simulation optimization method for the generalized redundancy allocation problem. Eur. J. Oper. Res. 265, 1094–1101 (2018) 10. Gholinezhad, H., Hamadani, A.Z.: A new model for the redundancy allocation problem with component mixing and mixed redundancy strategy. Reliab. Eng. Syst. Saf. 164, 66–73 (2017)

HSO Algorithm for RRAP Problem in Three-State Device Network

33

11. Zeng, J.C., Jie, J., Cui, Z.H.: Particle Swarm Optimization, 1st edn. Science Press, Beijing (2004) 12. Wang, Z.C., Li, W.W.: Reliability optimization based on particle swarm optimization. J. Taizhou Univ. 28(6), 29–32 (2006) 13. Liu, J.J.: System reliability optimization based on particle swarm optimization. Comput. Digit. Eng. 40(4), 6–7 + 14 (2012) 14. Michel, J.A.: A simplified approach for reliability evaluation and component allocation in three-state series and parallel systems composed of non-identical components. Gest. Prod. Sao Carlos. 16(1), 54–62 (2009) 15. Page, L., Perry, J.: Optimal “series-parallel” networks of 3-state devices. IEEE Trans. 37(4), 388–394 (1988) 16. Walter, G.G.C., Pflug, A.R.: Configurations of series-parallel networks with maximum reliability. Microelectron. Reliab. 36(2), 247–253 (1996) 17. Levitin, G.: Optimal series-parallel topology of multi-state system with two failure modes. Reliab. Eng. Syst. Saf. 77(1), 93–107 (2002) 18. Li, D.K.: Decomposition theorem of network reliability for three-state devices and calculation of network reliability. Northeast University, Shenyang (1992) 19. Li, D.K., Dong, H.: Reliability optimization of s-p network with parallel non-identical components. Yinshan Acad. J. (Natural Science Edition) 30(2), 35–41 (2016) 20. Li, D.K.: Particle swarm optimization for reliability optimization of s-p networks with singleobjective and multi-condition constraints. Mod. Electron. Technol. 41(1), 89–92 (2018) 21. Li, D.K., Wulantuya, Zhu, Y. L.: Comparative study on intelligent algorithm for reliability optimization of series parallel networks based on MATLAB. Electron. Commer. 8, 58–60 + 74 (2015) 22. Li, D.K., Qimuge, Wulanyuya, et al.: Single-objective single-constraint reliability optimization ant colony algorithm for 3-state series-parallel devices networks. J. Inner Mongolia Univ. Technol. (Natural Science Edition) 34(1), 36–41 (2015)

A Method of Service Function Chain Arrangement for Load Balancing Zhan Shi, Zanhong Wu, and Ying Zeng

Abstract In the software-defined network and network function virtualization environment, most service chain mapping methods only deploy single instance in proper place in the network. It is difficult to balance load balancing and network utilization. This paper proposes a service chain mapping method based on load balancing. In this paper, the replication of VNF instances is added to the process of service chain mapping to maintain network load balancing and minimize delay. A multi-objective optimization model is established. Aiming at this multi-objective optimization problem, this paper uses a service chain mapping method based on particle swarm optimization algorithm and redefines the particle parameters and related operations according to the service chain mapping problem. The simulation results show that compared with other random mapping methods, the proposed algorithm can effectively maintain load balancing, reduce delay, and reduce resource consumption by up to 30% in the mapping process. Keywords Network function virtualization · Service chain mapping · Load balancing

1 Introduction With NFV technology, traditional network functions are virtualized and deployed on common server nodes, providing a variety of services based on user or business needs. Service chain mapping problem refers to the orderly deployment of virtual network function (VNF) instances and routing problems between servers running VNF instances. Most of the early research solved the mapping problem of service chain under the premise that VNF could not be copied. Authors in [1] designed an optimization algorithm based on the resource constraints of the underlying physical network but did not consider the delay caused by the extension of the service chain. The algorithm Z. Shi (B) · Z. Wu · Y. Zeng Guangdong Power Grid Co., Ltd., Electric Power Dispatch and Control Center, Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_4

35

36

Z. Shi et al.

designed by authors in [2] maps the VNF instance to the same server node as much as possible but fails to consider the burden of the server node and the load balancing of the underlying network. Based on the size of the underlying physical network and the use of server resources, authors in [3] jointly optimize the service chain mapping, but it is also difficult to solve the problem of maintaining limited load balancing. In the study of VNF replicable mapping algorithms, authors in [4] used integer linear programming to determine the number of VNF instances and mapping schemes, through reasonable VNF replication to maintain load balancing or minimize network resource consumption. In Ref. [5], the problem of network optimization for VNF placement of IP over WDM networks is studied, but load balancing in networks is not considered in this paper. Authors in [6] designed a two-stage deployment algorithm for VNF state synchronization and routing scheduling joint optimization. In Ref. [7], an algorithm based on MCTs is designed to optimize the energy consumption during VNF deployment. In Ref. [8], based on virtual network function forwarding graph, VNF assignment problem is expressed as integer linear programming, and a heuristic algorithm for assigning multiple VNF instances is proposed. However, all the above problems are single-objective optimization scheme, and it is difficult to cope with multiple optimization goals such as delay and load balancing. Therefore, this paper establishes a multi-objective optimization model by using VNF replication for service chain mapping and considering minimizing delay and load balancing. In order to comprehensively evaluate the effect of the mapping scheme to maintain the link load and reduce the delay, the link cost is obtained by weighted summation of the link’s load factor and the link delay. For this model, an optimized particle swarm optimization algorithm is designed to solve the approximate optimal solution. The organization of this paper is as follows: The third section introduces the model of the system and the constraints of the mapping. The fourth section carries out simulation experiments and analyzes the performance of the algorithm used in this paper. The fifth section summarizes the full text.

2 System Model and Constraints

System Architecture We design a service chain mapping system model in the context of NFV and SDN. The model is divided into a control plane and an underlying physical network. The control plane consists of the VNF orchestrator and the SDN controller. The underlying physical network is mainly composed of general server nodes and data transmission links between server nodes. The underlying physical network can be represented a weighted undirected graph. Service chain model can be represented by directed graphs (Table 1). This paper designs two factors for reacting to the underlying physical network load, including server load factor θn and link load factor θi j .

A Method of Service Function Chain Arrangement …

37

Table 1 Main symbol definition Symbol

Description

Fs

VNF instance collection of service chain s

E

Physical link collection, li j ∈ E

N

Server node collection

CPU(f )

CPU resource requirements of VNF instance f, f ∈ Fs

CPU(n)

CPU capacity of server node n, n ∈ N

MEM(f )

Memory resource requirements of VNF instance f, f ∈ Fs

MEM(n)

Memory capacity of server node n, n ∈ N

rmax

Maximum number of paths

Binary variable f iuv j

If the physical link (i, j) carries the virtual link (u, v), the value of the variable takes 1; otherwise, it takes 0

Binary variable xiu

If the VNF instance u is mapped to the physical node i, the variable takes a value of 1; otherwise, it takes 0

li j

A physical link between server node i and server node j

BW(li j )

Bandwidth resource capacity between server node i and server node j

BW(li j )

Virtual link bandwidth requirement between VNF instance u and VNF instance v

θn = φn = γ1

α1 1 − φn

(1)

  x i ∗ CPU(i)   x i ∗ MEM(i) n n + γ2 CPU(n) MEM(n) s∈S i∈F s∈S i∈F s

(2)

s

α1 is a parameter for adjusting the limit value of φn , and φn is the server utilization rate of node n. Since there are two resources of CPU and memory in the server, this paper uses the weighted summation method to obtain the server utilization. θi j =

α2 1 − φi j

(3)

α2 is a parameter for adjusting the limit value of θi j , and θi j is the link utilization rate of the physical link ij. Mapping Cost This paper divides the mapping cost COST(s) into server mapping cost COST(Ns ) and link mapping cost COST(E s ). COST(s) = COST(Ns ) + COST(E s ) Server mapping cost can be expressed as

(4)

38

Z. Shi et al.

COST(Ns ) =



xni · c1 · θn

(5)

s∈S i∈Fs n∈N

c1 represents the unit cost of server resources. As shown in Eq. (5), the server mapping cost consists of a unit cost and a server load factor. Link mapping cost can be expressed as COST(E s ) =

  

  c2 · f iuv j · γ3 · θi j + γ4 · di j

(6)

s∈S u,v∈Fs i, j∈N

c2 represents the unit cost of the link resource. As shown in Eq. (7), the link mapping cost consists of a link load factor, a fixed bandwidth cost, and a delay cost. Delay Constraint After the service chain is deployed on the underlying network, the end-to-end delay must be lower than ds , the delay requirement of the service chain. The end-to-end delay d p is mainly composed of the server processing delay and transmission delay. dP =

 i∈ p

di +



di j

(7)

li j ∈ p

C1 : dp ≤ ds , ∀ p ∈ P

(8)

Underlying Network Constraint C2 :



xiu ≤ 1, ∀ p ∈ P, ∀u ∈ Fs

(9)

∀i∈ p

As shown in Eq. (10), for each service path, a VNF instance can only be mapped to one server node, and one server node can only deploy one VNF instance. C3 : xiu ∗ CPU(u) ≤ CPU(i), ∀u ∈ F, ∀i ∈ N

(10)

C4 : xiu ∗ MEM(u) ≤ MEM(i), ∀u ∈ F, ∀i ∈ N

(11)

As shown in Eqs. (10) and (11), the VNF instance can be deployed only when the CPU resources and memory resources of the server node meet the requirements.

A Method of Service Function Chain Arrangement …

39

3 Experiment and Performance Analysis 3.1 Experimental Setup For the multi-objective optimization model, simulation experiments were carried out in the MATLAB environment to compare the effectiveness of the algorithm. The experiment set up 12 server nodes and 24 links. Assuming that the service chain request arrives dynamically and obeys the Poisson distribution of strength [0, 1000], each mapping request consists of several VNFs, and the number of VNFs is subject to a uniform distribution of [2, 3].

3.2 Analysis of Results Figure 1 depicts the average cost of deploying a service chain for three algorithms at different request strengths. With the further increase of the request strength, the average cost of the link-node and node-link random mapping algorithms has increased significantly, and the average cost of the algorithm is stable and superior to the other two random algorithms. Figure 2 depicts a comparison of the link utilization variances for the three algorithms at request strength 200. Among them, the node-link algorithm has the highest link utilization variance, while maintaining lower costs, the proposed algorithm replicates traffic through VNF replication and makes full use of low-usage links, thus better maintaining link load balancing. Figure 3 depicts a comparison of server utilization variances for the three algorithms at different request strengths, which can reflect server load conditions. The Fig. 1 Average cost

40

Z. Shi et al.

Fig. 2 Link utilization variance

Fig. 3 Node utilization variance

performance of this algorithm in the test is always better than the other two algorithms. It shows that through the load factor and VNF replication, the algorithm in this paper can make use of more low-load server nodes while maintaining link load balancing, and it also has a good effect of maintaining server load balancing. Figure 4 depicts the comparison of the average utilization of nodes for three algorithms at different request strengths. When the request strength is low, the node utilization of the three algorithms is almost the same. However, as the number increases, the other two algorithms are prone to local congestion when the load increases, which causes bottlenecks in node utilization. The algorithm of this paper maintains a relatively stable growth of node utilization by maintaining load balancing, which effectively alleviates the problem of utilization bottleneck.

A Method of Service Function Chain Arrangement …

41

Fig. 4 Average node utilization

4 Conclusion Experiments show that the proposed algorithm can guarantee the QoS of the service and can reduce the cost by up to 29.7%. Acknowledgements This work was supported by the science and technology project of Guangdong power grid (036000KK52160025).

References 1. Park, C., Shin, D.: VNF management method using VNF group table in network function virtualization. In: 2017 19th International Conference on Advanced Communication Technology (ICACT), Bongpyeong, pp. 210–212 (2017) 2. Jahromi, N.T., Kianpisheh, S., Glitho, R.H.: Online VNF placement and chaining for valueadded services in content delivery networks. In: 2018 IEEE International Symposium on Local and Metropolitan Area Networks (LANMAN), Washington, DC, pp. 19–24 (2018) 3. Wang, B., Odini, M.: Short paper: lightweight VNF manager solution for virtual functions. In: 2015 18th International Conference on Intelligence in Next Generation Networks, Paris, pp. 148–150 (2015) 4. Zhou, R.: An online placement scheme for VNF chains in geo-distributed clouds. In: 2018 IEEE/ACM 26th International Symposium on Quality of Service (IWQoS), Banff, AB, Canada, pp. 1–2 (2018) 5. Yang, Z., Chen, B., Dai, M., Su, G., Lin, R.: VNF placement for service chaining in IP over WDM networks. In: 2018 Asia Communications and Photonics Conference (ACP), Hangzhou, pp. 1–3 (2018) 6. Shi, J., Wang, J., Huang, H., Shen, L., Zhang, J., et al.: Joint optimization of stateful VNF placement and routing scheduling in software-defined networks. In: 2018 IEEE International Conference on Parallel & Distributed Processing with Applications, Ubiquitous Computing & Communications, Big Data & Cloud Computing, Social Computing & Networking, Sustainable

42

Z. Shi et al.

Computing & Communications (ISPA/IUCC/BDCloud/SocialCom/SustainCom), Melbourne, Australia, pp. 9–14 (2018) 7. Soualah, O., Mechtri, M., Ghribi, C., Zeghlache, D.: Energy efficient algorithm for VNF placement and chaining. In: 2017 17th IEEE/ACM International Symposium on Cluster, Cloud and Grid Computing (CCGRID), Madrid, pp. 579–588 (2017) 8. Quang, P.T.A., Bradai, A., Singh, K.D., Picard, G., Riggio, R.: Single and multi-domain adaptive allocation algorithms for VNF forwarding graph embedding. IEEE Trans. Netw. Serv. Manage. 16(1), 98–112 (2019)

The Optimal Implementation of Khudra Lightweight Block Cipher Xiantong Huang, Lang Li, and Ying Guo

Abstract In this paper, we discuss the area and speed balance optimization of Khudra lightweight block cipher. There are three major ingredients. Firstly, because of the whole structure of the Khudra block cipher and its F-function is based on a Feistel structure, we make the main module that directly calls the F-function in the hardware optimization implementation. Secondly, through the clock control, the plaintext can be XORed with the key and the round constant under certain conditions. At the same time, the three rounds of the F-function are merged into one module, whose F-function module contains the F-function of the left and right branches of the algorithm. Thus, three rounds of operations can be completed with only one S-box, which can effectively reduce the number of registers and the number of iterations to increase the encryption and decryption rate. Finally, because of the particularity of key expansion in Khudra, we separately calculated the round key and stored its results in the register, which can effectively save the time of key expansion. Keywords Lightweight block cipher · Khudra · Optimization · FPGA implementation

1 Introduction With the development of the Internet of things (IoT), microelectronic devices such as wireless sensor networks (WSNs) and radio-frequency identification (RFID) have been widely used in daily life. However, these devices have limited computation ability, small storage space, and other restrictions; the lightweight block cipher has become urgent. Classical lightweight block ciphers include Khurda [1], PRESENT [2], TWINE [3], SFN [4], LiCi [5], Roadrunnr [6], etc. Compared with traditional X. Huang · L. Li (B) · Y. Guo College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_5

43

44

X. Huang et al.

ciphers, lightweight block ciphers are suitable for resource-constrained devices. At the same time, it has the ability to resist some classic attacks. In 2014, Khurda was proposed in SPACE. Khurda has better security and can resistant to linear attack, differential attack, impossible differential attack, relatedkey attack, and so on. On the hardware implementation, Khurda can be implemented on a low-cost FPGA, which is more compact in terms of area than other algorithms such as PRESENT and Piccolo [7]. As far as we know, there are many papers about attacking on Khurda [8], but the papers on hardware optimization and implementation of Khurda have not been found [9–11]. In the second section, the structure of Khudra is briefly described. In the third section, several optimization methods are proposed from the whole and the part based on the structure of Khudra. In the fourth section, the implementation and analysis of optimization methods are carried out. The conclusion is drawn in the fifth section.

2 Introduction of Khudra Algorithm Khudra is a lightweight cipher based on the generalized Feistel network (GFN) structure. The block length and key length of the algorithm are 64-bit and 80-bit, respectively, and the number of encryption iterations is 18 rounds, which is called the outer round. The encryption structure of Khudra can be shown in Fig. 1 and the F-function structure shown in the right half of Fig. 1. A total of six iterations called the inner round. Table 1 is the specific function relationship of S-box. In Khudra, 64-bit plaintext is divided into four sub-blocks, denoted as P[0], P[1], P[2], P[3], and similarly, the corresponding ciphertext is also denoted as C[0], C[1],

WK0

WK1 RK0

WK2

RK1

RK2

RK3

RK34

RK35

WK3

Fig. 1 Encryption structure of Khudra

0

C

x

S[x]

5

1

6

2

B

3

Table 1 Specific function relationship of S-box 9

4 0

5 A

6 D

7 3

8 E

9 F

A

8

B

4

C

7

D

1

E

2

F

The Optimal Implementation of Khudra Lightweight Block Cipher 45

46

X. Huang et al.

C[2], C[3]. The 16-bit whitening keys WKi (0 ≤ i < 4) and 16-bit RKi (0 ≤ i < 35) are derived directly from the master key. Then the pseudo-code of Khudra encrypts as follows: 1. Input 64-bit P and 80-bit key; 2. Pi+1 [0] = WK0 ⊕ Pi [0], Pi+1 [2] = WK1 ⊕ Pi [2]; 3. for i = 0…17 do Pi+1 [0] = F(Pi [0]) ⊕ Pi [1] ⊕ RK2i ; Pi+1 [1] = Pi [2]; Pi+1 [2] = F(Pi [2]) ⊕ Pi [3] ⊕ RK2i+1 ; Pi+1 [3] = Pi [0]; 4. Ci [0] = WK2 ⊕ Pi [0], Ci [1] = Pi [1], Ci [2] = WK3 ⊕ Pi [2], Ci [3] = Pi [3];

3 Hardware Optimization Method of Khudra 3.1 Local Optimization of the Algorithm

F-function fusion The six round modules of F-function are hardware implemented in original Khudra. The right half of Fig. 1 shows that six rounds of F-function that requires 6 S-boxes and 12 XORs. For the outer wheel, encryption requires 12 S-boxes and 24 XORs operations. According to the GE conversion method mentioned in Ref. [2], when two F-functions are called simultaneously, and the resource needs 333.69 GE, which will take up a large part of resources. Therefore, we combine two F-functions into one module and the F-function module implementation is shown in Fig. 2. At the same time, the three round iterations of the F-function are merged into its module for implementation, and the same module is repeated twice, reducing the number of iterations and increasing the encryption and decryption rate. The F-function module is implemented in Verilog HDL language, and part of the code of its module is as follows: Fig. 2 F-function module

The Optimal Implementation of Khudra Lightweight Block Cipher

47

Fig. 3 Simulation result of F-function

assign t_res1[0]={res1[3:0],res1[11:8]ˆsbox[res1[15:12]], res1[11:8],res1[7:4]ˆsbox[res1[3:0]]}; …… assign tt_res2={t_res2[1][3:0],t_res2[1][11:8]ˆsbox[t_res2[1][15:12]], t_res2[1][11:8],t_res2[1][7:4]ˆsbox[t_res2[1][3:0]]}; Figure 3 shows the correctness verification result of F-function: Reusing S-box The S-box is the same as the S-box of PRESENT, and we also implemented the S-box in hardware. Considering that the calculation of the composite field operation is more complicated and requires more logic units; the S-box is pre-stored in register by lookup table; and its module is reused. Its code implementation is as follows. initial begin sbox[0]=12; sbox[1]=5; sbox[2]=6; sbox[3]=11; sbox[4]=9; sbox[5]=0; sbox[6]=10; sbox[7]=13; sbox[8]=3; sbox[9]=14;sbox[10]=15; sbox[11]=8; sbox[12]=4; sbox[13]=7;sbox[14]=1; sbox[15]=2; end Processing of sub-keys According to the second chapter, the round constant RCi = {0||i(6)||00||i(6)||0}, where 1 ≤ i ≤ 18. As shown in Table 2, the round constants RCi are expressed in hexadecimal. Since the key expansion in Khudra is to XOR, the key with RCi assumes that the initial keys are set to WK0 , WK1 , WK2 , WK3 , WK4 , and round sub-keys RK0 ∼ RK35 can be obtained by RKi = WKimod5 ⊕ RCi according to the value in Table 2. To sum up, if the initial keys WK0 , WK1 , WK2 , WK3 , WK4 are known, then the round sub-keys can be regarded as a constant. Therefore, we first calculate the key extension module and store the calculation results in the register. This enables the

0202

10

1414

RCi

i (rounds)

RCi

1

i (rounds)

Table 2 Round constants (RCi )

1616

11

0404

2

1818

12

0606

3

1a1a

13

0808

4

1c1c

14

0a0a

5

1e1e

15

0c0c

6

2020

16

0e0e

7

2222

17

1010

8

2424

18

1212

9

48 X. Huang et al.

The Optimal Implementation of Khudra Lightweight Block Cipher

49

Fig. 4 Khudra optimization overall flow

algorithm to be called directly on demand. Although an extra clock is needed, it can save the calculation time in the round pipeline and improve the throughput of the encryption algorithm.

3.2 Global Optimization of the Algorithm Due to its structural particularity, we show the algorithm optimization overall flowchart in Fig. 4. We use the change of clock upper and lower edges and use the always statements to control the relationship between clock and module call, clock and working signal. Its algorithm optimization system structure is shown in Fig. 5. The F-function module includes F-function and the round key addition, in which F-function is three round transformations of S-box. The round key input key expansion module provides round sub-keys to the F-function module.

3.3 Simulation Results The Khudra based on Verilog HDL is simulated on ModelSim 10.1. The optimized Khudra is implemented using the Khudra module, key module, and F-function module. When the number of rounds is count and count is 18, the ciphertext is output. The simulation results of the algorithm are shown in Fig. 6.

50

X. Huang et al.

Fig. 5 Khudra optimization system structure

Fig. 6 Khudra simulation result

4 Results and Analysis of Implementation of FPGA According to the above optimization scheme, the FPGA model is selected as Xilinx Virtex-5 LX50T. Optimization Khudra is implemented in hardware, and the performance analysis is performed through ISE 14.7. Figures 7 and 8 are the results of FPGA implementation area of un-optimized and optimized Khudra, respectively. From Fig. 7, it can be concluded that the hardware implementation area of the un-optimized Khudra is Size = 5202 + 7446 = 12,648 Slices. From Fig. 8, it can be concluded that the hardware implementation area of the optimized Khudra is Size = 5366 + 4776 = 10,142 Slices. The area is reduced by 2506 Slices compared to the un-optimized Khudra algorithm implementation area, and the optimized Khudra is more advantageous for resource-constrained devices. As can be seen from Fig. 9, the un-optimized Khudra required encryption rate is: Minimum period =120.894 ns. As can be seen from Fig. 10, the optimized Khudra required encryption rate is: Minimum period = 9.998 ns. According to the data comparison, it can be concluded that the optimized Khudra improves the system encryption rate by about 12 times.

The Optimal Implementation of Khudra Lightweight Block Cipher

Fig. 7 Un-optimized implementation area

Fig. 8 Optimized implementation area

51

52

X. Huang et al.

Fig. 9 Un-optimized Khudra implementation rate

Fig. 10 Optimized Khudra implementation rate

5 Conclusions In this paper, the lightweight block cipher Khudra is optimized by balancing area and speed without reducing the performance of encryption and decryption. The optimization mainly studies the structure characteristics of the algorithm, the S-box, and the implementation of the key expansion. In this paper, the Khudra is implemented in Verilog HDL according to the optimization scheme. Under the FPGA model Xilinx Virtex-5 LX50T, the ISE 14.7 synthesis shows that the optimized Khudra significantly improves the area and system encryption rate. Acknowledgements This research is supported by the Scientific Research Fund of Hunan Provincial Education Department with Grant No. 19A072, Hengyang Normal University Training Programs of Innovation and Entrepreneurship for Undergraduates (No. CXCY1908), Hunan Provincial Training Programs of Innovation and Entrepreneurship for Undergraduates (No. 1834), National Training Programs of Innovation and Entrepreneurship for Undergraduates of China (No. S201910546006), Hunan Province Special Funds of Central Government for Guiding Local Science and Technology Development (No. 2018CT5001), Hunan Provincial Natural Science Foundation of China with Grant No. 2019JJ60004, the Science and Technology Plan Project of Hunan Province (No. 2016TP1020), Subject group construction project of Hengyang Normal University (No. 18XKQ02), Innovative research program for graduates of Hunan Province (No. CX20190980).

The Optimal Implementation of Khudra Lightweight Block Cipher

53

References 1. Kolay, S., Mukhopadhyay, D.: Khudra: a new lightweight block cipher for FPGAs. In: Chakraborty, R.S. (ed.) SPACE 2014, LNCS, vol. 8804, pp. 126–145. Springer, Heidelberg (2014) 2. Bogdanov, A., Knudsen, L.R., Leander, G., et al.: PRESENT: an ultra-lightweight block cipher. In: Paillier, P., Verkbauwhede, I. (eds.) CHES 2007. LNCS, 4727, pp. 450–466. Springer, Heidelberg (2007) 3. Suzaki, T., Minematsu, K., Morioka, S., Kobayashi, E.: Twine: a lightweight, versatile block cipher. In: ECRYPT Workshop on Lightweight Cryptography, pp. 146–169 (2011) 4. Li, L., Liu, B., Zhou, Y., et al.: SFN: a new lightweight block cipher. Microprocess. Microsyst. 60, 138–150 (2018) 5. Patil, J., Bansod, G., Kant, K.S.: LiCi: a new ultra-lightweight block cipher. In: 2017 International Conference on Emerging Trends & Innovation in ICT (ICEI), pp. 40–45 (2017) 6. Baysal, A., Sahin, S.: RoadRunneR: a small and fast bitslice block cipher for low cost 8-bit processors. In: Güneysu, T., Leander, G., Moradi, A. (eds.) LightSec 2015. LNCS, vol. 9542, pp. 58–76. Springer, Heidelberg (2016) 7. Shibutani, K., Isobe, T., Hiwatari, H., Mitsuda, A., Akishita, T., Shirai, T.: Piccolo: an ultralightweight blockcipher. In: Preneel, B., Takagi, T. (eds.) CHES 2011. LNCS, vol. 6917, pp. 342–357. Springer, Heidelberg (2011) 8. Dai, Y., Chen, S.: Security analysis of Khudra: a lightweight block cipher for FPGAs. Secur. Commun. Netw. 9(10), 1173–1185 (2016) 9. Abed, S., Jaffal, R., Mohd, B.J., et al.: FPGA modeling and optimization of a simon lightweight block cipher. Sensors 19(4), 9–13(2019) 10. Li, P., Zhou, S., Ren, B., et al.: Efficient implementation of lightweight block ciphers on volta and pascal architecture. J. Inf. Secur. Appl. 47, 235–245 (2019) 11. Mohd, B.J., Hayajneh, T., Khalaf, Z.A., et al.: Modeling and optimization of the lightweight HIGHT block cipher design with FPGA implementation. Secur. Commun. Netw. 9(13), 2200– 2216 (2016)

Droop Control of Microgrid Based on Genetic Optimization Algorithm Yongqi Tang, Xinxin Tang, Jiawei Li and Mingqiang Wu

Abstract The microgrid is composed of multiple distributed power generation units and can be managed in combination with multiple energy sources. In the island mode, a reasonable allocation of power is required between different power generating unit devices to ensure the stability of the entire system. Due to the difference in impedance between the system AC bus and each inverter, the traditional droop control cannot coordinate the power of each branch. In this strategy, a new control method that operates in parallel mode with inverters that do not require bus connections is used, and frequency and voltage control can be achieved without any common control circuit or communication between the inverters. By optimizing the genetic algorithm to obtain better droop control parameters, the power of the system can be adjusted, so that the droop controllers of multiple DG output powers reach the optimal distribution state. The changes of different DG powers are analyzed in detail in MATLAB/Simulink platform to verify the stability and feasibility of the proposed strategy. Keywords Microgrid · Distributed generation · Droop control · Virtual synchronous machine · Genetic algorithm

1 Introduction In recent years, the problem of environmental pollution and non-renewable energy depletion has become more and more serious. In order not to cause deterioration of power quality, avoiding the use of a large amount of load during peak hours can reduce the burden on the power grid and can also flexibly allocate DG to the power grid [1]. When the microgrid is in the grid-connected operation state, the energy required by the load at this time can be provided by the large power grid. When an emergency situation occurs in a large power grid, an emergency off-grid is required. At this Y. Tang (B) · X. Tang · J. Li · M. Wu Hunan Institute of Engineering, College of Electrical Information, Xiangtan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_6

55

56

Y. Tang et al.

time, the microgrid should enter the island mode and the large power grid. The microgrid needs to provide its own frequency and voltage support to provide a stable power supply to the load. Due to the complexity of the actual load and the different line impedances, the power cannot be allocated reasonably. The solution adopted in this paper is to improve the droop controller and balance the different DG output power by optimizing the control parameters, so that the microgrid has more stable performance. When the load changes, the control strategy can eliminate the need to add complex communication, reduce the cost, avoid the micro-network crash caused by the communication failure, and at the same time realize the reasonable allocation of power [2]. This paper proposes a droop controller based on genetic algorithm. Genetic algorithm is a kind of random search and global optimization algorithm. It can avoid local maximum and early convergence in dealing with complex system problems, so it has high robustness and applicability.

2 Microgrid Overview 2.1 Microgrid Composition Figure 1 is an overall block diagram of a plurality of microgrids of DG. Different types of DG such as wind turbines, solar photovoltaic groups, battery packs are connected to the common AC bus through the inverter, and the other end is connected to the load. The microgrid is connected to the grid through a common connection point.

Fig. 1 Overall block diagram of multiple DG microgrids

Droop Control of Microgrid Based on Genetic Optimization Algorithm

57

In the grid-connected mode, the microgrid is a multi-power, multi-load small system that requires the support of the large grid to provide voltage and system frequency to maintain the stability of the entire system. In the island mode, in order to maintain the energy supply and demand balance of the microgrid system and the efficient use of energy, DG is required to quickly match the power balance.

2.2 Basic Principles of Droop Control Please note that the first paragraph in the island mode; multiple DGs can be equivalent to multiple inverters operating in parallel, as shown in Fig. 2 to analyze the basic principle of droop control [3–5]. In the figure, the inverter is equivalent to the voltage source U1 ∠0, the current flowing through the line impedance Z ∠θ is I ∠ − φ, and the grid voltage is U2 ∠ − δ. The inverter output active power and reactive power can be expressed as: P= Q=

R2

U1 [R(U1 − U2 cos δ) + XU2 sin δ] + X2

(1)

R2

U1 [X (U1 − U2 cos δ) − RU2 sin δ] + X2

(2)

or it could be U2 sin δ =

X P − RQ U1

U1 − U2 cos δ =

RP + XQ U1

(3) (4)

In the formula, δ is the power angle, X is the line reactance, and R is the line resistance. For high voltage lines X  R, the line resistance can be ignored and presented with sensibility. Linearization sin δ = δ, cos δ = 1. The equation has Fig. 2 Single inverter inversion network diagram

58

Y. Tang et al.

XP δ∼ = U1 U2

(5)

XQ U1 − U2 ∼ = U1

(6)

It can be clearly seen from the above formula that the active power is related to the phase angle, and the reactive power is related to the voltage. The phase angle is not easy to measure and can be converted into frequency, so you can use the letter in the droop control. f − f 0 = −k p (P − P0 )

(7)

U1 − U0 = −kq (Q − Q 0 )

(8)

In the middle v0 kq Sag coefficient, f 0 , U0 rated frequency and rated voltage, respectively P0 , Q 0 They are rated active power and rated reactive power. This paper mainly studies the DG droop controller to solve the power distribution and can also optimize the droop parameters online in real time to further adjust the active and reactive power of the system. The droop controller can well solve the output of multiple DGs, and the output power can be adjusted to make the microgrid run stably under the premise that each DG does not need to communicate with each other. Figure 3 shows the coordination of the droop controller between multiple DG control chart, droop controller control reference voltage vr , inverter output controller controls output voltage v0 . Power loop, voltage loop, and current loop three-loop control, wherein the power loop adopts droop control mode [6]. To control the voltage and frequency of the DG output, first collect the voltage and current signals for

Fig. 3 Droop control inverter structure

Droop Control of Microgrid Based on Genetic Optimization Algorithm

59

coordinate transformation, then calculate the active and reactive power and then send them to the droop controller, and then carry out voltage and current double loop control. When the load changes, the voltage and frequency will be fluctuated, and the droop parameter needs to be adjusted in time. In fact, the sagging controller is essentially the control of the virtual synchronous generator. Finally, by controlling the inverter to simulate the synchronous generator itself [7, 8], therefore, the advantages of self-balancing ability, drooping characteristics and the like are obtained, which is beneficial to the independent coordinated operation of the distributed power source. The drooping parameter is changed in real time and is adjusted autonomously according to the load condition, so that the DG work is relatively balanced and achieves a dynamic balance effect.

3 Optimization Algorithm 3.1 Genetic Algorithm Please note that the first paragraph of a section or subsection is not indented. The first paragraphs that follows a table, figure, equation etc. does not have an indent, either. The genetic algorithm simulates the evolution process of natural organisms and summarizes its evolution characteristics, focusing on solving the optimization problem in practice. It is an algorithm based on evolutionary survival of the fittest. Through the basic operations of selection, crossover and mutation, the whole population begins to evolve in a good direction. First, multiple point searches are selected from the population to avoid causing local optimum. In this process, the population can approach or reach a state of optimal solution. Since the values of crossover probability and mutation probability are difficult to determine, the fixed value will have an impact on the accuracy of the final result. The too small mutation probability will result in the individual not being able to update in time. If the value is too large, the results of genetic algorithm and ordinary search algorithm are not much different. The adaptive operator is introduced on the basis of the original, and the difference between the populations is large in the initial stage of evolution. It is necessary to increase the crossover rate and reduce the mutation rate. When the population gradually becomes stable in the later stage, it is necessary to reduce the crossover rate and increase the mutation rate. This is beneficial to find the global solution of the whole world without prematurely falling into local convergence [9, 10]. The flow of the genetic algorithm is shown in Fig. 4. It is mainly composed of the following parts. 1. Encoding form. Find the relationship that needs to solve the problem and the existence of the chromosome. The form of the coding determines the operation mode of the hybrid operator. The experts also propose some other coding methods, mainly for the special problem to improve the coding, but commonly used binary coding. The adaptive coding used in this paper keeps track of the

60

Y. Tang et al.

Fig. 4 Genetic algorithm flow diagram

IniƟal populaƟon

CalculaƟon fitness

Yes

Meet the terminaƟon condiƟon

Choose a good individual

GeneraƟng new populaƟons

Reach the iteraƟon condiƟon

No

End

droop coefficient in time, so that the length of the chromosome changes with the environment. 2. Fitness function. It constitutes the adaptation of the individual in the environment. Individuals with strong adaptability are retained and passed on to future generations, while individuals with low adaptability are eliminated in the process of inheritance. 3. Genetic operators. In general, genetic operations have three methods: selection, crossover, and mutation. (a) Select an operator. The process of selecting good individuals from the current group. It should be noted that selecting an operator does not generate new individuals, only individuals with high fitness. (b) Crossover operator. It mimics the process of genetic recombination in nature and achieves the exchange of genes between different individuals. Inheriting the current gene to the next generation will also produce excellent new individuals.

Droop Control of Microgrid Based on Genetic Optimization Algorithm

61

(c) Mutation operator. Individuals undergo free evolution, but the genes in the body undergo mutations. Moderate variation in the later stages improves the efficiency of local search to prevent maturity from premature convergence. 4. Terminate the loop. To reach the final target value, it is usually selected according to the individual’s optimal fitness value. When the change tends to be stable or meets the formula of the iteration termination, or the number of iterations can be stopped.

3.2 Droop Controller Optimization The microgrid can be regarded as a nonlinear uncertain complex dynamic network. To constrain the stability and electrical parameters of the control system, it is necessary to dynamically optimize the droop controller in order to make the control system realize the reasonable DG power distribution. Related literature studies [10, 11] can minimize the cost function as the optimization target of the droop controller, and the time-weighted absolute error integral can produce the best performance goal. Therefore, the cost function can be designed as: J=

Kf 

(k − K 0 ) · W · |E(k)|

(9)

k=K 0

among them, k For simulation time; K f with K f The start and end times, respectively; W is a weight matrix; E(k) absolute error moment array, defined as: E(k) = [P(k), Q(k), V (k), freq(k)]T

(10)

P(k) with Q(k) They are the error between active and reactive power and actual value. V (k) with freq(k) The voltage and frequency deviations, respectively, indicated. Voltage droop scale coefficient in genetic algorithm scheme m1 , m2 , m3 is set to 0.06, 0.07, 0.08; the frequency droop scale factors n1 , n2 , and n3 are all set to 0.05. Then, the power between each DG is proportionally distributed by the genetic optimization algorithm. In this optimization process, the current value is compared with the previous optimal value, and the genetic optimization algorithm is implemented in the application programming of the C language program. Figure 5 is a block diagram of the optimization system of the genetic algorithm droop controller and finds the optimal parameters through continuous iterative optimization.

62

Y. Tang et al.

Fig. 5 Block diagram of the genetic algorithm droop control system

4 Case Analysis In order to verify the superiority of the proposed strategy, the MATLAB model simulation of the microgrid system is shown in Fig. 6. The model consists of three distributed DGs and three loads, three of which are P1 = 60 kW, Q1 = 10 kVAR, P2 = 70 kW, Q2 = 5 kVAR, P3 = 80 kW, Q3 = 0 kVAR. In the island mode, all DG droop controllers can be operated separately. In order to stabilize the voltage and frequency of the microgrid system, it is necessary to adjust the signals according to the load independently. Shown in Fig. 7 is a single DG simulation diagram. For the power distribution situation, whether the microgrid system is stable or not, the minimum cost function (9) is used to optimize the droop controller of each DG, so as to obtain the optimal parameters. In the simulation process, only the case of the island operation mode is considered, and when the load is unbalanced, the optimum droop control parameter can be obtained by adjusting itself. Figures 8 and 9 show the simulation waveform results of the microgrid system operation. As can be seen from Fig. 9, the 0–0.5 s system operates normally, the voltage is maintained at 311 V, and the frequency is 50 Hz. Different DG active powers are distributed according to the ratio of 8:7:6, and the reactive power is equally divided. After 0.5 s is disconnected from the load 2, under the condition that the droop controller is optimized, the voltage and frequency fluctuate and continue to maintain stability, and the effect of active and reactive power distribution is obvious. It can be seen that the active and reactive power control performance is stable due to the optimization using the genetic algorithm.

Droop Control of Microgrid Based on Genetic Optimization Algorithm

Fig. 6 Microgrid system simulation model

Fig. 7 Single DG simulation model

63

Y. Tang et al. 313

50.8

Voltage/V

Frequency/HZ

64

50.6 50.4 50.2

312 311 310 309

50 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

1

0.9

0

0.1

0.2

0.3

0.4

Time/S

0.5

0.6

0.7

0.8

0.9

1

0.7

0.8

0.9

1

Time/s

90 70 50 30 10 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time/S

Acve power/Kvar

Reacve power/KW

Fig. 8 Measurement of voltage and frequency

15 10 5 0 -5 0

0.1

0.2

0.3

0.4

0.5

0.6

Time/S

Fig. 9 Active and reactive power measurement

5 Conclusion In this paper, the genetic algorithm is used to optimize the microgrid droop controller, and according to the load feedback situation, the drooping parameters can be collated in time. The parametric controller after parameter optimization has improved the performance of power distribution, and the microgrid is well solved. The power imbalance between multiple DGs in the system causes the voltage and frequency of the microgrid to adjust independently and reach a steady state again. It can also ensure the normal operation of the power supply system in the event of a sudden load change in the power system. Improve the anti-interference ability of the entire system. Acknowledgements Fund Project: Provincial Natural Science Fund-Provincial and Municipal Joint Fund Project (2019jj60042); Collaborative Innovation and Guidance Fund Project for Wind Power Equipment and Power Conversion (02019/03002).

References 1. Liang, H.F., Zheng, C., Gao, Y.J., et al.: Research on improved droop control strategy of microgrid. Proc. CSEE 17, 24–33 + 332 (2017) 2. Zhu, Z.B., Huang, S.P., Li, Z.X.: Research on droop control strategy of island-type microgrid parallel inverter. Power Syst. Autom. J., 1–7 (2019) 3. Li, H.J., Wang, J., Sun, Z., et al.: A droop controller that improves the accuracy of reactive power sharing. Electric Drive 49(06), 69–72 (2019)

Droop Control of Microgrid Based on Genetic Optimization Algorithm

65

4. Sun, Y., Hou, X., Yang, J., et al.: New perspectives on droop control in AC MicroGrid. IEEE Trans. Ind. Electron., 1–1 (2017) 5. Yao, W., Chen, M., Matas, J., et al.: Design and analysis of the droop control method for parallel inverters considering the impact of the complex impedance on the power sharing. IEEE Trans. Ind. Electron. 58(2), 0–588 (2011) 6. Sun, X.F., Li, H.H.: Dual mode droop control of inverter. Proc. CSEE 36(2), 507–515 (2016) 7. Cao, Y.Z.: Research on microgrid inverter control strategy based on virtual synchronous generator. Hefei University of Technology (2017) 8. Zhang, Z.F.: Research on droop control strategy of microgrid inverter. Nanjing University of Aeronautics and Astronautics (2013) 9. Li, Y., Yuan, H.Y., Yu, J.Q., Zhang, G.W., Liu, K.A.: Review of the application of genetic algorithm in optimization problems. Shandong Ind. Technol. 12 (2019) 10. Yan, C., Li, M.Z., Zhou, W.: Application of improved genetic algorithm in function optimization. In: Comput. Appl. Res. 10 (2019) 11. Qi, N.M., Song, Z.G., Qin, C.M.: Setting of fractional order PID parameters based on optimal oustaloup. Control Eng. 19(2), 283–285 (2012)

Research and Implementation of a Remote Monitoring Platform for Antarctic Greenhouse Kaiyan Lin, Chang Liu, Junhui Wu, Jie Chen, and Huiping Si

Abstract In response to the weak environmental infrastructure of Antarctic greenhouses, the inability to automate operation and low reliability, a remote monitoring platform for the Antarctic greenhouse was developed, which integrates functions such as database management, image acquisition and remote data communication. An infrared high-resolution and high-speed digital camera was used in the greenhouses and with its cradle head; it is convenient to monitor the scene in 360°. The monitory software was developed using the SDK provided by the manufacturer to realize the functions of image displaying, capturing and console control. Furthermore, a communication software module was developed to transfer operational data and image files from Antarctic greenhouse to data center in Shanghai, China. The entity–relationship model was adopted for database designing, and the SQL Server database was used for data storing. And after a common communication protocol was studied for transferring database tables and image files, a flow chart of communication was designed, and separate threads were used for the transfer of image files to improve the efficiency. Using the socket technology to transfer the operational data and image files to the data center of Shanghai, people could obtain environmental parameters, running status and the information of plant images in the greenhouse. After the system was installed in the greenhouse of the Great Wall Station in Antarctica, it realized the remote monitoring of the crop’s growth in the greenhouse. The operational data showed that the system works stably, and the transmission of data is accurate, providing a guarantee for the operation of the greenhouses in Antarctica. Keywords Antarctic greenhouse · Remote monitoring · Socket · Data communication

K. Lin (B) · C. Liu · J. Wu · J. Chen · H. Si Modern Agricultural Science and Engineering Institute, Tongji University, Shanghai, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_7

67

68

K. Lin et al.

1 Introduction Polar expedition is a feat of human exploration of the earth and is of great significance for promoting sustainable development. The Antarctic region has a special geographical location and poor environmental conditions which covered with snow and ice all year round, leading to being difficult to growth of crops. Furthermore, the vegetable supply of polar examiners has always been a problem. With the approval of the Ministry of Science and Technology, our research team designed and implemented the greenhouses of the Antarctic Zhongshan Station and the Great Wall Station. And, we use technologies such as environmental regulation and remote monitoring to remotely supervise and control the growth of crops. Traditional production greenhouses generally use manual methods to monitor environmental information, which is time consuming and laborious to accurately detect environmental status. In recent years, high-grade greenhouses with high operational requirements are developing toward automation and intelligence [1–6]. Environmental monitoring of greenhouses usually requires measuring temperature, light, water and fertilizer [7, 8]. Wireless sensor network [9, 10], Zigbee technology [11, 12], WiFi technology [13, 14], GPRS [15], etc., are widely used because they do not need wiring. According to the designed protocol, an Agricultural Internet of Things connects the environmental monitoring and control equipment in the agricultural system by network to realize the monitoring of agricultural environmental information [16]. In addition, with the development of Internet technology, it has become a new development direction of storing the collected data information in remote servers [17] and providing users with convenient operation management and data services by the Web services [18] and mobile Internet [19, 20]. On the other hand, video surveillance can provide visual real-time image data of greenhouse environment [21], and it also helps in the management and supervision of the greenhouses. For greenhouse applications, there are methods such as fixed-point monitoring and movable trusses [22]. Due to harsh environmental conditions, weak network infrastructure and lack of professional maintenance, the Antarctic greenhouses must have the capabilities of automation, high reliability and remote monitoring. In this regard, this paper studied and designed a remote monitoring platform for the Antarctic greenhouse environment. Because the greenhouse is small, a monitoring camera was equipped at a fixed point. In addition to real-time monitoring, it can also obtain the images of plant growth at regular intervals. In terms of data services, data cannot be directly stored in the Shanghai data center because of poor network conditions. This paper adopted the mode of “station-level monitoring + remote service.” The station endpoint is equipped with a database which can be operated independently and then uses a communication software to transmit greenhouse operation data and monitoring images to the Shanghai data center for remote monitoring.

Research and Implementation of a Remote Monitoring Platform …

69

2 Remote Monitoring Platform Architecture The designed remote monitoring platform architecture is shown in Fig. 1. In each greenhouse, a controller is connected to the environmental data collector to obtain environmental information such as temperature, humidity, light, CO2 and heating water temperature, which are then sent to a computer for storage. The computer is connected to the network video surveillance camera through a router, which can acquire the images of plant growth in the greenhouse and generate JPG files in real time (or timing). To improve the reliability of data transmission, all sensors and controllers are connected to aviation plugs. The two stations used the computer software developed by us to communicate with the Shanghai data center via satellite communication. Namely, the software transmits the environmental and image information to the Shanghai data center in real time. In the data center of Shanghai in Chinese, the operating status of the greenhouse could be monitored in real time for remote management, maintenance and troubleshooting.

Satellite Communications

Remote monitoring platform

User

Shanghai Data Center

Environmental data collector

Environmental data collector Network camera

Network camera

Computer Greenhouse controller

Network router

HD camera

The Great Wall Station Fig. 1 Scheme of remote monitoring platform

Computer Greenhouse controller

Network router

HD camera

The Zhongshan Station

70

K. Lin et al.

3 Video Surveillance Design A network surveillance camera was installed in the greenhouse to obtain the growth images of the plants and to get the operational information of the device. The camera model is HIKVISION intelligent high-definition (HD) network camera with 360° pan/tilt and up to 5 million pixels. It is a new generation of capture machines that combine video and network technologies, also known as network capture machines. The network capture machine digitizes the transmitted video signal, compresses it efficiently and then transmits it to the client or management server through the network bus. Besides, the authorized users can control the network capture machine to operate the system configuration. The camera adopts H.264 encoded video compression technology to capture frames with JPEG encoding, and the image quality is set as needed. In addition, the SDK dynamic connection library was provided for secondary development.

3.1 Network Camera Physical Connection Method The network camera can be connected to the router as a normal network device and access the computer through the router. If you want to connect directly to your computer, you need to cross the network line (the line order is 1 and 3, 2 and 6 cross). After the connection is completed, we need to configure the device’s IP address, port number, login user name, password and other information. When the configuration is successful, the Ping command should be used to test whether the connected device is normal. If the device is not found, we can use HIKVISION’s device search software to find it.

3.2 Software Connection Method The HIKVISION network camera provides a rich library of dynamic links. This software was developed with C# language, and all functions processing in the camera interface were encapsulated into the CHCNetSDK class. The functions implemented by the monitoring software include real-time image monitoring, image acquisition and pan/tilt control.

Research and Implementation of a Remote Monitoring Platform …

71

4 Software Design 4.1 Database Design The database is a bridge between the medium of system data and communication and is a data warehouse that stored and managed according to the data structure [23]. The system utilized a SQL Server relational database as data storage medium. To monitor different parameters based on different control requirements, the computer automatically obtains information such as light, CO2 , temperature, humidity and water pipe temperature in the greenhouse. On the basis of the control strategy, the water temperature’s adjustment is completed according to the opening degree of the four-way valve of the control pipeline. Light regulation is achieved by controlling the top cover, side cover, sodium lamp, LED lights and other actuators according to such information as light, season and time (polar day or polar night). Then, on the basis of the time control strategy, the tidal irrigation scheme of water and fertilizer has been completed. The entity–relationship diagram (E-R diagram) was abstracted from the Antarctic greenhouse’s application requirements. After listing the main attributes, it was standardized by the requirements of the database paradigm, as shown in Fig. 2. The field parameter table was designed for the field information of the greenhouse; the measurement parameter table is corresponding for the physical quantity information measured by the sensors. Moreover, the measured values of the indoor weather sensor were recorded in the sensor record table. Others, the actuator parameter table recorded the parameters of each actuator (e.g., the heat pump); the Image file

Time control parameter

Measurement parameter list

PK File ID

PK Physical quantity number

Generate date Whether to send FK1 Site number

Physical quantity name Sensitivity Whether to send FK1 Site number

Record ID Actuator number Action moment Action time Whether to send Site number

Site parameter PK Site number Site name Server IP Last communication time FK1 Record ID

Interval control parameter PK Record ID FK1 Actuator number Upper limit Lower limit Termination condition type Whether to send FK2 Site number FK3 Physical quantity number

Fig. 2 Entity–relationship of database

Sensor record PK Record ID FK1 Physical quantity number Record time Value Whether to send FK2 Site number Actuator action record

Actuator parameter PK Actuator number Actuator name Actuator status Whether to send FK1 Site number ...

PK Record ID FK1 Actuator number Action time Operation type Whether to execute Whether to send FK2 Site number

72

K. Lin et al.

actuator action table recorded the execution history of the executing agency; the time control parameters and interval control parameters provided an automatic control strategy for the actuator.

4.2 Communication Protocol Design This paper studied and implemented a general method suitable for all tabular data transmission, which simplified the protocol design and improved the generality. The database of the greenhouse station and data center was consistent, and the records of data tables need to be transmitted. Besides, the tables to be transferred were added to the queue and to be transmitted in turn. In order to facilitate the processing by the receiver, the sender has sent the database’s table name, table’s field set including the primary key and field type information. Due to the low network bandwidth and long response delay, the transmission procedure should cyclically process the data record in the list, and the transmitted record should be set a successful flag after receiving the response, thus improving communication efficiency. The communication protocol is shown in Fig. 3. The data body includes the table name of database, the collection of field name, the content of database record and the file name of image. They all use the same protocol, and the data packet’s encapsulation format is shown in Fig. 3a. After the content to be transmitted was converted into a string according to Table 1, a binary stream was taken as the data body and transmitted according to the following rules. (1) For table name, the character ASCII code of the table name is placed in the data body. (2) As to field information, all field names are encapsulated into one frame of data (as shown in Fig. 3b) for sending. The meaning of the field type is shown in Fig. 3c, in which Bit 7 indicates whether the field is a natural primary key field or not, and then, a record can be uniquely identified by this field, such as the flow number of the item in the parameter table. Besides, Bit 6 represents that one field is a candidate primary key. In a table that lacks a natural primary key, the receiver locates the record based on multiple candidate primary keys. Receiver determines whether the record exists based on the primary key field and decides to execute an “add” or “overwrite” operation. The Bit0–Bit5 (0–63) value indicates the field types such as integers, floats, booleans, dates and so on. After receiving the field information, receiver parses and reads the field’s length, field’s name and field’s type from the data body in turn and associates it with the table name by the table number. (3) For data record transmitting, the data is taken out from database according to the record ID. Then, the conversation is performed according to Table 1 and packed according to Fig. 3d; the encapsulation order and the field name are in the same order, and the receiver parses the field content according to the previously received field information.

Research and Implementation of a Remote Monitoring Platform …

73

Frame Frame length Data body n+3 bytes CRC check End of frame 2bytes (1 byte) header (2 bytes) STX High Low 2-byte 1-byte N byte data body content High Low ETX(03) (02) byte byte data body data body byte 1 byte 2 … byte n byte byte length n type

(a) Protocol format

Field 1

Field 2

Field length Field FL Name 1 FL-2

Table code

Field Field length Field Type FL Name 1 byte 1 byte FL-2

Field Type 1



(b) Field information encapsulation

Bit7

Bit6

Bit5

Bit4

Bit3

Bit2

Bit1

Bit0

Whether the Whether Type of data(0-63) primary key field candidate primary key (c) Field type meaning

Field content 1

Field content 2



Field content

Length 1byte

Length 1byte



Length 1byte

Content

Content

Content

(d) One data record package Fig. 3 Communication protocol

Table 1 Data volume conversion example table Field type

Currency

Integer

Floating point number

Boolean

Date

Conversion

2 decimal places

Integer string

2 decimal places

1-bit character

18-bit string

Example

‘100.00’

‘100’

‘100.35’

‘Y’ or ‘N’

‘2018-01-02 14:15:16’

4.3 Database Form Transfer Process The delivery process of the data table in the data center and the greenhouse are consistent. The data stream is driven by the sender. If there is a record to be transmitted, the sender stores the table name into the table set; as shown in Fig. 4, the transmission process is as follows:

74

K. Lin et al.

Sender

Receiver

Take a table from the table collection

Send Send table name

Answer Send field name collection

Send Answer

Receives the table name and store it in the cache Receive a collection of field names, parse and store the min the cache

Get unsent record primary key collection Take a primary key from the Send collection and get a record based on the primary key to send; after receiving the response, delete it from Answer the key collection

NO

Whether the primary key collection is empty

Receive a record, and obtain a primary key field from the cache to determine whether the corresponding record exists; if it exists, overwrites the record; or not, adds a record

YES

Fig. 4 Sending procedure of data table

(1) The sender takes a table from the table set and sends table name. (2) The receiver receives the table name, stores it in the cache and responds to the sender. (3) After receiving the response, the sender sends a set of field names. (4) The receiver gets the field name set and saves them in the cache with same order and responds to the sender. (5) After receiving the response, the sender firstly takes out the unsent record ID to form a primary key set, from which the sender gets one ID to obtain the transmission data. (6) After receiving the data content, receiver parses the field contents in the order of the field names got in step (4), stores the data according to the table name of step (2) and replies to the sender at the same time. (7) When receiving the response, the sender deletes the ID number in the primary key set and determines whether the set is empty. If it is empty, the table sending procedure is completed and then proceeds to step (1); otherwise, if there is a record waiting to be sent, then go to step (5). Because the bandwidth is narrow and the response delay is relatively long, the sender cyclically gets the ID number in the timer and performs the step (5) to improve the efficiency. In the network socket’s interrupt receiving function, the processing of

Research and Implementation of a Remote Monitoring Platform …

75

step (7) is performed. After the sender sends the message multiple times but does not receive the response from the other party, the sender can enter the exception handling process.

4.4 Socket Communication Design As shown in Fig. 5, after starting the software, a socket is created to listen connecting request according to the specified IP address and service port number. At the same time, the client creates a socket and sends a connection request to the server. When the server detects a connection request, it accepts and puts it in the socket list and then takes one socket from the list and verifies with the client. And then, when the verification is passed, the control parameter information at the server is sent to

Data center server

Greenhouse client

Socket() Listen()

Socket() Connect Connect()

Accept() Send control parameters Receive indoor weather data

Receive control parameters Send indoor weather Data data transmission

Receive actuator operation record

Send actuator operation record Send image file name

Receive image file name Create a thread Socket and listen on another port

Create a thread Thread Socket and connect communication

Receive image data data in thread Socket after accepting

Send image data after connection

Close()

End

Fig. 5 Procedure of remote data transmission

Close()

NO Whether all files have been sent YES

76

K. Lin et al.

the greenhouse client. After that, the greenhouse client uploads indoor environment information, system running record and image data. In turn, the data transmission process is shown in the previous section. For image data, large amounts of data and long transmission time require multiple thread modes to complete data communication. The name of the file is transmitted by the main thread. First, the unsent file name is obtained from the database for transmission. After the transfer is completed, another thread is started for image data transmission. The length of an image data package is limited to 256 bytes, and each package has an ID number. After the data center receives a file name, it creates a file and starts a receiving thread at first. When the receiving thread gets the data packet, it determines the location in the image file by the ID number and writes it in sequence. The client only sends one file during the communication process.

5 System Implementation and Application The installation effect of the video surveillance is shown in Fig. 6a, and the software monitoring interface is shown in Fig. 6b (written in C#.net). The software accesses the network camera through the interface function to monitor the greenhouse in real time. The plant images in the greenhouse are collected periodically by the set parameters, and the image information is transmitted to the data center with communication software. By the monitoring software, the pan/tilt can be rotated to fully grasp the situation of the greenhouse. The function of the remote monitoring software’s platform is shown in Fig. 7. In order to help non-professional operator, several network tools such as Ping and Telnet are integrated. The data transmission software’s interface is shown in Fig. 8 (written in Visual C++ 6.0). The greenhouse’s site transmits environmental information and image files to the data center in real time. Since running records and image files are on different threads, the efficiency is improved. On the greenhouse station side, most record

(a) Video camera for greenhouse Fig. 6 Video monitoring

(b) Interface of monitoring software

Research and Implementation of a Remote Monitoring Platform …

77

Antarctic greenhouse remote monitoring platform software Data center communication

Greenhouse station communication

Data transmission process and status display Data retransmission settings Service port management

Data transfer process and status display Data retransmission settings Integrated Ping/Telnet auxiliary tool

Video image monitoring Camera login parameters Storage path management Acquisition interval setting Real-time display, pan/tilt control

Fig. 7 Functions of remote monitoring software

(a) Data center

(b) Greenhouse station

Fig. 8 Remote communication software

data can be re-transmitted (including image data) through parameter settings, which improves reliability and flexibility. Under the condition that the access bandwidth of the Great Wall Station is 56 k and the Shanghai data center is 10M, the test data transmission time is shown in Table 2. Since installation of the system at Great Wall Station, approximately 50,000 environmental records of each parameter and 43,000 images had been generated each year, and all data were accurately transmitted to the data center.

6 Conclusion The environmental regulation of the Antarctic greenhouse faces the problems of harsh environment, unattended situation and weak network infrastructure. The system requires the function of real-time remote monitoring, high reliability and fault

78 Table 2 Data transfer time

K. Lin et al. Table name

Number of records

Time used (s)

Measurement parameter list

100

19.6

Sensor record

100

18.9

Actuator parameter list

100

24.3

Actuator action record

100

26.4

Interval control parameter

10

6.5

Time control parameter

10

7.2

Image file name

100

10.1

Image file (420 K)

1

34.2

tolerance. This paper studied and designed a remote monitoring platform. On one hand, a video surveillance camera was installed at the greenhouse station to monitor crop growth in real time; on the other hand, with the control of the pan/tilt, people could fully grasp the situation in the greenhouse, which is suitable for equipment maintenance and remote guidance. The software of data transmission was designed with socket connection for narrowband transmission requirements. Then, system running data and image files were transmitted to the Shanghai (in China) data center by the software. In the data center, we could fully master the environmental parameters, operation status of the equipment and image information in the greenhouse. Since the system was installed and operated at the Great Wall Station, all data were reliably transmitted to the Shanghai data center. The practical application showed that the system is stable and reliable, providing technical support for the vegetable supply of the members of Antarctic research team. It also provided methods and experience for remote data and image file transmission in the greenhouses in extreme environments and under-bandwidth. Acknowledgements This work was supported by Science and Technology Support Project of the Ministry of Science and Technology of China (Project No. 2014BAD05B05).

References 1. Li, P., Wang, J.: Research progress of intelligent management for greenhouse environment information. Trans. Chin. Soc. Agric. Mach. 45(4), 236–243 (2014). (in Chinese) 2. Wang, T., Wu, G., Chen, J., et al.: Integration of solar technology to modern greenhouse in China: current status, challenges and prospect. Renew. Sustain. Energy Rev. 70, 1178–1188 (2017) 3. Ma, D., Carpenter, N., Maki, H., Rehman, T.U., Tuinstra, M.R., Jin, J.: Greenhouse environment modeling and simulation for microclimate control. Comput. Electron. Agric. 162, 134–142 (2019)

Research and Implementation of a Remote Monitoring Platform …

79

4. Jin, X., Fang, D., Yuhui, X.: Wireless power supply technology for uniform magnetic field of intelligent greenhouse sensors. Comput. Electron. Agric. 156, 203–208 (2019) 5. Tang, Y., Jia, M., Mei, Y., et al.: 3D intelligent supplement light illumination using hybrid sunlight and LED for greenhouse plants. Optik 183, 367–374 (2019) 6. NISHINA, H.: Development of speaking plant approach technique for intelligent greenhouse. Agric. Agric. Sci. Procedia 3, 9–13 (2015) 7. Sagrado, J., Sanchez, J.A., Rodriguez, F.: Bayesian networks for greenhouse temperature control. J. Appl. Logic 17, 25–35 (2016) 8. Xin, W., Yu, W., Yuanyuan, Z.: Intelligent gateway for heterogeneous networks environment in remote monitoring of greenhouse facility information collection. IFAC-Pap. OnLine 51(17), 217–222 (2018) 9. Jianing, W., Xintao, N., Ziming, X., et al.: Monitoring system for CO2 concentration in greenhouse based on wireless sensor network. Trans. Chin. Soc. Agric. Mach. 48(7), 280–285 (2017) (in Chinese) 10. Akkas, M.A., Sokullu, R.: An IoT-based greenhouse monitoring system with Micaz motes. Procedia Comput. Sci. 113, 603–608 (2017) 11. Qiuchan, B., Chunxia. J.: The remote monitoring system of vegetable greenhouse. In: 2017 10th International Symposium on Computational Intelligence and Design (ISCID), pp. 64–67 (2018) 12. Meng, Z., Junlong, F.: Yu, H.: Design on remote monitoring and control system for greenhouse group based on ZigBee and internet. Trans. Chin. Soc. Agric. Eng. 29(z1), 171–176 (2013). (in Chinese) 13. Meihui, L., Yaofeng, H.: Greenhouse environment dynamic monitoring system based on WIFI. IFAC Pap. OnLine 51(17), 736–740 (2018) 14. Taha, F.M.A., Osman, A.A.: A design of a remote greenhouse monitoring and controlling system based on internet of things. In: 2018 International Conference on Computer, Control, Electrical, and Electronics Engineering (ICCCEEE), pp. 1–6 (2018) 15. Kabalci, Y., Kabalci, E.: Design and implementation of a solar plant and irrigation system with remote monitoring and remote control infrastructures. Sol. Energy 139, 506–517 (2016) 16. Liao, J.S.: Design of agricultural greenhouse environment monitoring system based on internet of thing. Trans. Chin. Soc. Agric. Eng. 32(11), 233–243 (2016). (in Chinese) 17. Xingyu, T., Chao, M., Fangyun, X., et al.: Greenhouse gas emission monitoring system for manufacturing prefabricated components. Autom. Constr. 93, 361–374 (2018) 18. Bajer, L., Krejcar, O.: Design and realization of low cost control for greenhouse environment with remote control. IFAC-Pap. OnLine 48(4), 368–373 (2015) 19. Yalei, W., Lijun, Q., Hao, Z.: Design and experiment of remote intelligent spray control system based on embedded internet. Trans. Chin. Soc. Agric. Eng. 34(20), 28–35 (2018). (in Chinese) 20. Shangfeng, D., Yaofeng, H., Meihui, L.: Greenhouse environment network control system. Trans. Chin. Soc. Agric. Mach. 48, 296–301 (2017). (in Chinese) 21. Zhao, C., Qu, L., Chen, M.: Design of ZigBee-based greenhouse environmental monitoring image sensor node. Trans. Chin. Soc. Agric. Mach. 43(11), 192–196 (2012). (in Chinese) 22. Han, W., Cui, L., Chen, W., Li, M., Wu, P.: Design of movable remote crop monitoring system on fixed truss. Trans. Chin. Soc. Agric. Eng. 30(13), 160–168 (2014). (in Chinese) 23. Yingjie, W., Jianjun, L., Xiang, H.: Design and realization of rock salt gas storage database management system based on SQL Serve. Petroleum 4(4), 466–472 (2018)

Application Research in DC Charging Pile of Full-Bridge DC–DC Converter Based on Fuzzy Control Binjun Cai, Tao Xiang and Tanxin Li

Abstract In order to get more stable output voltage and current of DC charging pile. According to phase-shifted full-bridge DC–DC converter, we design a fuzzy selfturning PI controller in the voltage outer loop. According to mathematical modeling of small signals, we build the simulating model of its control system and make simulating analysis in Simulink. The simulation results show that output voltage and current waveform of DC–DC converter with this control method are more stable. It is conducive to prolong the life of batteries. Keywords Fuzzy control · DC charging pile · Phase-shifted full-bridge · DC–DC · Simulation

1 Introduction With the development of society, people’s demand for new energy vehicles is increasing. The research on electric vehicle charging pile technology is the prerequisite for the promotion of electric vehicle industry. At present, LLC resonant circuit and phase-shifted full-bridge circuit are the main DC–DC converters [1]. Although the phase-shifting full-bridge DC–DC converter designed in the literature [2, 3] can meet the daily use, the output waveform is still unstable. This affects battery life. To solve this problem, this paper proposes a phase-shifting full-bridge DC–DC converter based on fuzzy control, which can make the output have a strong stability. Therefore, this paper studies and designs the phase-shifting full-bridge DC–DC converter based on fuzzy control.

B. Cai (B) · T. Xiang Hunan Institute of Engineering, 411104 Xiangtan, People’s Republic of China e-mail: [email protected] T. Li Shenzhen Energy Group Nanjing Energy Holdings Co. Ltd, 211200 Nanjing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_8

81

82

B. Cai et al.

Power grid input

Three phase PFC

Charge point control unit

Part DC-DC

Metering and billing unit

Charging cable

humancomputer interacƟon

Charging connector

Power baƩery electric vehicle

Control system power supply

Fig. 1 Control block diagram of DC charging pile

2 DC–DC Circuit Topology of Phase-Shifted Full-Bridge for DC Charging Post 2.1 Control Principle of DC Charging Pile Figure 1 is the control schematic diagram of DC charging pile. The control unit processes and controls the opening and closing of the three-phase PFC and the switch tube of the post DC–DC part, so as to realize the input of electric energy from the grid side and then transmit it to the charging connector through the charging cable to charge the battery of the new energy vehicle [4–6].

2.2 Phase-Shifted Full-Bridge DC–DC Circuit Topology The full-bridge inverter and the full-bridge rectifier constitute the basic DC–DC fullbridge converter [7]. The topology of the DC–DC full-bridge converter is shown in Fig. 2. U in is the input DC voltage, Q1 –Q4 are switches, Do1 –Do4 are diodes in parallel on each switch, which play the role of the continuous current. As shown in the figure, Q1 and Q4 form one bridge arm, Q2 and Q3 form another bridge arm, T is a high-frequency transformer, and the output side of the secondary side of the transformer is a full-bridge rectifier circuit composed of four diodes. Finally, the output filter circuit is composed of LC as the final load output terminal.

Application Research in DC Charging Pile of Full-Bridge …

Do1

D1

Do2 C1 Q2

Q1

83

D2

C L0

C2 T

Uin

A

C

in

Q4

R0

C0

B Do3

Do4

D4

U0

D3

C3

C4 Q3

D

Fig. 2 Phase-shifted full-bridge DC–DC circuit topology

L

dV0 /D2 1:D

Vs

dV0 /R

C

R

V0

Fig. 3 Small unified circuit model of buck circuit

3 Small-Signal Model of DC–DC Circuit 3.1 The Unified Circuit Model of Buck Circuit We find that there are many working state equations of phase-shifting full-bridge circuit directly listed, and the solution of space-state equation is complex, so we first start with simple buck circuit and then solve the full-bridge circuit. First, we establish a unified circuit model of the buck circuit, as shown in Fig. 3. D in the figure is the steady-state amount of the duty cycle D of the circuit,V s , d is the AC disturbance of the input voltage V s and duty cycle d.

3.2 Small-Signal Model of Phase-Shifted Full-Bridge DC–DC Circuit In the phase-shifting full-bridge circuit, there is a problem that the secondary duty cycle is lost, so the lost duty cycle should be considered in the calculation. The duty cycle of the secondary side of the voltage transformer is Df , and the duty cycle of

84

B. Cai et al.

the primary side of the transformer is Dy , Then, the secondary duty cycle can be expressed as follows: D f = Dy −

4L r I0 f s K Vs

(1)

In the formula, L r is the resonance inductance, K is the original side-to-side ratio, I 0 is the output current (filter inductance current), f s is the switching frequency, and V in is the input voltage. By analyzing the formula, we know that the larger the resonance inductance is, the larger the loss of duty cycle is; the lower the input voltage is, the greater the duty cycle loss is; the greater the filter inductance current is, the greater the duty cycle loss is; the greater the switch frequency is, the greater the duty cycle loss is. If we consider the small signal disturbance of the secondary duty cycle and other small signal disturbances that affect it, we can express the small signal disturbance of the secondary duty cycle by the following formula: df =d −

4L r f s I L 4L r I L f s u in + K Vs Vs2

(2)

From left to right, the disturbance of D, I L , and V s to the right of the equation is the disturbance of the duty cycle of the secondary side. According to the above analysis, draw the small-signal model diagram of the phase-shift full-bridge DC–DC circuit, and then, you can get the small-signal model of the phase-shift full-bridge circuit as shown in Fig. 4. According to the figure above, the transfer function of duty cycle disturbance d(s) of phase-shifted full-bridge DC–DC circuit to output current i 0 (s) is calculated as follows:  i 0 (s)  N Vs (RCs + 1) (3) = G id (s) =  2 L RCs + (L + 4L r N 2 RC f s )s + 4L r N 2 f s + R d(s)  u s (s)=0

Fig. 4 Phase-shifted full-bridge small-signal model

Application Research in DC Charging Pile of Full-Bridge …

85

Ku

K uU 0 ( s ) U ref (s )

Vu (s )

-

PIu

+

Eu (s )

+

-

d (s)

Vi (s )

Ei (s) PIi

Gm(s)

Gid(s)

Gui(s)

U 0 (s)

K i I 0 ( s)

I 0 (s)

Ki

Fig. 5 Phase-shifted full-bridge DC–DC circuit control strategy

where R, L, and C are, respectively, the load, filter inductance, and filter capacitance in the output filter circuit; N is the reciprocal of the original side-to-side ratio K of the transformer; L r is the primary resonance inductance.

4 Design of Fuzzy Self-tuning PI Controller 4.1 Circuit Control Strategy In this paper, the double closed-loop control strategy of the current inner loop and voltage outer loop is adopted, and the PI controller of outer loop voltage loop is fuzzy self-tuning PI controller; the current inner loop is a conventional PI controller. The double closed-loop control system is shown in Fig. 5. Among them, PIu and PIi are PI controllers of voltage loop and current loop, respectively; K u and K i are feedback coefficients of voltage loop and current loop, respectively; G id (s) and G ui (s) are transfer functions of duty cycle disturbance to output current disturbance and output current disturbance to output voltage disturbance, respectively; G m (s) is derivative of carrier amplitude.

4.2 Design of Fuzzy Self-tuning PI Controller The structure of fuzzy self-tuning controller is shown in Fig. 6. The working process of the fuzzy controller can be divided into three stages: fuzziness, the establishment of fuzzy rules, and the solution of fuzziness. In the establishment of fuzzy rules, this paper uses the representation of membership function to represent the fuzzy set representing the input quantity domain. Since the input error is determined by the given reference voltage and the feedback voltage, usually the change range is set to [−25, 25]. Therefore, this paper uses seven subsets of

86

B. Cai et al.

fuzzy controller de (t ) dt

d dt

K pu

U ref

+

-

K uU 0

K Iu

PI

object

e (t )

Fig. 6 Structure diagram of fuzzy self-tuning controller

the fuzzy set to represent the input error, which can make the fuzzy controller more sensitive to the change of the input error, so as to more accurately correct the output parameters. The following sets are used to represent the input error amount: e(t) = {NB, NM, NS, ZE, PS, PM, PB}

(4)

In the above formula, the subsets in the set represent from left to right: −large, −medium, −small, zero, +small, +medium, +large. So, we can build a fuzzy rule base, which is obtained by using fuzzy conditions. In some cases, when the input fuzzy subset is certain, we want to output the fuzzy subset set. In order to quickly and accurately correct the output coefficient when the output voltage and current change greatly, this paper adopts a more reasonable and accurate fuzzy rule as shown in Tables 1 and 2. Table 1 Fuzzy rule of K pu Ece

NB

NM

NS

ZE

PS

PM

PB

NB

PB

PB

PB

ZE

NB

NM

NS

NM

PB

PB

PM

ZE

NM

NS

ZE

NS

PB

PM

PM

ZE

NS

ZE

PS

ZO

PB

PM

PS

ZE

PS

PM

PB

PS

PS

ZE

NS

ZE

PM

PB

PB

PM

ZE

NS

NM

ZE

PM

PB

PB

PB

NS

NM

NB

ZE

PB

PB

PB

Application Research in DC Charging Pile of Full-Bridge …

87

Table 2 Fuzzy rule of K iu Ece

NB

NM

NS

ZE

PS

PM

PB

NB

PB

PB

PB

ZE

NB

NB

NB

NM

PB

PB

PM

ZE

NB

NB

NM

NS

PB

PM

PS

ZE

NB

NM

NS

ZO

PB

PM

PS

ZE

PS

PS

PB

PS

NS

NM

NB

ZE

PS

PM

PB

PM

NM

NB

NB

ZE

PM

PB

PB

PB

NB

NB

NB

ZE

PB

PB

PB

5 Simulation Study 5.1 Modeling of Phase-Shifted Full-Bridge DC–DC Converter The main circuit model of the 15 KW phase-shifting full-bridge DC–DC converter is shown in Fig. 7, in which the input voltage is DC 700 V, the resonance capacitance is 0.667 µF, and the resonance inductance and the primary side leakage inductance of the transformer are 30 µH in total. The size of the isolation capacitance is 30 µF, the ratio of the primary side to the secondary side of the high-frequency transformer is 500:1000, the frequency is 25 kHz, and the period is seconds, the filter inductance at the output side is 672 µH, and the value of the filter capacitance is 300 µF. The output voltage reference value is set to a constant maximum value of 750 V for convenient detection.

m

+

k

i0

a

a

-

m

k

m

[Io] D2

D1

E

i

+

g

+ E

L0 C2

2

C1 m

+

1

+ C

From1 g

[B]

From C

[A]

+

+

+ +

+

Lr

1

2

C0

[C]

From3

From2 k

m

k

D3

D4 a

a

E

C3

Fig. 7 Circuit simulation model

v

[Vo] u0

m

+

g

C

4 m

E

m

Linear Transformer

+

C

g

[D]

C4

R0 + -

Vs

3

+

Cr

88

B. Cai et al.

The control method adopted in this paper is phase-shifting control, and the control strategy is double closed-loop control strategy of the current inner loop and voltage outer loop. In this paper, the traditional current PI controller and the traditional voltage PI controller are used to run the simulation circuit diagram; then, the fuzzy self-tuning voltage PI controller is used to replace the traditional voltage PI controller, and the second simulation is carried out. The circuit simulation with traditional PI control is shown in Fig. 8. Then, the traditional PI controller of voltage loop in Fig. 8 is replaced by fuzzy PI controller. The simulation of the built fuzzy self-tuning PI control sub-module is shown in Fig. 9. [A]

Scope4

A zo

G1

-1

[B]

To w1

B [C]

1

Scope7 Ts1

C

Constant9

[D]

To w2

1

D

t2

x

Product3

2.2

S1

1e-6 ti

Saturation3

Scope8

PIDi

Scope1

PIDu

Step1

PI(s)

PI(s)

u0

From5 Scope11

1

Constant5

[Vo]

[Io]

Scope9

Fig. 8 Dual closed-loop control sub-module

Scope25 Scope20

-KKpu

-K1 s

KIu

1/s

Scope22

1

Scope16

Out1

[in]

Add

Product1

From12

-KScope23 Gain2

0

s1

du/dt

Fuzzy Logic Controller

ec

Product4

Add1

Add2

Scope24 Scope26 Scope12

Fig. 9 Fuzzy self-tuning PI controller simulation module

Scope27

Scope21

Application Research in DC Charging Pile of Full-Bridge …

89

5.2 Simulation Analysis Firstly, the voltage and current double closed-loop control mode system of traditional PI controller is simulated, and the voltage output waveform when the output voltage is 750 V is obtained as shown in Fig. 10. Then, the system using fuzzy self-tuning PI double closed-loop control value is simulated, and the waveform when the output voltage is 750 V is obtained as shown in Fig. 11. Through comparison, it is found that the former has slight oscillation and unstable waveform, and there are many zigzag harmonic components in the middle; the latter has no oscillation basically, and the waveform is more stable. From the above comparison and analysis, it can be concluded that the output waveform obtained by using the double closed-loop control mode of fuzzy selftuning PI controller is more accurate, the dynamic response is faster, and the voltage stabilizing accuracy and current stabilizing accuracy are very high. Because the waveform obtained in the simulation basically meets the requirements, the design and research of phase-shifting full-bridge DC–DC converter in this paper have reached a very good level. At the same time, Figs. 12 and 13 show that the fuzzy self-tuning PI controller is better than the traditional PI control in the actual control.

Fig. 10 Traditional PI output voltage

Fig. 11 Output voltage of fuzzy PI

90

B. Cai et al.

Fig. 12 Traditional PI output current

Fig. 13 Output current of fuzzy PI

6 Conclusion This paper mainly focuses on the theoretical research of DC–DC converter with fullbridge and phase-shifting after DC charging pile of new energy vehicles. The phaseshifting full-bridge DC–DC converter has a wide range of adjustable voltage and a small voltage and current stress, which is suitable for medium- and high-power DC charging occasions. The control mode adopts the double closed-loop control mode which combines the traditional PI with the fuzzy self-tuning PI, which makes the output of the DC–DC converter of the new energy vehicle more stable and accurate. Acknowledgements Project, 61473314, 51875193, supported by SFC/Project, 18A348, 2018JJ4045 Supported by PSFC.

Application Research in DC Charging Pile of Full-Bridge …

91

References 1. Zhao, H.Y.: Research on full bridge three-level LLC resonant converter with charging post. Hunan University of Technology (2016) 2. Song, J.: Design of double closed loop control system for phase shifted full bridge DC/DC converter. Electron. Des. Eng. 18(1), 84–85 (2010) 3. Li, S.Y.: Design of 75 kW phase shifted full bridge ZVS DC/DC converter. Harbin University of Technology (2015) 4. Pan, I., Das, S., Gupta, A.: Tuning of an optimal fuzzy PID controller with Stochastic algorithms for networked control systems with random time delay. ISA Trans. 50(1), 28–36 (2011) 5. Cheng, Q.J.: Research and application of fuzzy self-tuning PID controller. Master’s thesis of Xi’an University of Technology (2016) 6. Ma, J.J., Wang, Q.Y., Yin, Y.H., Zhang, Y.Y., Lang, Y.F., Ge, X.: Digital research of synchronous buck circuit based on small signal model. Exp. Technol. Manag. 2018(2), 45–49 (2018) 7. Shen, Y.Q., Yao, G., He, X.N.: Analysis of characteristics of phase-shifting full bridge DC/DC converter with isolated DC capacitor. Power Electron. Technol. 39(3), 11–13 (2005)

Performance Analysis of Multi-user Chaos Measurement and Control System Lili Xiao, Guixin Xuan and Yongbin Wu

Abstract In order to solve the problem of multiple access interference in spread spectrum measurement and control, the advantages of chaotic sequence as spread spectrum sequence are discussed, and the performance of chaotic measurement and control system under multiple users is analyzed. Simulation results show that chaos sequences are superior to M sequences and Gold sequences in multi-access applications. Keywords Chaotic sequence · Multiaddressing interference · Error rate

1 Introduction In spread spectrum measurement and control, the performance of measurement and control mainly depends on pseudo-code. At present, the spread spectrum codes used in the spread spectrum measurement and control system mainly include M sequence and Gold sequence. However, M sequences and Gold sequences have the disadvantages of low complexity, low confidentiality and inflexible code length. In multi-target measurement and control, the number of M sequences available is very small, and the Gold sequence is sufficient, but the related performance is not ideal. Therefore, seeking new spread spectrum codes to improve the performance of measurement and control has become a hot research topic [1–3]. In recent years, with the continuous maturity of nonlinear theory and chaos theory, the sensitive dependence of chaotic sequences on initial values can provide a large number of non-correlated, noise-like

L. Xiao (B) Communication NCO Academy, Army Engineering University of PLA, Chongqing, China e-mail: [email protected] G. Xuan Chongqing University, Chongqing, China Y. Wu Chongqing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_9

93

94

L. Xiao et al.

signals and determine regeneration. The use of chaotic code for secure communication has become a hot topic in theoretical research and engineering application in the field of communication at home and abroad [4–6]. For CDMA systems, due to the inability to fully orthogonal code characters, the capacity and performance of the system are limited by multiple access interference, and there is a correlation between users, resulting in multiple access interference [6]. This paper analyzes several factors that affect multiple access communication.

2 Analysis of the Performance of Chaotic Spread Spectrum System Against Multiple Access Interference Multiple access interference is the main factor that affects the performance of spread spectrum measurement and control system. Due to its extreme sensitivity to initial values, chaotic sequences have been well applied in multiple address communications [9–11].

2.1 Effect of Different SNR on the BER of the System Since the autocorrelation and correlation values of Chebyshev, improved logistic, logistic and tent chaotic maps basically satisfy the Gaussian distribution, their probability statistical characteristics are consistent with Gaussian white noise, and the mean and variance are [7, 8]: μ = 0, δ 2 =

1 N

(2.1)

Since the mean of the logic sequence is 1/2, after the sequence is subtracted by 1/2, the mean is also 0. In multi-user applications where the channel is Gaussian white noise, the demodulate expression for the first user can be derived as Y (t) =

K  1 2 1 A a1 (t)T Rx1 (0) + A2 T Vi (t) + AVn (t) 2 2 i=2

(2.2)

In the formula: The first item is the demodulation signal of user 1, the second item is the interference signal (MAI) of other users to user 1, and the third item is the Gaussian white noise interference signal, where

Performance Analysis of Multi-user Chaos Measurement …

95

T Vn (t) =

n(t)x1 (t) cos ω0 tdt

(2.3)

0

It is difficult to give the exact results of the correlation between the chaotic frequency spread sequence and Gaussian white noise. However, because the chaotic frequency spread sequence and noise are statistically independent, its maximum statistical characteristics can be obtained as follows.  T Rn (0)Rx (0)dt = Rn (0)Rx (0)T (2.4) μVn = 0 δV2 n = 0

Among them, Rx (0) is the autocorrelation value of the chaotic extended frequency sequence at a correlation interval of zero, and Rn (0) is the autocorrelation value of Gaussian white noise at a correlation interval of zero. Therefore, for Gaussian white noise with a bilateral power spectral density of N0 /2 N0 = δn2 2

(2.5)

N0 Rx (0)T 2

(2.6)

Rn (0) = So δV2 n =

Therefore, the signal-to-noise ratio after deconcentration is 

S N

 = out

1 N0 2E b

+ (K − 1)



δVn Rx1 (0)

2 =

1 N0 2E b

+

K −1 N

(2.7)

Of which Eb =

1 2 2 A Rx1 (0)T 4

(2.8)

Therefore, the BER formula for BPSK or QPSK under ideal conditions is  Pe = Q



1 N0 2E

+

K −1 N

(2.9)

In the formula, N is the code length, K is the number of users in the system, and N 0 is the bilateral power spectral density of white noise. The research shows that the above chaotic sequence BER performance is comparable. When the system SNR is small, it is mainly noise effect. Chebyshev sequence BER performance is the

96

L. Xiao et al.

best. When the system SNR is relatively high, the main influence is multiple access interference. At this time, the logic sequence BER performance is the best. In order to compare the relationship between the error rate and the signal-tonoise ratio of the chaotic sequence and the Gold sequence in the case of multi-user applications, we take 12 users with sequence lengths of 1023 and 2047 for simulation respectively. The purpose is to compare the Gold sequence and the improved Logistic Chaotic Sequences in Multi-user Spread Spectrum System with BER and E b /N 0 . The simulation results are shown in Fig. 1. Fig. 1 Code length is 1023, 2047, error rate of multi-user spread spectrum system

Pe(1023)

10 0

10 -1

-2 Pe 10

10 -3 Gold Chaotic 10 -10

-8

-6

-4

-2

0

2

4

6

8

10

Eb/N0 (a) Code length is 1023, error rate of multi-user spread spectrum system 2047

100

10-1

Pe 10-2

10-3

10-4 -10

chaotic Gold

-8

-6

-4

-2

0

2

4

6

8

10

Eb/N0 (b) Code length is 2047, error rate of multi-user spread spectrum system

Performance Analysis of Multi-user Chaos Measurement …

97

As can be seen from Fig. 1, the error rate of the improved logic chaotic sequence spread frequency is comparable to the BER performance of the Gold sequence in the same code length and the same number of users. However, with the increase of code length, chaotic sequences have better error performance than Gold sequences when applied to multiple users.

2.2 Effect of Spread Frequency Sequence Length on System BER Performance We know that the ability of the spread spectrum system to resist interference depends mainly on the spread spectrum gain. The spread gain expression is [7] GP =

WR TB = WB TC

(2.10)

Among them, WR is the RF bandwidth of the spread signal and WB is the bandwidth of the baseband signal. TC is the code time of the spread spectrum pseudo-code, and TB is the width of the baseband code element. In a general spread spectrum application, we take a baseband code element containing a pseudo-code period, TB = N TC (in the case of pseudo-code ranging, this requirement is not necessarily met). However, in our discussion, we all assume that TB = N TC , the spread spectrum gain at this time can be expressed as GP = N

(2.11)

Since the sequence and Gold sequence are periodic sequences, the length of the intercepted sequence has the same effect on the system error rate in the case of the same length of each frame simulation step. The chaotic sequence is a non-periodic sequence. When the length of the intercepted sequence is different, the influence on the error rate of the system is different. In general, as the length of the sequence increases, the bit error rate decreases, and with the increase of the length, the influence on the bit error rate gradually decreases, but it is better than the sequence and Gold sequence. When the sequence lengths are the same (between 0 and 1050), the bit error rates of the various chaotic mapping systems are not much different, but when the sequence length is between 1050 and 2600, the tent system has the largest bit error rate, the Logistic system is second, the bit error rate of the Chebyshev system is third, and the improved Logistic system is the smallest. Note that when the Chebyshev mapping is at N = 1000 and 2200, the logistic mapping mutates at N = 1100 and 2700, which is mainly due to the sequence interception that affects the related characteristics of the chaotic mapping.

98

L. Xiao et al.

Fig. 2 Relationship between the error rate and the sequence length in multi-user application of improved logisitc spread spectrum system

We simulated the relationship between the error rate and the sequence length of the modified logic sequence as the spread spectrum code and the number of users of the multi-user spread spectrum system. The channel is Gaussian white noise, and the signal-to-noise ratio (E b /N0 ) is fixed 3 dB. The simulation results are shown in Fig. 2.

2.3 Effect of Number of Users on System Error Rate Because the user address code can not be completely orthogonal, with the increase of the number of users, multiple access interference becomes more and more serious (Fig. 3). Fig. 3 The impact of the number of users on the system bit error rate

Performance Analysis of Multi-user Chaos Measurement … Fig. 4 Relationship between error rate and number of users in the improved logic spread spectrum system

99

-1

10

Improved logistic

Pe -2

10

-3

10

-4

10 5

15

10

20

number of users

From the literature [6], it can be seen that with the increase of the number of users, the error rate of the spread spectrum system of the chaotic sequence spread code is gentle, but it is better than the M sequence and Gold sequence, which plays a major role in the influence of multiple access interference on system performance of CDMA system is very important. Because spread spectrum codes as user address information cannot be ideally autocorrelation and cross-correlation, because different users occupy the same frequency band, when multiple users in the same cell communicate at the same time, each user inevitably unlocks the useful signal while unwinding the local useful signal, but also unlocks the useless signal of other users, which causes interference to the useful signal. When this kind of interference is to a certain extent, the error rate of system data will increase dramatically, which will seriously affect the communication between the two sides. In the simulation, the influence of the number of users on the error rate of the system is different when the chaotic sequence of different lengths is used by multiple users. When the length of the sequence exceeds 1023, the system error rate does not change significantly with the increase of the number of users. When the length of the sequence is less than 31, the error rate of the system changes significantly with the number of users. Taking the improved logistic sequence as an example, the length of the extended frequency sequence is 31, and the signal-to-noise ratio (E b /N0 ) is 10 dB. The relationship between the simulated system error rate and the increase in the number of users is shown in Fig. 4. It can be seen from the figure that when the code length is 31, the error rate of the system changes significantly with the increase of the number of users.

3 Conclusions Chaos code has the necessary performance of spread spectrum control code but also has the advantages of confidentiality and multi-access interference. Different SNR, the length of sequence and the number of users have different influences on the error

100

L. Xiao et al.

rate of the system. The analysis shows that chaos sequences are superior to traditional M sequences and Gold sequences in multi-access applications.

References 1. Gao, M.: Study on chaotic frequency propagation sequence. Science and Technology Innovation Report NO. 26 (2009) 2. Zhang, X.F., Fan, J.L.: An improved chaotic sequence generation method. In: The Practice and Understanding of Mathematics vol. 39(18) (2009) 3. Yang, B., Guo, L.L.: Optimization of logic-map sequence in parallel combination spread frequency communication. Ship Electron. Eng. 26(6) (2006) 4. Yang, L.F.: Chaos synchronization and its application in secure communication. Jiangnan University. Master’s degree thesis (2006) 5. Single beam. Study on some synchronization methods of chaotic systems. Nanjing University of Technology. Doctoral degree thesis (2006) 6. Zhou, J.Z.: Research on multiuser chaotic spread spectrum communication system. Master’s thesis of Central South University (2007) 7. Tian, R.C.: Spread Spectrum Communication. Tsinghua University Publishing House (2017) 8. Li, H.: Chaos Digital Communication. Tsinghua University Publishing House (2015) 9. Lawrance, A.J.: Chaos communication performance analysis: taking advantage of statistical theory. In: Communication Systems, Networks and Digital Signal Processing, 2008 (CNSDSP08), Graz, Austria. IEEE, New York (2015) 10. Abel, A., Schwarz, W., Gˇotz, M.: Noise performance of chaotic communication system. IEEE Trans. Circuits Syst. I(47), 1726–1732 (2016) 11. Heidari-Bateni, G.: A chaotic direct sequence spread-spectrum communication system. IEEE Trans. Commun. 42(2), 1524–1527 (1994)

Effect of Magnetic Field on the Damping Capability of Ni52.5 Mn23.7 Ga23.8 /Polymer Composites Xiaogang Sun, Xiaomin Peng, Lian Huang, Qian Tang, and Sheng Liu

Abstract The effect of the orientation magnetic field (H ori ) and the magnetic field during the damping test (H test ) on the damping capability of 30 vol%Ni52.5 Mn23.7 Ga23.8 /epoxy resin (EP) composites was investigated. H ori did not affect the phase temperatures of Ni52.5 Mn23.7 Ga23.8 /EP composites, but these single-crystal Ni52.5 Mn23.7 Ga23.8 powders were oriented along their easy magnetization axis (c axis) due to H ori . Damping properties of all Ni52.5 Mn23.7 Ga23.8 /EP composites were much better than that of pure EP when the testing temperature was below the glass transition temperature of EP. Compared with the sample without magnetic field, the internal friction peak of Ni52.5 Mn23.7 Ga23.8 /EP composite was increased about 23, 14, 0% to that with H ori and H test , with H test or with H ori , respectively. H test significantly enhanced the damping capability of Ni52.5 Mn23.7 Ga23.8 /EP because the severe twin-boundary motion was generated from the synergistic effect between the magnetic field and oscillation force. H ori combined with H test will improve the damping capability of Ni52.5 Mn23.7 Ga23.8 /EP composite, while showing little effect without H test . Keywords Shape memory alloys · Ni–Mn–Ga · Damping · Magnetic field · Martensitic transformation

1 Introduction Ferromagnetic shape memory alloys, such as Ni–Mn–Ga, are hopeful candidate materials for manufacturing novel actuators, sensors, and energy harvesting devices because of their big magnetic field-induced strain (MFIS), high response frequency, and large damping capacities [1–3]. However, the small MFIS of polycrystalline X. Sun · X. Peng · L. Huang · Q. Tang · S. Liu College of Mechanic Engineering, Hunan Institute of Engineering, 411104 Xiangtan, China X. Sun (B) Hunan Provincial Key Laboratory of Vehicle Power and Transmission System, 411104 Xiangtan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_10

101

102

X. Sun et al.

Ni–Mn–Ga, the cost and shape dimension of single-crystal Ni–Mn–Ga, and large eddy current losses in big samples in an alternating magnetic field limit the applications of Ni–Mn–Ga alloys. Recently, Ni–Mn–Ga powders/polymer composite materials are widely concerned [4–10]. In these composites, ductile polymer matrix is combined with single-crystal Ni–Mn–Ga particles or powders [11]. Both the damping properties and stretch traction have been realized in these Ni–Mn–Ga/polymer composites [8, 12–15]. As Ni–Mn–Ga alloys are ferromagnetic alloys, the effect of magnetic field on Ni–Mn–Ga related properties should be studied. Wang [16] and Zeng [17] found that the magnetic field affected the damping capability of Ni– Mn–Ga alloys. Nevertheless, the magnetic field effect on the damping capability of Ni–Mn–Ga/polymer composites was seldom investigated. Bing [9] studied the effect of the orientation magnetic field on the damping capability of Ni–Mn–Ga/polymer composite. The damping ability of the composite was decreased by the orientation magnetic field. However, Wei [8] pointed that the testing magnetic field increased the damping capability of Ni–Mn–Ga/polymer. Therefore, the effects of these two kinds of magnetic fields on the damping behavior of Ni–Mn–Ga/polymer are complex. In this paper, we reported the effect of the orientation magnetic field (H ori ) and the magnetic field during the damping test (H test ) on the damping capability of 30vol%Ni52.5 Mn23.7 Ga23.8 /EP composites.

2 Experiments and Discussion Ni52.5at.%–Mn23.7at.%–Ga23.8at.% (Ni52.5 Mn23.7 Ga23.8 ) ingot was crushed into some particles. Then, these particles were ball-milled into powders which size was small than 74 μm. A quartz ampoule seal containing Ni52.5 Mn23.7 Ga23.8 powders was annealed at 800 °C about 24 h and quenched by ice water. After removed the surface water, the quartz ampoule was annealed at 500 °C about 4 h and cooled in a stove to room temperature. The Ni52.5 Mn23.7 Ga23.8 /polymer composites matrix was mixed by bisphenol A (BPA) epoxy resin and triethylene-tetramine cure agent. The glass transition temperature (T g ) of cured polymer is about 99 °C. The slurry mixture of 30vol%Ni52.5 Mn23.7 Ga23.8 powders and 70 vol% of the polymer matrix were thoroughly mixed by ultrasonic and mechanical methods. Then, the slurry mixture was filled into a polytetrafluoroethylene (PTFE) model with a groove of 30 × 8 × 6 mm3 . A GMW about 0.6 T was used along the length direction of the model in order to align Ni52.5 Mn23.7 Ga23.8 powders into chains to form a 3-1 composite. The composite sample was pressed out from the mold after the sample had been cured for 12 h. In addition, the control samples were prepared according to the same procedure without the orientation magnetic field (H ori ). The phase transition temperatures of Ni52.5 Mn23.7 Ga23.8 /EP composites were obtained by differential scanning calorimetry (DSC, Perkin Elmer Pyris 1) with a heating/cooling speed of 10 °C/min. The orientation of Ni52.5 Mn23.7 Ga23.8 powders in the composites was identified by X-ray diffraction analysis using the Rigaku Dmax—2550 V with Cu Kα radiation. The samples with dimensions of

Effect of Magnetic Field on the Damping Capability …

103

30 × 8 × 1 mm3 for the damping test were sliced from Ni52.5 Mn23.7 Ga23.8 /EP composite. The damping property of these composites was explored by dynamic mechanical analysis (DMA, TA Q800) in single cantilever pattern with a strain amplitude around 10−4 at 1 Hz frequency and a heating/cooling cycle about 3 °C/min. A GMW magnetic field about 0.3 T was used along the length direction of the composite samples in order to investigate the effect of magnetic field on their damping behaviors. Figure 1 shows the DSC curves of Ni52.5 Mn23.7 Ga23.8 /EP composites with/without orientation field (H ori ) during the preparation process. The two kinds of Ni52.5 Mn23.7 Ga23.8 /EP composites have a similar phase transformation temperature. The austenitic transformation (As , Af ), martensitic transformation (Ms , Mf ), and magnetic transition (T C ) of Ni52.5 Mn23.7 Ga23.8 /EP composite are coincident with those of annealed Ni52.5 Mn23.7 Ga23.8 powder. The phase transformation temperatures of Ni–Mn–Ga powders of those composites are not affected by the EP matrix and H ori [7, 18]. The phase transformation temperatures of Ni52.5 Mn23.7 Ga23.8 /EP composites are, respectively, tested to be As = 41 °C, Af = 56 °C, Ms = 51 °C, and Mf = 31 °C (Fig. 1). Figure 2 and Table 1 show the XRD results of Ni52.5 Mn23.7 Ga23.8 /EP composites without/with H ori during preparation process. The plane of the composite vertical to the orientation field is tested by XRD. The control sample is also identified on the similar place. The results show that Ni52.5 Mn23.7 Ga23.8 powders are 7 M incommensurate modulated martensite at room temperature. Two important intensity rates of M(224)/M(422) and M(004)/M(400) peaks of Ni52.5 Mn23.7 Ga23.8 /EP composite Fig. 1 DSC curves of Ni–Mn–Ga/EP composites without (a)/with (b) magnetic field during the curing process

104

X. Sun et al.

Fig. 2 Xray diffraction patterns for the 30vol%Ni52.5 Mn23.7 Ga23.8 /EP composites without (a)/with (b) magnetic field during the curing process

Table 1 Effects of the orientation field on the XRD patterns of the 30vol%Ni–Mn–Ga/EP composites

Samples

(004)/(400)

(224)/(422)

Without magnetic field during curing

0.55

1.6

With magnetic field during curing

1.05

2.3

obtained with H ori were larger than those of that obtained without H ori by the XRD results. This difference suggested that H ori changed the arrangement of Ni–Mn–Ga powders of the composite during the preparation process [7, 9, 18]. Figure 3 shows the DMA results of Ni52.5 Mn23.7 Ga23.8 /EP composites and pure EP in the temperature range of 20–72 °C. When the temperature was far below the glass transition temperature (T g ) of EP, damping properties of all composites were better than those of pure EP. In the internal friction (IF) curves of each Ni52.5 Mn23.7 Ga23.8 /EP composites, a peak occurs at about 50–62 °C, which mainly comes from the energy harvesting of the phase transformation of Ni52.5 Mn23.7 Ga23.8 powders. These phase transformation temperatures are different from the results tested by DSC (Fig. 1) because of the differences in the heating rate and sample size between these two different methods [8, 10, 17]. In addition, the different kinds of magnetic field lead to different DMA curves. Compared with the sample without magnetic field (without H ori or H test ), the internal friction peak of Ni52.5 Mn23.7 Ga23.8 /EP composite is increased about 23%, 14%, 0% to that with H ori and H test , with H test or with H ori , respectively. The significant differences in the damping property between pure EP and Ni52.5 Mn23.7 Ga23.8 /EP composites are caused by the following factors: the interfacial friction between EP matrix and Ni52.5 Mn23.7 Ga23.8 powders, the phase transformation and martensitic twin motion of Ni52.5 Mn23.7 Ga23.8 powders, and the magnetic domains motion of Ni52.5 Mn23.7 Ga23.8 powders under the magnetic field [2, 3, 6–8, 16–18]. From the above DMA testing results, the effect of H test on the composite

Effect of Magnetic Field on the Damping Capability …

105

Fig. 3 a Schematic diagram of the orientation magnetic field during the curing process (H ori ), magnetic field during the damping test (H test ), b effect of magnetic field on the damping behavior of Ni–Mn–Ga/EP composites

damping property is much more pronounced than that of H ori. The reorientation of Ni–Mn–Ga twin-boundary motion will absorb large energy before As at heating process. The oscillating force and H test have the same effect that they can reorient twin variants at martensitic phase (twin boundary) during DMA test [2, 3, 6–8, 16–18]. However, the orientation of H test is normal to the orientation of sample oscillation in our experiments, seen as Fig. 3a. Therefore, the twin-boundary motion of Ni–Mn–Ga powders is severe because of the competition between the magnetic field force and the oscillating force. Therefore, H test leads a large increase on the damping capability of Ni–Mn–Ga/EP composites. However, the effect of H ori on the damping capability Ni52.5 Mn23.7 Ga23.8 /EP composites is complex. Firstly, different from T. Bing’s results [9], we found that the effect of orientation field has some improvement on damping capability for the sample with H ori and H test compared with only H test but without negative effect. In our experiments, even though H ori makes these singlecrystal Ni52.5 Mn23.7 Ga23.8 powders oriented along c axis (the easy magnetization axis), the distribution of Ni–Mn–Ga powders is uniform, just as our previous results [17], comparing with the chain structure of T. Bing’s results [9]. The orientation of

106

X. Sun et al.

Ni52.5 Mn23.7 Ga23.8 powders may increase the competition between the magnetic field force and the oscillating force. Secondly, the effect of H ori on the damping capability of composites is negligible under the condition without H test . M. Zeng pointed out that different numbers of martensitic twin variants were reoriented at different crystallographic planes of single-crystal Ni–Mn–Ga upon bending [17]. However, Ni52.5 Mn23.7 Ga23.8 /EP composite contains many single-crystal Ni52.5 Mn23.7 Ga23.8 powders, which exhibited different crystallographic planes to the orientation of the oscillation bending force. The random distribution of the crystallographic planes may be affected by H ori during the preparation process of Ni52.5 Mn23.7 Ga23.8 /EP composite. However, this difference of the crystallographic planes distribution will disappear by the continuous oscillating bending force. This issue should be further investigated.

3 Conclusion This study investigated the effect of the orientation magnetic field (H ori ) and the magnetic field during the damping test (H test ) on the damping capability of 30vol%Ni52.5 Mn23.7 Ga23.8 /EP composite. The martensitic phase transformation temperatures of Ni52.5 Mn23.7 Ga23.8 /EP composites with/without H ori during the preparation process are similar to the corresponding temperatures of Ni52.5 Mn23.7 Ga23.8 powders. H ori changes the arrangement of Ni52.5 Mn23.7 Ga23.8 powders of Ni52.5 Mn23.7 Ga23.8 /EP composites during the preparation process. DMA results of all the composites were better than that of pure EP at the temperature blow T g of EP. Compared with the sample without magnetic field (without H ori or H test ), the internal friction peak of Ni52.5 Mn23.7 Ga23.8 /EP composite is increased about 23%, 14%, 0% to that with H ori and H test , with H test or with H ori , respectively. H test significantly enhanced the damping capability of Ni52.5 Mn23.7 Ga23.8 /EP composite because of the synergistic effect between the magnetic field and oscillation force which generates severe twin-boundary motion. The effect of H ori on the damping capability Ni52.5 Mn23.7 Ga23.8 /EP composites is complex. H ori combined with H test will improve the damping capability of Ni52.5 Mn23.7 Ga23.8 /EP composite, while showing little effect without H test . Acknowledgements This research was financially supported by the National Natural Science Foundation of China (51671085, 51701070) and the Scientific Research Fund of Hunan Provincial Education Department (14B042).

References 1. Ullakko, K., Huang, J.K., Kantner, C., Ohandley, R.C., Kokorin, V.V.: Large magnetic-fieldinduced strains in Ni2 MnGa single crystals. Appl. Phys. Lett. 69(13), 1966–1968 (1996)

Effect of Magnetic Field on the Damping Capability …

107

2. Gavriljuk, V.G., Soderberg, O., Bliznuk, V.V., Glavatska, N.I., Lindroos, V.K.: Martensitic transformations and mobility of twin boundaries in Ni2 MnGa alloys studied by using internal friction. Scripta Mater. 49(8), 803–809 (2003) 3. Dunand, D.C., Muellner, P.: Size effects on magnetic actuation in Ni-Mn-Ga shape-memory alloys. Adv. Mater. 23(2), 216–232 (2011) 4. Feuchtwanger, J., Michael, S., Juang, J., Bono, D., O’Handley, R.C., et al.: Energy absorption in Ni-Mn-Ga-polymer composites. Appl. Phys. 93(10), 8528–8530 (2003) 5. Scheerbaum, N., Hinz, D., Gutfleisch, O., Mueller, K.H., Schultz, L.: Textured polymer bonded composites with Ni-Mn-Ga magnetic shape memory particles. Acta Mater. 55(8), 2707–2713 (2007) 6. Feuchtwanger, J., Richard, M.L., Lazpita, P., Gutierrez, J., Barandiaran, J.M., et al.: Stressinduced twin boundary motion in particulate Ni-Mn-Ga/polymer composites. Mater. Sci. Forum 583, 197–212 (2008) 7. Tian, B., Chen, F., Tong, Y.X., Li, L., Zheng, Y.F.: Bending properties of epoxy resin matrix composites filled with Ni-Mn-Ga ferromagnetic shape memory alloy powders. Mater. Lett. 63(20), 1729–1732 (2009) 8. Wei, L., He, Y., Liu, Y., Yang, N.: Damping of Ni-Mn-Ga epoxy resin composites. Chin. J. Aeronaut. 26(6), 1596–1605 (2013) 9. Bing, T., Feng, C., Yunxiang, T., Li, L., Yufeng, Z.: Magnetic field induced strain and damping behavior of Ni-Mn-Ga particles/epoxy resin composite. Alloys Compd. 604, 137–141 (2014) 10. Lester, B.T., Baxevanis, T., Chemisky, Y., Lagoudas, D.C.: Review and perspectives: shape memory alloy composite systems. Acta Mech. 226(12), 3907–3960 (2015) 11. Hosoda, H., Takeuchi, S., Inamura, T., Wakashima, K.: Material design and shape memory properties of smart composites composed of polymer and ferromagnetic shape memory alloy particles. Sci. Technol. Adv. Mater. 5(4), 503–509 (2004) 12. Feuchtwanger, J., Richard, M.L., Tang, Y.J., Berkowitz, A.E., O’Handley, R.C., et al.: Large energy absorption in Ni-Mn-Ga/polymer composites. Appl. Phys. 97(10) (2005) 13. Lahelin, M., Aaltio, I., Heczko, O., Soderberg, O., Ge, Y., et al.: DMA testing of Ni-MnGa/polymer composites. Compos. Part A-Appl. Sci. Manuf. 40(2), 125–129 (2009) 14. Mahendran, M., Feuchtwanger, J., Techapiesancharoenkij, R., Bono, D., O’Handley, R.C.: Acoustic energy absorption in Ni-Mn-Ga/polymer composites. Magn. Magn. Mater. 323(8), 1098–1100 (2011) 15. Glock, S., Michaud, V.: Thermal and damping behaviour of magnetic shape memory alloy composites. Smart Mater. Struct. 24(6) (2015) 16. Wang, W.H., Liu, G.D., Wu, G.H.: Magnetically controlled high damping in ferromagnetic Ni52 Mn24 Ga24 single crystal. Appl. Phys. Lett. 89(10) (2006) 17. Zeng, M., Or, S.W., Chan, H.L.W.: Ultrahigh anisotropic damping in ferromagnetic shape memory Ni-Mn-Ga single crystal. Alloys Compd. 493(1–2), 565–568 (2010) 18. Sun, X.G., Song, J., Jiang, H., Zhang, X.N., Xie, C.Y.: Damping behavior of polymer composites with high volume fraction of NiMnGa powders. Proc. SPIE 79771G, 1–8 (2011)

Knock Knock: A Binary Human–Machine Interactive Channel for Smartphone with Accelerometer Haiyang Wang, Huixiang Zhang, Zhipin Gu, Wenteng Xu, and Chunlei Chen

Abstract A binary human–machine interactive channel for smartphone with accelerometer is proposed in this paper. By comparing and analyzing the advantages and disadvantages of the four binary gestures, the knock gesture is selected as the interactive gesture. Subsequently, we elaborate on the knock gesture-oriented binary human–computer interaction channel. The accelerometer signal is sampled during the interaction process. Three methods including the heuristic algorithm, the support vector machine algorithm, the online sliding window and bottom-up algorithm are used to cut the sampled data into bit signal segment. Three machine learning algorithms including the decision tree, the support vector machine, and the naïve Bayesian are separately adopted to transform the cut signal segment into bit information. Finally, our binary human–computer interaction channel is verified by experiments. A higher recognition rate can be achieved only by using traditional machine learning methods. Keywords Human–machine interaction · Gesture recognition · Binary gesture sequence · Smartphone · Accelerometer

1 Introduction Nowadays, smartphones are generally equipped with various sensors, such as MEMS gyroscopes for electronic compasses, magnetic sensors for detecting direction, and accelerometers for step counting. These sensors are also used to achieve human– computer interaction. Reference [1] designed a gesture-based interactive system on Android smartphones. By analyzing data captured by the acceleration sensor, the user hand gesture was recognized to control the movement of the mouse in a computer. Reference [2] developed two deep models to identify gestures by analyzing the data of H. Wang · H. Zhang (B) · Z. Gu · W. Xu Northwestern Polytechnical University, 710072 Xi’an, China e-mail: [email protected] C. Chen Weifang University, 261061 Weifang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_11

109

110

H. Wang et al.

smartphone acceleration and angular velocity sensors. Reference [3] proposed a twohanded gesture recognition technology based on improved dynamic time warping (DTW) algorithm and smartphones. These sensors can also be applied to identify a defined set of gestures. In reference [4], accelerometers and gyroscopes data were collected from smartphone sensors. The letters A, B, C, D and Arabic numerals 1, 2, 3, 4 were recognized by utilizing Support Vector Machine (SVM) and Hidden Markov models (HMM). In [5], the data of the acceleration sensor were collected, and eight kinds of gestures (angle, box, left, right, down, up, clockwise, circle counterclockwise) were identified by the DTW method. In the aforementioned works, the meaning represented by the gesture is fixed. In order to express multiple meanings, we must define a plurality of gestures. However, it is not only user-unfriendly, but also difficult to recognize. This paper proposes a binary gesture channel to realize human–computer interaction. Only two simple gestures are defined, which are represented by binary values 0 and 1, respectively. A binary gesture sequence consisting of the two simple gestures can be used to express rich meaning. For example, only a sequence of four binary gestures is required to represent sixteen meanings.

2 Definition and Evaluation of Interactive Gestures 2.1 Gesture Definition Table 1 lists four simple binary gestures. One gesture is represented by one bit. For example, knocking on the screen once means passing one-bit information to the smartphone. If the user wants to transmit the bits of “0110” to the smartphone, then he needs to perform four knock gestures on the phone screen in the sequence of “single-knock, double-knock, double-knock, singleknock.” The background application installed on the smartphone would recognize the binary gesture sequence by analyzing the acceleration sensor data. Table 1 Definition of binary gesture

Category

Motion

Meaning

Horizontal movement

Left, Right

0,1

Pitch movement

Up, Down

0,1

Flip movement

Left, Right

0,1

Knock movement

Single, Double

0,1

Knock Knock: A Binary Human–Machine Interactive Channel …

111

2.2 Feasibility Analysis The accelerometer signals representing the four binary gestures are illustrated in Fig. 1. Label X, Y, and Z represent the x-, y-, and z-axes sample values of the accelerometer, respectively. As shown in Fig. 1a, the signal by performing the horizontal movement has little difference and lots of noise. Thus, it is not easy to identify the motion to recognize bit 0 and 1. In Fig. 1b and c, peaks and troughs appear in the signals account for bit 0 and 1. In Fig. 1d, the number of peaks can be used to identify the bit 0 and 1. Generally, one independent peak represents 0; two adjacent peaks represent 1. However, the pitch and flip gestures take more time to operate than the gesture of knock. As shown in Fig. 1, a complete knock gesture takes three seconds, while

(a) Horizontal movement

(c) Flip movement

(b) Pitch movement

(d) Knock movement

Fig. 1 Accelerometer signals by performing a gesture sequence of “01”

112

H. Wang et al.

Fig. 2 Construction flowchart of gesture interactive channel

a complete pitch and flip gestures take six seconds. In other words, knock gestures can convey the same information with lower time overhead. Therefore, the knock gesture is chosen to construct a binary human–computer interaction channel in this paper.

3 Construction of Binary Human–Machine Interactive Channel 3.1 The Construction Processes The construction process of the binary human–machine interactive channel is shown in Fig. 2. There are six steps: sensor data collecting, data filtering, bit cutting, feature extraction, machine learning model training, and gesture recognition.

3.2 Sensor Data Collecting and Filtering Considering the acquisition efficiency and accuracy, the accelerometer is sampled at the frequency of 50 Hz. The samples of x-, y-, and z-axes are denoted as ax , a y , az . The root-mean-square of the three-axis data is obtained according to Formula (1). a=

 ax2 + a 2y + az2

(1)

A low-pass filter is used to smooth the data in accordance with Formula (2). asmoothi = βai + (1 − β)asmoothi−1

(2)

Knock Knock: A Binary Human–Machine Interactive Channel …

113

Fig. 3 Bit cutting

3.3 Bit Cutting By bit cutting, the acceleration signal segment corresponding to each binary gesture is extracted. A 4-bit (“0110”) synthetic accelerometer signal is shown in Fig. 3. After the process of bit cutting, four gesture signal segments labeled by red dot lines are expected to be extracted. As shown in Fig. 3, there is a significant calm period between adjacent bit signals. Thus, the main task of bit cutting is to distinguish the calm period and fluctuation period. Three different algorithms are used to perform this task. • Heuristic cutting algorithm: Firstly, the difference in amplitude between adjacent sampling points is used to identify the beginning of a fluctuation period. The whole signal sequence is divided into multiple segments. Then, short calm segments are merged into adjacent fluctuation segments according to an empirical threshold. • SVM cutting algorithm: An SVM model can be trained to classify the calm period and fluctuation period. There are two features selected to train the model: the rootmean-square value of triaxial acceleration and the root-mean-square difference of acceleration. • Online sliding window and bottom-up (OSWB) cutting algorithm: This algorithm is based on the sliding window algorithm and the bottom-up algorithm, which can handle the endless data flow and has low space and time complexity [6].

3.4 Gesture Recognition Based on Machine Learning After the bit cutting, the accelerometer signal segments corresponding to each binary gesture are separated. Machine learning algorithms are used to distinguish the meaning of each signal segment. Three characteristics are selected as features.

114

H. Wang et al.

• The number of sampling points in a fluctuation segment As shown in Fig. 3, the duration of a double-knock can be represented by the number of sampling points in the corresponding signal segment. • The knock energy The energy consumption of object motion is closely related to the velocity and acceleration [7]. Since the root-mean-square processing has been taken for the triaxial acceleration value, the knock energy is calculated in pursuant to the following formula. En =

n  (|aall − 9.8|)

(3)

i=1

• The first component of discrete cosine transform (DCT) The DCT is often used for signal and image processing [8]. Processing by DCT, most of the signal tends to be concentrated in a few low-frequency components. Here, the first component of DCT transformation for the knock gesture signal is selected as one of the features. Three aforementioned features are used to construct a feature vector. The decision tree, support vector machine, and naive Bayes algorithms are used to identify the meaning of a knock gesture, separately. After that, the knock gesture sequence can be converted into a binary sequence.

4 Experiments Twenty volunteers have used ten different Android smartphones in the experiments. Each smartphone was only used by two volunteers, and each volunteer used the corresponding smartphone to collect three sets of sample data. A set of data includes sixteen binary gesture sequences from “0000” to “1111”. A total of sixty sets of data were collected in the experiment. These data contain 960 (60 * 16) bits of information.

4.1 Experiment of Bit Cutting Ideally, there are four knock gesture signal segments that can be extracted from a binary gesture sequence. If the number of extracted segments was not equal to four, it was considered as a cutting error. Here, the total number of cut segments is N and the number of correctly cut segments is N r , the cutting accuracy can be defined as follows.

Knock Knock: A Binary Human–Machine Interactive Channel … Table 2 Cutting accuracy of the bit cutting algorithms

Table 3 Recognition result

115

Cutting algorithm

Cutting accuracy (%)

Heuristic

94.06

SVM

89.27

OSWB

96.46

Machine learning algorithms

Accuracy (%)

Decision tree

94.06

Support vector machines

97.14

Naïve Bayesian

95.15

Accuracycut =

Nr N

(4)

The cutting accuracy of the three algorithms is listed in Table 2. The OSWB algorithm achieves the highest cutting accuracy of 96.46%. The model trained by SVM is not universal, only achieves a cutting accuracy of 89.27%. The errors in bit cutting usually are caused by two reasons: (1) the sampled data is biased due to the acquisition error of the built-in accelerometer of the mobile phone; (2) the knock interval between the two successive gestures is not strictly equal to each other, and double-knock gestures may be recognized as a single-knock by mistake.

4.2 Recognition Results The decision tree, support vector machine, and naive Bayesian algorithms are used in the experiments. The results are shown in Table 3. All three algorithms achieve a high recognition accuracy, and the SVM model has the highest recognition rate. The accuracy of single-knock recognition in the decision tree model is lower than double-knock. The naive Bayesian model has a higher recognition accuracy for single-knock than double-knocks.

5 Conclusion In this paper, a binary human–computer interaction channel is proposed for smartphones with accelerometer. For traditional gesture interaction applications, each gesture has been given a fixed meaning. As the number of gestures increases, the difficulty of gesture recognition increases. Our method only defines two simple gestures, which represent 0 and 1, respectively. It can express rich information through the

116

H. Wang et al.

combination of the two gestures. Many interesting mobile applications can be built based on the binary interaction channel, such as a covert interaction with the mobile application.

References 1. Sarkar, M., Haider, M.Z., Chowdhury, D.: An android based human computer interactive system with motion recognition and voice command activation. In: 5th International Conference on Informatics, Electronics and Vision, pp. 170–175. IEEE, New York (2016) 2. Li, C., Xie, C., Zhang, B.: Deep Fisher discriminant learning for mobile hand gesture recognition. Pattern Recogn. 77(5), 276–288 (2018) 3. Han, X., Xue, J., Zhang, Q.: A two-handed gesture recognition technique on mobile devices based on improved DTW Algorithm. In: Liang, Q., Mu, J., Jia, M., Wang, W., Feng, X., Zhang, B. (eds.) Communications, Signal Processing, and Systems. CSPS 2017, LNEE, vol. 463, pp. 1429–1436. Springer, Singapore (2017) 4. Xie, C., Luan, S., Wang, H.: Gesture recognition benchmark based on mobile phone. In: You, Z., et al. (eds.) Biometric Recognition. CCBR 2016, LNCS, vol. 9967, pp. 432–440. Springer, Cham (2016) 5. Liu, J., Wang, Z., Zhong, L.: uWave: accelerometer-based personalized gesture recognition and its applications. Pervasive Mob. Comput. 5(6), 657–675 (2009) 6. Keogh, E.J., Chu, S., Hart, D.M.: An online algorithm for segmenting time series. In: IEEE International Conference on Data Mining, pp. 289–296. IEEE, New York (2001) 7. Bouten, C.V., Koekkoek, K.T., Verduin, M.: A triaxial accelerometer and portable data processing unit for the assessment of daily physical activity. IEEE Trans. Biomed. Eng. 44(3), 136–147 (1997) 8. Zhou, S., Shan, Q., Fei, F.: Gesture recognition for interactive controllers using MEMS motion sensors. In: 4th IEEE International Conference on Nano/Micro Engineered and Molecular Systems, pp. 935–940. IEEE, New York (2009)

Remote Network Provisioning with Terminals Priority and Cooperative Relaying for Embedded SIM for NB-IoT Reliability Yuxiang Lv, Yang Yang, Ping Ma, Yawen Dong, and Wei Shang

Abstract Due to rapidly growing NB-IoT face new challenges, the traditional SIM card becomes problematic and expensive, or even the SIM card cannot be soldered to the NB-IoT devices. Thus, the embedded SIM (eSIM) is required, and its remote provisioning is needed correspondingly. A remote provisioning strategy with terminals priority and cooperative relay is proposed to enhance NB-IoT reliability. We classified the terminals by using naive Bayesian model. Based on over the air (OTA) technology architecture, we proposed a communication strategy with cooperative relay to ensure the reliability of the system that can effectively reduce the transfer outage probability. Finally, we proposed a decision scheme, and the outage probability of the system can be obtained by Markov chain. The simulation results showed that the remote provisioning strategy with terminals priority and cooperative relay can reduce the outage probability and improve the system throughput. Keywords Embedded SIM · NB-IoT · Services priority · Cooperative relay · Naive Bayesian model · Markov chain

1 Introduction Embedded SIM writes the mobile network operator (MNO) users’ identification information into an embedded universal integrated circuit card (eUICC). It is fixed on the embedded terminal device and cannot be pulled out or replaced casually. The users cannot replace the eSIM directly. Some eSIM card manufactures have developed remote code number management systems to create a more compatible Y. Lv (B) · Y. Yang · Y. Dong State Grid Information and Communication Industry Group Anhui Jiyuan Software Company, Hefei, China e-mail: [email protected] P. Ma · W. Shang State Grid Shaoxing Power Supply Company, Shaoxing, China

© Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_12

117

118

Y. Lv et al.

remote numbering system among the operators around the world. The international standards are also being developed. The main standards include M2M smart card (physical and logical features) [1]; the scenarios and requirements of eUICC [2]; embedded UICC remote configuration technology specification [3]; SIM card remote configuration technical specification [4]. The most notable difference between an eSIM card and a normal SIM card is the package form. The eUICC chip is soldered directly to the terminal (SMD mode) or directly into the communication module (SIP mode) [5]. In [6], the paper takes China Mobile’s Internet of things eSIM platform “Community Connected Platform” as an example. In [7], the paper proposed a new eSIM management platform to remotely manage the eSIM card in the terminal devices. In [8], security algorithms between eSIM card and the service provider have been proposed. However, the alternative value network configurations (VNCs) are proposed in [9]. In [10], the paper explained the embedded SIM card technology by identifying an authentication function, supporting the Internet of things function, and providing local service functions. In [11], the paper describes a method for task migration for mobile edge computing using deep reinforcement learning. In [12], the paper describes a resource management method for multiservice WiMAX Networks. However, these papers do not focus on the reliability of remote configuration. The contributions of this paper are concluded as follows: Firstly, we establish a communication system between NB-IoT terminals and MNO. The relay is included in the system to assist with the remote provisioning and enhance reliability. Then, we classify the NB-IoT terminals according to predict the priority by using naive Bayesian model. The high-priority terminals can occupy the channel of the lowpriority terminals for communication. Then the system can ensure that high-priority terminals will not drop calls, and then it guarantees reliability. Finally, we use Markov chain to analyze the outage probability of the system. A cooperative relaying decision scheme is proposed, and then the outage probability and throughput can be calculated through Markov state transition diagram. This section confirms that the system with terminals priority and relay reduces outage probability and enhances NB-IoT reliability.

2 System Model and Problem Formulation A. System Communication Model As shown in Fig. 1, if there is not a relay, then the system establishes an OTA communication connection between the NB-IoT terminals and MNO. According to the request of the NB-IoT terminals, the terminals communicate with MNO through the module as shown in Fig. 1. Then the terminals can obtain the services and realize the initial connection with the remote server. The proposed system consists of NBIoT terminals, a relay system, and MNO. The number of terminals is D, and we divided the terminals into m classes.

Remote Network Provisioning with Terminals Priority …

119

Fig. 1 System communication model

B. Terminals Priority Model This paper proposes to classify NB-IoT terminals by using naive Bayesian model. The classification steps are shown as follows: Step 1: D is the set of terminals training tuples and their associated class labels. Each tuple is represented by an n-dimensional terminals attribute vector X = {x1 , x2 , . . . , xn }. Step 2: Set the number of classes is m, C1 ,C2 , …, Cm represent classes. Given a tuple X, the taxonomy will predict that X belongs to the class with the highest posterior probability. In other words, the naive Bayesian classification predicts that X belongs to class Ci , if and only if   P(Ci |X ) > P C j |X 1 ≤ j ≤ m, j = i

(2.1)

According to Bayesian theorem: P(Ci |X ) =

P(X |Ci )P(Ci ) P(X )

(2.2)

Ci is the biggest class, so it is also maximum posterior probability. Step 3: Since P(X ) is constant for all classes, only P(Ci |X )P(Ci ) is required to be the maximum. We assume that there is no understanding of the prior probability of the class. It is usually assumed that these classes have same probability; that is, P(C1 ) = P(C2 ) = · · · = P(Cm ). We need P(Ci |X ) to be maximum. Step 4: Given a data set with many terminal attributes, the computational cost of P(Ci |X ) is very large. In order to reduce the computational overhead, a simple assumption of class condition independence can be implemented. Given the class label of the tuple, it is assumed that the attribute values are conditionally independent of each other. Therefore,

120

Y. Lv et al.

P(X |Ci ) =

n 

P(xk |Ci )

(2.3)

k=1

To calculate P(Ci |X ), consider the following: Since the terminal attribute is continuously changing and belongs to a consequent value rather than a discrete value, it is assumed that the consequent value attribute obeys a Gaussian distribution with a mean of η and a standard deviation of σ , which is defined by: 1

−(x−η)2 2σ 2

(2.4)

P(X k |Ci ) = g(xk , ηci , σci )

(2.5)

g(x, η, σ ) = √

2π σ

e

Step 5: In order to predict the X class label, for each class Ci , we need to calculate P(Ci |X )P(Ci ). The taxonomy predicts that the class of input tuple X is Ci , if and only if     P(X |Ci )P(Ci ) > P X |C j P C j , 1 ≤ j ≤ m, j = i

(2.6)

The class label being predicted is the class Ci which maximizes P(Ci |X )P(Ci ). C. Problem Formulation Case 1: Cooperative transmit The probability R can receive the packet from MNO successfully can be represented as P1 . The probability R transmits the packet to T successfully and can be represented as P2 . The probability T can receive packet from R and can be obtained as P3 . Furthermore, P1o ,P2o , and P3o represent their thresholds. When the MNO is selected to transmit packet to R and T, we need to minimize the system outage probability. It can be formulated as: Min1 − P1 P2 P3

(2.7)

P1 ≤ P1o

(2.8)

P2 ≤ P2o

(2.9)

P3 ≤ P3o

(2.10)

Case 2: Direct transmit In case 2, the MNO is selected to transmit packet to T directly without using relay system. The probability T can successfully receive packet from MNO, and it will be represented as P4 .

Remote Network Provisioning with Terminals Priority …

121

3 Outage Probability Analysis of the System A. Cooperative Relaying Decision We consider the relay buffer has two states: empty state and full state. In order to perform Markov chain on the system outage probability below, we propose a state transition scheme. In Table 1, the terms “0” and “1” denote the empty state and full state of the buffer, respectively. B. Outage Probability Analysis Using Markov Chain In this section, we analyze the system outage probability by using Markov chain. For Markov chain, if given a past state, the probability distribution of the next state only depends on the current state, not on the past state. Thus, it can be used to analyze the state transition scheme proposed above. α = P2 + P1 P2 P3

(3.1)

β = P1 P2 + P1 P2 P3

(3.2)

γ = P1 P2 P3 + P4 (1 − P1 P2 P3 )

(3.3)

δ = (1 − P1 P2 P3 )P4

(3.4)

  π0 P1 P2 + P1 P2 P3 = π1 [P1 P2 P3 + P4 (1 − P1 P2 P3 )]

(3.5)

π0 + π1 = 1

(3.6)

The system throughput is given by     R = π0 · r P1 P2 P3 + P1 P2 P3 + π1 · r P1 P2 P3 + P1 P2 P3 + P4 (1 − P1 P2 P3 ) (3.7) In Fig. 2, we use “0” and “1” to represent Markov state values and there are only two states. The data packets have the same size of rBT. B is the bandwidth of the Table 1 Cooperative relaying decision Buffer state

0 (only in cooperative link)

1

Event

R cannot receive packet from M

T cannot receive packet in direct link

R cannot transmit packet to T

T cannot receive packet in cooperative link

122

Y. Lv et al.

Fig. 2 Markov chain

system. T is the time slot. Because all states are interoperable, the Markov chain is irreducible. The outage probability of the whole system is given by P = π0 (1 − P2 ) + π1 [(1 − P1 P2 )(1 − P4 )]

(3.8)

4 Simulation and Results Numerical simulation and results based on MATLAB are presented in this section. In the simulation part, we focus on the system’s outage probability and the throughput of the system. The two indicators can represent system performance and reliability legitimately. We set r = 1 bps/Hz.

Fig. 3 System outage probability under services priority versus the SNR

Remote Network Provisioning with Terminals Priority …

123

Fig. 4 Outage probability with different numbers of terminals versus SNR

Figure 3 shows the outage probability which can represent the relay ability of the system. As we can see from the figure, with the increase of SNR, the average probability of the system outages is rising. Figure 4 shows that the change of system outage probability with SNR when the system access varied number of NB-IoT terminals. When the number of the NBIoT terminals equals 100 and SNR is more than 6, the outage probability increases rapidly. Figure 5 shows the throughput of the system with or without terminals priority and relay. The simulation result shows that the performance of the proposed strategy is better than the normal eSIM provisioning strategy.

5 Conclusion In this paper, we propose a remote provisioning strategy with terminals priority and relay. Since the requirements of remote provisioning network are heterogeneous and with high reliability, we use the low outage probability to meet the demand of high QoS required terminals. We classify the terminals according to their requirements, and the high-priority terminals can occupy the channel of low-priority terminals. In this paper, we analyze the outage probability by using Markov chain. According to the cooperative relay decision, the Markov chain is smooth distribution. Finally, the simulation results show that the proposed remote provisioning strategy can be able to improve the reliability and throughput of the system.

124

Y. Lv et al.

Fig. 5 System throughput versus SNR

Acknowledgements This work is supported by the 2019 State Grid Science and Technology Project “Key Technologies Research and Applications of Power Wireless Heterogeneous Network Convergence.”

References 1. Smart cards machine UICC physical and logic characteristics (release 9): ETSI’IS102.671[S/OE. (2011/09/01)[2016/08/20]. http://www.freestd.us/soft3/955827. htm 2. Smart cards embedded UICC requirements specification (release 13): ETSITS103.383[S/0L]. (2013-09-01)(2016-08-20). http://www.etsi.org/index.php/technologies-clusters/technologies/ smart.cards 3. Remote provisioning architecture for embedded UICC technical specification version 3.1:GSMA.SGP.02[S/0L] (2016-05-27) [2016-08-26] 4. RSP technical specification version 1.1:GSMA.SGP.22[S/OL1. (2016-07-09)[2016-08-26] 5. Shu, B.: Application and Development Suggestions of eSIM Technology in Internet of Things. China Academic Journal Electronic Publishing House. TN929.5; TP391.44 6. Zhou, Y., W, L. et al.: IoT Industry Report Volume 3: The Carrier of the Internet of Everything, eSIM’s Ming and Dark Brands. Guangdong Merchants License (2016) 7. Qu, S.J., et al.: eSIM: To be Convenient and Safe. People’s Post, Beijing (2017) 8. George Koshy, D., Rao, S.N., et al.: Evolution of SIM cards-what’s next? In: IEEE 2018 International Conference on Advances in Computing, Communications and Informatics (2018) 9. Vesselkov, A., Hanmmainen, H., Ikalainen, P., et al.: Value networks of embedded SIM-based remote subscription management. In: IEEE 2015 Conference of Telecommunication, Media and Internet Techno-Economics (2015)

Remote Network Provisioning with Terminals Priority …

125

10. Liu, L., et al.: Embedded SIM Technology and Internet of Things Applications. In: China Academic Journal Electronic Publishing House (2018) 11. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Future Gener. Comput. Syst. 96, 111–118 (2019) 12. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007)

Design of a Fully Programmable 3D Graphics Processor for Mobile Applications Lingjuan Wu, Wenqian Zhao and Dunshan Yu

Abstract With the widespread use of handheld devices, 3D graphics processing capability has become a differentiating factor in mobile SoC design. This paper presents the design of a fully programmable 3D graphics processor for mobile applications. We adopt single instruction, multiple data (SIMD) architecture and multithread scheduling to utilize data and instruction parallelism in the unified shader. And in rendering engine design, we propose distributed clipping and hierarchical tile-based rasterization to improve the speed. Hardware simulation results show that the triangle processing speed is improved by 33.3% from six to four clock cycles. And the synthesis results in SMIC 40 nm technology show that the maximum frequency is 600 MHz, and the triangle processing speed is 150 MTri/s. Keywords Graphics processor · Unified shader · SIMD

1 Introduction Today, mobile handheld devices are indispensable in our daily lives, such as mobile phones and tablets. In these devices, 3D graphics applications are widely used, for example, mobile phones not only provide communication, but also entertainment like gaming. Therefore, the graphics processing capability has become the main concern in mobile devices. Mobile 3D graphics processor [1–3] performs graphics computation through hardware acceleration and has become one of the most important modules in embedded SoC design. In computer graphics, each object in a 3D scene composes numerous vertices, and each vertex has attributes such as position, color, and texture coordinate. Starting from vertices, the typical 3D graphics pipeline mainly includes vertex processing, L. Wu (B) · W. Zhao Huazhong Agricultural University, 430070 Wuhan, China e-mail: [email protected] D. Yu Peking University, 100871 Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_13

127

128

L. Wu et al.

primitive assembly and clipping, rasterization, fragment processing, and pixel generation. OpenGL ES is the API for embedded 3D graphics processing, and OpenGL ES 2.0 standard introduces programmable component which is called as unified shader. Shader is defined as vertex and fragment processing component, known as vertex shader and fragment shader. And unified shader [4] performs both vertex and fragment shading in a single hardware module and is programmable by OpenGL shading language. Research shows that the programmable unified shader architecture could reduce the area by 35% and power consumption by 28% as compared to the fixed-function pipeline architecture [5]. Inheriting from the development of desktop GPUs, mobile graphics processor has more severe design constraints, especially in terms of silicon area and power consumption. Under these constraints, how to design the algorithm and architecture to make the best utilization of each hardware unit poses a great challenge in mobile graphics processor design. Yoon [6], Chang [7], and Chen [8] propose mobile 3D graphics processor consisting of two, eight, and sixteen unified shaders, respectively. In this paper, we develop a fully programmable 3D graphics processor with four unified shader cores supporting OpenGL ES 2.0 for mobile applications. We adopt single instruction, multiple data (SIMD) architecture and multi-thread scheduling in the unified shader. And distributed clipping and hierarchical tile-based rasterization algorithm is proposed in the rendering engine design to improve the processing speed. We finish the algorithm and system design. And the whole graphics processor is implemented in Verilog HDL. FPGA verification and 40-nm-technology synthesis results are provided. The rest of this paper is organized as follows. The overall architecture of the proposed mobile 3D graphics processor and design of each component are described in Sect. 2. Experimental results are presented in Sect. 3. We conclude this paper in Sect. 4.

2 Proposed Graphics Processor Design 2.1 System Architecture The block diagram of the mobile 3D graphics processor we proposed is shown in Fig. 1. The processor can be integrated into mobile SoC with a host CPU, peripherals, and an external memory. The fundamental components of the 3D graphics processor mainly include host interface, memory controller, unified shader, texture engine, rendering engine, and pixel engine. Valid ready protocol is used for the synchronization between each module. And the whole graphics pipeline supports IEEE 754 single-precision floating-point number to guarantee the precision and dynamic range.

Design of a Fully Programmable 3D Graphics Processor …

Host interface

129

Thread scheduling

Instruction buffer

Address generator

Branch control

Temporary register

Constant register

Insturction decoder

Special function units

Rendering Engine

Memory controller

Primitive assembly

Command Processor

Peripherals

Primitive setup

Texture filtering Texture engine Texture address

Host CPU

Primitive clipping

ALU

ALU

Unified shader 1

ALU

ALU

Unified shader 2

ALU

ALU

ALU

ALU

ALU

ALU

ALU

ALU

Texture cache Unified shader 3 Texture filtering

ALU

ALU

Fragment generator

Fragment generator

Early Z and Stencil Test

Early Z and Stencil Test

Interpolator

Interpolator

Unified shader 4 ALU

ALU

Texture engine External memory

Texture address depth/Stencil buffer

Pixel engine 1

Pixel engine 2

Alpha blending

Alpha blending

Anti-aliasing

Anti-aliasing

Stencil & depth Test

Stencil & depth Test

Fig. 1 Proposed mobile 3D graphics processor architecture

The host interface allows the graphics processor to communicate with CPU or external memory through data bus. Command processor orchestrates the whole graphics pipeline based on the command generated from user program. The unified shader is programmable and executes vertex and fragment shading program. In our design, there are four unified shader cores working in parallel. And multi-thread scheduling is dedicated designed to explore thread parallelism. The execution of the unified shader is a four-stage pipeline including instruction fetching, decoding, execution, and writing back. Since vertex and fragment attributes are represented with 4D vectors such as RGBA and XYZW, the unified shader we proposed is based on single instruction, multiple data (SIMD) architecture and each unified shader contains four ALUs for parallel computing. ALU performs calculation if the instruction is regular operation such as add and multiplication. If the instruction type is transcendental function such as reciprocal, logarithm, exponential and trigonometric, then special function unit (SFU) is called. And for texture mapping-related instruction, texture engine is called. The texture engine mainly includes texture coordinate calculation, texture data acquisition, format conversion, and filtering. Rendering engine is a fixed-function unit and mainly includes primitive assembly and clipping, primitive setup and rasterization as shown in Fig. 1. Application-related parameters, such as primitive type and screen size, are configurable through hardware registers. Rendering engine accepts vertices from the unified shader and generates fragments inside each primitive. After rasterization, the fragments are sent back to the unified shader for fragment shading. Therefore, the processing speed of the rendering engine is a limiting factor of the whole graphics pipeline.

130

L. Wu et al.

Pixel engine generates pixels from fragments after anti-aliasing, depth, and stencil test. Finally, pixels are stored in the frame buffer for display. In this paper, we focus on the optimization scheme of the rendering engine, and to be specific we propose distributed clipping and hierarchical tile-based rasterization. Design method of the unified shader is described in detail in [9].

2.2 Distributed Primitive Clipping In rendering engine, vertices are firstly assembled to primitives; for example, two vertices form a line and three vertices form a triangle. In primitive assembly phase, vertices are in 4D homogeneous coordinate space, and the position is represented as (x, y, z, w). After assembling, primitives are clipped against the 3D view frustum, which is defined as {−w ≤ x ≤ w, −w ≤ y ≤ w, 0 ≤ z ≤ w}, to delete the invisible part. And each primitive is required to be clipped against the six planes of the view frustum, which is complicated and computation expensive. We propose distributed primitive clipping algorithm in this paper. Clipping is distributed to the graphics pipeline of primitive assembly, setup, and rasterization. Basically, culling and only near Z-plane clipping are performed in primitive assembly. And after that the primitive is transformed into 2D screen space. In the setup module, primitive is culled if it is outside of the screen space, and otherwise, rasterization initial point and direction are computed. Moreover, bounding box is defined to confine the effective rasterization area. During rasterization, fine granularity clipping is performed for each fragment in 2D screen space and early far Z (depth) test is performed. And in our design, primitive assembly, setup, and rasterization are separate hardware modules working in parallel to improve the throughput. The clipping flow in the primitive assembly module is shown in Fig. 2a. The primitive is culled if it is outside of the view frustum. Otherwise, near Z-plane clipping is performed for each primitive. As shown in Fig. 2b, line ML is culled since it is outside of the Z plane, triangle DEF is clipped since its vertex F is outside of the near Z plane. After clipping, two new primitives represented as triangle DEO and ENO are generated, and triangle GKJ is generated after clipping of triangle GHI. Cohen–Sutherland algorithm [10] is explored to evaluate the geometrical relationship between each primitive and the view frustum. One example of triangle setup is shown in Fig. 2c, and the intersection D between the triangle ABC and the screen space is determined as the rasterization point, and the rasterization direction is up. And the rectangle filled with gray is defined as the bounding box.

2.3 Hierarchical Tile-Based Rasterization The rasterization module generates the fragments inside of each primitive and calculates their attributes. Each fragment has twelve attributes at maximum and each attribute contains four components, such as RGBA of color. We propose hierarchical

Design of a Fully Programmable 3D Graphics Processor …

131

(a) Vertex information

Primitive output for setup position

C M

OpenGL ES

yes Calculate region code

(b)

Vertex buffer B

H

K

Primitive type

Primitive assembly

A

G

L D

J

I

E

Outside of view frustum

yes

Any vertex outside of near z plane

N

O

no

Near Z plane

culled no F

yes

(c)

Near Z plane clipping

C

Ymin

Left Right

Top

Generate new vertex Calculate new vertex attribute

Normalized device space

Form new primitive

2D screen space

B Ymid

Bottom D

Bounding Box

A

Ymax

Fig. 2 a Primitive clipping flow during assembly. b Near Z-plane clipping example. c Bounding box defined in 2D screen space

tile-based rasterization to improve the hardware parallelism and speed. The rasterization process is shown in Fig. 3, and two levels of tile are adopted. The first level of tile contains 4 * 4 fragments, and the second level of tile contains 2 * 2 fragments, i.e., one first-level tile can be divided into four second-level tiles. In rasterization, the first level tile is generated from the rasterization initial point, and if this 4 * 4 tile has fragment inside of the primitive, it is divided into four 2 * 2 tiles. Furthermore, each 2 * 2 tile is determined against the primitive edge, and attributes of each fragment are calculated if it is inside the primitive. Edge equation is used to determine if the tile is the interior of the primitive. And in the hardware design, each level of the tile is scanned independently and processed in parallel to improve efficiency and speed. Linear interpolation algorithm is explored to compute fragments’ attribute.

3 Experimental Results We finish the mobile 3D graphics processor architecture and hardware design and implement the whole system using Verilog HDL. Firstly, we simulate the whole system in VCS. Then the whole system is implemented on Xilinx Virtex-7 FPGA platform to evaluate its performance. Various OpenGL ES 2.0 programs are tested

132 Fig. 3 Hierarchical tile-based rasterization flow

L. Wu et al.

Rasterization initial point and direction

Scan and generate tile of 4*4

Calculate edge equation of four corner fragements

Any fragment inside the primitive

no

yes Generate four tile of 2*2

Calculate edge equation of one tile 2*2

Tile 2*2 inside primitive

no

yes Calculate the attribute of the four gragments

on FPGA. Some examples such as gaming, triangle, and cube are shown in Fig. 4. VCS and FPGA verification results show that the proposed processor performs 3D graphics computing correctly.

Fig. 4 Verification results on FPGA platform

Design of a Fully Programmable 3D Graphics Processor …

133

Fig. 5 Hardware simulation result

Furthermore, we use Vivado to collect the hardware signal from FPGA platform. With the optimization method of distributed clipping and hierarchical tile-based rasterization, the triangle processing speed is improved to four clock cycles from six. As shown in Fig. 5, V 0 _buffer_rdptr[3:0], V 1 _buffer_rdptr[3:0], V 2 _buffer_rdptr[3:0] represent three vertices’ number of one triangle. The signal start_clipping represents the start of triangle clipping in the graphics pipeline. The value of signal start_clipping is logical one for every four clock cycles, which means that the processing speed of one triangle is four clock cycles in the graphics pipeline. The proposed 3D graphics processor is further synthesized under SIMD 40-nm technology by Design Compiler. The synthesis results show that the maximum frequency achieves 600 MHz, and in this case, the triangles’ processing speed is 150 MTri/s. The mobile GPU design in [11, 12] also supports OpenGL ES 2.0, and DC synthesis results under 90-nm technology show that their maximum frequency is 247 MHz and 345 MHz, respectively. Compared to these designs, the 3D graphics processor we proposed could provide higher frequency.

4 Conclusion This paper presents the design and implementation of a mobile 3D graphics processor. We present the architecture of the processor and more specifically focus on the rendering engine optimization. Distributed clipping and hierarchical tile-based rasterization scheme are proposed to improve the rendering speed. Hardware simulation results on FPGA platform show that the triangle processing speed is improved by 33.3%, from six to four clock cycles. Furthermore, the whole system is synthesized in 40-nm technology, and the maximum frequency is 600 MHz. Acknowledgements This work is supported by the Fundamental Research Funds for the Central Universities of China (Program No. 2662018QD058).

134

L. Wu et al.

References 1. Wu, C., Yang, B., Zhu, W., Zhang, Y.: Toward high mobile GPU performance through collaborative workload offloading. IEEE Trans. Parallel Distrib. Syst. 29(2), 435–449 (2018) 2. Kim, S., Kim, H., Lee, J.: Computing energy-efficiency in the mobile GPU. In: International SoC Design Conference, Busan, pp. 219–221 (2013) 3. Yun, J., Lee, J., Kim, C., Lim, Y., Nah, J., Kim, Y., Park, W.: A novel performance prediction model for mobile GPUs. IEEE Access. 6, 16235–16245 (2018) 4. Kim, Y., Kim, H., Kim, S., Park, J., Paek, S., Kim, L.: Homogeneous stream processors with embedded special function units for high-utilization programmable shaders. IEEE Trans. Very Large Scale Integr. Syst. 20(9), 1691–1704 (2012) 5. Woo, J., Sohn, J., Kim, H., Yoo, H.: A low-power multimedia SoC with fully programmable 3D graphics for mobile devices. IEEE Comput. Graph. Appl. 29(5), 82–90 (2009) 6. Yoon, J., Yu, C., Kim, D., Kim, L.: A dual-shader 3D graphics processor with fast 4-D vector inner product units and power-aware texture cache. IEEE Trans. Very Large Scale Integr. Syst. 19(4), 525–537 (2011) 7. Chang, C., Chen, Y., Lu, Y., Lin, C., Chen, L., Chien, S.: A 172.6mW 43.8GFLOPS energyefficient scalable eight-core 3D graphics processor for mobile multimedia applications. In: IEEE Asian Solid-State Circuits Conference, Jeju, pp. 405–408 (2011) 8. Chen, Y., Chuang, S., Hung, C., Hsu, C., Chang, C., Chien, S., Chen, L.: A 130.3mW 16-core mobile GPU with power-aware approximation techniques. In: 2013 IEEE Asian Solid-State Circuits Conference, Singapore, pp. 297–300 (2013) 9. Wu, L., Huang, L., Xiong, T.: Designing a unified architecture graphics processor unit. In: 7th International Conference on Computer Engineering and Networks, Shanghai, pp. 1–9 (2017) 10. Jiang, B., Han, J.: Improvement in the Cohen-Sutherland line segment clipping algorithm. In: IEEE International Conference on Granular Computing, Beijing, pp. 157–161 (2013) 11. Hsiao, S., Li, S., Tsao, K.: Low-power and high-performance design of OpenGL ES 2.0 graphics processing unit for mobile applications. In: IEEE International Conference on Digital Signal Processing, Singapore, pp. 110–114 (2015) 12. Hsiao, S., Wu, P., Wen, C., Chen, L.: Design of a programmable vertex processor in OpenGL ES 2.0 mobile graphics processing units. In: International Symposium on VLSI Design Automation and Test, Hsinchu, pp. 1–4 (2013)

Outer Synchronization Between Complex Delayed Networks with Both Uncertain Parameters and Unknown Topological Structure Zhong Chen, Xiaomei Tian, Tianqi Lei, and Junyao Chen

Abstract In this paper, synchronization of both non-identical unknown network and identical known network can be considered. Based on Lyapunov stability theory, for the case of non-identical or identical network, synchronization criteria between driveresponse networks are obtained, and both the uncertain parameters and unknown coupling configuration matrix are be identified or constructed. Meanwhile, the coupling matrix may be free. The proposed synchronization scheme is simple and easy to realize. Finally, three illustrative examples show the effectiveness of presented control schemes. Keywords Complex networks · Coupling matrix · Adaptive control

1 Introduction Complex network has been noticed by growing scholars and scientist. This is mainly due to its broad applications in various fields of real world, such as information secure, power systems, transportation systems, biological systems, and so on. In general, a complex network is a large set of nodes interconnected by edges, and each node is a dynamical system. In our daily life, many natural and man-made networks, such as biology networks, food webs, social networks, metabolic networks, electrical power grids, and many others networks, can be described by complex networks.

Z. Chen (B) · X. Tian · T. Lei College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China J. Chen Department of Computer Engineering, Ajou University, Suwon 16499, Korea © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_14

135

136

Z. Chen et al.

The synchronization phenomenon of complex networks has been noticed by growing scholars and scientist. This is mainly due to its wide applications in secure communication, neural networks, society networks, image processing, etc., as a fundamental tool in understanding dynamical behavior of network and its potential applications [1]. The majority of existing works on synchronization of complex network focuses on the inner synchronization, i.e., all nodes in a network achieve a collective behavior within a network. In reality, synchronization between two or more complex networks is called outer synchronization, such as avian influenza, HIV. In almost all of the existing results, it is usually assumed that all network nodes are identical. However, most nodes of a network in engineering have different dynamics behavior, and certainly, the behavior of network with non-identical nodes becomes more complicated. Therefore, the study of dynamics behavior of network with nonidentical nodes gets harder than that of network with identical nodes case. There are many factors which affect synchronization of complex network in realistic world, and these factors include the delay, parameters, control schemes, etc. In realistic situations, time delays deriving from transmission signal over the network affect behaviors of systems. In our work, time-varying delay will be considered. The system parameter is another factors influencing synchronization, and unknown parameters will be considered as main research object in the following works. Many effective control schemes have been presented to solve the above problem such as adaptive control [2, 3], pinning control [4, 5], impulsive control [6, 7], and so on. Inspired by the above cases, the questions which we face in our present study are: Can outer synchronization be achieved if two networks are unknown (including unknown parameters and unknown topologies) and simultaneously have non-identical topological structure? This paper mainly focuses on the issue of asymptotic synchronization for complex networks with non-identical nodes. Free coupling configuration matrix will be introduced in the subsequent analysis. Adaptive synchronization control schemes between two networks with different topological structure are proposed for the system with non-identical nodes. Throughout this paper, the following notations will be used. AT is the transpose of the matrix A. In ∈ R n×n denotes an n-dimensional identity matrix. λmax (A) expresses the maximum eigenvalue of matrix A. ⊗ represents the Kronecker product of two matrices.

2 The Network Model and Preliminaries Consider a complex network with time-varying delay consisting of N non-identical dynamical nodes, in which each node is an n-dimensional dynamical system x˙i (t) = Hi xi (t) + h i (xi (t)) + c

N  j=1

ai j x j (t − τ (t)) i = 1, 2, . . . , N

(1)

Outer Synchronization Between Complex Delayed Networks …

137

where xi (t) = (xi1 (t), xi2 (t), . . . , xin (t))T ∈ R n is the state vector of the ith node; Hi is an n × n constant matrix; h i : R n → R n is a smooth nonlinear vector function; the dynamics of node i is x˙i (t) = Hi xi (t) + h i (xi (t)); c > 0 is a positive constant;  ∈ R n×n is an inner-coupling matrix; the time-varying delay τ (t) is a differential function and satisfies 0 < τ˙ (t) ≤ τ < 1, where τ is a constant. A = (ai j ) N ×N is the coupling configuration matrix representing the topological structure of the network and the weight strength, in which ai j = 0 if there is a connection from node i to  node j ( j = i), otherwise, ai j = 0( j = i); and satisfy aii = − Nj=1, j=i ai j . As a matter of convenience, we can rewrite the dynamics of ith node in another form: x˙i (t) = h i1 xi (t) + h i2 (xi (t))αi i = 1, 2, . . . , N

(2)

where h i1 : R n → R n denotes a continuous vector function and h i2 : R n → R n×m is a continuous matrix function; αi ∈ R m is the parameter vector of node dynamics. We regard the network denoted by Eq. (1) as the drive network and assume that both the parameter vector and the topological structure are unknown, then the complex delayed network (1) can be rewritten in following form: x˙i (t) = h i1 (xi (t)) + h i2 (xi (t))αi (t) + c

N 

ai j (t)x j (t − τ (t)) i = 1, 2, . . . , N

j=1

(3) where αi (t) ∈ R m , a(t) are the unknown parameter vector of node i and weight of the unknown topology. The response network consisting of N non-identical dynamical nodes is given by y˙i (t) = f i1 (yi (t)) + f i2 (yi (t))βi (t) + c

N 

gi j (t)y j (t − τ (t)) + u i (t),

j=1

i = 1, 2, . . . , N

(4)

where yi (t) = (yi1 (t), yi2 (t), . . . , yin (t))T ∈ R n is the state vector of the ith node in the response network; βi (t) is unknown parameter vector; gi j (t) is the unknown element of the coupling configuration matrix of the response network; u i (t) are the adaptive controllers to be designed later. f i1 , f i2 , c,  and τ (t) have the same meaning as those in the Equation; the dynamics of ith node is y˙i (t) = f i1 (yi (t)) + f i2 (yi (t))βi (t), and another form is given by y˙i (t) = Fi (t)yi (t) + f i (yi (t)) i = 1, 2, . . . , N where Fi (t), f i have the same meanings as Hi , h i in Eq. (1), respectively.

(5)

138

Z. Chen et al.

Definition 1 The drive networks (3) are said to be asymptotically synchronized with the response networks (4) if the following condition holds: lim ||xi (t) − yi (t)|| = 0, i = 1, 2, . . . , N .

t→∞

Lemma 1 [8] Let M1 ∈ Rn×n be a positive definite matrix and M2 ∈ Rn×n a symmetric matrix. Then, for any x ∈ Rn , the following inequality holds λmin (M1−1 M2 )x T M1 x ≤ x T M2 x ≤ λmax (M1−1 M2 )x T M1 x

(6)

Lemma 2 [9] For any vectors x, y ∈ R n and the positive definite matrix P ∈ R n×n , the following matrix inequality holds 2x T y ≤ x T P x + y T P −1 y.

(7)

Lemma 3 (Barbalat’s lemma) [10] If φ : R → R + is a uniformly continuous t function on [0, ∞), Suppose that limt→∞ 0 φ(τ )dτ exists and is finite. Then φ(t) → 0 as t → ∞.

3 Synchronization Between the Networks with Non-identical Topology In this section, we focus on investigating outer synchronization between the drive network (3) and the response networks (4). We consider outer synchronization between two non-identical topologies. Define the error vector as ei (t) = yi (t) − xi (t). From Eqs. (3) and (4), we can get the error network as follows: e˙i (t) = Fi ei (t) + f i (yi (t)) + (Fi − Hi )xi (t) − h i (xi (t)) + f i2 (yi (t))β¯i (t) − h i2 (xi (t))α¯ i (t) + c

N 

gi j e j (t − τ (t)) + c

j=1

+c

N  j=1

(gi j − ai j )x j (t − τ (t)) − c

N 

g¯ i j (t)y j (t − τ (t))

j=1 N 

a¯ i j (t)x j (t − τ (t)) + u i (t) (8)

j=1

where β¯i (t) = βi (t) − βi , α¯ i (t) = αi (t) − αi , g¯ i j (t) = gi j (t) − gi j , a¯ i j (t) = ai j (t) − ai j . Theorem 1 Outer synchronization between the drive network (3) and the response network (4) can be achieved with application of the following adaptive feedback controllers and the corresponding update laws:

Outer Synchronization Between Complex Delayed Networks …

u i (t) = − f i (yi (t)) − (Fi − Hi )xi (t) + h i (xi (t)) + c

139

N  (ai j − gi j )x j (t − τ (t)) j=1

− di (t)ei (t)

(9)

d˙i (t) = m i eiT (t)ei (t)

(10)

T (xi (t))ei (t) α˙¯ i (t) = n 1i h i2

(11)

β˙¯i (t) = −n 2i f i2T (yi (t))ei (t)

(12)

a˙¯ i j (t) = cp1i j eiT (t)x j (t − τ (t))

(13)

g˙¯ i j (t) = −cp2i j eiT (t)y j (t − τ (t))

(14)

where m i , n 1i , n 2i , p1i j and p2i j , i, j = 1, 2, . . . , N are positive constant. Proof By application of the controller (9) to error system (8), we get e˙i (t) = Fi ei (t) + f i2 (yi (t))β¯i (t) − h i2 (xi (t))α¯ i (t) + c

N 

gi j e j (t − τ (t))

j=1

+c

N 

g¯ i j (t)y j (t − τ (t)) − c

j=1

N 

a¯ i j (t)x j (t − τ (t)) − di (t)ei (t) (15)

j=1

Construct the Lyapunov function candidate as follows: N  V (t) = [eiT (t)ei (t) + i=1

+

c 1−τ

1 T β¯ (t)βi (t) + n 2i i

N  j=1

t eiT (s)ei (s)ds + t−τ (t)

1 1 T (di (t) − d)2 + α¯ (t)α¯ i (t) mi n 1i i

 1 1 2 g¯ i j (t) + a¯ i2j (t)] p1i j p 2i j j=1 N

where d is a sufficiently large positive constants to be determined later. Taking the time derivative of V (t) along the trajectories of error network (15), we have V˙ (t) =

N  [2eiT (t)e˙i (t) − i=1

c (1 − τ˙ (t))eiT (t − τ (t))ei (t − τ (t)) 1−τ

140

Z. Chen et al.

c 2 2 T ˙ eiT (t)ei (t) + (di (t) − d)d˙i (t) + α¯ (t)α¯ i (t) 1−τ mi n 1i i N N   2 T ˙ 2 2 + a¯ i j (t)a˙¯ i j (t) + g¯ i j (t)g˙¯ i j (t)] β¯i (t)β¯i (t) + n 2i p p 1i j 2i j j=1 j=1

+

Substituting (10–14) into above inequality, we can obtain V˙ (t) ≤

N N   [2eiT (t)Fi ei (t) + 2ceiT (t) gi j e j (t − τ (t)) + ( i=1

j=1

c − 2d)eiT (t)ei (t) 1−τ

− ceiT (t − τ (t))ei (t − τ (t))] Obviously, the following equations hold T (xi (t))ei (t), eiT (t) f i2 (yi (t))β¯i (t) = β¯iT (t) f i2T (yi (t))ei (t) eiT (t)h i2 (xi (t))α¯ i (t) = α¯ iT (t)h i2

According to Lemma 1, we have V˙ (t) ≤

N  i=1



+

[λmax (FiT + Fi )eiT (t)ei (t) + 2ceiT (t)

N 

gi j e j (t − τ (t))

i=1

 c − 2d eiT (t)ei (t) − ceiT (t − τ (t))ei (t − τ (t))] 1−τ

where L = max{λmax (F1T + F1 ), λmax (F2T + F2 ), . . . , λmax (FNT + FN )}. According to Lemma 2, one can get V˙ (t) ≤ [L +

c − 2d + cλmax ((G ⊗ Γ )(G ⊗ Γ )T )]eT (t)e(t) 1−τ

Therefore, by taking appropriate constant d, such that L+

c − 2d + cλmax ((G ⊗ )(G ⊗ )T ) < −1 1−τ

we can get V˙ (t) ≤ −eT (t)e(t). Apparently V˙ (t) ≤ 0, hence V (t) is uniformly t continuous. Meanwhile, we get V (t) ≤ V (0) exp(−2t). Thus, limt→∞ 0 V (s)ds exists. It indicates that V (t) is integrable on [0, ∞). According to Barbalat’s Lemma, we can get limt→∞ V (t) = 0, that is to say, ei (t) → 0,α¯ i (t) → 0, β¯i (t) → 0, a¯ i j (t) → 0, and g¯ i j (t) → 0 as t → ∞ (i = 1, 2, . . . , N ). This completes the proof.

Outer Synchronization Between Complex Delayed Networks …

141

4 Numerical Simulation In this section, we perform one representative example to demonstrate the main results which we obtained. In these simulations, the unified chaotic system [11] is choosed to be the node dynamics, which is described by ⎧ ⎨ x˙i1 = (25θ + 10)(xi2 − xi1 ) x˙ = (28 − 35θ )xi1 + (29θ − 1)xi2 − xi1 xi3 ⎩ i2 x˙i3 = xi1 xi2 − (8 + θ )/3xi3

i = 1, 2, . . . , N

(16)

where θ ∈ [0, 1]. θ = 0, the chaotic system (16) is Lorenz system; θ = 0.8, the system (16) is Lü system; θ = 1, the unified chaotic system becomes Chen system. Example 1 In this simulation, we take the Lü system as node dynamical system of the drive networks and take the Lorenz system and Chen system as node dynamics of the response networks. We apply the control scheme in theorem 1 to achieve the outer synchronization between the drive-response networks. The initial values of variables and parameters are given by xi j (0) = (−1)i (i + 0.1 j + 0.5), yi j (0) = i + 0.1 j, αi (0) = 0.2, βi (0) = 0.2, di (0) = 1, ai j (0) = 2, gi j (0) = 2, c = 0.02, m i = 4, n 1i = 2, n 2i = 3, p1i j = 4, p2i j = 4, ⎡ ⎤ ⎤ −14 1 2 3 0 10 −15 4 1 3 0 7 ⎢ 4 −16 ⎢ 4 −13 1 2 3 6⎥ 3 5 0 1⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ ⎢ ⎥ 5 −24 6 2 7⎥ 9 −18 0 6 2⎥ ⎢ 4 ⎢ 1 A=⎢ ⎥. ⎥, G = ⎢ ⎢ 3 ⎢ 0 0 1 −17 6 7⎥ 2 8 −12 0 2⎥ ⎢ ⎥ ⎢ ⎥ ⎣ 1 ⎣ 3 7 0 8 −19 3⎦ 2 1 8 −14 0⎦ 3 7 8 0 5 −23 2 3 5 9 0 −19 ⎡

The errors of the networks (15) can be shown in Fig. 1a, and b displays feedback gains di (t), i = 1, 2, . . . , 6. The identification of system parameters of the network (3) and (4) is displayed in Fig. 2. Figure 3 shows weights gi j , ai j of system (3) and (4), respectively.

5 Conclusions In this paper, outer synchronization between the drive-response delayed networks with both unknown parameters and unknown topological structure has been considered. For the case of different topology, both the uncertain system parameters and the unknown weighted coupling configuration matrix can be identified effectively. Based on Lyapunov stability theory, some sufficient conditions for achieving adaptive synchronization and parameter identification criteria are derived. The presented

142

Z. Chen et al.

Fig. 1 a Errors of the network (15). b Time evolution of feedback gains di (t), i = 1, 2, . . . , 6

Fig. 2 a Identification of parameters of network (3). b Identification of parameters of network (4)

Fig. 3 a Time evolution of coupling weights gi j of system (4). b Time evolution of coupling weights ai j of system (3)

Outer Synchronization Between Complex Delayed Networks …

143

approach is simple and easy to realize in practice. The numerical simulation result shows the correctness of the theoretical results and the effectiveness of the proposed methods. Acknowledgements This work was supported by the National Natural Science Foundation of China (No. 11672104), the Chair Professor of Lotus Scholars Program in Hunan Province (No. XJT2015408). The authors also would like to thank the support from the scientific research project of Hengyang Normal University (No. 18D24).

References 1. Strogatz, S.H.: Exploring complex networks. Nature 410, 268–276 (2001) 2. Nian, F.: Adaptive coupling synchronization in complex network with uncertain boundary. Nonlinear Dyn. 70, 861–870 (2012) 3. Zhang, Q., Lu, J., Lü, J., Member, S., Tse, C.K.: Adaptive feedback synchronization of a general complex dynamical network with delayed nodes. IEEE Trans. Circuits Syst. II Express Briefs 55(2), 183–187 (2008) 4. Gong, D., Zhang, H., Wang, Z., Huang, B.: Pinning synchronization for a general complex networks with multiple time-varying coupling delays. Neural Process. Lett. 35, 221–231 (2012) 5. Guo, W., Austin, F., Chen, S., Sun, W.: Pinning synchronization of the complex networks with non-delayed and delayed coupling. Phys. Lett. A 373, 1565–1572 (2009) 6. Lu, J., Kurths, J., Mahdavi, N., Cao, J.: Impulsive control for the synchronization of stochastic dynamical networks. In: Nonlinear Dynamics and Synchronization (INDS) & 16th Int’l Symposium on Theoretical Electrical Engineering, 1–5 (2011) 7. Li, C., Chen, L., Aihara, K.: Impulsive control of stochastic systems with applications in chaos synchronization, and neural networks. Chaos 18(2) (2008) 8. Tang, Y., Leung, S.Y.S., Wong, W.K., Fang, J.: Impulsive pinning synchronization of stochastic discrete-time networks. Neurocomputing 73, 2132–2139 (2010) 9. Lu, J., Cao, J.: Synchronization-based approach for parameters identification in delayed chaotic neural networks. Physica A 382, 672–682 (2007) 10. Khalil, H.K.: Nonlinear Systems. Prentice Hall PTR (2002) 11. Lü, J., Chen, G., Cheng, D., Celikovsky, S.: Bridge the gap between the Lorenz system and the Chen system. Int. J. Bifurc. Chaos 12, 2917–2926 (2002)

Discussion on the Application of Digital Twins in the Wear of Parts Fuchun Xie and Zhiyang Zhou

Abstract The virtual mapping system of physical and information fusion based on digital twin is one of the key technologies to realize intelligent manufacturing. Based on the application method and operation mode of twin in modern workshop, the application scheme of digital twin in parts wear is proposed in this paper. On the basis of the discussion and study of the speed of the machine, the heating condition, and the swaying amplitude, the digital twin technology is used, the model panel is designed, the position of the sensitive probe is set, the collected data is analyzed and inferred, the real-time condition of the machine is judged, and the control panel shows the predicted time point of failure and adjustment. The scheme can be obtained, and the result is helpful to advance the failure and avoid the risk of failure. Therefore, based on digital twin technology, the smooth operation of mechanical automation and unmanned automatic production in factories are guaranteed. Keywords Digital twin · Parts wear · Real time · Advance processing

1 Introduction In the twenty-first century, the operation mode of factories has been gradually changed to intelligent manufacturing which is how to communicate the data of physical chemical plants and digital systems. The application of digital twinning technology in the wear and tear of parts studied in this project could help the factory to stop the loss in time when the operation is not humanized so as to ensure the smooth operation of mechanical automation and provide the guarantee of unmanned automatic production in the factory. F. Xie (B) Hunan Province Engineering Laboratory of Wind Power Operation Maintenance and Testing Technology, Xiangtan 411104, China e-mail: [email protected] F. Xie · Z. Zhou College of Mechanical Engineering, Hunan Institute of Engineering, Xiangtan 411104, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_15

145

146

F. Xie and Z. Zhou

2 Research Status of Digital Twin Technology The concept of digital twin first appeared in 2003. It was proposed by Professor Grieves in the course of Product Life Cycle Management at the University of Michigan [1]. Later, the US Department of Defense introduced the concept of digital twin into space vehicle health maintenance and other issues [2] and defined it as a simulation process that integrates multi-physical quantities, multi-scale, and multiprobability. Based on the physical model of the aircraft, a virtual model of its complete mapping was constructed, using historical data and sensor reality. Updated data are used to describe and reflect the life cycle process of physical objects [3–5]. In civil products companies, digital twin technology is dedicated to helping manufacturing enterprises to build a production system model integrating manufacturing processes in information space and to digitize the whole process of physical space from product design to manufacturing execution [6–8]. Chinese scholars’ research on digital twin mainly focuses on the application theory and application mode. Tao Fei and others discussed the construction and application of digital twin future production workshop mode [9] and explored the key issues and technologies needed to break through in the process of 14 kinds of application conception and implementation of digital twin drive. It can be seen that digital twins are in a period of rapid development in China, which lays a solid theoretical foundation for the practical application of digital twins.

3 The 3D Model of Mechanical Operation Being Applied Six-axis mechanical arm of the six axes of intelligent robotic arm manipulator will be applied for model building and analysis, which compared to other mechanical arms with more degrees of freedom, its running speed is faster, more rich, the working environment and its relative load is bigger, better economic benefits. The specific diagram of the six-axis arm is shown in Fig. 1. Model parameters are initially in machine design and debugging of the data set, with the continuous operation, which provides the basis for adjustment of model parameters. The new parameters are compared with the operating data of the system in the later period of time. The reasons were summarized, and the scheme of data readjustment was proposed. Based on the comparison of the operation data of the new and old schemes, the reasons for the differences were analyzed, so the path of updating data was designed. The model of general framework is shown in Fig. 1.

Discussion on the Application of Digital Twins …

147

Fig. 1 Schematic representation of a six-axis robotic arm and model framework

4 Design of Parameters of Real-Time Wear Detection Model for Parts The main parameters of the model are determined according to the concrete realization of mechanical wear. The reason for the wear is simply that the contact points or surfaces of the machine move relative to each other by squeezing and rubbing, and the original relative movement changes. At this time, the machine will generate heat and slow operation, and the instability of the connection will even cause the machine to shake during the operation of the machine. Therefore, three parameters, such as running speed, temperature at the joint, and mechanical sloshing frequency, are selected for the model.

5 Design of Real-Time Wear Detection Model Panel 5.1 Data Comparison Panel Being Designed Design of Operating Speed Data Comparing Panel. The difference values between the standard operating speed and the maximum speed belong to the standard parameter, which is based on the original design or the optimal operating state of the machine in the commissioning process. After a period of operation in the factory, the data collected are summarized and analyzed by the model, and then the standard parameter values are obtained, which are set and adjusted by the operator. The panel design is shown in Fig. 2. Design of Temperature Data Comparing Panel at Connection. Standard operating temperature and standard speed set data sources being consistent, there will be a part of natural heating in the process of machine operation, so the given standard temperature is a range value. When the temperature of the connection

148

F. Xie and Z. Zhou

Fig. 2 Schematic diagram of operation speed data panel

exceeds the range value, it can be judged that there is a fault. At the same time, the weather changes will lead to different mechanical temperatures in some factories, which need to be adjusted by the operator. The concrete design of the panel is shown in Fig. 3. Design of Data Comparison Panel for Mechanical Sloshing. When the machine is installed, after the fixed bolt is tightened and stabilized, there should be no shaking in operation. Only when the fixed bolt is loosened, the arm is overloaded, or there is a change between the shafts, the machine will shake. Therefore, the

Fig. 3 Schematic diagram of temperature display panel at connection

Discussion on the Application of Digital Twins …

149

mechanical standard sloshing is zero, and the acceptable degree of sloshing is acceptable. The data collected during the experiment and debugging should be set by the installation and debugging personnel. The concrete design of the panel is shown in Fig. 4. Design of Final Data Display Panel. After the operation of the above three sub-processing panels, the output results are integrated into the data comparison display panel, which needs to include the output results of the three sub-data comparison. At the same time, the current mechanical operation situation is obtained through the output synthesis of the first three panels, and the operation diagram of the mechanical operation is attached to show the location of the failure. The specific design is shown in Fig. 5.

Fig. 4 Schematic diagram of display panel of mechanical sloshing data

Fig. 5 Schematic diagram of integrated display panel

150

F. Xie and Z. Zhou

Fig. 6 Schematic diagram of probe position and type

5.2 Setting the Position of Sensitive Probe The purpose of the sensor is to collect real-time mechanical data, transmit it to the analog twin through the data network, and then analyze and output the data. As the most front-end part of the whole system, the location of the probe determines whether the data collection is comprehensive or not. Therefore, the failure mode of the manipulator arm is analyzed and inferred to determine the position of the sensitive probe as shown in Fig. 6.

5.3 Replacement of Control Panel Design The main function of swap control panel is to make the operator adjust the operation conveniently and to ensure that the faults of some workstations can be handled in time. Therefore, the panel needs to have a convenient control operation button. As shown in Fig. 7, the indicator lamp of mechanical operation state is a threecolor display lamp, which is connected with the integrated display panel of machine data. The display effect is the same. Whether the indicator lamp can be automatically changed to a two-color display lamp is determined as follows. When the green color is displayed as an automatic replacement machine, it can be operated by a button, and then, the damaged machine can be sent to the overhaul office to record the damage data of parts and components for feedback; when the green color is displayed, there is no automatic replacement machine, which requires manual adjustment by the operator, replacement of the damaged machine, or on-site maintenance. After adjustment, the operator still needs to pay attention to the display of panel indicator.

Discussion on the Application of Digital Twins …

151

Fig. 7 Schematic diagram of control panel

5.4 Design of Model Output Panel The main contents of control output panel include three aspects: firstly, the next possible failure and its occurrence time point; secondly, the time point of failure is longer than the current controllable time point and gives operation hints and options to break; thirdly, setting the pipeline slows down button to prolong the repairable time and protect the machine from damage. Degree has two functions. Its specific design is shown in Fig. 8.

Fig. 8 Adjustment effect comparison panel design drawing

152

F. Xie and Z. Zhou

Fig. 9 Adjustment effect comparison panel design drawing

5.5 Design of Contrast Panel for Parameter Adjustment Effect After the whole system has been running for a period of time, the system shall provide the operator with parameter adjustment data. The operator shall simulate the operation data of twins, analyze the feasibility of parameter modification, and judge whether to replace the parameters. The replaced parameters shall be more consistent with the current operation of the machine. The operation data of “the original value” and “adjust parameter value” are mainly displayed in the “run effect contrast display panel”. The data during the operation of twins are analyzed to determine whether the original parameter setting value should be changed. The specific operation design is shown in the Fig. 9.

6 Research Summary As a real-time information interaction technology, digital twin technology is a virtual mapping system which can establish physical and information fusion. This paper studies the application of digital twin technology in parts wear, mainly in the following aspects. 1. Design of parameters of real-time wear detection model for parts. The main parameter types of the model are determined according to the specific realization of the wear of the machine. The reason for wear is simply that the machine has relative moving contact points or surfaces which are extruded and friction with each other. The original relative motion situation will be changed. At this time, the machine will generate heat, slow operation and other performances, and the

Discussion on the Application of Digital Twins …

153

joint. Instability may even cause machine sloshing when the machine is running, so the model chooses three parameters: running speed, temperature at the joint, and mechanical sloshing frequency. 2. Design of real-time wear detection model panel. According to the requirement of the model, the graph of the probe setting of the mechanical arm is drawn, and the data contrast display panel, data contrast synthesis panel, control panel, and control output panel are designed for the speed of the mechanical operation, the temperature of the joint, and the mechanical sloshing. At the same time, the design reasons for each panel and its working output are also given. The judgment situation is explained, and a whole system including functions of collecting data, processing data, predicting faults, resolving faults, feedback information, and so on is obtained.

References 1. Grieves, M., Vickers, J.: Digital twin: mitigating unpredictable, undesirable emergent behavior in complex systems, 85–112(2017) 2. Tuegel, E.J., Ingraffea, A.R., Eason, T.G.: Reengineering aircraft structural life prediction using a digital twin. Aerosp. Eng., 1687–5966 (2011) 3. Lehmann, C.: The digital twin: realizing the cyber-physical production system for industry 4.0. Procedia Cirp 61, 335–340 (2017) 4. Schleich, B., Answer, N., Mathieu, L.: Shaping the digital twin for design and production engineering. CIRP Ann. Manuf. Technol. 66(1), 141–144 (2017) 5. Qi, Q.L., Tao, F.: Digital twin and big data towards smart manufacturing and industry 4.0: 360 degree comparison. IEEE Access, 1–1 (2018) 6. Fei, T., Cheng, J., Qi, Q.: Digital twin-driven product design, manufacturing and service with big data. Adv. Manuf. Technol. 94(9–12), 3563–3576 (2018) 7. Tao, F.: Digital twin-driven product design framework. Product. Res., 1–19 (2018) 8. Tao, F., Zhang, M., Cheng, J.: Digital twin workshop: a new paradigm for future workshop. Comput. Integr. Manuf. Syst. 23(1), 1–9 (2017). (in Chinese) 9. The digital twin paradigm for future NASA and US air force vehicles. Comput. Integr. Manuf. Syst. 24(237): 4–21 (2018). (in Chinese)

Research on Key Algorithms of Segmented Spectrum Retrieval System Jianfeng Tang and Jie Huang

Abstract The quality of characteristic spectra stored in spectral database directly affects the matching calculation of retrieval algorithm. Spectral data is different from mass spectrometry. Mass spectrometry only needs to record the position and intensity of peaks. Spectral data is continuous. There are many useful information concentrated in fingerprint area. Usually, the dimension of spectral data is relatively high. At the beginning of the establishment of spectral database, the amount of data will be relatively small. Therefore, dimensionality reduction and feature extraction of spectral data are needed before building spectral database. The whole dimension reduction feature extraction method can retain less information about the region of interest. In order to solve this problem, this paper proposes a segmentation feature extraction algorithm. The classification verification experiment also proves that the segmentation method is better than the whole method. In addition, on the basis of feature extraction, a feature retrieval algorithm with piecewise weighting is implemented. The time and space complexities of the algorithm are related to the performance of spectral database. The larger the spectral database is, the slower the retrieval is, and the faster the retrieval is. Keywords Segmented spectrum retrieval · Principal component analysis · Dimension reduction

1 Introduction Nowadays, in chemical spectrum retrieval system, the most common way is to use information such as the location and intensity of characteristic peaks for encoding, storing, and retrieving. The representative spectrogram is mass spectrometry, which uses electron beam bombardment to bombard the molecules of the compounds to be detected, decomposes the molecules into charged fragments, and calculates the molecular weight and chemical substance concentration according to the position and J. Tang (B) · J. Huang School of Software Engineering, Tongji University, 201804 Shanghai, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_16

155

156

J. Tang and J. Huang

intensity of the peaks on the mass spectrometer. That is to say, only the characteristic peaks need to be located for mass spectrometry, as shown in Fig. 1. As can be seen from the above figure, in the spectral image retrieval system, only the location and intensity of the characteristic peaks need to be recorded, and in the subsequent retrieval, only the comparison with these peaks is needed [1]. In addition, some spectra do not have obvious characteristic peaks, such as near infrared data of ethanol, as shown in Fig. 2.

Fig. 1 Mass spectrogram of ethanol

Fig. 2 Near infrared spectroscopy of ethanol

Research on Key Algorithms of Segmented Spectrum Retrieval System

157

In the design of spectral image retrieval system, it is necessary to find lowdimensional data that can represent the spectrum and store and retrieve it with lowerdimensional data. This idea is mostly used in image-based spectral image retrieval system, and the first task is to reduce the dimension first. According to the method of image retrieval system, the overall dimensionality reduction of ethanol, such as that shown in Fig. 2, can preserve fewer dimensions after dimensionality reduction, and the information of these dimensions is enough to express the basic characteristics of ethanol. However, as can be seen from Fig. 2, the information on the right and left sides of the graph is the most representative. If the dimensionality is reduced globally, some information will be concealed. Especially when compounds are involved, the fingerprint area is the real place to distinguish different substances. The spectrum retrieval system in this paper is mainly aimed at continuous spectrum [2]. Based on the above problems, we adopt the method of segmentation when reducing the dimension of the spectrum. This method divides the dimension of the spectrum into several segments, reduces the dimension of the data of each segment, and uses the combination of all segments to represent the original spectrum. The advantage of this method is that more useful information can be retained in the fingerprint area, and the data of spectral database can be used not only for retrieval, but also for secondary analysis. The number of segments has a certain impact on the overall retrieval effect. In the follow-up part of the article, we will mainly introduce the segmentation algorithm and the benefits of segmentation. Especially when the number of samples is relatively small, the overall dimension reduction will lead to the VC dimension problem, and the VC dimension problem will be alleviated to a certain extent after segmenting the spectrum.

2 Data Sets and Settings In order to test and compare the performance between segmented feature extraction and global feature extraction algorithms, a standard Raman spectrum set is adopted in this chapter, which can be downloaded from the Internet [3]. Before using the data set, all the data types of feature attributes in the data set are changed to digital ones. There are 2545 samples in Raman data set, the dimension is 1834, and the sample category is 20. It is obtained by scanning 20 different strains with 532 nm laser wavelength. When the subsequent spectrum retrieval system is implemented, the data of training set and test set are all from Raman data set. All the programs in this paper are carried out on a machine with Intel Core i5-7500 processor, 3.4 GHz frequency, 16G memory, and Windows 10 operating system. The training set and test set of samples are divided by hold-out method on the data of 2–20 classes. The first class in the data set is retained as the training and testing of small samples. The feature extraction algorithm based on segmentation is based on the training set, while the spectral graph retrieval algorithm based on segmentation is based on the test set. The performance analysis and comparison of the algorithm are based on the test set. All the experimental programs involved in the

158

J. Tang and J. Huang

spectrum retrieval system are written in Python. The segmentation feature extraction, dimensionality reduction, and weighted matching algorithms in the process of system implementation are all called by the Python script by the plug-in manager of C#.

3 Segmented Spectral Feature Extraction Algorithm The dimension of the infrared data of a sample is generally high, and the cost of collecting the infrared data of a sample is usually high, so dimension reduction is particularly important. Feature extraction is directly related to the degree of preservation of original spectral data information. At present, dimensionality reduction of spectral data is basically all dimensions. After dimensionality reduction, some interested feature information will be lost. Therefore, after careful analysis of various spectrograms, it is found that the piecewise dimension reduction method can retain some band feature information to a large extent. The basic flow of the segmentation feature extraction algorithm is shown in Fig. 3. In Fig. 3, the PCA dimensionality reduction method is used. Its essence is to reduce the high-dimensional data from n dimension to K dimension (n  k) space [4]. Some orthogonal feature vectors are used to reflect the useful information in the original data as much as possible so as to minimize the projection error, so as to achieve the purpose of dimensionality reduction. For PCA algorithm, how to choose the number of principal components after dimension reduction to contain the information of original dimension is an important problem. Before solving it in practice, the number of principal components is unknown. Usually, the cumulative

Algorithm start Read spectrum data and initialize

Setting segment parameter n

PCA dimensionality reduction

PCA dimensionality reduction

for data in segment 1

for data in segment 2 Integration of data after dimensionality reduction Algorithm end

Fig. 3 Segmentation feature extraction process



PCA dimensionality reduction for data in segment n

Research on Key Algorithms of Segmented Spectrum Retrieval System

159

contribution rate is used to ensure the effect of dimension reduction. Its mathematical definition is: k λi  ck = mi=1 (1) j=1 λ j The larger the value of ck , the smaller the missing information is, the better the original data can be expressed by the principal component of k, on the contrary, the smaller the ck , the worse the effect. Usually, the cumulative contribution rate is 0.95 or 0.98. The Python code of PCA dimensionality reduction is as follows. Finally, the training model is returned. The dimensionality reduction of segmentation only needs to divide the original spectrum into several segments according to the granularity of segmentation, and then multiply with each column in the model. Finally, the dimensionality reduction results using the segmentation algorithm can be obtained, and then the characteristic spectrum of the spectrum to be retrieved can be obtained. import numpy as np; def PCAEx(data,ccRate): ave = meanX(data); m, n = np.shape(data); dAdjust = []; avgs = np.tile(ave, (m, 1)); dAdjust = data - avgs; covX = np.cov(dAdjust.T); featValue, featVec = np.linalg.eig(covX); index = np.argsort(-featValue); ccArray = np.cumsum(featValue). /np.sum(featValue); for i in ccArray: if ccArray[i] < ccRate: continue; model = featValue[:,1:i]; feature = dAdjust * np.matrix(featVec.T[index[:i]]); return model, feature; Because there may be no dividing relationship between dimension and number of segments, the data in the last segment will be processed separately. Another method is to put the last remaining part into the last paragraph for processing, and the method of this paper is to reduce the dimension as a separate paragraph. PCA is used to process the segment data, and the cumulative contribution rate is used to select the number of features. The default value is 0.95. The Raman data set is characterized by the fact that the cumulative contribution rate of the first component of PCA is already very large, so the data retained in each segment is only one-dimensional.

160

J. Tang and J. Huang

4 Segmented Spectrogram Retrieval Algorithms After the feature of the spectrum is extracted, it can be stored in the spectral database through the spectral retrieval system. When the spectrum to be retrieved arrives, a feature spectrum can be obtained by the same piecewise dimension reduction operation for the detected spectrum, and the spectrum matching can be carried out in the spectral database. In theory, if the spectrum to be retrieved is exactly the same as a spectrum in the spectral database, it should be matched completely. If not, there will be a similarity, and then according to the similarity, the corresponding category or substance of the spectrum will be determined. Of course, it is also possible that there is no spectral data at all, at which time the matching degree is usually relatively low.

4.1 Similarity Measure Method Spectrum retrieval is a matching process and also a process to find the size of individual differences. The matching degree is higher when individual differences are small, while the matching degree is lower when individual differences are large. The matching algorithm completes the matching work mainly by calculating similarity, which needs to satisfy the following constraints: ⎧ d(x, x) = 0 ⎪ ⎪ ⎨ d(x, y) ≥ 0 ⎪ d(x, y) = d(y, x) ⎪ ⎩ d(x, y) ≤ d(x, m) + d(m, y) In the application of spectral similarity measurement, the angle cosine distance is usually used. The calculation formula is very simple. It mainly calculates the angle between two vectors in space, and the similarity is determined by the range. However, the cosine distance has a stricter condition that the two vectors involved in the calculation must be of the same length, and that the dimensions of the two vectors must be the same. Once the dimensions of the two vectors are different, the calculation of the distance will stop. In the process of practical application, especially in the field of data mining, dimension inconsistency, and individual dimension loss often occur. In order to continue to use the distance of angle cosine, the general method is to add some artificial values to the missing position, such as null or the average value of vector data. The Raman data set used in this paper uses the cumulative contribution rate to determine the number of principal components in the process of feature extraction. Since each segment is not a fixed principal component number but the cumulative contribution rate is automatically selected, the dimension of the eigenvector may

Research on Key Algorithms of Segmented Spectrum Retrieval System

161

be different, which requires that the vector dimension with fewer features be complemented and the angle cosine square be included in the calculation of similarity. Method is to use the average value of the vector data to complement, but this value is generally different from the mean value. Therefore, we use Pearson correlation coefficient instead of angle cosine method, in which the Pearson correlation coefficient formula is: ρ X,Y =

cov(X, Y ) E[(X − μ X )(Y − μY )] = σ X σY σ X σY

(2)

From the theoretical deduction, Pearson coefficient is the angle cosine distance after de-centralization. Since it is de-centralization, the mean value at this time should be 0. It is convenient to calculate the similarity by filling in the data of different dimensions with 0. The derivation process is as follows: cov(X, Y ) E((X − μ X )(Y − μY )) = σ σ σ X σY n X Y − μ − μ (X )(Y i X i i) = i=1 Nσ σ n X Y (X i − μ X )(Yi − μi )   =   i=1 n n N n1 i=1 (X i − μ X )2 n1 i=1 (Yi − μY )2 n i=1 (X i − μ X )(Yi − μi )  =  n 2 n 2 − μ (X ) i X i=1 i=1 (Yi − μY )

ρ X,Y =

(3)

4.2 Segmented Spectrogram Retrieval Algorithms As shown in Fig. 4, the segmented spectral graph retrieval algorithm first calculates the distance between the segmented spectrum to be retrieved and the feature spectrum in the spectral database by similarity measure method from the spectral database, then gets the final similarity by weighting, and arranges it in the order of similarity from large to small, and gives a list of similarity. In this paper, we use the same weighting method. In practice, we can use different weighting methods according to the importance of fingerprint area, or we can use a voting mechanism similar to bagging.

162

J. Tang and J. Huang Algorithm start Using the same parameters to extract features for the samples to be retrieved

Calculating the Distance in

Calculating the Distance in

Section 1

Section 2



Calculating the Distance in Section n

Weighted averaging for similarity

Algorithm end

Fig. 4 Segmented spectrogram retrieval process

4.3 Analysis of Retrieval Performance In the process of spectral image retrieval, we first query all the characteristic spectra in the spectral database, then calculate the distance between the spectrum to be retrieved and all the characteristic spectra, and sort them according to the distance from large to small. Assuming that the total number of eigenvectors in spectral database is n and the dimension of eigenvectors is m, the time complexity of computing Pearson distance between two eigenvectors is O (m), the time complexity of computing one distance with all eigenvectors in spectral database is O (n * m), the time complexity of merging and sorting is O (n * logn), and the total time complexity of retrieval system is O (n * m) + O (n * logn). When m > logn, the time complexity of the piecewise retrieval algorithm is O (n * m), while when m ≤ logn, the time complexity of the algorithm is O (n * logn). In fact, the logarithm of the number of characteristic spectra in the spectral database is larger than the dimension of characteristic spectra, so the ultimate time complexity of the whole spectral retrieval system is O (n * logn). It can be seen that the performance of spectral retrieval system is related to the scale of spectral database. The more the number of characteristic spectra stored in the database, the more time-consuming the retrieval is. The spatial complexity of merge sort is O (n), the spatial complexity of distance calculation is O (m), usually n > m, so the spatial complexity of retrieval system is O (n). The spatial complexity of the piecewise spectral graph retrieval system is O (n), which is also related to the size of the spectral database.

Research on Key Algorithms of Segmented Spectrum Retrieval System

163

5 Conclusion The quality of characteristic spectra stored in spectral database directly affects the matching calculation of retrieval algorithm. Usually, the dimension of spectral data is relatively high. At the beginning of the establishment of spectral database, the amount of data will be relatively small. Therefore, dimensionality reduction and feature extraction of spectral data are needed before building spectral database. The whole dimension reduction feature extraction method can retain less information about the region of interest. In order to solve this problem, this paper proposes a segmentation feature extraction algorithm. The classification verification experiment also proves that the segmentation method is better than the whole method. In addition, on the basis of feature extraction, a feature retrieval algorithm with piecewise weighting is implemented. The time and space complexities of the algorithm are related to the performance of spectral database. The larger the spectral database is, the slower the retrieval is, and the faster the retrieval is.

References 1. Dcebska, B.J., Guzowska-Swider, B.: Spectral databases, infrared. Encyclopedia of Analytical Chemistry. Wiley, New York (2006) 2. Curry, A.S., Read, J.F., Brown, C.: A simple infrared spectrum retrieval system. J. Pharm. Pharmacol. 21(4), 224–231 (2011) 3. Peschke, K.-D., Haasdonk, B., Ronneber, O., Burkhardt, H., Rösch, P., Harz, M., Popp, J.: Using transformation knowledge for the classification of raman spectra of biological samples. In: Proceedings of the 4th IASTED International Conference on Biomedical Engineering, pp. 288– 293 (2006) 4. Ghasemi, Z., Vafaei, A., Monadjemi, S.A.: Comparison of accuracy and time complexity of PCA based algorithms for steel surface segmentation. Int. J. Res. Rev. Comput. Sci. 3(2) (2012)

Research on Fuzzy Control Strategy for Intelligent Anti-rear-end of Automobile Shihan Cai, Xianbo Sun, Yong Huang, and Hecui Liu

Abstract The purpose of this paper is to develop an automatic anti-rear-end collision warning system (ARCWS) with duel-cored technique. ARCWS takes use of information technology and fuzzy system, put STM32 as the center controlling and design DSP as the data processing. The paper introduces the working theory, the inner structure and the role of each module works. ARCWS can provide earlier warning and assistant brake for drivers so that to improve driving safety. Therefore, with its novel structure and simple operation, ARCWS would have good practical value and favorable popularization prospect. Keywords Sensor · Anti-rear-end collision · Fuzzy control strategy

1 Introduction The traffic safety has become a serious challenge to governments and society nowadays. According to the analysis of statistics of traffic accident types, rear-end collision has a larger proportion of the element causing traffic accident. And it also shows that the insufficient safe distance between two cars is the dominant reason to lead rear-end collision as the rear driver does not have enough braking reaction time. According to different location algorithms [1, 2], the way of research on anti-rear-end warning in China and other countries can be divided into DSRC location algorithm and FMCW millimeter-wave ranging. The former includes infrared ranging (achieved by the principle of time scaling) [3], ultrasonic ranging [4], binocular vision ranging [5] and image processing-based ranging [6]. The latter mostly uses modulated wave ranging [7]. They are called low-speed anti-rear-end collision [8] and highspeed anti-rear-end collision [9] based on different driving speeds of vehicles. The mathematical models of safe distance alter as speed changes. Different mathematical models of rear-end collision are decisive factor including the mathematical models S. Cai · X. Sun (B) · Y. Huang · H. Liu School of Information Engineering, Hubei Minzu University, 445000 Enshi, China e-mail: [email protected]

© Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_17

165

166

S. Cai et al.

based on adaptive fuzzy control [10], the mathematical models based on artificial neural network [11] and the mathematical models based on support vector machine theory [12]. The assistant control system designed in this paper has better adaptability than traditional driving experience; the characteristics of fuzzy control play a decisive role in this case. The fuzzy membership function of rear-end collision avoidance is based on driving data, and fuzzy rules make up for the lack of experience to some extent so that commits to more safety on control system. ARCWS could effectively reduce accidents. According to the data collected by each sensor, the control system can make intelligent analysis and calculation and remind the driver keeping safe distance between the other cars. In case of dangerous situation, even if the driver fails to make braking response in time, it can also assist the automatic braking to ensure the safe driving of the car [13].

2 Fuzzy Controller for Rear-End Collision Avoidance Fuzzy mathematics forms a branch of mathematics related to fuzzy set theory and fuzzy logic. It was founded by American Zadeh L. A. in 1965. Scientists have been pursuing the accuracy of things for a long time in traditional natural sciences. However, traditional mathematics has encountered difficulties in dealing with fuzzy phenomena. While we can infer that brain processes highly capable of fuzzy division, fuzzy judgment and fuzzy reasoning upon people’s experience, the natural language used by people in expressing things and transmitting knowledge has a certain degree of fuzziness [14].

2.1 Structure of Fuzzy Control System See Fig. 1.

Fig. 1 Structure of fuzzy control system

Research on Fuzzy Control Strategy for Intelligent …

167

The following distance represents the distance between the two cars measured by the modulation wave emitted by the DSP processor. The speed represents the current driving speed recorded by the Hall speed sensor through STM32. The deceleration refers to the deceleration of the cars after the input speed and distance are processed by fuzzy controller.

2.2 Process of Fuzzy Controlling Strategy

Safe distance calculation The rear car distance could be confirmed through establishing the safety distance model and the fuzzy control algorithm to analyze the whole automobile braking process. Finally, to make the estimate of assistant braking: Reaction time of driver t 1 : it means that a period of time from the moment when the rear driver detects confronted danger to the time of deciding when to slow down the car. The different individual elements have great impact on response time, such as the age, vision, gender and driving experience. The reaction time is calculated according to correspondent individual information. If the current speed is V 1 , the distance here is as follows: S1 = V1 × t1

(1)

Mechanical braking time t 2 : refers to the period of time from which the driver steps on brake pedal to the moment that brake disk fully attached to the brake disk. Mechanical braking time is closely related to vehicle quality. In t 2 , the speed is V 1 , so the distance here is as follows: S2 = V1 × t2

(2)

To reach the maximum deceleration, the car needs to keep decelerating until it stops. Maximum deceleration is related to the type of vehicle, the material of wheels and the road status. Collect those information and make an analysis with the help of the data about maximum deceleration, so that to get the maximum reduction of vehicle real-time speed, m/s2 , assume the speed of the vehicle at the moment is v2 , the speed of the rear car is V 1 , the acceleration of an ahead car is a1 , the rear is a2 , and relative speed of the two cars is V ref . The distance is: S3 =

  1 V2 (V1 − Vref ) − 2 a1 a2

(3)

A certain parking distance S 4 should be maintained from the car ahead, so the safe following distance S is [15]:

168

S. Cai et al.

S = S1 + S2 + S3 + S4

(4)

2.3 Designation of Fuzzy Controller The fuzzy controller sets the driving speed V and the following distance D as the input and the deceleration speed u as the output. The working process of it is to fuzz the input, form a reasonable membership function and fuzzy rules, and finally, get feasible output. The determination of membership functions In order to achieve the ideal control effect, it is inevitable to adjust the membership function. It is necessary to observe the fuzzy membership function and fuzzy rules to judge whether the input of the controller is reasonable. If it is not reasonable, the fuzzy controller can be adjusted by changing the membership function and modifying the fuzzy rules until the better control effect is achieved. Triangle membership function is used in this paper, which has high sensitivity [16].

f (x, a, b, c) =

⎧ ⎪ ⎨ 0, ⎪ ⎩

x−a , b−a c−x , c−b

x ≤a≥x ≥c a≤x ≤b b≤x ≤c

(5)

Following distance D: The range of the distance from the input to the car D is [0 100], and the unit is m. In this paper, radar ranging is adopted to obtain a difference frequency of the rising edge and falling edge of the modulated triangular wave, which can be expressed as: f b+ = f 0 − f d

(6)

f b− = f 0 + f d

(7)

In detail, f 0 is the offset frequency when measuring the relative stationary object. f b+ and f b− represent the difference frequency obtained by the positive frequency modulation of the front half cycle and the negative frequency modulation of the back half cycle of the modulated wave, respectively; f d is the Doppler frequency shift when measuring the relative moving object. According to Kepler’s frequency shift principle, the Doppler frequency shift f d can be expressed as: fd =

2fv c

(8)

Research on Fuzzy Control Strategy for Intelligent …

169

Fig. 2 Membership function diagram of following car distance

Besides, f is the frequency of the center of the modulated wave, and v is the relative velocity of motion, whose symbol is determined by the direction. From the above two equations, the following formula can be obtained: R=

cT ( f b− + f b+ ) 8F

(9)

Five fuzzy subsets are selected, which are small (VS), small (S), medium (M), large (L) and large (VL). Triangle membership function is selected by following car function formula, and its functional range is shown in Fig. 2. Running speed V: The range of the input running speed V is [0 80], and the unit is km/h. Hall speed sensor is used for vehicle speed acquisition in this paper, which generates pulse signals based on the interaction between magnets on the automobile shaft disk and Hall components [17]. Laps per kilometer: NF =

1000m πD

(10)

In the above quantitative relation, D is the tire diameter, and m is the number of wheel magnets. STM32 timer is set to interrupt the car every 1 km. The speed measurement of a car can be calculated by calculating the number of revolutions of a car in 1 s: v=

N1 m 60

(11)

Five fuzzy subsets are selected, which are respectively large (PB), large (PS), medium (ZE), small (NS) and small (NB). The triangular membership function is selected by the velocity formula, as shown in Fig. 3.

170

S. Cai et al.

Fig. 3 Membership function diagram of driving speed

Braking quantity u: The range of output brake quantity u is [0 80], and the unit is km/h. Five fuzzy subsets are selected, namely zero (ZE), slight (VS), small (S), large (B) and large (VB). Its membership function is triangular, as shown in Fig. 4. The establishment of controller fuzzy rules When STM32 receives the information of vehicle speed (V ) and vehicle distance (D), the fuzzy controller with double input and single output follows the rules that the larger the relative distance is, the smaller the braking capacity is, and the faster the driving speed is, the more the braking capacity is. The rules in Table 1 are established for fuzzy control. Fig. 4 Diagram of brake quantity membership function

Research on Fuzzy Control Strategy for Intelligent …

171

Table 1 Fuzzy control rule Speed

Distance VS

S

M

L

VL

PB

VB

B

S

S

VS

PS

VB

B

S

VS

VS

ZE

B

B

VS

VS

VS

NS

B

B

VS

ZE

ZE

NB

B

B

ZE

ZE

ZE

3 System Design Scheme The system adopts STM32 as the control core and DSP as the data processing dualcore controller [18]. The STM32 controller processes the state data and obtains the driver’s response time, the mechanical braking time of the car, and the braking deceleration speed. The vehicle is equipped with radar sensors, which are modulated and transmitted by DSP [19], and receive echoes. The relative distance and relative speed signals are calculated and sent to the controller. Meanwhile, the vehicle speed signal and direction rotation angle signal measured by the vehicle Hall sensor are sent to the controller. The controller processes the above data to obtain the real-time safe distance from the car. If the distance from the car is less than the safe distance, the control module will issue the sound and light alarm warning, and control the solenoid valve and oil pump motor to conduct auxiliary braking to prevent rear-end collision (Fig. 5).

Fig. 5 System architecture diagram

172

S. Cai et al.

3.1 System Hardware Design The hardware system is mainly composed of four parts, which are man–machine unit, information acquisition unit, control unit and execution unit. The human–machine interface mainly includes displaying the current following distance and speed. The acquisition unit uses the vehicle-mounted Hall sensor to collect the speed and rotation angle information, and the radar signal is output by DSP to collect the following distance. The control unit conducts fuzzy control of vehicle braking through STM32 through the collected signals and warns the driver of artificial braking through the human–machine interface. The hardware structure of the system is shown in Fig. 6. Information Acquisition Unit The unit is mainly composed of speed sensor, angular velocity sensor and radar module. The most commonly used Hall speed sensor n1h-5c-70 is used to measure the driving speed of the car. The speed of the second workshop is measured by shortwave radar, which has the advantages of long distance, high precision and strong antiinterference. Radar module IVS179 limber motion information is collected through the signal processing circuit, demodulation, filter and amplification and clipping, after two-way AD conversion data communication with the DSP, DSP for data processing, according to the design of the algorithm to measure the Doppler frequency of relative movement between two cars. The angle sensor adopts Hall angle sensor RB100, which is used to calculate the steering wheel offset angle, so as to obtain the steering angle of the car. When the car turns or turns, adjust the angle of radar measurement, keep the speed measuring device and the car in front to maintain a relatively straight direction, this can reduce the car in the corner when the speed measuring device will take the fence and other obstacles on both sides of the road as the car in front of false alarm. The radar ranging circuit is shown in Fig. 7.

Fig. 6 Diagram of system hardware structure

Research on Fuzzy Control Strategy for Intelligent …

173

Fig. 7 Radar ranging circuit

Control Unit The control unit is mainly composed of STM32 as the control core and DSP as the data processing dual-core control. The module uses STM32F103 chip to realize control functions: state data processing, various sensor signal processing, execution unit control and DSP data communication. Radar data processing is relatively complex, and DSP has a significant advantage in digital signal processing. In order to improve the speed and accuracy of data processing, DSP chooses TMS320F2812 chip for dedicated radar data processing. The control unit calculates the relative speed and distance of the two cars in real time. When the actual distance between the two cars is less than the safety distance set by the system, the sound and light alarm start the execution unit to assist braking, as shown in Fig. 8. Execution Unit The unit mainly includes: oil pump motor and solenoid valve control device, sound and light alarm device, man–machine interface. Oil pump motor and solenoid valve

Fig. 8 Control unit circuit

174

S. Cai et al.

Fig. 9 Executive unit circuit

control device are used to control the oil and gas door switch, thus assisting to control the speed of the car; sound and light alarm devices are used to warn the driver. Both devices are controlled by STM32. When there is a dangerous situation, the sound and light alarm device is controlled to warn the driver. Meanwhile, the oil pump motor and solenoid valve are controlled to block the energy supply channel. After the state data are processed by the STM32 controller, the man–machine interface, respectively, obtains the reaction time of the driver, the mechanical braking time of the car and the braking deceleration speed. It is not only the judge basis of the main controller but also a reference for the driver, as shown in Fig. 9.

4 The Software Design of System The operation steps of the software design system are as follows: Step 1: to carry on the overall system initialization, including data initialization, register initialization, bus initialization and acquisition sensor initialization. Step 2: to judge whether auxiliary braking is necessary. By pressing the key, one can enter or exit the auxiliary braking mode. After entering the auxiliary braking, it can judge whether it is in a straight or curved street by the angle sensor, and by changing the radar range angle under the curve, we can prevent false alarm and braking. Step 3: on-board Hall sensor and radar ranging signal received through DSP are displayed on the screen through STM32 and are calculated to judge the safe distance. When the distance is less than the safe distance but without auxiliary braking, the speed, distance and safety alarm are only displayed on the display interface to remind the driver to manually brake or to slow down. When the distance is smaller than the safe distance and there is auxiliary braking, the auxiliary braking is carried out hierarchically. First, the microwave radar uses Doppler effect to measure the distance between the actual distance R and the safe distance S. If R is less than S, the warning device and auxiliary deceleration device are controlled to ensure the safe distance. The main program flow chart of the system is shown in Fig. 11.

Research on Fuzzy Control Strategy for Intelligent … Fig. 10 Main flow chart

175

Start

Whether to turn on the auxiliary brake

Is it straight

Hall speed Radar ranging

Speed distance display

Curved sensor Change radar ranging angle

Hall speed Radar ranging Speed following car distance display

Is it safe to follow the car

Graded auxiliary deceleraƟon Interface display

Is it safe to follow the car

Mamdani model with slow speed but steady system dynamic characteristics was selected in GUI [20], and input vehicle distance (D), input vehicle speed (V ) and output brake (u) were respectively established in FIS. The diagram is shown in Fig. 10.

5 The Fuzzy Control Simulation Based on Simulink This chapter is the simulation of fuzzy control strategy of anti-rear-end collision system in MATLAB/Simulink platform. First, according to the system control method of fuzzy control theory introduced in detail in Chap. 1, it describes how to use the fuzzy toolbox GUI of MATLAB/Simulink to design the system controller, including establishing membership function in FIS, compiling fuzzy rules, selecting the clearness method and viewing the output surface of fuzzy rules. Finally, the brake fuzzy control surface is described by the example of FIS fuzzy rule observation window.

176

Fig. 11 Brake control FIS

Fig. 12 Membership function of distance FIS

S. Cai et al.

Research on Fuzzy Control Strategy for Intelligent …

177

5.1 The Establishment of Fuzzy Reasoning System According to the characteristics of input and output quantity in the fuzzy controller model established in the first chapter of this paper, Mamdani model with slow speed but steady system dynamic characteristics was selected in the fuzzy control box GUI of Simulink [20]. Input distance (D), input speed (V ) and output brake (u) were, respectively, established in FIS. The diagram is shown in Fig. 11.

5.2 Compilation of Fuzzy FIS Input and Output Membership Function for Anti-rear-end Collision System The membership function of vehicle distance control and its surface are shown in Fig. 13; the membership function is selected as a triangle. According to the calculation above safe distance, it is known that the vehicle distance with the vehicle has entered the dangerous vehicle distance within 100 m; therefore, the car distance interval was set at 0–100 m, and the following triangular fuzzy control diagram was selected for the five input language values to set up fuzzy rules (Fig. 12). As shown in Fig. 14, the speed control membership function and its surface are set as 0–80 km/h. The following triangular fuzzy control diagram is selected from the five input language values to set up fuzzy rules.

5.3 Compilation of FIS Fuzzy Rules for Anti-rear-end Collision System The fuzzy control rules formulated in the first chapter of this paper were compiled as follows, and the weighted average method was used to select the clearness method (Fig. 15). The effect diagram of fuzzy control is as follows, and the braking process surface diagram of anti-rear-end collision system is obtained (Fig. 16). From the output curve of fuzzy rules of distance control and speed control, it can be seen that the fuzzy controller designed in this paper has smooth and continuous output and can be used as the controller of rear-end collision warning system. Among them, the output braking quantity of vehicle distance control and vehicle speed control represents the speed reduction when the car is carrying on auxiliary braking, and their respective curves are shown in the figures above. As you can see the picture (D), input shaft from the car increases with the decrease in relative distance as the input relative distance fluctuates between 0 and 100 m for auxiliary brake; under the most dangerous 20 m range, braking capacity is maintained at maximum, which can ensure the safety of the vehicle to slow down to avoid collision. In about 20–80 m, reducing speed declines smoothly and continuously,

178

S. Cai et al.

Fig. 13 Membership function of vehicle speed FIS

which ensures the vehicle speed can be controlled within the scope of sufficient reaction time for the driver. Input shaft speed (V ) is the relative speed which goes up with the speed as the relative velocity is between 0 and 80 km/h for auxiliary brake. The speed is relatively low in the 0–40 km/h when the amount of braking is small, which ensures the vehicle moves without interference, and in the relatively high-speed process of more than 40 km/h speed, the amount of braking increases smoothly and continuously, which ensures vehicle slows down quickly in dangerous distance between vehicles. Among them, the speed curve corresponds to a small braking range, while the distance curve corresponds to a large braking range, which reflects that the distance has a great impact on the anti-rear-end collision system. The overall fuzzy control output

Research on Fuzzy Control Strategy for Intelligent …

179

Fig. 14 Fuzzy rule compilation

surface diagram is smooth and obviously layered, which is conducive to classify auxiliary braking and can effectively increase the accuracy of braking control.

6 Conclusion Using sensor technology and fuzzy system as the foundation, this paper applied data acquisition system, DSP ranging and STM32 to do data processing, manual interface of voice alarm and interface display to design automatic anti-rear-end collision fuzzy system, and analyze the simulation and achieve vehicle collision risk of alarm display and anti-rear-end collision fuzzy control system. The result shows that compared with the general anti-rear-end braking system, this paper has the advantages of smooth, continuous and hierarchical controlling system and has a good performance of control strategy in the anti-rear-end braking system.

180 Fig. 15 Fuzzy rule output surface

Fig. 16 Fuzzy rule output surface

S. Cai et al.

Research on Fuzzy Control Strategy for Intelligent …

181

References 1. Bansal, G., Kenney, J.B., Rohrs, C.E.: LIMERIC: a linear adaptive message rate algorithm for DSRC congestion control. IEEE Trans. Veh. Technol. 62(9), 4182–4197 (2013) 2. Sheng, H.: Research on if filter used in FMCW millimeter-wave radar. J. Infrared Millim. Waves 20(6), 472–476 (2001) 3. Zhang, X., Zhang, H.P.: Research and design of ranging alarm system based on infrared sensor in Chinese. Coal Technol. 34(11), 287–290 (2015) 4. Yuan, J.: Design of High Precision Ultrasonic Ranging System Based on STM32 Single Chip Microcomputer in Chinese. North China Electric Power University (2012) 5. Wang, Y.: Research on Vehicle Front Moving Target Detection and Ranging Technology Based on Binocular Vision in Chinese. Tianjin University of Technology (2019) 6. Sasaki, N., Iijima, N., Uchiyama, D.: Development of ranging method for inter-vehicle distance using visible light communication and image processing. In: International Conference on Control (2015) 7. Zeng, L.Q.: Research on Direction Modulation Technology in Millimeter Wave Communication in Chinese. University of Electronic Science and Technology (2018) 8. Zhang, X.B., Huang, D.K., Zhou, X.J., Lu, D.L.: Anti-control vehicle rear-end intelligent technology in Chinese. Microcomput. Appl. 29(11), 20–22 (2013) 9. Fang, W.: Design and Research of Anti-collision Collision System for Highway Vehicles Based on DSRC in Chinese. Hunan University (2017) 10. Gan, N.T., Chen, L.S.: Research on fuzzy control rule of anti-vehicle rear-end collision by Matlab and Simulink. Adv. Mater. Res. 3, 308–310 (2011) 11. Wei, Z., Xiang, S., Xuan, D., et al.: An adaptive vehicle rear-end collision warning algorithm based on neural network. Commun. Comput. Inf. Sci. 236, 305–314 (2011) 12. Hu, M.J., Ge, R.H., Su, Q.Z.: Research on vehicle rear-end prediction method based on GASVM in Chinese. Automob. Technol. (11), 24–26, 49 (2012) 13. Li, M.: Application of Multi-sensor Cooperative Signal Detection Method in Automobile Anticollision Alarm in Chinese. University of Electronic Science and Technology (2016) 14. Zadeh, L.A.: Fuzzy sets. Inf. Control 8(3), 338–53 (1965) 15. Tian, Z.W.: Mathematical model of safety distance for automobile anti-tailing warning system. J. Wuhan Univ. Technol. (Inf. Manag. Eng.) 31(04), 590–593 (2009) 16. Shi, X.M., Hao, Z.Q.: Fuzzy Control Machine MATLAB Simulation in Chinese. Tsinghua University Press/Jiaotong University Press, Beijing (2008) 17. Liu, Y.: Design of electronic speedometer based on hall sensor in Chinese. Mod. Comput. (Prof. Ed.) (26), 36–38, 42 (2017) 18. Zhou, J.W.: Research and Development of Automobile Anti-tailing Warning System in Chinese. Chongqing Jiaotong University (2018) 19. Cuma, M.U., Ahmet, T., Mehmet, T., et al.: Experimental architecture of a DSP based signal generation for PWM inverter. Comput. Appl. Eng. Educ. 19(3), 561–571 (2011) 20. Zhong, F., Zhong, S.T.: Application research of Mamdani and Sugeno type fuzzy reasoning in Chinese. J. Hubei Univ. Technol. 02, 28–30 (2005)

Design and Optimization of Wind Power Electric Pitch Permanent Magnet Synchronous Servo Motor Weicai Xie, Xiaofeng Li, Jie Li, Shihao Wang, Li He, and Lei Cao

Abstract Aiming at the high requirements of the electric pitch servo system of the megawatt high-power wind turbine, combined with the design characteristics of the permanent magnet synchronous servo motor, the field-circuit combination method is used to electromagnetically design the pitch permanent magnet synchronous servo motor through finite element analysis. The software is modeled and simulated, and the genetic algorithm is used to optimize the cogging torque and the volume of the permanent magnet. The electromagnetic optimization scheme is determined. Then according to the scheme prototyped the prototype, the experimental results show that the optimized pitch servo motor meets the performance requirements. Keywords Wind power electric pitch · Permanent magnet synchronous servo motor · Simulation and optimization · Test analysis

1 Introduction With the increasing capacity of megawatt wind turbines, the electric pitch servo motor is part of the core pitch servo system of the wind turbine, and its performance requirements are continuously improved. Generally, the servo drive motor used in the existing wind turbine electric pitch system is a DC servo motor and an AC variable frequency asynchronous motor, and the performance needs to be improved. The permanent magnet synchronous motor has the advantages of large torque, small torque ripple, wide speed range, and fast response, which makes the permanent magnet synchronous motor have its own advantages. It has been widely used in the electric pitch servo system of the new megawatt high-power wind turbine [1]. In the foreseeable future, the permanent magnet synchronous servo motor will gradually replace the W. Xie · X. Li (B) · S. Wang · L. He · L. Cao Hunan Provincial Key Laboratory of Wind Generator and Its Control, Hunan Institute of Engineering, 411104 Xiangtan, China e-mail: [email protected] J. Li XEMC Wind Power Co., Ltd, 411102 Xiangtan, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_18

183

184

W. Xie et al.

Fig. 1 Stator slot type and dimensions

existing traditional electric pitch drive motor, in order to meet the high requirements of modern large-scale wind turbines, and especially offshore wind turbine pitch systems, this paper optimizes and designs permanent magnet synchronous electric pitch servo motors, and verifies the performance of the optimized design of electric pitch motors through simulation and test.

2 Electromagnetic Design According to the requirements of a certain type of wind turbine for the driving performance of the electric pitch servo drive system, the technical requirements are as follows: PN = 8.6 KW; UN = 400 V; IN = 14.52 A; n = 2000 r/min; η ≥ 93%. Phase number is 3, Y Forming method, insulation grade is F. The main dimensions of the motor: The inner diameter of the stator is 120 mm, the length of the iron core is 145 mm, and the air gap is 1 mm.

2.1 Stator and Rotor Structure Design This design of the motor is 8 poles. The number of stator slots is 36 slots. The stator slot adopts a semi-closed slot, and stator slot and dimensions are shown in Fig. 1. The stator core was formed by lamination using DW470-50 non-oriented cold-rolled silicon steel sheets. The stator slot type is shown in Fig. 1, and the rotor magnetic circuit structure is shown in Fig. 2.

2.2 Permanent Magnet Design The motor rotor structure of this design is surface-inserted, and its main size can be determined by the following formula:

Design and Optimization of Wind Power Electric Pitch …

185

Fig. 2 1—Permanent magnet; 2—turn shaft; 3—guard ring; 4—rotor core; 5—pole filler

bM = αi τ hM =

μr δ Br /Bδ − 1

(1) (2)

Permanent magnet magnetization direction length hM is 5.0 mm. Permanent magnet rotor circumferential width bM = 3.768 mm. The design of the permanent magnet material grade is N38UH, the tile-shaped surface insertion structure, the central angle of the magnetic tile is 36°, and the polar arc coefficient: αi = 0.8. The residual magnetic flux density Br20 = 1.22 T, and Br = 1.125 T coercive force H c20 is 923 kA/m, H c = 851 kA/m, and the maximum operating temperature is 18 °C. Relative return permeability: μr = 1.05, the demagnetization curve inflection point at the highest working temperature: bk = 0, providing the area of each pole flux cut: S M = 5147 mm2 .

2.3 Electromagnetic Calculation Results The designed motor was electromagnetically calculated by the magnetic circuit method [2, 3]. The motor efficiency was 95.07%, the stator current was 13.1 A, and the power factor was 0.997, which met the design requirements. The magnetic flux map and magnetic field distribution diagram of the motor are shown in Figs. 3 and 4. The distribution of magnetic lines and the saturation of the magnetic circuit of the motor are consistent with the electromagnetic calculation.

186

W. Xie et al.

Fig. 3 Magnetic field distribution

Fig. 4 No-load magnetic dense diagram [1]

3 Electromagnetic Simulation and Optimization of Servo Motor Using ANSYS Maxwell electromagnetic simulation software, the important parameters selected by the empirical value in the magnetic circuit calculation are simulated and calculated [4]. The simulation results are as follows: The no-load leakage magnetic coefficient σ 0 = 1.1561, the armature calculation length is lef = 148.1465 mm, calculated pole arc coefficient αi = 0.76, air gap coefficient K δ = 1.6. Replace

Design and Optimization of Wind Power Electric Pitch …

187

the above parameters with the original parameters to obtain a better electromagnetic design.

3.1 Motor Optimization Based on Genetic Algorithm Maxwell’s post-processing capabilities include optimization processing, which is based on the genetic algorithm. The principle of it is to set the solution of several problems to be solved as the first-generation chromosome, and each chromosome is a point of the solution space. Screening of optimal solutions is performed through a series of genetic manipulations such as chromosome evaluation, selection, hybridization, and mutation. It is suitable for any class function with or without expression and can realize parallel computing behavior and solve real-life production problems with complex optimization. When optimizing the genetic algorithm module, the optimization objectives, optimization variables, and constraints need to be selected. Select cogging torque and permanent magnet volume as the target of this optimization. The optimization variables select the polar arc coefficient and the permanent magnet thickness. The heat load, the air gap magnetic density, the motor power factor, the starting torque multiple, and the maximum torque multiple are set as constraints [5, 6].

3.2 Comparison of Results Before and After Optimization The motor preliminary calculation of the magnetic circuit calculation is carried out, and the motor is simulated according to the optimized parameters. The results are as follows: 0.8 before the optimization of the pole arc coefficient and 0.822 after the optimization; the thickness of the permanent magnet is 5 mm before optimization and after optimization 4.75 mm; the cross-sectional area of the permanent magnet is 174 mm2 before optimization and 177 mm2 after optimization. Comparison of cogging torque and air gap magnetic density is shown in Figs. 5 and 6. From Fig. 5, the waveform of the cogging torque before and after optimization is optimized, and the optimized cogging torque is significantly reduced. From Fig. 6, the waveform distribution of air gap flux density has little change. The no-load voltage is 218.46 V before optimization and 219.72 V after optimization. After optimization, there is a slight increase before optimization. The load voltage is 223.85 V before optimization and 224.26 V after optimization, which is almost unchanged. Compared with the no-load induced electromotive force, it indicates that the armature reaction plays a role of magnetic assist during load. Figure 7 shows the comparison of load torque before and after optimization. The optimized torque ripple becomes smaller, and the torque average increases.

188

W. Xie et al.

Fig. 5 Comparison of cogging torque “-” before optimization, after “ -” optimization

Fig. 6 Comparison of air gap magnetic density “-” before optimization, after “ -” optimization

Fig. 7 Comparison of load torque “-” before optimization, after “ -” optimization

Design and Optimization of Wind Power Electric Pitch …

189

4 Test and Analysis of Electric Pitch PMSM This test is based on the current national standard GB/T 22669-2008 for the threephase synchronous permanent magnet synchronous motor test method. The prototype is tested and verified in combination with the existing AC pitch motor test platform. The test items include no-load back EMF determination test and load test.

4.1 No-load Back EMF Measurement Test In this test, the anti-drag method is used to measure the no-load counter-electromotive force. The DC motor of the electric power dynamometer is used to drag the prototype of the test, and the prototype is operated as the generator under the synchronous speed. At this time, the three lines when the output of the prototype is open are measured. The average value of the voltage is the measured value of the no-load counter-electromotive force of this test. Since the DC motor’s electric state speed does not reach the rated speed required for the test, it must be further converted to the rated speed according to the formula E 0 = 4.44k f N Φ

(3)

n = 60 f / p

(4)

The test measured three line voltages of 375.25, 377.25, and 379.01 V, and the average value of the no-load back EMF of the prototype was 377.17 V, which is similar to the calculated value of 385.33 V in the electromagnetic scheme.

4.2 Motor Load Test The test starts from the no-load of the prototype, gradually adjusts the size of the load, records the electrical parameters of the prototype under different loads, and calculates the efficiency of the motor under different loads. Experimental data are arranged as shown in Figs. 8 and 9. The test data are compared with the previously calculated data, and the test results are basically consistent with the design calculation which satisfies the requirements of a certain type of wind turbine generator electric propeller servo drive system.

190

W. Xie et al.

Fig. 8 Current varies with load

Fig. 9 Efficiency varies with load

5 Summary In this paper, the design characteristics and methods of wind turbine electric pitch permanent magnet synchronous servo motor are studied. The electromagnetic design of permanent magnet synchronous servo motor for the electric pitch of a certain type of wind turbine is carried out. Firstly, the electromagnetic scheme is roughly determined by the magnetic circuit calculation. Then, the main parameters in the electromagnetic calculation process are simulated by the finite element simulation software, and then, the cogging torque affecting the performance of the motor and the cost of the motor is always used by the genetic optimization algorithm. The volume

Design and Optimization of Wind Power Electric Pitch …

191

of the magnet was optimized. Finally, the prototype test was carried out by using the existing motor test platform, and the test proved to be effective. Acknowledgements A project supported by Scientific Research Fund of Hunan Provincial Education Department (18A348) and Hunan Science and Technology Program Funding Project (2016GK2018).

References 1. Tang, R.Y.: Theory and Design of Modern Permanent Magnet Motor. Beijing Mechanical Industry Press, Beijing (2000) 2. Zhao, B., Zhang, H.L.: Application of Ansoft 12 in Engineering Electromagnetic Field. China Water Resources and Hydropower Press, Beijing (2013) 3. Xie, W.C., Zhou, J.R., Chen, J.X., Li, X.F.: Development of low voltage wind power pitch AC variable frequency motor. Hunan Inst. Eng. (Nat. Sci. Ed.) 28(01) (2018) 4. Zhu, H.C.: Design and Control of PMSM for Wind Power Independent Pitch. Shanghai Jiaotong University, Shanghai (2014) 5. Xin, W., Han, L., Zhao, B.: Finite element analysis of main coefficients in magnetic circuit calculation of permanent magnet motors. Small Spec. Electr. 42(7) (2009) 6. Zhao, W.B., Zhang, Y.H.: Application of genetic algorithm in the combined design of electromagnetic scheme of motor. Explosion-proof Electric Machine, vol. 4 (2008)

Design of Step Servo Slave System Based on EtherCAT Liang Zheng, Zhangyu Lu, Zhihua Liu, and Chongzhuo Tan

Abstract With the rapid development of industrial control industry, the requirements for fieldbus are getting higher and higher. Fieldbus is required to have the characteristics of long transmission distance, fast transmission speed, and high realtime performance. The traditional fieldbus cannot meet the development needs of the modern industry, so it is a trend to apply real-time industrial Ethernet technology to the step servo industry. Among many real-time industrial Ethernet networks, the EtherCAT (Ethernet control automation technology) from BECKHOFF of Germany is highly praised for its real-time performance, high synchronization accuracy, support for multiple topologies, and wide applicability. The slave station system designed in this paper is based on the scheme of STM32 + AX58100. The main station uses BECKHOFF configuration software TwinCAT, through which the basic functions of the slave station system are tested. The test results show that the slave station system can meet the design requirements and achieve the purpose of accurate, fast, and stable control of the motor. Keywords Step servo · Industrial Ethernet · EtherCAT · Slave system · AX58100

1 Introduction With the rapid development of industry and the continuous improvement of the degree of automation, people have higher and higher requirements on technology. The number of units in the system is increasing, the data transmission distance is becoming longer and longer, and the synchronization between units is becoming more and more difficult. Conventional fieldbus has the shortcomings of inconsistent standards, poor compatibility, and poor real-time performance, and it cannot meet

L. Zheng (B) · Z. Lu · Z. Liu · C. Tan Hunan Collaborative Innovation Center for Wind Power Equipment and Power Conversion, Hunan Institute of Engineering, 411104 Xiangtan, Hunan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_19

193

194

L. Zheng et al.

the development of the modern industry [1, 2]. It is a general trend to develop fieldbus with high real-time performance, uniform standard, and good synchronization performance. At present, many manufacturers have started to apply Ethernet technology in the industry, and many practical products have been developed, including EtherCAT, Powerlink, Profinet IRT, etc. [3]. Among them, BECKHOFF’s EtherCAT is widely used for its stability, reliability, high real-time performance and complete compliance with Ethernet standards [4]. Based on this, many domestic and foreign manufacturers have started to study their slave station system, and common schemes of the slave station system include FPGA + IPcore, MCU+ dedicated ESC chip, and integrated chip integrated with MCU+ dedicated ESC chip. Literature [5] and literature [6] adopt the first scheme, which requires more engineers and costs more; Literatures [7] and literature [8] adopt the second scheme, in which ESC chip is responsible for processing and analyzing messages and transmitting the parsed data to MCU, which is responsible for specific control tasks. Since the data analysis, extraction and insertion from the slave station are all completed by hardware and are not affected by MCU performance, the delay time is small and the real-time performance is high, so the scheme is most widely used; The ESC chip used in the literature [7] is Lan9252, while the ESC chip used in the literature [8] is ET1100. These two chips are produced abroad, with long delivery cycle and high price; Literature [4] adopted the third plan, which used integrated chips to design EtherCAT slave station system. Compared with the second plan, this plan has limited functions and is not flexible enough. In this paper, three schemes are compared and evaluated. The second scheme is STM32 + AX58100, which has a low cost and short development cycle. The test results show that the slave station system designed by this scheme meets the design requirements and can control the stepping motor accurately and quickly.

2 Introduction to the EtherCAT Protocol EtherCAT protocol was developed by BECKHOFF company in Germany when the traditional industrial bus can no longer meet the requirements of the modern industry. It has been widely used in industrial control industry and gradually become the mainstream due to its advantages of high real-time performance, complete compliance with Ethernet standard, and easy implementation [9]. EtherCAT is an Ethernet-based fieldbus system that has Ethernet “full-duplex” characteristics [10]. EtherCAT is different from the standard Ethernet communication model, modified from standard Ethernet and fully compatible with standard Ethernet, compatible with EtherCAT devices and other Ethernet devices on the same network. The EtherCAT system consists of master and slave stations. The main design of the slave system described in this article was using BECKHOFF’s configuration software TwinCAT as the main station for testing. EtherCAT works as shown in Fig. 1.

Design of Step Servo Slave System Based on EtherCAT

195

Fig. 1 EtherCAT operating schematic

From Fig. 1, the EtherCAT system has a full-duplex features, main to continuous downward from the station to send a message, the current line message passed from station, from the stand according to the instructions in downlink packet extracted from the message you need data or insert need to master station data, after the completion of the work will update counter, downward iterate over all messages from station, will be from the last return from standing in the way the treated message to master station, master station according to the return of the work of uplink packet counter (WKC) value to judge whether from standing right response the downlink packet instructions, ended a communication. EtherCAT’s data frames use 0x88A4, a data type reserved for Ethernet frames, to distinguish them from standard Ethernet data frames. The structure of its data frame is shown in Fig. 2. Figure 2 shows that EtherCAT data frames consist of Ethernet frame heads and EtherCAT messages. Ethernet frame heads consist of destination addresses, source addresses, and frame types. The destination address represents the destination MAC address, and the source address represents the source MAC address. The frame type is 0x88A4, a type reserved for standard Ethernet frames. EtherCAT messages include EtherCAT heads, EtherCAT data, and frame validation sequences. The EtherCAT

Fig. 2 EtherCAT data frame structure

196

L. Zheng et al.

Fig. 3 Overall schematic diagram of step servo slave system

header also contains the EtherCAT data length and data type, and the EtherCAT data domain includes one or more EtherCAT child datagram. Each sub-report contains sub-report header, sub-report data, and working counter. When the downlink data of the master station is processed correctly by the slave station, the working counter will be added by 1 or 2.

3 Step Servo Slave System Design 3.1 The Hardware Design The stepping servo slave station system designed in this paper adopts the combined scheme of STM32 + AX58100. The slave station system is tested by BECKHOFF configuration software TwinCAT. The master station sends messages to the slave station, and after receiving messages, the slave station controls the motor action according to corresponding instructions. Its overall structure is shown in Fig. 3. MCU and ESC communicate through SPI. The Reset pin of MCU is used to control the Reset of AX58100, and the control line represents three interrupt signals. The hardware is shown in Fig. 4.

3.2 The Software Design The software part mainly includes two parts: data interaction and motion control. Data interaction mainly includes communication between AX58100 and MCU. State changes of the slave station system are initiated by the master station. After receiving

Design of Step Servo Slave System Based on EtherCAT

197

Fig. 4 Physical diagram of hardware

the state change instructions initiated by the master station, the slave station system performs corresponding conversion. According to Fig. 5, the state level starts from the initialization state to the running state and goes from low to high. Boot states are optional, and transitions between states are not arbitrary. High-level states can transition to low-level states at will, while low-level states can only transition to Fig. 5 EtherCAT state transition diagram

198

L. Zheng et al.

high-level states. The system performs different functions in different states. In the initialization state, the main station initializes some registers of ESC and configures mailbox parameters. In the pre-running state, mailbox communication can be conducted between the master station and the slave station. In the safe operation state, the master station can send data frames to the slave station, and the slave station cannot send data to the master station. In this state, mailbox communication can still be carried out. In the running state, two-way data interaction can be conducted between the master station and the slave station. AX58100 receives the message sent by the master station, which is processed and then sent to MCU. MCU conducts corresponding motion control according to the received instructions, and MCU sends data to the master station through AX58100. There are two operating modes of the slave station equipment, namely synchronous mode and free operation mode. Synchronous mode processes periodic process data in interrupt service function, while free operation mode processes periodic process data by polling [10]. The stepping servo slave station system designed in this paper adopts the synchronous mode. The overall process of the slave station system program is shown in Fig. 6, and the corresponding source code is shown in Figs. 7 and 8. According to Figs. 6, 7, and 8, in the main functions such as HAL_Iint (), BSP_SysInit (), Cfg_Init () and HW_Init () will be called to initialize variables Fig. 6 Program overall flowchart

Design of Step Servo Slave System Based on EtherCAT

199

Fig. 7 Main function source code

Fig. 8 Related initialization and event handling functions

related to MCU peripherals and ESC registers. To initialize the related peripherals of MCU, By calling MainInit (); CiA402_Init (); The state variables and data objects of the corresponding axis of the ESC chip are initialized accordingly. Periodic and aperiodic events are handled in the Mainloop () function. Finally, APP_Load () function is called to perform the application layer-related operations. In this paper, the motor control and other operations are performed in APP_Load () function.

200

L. Zheng et al.

4 EtherCAT Slave Information File Profile ESI (EtherCAT slave information file) is a necessary description file for EtherCAT slave station equipment, which can be generated by SSC (slave station code tool) and modified as needed. Its structure is shown in Fig. 9. It can be seen from Fig. 9 that this file contains the basic information of secondary station devices, including EtherCAT member enterprise information, device

Fig. 9 ESI file structure diagram

Design of Step Servo Slave System Based on EtherCAT

201

hardware and software version number, Ethernet port type, device name, data type, object dictionary, number and configuration of SM (synchronization manager), and EEPROM configuration content [11]. To control multiple axes, simply add Modules to this file. It can be seen from Fig. 9 that the file is configured with four axes. After the ESI file is configured, the file is burned and written to EEPROM by TwinCAT, and the configuration information will be automatically loaded from EEPROM by AX58100 each time it is powered on.

5 System Function Test The test content of this paper is to use TwinCAT to send instructions to the slave station system to make the motor run to the designated position. After receiving the instructions from the slave station system, the corresponding PWM wave is output to the driver, so that the driver can control the motor to run and feedback the actual running position of the motor back to TwinCAT. Test tools include TwinCAT, slave station system, driver, and motor. The hardware used for testing is shown in Fig. 10. According to Fig. 10, the hardware mainly consists of the slave station system, driver, and motor. The slave station system controls the driver according to the instructions sent by TwinCAT, thus driving the driver to control the motor movement. The test method in this paper is to send the specified motor to the designated position (100 mm) through TwinCAT, and feedback the actual running position of the motor to TwinCAT. The test results are shown in Table 1. The data of ten tests Fig. 10 Test hardware platform

1

99.9320

0.068

Times

Actual value (mm)

Percentage of error (%)

0.239

100.2390

2 0.0148

99.9852

3 0.0077

99.9923

4 0.0125

100.0125

5

Table 1 Statistical table of test results when the target position is set to 100 mm 6 0

100.0000

7 0.0448

99.9552

8 0.0511

99.9489

9 0.0211

99.9789

10 0.1531

100.1531

Average 0.0068

100.0197

202 L. Zheng et al.

Design of Step Servo Slave System Based on EtherCAT

203

Fig. 11 Page of TwinCAT when the motor is in action

are listed in Table 1, and the mean value and error percentage of ten tests are listed accordingly. As can be seen from Table 1, the slight difference between the actual operating position of the motor and the target position set is due to the existence of gear ratio, which is within the allowable error range and can be ignored. Figures 11 and 12 show the initial state and end state pages of a certain test. It can be seen from Fig. 11 that the target position of motor operation is set to be 100 mm, the speed is 50 mm/s, and the initial position is 0. Figure 12 shows the result of setting the target running position of the motor to be 100 mm and the actual running position of the motor to be 100.2390 mm. It can be seen from Fig. 12 that the TwinCAT shows four axes of the slave station system, consistent with the ESI file configuration described in Sect. 3, indicating that the ESI file is configured correctly.

6 Conclusion Developed by German company BECKHOFF, EtherCAT has received increasing attention because traditional fieldbus systems can no longer meet the requirements of the modern industry. In this paper, the background, principle and hardware and software of EtherCAT slave station system were introduced in detail. A 4-axis slave station system was built. TwinCAT was used to test the slave station system. The test results show that the EtherCAT-based stepping servo slave system designed in this paper can accurately and rapidly control the motor motion and meet the requirements of industrial production. Subsequently, the slave station system will be tested in a

204

L. Zheng et al.

Fig. 12 Page of TwinCAT when the motor is running at 100 mm

practical and specific industrial environment, so that the slave station can better meet the requirements of industrial production. Acknowledgements This work was supported by the National Natural Science Foundation of China (61673164).

References 1. Li, N.: The Research of Servo Motion Control System Based on Ethercat, p. 1. Wuhan University of Science and Technology (2012) 2. Zhu, G.Z., Lou, P.H.: Digitial communication with high speed based on Profibus-DP in OpenCNC. Ind. Control Comput. 11, 56–57 (2008) 3. Yang, Y.J.: Design of master-slave station based on industrial ethernet protocol Ethercat, pp. 2– 3. XiangTan University (2017) 4. Hou, M.X., Jin, M.H., Ni, F.L.: Synchronous µcontroller design for EtherCAT slave controller based on FPGA state machine. Adv. Comput. Technol. 31(6), 740–747 (2013) 5. Liu, P.: Design of Ethercat bus multi-axis motion control system based on ARM-FPGA, pp. 9– 15. Qingdao University of Technological (2016) 6. Su, Y.H., Zhang, A.J., Sun, L.: Research on multi-axis servo system design based on Ethercat. Electron. Des. Eng. 27(14), 40–44, 50 (2019) 7. Wang, L., Li, M.G., Qi, J.Y.: Design approach based on EtherCAT protocol for a networked motion control system. Int. J. Distrib. Sensor Netw. 10(2) (2014) 8. Ren, J.Y.: The design and implementation of Ethercat slave software, pp. 37–40. University of Chinese Academy of Science (2014) 9. Wang, W.J.: The principle of industry Ethernet-Ethercat and its implementation. Microcomput. Inf. 26(5-1), 51–52 (2010)

Design of Step Servo Slave System Based on EtherCAT

205

10. Xun, J., Liu, Y.Q.: Design and Application of Ethercat Driver for Industrial Ethernet Field Bus, 1st edn. Beijing University of Aeronautics and Astronautics Press, Beijing (2010) 11. Fan, L.Q., Yu, Q.: Research on device description technology for the driver based on Ethercat. Mechatronics 6, 45–48 (2010)

Investigation of Wind Turbine Blade Defect Classification Based on Deep Convolutional Neural Network Ting Li, Yu Yang, Qin Wan, Di Wu, and Kailin Song

Abstract Wind turbine blade defect classification is a relatively new topic in nondestruction health detection of complex components architecture. This paper investigated the defect classification method for nondestructive detection testing (NDT) of wind power blades based on convolutional neural network (CNN). An augmented dataset based on ultrasonic nondestructive testing was collected from wind turbine blade samples; two types of deep CNN architecture, WPT-CNN and one-dimensional time-domain CNN, aiming at auto defect identification were proposed, and their performances in wind turbine blade defect prediction were compared. The result shows that DCNN can be employed to wind turbine blade flaw detection, and the automatic classifier based on deep learning model brings more feasibility and effectiveness. Keywords Wind turbine blade · Deep CNN · WPT-CNN · Feature extraction · NDT

1 Introduction As a kind of large-scale composite structure and a key part of wind turbine, the wind turbine blade bears the main force in the process of wind power generation. Therefore, it is of great significance to carry out health testing in their life cycle. The ultrasonic nondestructive test has been applied to the wind turbine blade defect detection [1, 2]. Traditional ultrasonic nondestructive defect detection methods generally go through three processes of data preprocessing, feature extraction and signal classification, and the extracted features have a decisive influence on the final signal classification results. There are many types of defects that need to be faced in the NDT field. The signals collected by the same type of defects are sometimes complex T. Li (B) · Q. Wan · D. Wu · K. Song College of Electrical & Information Engineering, Hunan Institute of Engineering, 411104 Xiangtan, China e-mail: [email protected] Y. Yang High-Tech Institute of Xi’an, 710025 Xi’an, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_20

207

208

T. Li et al.

and variable, and even the signal characteristics between different types of defects have many similarities. The traditional artificially involved feature extraction process is subjectively judged by humans; moreover, with the impact of the objective environment, the stability of the results is inevitably poor, and the reliability is difficult to guarantee. In recent years, with the concept of artificial intelligence represented by deep learning algorithms widely recognized and accepted, deep convolutional neural network (DCNN) has taken the lead in many research fields. In the field of largescale engineering structure defect detection, DCNN also reflects its effectiveness and has revolutionized the methods in the field of acoustic wave nondestructive defect detection. Lin et al. [3] realized the automatic identification of structural defect detection by means of deep learning. In that paper, a deep convolutional network structure was designed based on the dataset obtained by simulation of simply supported beam model, which indicated that DCNN can automatically generate the automatic classifier from structural defect signals. Meng et al. [4] first successfully used CNN to classify the void and delamination defects of CFRP samples. Distinguished from taking the original signal as the input of CNN directly, they deal with the ultrasonic signal collected from the sample by wavelet packet transform (WPT), and then, the decomposed coefficients are formed into a two-dimensional matrix for CNN training to improve the predictive performance of CNN. The experimental results show that compared with DNN, WPT-based deep CNN network structure can express the input signal more effectively and compactly, which is a better performance automatic classification tool for ultrasonic signal defect detection; Munir et al. [5] focus on the convolutional neural network applied for ultrasonic signals of different noise levels to automatically detect the type of welding defects. The dataset is expanded by moving the ultrasonic waves forward and backward for a specific time to improve the performance and applicability of CNN for weld defect detection. The results show that CNN does not require a specific manual extraction feature and is robust, even when dealing with signals contaminated by additive Gaussian noise. In addition, DCNN is also used to monitor the health of large machines [6], surface defects in metal parts [7], cracks in concrete surfaces [8], etc. The above research results prove the powerful signal analysis ability of DCNN in structural health monitoring, but the related researches of predecessors mostly focus the difference between CNN and DNN, and there is no in-depth study based on DCNN for the processing of acoustic detection signals of complex engineering structures. Therefore, this paper proposes a method for intelligently detecting the health of large complex structures through the combination of DCNN and acoustic signals and discusses the performance of different CNN structures in acoustic wave nondestructive testing of composite structures through comparative analysis.

Investigation of Wind Turbine Blade Defect Classification …

209

2 Method 2.1 Wind Turbine Blade Ultrasonic Detection Data Acquisition Wind turbine blades are large-scale composite structures that need to be bonded together to form a complete organic whole. Due to various factors in the manufacturing process, the types of defects are diverse. Figure 1 shows the wind power samples of the preset defects designed by the laboratory, including four types: no defects, inclusion defects, wrinkle defects, lack of glue defects, and the labels used for supervised learning are shown in Table 1. The label 0 indicates no defect, and the remaining numbers 1–3 indicate different defect types. When collecting actual data, the probe is randomly moved on the upper surface of the corresponding sample near the defect position to obtain multiple sets of data. In this paper, the sampling rate of wind power detection equipment is set to 10 MHz, the number of sampling points in each echo signal is fixed to 1 KB, and 400 sets of data are collected. Then, the data is labeled by manual method later. Since the actual model that can be used for sampling is very limited, multiple sets of signals are collected at one defect location, so the similarity of the same type of defect signals in the original data is relatively large. In order to better train the model and improve the generalization ability of the model, an effective method

Fig. 1 Defect types of wind turbine blades: a inclusion and glue deficiency defects; b fold defects

Table 1 Defect types and corresponding labels of wind turbine blades

Defect type

Label

No defect

0

Inclusion defect

1

Wrinkle defect

2

Lack of glue

3

210

T. Li et al.

is needed to expand the collected 400 sets of original signals. Theoretically, under the same defect type, the echo position obtained by different material thicknesses is different; the coupling degree of the sensor and the amplitude of the transmitted signal are different when sampling, and the obtained signal amplitude is also different. Therefore, the diversity of the actual model can be simulated by randomly moving the echo position and randomly changing the amplitude of the signal.

2.2 Structure of One-Dimensional Time-Domain CNN When performing defect detection of large structural engineering structures, directly inputting a single echo signal into CNN is an intuitive choice. This form of DCNN directly abandons the complicated process of artificial feature extraction in traditional signal analysis methods and is more in line with the original process. The end-to-end detection method of low-level sensor data to detection results provides a convenient and efficient detection method in form, but its fault tolerance and robustness to noise need further research and verification. The one-dimensional CNN structure based on echo signals directly inputs the time-domain waveform of the signal into the deep CNN network, while the time-domain waveform can provide limited information. If the CNN network is too shallow, the learning ability is difficult to extract enough features for the signal. The classification results in failure detection of such onedimensional CNN structures. Since the original data in the form of time-domain waveforms hides some of the feature information, the one-dimensional CNN structure requires a relatively deeper network hierarchy to improve its feature extraction capabilities. Using the conventional deep CNN structure, the signal obtained from a single point is directly input into the CNN. Figure 2 shows the block diagram of the single-point time-domain signal CNN architecture.

Fig. 2 Principle block diagram of one-dimensional single-point time-domain signal CNN architecture

Investigation of Wind Turbine Blade Defect Classification …

211

2.3 Structure of WPT-CNN Wavelet packet transform (WPT) itself is suitable for the analysis and processing of unsteady signals. On the one hand, the WPT can divide the signal into several bands of the same bandwidth at each resolution by multi-scale and translation. On the other hand, the results after time–frequency transformation can provide more useful information for training parameters in the deep CNN. It is usually beneficial to obtain two-dimensional input features. Therefore, one-dimensional CNN based on two-dimensional WPT-CNN and single-point time-domain signal can obtain more frequency-domain structured information. In theory, two-dimensional WPT-CNN as a multi-level classifier to predict the class of input signals, it can provide higher classification prediction accuracy and robust performance in noisy environments with the same network depth. In WPT-CNN, each time-domain signal is decomposed into 16 parts by WPT. Since the original time-domain signal data length is 1024, there are 64 coefficients in each part after WPT transformation, and all coefficients are directly reorganized into 16 * 64 shape, finally, input the 2D feature matrix into CNN.

3 Results and Discussion Before training the deep CNN model, it is necessary to determine other hyperparameters as well as the size of the model structure. The selection of hyperparameters is a process of trial optimization. The higher matching degree between the selected hyperparameters and deep learning model, the better the performance of the model. Learning rate is a key parameter in the process of model learning and training. Excessive learning rate tends to make the model parameter update too large, causing the gradient descent algorithm to miss the optimal extremum or even the model cannot converge, while the too small learning rate will make the parameter updates slowly and make the training process very time consuming. Therefore, it is necessary to use a large learning rate in the initial training to save training time, whereas a small learning rate is needed to ensure high precision when the model parameters are close to the optimal extreme value. As a result, the gradually attenuated learning rate is adopted in the training process. After the objective function is determined, a suitable optimization algorithm is needed to update the parameters of the model while minimizing the loss function. The methods that can be used are standard stochastic gradient descent [9], momentum gradient descent method (momentum) [10], root mean square prop (RMSprop) and adaptive moment estimation (Adam) algorithm [11], etc.; because the Adam algorithm is used to model the backpropagation, the characteristics of “momentum” are utilized, and the advantages of RMSprop and momentum algorithm are integrated,

212

T. Li et al.

Fig. 3 Prediction accuracy and training error of CNN model under different SNRs: a the prediction accuracy of two-dimensional CNN; b the training error of two-dimensional CNN

and various deep learning models are used. The optimization has good adaptability, so this paper uses the Adam optimization algorithm to accelerate the optimization process of the model parameters (Fig. 3).

4 Conclusion This paper introduces the common shortcomings of traditional manual detection methods in the field of large-scale composite structure defect nondestructive testing and illustrates the feasibility and effectiveness of using deep learning model as automatic classifier. This paper proposes two-dimensional WPT-CNN and onedimensional time-domain CNN deep learning models based on the actual wind turbine blade sample data. The experimental results show that, with a single set of data as input, changing the form of input has a greater impact on the results predicted by the model. Experiments of the extended wind power dataset show that compared with the CNN structure that directly uses the original one-dimensional data as input, inputting the two-dimensional WPT transformation result into CNN can provide more feature information and effectively reduce the depth of the network. If a singlepoint time-domain waveform is used as the input to the deep CNN, the number of network layers needs to be increased to improve the performance of the model.

References 1. Chakrapani, S.K., Dayal, V., Krafka, R., et al.: Ultrasonic testing of adhesive bonds of thick composites with applications to wind turbine blades. Am. Inst. Phys. 1430, 1284–1290 (2012) 2. Jasi¯unien˙e, E., Raišutis, R., Šliteris, R., et al.: Ultrasonic NDT of wind turbine blades using contact pulse-echo immersion testing with moving water container. Ultragarsas (Ultrasound) 63(3), 28–32 (2008)

Investigation of Wind Turbine Blade Defect Classification …

213

3. Lin, Y.Z., Nie, Z.H., Ma, H.W.: Structural damage detection with automatic feature-extraction through deep learning. Comput.-Aided Civ. Infrastruct. Eng. 32(12), 1025–1046 (2017) 4. Meng, M., Chua, Y.J., Wouterson, E., et al.: Ultrasonic signal classification and imaging system for composite materials via deep convolutional neural networks. Neurocomputing 257, 128–135 (2017) 5. Munir, N., Kim, H.J., Park, J., et al.: Convolutional neural network for ultrasonic weldment flaw classification in noisy conditions. Ultrasonics 94, 74–81 (2019) 6. Zhang, W., Li, C., Peng, G., et al.: A deep convolutional neural network with new training methods for bearing fault diagnosis under noisy environment and different working load. Mech. Syst. Signal Process. 100, 439–453 (2018) 7. Wen, C., Ping, G.Y., Liang, G., et al.: A new ensemble approach based on deep convolutional neural networks steel surface defects classification. In: 51st CIRP Conference on Manufacturing Systems, vol. 72, pp. 1069–1072 (2018) 8. Dung, C.V., Anh, L.D.: Autonomous concrete crack detection using deep fully convolutional neural network. Autom. Constr. 99, 52–58 (2019) 9. http://sebastianruder.com/optimizing-gradient-descent/index.html 10. Qian, N.: On the momentum term in gradient descent learning algorithms. Neural Netw. 12, 145–151 (1999) 11. Kingma, D., Ba, J.: Adam: a method for stochastic optimization. In: International Conference on Learning Representations, pp. 1–15 (2015)

Research on Weakening Cogging Torque of Permanent Magnet Synchronous Wind Generator Quansuo Xiang, Qiuling Deng, Xia Long, Mengqing Ke, and Qun Zhang

Abstract In order to weaken the cogging torque of the permanent magnet synchronous wind generator, firstly, the mathematical model analysis of the cogging torque of permanent magnet machine is carried out, and the influence of the pole–slot matching on the cogging torque is studied, and the appropriate pole–slot matching is selected. Secondly, based on the selection of pole–slot match, the finite element simulation was carried out by ANSOFT, and the influence of the inclined slot and stator slot width on cogging torque and no-load induced voltage of the generator was analyzed. The simulation results show that the reasonable selection of the stator slot width and the inclined slot can effectively reduce the cogging torque of the generator and also optimize the no-load voltage. Keywords Cogging torque · Wind generator · Finite element analysis

1 Introduction Compared with the traditional electric excitation synchronous generator, the permanent magnet synchronous machine has the advantages of good performance, small size, and high efficiency, and has received extensive attention from scholars at home and abroad. Although the permanent magnet machine has many advantages, there are some problems worthy of our study. Relatively speaking, the study of cogging torque is more important. In the wind power generation system, the resistance torque at the time of starting is increased due to the presence of cogging torque, thereby reducing the coefficient of utilization of wind energy. When the cogging torque is reduced, the cut-in wind speed is lowered, and the generator can generate more electricity when the wind speed is low, thereby effectively improving the utilization of wind energy. The permanent magnet machine generates a cogging torque due to the interaction between the slotted armature core and the permanent magnet, resulting in cogging torque [1]. Q. Xiang (B) · Q. Deng · X. Long · M. Ke · Q. Zhang Hunan Institute of Engineering, 411104 Xiangtan, Hunan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_21

215

216

Q. Xiang et al.

The cogging torque suppression methods for permanent magnet synchronous machines are mainly divided into two categories, one of which is mainly offset by the machine control strategy, which is a passive suppression method. The other type is the active suppression method. From the perspective of the body structure of the machine, the cogging torque is weakened by changing its structural parameters when designing the generator body [2]. In [3], in order to reduce the cogging torque of the built-in permanent magnet synchronous generator, a design method of slotting on the rotor side is proposed, and the optimal slotting radius and angle of the 12-slot 10-pole built-in permanent magnet synchronous generator are given. In [4], the polar arc coefficient and magnetic pole offset of a 5 MW direct-drive permanent magnet wind turbine are studied, and the optimal suppression effect of cogging torque is given. In this paper, the influence of the design parameters of the 550 W permanent magnet synchronous generator on the cogging torque is studied. The cogging torque is reduced by proper selection of pole–slot matches, the slot width, and skewed slots.

2 Principle Analysis of Cogging Torque The cogging torque is the torque generated by the mutual attraction between the permanent magnet and the stator slot when the stator winding of the permanent magnet generator has no current [5], which is defined as the derivative of the magnetic field energy W relative to the rotor position angle α when the machine is not energized, that is, Tcogging =

∂W ∂α

(1)

where α is the angle between the centerline of the permanent magnet and the centerline of the stator tooth, and W is the magnetic field energy inside the machine. For the sake of convenience, it is assumed that the shape of the permanent magnet in the same generator is the same, the magnetic permeability of the core is infinite, and the permanent magnet has the same magnetic permeability as air. The magnetic field energy stored in the generator is approximately the sum of the magnetic field energy in the permanent magnet and in the generator air gap: W ≈ Wairgap+PM

1 = 2μ0

 B 2 dV

(2)

V

The magnetic field energy W is determined by the performance of the permanent magnet, the position of the stator relative to rotor, and the size of the motor structure. The distribution of the air gap magnetic density on the armature surface can be approximated as

Research on Weakening Cogging Torque of Permanent Magnet …

B(θ, α) = Br (θ )

217

h m (θ ) h m (θ ) + δ(θ, α)

(3)

In the formula, δ(θ ), hm (θ ), and Br (θ ) are, respectively, the effective air gap length of the permanent magnet in the magnetization direction and the permanent magnet remanence flux density. Substituting Eq. (3) into Eq. (2) yields: W =

1 2μ0



 Br2 (θ ) V

h m (θ ) h m (θ ) + δ(θ, α)

Fourier decomposition is performed on Br2 (θ ) and and the Fourier expansion can be expressed as: Br2 (θ ) = Br0 + 

h m (θ ) h m (θ ) + δ(θ, α)

2

∞ 



2 dV

h m (θ) h m (θ)+δ(θ,α)

Bm cos 2npθ

(4) 2 , respectively,

(5)

n=1

= G0 +

∞ 

G n cos nzθ

(6)

n=1

Substituting Eqs. (5) and (6) into Eq. (4), and combining Eq. (1), the expression of cogging torque is shown in expression (7). ∞  zπ L a 2 2 Tcog (α) = (R2 − R1 ) nG n Br 2nzp sin n Z α 4μ0 n=1

(7)

where μ0 is the vacuum permeability, z is the number of stator slots of the generator, L a is the axial length of the armature core, R1 is the outer radius of the armature, R2 is the radius inside the stator yoke, and Br is the remanence of the permanent magnet, n is an integer to let nz/2p be an integer, Z is the least common multiple LCM(2p, z) of the number of stator slots z and the number of poles 2p.

3 Finite Element Analysis A permanent magnet wind generator with rated power of 550 W is selected in the research, and the design is carried out in RMxprt. The basic parameters of the generator are shown in Table 1.

218 Table 1 Main parameters of the generator

Q. Xiang et al. Parameter Rated output power, PN (W) Rated speed, n (r min−1 )

Values 550 1500

Parameter Number of poles

Values 4

Frequency, f (HZ)

50

Rated voltage, U N (V)

127

Operating temperature (°C)

75

Stator outer diameter (mm)

120

Stator inner diameter (mm)

75

Rotor outer diameter (mm)

74

Rotor inner diameter (mm)

26

3.1 Effect of Pole–Slot Matching on Cogging Torque Using finite element simulation analysis, three different generator cogging torque waveforms are obtained as shown in Fig. 1. It can be seen from Fig. 1 that the cogging torque for 4-pole 24-slot generator is 0.8 N m and smaller than 1.22 N m for the 6-pole 24-slot and 8-pole 24-slot generator. By selecting a reasonable pole–slot combination, the 4-pole 24-slot permanent magnet generator has a 34.4% reduction in cogging torque compared to the 6-pole 24-slot and 8-pole 24-slot permanent magnet generators. Therefore, proper pole–slot matching can optimize the vibration of the generator body caused by cogging torque. Generally speaking, the larger the least common multiple, and the smaller the slot number or pole number, the smaller the amplitude of cogging torque. In order to

Fig. 1 Comparison of cogging torque between different pole slots

Research on Weakening Cogging Torque of Permanent Magnet …

219

Fig. 2 Skewed slot to cogging torque

help to select the pole and slot number, from the respect of cogging torque, a factor is introduced to indicate the benefit for the proper match of pole and slot. C T = 2PQs/Nc. Although there is no appropriate formula to connect C T with amplitude of cogging torque, we can get that the large the coefficients C T , the larger the amplitude of cogging torque.

3.2 Effect of Skew Width on Cogging Torque Figure 2 shows the cogging torque of the 4-pole 24-slot motor with no skew and with skew width of 0.2, 0.4 and 0.8 pitch. It can be seen that the cogging torque of the generator is the smallest when the stator is inclined at 0.8 pitch. The amplitude of the generator cogging torque is 0.8 N m without skew. While the stator is inclined by 0.8 pitch, the cogging torque of the generator is reduced to 0.15 N m, reduced by 81.25%. So the skew has a very good effect on cogging torque reduction.

3.3 Effect of Notch Width on Cogging Torque As we know, the armature slot can cause cogging torque, and the slot width affects the relative air gap permeability of the permanent magnet synchronous machine.

220

Q. Xiang et al.

Fig. 3 Different slot widths to cogging torque

The smaller the slot width of the permanent magnet generator the smaller the cogging torque of the permanent magnet generator. Figure 3 shows the cogging torque comparison waveform of the 4-pole 24-slot generator for the different slot widths. When the slot width of the generator is 2.5 mm, the amplitude of the cogging torque of the permanent magnet synchronous generator is 0.8 N m. While the slot width of the generator is 1.0 mm, the cogging torque amplitude of the permanent magnet synchronous generator is 0.19 N m, which is reduced by 81%. Therefore, changing the notch width can effectively weaken the cogging torque.

4 Analysis of Generator Performance Impact After Optimization Figure 4 shows the combined optimization effect of proper selection of skewed slots and the slot width. It can be seen from Fig. 5 that the amplitude of the cogging torque is less than 0.07 N m, which is drastically reduced compared with the cogging torque of the permanent magnet generator before optimization. Figure 5 shows the no-load induced voltage of the 4-pole 24-slot permanent magnet synchronous generator before optimization. Figure 6 shows the no-load induced voltage of the generator through the combination of the skewed slots and the changing of the slot width. From the simulation results, it can be analyzed that using the appropriate skewed slots and slot width can not only optimize the cogging torque to

Research on Weakening Cogging Torque of Permanent Magnet …

221

Fig. 4 Optimized cogging torque

Fig. 5 No-load induced voltage for primary model

a certain extent but also reduce the harmonics of the air gap magnetic density so that the no-load induced voltage is also optimized to some extent. It can be seen from Figs. 7 and 8 that for the optimized permanent magnet synchronous generator, the magnetic flux distribution of the generator is normal, the magnetic flux density distribution of the generator is uniform, and there is no supersaturation.

222

Q. Xiang et al.

Fig. 6 No-load induced voltage for optimized model

Fig. 7 Map of magnetic flux

5 Conclusions In this paper, the influence of appropriate number of slots per pole on the cogging torque of permanent magnet synchronous wind generator is studied. The skewed slots and the stator slot width are used to reduce the cogging torque of the generator.

Research on Weakening Cogging Torque of Permanent Magnet …

223

Fig. 8 Cloud map of magnetic density distribution

The influence of the combination of the skewed slots and the change of the stator slot width on other parameters of the generator is analyzed by finite element analysis. The results show that choosing the appropriate combination of skewed slots and stator slot width can not only greatly weaken the cogging torque of the generator but also have a certain optimization effect on the no-load voltage.

References 1. Deng, Q.L., Huang, S.D., Liu, T., et al.: Research and analysis of cogging torque in permanent magnet motor. Hunan Univ. 38(3), 56–59 (2011) 2. Liang, F.F.: Research on Cogging Torque of Surface-Mount Permanent Magnet Synchronous Motor Based on Finite Element Analysis. Zhejiang University of Technology, Hang Zhou (2016) 3. Ye, X.B., Wu, B.C.: Optimization design of cogging torque of built-in permanent magnet synchronous motor. Micro-motor 52(4), 12–14 (2019) 4. Liu, T., Huang, Z.W., Deng, Q.L., et al.: Application research on cogging torque reduction method of permanent magnet direct drive wind turbine. Hunan Inst. Eng. 28(3), 13–16 (2018) 5. Zhou, J., Wang, Q.J., Li, G.L., et al.: Research on cogging torque reduction method of v-type built-in permanent magnet synchronous motor. Micro-motor 47(7), 16–19 (2019)

Research on Edge Network Resource Allocation Mechanism for Mobile Blockchain Qiang Gao, Guoyi Zhang, Jinyu Zhou, Jia Chen, and Yuanyuan Qi

Abstract The blockchain mining process needs to solve a proof-of-work problem (PoW). Due to insufficient computing resources of the mobile device itself, as well as the insufficient computing power, the demand for computing power of the mining process cannot be met. In this paper, by constructing the mobile blockchain application model, aiming at maximizing system revenue and using the constraints of network resources as constraints, the paper allocates the network resource allocation mechanism to the mobile blockchain and realizes the effective use of blockchain technology in mobile applications. The resource allocation between adjacent devices can be modeled as a two-way auction model, and the optimal price can be determined by solving Bayes–Nash equilibrium. In addition, the credible value evaluation model is also introduced in this mechanism to solve the trusted value of the node. Keywords Blockchain · Mobile device · Mining · Resource allocation

1 Introduction In a narrow sense, blockchain is a kind of decentralized shared ledger that uses data blocks to form a chain structure in chronological order and uses cryptography to ensure that the data cannot be tampered and unforgeable. A security issue such as data leakage is due to central node failure or attack. The generalized blockchain technique is to use an encrypted chained block structure to verify and store data, to generate and update data using distributed node consensus algorithms, and to use automated script code (smart contracts) to program and manipulate data [1, 2]. Q. Gao · J. Zhou · J. Chen Shenzhen Power Supply Bureau Co. LTD, 518010 Shenzhen, China G. Zhang Power Control Center of China Southern Power Grid, 510623 Guangzhou, China Y. Qi (B) Beijing University of Posts and Telecommunications, 100876 Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_22

225

226

Q. Gao et al.

The key to ensure data integrity and validity in the blockchain is a computational process defined as mining. In order to attach a new data block to the current blockchain, a blockchain user (i.e., miner) is required to resolve the proof-of-work problem (PoW) to obtain a hash value that links the current block to the previous block. After solving the proof-of-work problem (PoW), the miner broadcasts the results to other miners in the network for verification. If most miners agree on this result, the block is added to the blockchain and the miner succeeds in mining. Many consensus agreements give incentives to miners who successfully mine [3, 4]. However, due to the high computational power and a large amount of computing resources required to solve the workload proof problem (PoW), mobile devices cannot directly participate in the mining and consensus process due to resource constraints, making the application of blockchain technology in the field of mobile services extremely limits. This prompted us to further rethink the mining strategy and resource management in the mobile environment, opening up new opportunities for the development of blockchain in mobile applications. In this paper, we think that in the mobile environment, mining equipment can obtain idle resources from resource-sharing devices in the same local area network. The mining device can obtain the reward of mining through the consensus mechanism, while the resource-sharing device needs to obtain incentives from the miner node, thus generating pricing problems of computing resources.

2 System Model We consider mobile devices mining in a blockchain scenario. As we all know, miners need to solve a workload proof problem, which requires high computing power and a large amount of computing resources. The mobile device itself has limited computing power and less computing resources to meet the needs of mining. Consider new resource allocation strategies to support applications in a mobile blockchain environment. As shown in Fig. 1, in a collaborative mining network (CMN), there are N mining devices N = {1, 2, . . . , N }. The expected resource amount R = {r1 , r2 , . . . , r N } required for each mining device to complete the task, the amount of resources of the mining device itself is  = {λ1 , λ2 , . . . , λ N }. There are M resourcesharing devices and the amount of resources each resource-sharing device has is C = {c1 , c2 , . . . , c N }. During the mining process, the miners competed to mine to obtain new blocks. We define  = {ω1 , ω2 , . . . , ω N } as miner’s mining capacity parameter. Then, the relative computing power of mining equipment i can be expressed as: αi = 

ωi ri j∈N ω j r j

(1)

Research on Edge Network Resource Allocation Mechanism …

227

Fig. 1 System model

 where i∈N αi = 1. After a new block was successfully excavated, the miners spread the newly generated block to the blockchain network in anticipation of reaching a consensus. If the block fails to reach consensus after a long time of propagation, the block becomes an isolated block, and the probability of the isolated block can be expressed as: Porphan(si ) = 1 − e−λzsi . Where si represents the size of the block and z represents the delay parameter. Obviously, the probability of successful mining and dissemination of mining device i can be expressed as: Pi (αi , si ) = αi (1 − Porphan(si )) = αi e−λzsi

(2)

After successful mining, the mining device will receive certain mining rewards. The mining reward consists of fixed reward R and variable reward r × si . At the same time, since the resources are requested from the resource-sharing device and the ESP, the mining device needs to pay the resource-sharing device and the ESP, so the personal utility of mining device can be expressed as: u i = (R + r × si )Pi (αi , si ) − λi Bi −



pi j c j

(3)

j

The revenue of resource-sharing device is mainly paid by mining device. The personal utility of resource-sharing device can be expressed as:

228

Q. Gao et al. 46 Delay effect of 0.01 Delay effect of 0.05

Average auction price

45.5

45

44.5

44

43.5

43 0.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75

0.8

0.85

0.9

Miner density in MCN

Fig. 2 Effect of miners’ density on auction prices

u sj =



cij pi j − c j B j

(4)

i

2.1 Trust Value Evaluation Model When the device has a malicious behavior tendency, correspondingly, the profit of the device should be reduced. Therefore, we construct a trusted value evaluation model as shown in Fig. 2. First, the mobile device generates D-to-D direct trust values Ddi ,d j (t) based on historical interaction records. Second, the mobile device sends its own direct trust value to other devices to the edge cloud; finally, the edge cloud integrates the data to generate the global trust Fb,d j . Here, we take the method in [5].

2.2 Resource Allocation Model We design a reasonable resource allocation model so that mobile mining devices can obtain resources from neighboring resource-sharing devices to meet mining needs and promote the application of blockchain technology in mobile scenarios [6, 7]. Within the CMN collaborative mining network, we adopt a double auction model to carry out resource scheduling within the CMN collaborative mining network [8, 9]. In the double auction model, the mining device is the resource requester, that is, the buyer, and the resource-sharing device is the resource provider, that is, the seller. Mining device (buyer) i gives the unit resource price bi and the demand for computing resources Rib . The resource-sharing device (seller) j gives the asking price s j for the

Research on Edge Network Resource Allocation Mechanism …

229

unit resource quantity, and the computing resource quantity that each device can provide is R sj . First, we allow the edge cloud to select the node whose trust value is greater than 0.9 according to the global trust value of each node but does not need to perform the mining task and the computing resource is not high, as the auction node, to execute the auction process. Suppose that there are n buyers, m sellers, after the buyer and the seller quote, the auction node will adjust the quotation to the equivalent quotation according to the quotation and the trust value. And the buyer (mining device) will be arranged in descending order according to the equivalent quotation bi = f b (ti )bi . The seller (resource-sharing device) will be arranged in ascending order according to the equivalent quotation s j = f s (t j )s j . Then, we look for a value k such that bk > sk and   < sk+1 . Then, the kth buyer and the first k sellers match the resources. Arrange bk+1 k k  = |Rkb − Rks  | in ascending order, taking the smallest kk  then the kth buyer and b +s 

the kth sellers trade with each other, and the transaction price is pkk  = k 2 k  . After the transaction, if Rkb > Rks  , Rkb = kk  , then remove k  , and k enters the next round of auction, if Rkb < Rks  , Rks  = kk  , then remove k, and k  enters the next round of auction until one party is empty, then the auction ends. b +s  For the buyer k, its benefits can be expressed as u b = vk − k 2 k  , where vk represents the profit that the unit resource can create for the buyer; for the seller k  , its benefits can be expressed as u s = sk  − Bk  , where Bk  represents the cost of the seller’s unit resource consumption. For buyers, they maximize their own interests by adjusting their bidding strategies: P1 : maxbi u b = (vi − bi ) × P{bi ≥ s j (B j )}

(5)

For sellers, they maximize their revenue by adjusting the asking price strategy: P2 : maxs j u s = (s j − B j ) × P{bi (vi ) ≥ s j }

(6)

3 Model Solving 3.1 Trust Value Calculation

Trust Value Calculation Algorithm Algorithm in [5] details the calculation of B-to-D feedback trust based on multisource information fusion. Setting the Price Adjustment Function We introduce a credible value evaluation mechanism inside the CMN collaborative mining network. When conducting two-way auctions between mobile devices, we

230

Q. Gao et al.

consider price factors and credibility factors together, so that the comprehensive competitiveness of the device is decided by the credibility and the price [10]. Let t j (t j = Fb,d j ) denote the credibility of the node j. For the buyer, the higher the trusted value t j and the higher the bid, the more competitive advantage; for the seller, the higher the trusted value t j and the lower the asking price, the more competitive advantage. We use the price adjustment function to calculate the comprehensive competitiveness of buyers and sellers, respectively, and use T0 to represent the benchmark trust. The comprehensive competitiveness is equivalent to the credible value. The unit price f (t j ) p j is reported for the node of T0 , where f (·) is a function of trust. The quotations of each node with different trusted values are mapped to the equivalent price under T0 , and the comprehensive competitiveness is measured by the equivalent price. For buyers, we have:  f b (t j ) =

f0

  1 − f 0 − (1+ε)   1 − f 0 − (1+ε)

t j −T0 (1+ε)T0



(7)

where, f 0 (t) = arctan h(t) = 0.5 ln(1 + t)/(1 − t). For the seller, we have: f s (t j ) = − f b (t j ) + 2

(8)

3.2 Double Auction Double Auction Model: To simplify the auction process, we assume that the mining device (buyer) and the resource-sharing device (seller) are bidding in a linear strategy. The bidding strategy can be expressed as: bi = ηb + ξb × vi

(9)

where vi is the value of completing the unit task, vi = (R + r × si )Pi (αi , si )/βi . The seller’s bidding strategy can be expressed as: s j = ηs + ξs × B j

(10)

Based on historical transaction records, we assume that the largest auction price available is Pmax and the minimum allowed auction price is Pmin . Assume that the cost and profit of unit resources follow a uniform distribution:

Research on Edge Network Resource Allocation Mechanism …

231

B j ∼ u[Pmin , Pmax ], vi ∼ u[Pmin , Pmax ]

(11)

Equations (6) and (7) can be rewritten to take into account the nature of the uniform distribution:    1 1 bi − (ηs + ξs × Pmin ) bi + (bi + ηs + ξs × Pmin ) · (12) P1 : max vi − bi 2 2 (Pmax − Pmin )ξs    (ηb + ξb × Pmin ) − s j 1 1  P2 : max s j + (s j + ηb + ξb × Pmax ) − B j · (13) sj 2 2 (Pmax − Pmin )ξb Solving the first derivative and the second derivative of P1 and P2 , we can find that the function is a concave function, so that the first derivative is equal to 0, we can find the equilibrium point. Bringing the equilibrium point into (23) and (24) can get the best bidding strategy for buyers and sellers. bi∗ =

Pmax Pmin 2vi + + 3 12 4

(14)

s ∗j =

2B j Pmin Pmax + + 3 12 4

(15)

4 Simulation In this section, we simulate the algorithm to evaluate the performance of the mechanism. We assume that there are 100 mobile devices in the collaborative mining network CMN, in which the miners have a density of 0.6. Other parameters are set in Table 1. As shown, in terms of miner density, the auction price within the CMN decreases as the miner density increases, as the mining equipment will bid based on its expected profit. As the number of mining equipment increases, the number of resource-sharing equipment decreases, and the amount of available resources decreases. Expected Table 1 Simulation parameters

Simulation parameter

Value

Miner capacity factor, ωi

0.6

Delay parameter, z

0.01

Poisson parameter, λ

0.1

Fixed reward, R

104

Unit reward, r

100

Trust value, t i

N(0.7, 0.3)

Mobile device resources, ci

u(0, 5)

232

Q. Gao et al.

profit reduction. At the same time, as the delay effect increases, the possibility of successful mining declines, so the auction price drops.

5 Conclusion In order to realize the effective use of blockchain technology in mobile applications, this paper designs and studies the network resource allocation mechanism for mobile blockchain. In this paper, a mobile blockchain application model is constructed. The goal is to maximize system revenue and to be constrained by network resources. The resource allocation mechanism of the mobile blockchain is designed. Acknowledgements This work is jointly supported by the project from Shenzhen Power Supply Company Limited of China: “Research on ubiquitous service access technology based on blockchain (No. 090000kk52170081).”

References 1. Yuan, Y., Wang, F.: Status quo and prospect of blockchain technology development. Acta Autom. Sinica 42(4), 481–494 (2016) 2. Narayanan, A.: Blockchain Technology Drives Finance. CITIC Publishing House, Beijing (2016) 3. Consulting, C.C.I.D.: Structure and application of blockchain development. Softw. Integr. Circuits 10, 20–24 (2017) 4. Xiang, L.G.: Basic features and key technologies of 5G. China Ind. Inf. Technol. 1(5), 36–43 (2018) 5. Jie, Y., Li, X.: A reliable and lightweight trust computing mechanism for IoT edge devices based on multi-source feedback information fusion. IEEE Access (2018) 6. Yue, Y., Sun, W., Liu, J.: A double auction-based approach for multi-user resource allocation in mobile edge computing. IWCMC 6, 805–810 (2018) 7. Xiong, Z., Feng, S., Niyato, D., et al.: Optimal pricing-based edge computing resource management in mobile blockchain. ICC 5, 1–6 (2018) 8. Xiong, Z., Zhang, Y., Niyato, D., et al.: When mobile blockchain meets edge computing. IEEE Commun. Mag. 56(8), 33–39 (2018) 9. Jiao, Y., Wang, P., Niyato, D., et al.: Social welfare maximization auction in edge computing resource allocation for mobile blockchain. In: IEEE International Conference on Communications, pp. 1–6 (2018) 10. Xiong, Z., Feng, S., Niyato, D., et al.: Edge computing resource management and pricing for mobile blockchain. https://pdfs.semanticscholar.org/708b/ 47eaffa20cf7b4923d2ed8c1a6951cb4933f.pdf (2017)

MATSCO: A Novel Minimum Cost Offloading Algorithm for Task Execution in Multiuser Mobile Edge Computing Systems Jin Tan, Wenjing Li, Huiyong Liu, and Lei Feng

Abstract The mobile edge computing (MEC) system is a new way to offer cloud computing capabilities at the edge of the radio access network (RAN). In an edge computing system, multiple servers are placed on the edge of the network near the mobile device to process offloading tasks. A key issue in the edge computing system is how to reduce the system cost while completing the offloaded tasks. In this paper, we study the task scheduling problem to reduce the cost of the edge computing system. We model the task scheduling problem as an optimization problem, where the goal is to reduce the system cost while satisfying the delay requirements of all the tasks. To solve this optimization problem effectively, we propose a task scheduling algorithm, called MATSCO. We validate the effectiveness of our algorithm by comparing with optimal solutions. Performance evaluation shows that our algorithm can effectively reduce the cost of the edge computing system. Keywords Edge computing · Task scheduling · Cost efficiency

1 Introduction Due to the fact that more and more complex mobile application devices have emerged [1], most of these applications require intensive computation capacity and high energy consumption [2]. However, the communication distance between the cloud and the mobile device is usually very long, so when a large number of tasks are sent to the cloud, there will be long response time and severe network congestion. The emergence of mobile edge computing (MEC) solves this challenge [3–5]. The cost efficiency of task scheduling has become one of the hot topics in edge computing research. There have been a lot of research works in this area, and some works have studied how equipment can make task unloading decisions. Some works are aimed at reducing the system cost incurred by the transfer or calculation of tasks. J. Tan · W. Li · H. Liu · L. Feng (B) State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_23

233

234

J. Tan et al.

But unfortunately, these jobs rarely consider the cost of the edge server itself, and the problem of reducing the system cost of the edge server during off-peak hours (such as night) is worth exploring. In this paper, we study the cost optimization for task scheduling problem in the edge computing system. We develop a task scheduling model for the input tasks. Then, we propose an approximate algorithm to solve this optimization problem, which is called MATSCO. Finally, simulation results are provided to verify the accuracy and performance improvement of our algorithm.

2 Related Work There have been many studies on the task scheduling in mobile edge computing [6– 9]. The paper [6] considers the allocation of both radio resources and computation resources of the MEC server to increase system effectiveness. John [7] puts forward a task scheduling algorithm with the goal of the minimum completion time, maximum load balancing degree, and the minimum energy consumption using an improved differential evolution algorithm in cloud computing. Zhang and Zhou [8] present a strategy to create VMs beforehand based on historical scheduling data and take task requirement into scheduling consideration. Zhang and Leng [9] present a mobilityaware hierarchical MEC framework for green and low-latency IoT and deploy a game-theoretic approach for computation offloading to optimize the utility of the service providers while also reducing the energy cost and the task execution time of the smart devices. In those works, the task scheduling and resource management problem within the edge cloud were well studied. However, they did not consider the task scheduling problem for reducing system cost generated by the edge servers.

3 System Model 3.1 Architecture As shown in Fig. 1, the edge computing system consists of several heterogeneous edge servers and edge computing agents (ECAs). There are multiple virtual machines per server that handle the tasks for users. Better communication quality can be achieved by offloading computational tasks to the edge computing system. For each computing task, the ECA will select the available servers for processing based on its resource requirements. In this paper, we believe that the ECA periodically performs the task scheduling strategy [10] and executes the scheduling policy after the current task group is completed. The interval between two consecutive task scheduling processes is set to I.

MATSCO: A Novel Minimum Cost Offloading Algorithm …

235

Fig. 1 Edge computing architecture

I = tmd

(1)

Here, tmd is the maximum of expect completion time of all the tasks.

3.2 Problem Formulation (1) System Model: In the edge computing system, there is a group of tasks T = {t1 , t2 , . . . , tn } to be processed at the time of executing the tasks scheduling strategy, where n is the total number of input tasks. Each task ti ∈ T is indicated by ti = di , wi , δi , si . Let di denote the transmission data size of ti , which includes input data to be computed by the server and output data returned to the users, wi denote the computation workload [11] of ti , δi denote the deadline requirement of ti , and si denote the storage requirement of ti . We consider there are m heterogeneous edge servers E = {e1 , e2 , . . . , em } in the edge computing system. Each server e j ∈ E is denoted by e j = B j , V j , R j , S j . Let B j denote the available communication bandwidth between server e j and the ECA at the time of executing task scheduling strategy. A set of VMs are deployed on each server, and each VM can only process one computing task at the same time [10]. Let V j be the number of VMs that are deployed on server e j , and S j denote the available storage resource of server e j . The computing rate of each VM on the server e j is the same, which is denoted by R j .

236

J. Tan et al.

We define binary variable xi j to denote whether task ti is scheduled to server e j , i.e.,  xi j =

1 task ti is scheduled to the server e j 0 otherwise.

(2)

All tasks are handled by the edge computing system, and each task ti is scheduled to a server for processing, and a task can only be processed by one server. m 

xi j = 1.

(3)

j=1

In each server, there must be enough storage space to store data. Otherwise, the task data will be lost or the task cannot be executed. The total storage requirement of each task scheduled to the server e j cannot exceed the storage amount of the server e j . This leads to n 

xi j si ≤ S j

(4)

i=1

(2) Cost model: In an edge computing system, ECA can turn each server on or off. For a running server, the edge computing system needs to pay a certain cost to maintain the normal operation of the server. Let C j denote the cost which the edge computing system pays when the server e j is in ON state. In this paper, we define the cost of edge computing system as the sum cost of those servers which are in ON state. Then, we identify the binary variable about the state of e j . Let y j represent the state of server e j . That is,  yj =

1, server e j is in ON tate 0, otherwise.

(5)

(3) Optimization problem: The optimization objective is to minimize the cost of the edge computing system. Summarize all issues discussed above, and the cost minimization optimization problem of the edge computing system can be formulated as follows,

min xi j

m  j=1

yi C j

(6)

MATSCO: A Novel Minimum Cost Offloading Algorithm …

237

Subject to: m 

xi j = 1, ∀i ∈ 1, 2, . . . , n;

j=1 n 

n 

xi j si ≤ S j , ∀ j ∈ 1, 2, . . . , m;

i=1

xi j ≤ V j , ∀ j ∈ 1, 2, . . . , m.

i=1

4 Algorithm Design In this section, we propose an efficient MATSCO algorithm to solve our cost optimization problem. The MATSCO algorithm consists of two stages. Stage 1: The MATSCO algorithm mainly considers how to select the lowest cost edge server to handle the offload task, so the MATSCO algorithm selects the server with the smallest unit cost u j , which is expressed as (6). The unit cost of different edge servers is different. uj =

Cj zj

(7)

where z j denote the size of server e j , mSj z j = m

mBj mVk + m + m k=1 S j k=1 Vk k=1 B j

(8) 

After some scheduling tasks are assigned to the server e j , we define qe j as the remaining available resources of the server e j . Based on the heuristic algorithm, the ECA needs to select the largest task among the offload tasks that can be processed on the server e j . In the MATSCO algorithm, we define the maximum task as the maximum dot product h i . Formally, the dot product h i [12] can be expressed as, h i = qe j pti j = si S j + V j + bi j B j ; 



qe j = (S j , V j , B j ) = pe j − 





pt∗ j

(9) (10)

Within pt∗ j denote the resource requirements of all tasks scheduled to server e j . Stage 2: After the stage 1, we obtained a preliminary task scheduling strategy. Since the last selected server uses only a small amount of resources, the system cost of the initial scheduling strategy can be further reduced. In the MATSCO algorithm,

238

J. Tan et al.

we propose an optimization strategy whose main idea is to put the tasks in the lowest cost server into the last selected server after the stage 1. Summarize all the above discussions, and we propose the MATSCO algorithm to solve our optimization problem, as shown in Algorithm 1. Algorithm 1 Our TTSCO algorithm for the cost optimization Input: Set of tasks to be scheduled , set of available edge servers Output: Task scheduling variable , the state of servers 1.

Initialize all variable

2.

Stage 1: Obtain the vector

3. 4. 5. 6.

to be 0, set

= 0 for all servers

and compute the unit cost

Set of servers that are used While do Choose the server

of each server

with the smallest value of unit cost

While there are tasks can be assigned into server

in

do

7.

Compute the dot product h of all tasks can be assigned into server

8.

Accommodate task

with the biggest value of dot product into server

9. 10. 11. 12. 13.

end while

14. 15. end while 16. Stage2: 17. Obtain the last selected server

and server

can be put into the server 18. while task in Put task into server 19. 20.

Set

21.

If there is no task in,

do

then Obtain the new server

22. 23.

with smallest cost in

with smallest cost in

end if

24. end while

5 Performance Evaluation In this section, we will evaluate the performance of the MATSCO algorithm in terms of cost optimization. The simulation results show the effectiveness and improvement

MATSCO: A Novel Minimum Cost Offloading Algorithm …

239

of the MATSCO task scheduling strategy compared with the baseline strategy: random scheduling strategy (RANDOM). In addition, we analyze the number of input tasks and the impact of the transmission data size on the MATSCO algorithm. (1) The Effect of Number of Tasks: In order to evaluate the impact of the number of input tasks on the MATSCO algorithm, we increased the number of input tasks from 30 to 150 in increments of 30 and compared the performance of the MATSCO algorithm with the RANDOM algorithm. We plot the cost of the system for both strategies in Fig. 2. Figure 2 shows that the cost of the edge computing system will increase as the number of input tasks increases. Obviously, the more service tasks, the more servers the system needs to handle the tasks, which leads to increased costs. As can be seen from Fig. 2, our MATSCO algorithm can reduce the cost of the RANDOM algorithm by 20% on average. (2) The Effect of Transmission Data Size: In order to study the effect of the task’s transmission data size on the performance of our MATSCO algorithm and RANDOM algorithm, the number of input tasks is set to 150, the transfer data size of the input task is increased from 25 MB to 50 MB, and the size of each increase is 5 MB. We plot the cost of the edge computing system obtained by the two algorithms in Fig. 3. Figure 3 shows that under the MATSCO strategy, when the size of the transmitted data of the task is small, the cost does not increase as the size of the transmitted data increases. The reason is that the number of VMs at this time is the main limitation of task scheduling. The bandwidth and storage resource utilization on each server is low. When the task’s transmission data size increases, the resource utilization of each server will increase, but the total cost will not change. As the size of the transfer data continues to increase, the server’s resources are not sufficient to handle these tasks, so more servers are needed. In this case, the system cost will increase as the size of the transmitted data increases. It can also be seen from Fig. 3 that under Fig. 2 Effect of number of tasks

240

J. Tan et al.

Fig. 3 Effect of transmission data size

the RANDOM algorithm strategy, the cost changes are small. Compared with the RANDOM strategy, our MATSCO algorithm can reduce costs by an average of 30%.

6 Conclusions We studied the cost optimization of task scheduling problems in edge computing systems and proposed a cost optimization problem for edge computing systems. To solve this problem, an efficient algorithm called MATSCO algorithm is proposed. The performance evaluation results show that compared with the RANDOM algorithm, our algorithm has improved the cost of the edge computing system. In future research, we will consider the integration of AI into dynamic resource management and task scheduling [13]. Acknowledgements This work is supported by the Fundamental Research Funds for the Central Universities under Grant 2019RC09.

References 1. Hassanalieragh, M., Paga, A., Soyata, T., et al.: Health monitoring and management using internet-of-things (IoT) sensing with cloud-based processing: opportunities and challenges. In: International Conference on Services Computing, vol. 1, pp. 285–292 (2015) 2. Tata, S., Jain, R., Ludwig, H., Gopisetty, S.: Living in the cloud or on the edge: opportunities and challenges of IOT application architecture. In: IEEE International Conference on Services Computing, pp. 220–224 (2017) 3. Shi, W., Cao, J., Zhang, Q., et al.: Edge computing: vision and challenges. IEEE Internet Things J. 3(5), 637–646 (2016) 4. Li, S., Huang, J.: GSPN-based reliability-aware performance evaluation of IoT services. In: IEEE International Conference on Services Computing, pp. 483–486 (2017)

MATSCO: A Novel Minimum Cost Offloading Algorithm …

241

5. Ku, Y.J., Lin, D.Y., Lee, C.F., et al.: 5G radio access network design with the fog paradigm: confluence of communications and computing. IEEE Commun. Mag. 55(4), 46–52 (2017) 6. Jiang, W.J., Wang, Y.: Research on mobile Internet mobile agent system dynamic trust model for cloud computing: China. Communications 16, 174–194 (2019) 7. John, T.S.: Performance measure and energy harvesting in cognitive and non-cognitive radio networks. In: 2015 International Conference on Innovations in Information, Embedded and Communication Systems (ICIIECS). IEEE (2015) 8. Zhang, P.Y., Zhou, M.C.: Dynamic cloud task scheduling based on a two-stage strategy. IEEE Trans. Autom. Sci. Eng. 15, 772–783 (2017) 9. Zhang, K., Leng, S.P.: Mobile edge computing and networking for green and low-latency internet of things. IEEE Commun. Mag. 56, 39–45 (2018) 10. Song Y., Yan, S.S., Yu, R., et al.: An approach to QoS-based task distribution in edge computing networks for IoT applications. In: IEEE International Conference on Edge Computing IEEE, pp. 32–39 (2017) 11. Kumar, K., Liu, J., Lu, Y., Bhargava, B.K.: A survey of computation offloading for mobile systems. Mobile Netw. Appl. 18(1), 129–140 (2013) 12. Gabay, M., Zaourar, S.: Variable size vector bin packing heuristics—application to the machine reassignment problem. INRIA Tech. Rep. (2013) 13. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Future Gener. Comput. Syst. 96, 111–118 (2019)

Medical Data Crawling Algorithm Based on PageRank Maojie Hao, Peng Shu, Zhengan Zhai, Liang Zhu, Yang Yang, and Jianxin Wang

Abstract In order to establish a database of characteristics related to physical conditions and then build a remote health intelligence-assisted diagnosis model based on the deep learning training mechanism, it is necessary to perform deep mining of medical data. In addition to the structured medical data stored in medical institutions, there are a large number of doctors and patients on the Internet about the interaction of the disease, and these are important sources of medical data. PageRank algorithm is an efficient link-based Web page sorting algorithm. This algorithm considers the Internet as a whole and uses links between pages as an important indicator. Through the relationship between Web pages pointing to each other, the algorithm calculates the importance of the page. However, it also has some problems, such as the heavy emphasis on old Web pages, the theme drift, and so on. In this paper, based on the characteristics of medical data crawling, an improved PageRank algorithm based on PageRank is designed. The algorithm introduces time factors and potential correlation factors, and solves the problems of the original algorithm. Experiments show that the algorithm presented in this paper has good performance, both in terms of operating speed and accuracy. Keywords Data crawling · PageRank · Link-based Web page · Time factor

M. Hao · Y. Yang (B) · J. Wang State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] P. Shu State Grid Zhejiang Electric Power Research Institute, Hangzhou, China Z. Zhai · L. Zhu Satellite Communication Center, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_24

243

244

M. Hao et al.

1 Introduction With the development of artificial intelligence technology, the intelligent process in the medical field has also been promoted, and the idea of constructing a remote healthassisted diagnostic model based on deep learning has emerged. Therefore, how to quickly and accurately obtain medical health data becomes the primary problem. The main sources of medical data include the Internet and medical information database. The Internet is a hypertext organization with about 300 million pages. It contains many Web sites for online communication between doctors and patients. The Web site contains a wealth of information about patients’ conditions and doctors’ diagnosis results, but the information on the Web site exists. In view of the complex structure and complicated information, this paper proposes a PageRank algorithm based on link and content, which increases the time factor, reduces the interference of expired data and old Web pages, and increases the potential correlation factors to alleviate the problem. For medical data subject drifts, hyperlink weighting factors have been added to improve the efficiency and accuracy of Web crawling. Experiments show that the algorithm has good accuracy in medical data crawling. The remaining sections of this paper are organized as follows: Sect. 2 describes related work, Sect. 3 introduces improved algorithms, Sect. 4 introduces simulation experiments, and Sect. 5 summarizes the full text.

2 Related Works Larry Page published the PageRank algorithm in 1999, setting off a search engine revolution [1]. Since then, various researches on search engines emerged one after another. The PageRank algorithm is a very good algorithm and has been widely studied by people. Taher H. Haveliwala proposed Topic-sensitive PageRank [2]. To yield more accurate search results, the algorithm computing a set of PageRank vectors is biased using a set of representative topics, to capture more accurately the notion of importance with respect to a particular topic. Matthew Richardson proposed The Intelligent Surfer: Probabilistic Combination of Link and Content Information in PageRank [3]. The algorithm was proposed to improve PageRank by using a more intelligent surfer, one that is guided by a probabilistic model of the relevance of a page to a query. The efficient execution of the algorithm at query time is made possible by precomputing at crawl time (and thus once for all queries) the necessary terms. Haveliwala T. proposed the Efficient Computation of PageRank [4]. It discussed several methods for analyzing the convergence of PageRank based on the induced ordering of the pages. It presents convergence results helpful for determining the number of iterations necessary to achieve a useful PageRank assignment, both in the absence and presence of search queries.

Medical Data Crawling Algorithm Based on PageRank

245

C. D. Kerchove, L. Ninove, and P. V. Dooren proposed Maximizing PageRank via Outlinks [5]. It analyzes linkage strategies for a set of Web pages for which the Webmaster wants to maximize the sum of Google’s PageRank scores. The Webmaster can only choose the hyperlinks starting from the Web pages and has no control on the hyperlinks from other Web pages. The paper provides an optimal linkage strategy under some reasonable assumptions.

3 Algorithm Medical data has the characteristics of strong professionalism, a large amount of historical data, and complicated old information. We mainly climb information on basic physical fitness information, physiological parameters, electronic medical records, doctor–patient communication data, and medical equipment data. This paper proposes a medical data crawling algorithm based on PageRank. The flowchart of the algorithm is shown in Fig. 1. Algorithm Description: (1) Keyword input; (2) First, PageRank value calculation in the background and temporary storage in memory; (3) Hyperlink weight factor calculation; (4) Second, calculation of PageRank; (5) Web pages or medical data sort according to the size of PRnew and return the result.

3.1 Time Factor Aiming at the problem of the medical system database and Internet stale data interference, an improved method of increasing the time factor T u is proposed. By analyzing the database data update time, Web page access time, download time and other factors, the time factor of Web page and database is quantified. And later, the data is updated, the larger the T u it has, the greater the positive impact on the PageRank value, and vice versa. The algorithm defines the time factor T u as Tu =

1 + ln Tnumber ln(0.5Ttime Tdownload )2

(3.1)

Ttime is the time interval for recent Web page or medical data update. Tdownload is the time interval for the most recent download of the Web page. Tnumber is the

246

M. Hao et al.

Fig. 1 Algorithm flowchart

number of recently downloaded Web pages or medical data files. When calculating the PageRank value, the time factor is added as a weighting factor.

3.2 Potential Correlation Factor In order to overcome the shortcomings of the traditional PageRank algorithm, which is easy to generate topical drift, the paper draws on the calculation method of the potential relevance of link in Shark-Search algorithm and introduces the potential correlation factor Pu as the influencing factor of PageRank [6]. Pu mainly considers the context content of Web page links and medical data, including the surrounding text of Web page links, inheritance connections, medical data relevance concepts,

Medical Data Crawling Algorithm Based on PageRank

247

medical concept sub-concepts, etc. Pu is a continuous value between (0, 1). Pu is calculated as follows: Pu = β ∗ inherited(childurl ) + (1 − β) ∗ neighborhood(childurl )

(3.2)

inherited(childurl ) is the correlation score obtained from the parent node, and its calculation formula is as Formula (3.3), neighborhood(childurl ) is the correlation between the text around the URL and the keyword, and its calculation is as Formula (3.4), β is an attenuation factor less than 1.  inherited(childurl ) =

α ∗ score(C, currenturl ), score(C, currenturl ) > μ α ∗ inherited(currenturl ), score(C, currenturl ) ≤ μ

(3.3)

currenturl represents the parent node of the childurl node, C represents the keyword, μ represents the relevance threshold, and α is the attenuation factor less than 1. score(C, currenturl ) calculates the currenturl score under the current topic C, using string match calculations. neiborhood(childurl ) = γ ∗ score(C, anchor) + (1 − γ ) ∗ score(C, anchortext ) (3.4) Anchor represents the link text, anchortext represents text near the link text, and γ is an attenuation factor less than 1. The improved PageRank calculation formula is as follows: PRold = (1 − d) + d

n  PR(Mi ) ∗ Tu ∗ Pu S(Mi ) i=1

(3.5)

3.3 Hyperlink Weight Factor Calculation This aspect is mainly for the improvement of Web page medical data crawling. To overcome the shortcomings of the traditional PageRank algorithm in preference of comprehensive Web pages, this paper performs further background processing based on the Web page set Q obtained by the PageRank algorithm after searching for keywords. For all pages Qi (i = 1, 2, 3, …, n) in Q, the hyperlink weight factor C u is obtained. Make use of semi-structured features of Web pages to obtain location tag information for Web links. According to the position Di (i = 1, 2, 3, …, n) in the Web page which contains the keyword, the link is given a different weight C i (i = 1, 2, 3, …, n), and then, the weights of all the links in the Web page are processed in a unified manner to obtain the hyperlink weight factor C u of the Web page Qi . The

248

M. Hao et al.

relationship between the hyperlink weight C i and the search keyword position Di is as follows: Ci = log2 Di

(3.6)

Generate a page markup tree based on the relativity of Web page tags and then obtain the structural hierarchy of each link. The initial value of Di is 0, and each step deepens the level of the structure Di + 1, thereby obtaining the position Di of all links of the Web page. Assume that the number of times the keyword appears in the Web page link is N. The hyperlink weight factor C u can be calculated as follows:  Cu =

N 

 Cj

N

(3.7)

i=1

3.4 Secondary Calculation of PageRank In Step 2, we calculate the improved PageRank value with the addition of time factor and potential correlation factor. Now, we optimize the set of pages selected based on the PageRank value by the hyperlink weight factor. The formula is as follows: PRnew = Cu ∗ PRold

(3.8)

4 Experiment The simulation part first describes the experimental process of webpage medical information capture and data capture by defining keywords. Then we compare and analyze the algorithm accuracy and algorithm operation efficiency. The Web page crawling effect is determined by the relevance ranking of the returned Web page. The scores of highly correlated Web pages or medical data obtained by a good ranking algorithm should be higher. To verify that the improved algorithm has better performance, use a self-designed scrapy framework crawler. We mainly simulated the data on the “good doctor” Web site (https://www.haodf. com/). The reptile crawled for 3 h, about 6 × 104 pages. The result page set was pre-processed to screen out ten disease nouns in the medical field. The original PageRank algorithm [1] and the improved algorithm are used to calculate the PR score, respectively.

Medical Data Crawling Algorithm Based on PageRank Table 1 Keywords

249

Number

Keyword

Number

Keyword

1

Catarrh

2

Fever

7

Hypertension

3

Heart disease

8

Brain thrombosis

4

Arthritis

9

Uterine cancer

5

Lumbar spondylosis

6

Cervical spondylosis

10

Myocardial infarction

The classification keywords are shown in Table 1. The pages obtained by the keywords are ranked according to the PR scores of the two algorithms. The top 20 results with the highest score are selected for each category, and the number of pages related to the keywords is artificially counted. The accuracy rate is defined as N/20, and the accuracy of each category is shown in Fig. 2. Figure 2 shows the accuracy of the different keyword results obtained by the two algorithms in the medical system database crawl. The subjective feelings of ten students determine whether the data obtained is accurate. As can be seen from the figure, the improved algorithm does improve the accuracy of the results compared to the original PageRank algorithm, with an average increase of 23.4%. Figure 3 shows the number of Webs that end up with .com of the results of the PageRank Improved Algorithm

90 80

Accuracy (%)

70 60 50 40 30 20 10 0 1

2

3

4

5

6

7

8

9

Keyword Fig. 2 Accuracy of medical system database crawling results of two algorithms

10

250

M. Hao et al. PageRank Improved Algorithm

100

.com web (%)

80

60

40

20

0 1

2

3

4

5

6

7

8

9

10

Keyword Fig. 3 Comparison between the number of .com Web of two algorithms

different keywords obtained by the two algorithms. As can be seen from the figure, the number of Web pages ending with .com is reduced in the results obtained by the improved algorithm. More professional the keyword is, more obvious this number decreases. The result shows that the improved algorithm does improve the prejudice of the original algorithm. The performance of the crawler system reflects the capability of the PageRank algorithm from the side. This paper uses the traditional PageRank algorithm, SharkSearch algorithm and the improved algorithm to guide the crawling of topic crawlers, respectively [7]. The first 20 pages obtained by Baidu search are used as seed pages. The crawler’s operating speed and precision are used as performance indicators of the crawler system, which also reflects the performance of the algorithm from the side. The definition of operating speed and precision rate are as follows: V = AC =

DN T

(4.1)

RDN TDN

(4.2)

V presents the running speed. DN presents the number of pages downloaded. T presents the running time. AC presents accuracy. DN presents the number of related topic pages downloaded. TDN presents the total number of downloaded pages. Figure 4 shows the crawler system runtime which uses different algorithms as the

Medical Data Crawling Algorithm Based on PageRank

251 Shark-Search Improved algorithm PageRank

4500 4000 3500

time (s)

3000 2500 2000 1500 1000 500 0 100

200

300

400

500

600

webpage number Fig. 4 Comparison of speeds of crawler using different algorithms

crawling strategy algorithm as a function of the number of downloaded Web pages. It can be seen from the figure that the reptile system using the improved algorithm is faster than the system using the Shark-Search algorithm, and is slower than the system using the PageRank algorithm, which is on average 36.73% faster than the system using the Shark-Search algorithm. The improved algorithm is slower than the original PageRank algorithm because it adds the time factor, potential correlation coefficient factor, and other parameters. However, compared with the Shark-Search algorithm, the improved algorithm does not have a cumbersome operation flow, so the crawling speed is faster. Taking into account the increase in the accuracy of the algorithm, the operating speed is acceptable. Figure 5 shows the crawler accuracy rate as a function of the number of downloaded Web pages. It can be seen from the figure that the precision rate of the crawler system using the improved algorithm is higher than that of the other crawler systems. The average is 55% higher than the system using the PageRank algorithm and 5.08% higher than the system using the Shark-Search algorithm. It means that after increasing the time factor and other parameters, especially compared to the PageRank algorithm, the performance of the improved algorithm has been significantly improved.

252

M. Hao et al. 0.80

PageRank Shark-Search Improved algothm

0.75 0.70 0.65

precision (%)

0.60 0.55 0.50 0.45 0.40 0.35 0.30 0.25 0.20 100

200

300

400

500

600

webpage number

Fig. 5 Comparison of precision rates of crawler using different algorithms

5 Conclusions and Future Work The PageRank algorithm is a very efficient Web page sorting algorithm. However, the algorithm also has problems such as subject drift. This paper proposes an improved PageRank algorithm based on the content and links between Web pages and medical system databases, and adds several parameters. It draws on the idea of the SharkSearch algorithm and uses the content of Web pages and databases as a reference. The increased time factor and hyperlink weighting factor also effectively reduce the bias of the algorithm and improve the accuracy of the algorithm. Experiments show that the algorithm can effectively improve the accuracy of the algorithm. However, there are still some problems to be explored. The local calculation of the PageRank value requires a lot of time. If the distributed architecture can be used for calculation, the efficiency of the algorithm will be greatly improved. We will explore this issue in the future.

References 1. Page, L.: The PageRank citation ranking: bringing order to the web. Stanf. Digit. Libr Work. Paper 9(1), 1–14 (1998) 2. Haveliwala, T.H.: Topic-sensitive PageRank: a context-sensitive ranking algorithm for web search. IEEE Trans. Knowl. Data Eng. 15(4), 784–796 (2003)

Medical Data Crawling Algorithm Based on PageRank

253

3. Richardson, M., Domingos, P.: The intelligent surfer: probabilistic combination of link and content information in PageRank. In: International Conference on Neural Information Processing Systems: Natural and Synthetic, pp. 1441–1448 (2001) 4. Haveliwala, H.: Efficient computation of PageRank. Stanford Technical Report (1999) 5. de Kerchove, C., Ninove, L., van Dooren, P.: Maximizing PageRank via outlinks. Linear Algebra Appl. 429(5–6), 1254–1276 (2008) 6. Yang, W., Zheng, P.: An improved pagerank algorithm based on time feedback and topic similarity. In: 2016 7th IEEE International Conference on Software Engineering and Service Science (ICSESS). IEEE, pp. 534–537 (2016) 7. Hersovici, M., Jacovi, M., Maarek, Y.S., et al.: The shark-search algorithm. An application: tailored Web site mapping. In: International Conference on World Wide Web, pp. 317–326 (1998)

The Alarm Feature Analysis Algorithm for Communication Network Xilin Ji, Xiaodan Shi, Jinxi Han, Yonghua Huo, and Yang Yang

Abstract Due to the long data transmission distance and the highly dynamic changes of communication nodes, the transmission loss and the link error rate of information are significantly increased during transmission. In this paper, based on the features of the communication network, an alarm feature analysis algorithm is proposed. By analyzing the original alarm data with repetition, redundancy and noise, it is finally converted into multiple alarm transaction sets. In the design process, the improved affinity propagation clustering algorithm is proposed and the entropy weight method is used to process the alarm data, which improves the efficiency of extracting alarm transactions. This paper also proposes a method for processing delayed alarm data, which is quickly analyzed under the premise that the delay information is not discarded. Experiments show that the algorithm designed in this paper can effectively improve the efficiency of analyzing alarm information. Keywords Fault diagnosis · Feature analysis · Data processing · Delayed alarm

1 Introduction With the rapid development of information technology of communication networks, fault diagnosis and location become the core of network management. When the network fails, there will inevitably be a large amount of alarm information [1].

X. Ji Institute of Chinese Electronic Equipment System Engineering Company, Beijing, China X. Shi · Y. Yang (B) State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] J. Han Institute of Systems Engineering, Beijing, China Y. Huo The 54th Research Institute of CETC, Shijiazhuang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_25

255

256

X. Ji et al.

Finding the fault location and eliminating unnecessary information from many fault information is not only a quality problem but also an efficiency problem. The generation of a large number of alarms may cause the alarm information indicating the root cause of the fault to be masked [2]. Since the expansion of the scale of communication networks, the traditional alarm analysis method is not fully applicable. Therefore, this paper analyzes the alarm information in the communication network and divides the original alarm data into multiple alarm transaction sets with time and spatial features by using the time window, clustering and entropy weight analysis methods. At the same time, this paper also proposes the method of quickly processing delayed alarm to ensure the accuracy of fault diagnosis. The experiment shows that the algorithm can effectively improve the efficiency of alarm analysis. The remaining sections of this paper are organized as follows: Sect. 2 introduces related work, Sect. 3 introduces improved algorithms, Sect. 4 introduces simulation experiments and Sect. 5 summarizes the paper.

2 Related Works An alarm is a special notification sent by the managed system to the network management center. Robert D. suggests that an alarm contains the following information: alarm code, alarm level, device that issued the alarm, device type and alarm occurrence time [3]. Wu proposed a method [4] for analyzing the correlation in the alarm sequence, which is greatly improved compared to the previous basic method. The purpose is to perform feature analysis on an alarm sequence based on the nature of the alarm itself. The simple correlation-based alarm analysis method is the analysis of the occurrence time of the same-origin alarm. However, since there are hundreds of devices in the network, if only one device is analyzed using the simple method described above, very little information can be obtained. Hauptmann M proposed the idea of using a sliding time window to divide the alarm transaction set [5]. The size of the window determines the length of the transaction in the alarm transaction library, and the size of the step reflects the strength of the correlation between adjacent alarm transactions [6].

3 Alarm Feature Analysis Algorithm This paper proposes an alarm feature analysis algorithm for the communication network. The flowchart of the algorithm is shown in Fig. 1.

The Alarm Feature Analysis Algorithm for Communication Network

257

Fig. 1 Algorithm flowchart

3.1 Alarm Data Preprocessing In order to overcome the shortcomings of the original alarm data, such as information redundancy and missing key attributes, this paper preprocesses the original alarm data at first. The specific process is as follows: (1) Check the alarm occurrence time field, determine whether it is a delayed arrival alarm. If so, access directly to the delayed alarm processing. (2) Combine the alarms with the same attributes in Step 1 into one. (3) Remove extraneous attributes, extract useful information for subsequent alarm analysis and unify the frame format. The format of the processed frame is shown in Table 1. Table 1 Alarm frame format Alarm ID

Alarm level

Dev ID

Event time

01001

2

D11

Mon May 14 17:59:29 CST 2018

01002

1

M24

Mon May 14 17:59:41 CST 2018

258

X. Ji et al.

(4) Filter the missing key fields and the alarm information that cannot be identified for various reasons. (5) Rearrange the alarm information according to the alarm sending time.

3.2 Time Feature Analysis In order to locate the root cause failure point easily, we use the sliding time window to divide the alarm transaction. This paper adopts the clustering-based sliding window to divide the alarm transaction, and window and step size are set for each cluster. In the choice of clustering method, this paper chooses the affinity propagation algorithm because of the large amount of the alarm sequences and uncertain distribution. Affinity propagation (AP) is a clustering algorithm based on the concept of “messaging” between data points [7]. The input of the AP is the similarity matrix, and the elements at the diagonal position are called the preferences, which represent the initial ability of each data point as a clustering center. The value of the elements at the non-diagonal position of the matrix is similar(i, j) = −di2j = −i − j2 (i = j). The main iteration in the algorithm passes two kinds of information: responsibility and availability. The formula of the responsibility and availability are as shown in Eqs. (3.1) and (3.2): {a(i, j  ) + similar(i, j  )} r (i, j) = similar(i, j) − max  j = j

  ⎧  ⎪ ⎪  ⎨ min 0, r (i, j) + max{0, r (i , j)} (i = j) i  ∈{i, / j} a(i, j) =  ⎪ ⎪ max{0, r (i  , j)} (i = j) ⎩

(3.1)

(3.2)

i  = j

Finally, for the data point i, the point j which makes a(i, j) + r (i, j) the largest is selected as its cluster center. This paper proposes an optimization of the AP algorithm, aiming that the AP algorithm leads to the low efficiency when the uneven distribution of alarm data density in the communication network, further considers the distance when calculating the responsivity. The formula is as follows: rnew (i, j) = µ × rold (i, j)

(3.3)

The Alarm Feature Analysis Algorithm for Communication Network

259

where µ is defined as Eq. (3.4):  µ=

1− 1 di j

,

1 di j

, (rold (i, j) < 0) (rold (i, j) ≥ 0)

(3.4)

After clustering, we have divided the alarm data into multiple relatively concentrated and independent sub-sequences. Then, we set different window sizes and sliding steps for each cluster. We should ensure that there are enough overlaps in adjacent windows. In summary, we make the sliding window w and the sliding step l satisfy Formulas (3.5) and (3.6), where T is the length of the current time period. Pmin and Q max are the minimum and maximum values of the time interval of different alarm scenarios. Q max ≤ w ≤ T

(3.5)

Pmin ≤ l ≤ w

(3.6)

The sliding time window improves the efficiency of the alarm analysis. Because of the sliding characteristic, it helps solve the problem that the alarm data time is not synchronized effectively. It turns the original alarm data into alarm transaction sets with time features.

3.3 Spatial Feature Analysis In this section, we use the result of the above step as input. In network operation, the importance of different alarm is usually different. This paper introduces the entropy weight method to weight the alarm information and calculates the weight according to the alarm level and the importance of the location of the device that issued the alarm in the topology. The procedure of the weighting alarm with the entropy weight method is as follows: Quantify the alarm level and the location of the alarming device. For m alarms, constructing a m × 2 matrix X, where xi j (0 < i ≤ m, j = 1, 2) represents the value corresponding to the j attribute of the alarm i; Normalize the original matrix X to get the matrix X  ; Calculate the entropy value. For m alarms, the entropy value h j of the j indicator is shown in Eq. (3.7), where pi j =

x i j  xi j

:

h j = − ln m



pi j ln pi j

(3.7)

260

X. Ji et al.

Calculate the weight of each indicator w j and the comprehensive evaluation of each alarm: w j = 2

1 − hj

j=1 (1

Wi =

2

− h j)

w j xi j

(3.8)

(3.9)

j=1

Since the alarm level and the importance of the device in the topology are considered in determining the alarm weight comprehensively, it can be considered that the alarm with high weight has a great possibility to indicate the root cause of the fault. We start from the device that issued the alarm with the largest weight when the failure occurs and then traverse the horizontal and vertical traversal to find out whether the devices connected to it have sent alarms. If so, divide them into a set; if they do not belong to the same chain road, then classify it as another set. We can see that if the analysis starts from the node with the largest weight, the efficiency of the traversal search will be effectively improved compared to the point in the random selection set (possibly the edge point) because this method has reduced lots of useless searches to speed up the algorithm.

3.4 Delayed Alarm Data Processing Due to the delay problem in the communication network, this paper proposes an algorithm to process the delayed arrival alarm data at the stage of analyzing the alarm to minimize the impact of data delay. After each analysis is completed, the results of the current partition set and the topology of the current analysis are saved and submitted to the subsequent processing module. When a new alarm arrives at the network management center, we check its “alarm occurrence time” field first to determine whether it is a delayed arrival alarm. If not, it will be analyzed according to normal steps; otherwise, execute the delay processing algorithm. The specific algorithm steps are as follows: Algorithm Delayed alarm data processing

The Alarm Feature Analysis Algorithm for Communication Network

261

Parameters: Maximum related devices hop, Input: Alarm transaction sets Delayed alarm arrival time Initialization: i Start While

do then

If Add

to the two nearest previous and after sets

Else Referred the eligible sets as While j

do then

If Add

to

Else Continue; End while End while Return Alarm transaction sets End

4 Experiment In this paper, we use the simulated alarm data of the communication network to conduct comparative experiments on the alarm feature analysis algorithm. In the experiment, the effectiveness of the overall algorithm and the delay processing part of the alarm data are mainly verified.

4.1 Comparative Analysis of Algorithm Efficiency We use the alarm sequences with the durations of 5, 10 and 20 s (the number of alarms are 65, 100 and 186, respectively) as the original input data, respectively, using the algorithm proposed in this paper and the alarm feature analysis algorithm based on double constraint sliding time window proposed in [8]. The two algorithms were

262

X. Ji et al.

compared and analyzed by using the time of algorithm execution and the clustering quality of the final cluster as evaluation indicators. The definition of clustering quality M is as follows: M=

L E

(4.1)

where L and E, respectively, represent inter-cluster differences and intra-cluster differences, which are calculated as follows: E=

m n



t − t¯i 2

(4.2)

i=1 j=1

L=





t¯j − t¯i 2

(4.3)

1≤i< j≤n

n is the number of final clusters, m is the number of alarms in each cluster, t is the time at which each alarm is sent and t¯ indicates the time when the center of each cluster sends alarms. A good clustering should be to make the inner part of the cluster more compact and the distance between the clusters farther. The larger the clustering quality function M, the more successful the clustering. The results of the comparison experiments are shown in Figs. 2 and 3. By analyzing the above chart, we can draw the following conclusions: Under the same amount of data, the alarm feature analysis algorithm proposed in this paper has a slightly improved clustering quality compared with the algorithm in [8]. The average performance increased by 5.28%; the execution time of the algorithm decreased, and the efficiency of extracting alarm transactions for the same alarm sequence increased by 6.36% on average; and when the amount of data was different, the efficiency Fig. 2 Comparison of extraction time clustering quality of two algorithms

The Alarm Feature Analysis Algorithm for Communication Network

263

Fig. 3 Comparison of clustering quality of two algorithms

increased as the amount of data increased. The amount of data is larger; the effect becomes more apparent. Therefore, the alarm feature analysis algorithm proposed in this paper can effectively improve the quality of alarms and the efficiency of extracting alarms during time feature analysis.

4.2 Effectiveness of Delayed Alarm Data Processing Using the algorithm proposed in this paper, the effectiveness of the alarm delay processing part we designed is verified by adding the delayed arrival alarm information in the original alarm data artificially. According to the actual situation, we classify different situations: (1) For the delay alarm that does not fall into any of the subsets, we divided before, the current processing will be classified into a collection containing only its own and immediately submitted to the processing module. (2) If the sending time falls into a certain set of the previous split, but there is no alarm sent by the device with the same or adjacent one hop in the set, this process divides it into a set containing only its own, and immediately submit it to the processing module. (3) If the sending time falls into a certain set of the previous split, and the alarm is sent by the device with the same or adjacent one hop in the set, it is directly added to the set at the time of processing and immediately submitted to the processing module. In this case, we compare the accuracy of the partitioned set with the reanalysis step by step and the execution speed, and the result is shown in Figs. 4 and 5. We can find from the above charts that the accuracy of the partition set is slightly improved by 0.79%, but the speed of processing delayed alarms is increased by

264

X. Ji et al.

Fig. 4 Comparison of accuracy of processing delayed alarms

Fig. 5 Comparison of speed of processing delayed alarms

37.62% comparing with the algorithm in [8] without delayed alarm processing on average. Thus, our algorithm effectively increases the analysis rate while ensuring accuracy.

5 Conclusions In view of the effectiveness and the delay factor in the communication network, this paper proposes an alarm feature analysis algorithm. By analyzing the time and spatial features of the original alarm data, the algorithm transforms the original alarm data into alarm transaction sets. In addition, the algorithm also performs simple processing on the delayed alarm. This paper mainly considers the problem of high alarm information burst rate and puts forward the idea of sliding time window based on the optimized AP clustering algorithm. When analyzing the spatial features of the

The Alarm Feature Analysis Algorithm for Communication Network

265

alarm, we use the entropy weight method to weight the alarm information. Experiments show that the algorithm proposed in this paper can effectively improve the clustering quality and the efficiency of alarm transaction extraction. Acknowledgements This work was supported in part by Open Subject Funds of Science and Technology on Information Transmission and Dissemination in Communication Networks Laboratory (SKX182010049), Fundamental Research Funds for the Central Universities (2019PTB-019), the Industrial Internet Innovation and Development Project 2018 of China.

References 1. He, Q., Zhou, W., Xu, H.: A distributed network alarm correlation analysis mechanism for heterogeneous networks. J. Circuits Syst. Comput. 27(1), 4 (2018) 2. Susnea, I., Vasiliu, G.: Emergency communication system for fault diagnosis in power distribution networks. In: International Symposium on Electrical & Electronics Engineering (2013) 3. Gardner, R.D., Harle, D.A.: Network fault detection: a simplified approach to alarm correlation. In: XVI World Telecom Congress Proceedings, pp. 44–51 (1997) 4. Wu, Y., Du, S., Luo, W.: Mining alarm database of telecommunication network for alarm association rules. In: Pacific Rim International Symposium on Dependable Computing (2005) 5. Hauptmann, M., Lubin, J.H., Rosenberg, P., et al.: The use of sliding time windows for the exploratory analysis of temporal effects of smoking histories on lung cancer risk. Stat. Med. 19(16), 2185–2194 (2000) 6. Li, T., Li, X.: Novel alarm correlation analysis system based on association rules mining in telecommunication networks. Inf. Sci. 180(16), 2960–2978 (2010) 7. Frey, B.J., Dueck, D.: Clustering by passing messages between data. Science 315, 972–976 (2007) 8. Li, T.Y., Li, X.M.: Study of alarm pre-treatment based on double constraint sliding time window. Appl. Res. Comput. 30(2), 582–584 (2013) (in Chinese)

Machine Learning

Analysis of User Suspicious Behavior in Power Monitoring System Based on Text Vectorization and Unsupervised Machine Learning Jing Wang, Ye Liang, Lingyun Wu, Chengjiang Liu, and Peng Yang

Abstract In order to solve the feasibility, timeliness and accuracy of the power monitoring system’s user safety behavior analysis, a user suspicious behavior analysis method for power monitoring system was proposed by combining TF-IDF and kmeans++ algorithm, and the method was run on Spark, a big data analysis and calculation engine. Experiments show that this method has good performance and can effectively analyze suspicious behaviors of users with potential threats. Keywords Power monitoring system · Behavior analysis · Machine learning

1 Introduction With the rapid development of power monitoring systems, the depth and breadth of their monitoring are constantly increasing, which makes it possible to conduct finegrained analysis and behavioral pattern research on user safety behavior in power monitoring systems. In recent years, most domestic researches on user behavior analysis are focused on applying big data technology to business. The literature [1] used big data technology to collect and analyze the full life cycle rules of users’ activity behavior trajectory, constructs a user behavior analysis system with personalized service characteristics, and applies it to library services, which can effectively discover readers’ reading needs and significantly improve the service quality of the library. The literature [2] built a user’s behavior analysis model to provide a feasible implementation scheme for specific behavioral analysis applications, which uses Hadoop architecture to collect behavioral data of mobile network users, and mines the relevant user behavior attributes by resolving and secondary processing. The literature [3] collected the log of mobile user’s online behavior in the cloud computing environment with the big J. Wang (B) · Y. Liang Beijing Kedong Power Control System Co., Ltd, Beijing, 100192 Beijing, China e-mail: [email protected] L. Wu · C. Liu · P. Yang Southwest Branch of State Grid Corporation of China, 610041 Chengdu, Sichuan, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_26

269

270

J. Wang et al.

data technology, then visualized the behavior data based on the different dimensions of log user behavior to generate user portrait, and distinguished the different user groups by the analysis, and successfully applied in business to provide a strong support for merchants to find target customers. This method solves the problem that it is too coarse in granularity or inaccurate in positioning in traditional log analysis methods [4–7]. Combinated with K-means clustering algorithm and the neural network clustering algorithm, the literature [8] clustered the Internet behavior of users in college network, and compared the clustering results with the Internet situation of users, so as to provide suggestions for improving the Internet management strategy. In recent years, the research on user behavior analysis abroad mainly focuses on the analysis model and user behavior credibility analysis. Lu and Xu [9] put forward a dynamic trusted authentication model of user behavior, which standardizes and classifies the collected behavior data, then establishes the authentication model with random Petri net, then described the model in detail, and finally obtained the credibility, and compared it with the traditional trusted authentication model. Li and Tian [10] proposed a comprehensive weight calculation method of user behavior, where the behavior of the entropy weight method is adopted to calculate the objective weight, and the analytic hierarchy process is adopted to obtain the behavior of the subjective weight, finally the comprehensive weights are obtained through the analysis and calculation the deviation of the subjective and objective weights, and the credibility of the user is obtained, so the low credibility of users as suspicious or exception, which balances the subjective and objective weights, and makes the calculation of credibility more close to reality. Hosseini et al. [11] put forward a score method to evaluate the trust of user behavior in the cloud environment, the initialization collect user identity information, which calculates this user’s final score by the following six steps: Collecting the user’s initialization identity information, computing the new behavior scores, computing history score, computing other entity object’s recommendation scores, computing this user’s score in other cloud computing environments, and computing the total score. The literature [12] proposed the method of calculating the trustworthiness of user’s behavior through the suggestions of third party and user’s previous service providers, while the literature [13] proposed a trust evaluation model based on service level protocol SLA to obtain user’s historical behavior and generate trust values; meanwhile, Bayesian reasoning is used to infer the current and historical overall trust values, so as to judge the credibility of user’s behavior. Based on user behavior analysis of recent domestic and abroad research, according to the characteristics of electric power monitoring and control system for the user’s behavior, in this paper, a new suspicious user behavior analysis method is proposed which is different from the traditional analysis method of auditing user behaviors based on the known rules. In our method, big data analysis technology is used to mine a large number of user entity behavior history records in power monitoring systems, and a user history behavior model is established, and the suspicious behavior of potential threats to users in the system is analyzed through the outlier monitoring.

Analysis of User Suspicious Behavior in Power Monitoring System …

271

2 Suspicious User Behavior Analysis Algorithm 2.1 User Entity Behavior Chain Traditional audit of user operation behavior focuses on the analysis of user single operation record through known rules, and studies user operation behavior from single entity and moment. However, each action of the user in the system is not isolated, and what is more is that a continuous action with a clear intention to achieve a certain goal across multiple entities and multiple moments. Therefore, this paper introduces the chain analysis technology of user behavior to chain the user behavior. The algorithm is described as follows: (1) After the user logs in the system, the root MD5 value of its behavior chain is calculated according to its srcIP (source IP), logintime (login time) and username (user name), and the relevant information is stored. Its native operation records the root MD5 value as the identifier, and the record format is: MD5 value, PTS, operation, actual command, operation time, whether to alarm. (2) When the user changes or jumps between entities (such as from A host to B host), the behavior of the current chain MD5 value and the preMD5 value associated with its predecessor MD5 (such as root MD5) value are calculated according to srcIP (source IP), dstIP (destination IP), dstPort (destination port), logintime (login time), username (user name), and the relevant information is stored. The operation after the jump is recorded by the MD5 value generated by the current jump. The record format is MD5 value, PTS, operation, actual command, operation time, and whether to alarm. (3) Repeat step 2 to record the user’s behavior when the user continues to make behavior chain changes. The feature of this algorithm is that the user behavior is abstracted into a series of continuous chain actions, and the behavior chain can be searched rapidly from the source to the end through the MD5 value. It provides preconditions for comprehensive analysis of user behavior across multiple entities and multiple moments, and supports rapid follow-up behavior traceability.

2.2 TF-IDF The term frequency-inverse document frequency (TF-IDF) is a feature vectorization method that reflects the importance of terms in corpus to a document. In this paper, after the chain processing of user actions, the user behavior chain is abstracted into a short piece of user behavior chain that records user actions one by one and can reflect the intention and purpose behind the behavior chain. Therefore, the TF-IDF method is introduced to realize the vectorization of user behavior chain.

272

J. Wang et al.

Let t stand for a term, d stand for a document, and D stand for a document collection. The term frequency TF(t, d) represents the number of times the term t appears in document d, while the document frequency DF(t, d) represents the number of documents containing the term t. If only the word frequency is used to measure the importance of a term, it is easy to overemphasize the term that appears frequently but with less information. If the term appears very frequently in the corpus, it means that it does not contain special information about a particular document. The inverse text frequency is a numerical measure of the amount of information provided by a term: IDF(t, D) = log((|D| + 1)/(DF(t, D) + 1))

(1)

where |D| represents the total number of documents in the corpus. Because the logarithms are used, the term has an IDF value of 0 when it appears in all documents. The TF-IDF metric is generated by TF and IDF as follows: TF − IDF(t, d, D) = TF(t, d) · IDF(t, D)

(2)

2.3 K-means++ In this paper, the k-means++ algorithm is selected to perform clustering analysis on user behavior vector and obtain the historical behavior model of user behavior. The k-means++ algorithm originates from the k-means (k-means clustering) algorithm, which is a common clustering analysis method. Its purpose is to divide n observed values into k classes. The algorithm is described as follows: (1) Randomly select k samples from the data set as the initial clustering center C = {c1 , c2 , . . . , ck }. (2) For each sample xi , calculate the distance between the sample and k clustering centers, and put it into the class of the center with the smallest  distance. (3) Recalculate the clustering center for each category ci = |c1i | x∈ci x. (4) Repeat steps 2–3 until the position of the clustering center no longer changes. The core of the k-means clustering algorithm is to find the clustering center with the smallest variance (i.e., the sum of the square of the distance between each point clustered to the center point and the center point) in the class; however, for arbitrary input k-means, its core problem is a NP hard problem, and the standard method to find the approximate solution (often called LIoyd’s or k-means algorithm) is widely used and often can quickly find and understand: (1) It has been proved that the running time of this algorithm in the worst case is a super polynomial time.

Analysis of User Suspicious Behavior in Power Monitoring System …

273

(2) Compared with the optimal clustering, the approximate value of the objective function may be arbitrary difference, that is, the global optimal solution is not guaranteed. The k-means++ algorithm solves the second defect of the k-means algorithm by specifying the process of initializing the clustering center before the standard kmeans optimization iteration. This algorithm ensures that an approximate solution with time complexity O(log k) can be found. The algorithm is described as follows: (1) Randomly select a sample as the initial clustering center ci . (2) Calculate the shortest distance between each sample and the current clustering center (the distance from the nearest cluster center), denoted by D(x); then calculate the probability that each sample is selected as the next cluster center 2  D(x) 2 . Finally, the next cluster center is selected according to the roulette x∈X D(x) wheel selection. (3) Repeat step 2 until k clustering centers are selected. The subsequent process is the same as steps 2–4 in the k-means algorithm.

3 Experimental Process and Result Analysis 3.1 Experimental Environment In the experiment, a distributed cluster with 3 nodes and 112 cores is used. Spark universal analysis engine is used in the computing framework, Kafka distributed flow platform is used for data flow, and elastic search analysis search engine is used for data storage. User history data is taken from traditional relational databases. The experimental environment is shown as follows. As shown in Fig. 1, the historical behavior data of the power monitoring system users is stored in a traditional relational database, and real-time user behavior data is stored in Kafka. When the model is trained, the historical data of the user read from the relational library is trained by the Spark Mllib, a machine learning library that comes with Spark. In online analysis, the user’s online behavior data is read from Kafka using Spark Streaming. The model is analyzed, and finally, the analysis results are written into the distributed storage system Elasticsearch.

3.2 Experimental Data The data used in this paper is collected from the log of user operation behavior in the power monitoring system between December 18, 2017 and September 20, 2018. The collected data is shown in Table 1.

274

J. Wang et al.

Fig. 1 Experimental environment

3.3 Experimental System Architecture In the experiment, the original data is analyzed and sorted to generate the operational behavior chain. The TF-IDF algorithm is used to conduct vectorization processing of the operational behavior chain and the k-means++ algorithm is used to conduct the clustering analysis. In addition, the stored model is used for outlier detection of online data to realize the mining of potential threat behaviors. The experimental system architecture is shown in Fig. 2. As shown in Fig. 2, the whole experiment is divided into two stages: model training and online analysis. In the model training phase, first, the user history behavior data read from the relational library is subjected to a preprocessing process such as data cleaning and behavior chain analysis to obtain sample data required for training; and then, TF-IDF is performed on the sample data. Vectorization: Finally, the k-means++ algorithm is used to cluster the vectorized data to generate a user behavior model. In the online analysis stage, first, the window calculation is performed, all user data in a window is obtained from Kafka, and the sample data of the online analysis is obtained after preprocessing; then, the trained vectorized model is loaded, and the data is vectorized. After completion, the user behavior model is loaded, and the outlier analysis is performed; finally, the analysis result is written into the distributed storage system Elasticsearch.

PTS /dev/pts/4 /dev/pts/3 /dev/pts/4 …

MD5

215915cb814a9db070299e82a3a5193c

432315cb814a9db070299e82a3a5c543

7639g3d4814a9db070299e82a3axces



Table 1 Raw data



mkdir oms

df -h

free -g

Operation



mkdir

df

free

real_order



2018-09-20 9:03:45

2018-09-21 13:43:26

2018-09-20 14:33:48

operate_time



/home/d5000

/home/d5000

/etc./init.d

Path



0

0

0

is_warning

Analysis of User Suspicious Behavior in Power Monitoring System … 275

276

J. Wang et al.

Fig. 2 Algorithm flow

3.4 Experimental Process The experimental steps are as follows: (1) The historical user behavior operation log is read from the traditional relational database, and each operation log is analyzed in a chain way. The MD5 value of each action chain is generated for each log. (2) According to the MD5 value of each operation log, aggregate these operation log data to generate user behavior chain data. (3) Process the user behavior chain data, use TF-IDF method to vectorize the data to generate training data, and generate an IDF model, store it for online analysis. (4) Historical training data are input into the k-means++ algorithm for clustering model training, where 2–15 clustering centers were specified. Subsequently, the clustering model is evaluated and selected by calculating the contour coefficient of different number of centers. The Silhouette coefficient will be calculated as follows: S(i) =

b(i) − a(i) max{a(i), b(i)}

(3)

Analysis of User Suspicious Behavior in Power Monitoring System …

(5)

(6)

(7) (8) (9)

277

where a(i) = average (the distance from I vector to all other points in the cluster it belongs to) and b(i) = min (the average distance from the i vector to all points in the cluster that are not its own). The contour coefficient of the sample set is the average of all the sample contour coefficients. The value range of the contour coefficient is [−1, 1]. The closer the sample distance of the same category is and the farther the sample distance of different categories is, the higher the score will be. The clustering model with the highest contour coefficient is selected here for storage. Calculate the distance between the furthest sample points from the clustering center in each cluster in the clustering model and its clustering center, which is stored as the outlier decision threshold. The user behavior chain is generated by the window calculation of the online user operation behavior data. The window length is 2 h (the duration of the window) and the sliding interval is 1 h (the interval of performing the window operation). Load TF-IDF model to vectorize the user behavior chain data in a window for analysis by the user behavior model. Load the user behavior model to analyze the outliers of the user behavior vector and find out the outliers. If there are outliers in the analysis results, the early warning information generated by the behavior chain data which is determined as outliers is written into elastic search, and the potential threat of the behavior chain and deviation from history is prompted.

3.5 Experimental Results In this experiment, the clustering results of the user behavior model were evaluated using the contour coefficient index. For a given training sample and the number of clustering centers, the model contour coefficients are shown in Table 2. Due to the limited space, some contents of Table 2 are omitted here. The experimental results show that when the number of clustering centers is 2, the contour coefficient of the clustering model is the highest, that is, the closest the sample distance of the same type in the model is, and the furthest the sample distance of different categories is. Therefore, the clustering model with a number of clustering centers of 2 is selected, perform random anomaly operations on the host to be detected, and use this model for real-time analysis of the detected online user behavior data. The results are shown in Table 3. Through the above experiments and the experimental results in Table 3, it can be proved that the analysis method in this paper can effectively detect the user behavior data which are different from the historical data in the system. These unusual user behaviors are the suspicious behaviors of users with potential threats.

278 Table 2 Model contour coefficient table

Table 3 Analysis results of potential threat user behavior

J. Wang et al. Number of clustering centers

Silhouette coefficient

2

0.9987215857589518

3

0.9983651364278496

4

0.9983851866024714

5

0.9976297823015263

6

0.9978045868107168

7

0.9970454739876846

8

0.9970045868107168

9

0.9960454387687471





Warning time

Warning host

Alert user

Potentially threatening behavior

2019-01-22 T 17:20:53

dts

ilog

ls rm -rf dsd

2019-01-22 T 17:26:34

agc

ilog

rm -r ls ldconfig

2019-01-22 T 17:36:22

oms

ilog

ls make rm ssh









4 Conclusion In this paper, the operation log chain has been analyzed for users’ operation behavior in the power monitoring system, users’ behavior chain has been vectored, the unsupervised machine learning clustering analysis algorithm has been used to analyze potential threat and suspicious behavior of users in the power monitoring system based on TF-IDF and k-means++ algorithms under the Spark computing framework. Through outlier analysis of historical user operation behavior model, suspicious behaviors that are different from historical data have been mined. The experimental results have shown that the analytical method can effectively capture suspicious behaviors with incorrect and destructive operation in power monitoring system.

References 1. Chen, C.: Study of user behavior analysis based on big data for library personalized service. Libr. Work Study 1(02), 28–31 (2015). (in Chinese) 2. Gu, H.X., Yang, K.: Mobile user behavior analysis system and applications based on big data. Telecommun. Sci. 32(3), 139–146 (2016)

Analysis of User Suspicious Behavior in Power Monitoring System …

279

3. Luo, H.Y., Yang, Y., Wang, Y., et al.: A cloud computing based mobile user behavior analysis system. Control Eng. China 25(2), 218–223 (2018) 4. Zeng, L.F., Zhu, Z.Y., Chen, Y.: The calculation of user interest based on web logs and web page feature contents. Microprocessors 8(4), 86–90 (2010) 5. Ma, A.H.: Design and Realization of Accurate Selling System Based on User Behavior Analysis. Nanjing University of Posts and Telecommunications (2013) 6. Wang, J., Li, L., Meng, F., et al.: Empirical study of mobile searcher behavior based on web log mining. Libr. Inf. Serv. 57(19), 102–106, 120 (2013) 7. Wang, P., Zhang, S.Y., Chen, X.J.: Key technology of web users’ behavior analysis based on dynamic behavior profile database. Comput. Technol. Dev. 19(2), 20–23 (2009) 8. Xue, L.M., Luan, W.X.: Application of clustering algorithm in university network user behavior analysis. Mod. Electron. Tech. 39(7), 29–32 (2016) 9. Lu, X., Xu, Y.: An user behavior credibility authentication model in cloud computing environment. In: International Conference on Information Technology and Electronic Commerce, pp. 271–275 (2015) 10. Li, J.J., Tian, L.Q.: User’s behavior trust evaluate algorithm based on cloud model. In: Fifth International Conference on Instrumentation and Measurement, Computer, Communication and Control, pp. 556–561 (2016) 11. Hosseini, S.B., Shojaee, A., Agheli, N.: A new method for evaluating cloud computing user behavior trust. In: 2015 7th Conference on Information and Knowledge Technology, pp. 1–6 (2015) 12. Singh, S., Chand, D.: Trust evaluation in cloud based on friends and third party’s recommendations. In: 2014 Recent Advances in Engineering and Computational Sciences (RAECS), pp. 1–6 (2014) 13. Marudhadevi, D., Dhatchayani, V.N., Sriram, V.S.S.: A trust evaluation model for cloud computing using service level agreement. Comput. J. 58(10), 2225–2232 (2015)

Prediction of Coal Mine Accidental Deaths for 5 Years Based on 14 Years Data Analysis Yousuo Joseph Zou, Jun Steed Huang, Tong Xu, Anne Zou, Bruce He, Xinyi Tao, and Sam Zhang

Abstract The situation of coal mine safety production is grim, in order to emphasize the importance of miners’ safety, this paper predicted the death toll of China over the next five years. The death toll of 2005–2018 was logarithmically calculated and analyzed by the linear regression model, then, using the least square method to find its regression coefficient, and the regression equation is established by using the obtained regression coefficients. The death toll was predicted using the derived regression equation: Over time, the number of deaths among coal miners has fallen proportionately from year to year, and the prediction curve conforms to the existing law of death. In error analysis, seven regression evaluation indexes are used to evaluate this regression model, and the results show that the model is feasible. Keywords Regression analysis · Logarithmic space · Prediction

Y. J. Zou University of Guam, Mangilao, USA J. S. Huang Southern University of Science and Technology, Shenzhen, China T. Xu (B) Jiangsu University, Zhenjiang, China e-mail: [email protected] A. Zou School of Engineering, Vanderbilt University, Nashville, TN, USA B. He Ryerson University, Toronto, ON, Canada X. Tao University of Southern California, Los Angeles, CA, USA S. Zhang Queen’s University, Kingston, ON, Canada © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_27

281

282

Y. J. Zou et al.

1 Introduction Due to the large population of China, coal mine remains the main energy source of the entire country, at the same time, coal mine is also the main energy in the USA, as such, from the points of global, it is very important to predict the accident death rate for the coal mine industry, such that we can be prepared for the accident, and find a way to reduce the death rate. This paper proposes a regression model which the dependent variable was based on logarithm space to achieve the prediction of death toll. The data in this paper is based on China’s coal mines, which are actually suitable for all the energy industries in the world, and the data is gathered from the China University of Mining and Technology, Institute of Mine Safety Engineering webpage [1]. The authors of [2] used the gray forecasting theory, established the dynamic prediction model of million tons mortality, and predicted million tons mortality of Shanxi Province statistically in recent years. The prediction accuracy is validated. However, the results are for one province only, we are more concerned with the entire country overall model. The authors of [3] uses the general GM(1, 1) model and residual GM(1, 1) model of gray system theory, and the Holt linear trend model and ARIMA(0, 2, 1) model based on SPSS time series analysis to analyze and predict the date of death rate per million-ton in coal mine from 2000 to 2017 in China. It is for the entire country, however, the focus is on the date of accident, our focus is on the total number of death regardless of the accident date and the production quantity. We would like to challenge our prediction method with more uncertainties such as season or production factors. The detailed relationship between the death rate and production was considered in report [4]. China and the USA are of the two largest coal producer and consumer, but China lags behind the USA in regard to coal mine death accident safety. By learning the advanced experiences from the USA, the present status of coal mine safety in China was recognized in [5]. An even big picture was given by Stanford report [6], explaining the China coal mine value chain. Chu et al. [7] have done the statistical analysis of the distribution of coal resource in China, no prediction was made. Tong et al. [8] did the analysis of the relationship between miner behavior with the gas accident death rate, it shows the safety awareness does reduce the death rate. As such, we focus on the prediction of total death rate for coming five years, hoping that to emphasize the safety importance for the mineworkers.

2 Regression Analysis Regression analysis is a classical method that uses the relation between two or more quantitative variables so that a response or outcome variable can be predicted from the other, or others [9]. This method has been widely used in various fields, such as machine learning in computer field, bioinformation in biological field. Classically, a

Prediction of Coal Mine Accidental Deaths for 5 Years …

283

basic regression function has only one predictive variable, and its regression model is linear. The function can be stated as follows: Yi = β0 + β1 X i + εi

(1)

where Yi is the value of the response variable in the ith trial; β0 and β1 are regression coefficients; X i is a known constant, namely the value of the predictor variable in the ith trial; εi is a random error term with mean E{εi } = 0 and variance σ 2 {εi } = σ 2 ; I = 1, …, n. Since E{εi } = 0, it follows E{a + Y } = a + E{Y }, so we can get the regression function: Yi = β0 + β1 X i

(2)

We use least square estimate to find the estimators of regression parameters β0 and β1 . In particular, the method of least square requires that we consider the sum of the n squared deviations. This criterion is denoted by Q [9]: n  (Yi − β0 − β1 X i )2

Q=

(3)

i=1

According to the method of least squares, the estimators of β0 and β1 are those values b0 and b1 , respectively, that minimize the criterion Q for the given sample observations (X 1 , Y1 ), (X 2 , Y2 ), . . . , (X n , Yn ). Using the analytical approach, it can be shown for regression model (1, 1) that the values b0 and b1 that minimize Q for any particular set of sample data are given by the following simultaneous equations:  

Yi = nb0 + b1

X i Yi = b0





X i + b1

Xi 

(4) X i2

(5)

Equations (4) and (5) are called normal equations; b0 and b1 are called point estimators of β0 and β1 , respectively. The normal Eqs. (4) and (5) can be solved simultaneously for b0 and b1 :  b1 =

(X i − X¯ )(Yi − Y¯ )  (X i − X i )2

(6)

284

Y. J. Zou et al.

 b0 =

Yi − b1 n



Xi

(7)

where X¯ and Y¯ are the means of the X i and the Yi .

3 Predict Death Toll From CUMT, we obtain the number of deaths from various accidents in China’s coal mines from 2005 to 2018. Figure 1 shows the detailed data of deaths caused by various reasons every year. In the above table, PER is the abbreviation of person; QTY is the abbreviation of quantity; PCT is the abbreviation of percentage; M&E is the abbreviation of Mechanical & Electrical (Table 2). This paper made an analysis of the number of death toll yearly in coal mines. Linear regression in logarithmic space is chosen to achieve prediction. Firstly, converting the annual number of the death toll to logarithmically. Next, using logarithmic space mapping of the death toll to build the linear regression model. Then, using the regression model to predict the total death rate for the coming five years. Finally, converting the prediction in logarithmic space into Euclidean space. In above table, the first column is the year, xi is the year sequence, in the third column yi is the death toll yearly, in the last column ln(yi ) is the logarithmic space mapping of the death toll yearly (Fig. 1). We substitute xi and ln(yi ) in the estimated regression function Eq. (2), then using Eqs. (6) and (7) we can get the value of b1 and b0 : b1 = −0.2377 b0 = 9.0516 Next, we substitute b1 and b0 in the estimated regression function Eq. (2), then we can get the empirical regression model suit for this paper: ln(Yi ) = −0.2377X i + 9.0516

(8)

Using this model to predict the death toll of logarithmic space mapping in the next five years, at last, turn the linear function into the original nonlinear function by: Y (x; b0 , b1 ) = e G(x) = eb0 ∗ eb1 x

(9)

substitute b1 and b0 in Eq. (9), then we can get the nonlinear function (Table 3; Figs. 2 and 3):

Total

Other

Blast

M&E

Transport

Fire

Flood

PER

5938

4.4

PCT

1.7

262

PCT

PER

101

1.8

PCT

PER

105

PER

9.7

PCT

1.0

578

PCT

PER

58

10.2

PCT

PER

605

PER

34.7

PCT

36.6

2058

PCT

PER

Gas

Roof

2005

2171

PER

Year

4746

8.0

381

1.9

90

2.0

94

10.9

517

0.5

26

8.8

417

40.1

1902

27.8

1319

2006

3786

6.3

237

2.0

77

2.4

90

12.0

453

1.9

72

6.7

255

40.1

1518

28.6

1084

2007

3215

8.6

277

1.7

55

3.4

109

12.4

400

3.5

111

8.2

263

38.0

1222

24.2

778

2008

Table 1 Number and proportion of coal mine death toll in China from 2005 to 2013 2009

2631

9.5

249

2.9

75

3.7

97

12.1

319

1.2

31

6.3

166

35.7

939

28.7

755

2433

7.9

193

1.5

37

3.2

78

11.5

281

6.9

168

9.2

224

34.1

829

25.6

623

2010

1973

9.0

178

1.8

35

2.9

57

14.1

279

1.7

34

9.7

192

33.7

665

27.0

533

2011

1384

10.3

142

1.8

25

4.2

58

14.5

201

2.0

27

8.8

122

33.2

459

25.3

350

2012

1067

9.7

104

1.7

18

4.0

43

11.6

124

1.5

16

8.3

89

30.5

325

32.6

348

2013

Prediction of Coal Mine Accidental Deaths for 5 Years … 285

286

Y. J. Zou et al.

Table 2 Total number of deaths caused by accidents Year

xi

yi

ln(yi )

2005

1

5938

8.6891

2006

2

4746

8.4651

2007

3

3786

8.2391

2008

4

3215

8.0756

2009

5

2631

7.8751

2010

6

2433

7.7969

2011

7

1973

7.5873

2012

8

1384

7.2327

2013

9

1067

6.9726

2014

10

931

6.8363

2015

11

588

6.3767

2016

12

538

6.2879

2017

13

375

5.9269

2018

14

221

5.3982

Fig. 1 Log space mapping of original port output

Y (x; b0 , b1 ) = e9.0516 × e−0.2377x

(10)

4 Error Analysis In order to evaluate the regression model based on the logarithmic space established in this paper, we use the following seven error evaluation indexes. The names, formulas, and evaluation values of these indexes are shown in Table 4 [10].

Prediction of Coal Mine Accidental Deaths for 5 Years …

287

Table 3 Table captions should be placed above the tables Year

xi

ln(yi )

(yi )

2005

1

8.8139

6727

2006

2

8.5762

5304

2007

3

8.3384

4181

2008

4

8.1007

3297

2009

5

7.8629

2599

2010

6

7.6252

2049

2011

7

7.3874

1616

2012

8

7.1497

1274

2013

9

6.9119

1004

2014

10

6.6742

792

2015

11

6.4364

624

2016

12

6.1987

492

2017

13

5.9609

388

2018

14

5.7232

306

2019

15

5.4854

241

2020

16

5.2476

190

2021

17

5.0099

150

2022

18

4.7721

118

2023

19

4.5344

93

Fig. 2 Comparison of original port output and theoretically data, in log space mapping

5 Conclusion In this paper, a linear prediction based on logarithmic space (theoretically nonlinear) is proposed, which is essentially a geometric series change. From Fig. 2, we can see that with the passage of time, the number of deaths of coal miners decreases year by year in proportion. The reasons for this phenomenon are as follows. Firstly, the total number of miners has fallen by geometric series

288

Y. J. Zou et al.

Fig. 3 Comparison of original port output and theoretically data

Table 4 Statistical analysis of errors and Pearson correlation coefficient Error type

Error formula

Error value

Total difference of original and theoretically data

14 

−877.3451074

Total least square error

(yi − Y (xi ))

1

Q(X ) =

14  (yi − Y (xi ))2

1,389,088.161

1

Mean value of original data Total difference of original data and mean value

y¯ =

1 14

14 

yi

2130.428571

1

−5.45697E−12

14  (yi − y¯ ) 1

Total variance Standard total deviation Pearson correlation coefficient

2 = δ14

δ14

1 14

14 

(yi − y¯ )2

40,391,957.43

1

6355.466736 14

x)(y ¯ i − y¯ ) 1 (x i − 14 14 2 ¯ 2 1 (x i − x) 1 (yi − y¯ )



0.993475881

(the lay-offs are made by a fixed percentage), because with the industry 5.0 process greatly accelerated, the automation level is getting higher and higher. Secondly, under the mandatory requirements of the state, coal mine safety equipment is gradually deployed in proportion. Thirdly, in order to avoid unnecessary extra expenditure—death compensation and forced shutdown inspection, the coal mining industry

Prediction of Coal Mine Accidental Deaths for 5 Years …

289

increase the training time of miners’ safety awareness proportionally. Comprehensive the above three reasons, the death toll in proportion to decline. Our future work is to use Deep Learning technique to grasp the fluctuation pattern that is away from the straight line in Fig. 2. Acknowledgments Thanks to Xin Luo for his computation and draft paper-writing, thanks to Professor Yuhui Shi from SUST for his help, thanks to CCTEG Changzhou Research Institute verify data.

References 1. China University of Mining and Technology, Institute of Mine Safety Engineering Data Set. http://www.mkaq.org/html/2016/05/25/366560.shtml. Accessed 10 Jul 2019 2. Lian, H.Q., Wei, R.: Research on the prediction of coal mine million tons mortality in Shanxi based on the GM(1, 1) model. J. North China Inst. Sci. Technol. 11(11), 43–56 (2014) 3. Zhu, J.F., Duan, J.M., Gao, L.: Comparative study of prediction methods of death rate per million-ton in coal mine. J. North China Inst. Sci. Technol. 15(3), 10–20 (2018) 4. China Labour Bulletin: Bone and blood the price of coal in China. CLB Research Report No. 6, March (2008) 5. Guo, W.C., Wu, C.: Comparative study on coal mine safety between China and the US from a safety sociology perspective. Procedia Eng. 26, 2003–2011 (2011) 6. Tu, J.J.: Industrial organization of the chinese coal industry. Stanford Program on Energy and Sustainable Development Working Paper, 103 (2011) 7. Chu, C., Jain, R., Muradian, N., Zhang, G.: Statistical analysis of coal mining safety in China with reference to the impact of technology. J. South. Afr. Inst. Min. Metall. 116(1), 73–78 (2016) 8. Tong, R.P., Zhang, Y.W., Cui, Y.W., et al.: Characteristic analysis of unsafe behavior by Coal Miners: multi-dimensional description of the Pan-Scene data. Int. J. Environ. Res. Public Health 15(8) (2018) 9. Michael, H.K., Christopher, J.N., John, N.: Applied Linear Regression Models, 4th edn. McGraw-Hill, New York (2004) 10. Cheng, L., Yan, J.L., Hong, L.Z.: An improved coal and gas outburst prediction algorithm based on BP neural network. Int. J. Control Autom. 8(6), 169–176 (2015)

Patent Prediction Based on Long Short-Term Memory Recurrent Neural Network Yao Zhang and Qun Wang

Abstract Patent prediction is not only an efficient way to grasp development tendency of relevant science and technology fields but also has been widely used in the areas of patent recommendation, evaluation and transaction. However, with the rapid increase of patents, it is becoming more difficult to mine potential information from huge amount of patent records in database. Based on sample data analysis with long short-term memory recurrent neural network model, we propose a patent prediction scheme. The implementation process of the proposed scheme is discussed, and the examples to predict railway transportation patents in international patent database are given. The calculation results of root mean square errors show that our scheme can obtain higher prediction accuracies than traditional auto-regressive-moving-average model. Keywords Patent prediction · Long short-term memory model · Data mining · Recurrent neural network · Prediction accuracy

1 Introduction Patent prediction is an important part of patent data analysis, which has been widely used in the areas of patent recommendation, patent value evaluation and transaction, meanwhile it can also help us to adequately understand development trajectories and tendencies of relevant science and technology fields. However, because of randomness and unsteadiness of huge patent data in database, it is difficult to obtain high

Y. Zhang (B) School of Mechanical, Electrical and Information Engineering, Shandong University, No. 180 Wenhua West Road, Weihai, China e-mail: [email protected] Q. Wang Audiovisual Education Center, Shandong University, No. 180 Wenhua West Road, Weihai, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_28

291

292

Y. Zhang and Q. Wang

patent prediction accuracy by traditional prediction models such as logistic regression, auto-regressive-moving-average (ARMA) or shallow neural network. Long short-term memory (LSTM) model is an efficient approach to solve this problem [1, 2].

2 The Structure of LSTM Model Recurrent neural network (RNN) belongs to deep neural network (DNN) with cyclic structure, LSTM model is a special RNN with more network layers which is designed for processing time series with long-term dependency. The LSTM model is similar to RNN with a chain of repeating modules, but instead of a single neural network layer of RNN, LSTM has four neural network layers which make complex interactions with each other. The structure of LSTM model is shown in Fig. 1 [3]. In Fig. 1, x t , ht and C t, respectively, denote input, output and cell state of the LSTM unit at current time t, σ is sigmoid function σ (x) = 1+e1 −x , tanh is tangent x −x . The operation process of LSTM model can hyperbolic function tanh(x) = eex −e +e−x be described by Formula (1), which contains four steps: f t = σ (W f · [h t−1 , xt ]) + b f i t = σ (Wi · [h t−1 , xt ]) + bi −

Ct = tanh(WC · [h t−1 , xt ]) + bC −

Ct = f t ∗ Ct−1 + i t ∗ Ct Ot = σ (W O [h t−1 , xt ]) + b O h t = Ot ∗ tanh(Ct )

Fig. 1 Structure of LSTM model

(1)

Patent Prediction Based on Long Short-Term Memory …

293

Step 1: decide what information should be thrown away from current cell state. This decision is made by a sigmoid function called “forget gate layer”, its outputs f t is between 0 and 1, the maximum 1 represents “completely keep C t −1 ”, the minimum 0 represents “completely get rid of C t −1 ”. Step 2: decide what new information should be store in the cell state. First, a sigmoid function called “input gate layer” decides what information will be updated. Next, a tangent hyperbolic function creates a new candidate parameter. Step 3: update the old cell state C t −1 into the new cell state C t . Step 4: produce output ht . First, a sigmoid layer is run to decide what parts of the cell state will be output. Then, the cell state is put through tanh gate layer and is multiplied by the output of the sigmoid gate Ot . In Formula (1), W f , W i , W C and W O are weight coefficients, bf , bi , bC and bO are offset items. The optimal values of weight coefficients and offset items should be ascertained through model training by sample data in training set.

3 LSTM-Based Patent Prediction Scheme The process of LSTM-based patent prediction scheme has following aspects [4, 5]: (1) Numerical statistics to different type patents, and then obtained time series of sample patent data. (2) Preprocess of sample patent time series. • divided sample data into training set and test set. Training set is used to learn the mapping function from input to output through training neural network, test set is used to estimate prediction accuracies of LSTM model. LSTM is based on supervised learning, so the data of previous time-steps is regarded as input, and the data of next time-steps is as output. • turn sample data into stationary time series. Patent data is non-stationary time series with tendency items, and it can be turned into stationary series by d order difference operation as Formula (2). yt = ∇ d xt = xt − xt−d

(2)

• because the activation function of LSTM model is tanh, sample data should be compressed into the range between [−1, +1]. Data compression ratio can be ascertained according to raining set, and then it is applied to compress test set. (3) Fit LSTM-based prediction model by training set [6]. Step 1: define the number of nerve cells, the number of training times and loss function E; Step 2: forward calculate outputs of nerve cell according to formula (1);

294

Y. Zhang and Q. Wang

Step 3: backward calculate error terms of nerve cell according to formula (3); δx,t =

− ∂E (x ∈ { f t , i t , Ct , Ot }) ∂x

(3)

Step 4: calculate gradients of weight coefficient and offset item by formula (4);  ∂E = δx, j h j−1 (y ∈ {W f , Wi , WC , W O , b f , bi , bC , b O }) ∂y j=1 t

(4)

Step 5: if (less than training times) go to step 2; Step 6: ascertain optimal values of weight coefficients and offset items according to the principle of minimum gradients. (4) Verify LSTM-based prediction model by test set • obtain prediction results. • Inverse process of prediction data. • Calculate root mean square errors (RMSE) by test set, estimate performance of prediction model.

4 Examples of LSTM-Based Patent Prediction We collect sample patent data in the area of railway transportation from international patent database during January 2013 to December 2018. In patent database, railway transportation patents are divided into nine subtypes, as shown in Table 1 [7].

4.1 Prediction of B61D Patents In LSTM model, we set the number of nerve cells as 4, the parameter of batch_size is 1, the number of training times is 10 and loss function E is mean square error (MSE). Figure 2 shows sequence chart of the number of B61D patents, which has obvious non-stationary features with upward tendency. By one-order difference operation, sample data is turned into zero-mean stationary sequence, as shown in Fig. 3. Figure 4 compares prediction data and original data, and it can be observed that high prediction accuracy is obtained, the value of RMSE is 65.038.

Patent Prediction Based on Long Short-Term Memory …

295

Table 1 Description of nine sub-type patents in railway transportation Subtype

Description

B61B

Railway systems and equipment

B61C

Locomotives, motor, rail cars

B61D

Body details or kinds of railway vehicles

20,317

B61F

Rail vehicles suspensions

10,217

B61G

Coupling draught and buffing appliances

3374

B61H

Brakes or other retarding apparatus peculiar to rail vehicles, arrangements or dispositions of brakes or retarding apparatus in rail vehicles

4650

B61J

Shifting or shunting of rail vehicles

B61K

Other auxiliary equipment for railways

B61L

Guiding railway traffic, ensuring the safety of railway traffic

Fig. 2 Number of B61D patents during 2013–2018 (time unit: month)

Fig. 3 Differential data of the number of B61D patents during 2013–2018

Amount 9734 8600

787 6498 14,473

296

Y. Zhang and Q. Wang

Fig. 4 Comparing prediction data with original data of B61D patents

4.2 Prediction Results of Other Sub-type Patents The prediction results of other sub-type patents in railway transportation are shown in Table 2, which can further verify the effectiveness of our patent prediction scheme.

5 Summary By combining sample data mining with LSTM model, we propose a patent prediction scheme. The implementation process of proposed scheme is discussed, and the examples to prediction railway transportation patents in international patent database are given. The calculation results show that our scheme can obtain higher prediction accuracy than traditional ARMA model [8]. As further work, we will extend our research on patent data mining by deep learning algorithms, including patent recommend, patent value evaluation and patent document analysis.

Patent Prediction Based on Long Short-Term Memory …

297

Table 2 Prediction results of other sub-type patents in railway transportation Type

Training set

Test set

Prediction data

RMSE

B61B

86, 69, 76, 107, 107, 96, 84, 97, 97, 89, 73, 104, 78, 93, 86, 85, 84, 105, 126, 94, 92, 117, 72, 110, 97, 84, 117, 120, 85, 107 100, 109, 91, 95, 112, 141

88, 78, 122, 118, 132, 112, 126, 124, 123, 122, 145, 158, 124, 174, 153, 110, 186, 135, 177, 173, 145, 117, 187, 172, 214, 169, 255, 205, 283, 225, 241, 199, 211, 215, 177, 200

91.1, 80.1, 121.4, 118.7, 131.8, 113.2, 126.0, 124.5, 123.5, 122.7, 144.5, 157.5, 125.5, 172.3, 153.4, 112.2, 183.6, 136.6, 175.2, 172.1, 145.2, 118.1, 184.6, 171.6, 211.5, 168.9, 251.4, 203.6, 279.0, 222.5, 237.5, 196.8, 208.3, 212.5, 176.1, –

38.273

B61C

83, 73, 125, 97, 104, 114, 96, 79, 86, 90, 81, 98, 108, 86, 123, 82, 93, 128, 101, 75, 114, 100, 89, 137, 94, 93, 117, 149, 90, 119, 100, 84, 116, 85, 101, 139

132, 100, 126, 75, 94, 100, 104, 139, 103, 77, 107, 110, 103, 161, 160, 88, 183, 138, 202, 139, 146, 126, 148, 202, 157, 132, 227, 135, 184, 151, 163, 96, 155, 160, 151, 183

128.6, 104.4, 125.2, 86.1, 101.7, 105.3, 107.2, 133.9, 106.6, 86.4, 110.7, 111.8, 105.5, 152.7, 150.9, 97.6, 182.9, 148.0, 201.0, 152.3, 157.2, 140.1, 156.8, 199.6, 164.9, 144.4, 227.9, 155.2, 196.4, 168.2, 175.9, 119.3, 170.3, 171.7, 161.9, –

42.561

B61F

120, 96, 149, 116, 107, 125, 96, 96, 94, 92, 83, 97, 113, 83, 121, 119, 135, 124, 122, 105, 112, 128, 105, 131, 100, 89, 107, 191, 119, 127, 124, 102, 140, 121, 112, 161

112, 96, 142, 123, 122, 167, 98, 155, 133, 109, 104, 134, 134, 156, 195, 115, 227, 204, 253, 196, 150, 156, 167, 188, 213, 181, 238, 173, 228, 245, 199, 196, 172, 181, 170, 229

116.3, 101.7, 141.6, 125.7, 124.7, 163.8, 103.5, 153.7, 135.5, 114.1, 109.1, 134.9, 135.3, 154.6, 189.1, 119.8, 218.7, 203.2, 246.0, 198.7, 157.0, 162.0, 170.9, 189.0, 211.1, 184.1, 233.6, 177.8, 226.1, 242.2, 202.8, 200.0, 178.1, 185.4, 175.0, –

40.265

B61G

59, 38, 36, 28, 32, 46, 22, 26, 36, 37, 38, 35, 48, 37, 29, 49, 45, 40, 40, 35, 52, 31, 44, 46, 41, 32, 23, 56, 37, 53, 46, 25, 38, 46, 49, 47

46, 41, 52, 41, 41, 41, 15, 57, 43, 33, 42, 53, 32, 72, 77, 35, 71, 68, 43, 58, 54, 57, 61, 91, 52, 58, 58, 67, 49, 80, 42, 59, 65, 71, 65, 68

46.8, 41.5, 53.2, 41.5, 41.6, 41.7, 14.8, 58.5, 43.4, 33.0, 42.5, 54.2, 32.1, 73.9, 78.6, 34.6, 71.6, 68.4, 42.4, 58.1, 54.2, 57.5, 61.8, 93.5, 52.0, 58.0, 58.2, 67.9, 49.0, 81.6, 41.7, 59.1, 65.7, 72.0, 65.6, –

21.096

(continued)

298

Y. Zhang and Q. Wang

Table 2 (continued) Type

Training set

Test set

Prediction data

RMSE

B61H

48, 39, 66, 51, 59, 57, 44, 43, 43, 48, 33, 48, 61, 52, 67, 53, 48, 64, 66, 54, 49, 50, 57, 65, 60, 30, 91, 76, 63, 61, 55, 61, 74, 57, 55, 114

56, 66, 58, 61, 61, 75, 48, 86, 57, 63, 54, 72, 62, 73, 74, 65, 85, 68, 76, 81, 97, 38, 73, 62, 83, 67, 74, 68, 97, 98, 67, 84, 78, 81, 80, 106

60.9, 68.2, 61.2, 63.7, 63.8, 76.6, 52.1, 86.6, 60.7, 65.4, 57.2, 73.7, 64.8, 74.8, 76.0, 67.6, 86.1, 70.9, 77.9, 82.7, 97.8, 43.8, 74.0, 65.0, 84.2, 70.0, 76.1, 71.7, 97.6, 99.2, 70.8, 85.6, 80.6, 83.2, 82.4, –

18.871

B61J

9, 8, 15, 14, 17, 22, 16, 9, 15, 4, 8, 10, 9, 5, 13, 24, 13, 4, 2, 9, 12, 3, 6, 11, 16, 3, 12, 18, 8, 5, 14, 5, 9, 8, 9, 8

15, 3, 15, 4, 12, 16, 16, 22, 13, 14, 11, 9, 15, 6, 11, 12, 20, 13, 8, 9, 1, 16, 13, 10, 11, 11, 17, 8, 11, 10, 12, 15, 11, 10, 11, 9

14.3, 2.5, 14.3, 3.5, 11.4, 15.2, 15.1, 20.9, 12.1, 13.3, 10.4, 8.6, 14.5, 5.6, 10.6, 11.5, 19.2, 12.3, 7.5, 8.6, 0.8, 15.5, 12.4, 9.5, 10.5, 10.5, 16.3, 7.4, 10.5, 9.5, 11.5, 14.4, 10.4, 9.5, 10.5, –

6.196

B61K

83, 51, 84, 76, 59, 75, 64, 58, 55, 77, 66, 65, 60, 56, 57, 85, 54, 78, 63, 49, 60, 61, 49, 91, 93, 48, 77, 130, 101, 69, 73, 56, 82, 56, 88, 71

71, 64, 95, 89, 85, 104, 79, 111, 74, 78, 106, 90, 88, 102, 97, 79, 131, 120, 104, 114, 125, 106, 107, 120, 124, 133, 116, 129, 133, 151, 120, 129, 136, 140, 171, 163

73.5, 67.9, 90.3, 86.7, 84.0, 97.9, 80.7, 104.2, 78.2, 80.9, 101.0, 90.3, 88.7, 98.8, 95.6, 82.6, 121.6, 115.6, 104.5, 111.8, 120.0, 107.0, 107.6, 117.0, 120.3, 127.3, 115.8, 125.3, 128.7, 142.4, 121.3, 127.8, 133.0, 136.3, 159.7, –

17.469

B61L

200, 120, 189, 155, 169, 160, 138, 126, 151, 171, 108, 130, 162, 126, 173, 218, 169, 172, 141, 124, 118, 176, 157, 192, 150, 164, 156, 200, 194, 162, 186, 155, 180, 192, 206, 216

159, 171, 252, 210, 195, 214, 183, 227, 201, 159, 203, 233, 201, 230, 249, 209, 289, 282, 180, 256, 217, 196, 180, 259, 229, 223, 293, 274, 347, 355, 290, 241, 278, 290, 322, 276

159.0, 170.4, 246.2, 207.7, 193.3, 211.8, 182.6, 224.1, 200.1, 159.5, 201.0, 230.3, 200.0, 227.5, 246.3, 208.1, 282.6, 278.4, 178.7, 248.7, 214.3, 194.5, 179.8, 253.5, 226.8, 221.2, 287.0, 270.9, 339.4, 349.6, 287.1, 239.6, 274.9, 287.7, 318.6, –

45.557

References 1. Ma, R.M., Wei, W.Y.: Core patents prediction from the perspective of technosphere subdivision. J. China Soc. Sci. Tech. Inf. 36(12), 1279–1289 (2017) 2. Lin, Y.H., Li, K.: Research on the patent forecast in Guangdong and Jiangsu province-based on the wavelet neural network. J. Strategy Decis.-Mak. 04, 75–86 (2014)

Patent Prediction Based on Long Short-Term Memory …

299

3. Understanding Long-Short Term Memory Networks. http://colah.github.io/posts/2015-08Understanding-LSTMs/ 4. Time Series Forecasting with Python. https://machinelearningmastery.com/persistence-timeseries-forecasting-with-python/ 5. Time Series Forecasting as Supervised Learning. https://machinelearningmastery.com/timeseries-forecasting-supervised-learning/ 6. LSTM Forward and Backward Pass. http://arunmallya.github.io/writeups/nn/lstm/index.html#/ 7. International Patent Database Produced by the European Patent Office. https://worldwide. espacenet.com/classification 8. Zhang, Y., Zhang, G.: Data analysis of railway industry patents. In: Proceedings of the 2nd International Conference on Big Data Research, pp. 27–32. ACM, Weihai (2018)

Chinese Aspect-Level Sentiment Analysis CNN-LSTM Based on Mixed Vector Kangxin Cheng, Zhili Wang, and Jiaqi Liu

Abstract Aspect-level sentiment analysis can provide more detailed information than general sentiment analysis, because it aims to predict the sentiment polarities of the given aspects or entities in text. The state-of-the-art neural models use RNN with attention seems a good method for the characteristics of this task in English, but because of the complexity of Chinese texts and the difference between Chinese and English, English learning outcomes cannot be directly applied to Chinese. After reexamining the drawbacks of attention mechanism and obstacles that Chinese aspectlevel sentiment analysis, we build upon line of research and propose three approaches overcome these issues. First, we propose a mixed vector to enhance the information embedded in Chinese word embedding. Second, we introduce an attention weight calculate method for target representation that better captures the semantic meaning of the opinion target. Third, we use CNN to extract local information in the text. The experimental results show that our model consistently outperforms the state-of-theart methods on Chinese reviews. Keywords Aspect-level sentiment analysis · Chinese reviews · Mixed vector · LSTM-CNN

1 Introduction With the rapid development of the Internet, various social network media platforms have become an important way for people to exchange and access information. More and more people like to express their feelings and opinions on the Internet. The analysis of this emotional information can be applied to the analysis of social opinion orientation and commodity optimization. Document-level emotional analysis is no longer sufficient. In order to extract more emotional information from comments, aspect-level sentiment analysis is becoming more and more important in the field of text mining and NLP. K. Cheng (B) · Z. Wang · J. Liu Beijing University of Posts and Telecommunications, No. 10, Xi Tucheng Road, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_29

301

302

K. Cheng et al.

The goal of aspect-level sentiment analysis is to identify the sentiment polarity (i.e. negative, neutral or positive) of a specific opinion target expressed in a comment/review by a reviewer [1]. For instance, the sentence “The food in this restaurant is delicious, but the service is very bad”, there are two opinion targets, “food” and “service”, a positive sentiment on the “food”, and a negative sentiment on the “service”. Sentence-oriented sentiment analysis methods [2, 3] are not capable to capture such aspect-level sentiments on opinion targets. In English field, there is a lot of adding an attention to the LSTM network significantly improves the accuracy of aspect-level sentiment analysis. As the most used language, Chinese occupies an important position in the world language system. However, there is only a few sentiment analyses models for Chinese. And given the complexity of Chinese texts and the differences between Chinese and English, English learning outcomes cannot be directly applied to Chinese reviews. The differences [4] between Chinese and English texts are as follows: (1) English words are naturally separated by spaces; therefore, word segmentation errors may not occur during the experiment. In contrast, Chinese text requires word segmentation. (2) Chinese target words are rarely represented by a single Chinese character, and a single English word can be used to represent product features. (3) Chinese characters are polysemy. The emotional polarity of the same word is different, even in various situations. It is the reason why Chinese sentiment analysis developing slowly. In this paper, we proposed a hybrid model to the field of Chinese product reviews. We used a Bi-LSTM layer with syntax-based Attention, which achieves good results in the field of English, together with a CNN. For the complexity of Chinese, we propose a method of combining character vectors and word vectors to sentiment analysis inspired by R-Net [5]. Through this model, the problem of improving the performance of aspect-level sentiment analysis on Chinese customer reviews can be solved. To address the target presentation problem, we propose a novel approach for improving the effectiveness of attention models upon this line of research. And we add CNN to the model to enhance the attention to local features. We evaluate our approach on the AI Challenger 2018 sentiment analysis task. This task is a fine-grained sentiment analysis of online reviews which with 20 aspects and each aspect with four polarities (positive, negative, neutral, not mentioned). The experiment results show that our model performs well for aspect-level sentiment analysis tasks.

2 Related Work Recurrent neural networks (RNNs) with attention mechanism are the most commonly used technique for sentiment analysis. For example, Wang et al. [6], Tang et al. [7], Yang et al. [8], Liu and Zhang [9], Ma et al. [10] and Chen et al. [11] use attention to calculate the semantic relatedness between each context word and the target, and then the attention weights are used to aggregate context features for prediction. Attention weights in these researches are calculated on the basis of

Chinese Aspect-Level Sentiment Analysis CNN-LSTM …

303

target word representation, so the representation of a target word is very critical. However, these tasks only map targets by averaging their constituent word vectors. This may apply to goals that contain only one word but may not capture the semantics of more complex expressions, as also mentioned by Tang et al. [12]. For example, “Guangzhou-style roast duck”, through averaging “Guangzhou-style” and “roast duck” we cannot get the correct target word representation, resulting in errors in the calculation of attention, impact final predictions. Another observation is that the emotions of a target are usually determined by key phrases such as “is very convenient”. For this reason, convolutional neural networks words well to extract the informative local features as sentence representations have been verified in [13], maybe an appropriate model for this classification problem. However, CNN may fail if a sentence expresses different sentiments towards multiple targets, such as “great food but the service was dreadful!”. One reason is that CNN cannot fully explore the target information as done by RNN-based methods [12]. Moreover, it can hardly distinguish opinion words with multiple targets. Exactly, multiple active local features holding different sentiments (“great food” and “service was dreadful”) may be captured for a single target, so it will hinder the prediction. Among these works, RNN with attention is an effective method to sentiment analysis, but these work use the average input method when calculating the attention weight. This method has problems for the expression of certain phrases. We use neural networks to calculate dynamically. And CNN is also suitable for this classification, so we combined CNN to extract local features in our model.

3 Model Description The architecture of our model is shown in Fig. 1, which consists of five modules: mixed embedding module, target word representation module, LSTM-CNN memory module and output module. Suppose the input sentence s = (w1 , w2 , . . . , wn ) consisting of n words, and an opinion target occurring in the sentence a = (a1 , a2 , . . . , am ) consisting of a subsequence of m continuous words from s, aspectlevel sentiment classification aims to determine the sentiment polarity of sentence s towards the opinion target a.

3.1 Mixed Embedding When using deep learning to solve Chinese natural language problems, most models tend to use words as a semantic unit and train word vectors through the word2vec method or the GloVe method. Most of the methods of the predecessors focus on how to fuse the internal and external information of the word to construct the information representation of the word itself. Little attention is paid to how the word vector and the character vector are combined. The character in Chinese may hide the meaning.

304

K. Cheng et al.

Fig. 1 Overall architecture of the integrated model

This chapter provides a method of combination. The combination of character vector and word vector solves the problem of Chinese sentiment analysis. In the same way, as in the past, this paper combines the representation of words obtained by words with the representation of original words with words as the smallest semantic unit. First of all, this paper uses RNN to construct the characteristics of word vectors. Let the word vector of a word ωi be represented as vˆ iw , and this word is composed of a number of words cj , and the word vector of each word is represented as vˆ Cj . The word vector of the word obtained by the word vector information indicates that v¯ iw is calculated as follows: v¯ iw = RNN(ˆvCj=0 , vˆ Cj=1 , . . . , vˆ Cj=n )

(1)

Secondly, we combine the above-mentioned character vector calculated by character information v¯ iw with the original word vector v¯ iw in parallel, and expect to obtain the best information representation vi˙w of a semantic unit. Calculated as follows: viw = Concat(ˆviw , v¯ iw )

(2)

3.2 Target Word Representation Most previous work represents a target by averaging its component word or hidden vectors. Simple averaging may not capture the real semantics of target well. Inspired by Lai et al. [14], we represent the target as a weighted summation of aspect

Chinese Aspect-Level Sentiment Analysis CNN-LSTM …

305

embeddings. Wang et al. [15] use an auto-encoder to achieve this. But the input of auto-encoder is also calculated by average. We use two linear layers and softmax to weight the target words and sentences, dynamically obtain the target words through training, and then add them to the self-encoder for training. The process is formalized as follows: ts = T T · q t

(3)

qt = softmax(Wt · cs + bt )

(4)

cs = Average(Vs , Vw )

(5)

Vs = FNN(vs )

(6)

Vw = softmax(vw )

(7)

where average returns the mean of the input vectors, V s and V w are calculate by sentence embedding and opinion target embedding, through weighted summation. cs captures both target information and context information. qt is the weight vector over K aspect embeddings, where each weight represents the probability that the target belongs to the related aspect. W t and bt are weight matrix and bias vector, respectively.

3.3 LSTM-CNN Feature Extractor As observed in [14], combining contextual information with word embeddings is an effective way to represent a word. This model also employs a LSTM to accumulate the context information for each word of the input vector. For simplicity, we denote the operation of an LSTM unit on vi˙w as LSTM(vi˙w ). Thus, the contextualized word representation h i(0) is obtained as follows:

−−−−−−→ h i(0) = LSTM(viw ), i ∈ [1, n]

(8)

The sentiment of a target is usually determined by key phrases such as “is my favourite”. By this token, CNN—whose capability for extracting the information n-gram features—should be a suitable model for this classification problem. We use a text convolutional layer. The text convolution uses multiple convolution kernel vectors of different sizes to interact in sequence to detect features at different locations. A text convolution layer is used to automatically extract local features in a sentence. Let X i ∈ R d be the d-dimensional word vector ith word in the sentence. X ∈ R L×d as a sentence of length L. Let the convolution kernel size k, vector m ∈ R k×d is

306

K. Cheng et al.

a convolution kernel. For each position j in the sentence, we create a window W j , consisting of consecutive k word vectors. Recorded as: w j = [v j , v j+1 , . . . , v j+k−1 ]

(9)

The feature cj corresponding to each window vector is: c j = Relu(w j · m + b)

(10)

Then, we combine the context information obtained by LSTM training with the local information extracted by CNN. ⎞ m n   1 1 gs = Average⎝ hi , cj⎠ m i=1 n j=1 ⎛

(11)

The sentence representation Z s used for sentiment classification is then computed as the weighted summation of hidden vectors. zs =

n 

pi gi

(12)

i=1

A positive weight pi is computed for each gi . The value pi is computed by an attention model, the attention process is usually described with the following equations: exp(di ) pi = n j=1 exp(d j )

(13)

di = tanh(giT · Wa · ts )

(14)

where W a is a trainable matrix, gi shown as Eq. 11, t s shown as Eq. 3.

3.4 Output and Model Training After attentions, the final episode serves as the feature and is fed into a softmax layer to predict the target sentiment; our final model is illustrated in Fig. 1. The component is associated with the categorical cross-entropy loss of sentiment classification plus an L 2 regularization term: L=

  (x,y)∈D c∈C

y c log f c (x; θ ) + λ||θ ||2

(15)

Chinese Aspect-Level Sentiment Analysis CNN-LSTM …

307

where C is the sentiment category set, D is the collection of training data, y is a one-hot vector where the element for the true sentiment is 1, f (x; θ ) is the predicted sentiment distribution of the model, λ is the weight of L 2 regularization term. We also adopt dropout and early stopping to ease overfitting.

4 Experiments 4.1 Datasets We evaluate our approach on the AI Challenger 2018 sentiment analysis task. This task is an aspect-level sentiment analysis of online reviews which with 20 aspects and each aspect with four polarities (positive, negative, neutral, not mentioned). An example is given in Table 1. At first, we do some preprocessing for this dataset. We performed a simplified and traditional conversion and then used Python’s Chinese word segmentation tool jieba to segment all sentences. And we used the stop word list provided by Harbin Institute of Technology to remove the stop words in the sentence to reduce noise. After preprocessing we use 100-dimension word vectors for our experiments on the datasets. We randomly select 20% of the original training data as the development set and only use the remaining 80% for training. Values for the hyperparameters are obtained empirically on the development set of one task and are fixed for all other experiments. The dimension of the LSTM hidden vectors is set to 100, the objective weights λu and λr are set to 1 and 0.1, the attention window size is set to 5. We use RMSProp for network training, with decay rate set to 0.9 and base learning rate set Table 1 Datasets example

Aspect

Polarity

Aspect

Polarity

Positive

Negative

Not mentioned Not mentioned

Not mentioned Negative

Not mentioned

Neutral

Negative Not mentioned

Positive Positive

Not mentioned

Not mentioned

Not mentio ned

Not mentioned

Not mentioned Not mentioned

Not mentioned Not mentioned

A restaurant review corresponds to 20 aspects, each aspect corresponds to one of 4 emotions

308

K. Cheng et al.

to 0.001. The minibatch size is set to 32. As a regularizer, we apply max pooling to the CNN layer and dropout with probability 0.5 to the LSTM layer and the output layer. We train the network to obtain a fixed number of epochs, select the best model according to the performance on the development set and evaluate it on the test set. In this paper, we use macro-F1 and accuracy as evaluation indicators, and the average of 20 aspect prediction results is used as the final result.

4.2 Model Comparisons We compare our model with the following baselines: (1) SVM: Officially given baseline. (2) FastText: Based on officially baseline. (3) GCAE [16]: It uses GRU neural network with a CNN attention mechanism. And this algorithm reached third and first places in valence ordinal classification subtasks in English and Spanish, respectively. (4) SynAtt [17]: It uses a syntax-based attention mechanism. Our research is based on this model. We get the results of SVM, FastText from the official baseline. We produce the result of GCAE and SynAtt with the source codes released by their authors. The comparison results are shown in Table 2. Both accuracy and macro-F1 are used for evaluation as the label distributions are unbalanced. We also show the effect of each proposed approach: GCAE + Mixed vector and SynAtt + Mixed vector denote the model is used mixed vector; SynAtt + Mixedvector + TarRep denotes the model where only the average target representation is replaced by our FNN and auto-encoder; SynAtt + Mixed vector + TarRep + CNN denotes the full model with both approaches integrated as shown in Fig. 1. We make the following observations: (1) deep learning is better than traditional machine learning algorithms on aspect-level sentiment analysis. (2) By adding our Table 2 Experimental results (%)

Model

Acc

Macro-F1

SVM

58.97

57.83

FastText

61.34

60.36

GCAE

63.78

63.52

SynAtt

64.27

64.15

GCAE + mixed vector

68.53

68.11

SynAtt + mixed vector

68.73

68.66

SynAtt + mixed vector + TarRep

70.39

70.27

SynAtt + mixed vector + TarRep + CNN

71.12

71.03

Chinese Aspect-Level Sentiment Analysis CNN-LSTM …

309

mixed vector to SynAtt and GCAE, the final prediction results are significantly improved, which shows that Chinese in the aspect-level sentiment analysis, the method of mixing character vector and word vector we used is very effective, and it proves that the word information in the sentence can help capture the correct answer. (3) Compared with all other neural baselines, our full model achieves statistically significant improvements on both accuracies and macro-F1 scores.

5 Conclusion In this paper, we proposed a new model to enhance the performance of aspect-level sentiment analysis on Chinese reviews. The model first runs through the input, generating a mixed embedding. Then, LSTM and CNN extract the sentence features and use an auto-encoder to get the target word representation to calculate the attention weight. Finally, the result is obtained through linear layer and softmax. In our experiments, the improved model of this paper has achieved a good improvement in Chinese sentiment analysis and found that the combination of character embedding and word embedding has effect on multiple aspect-level sentiment analysis in Chinese. As future work, we can consider ways to improve the combination of character and word vectors. Possible methods include removing of words which direct transliteration, such as chocolate, and a character is used as a semantic unit, the combination of each character vector with the word vector in a sentence.

References 1. Chen, P., Sun, Z.Z., Bing, L.D., Yang, W.: Recurrent attention network on memory for aspect sentiment analysis. In: Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 463–472 (2017) 2. Socher, R., Pennington, J., Huang, E.H., Ng, A.Y., Manning, C.D.: Semi-supervised recursive autoencoders for predicting sentiment distributions. In: Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, EMNLP 2011, pp. 151–161 (2011) 3. Appel, O., Chiclana, F., Carter, J., Fujita, H.: A hybrid approach to the sentiment analysis problem at the sentence level. Knowl.-Based Syst. 108, 110–124 (2016) 4. Chen, H.L., Li, S., Wu, P.H., Yi, N.A., Li, S.Y., Huang, X.R.: Finegrained sentiment analysis of Chinese reviews using LSTM network. J. Eng. Sci. Technol. Rev. 11(1), 174–179 (2018) 5. Natural Language Computing Group, Microsoft Research Asia: R-NET: Machine Reading Comprehension With Self-matching Networks (2017) 6. Wang, Y.Q., Huang, M.L., Zhu, X.Y., Zhao, L.: Attention-based LSTM for aspect-level sentiment classification. In: Proceedings of EMNLP, pp. 606–615 (2016) 7. Tang, D.Y., Qin, B., Liu, T.: Aspect level sentiment classification with deep memory network. In: Proceedings of EMNLP, pp. 214–224 (2016) 8. Yang, M., Tu, W.T., Wang, J.X., Xu, F., Chen, X.J.: Attention based lstm for target dependent sentiment classification. In: Proceedings of AAAI, pp. 5013–5014 (2017) 9. Liu, J.M., Zhang, Y.: Attention modeling for targeted sentiment. In: Conference of the European Chapter of the Association for Computational Linguistics (2017)

310

K. Cheng et al.

10. Ma, D.H., Li, S.J., Zhang, X.D, Wang, H.F.: Interactive attention networks for aspect-level sentiment classification. In:Proceedings of IJCAI, pp. 4068–4074(2017) 11. Chen, P., Sun, Z.Q., Bing, L.D., Yang,W.: Recurrent attention network on memory for aspect sentiment analysis. In:Proceedings of EMNLP, pp. 463–472(2017) 12. Tang, D.Y., Qin, B., Feng, X.C., Liu, T.: Effective lstms for target dependent sentiment classification. In: Proceedings of COLING, pp. 3298–3307(2016) 13. He, R.D., Lee, W.S., Tou Ng, H., Dahlmeier, D.: An unsupervised neural attention model for aspect extraction. In: Annual Meeting of the Association for Computational Linguistics (ACL 2017) (2017) 14. Lai, S.W., Xu, L.H., Liu, K., Zhao, J.: Recurrent convolutional neural networks for text classification. Proc. AAAI 333, 2267–2273 (2015) 15. Wang, Y.Q., Huang, M.L., Zhao, L., Zhu, X.Y.: Attention-based LSTM for aspect-level sentiment classification. In: Conference on Empirical Methods in Natural Language Processing (EMNLP 2016) (2016) 16. Zhang, M.S., Zhang, Y., Duy-Tin, V.: Gated neural networks for targeted sentiment analysis. In: AAAI Conference on Artificial Intelligence (AAAI 2016) (2016) 17. He, R., Lee, W.S, Ng, H.T.: Effective attention modeling for aspect-level sentiment classification. In: Proceedings of the 27th International Conference on Computational Linguistics, pp. 1121–1131 (2018)

Prediction of RNA Structures with Pseudoknots Using Convolutional Neural Network Sixin Tang, Shiting Li, and Jing Chen

Abstract To get better predicted results, we show using convolution neural network inference RNA structure with pseudoknots. First, we expound the deep learning and convolution model and algorithm of the neural network theory, then discuss the key problems for RNA secondary structure prediction using convolution neural network modeling, finally, we design a convolutional neural network to predict RNA structure prediction model and experimental verification of the validity of the model, and the experimental results show that the convolution neural network in the prediction of RNA sequence structure has long-range correlation, can improve the prediction accuracy, especially when RNA sequences with pseudoknots structure. Keywords Convolution neural network · RNA · Structure prediction

1 Introduction Deep learning technology has become one of the most widely applicable and popular technologies in the field of machine learning. Convolutional neural network (CNN), as the core of deep learning technology, is widely used in computational molecular biology. Convolutional neural network can be used for the prediction of secondary structure of proteins, the detection of DNA gene sites, the prediction of binding sites of RNA docking with proteins, and the labeling of biological sequence word vectors based on lexicalized grammar [1]. This is because the deep learning model based on CNN technologies such as gated recurrent unit (GRU) [2] or long short-term (LSTM) [3] can handle the problem of distant base dependency in sequences well, which has gradually become an important method and means to predict the structure of biological sequences.

S. Tang (B) · S. Li · J. Chen College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_30

311

312

S. Tang et al.

Convolutional neural network is often used for sequence modeling in deep learning, so it has significant advantages in image processing, speech recognition, customer life cycle analysis and other fields [4]. On the basis of artificial neural network, CNN proposes an artificial neural network inspired by simulating the circular connections of a large number of neurons in biological brain tissue. CNN uses recursive feedback function to save signals in a circular way and constantly modifies the parameters of the model to make it suitable for processing long series of data information. Primitive neural networks, which modeled biological sequences, usually read the feature information of each base from one end of the sequence to the other [5]. Therefore, in the hidden layer of neural network at any location, only the information learned from the current node and all the previous nodes is saved. However, in the structure prediction of RNA sequences, the structure composed of any one of the bases in the RNA sequences is often affected by the non-adjacent nodes that are far from each other in the two directions [6]. That is, there is a long-range correlation between RNA bases. The structural change of any base at a given location is combined by features of several bases that are not adjacent to each other. Therefore, modeling RNA sequences using one-way recursive neural networks ignores the effects of base interactions in one direction. Two-way recursive CNN network can solve this problem very well.

2 RNA Secondary Structure and Its Prediction Methods 2.1 Functions and Types of RNA Molecules Ribonucleic acid (RNA) is the genetic information carrier found in various biological cells and most viruses and viroids. RNA is a kind of biological macromolecules, unlike the double chain structure of DNA, RNA is a single structure. In the past, people thought that RNA in biological genetic effect is not important, but in modern times, people found that RNA molecule is at the center of the “central dogma,” is a DNA molecule transcriptional control; therefore, RNA molecules called genetic “behind” is of decisive role for cell biology function [7]. In cells, RNA molecules can be divided into three types, which are tRNA (transporter RNA), rRNA (ribosomal RNA) and mRNA (messenger RNA), depending on their structures and functions [8]. tRNA is the reader of nucleotide sequence on mRNA and the transporter of amino acid. rRNA is the component of ribosomes and the executor of synthesizing amino acids into peptide chains. mRNA is a template for making proteins that are transcribed from DNA in the nucleus. In addition, some small RNA molecules, such as small nuclear RNA (snRNA), are present in the nucleus. ScRNA is in the cytoplasm [9]. Recently, scientists discovered a new type of circular non-coding RNA [10] and revealed the function and functional mechanism

Prediction of RNA Structures with Pseudoknots …

313

of such non-coding RNA. Non-coding RNA is a large group of RNA molecules that do not encode proteins but play a regulatory role in cells. Unlike DNA, RNA is generally a single-stranded molecule and does not form a double helix structure. However, many RNA molecules also need to form a certain secondary or tertiary structure through the principle of base pairing to determine its biological function. RNA has the same basic pairing rules as DNA, but g-u can also pair, except for a-u and g-c pairs.

2.2 RNA Secondary Structures and Pseudoknots RNA secondary structures can be divided into helices (pairs of adjacent bases) and different kinds of loops (unpaired nucleotides surrounded by helices) [11]. The stem ring is a base pair helix with a short unpaired ring at the end. This stem-loop structure is very common and is the basic unit for constructing large structural primitives, such as the shamrock structure (the four spiral nodes widely found in tRNA). Inner ring structures (short, unpaired bases in a long base pair helix) and convex rings (extra bases inserted in the helix strand, but not paired in the opposite strand) also occur frequently. Also, pseudoknots and ternary paired bases occur in RNA structures. As nonplanar structures, pseudoknots can also be classified as tertiary structures. The number of false junctions is very small in RNA sequences, but the structure of pseudoknots has a great influence on the function of RNA molecules [12], so RNA structure prediction model is best to predict pseudoknots.

2.3 RNA Structures Prediction It is difficult to predict the secondary structure of RNA, especially RNA with pseudoknots. At present, although there are many methods to predict the secondary structure of RNA, the quality of the predicted secondary structure is not high. This can be attributed to two main reasons: The minimum free energy function of thermodynamic model is unreasonable. The theoretical basis of the thermodynamic model is that the natural secondary structure folded by the RNA sequence has the global minimum free energy, so the minimum value of the energy function min f (x) can be used as the target function for the prediction of the secondary structure. However, the actual RNA folding process does not fully follow the hypothesis of optimal energy function. Sometimes, the true secondary structure of RNA is formed in the suboptimal state of the minimum free energy, not the optimal state; on the other hand, small local secondary structures of RNA molecules are difficult to capture by energy function [13]. Traditional RNA structure prediction methods use biochemical experimental information, which is time-consuming, laborious and costly. Commonly used RNA

314

S. Tang et al.

secondary structure prediction methods to choose the characteristics and related constraints are often based on biochemical experiments or empirical analysis, simply using greedy method or dynamic programming algorithm for structure prediction. Therefore, it is of great significance to introduce machine learning algorithms into RNA secondary structure prediction. ProbKnot algorithm [14], a commonly used method for predicting the secondary structure of RNA with pseudoknots, can quickly calculate the pairing probability between the bases of RNA sequence and then select the maximum pairing probability of each base according to the base-pairing probability matrix and the greedy method to generate the secondary structure of RNA.

3 Convolutional Neural Network Models RNA Structures 3.1 Modeling RNA Structure Prediction by CNN The key problem of CNN-based RNA structures prediction is how to train the hidden layer of CNN because during the training process, problems such as difficulty in transmitting information between the upper layer and the next layer and disappearance of gradient descent will occur. Therefore, the concept of highway network [15] makes it possible to train convolutional neural network with thousands of layers. Highway network is inspired by the gate mechanism in long-term short-term memory (LSD) and introduces the gate mechanism when superimposing multi-layer neural network [16] so that important information can be transmitted to the classification layer quickly through the highway, reducing the loss of information in the transmission process between layers. For example, for a fully connected neural network composed of an L layer, suppose that the L layer (L ∈ {1, 2, …, L}), the input of which is X l , and the output yl at the L layer can be expressed as yl = H (X l , WHl )

(1)

For the prediction of RNA structure model by convolutional neural network, the output of each convolution hidden layer can be decomposed into two aspects. On the one hand, it can be used as the input of the next layer of convolution to further extract the features of RNA nucleotide fragments with longer distances. On the other hand, it can directly cross the forward propagation of the lower convolution through a special channel, highway. Then, it was passed into the secondary structure feature classifier, and the final data contained the features extracted from the base fragments of different lengths so that when predicting the secondary structure of RNA not only the base context feature information but also the long-range correlation information of the base sequence could be used. RNA secondary structure is a stem-loop structure, in which paired bases are stacked together to form stacking pairs and helices, with unpaired bases forming

Prediction of RNA Structures with Pseudoknots …

315

rings or unpaired single chains, which can be divided into hairpin loop, interior loop, bulge loop and multi-branch loop. In order to classify RNA secondary structure by machine learning, the characteristics of RNA secondary structure must be defined and described. In this paper, the main secondary structural characteristics of RNA were divided into seven categories: hairpin loop, interior loop, bulge loop, stem, multi-branched loop, unstructured single strand and planar pseudoknot. A stem of RNA consists of two sequences, one of which is closer to the 5 end, called the positive stem, and the other is closer to the 3 end, called the negative stem. The letter t stands for the base in the stem; the letter p stands for the base in the planar pseudoknot near the 5 end. The letter f stands for the base in the negative stem; the letter s stands for a planar false base near the 3 end; the letter n represents the unpaired base in the ring. The letter x represents an unpaired single-stranded base.

3.2 Steps of Convolutional Neural Network to Predict RNA Structure Modeling of RNA secondary structure with pseudoknots can be summarized into three steps. Step 1: Convert RNA sequences and structures into mathematical symbols. For an RNA sequence, find yi , the matching tag corresponding to each base x i on the sequence, and the problem of RNA structure prediction is transformed into a classification problem in machine learning. First, the paired label yi is simplified to 0-1-2 digital character set, which 0 means the base is not paired, 1 means the stem structure in the non-pseudoknot formed by pairing the base with other bases, and 2 means the stem structure in the pseudoknot formed by pairing the base with other bases. Step 2: Determine the input and output of the prediction model. (1) model input, including: ➀ RNA sequence, it is a collection of base characters. Namely  = {A, C, G, U} generate a stochastic sequence, ➁ the matching probability of RNA bases, because the RNA base pairing has regularity, such as A-U and G-C matching probability is very big, but A-G, G-U matching probability is small, so can be set up according to the experience: P(A, U) = 0.9, P(A, G) = 0.1, etc. (2) model output: a series of information labels of base pairing types: y1 , y2 , …, yn . And base pair label yij . The value of the former is any value in the set {0, 1, 2}. The latter refers to the pairing of any two bases in RNA. yij means the pairing of base i and base j, and 0 means no pairing. All yij sets are stored in a two-dimensional triangular matrix. Step 3: Design the process and algorithm of the prediction model. First, determine the number of layers in the convolutional layer, as well as the size and number

316

S. Tang et al.

of convolution kernel. The prediction model in this study firstly constructs three convolution layers and adds a pooling layer after each convolution layer. The convolution kernel size of convolution layer 1 is 9, and there are 100 convolution kernels in total. Tanh is adopted for activation function. The second convolution layer the convolution kernel size is 9, there are 120 convolution nuclei, and the activation function is tanh. The third convolution layer the convolution kernel size is 9, there are 150 convolution kernels, and the activation function is tanh. Then, set the parameters of pooling, and choose the maximum pooling strategy in this paper. The pooling layer has three main functions: (1) the pooling layer can keep the invariance in the training process of convolutional neural network, including translation invariance, rotation invariance and scale invariance. (2) the pooling layer can obtain the fixed-length data output, such as the variable length sequence or text, can be converted to a uniform length after pooling. (3) the pooling layer can reduce the redundancy. This is because in the process of convolution, there are overlapping areas in the calculation process of the sliding window, which will result in repeated calculation of features and redundancy of input data in the next layer. The maximum pooling can reduce the redundancy, retain the main features and reduce the training parameters, which has a good effect in preventing overfitting. After the design is completed, input information of RNA sequence is input to the input layer of the convolutional neural network, model training is conducted by using the training set, and parameters of each layer of the convolutional layer are continuously adjusted according to the value of the loss function, and the number of layers of the convolutional layer is gradually increased. Step 4: The prediction model and algorithm are implemented by Python, TensorFlow framework and Theano tools. The sequences with known structures were searched from the RNA sequence database as the training set of the model.

3.3 Experimental and Prediction Results This study randomly selected a group of non-coding RNA sequences with known secondary structures from the Rfam database [12] as the experimental data set. SnRNA, tmRNA, tRNA and rRNA sequences were selected. Among them, 2715 were short sequences, 1130 were medium sequences, and 352 were long sequences. Among all these sequences, there are 527 sequences containing false junction structure. Sensitivity (Sn) is adopted as the evaluation index of prediction accuracy in this study. The evaluation method is to use the CNN prediction model to conduct comparison experiments on short sequence, medium sequence, long sequence and the

Prediction of RNA Structures with Pseudoknots …

317

Table 1 Experimental results of CNN and ProbKnot and improved ProbKnot model comparison (data in the table is Sn value) Prediction method

Short sequence

Medium sequence

Long sequence

Sequence with pseudoknots

ProbKnot

0.8563

0.7321

0.6563

0.5323

Improved ProbKnot

0.8645

0.7665

0.6845

0.5766

CNN

0.8705

0.7768

0.6955

0.6544

Fig. 1 Comparison of experimental results

sequence with pseudoknots. The ProbKnot algorithm model and the improved ProbKnot model are selected as the comparison reference model. The experimental results are shown in Table 1. Figure 1 shows the comparison of experimental results in Table 1. It can be seen from the experimental results that the prediction accuracy of various length sequences, especially those with false junction structure, is improved to some extent by using the convolutional neural network prediction model with pooling layer. It indicates that convolutional neural network has a good effect on extracting long-range correlation of RNA sequences. To evaluate the stable performance of the CNN prediction method, we divide the data set into three subsets. In each fold experiment, including: (1) testing set containing 10% of all the clean data that is unused during the learning phase; and (2) the training set and validation set, which are created by the ten-fold cross-validation for the remaining clean data. Fifty epochs are trained, and the loss and accuracy of each epoch are recorded for both the training set and the testing set. Figure 2 shows the average loss and accuracy at each epoch in the ten-fold cross-validation experiments. As could be observed, after the 40th epoch, the test loss and accuracy are tending to be stable, with the highest testing accuracy of 84.37%, indicating that the CNN method could successfully complete the prediction from RNA sequences to structures.

318

S. Tang et al. 1.4 TestLoss

1.2

TrainLoss

1

TestAccuracy

0.8

TrainAccuracy

0.6 0.4 0.2 0

2

5

10

15

20

25

30

35

40

45

50

Fig. 2 Accuracy and loss of training and testing in the cross-validation experiments

4 Conclusion In this paper, we present a method to predict the secondary structure of RNA with pseudojunction structure using convolutional neural network. The theoretical basis is that CNN can well deal with the long-distance dependence of bases in biological sequences, so it is suitable for structural prediction of RNA sequences with longrange correlation, especially when RNA sequences contain false junctions, and the accuracy of prediction is directly affected by the treatment of long-range correlation. Through experimental comparison, this method uses convolutional neural network model to effectively improve the prediction accuracy of RNA structure prediction model, indicating that this method has good application value. Acknowledgements This work was supported by Scientific Research Projects (No. 15C0204) of Hunan Education Department and supported by the Science and Technology Plan Project of Hunan Province (2016TP1020). Application-oriented Special Disciplines, Double First-Class University Project of Hunan Province (Xiangjiaotong [2018] 469).

References 1. Li, Z.Y., Huang, C., Bao, C., et al.: Exon-intron circular RNAs regulate transcription in the nucleus. Nat. Struct. Mol. Biol. 22(2), 256–264 (2015) 2. Cho, K., van Merrienboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., Bengio, Y.: Learning phrase representations using RNN encoder-decoder for statistical machine translation. In: Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, pp. 1724–1734 (2014) 3. Hochreiter, S., Schmidhuber, J.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997) 4. Zhao, H., Rosin, P.L., Lai, Y.K.: Automatic semantic style transfer using deep convolutional neural networks and soft masks. Vis. Comput. (2019) 5. Jebara, T.: Discriminative, Generative and Imitative Learning. Massachusetts Institute of Technology, Media Laboratory (2001)

Prediction of RNA Structures with Pseudoknots …

319

6. Nawrocki, E.P.: Structural RNA Homology Search and Alignment Using Covariance Models. Washington University School of Medicine (2009) 7. Come, E., Oukhellou, L., Denoeux, T.: Learning from partially supervised data using mixture models and belief functions. Pattern Recogn. 42(3), 334–348 (2009) 8. Tanzera, A., Hofackerab, I.L., Lorenz, R.: RNA modifications in structure prediction—status quo and future challenges. Methods 39(10), 23–38 (2018) 9. Jenkins, A.M., Waterhouse, R.M., Muskavitch, M.A.T.: Long non-coding RNA discovery across the genus anopheles reveals conserved secondary structures within and beyond the Gambiae complex. BMC Genomics 16(1), 337–350 (2015) 10. Tur, G., Dilek, H.D., Schapire, R.E.: Combining active and semi-supervised learning for spoken language understanding. Speech Commun. 45, 171–186 (2005) 11. Tang, S., Zhou, Y., Zou, S.: The RNA secondary structure prediction based on the lexicalized stochastic grammar model. Comput. Eng. Sci. 3(31), 128–131 (2009) 12. Griffiths-Jones, S., Bateman, A., Marshall, M., Khanna, A., Eddy, S.R.: Rfam: an RNA family database. Nucleic Acids Res. 31(1), 429–441 (2003) 13. Kappel, K., Das, R.: Sampling native-like structures of RNA-protein complexes through rosetta folding and docking. Structure 31(4), 139–151 (2018) 14. Bellaousov, S., Mathews, D.H.: ProbKnot: fast prediction of RNA secondary structure including pseudoknots. RNA 16(10), 1870–1880 (2010) 15. Srivastava, R.K., Greff, K., Schmidhuber, J.: Highway networks. arXiv:1505.00387 (2015) 16. Zhao, H.H., Rosin, P., Lai, Y.K.: Image neural network style transfer with global and local optimization fusion. IEEE Access (2019). Zhao, H.H., Rosin, P., Lai, Y.K., Zheng, J.H., Wang, Y.N.: Adaptive gradient-based block compressive sensing with sparsity for noisy images. Multimed. Tools Appl. (2019)

An Improved Attribute Value-Weighted Double-Layer Hidden Naive Bayes Classification Algorithm Huanying Zhang, Yushui Geng, and Fei Wang

Abstract The Hidden Naive Bayes (HNB) classification algorithm is a kind of structurally extended Naive Bayesian classification algorithm, which introduces a hidden parent node for each attribute so that the dependencies between attributes are utilized. However, in the classification process, the effect of the attribute pair on the attribute is ignored. Therefore, the double-layer Hidden Naive Bayes (DHNB) classification algorithm fully considers the dependence between attribute pairs and the attributes. However, he did not consider the contribution of different values of each feature attribute to the classification. To solve this problem, an improved DHNB algorithm was obtained by constructing a corresponding weighting function to calculate the contribution degree of each feature attribute value to the classification and using the obtained weighting function to weight the formula in the DHNB algorithm. Finally, the improved algorithm was simulated experiment on the University of California Irvine (UCI). The results show that the improved algorithm has higher classification efficiency than the original DHNB algorithm, and the method has good applicability. Keywords Hidden Naive Bayes · Double-layer Hidden Naive Bayes · Weighting function · Classification efficiency

1 Introduction Classification learning has always been the main research content and direction of big data analysis [1]. Because BN has the ability to express uncertainty, a solid mathematical theory, and can integrate a priori information and data sample information, it is often used to deal with classification problems. BN is also known as belief network or H. Zhang · F. Wang School of Information, Qilu University of Technology, Shandong Academy of Sciences, 250353 Jinan, China Y. Geng (B) Graduate School, Qilu University of Technology, Shandong Academy of Sciences, 250353 Jinan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_31

321

322

H. Zhang et al.

directed acyclic graphical model [2, 3]. The two most typical Bayesian classification algorithms in BN are the Bayesian belief network algorithm and the Naive Bayesian (NB) classification algorithm. NB is a classic, simple, and efficient Bayesian network model [4], and has a stable classification effect and a solid mathematical theoretical basis, so it has been widely used. NB is based on the assumption of attribute condition independence. However, its conditional independence hypothesis does not hold in many cases, which affects its classification effect. Therefore, scholars have proposed many improved methods. The improvement of the BN algorithm is mainly reflected in five aspects: (1) Structural extension method. Such as, in order to avoid learning the topology and considering the dependence of attribute nodes and all other attribute nodes, Jiang [5] proposed Hidden Naive Bayes. (2) Attribute weighting method. There are many methods for attribute weighting, mainly to determine the weights in a variety of ways. The typical one is the weighted naive Bayesian classification algorithm proposed by Zhang [6], which proposes a variety of methods for determining attribute weights, including information benefit method, hill climbing method, Markov chain Monte Carlo method, and corresponding combination method. (3) Attribute selection method. The attribute selection method can be considered as a special case of the attribute weighting method. Hall [7] has proposed a correlation-based feature selection (CFS). (4) Local learning method. Frank [8] proposed a locally weighted Naive Bayes (LWNB) algorithm, which combines local weighted learning with naive Bayesian learning. (5) Combined with other algorithms. Many scholars combine NB algorithms with algorithms such as networks, KNN, and decision trees. For example, Hall [9] combines Naive Bayes and decision tree to construct a classifier. For the HNB algorithm, its classification efficiency is high, but it is too simple and the interdependencies between the various attributes in the training set cannot be described in detail. Therefore, some scholars have improved it. Li [10] proposed a double-layer Hidden Naive Bayes (DHNB) classification algorithm. Based on the HNB algorithm, DHNB introduces a hidden parent attribute for each feature attribute, indicating the weighted sum of the degree of correlation between other attributes and the feature attribute. Du [11] proposed an algorithm of weighted Hidden Naive Bayes (WHNB) classification. The algorithm uses the KL distance and the attribute weight calculation formula of the split information to construct the corresponding weighting formula. Qin [12] proposed Hidden Naive Bayes algorithm based on attribute values weighting (AVWHNB). The weighted function is constructed by calculating the contribution of each characteristic attribute value to the classification, and the improved HNB algorithm is obtained. This paper combines the above problems, combining the structurally extended DHNB and attribute weighting to improve classification accuracy. Construct a weighting function by using the number of values of the corresponding attribute values in the training set. Calculate the contribution degree of the attribute of each test instance to the classification when taking different attribute values in the classification stage, and use the calculation result as the weight. Then the DHNB algorithm is weighted to obtain the attribute value weighted double-layer Hidden Naive

An Improved Attribute Value-Weighted Double-Layer …

323

Bayes (AVWDHNB) classification algorithm. Finally, experiments show that the AVWDHNB algorithm effectively improves the classification accuracy of NB.

2 Related Work 2.1 Hidden Naive Bayes Classification Model The Hidden Naive Bayes classification model [13] introduces a hidden parent node for each attribute node on the basis of NB to represent the dependency relationship between the attribute and other attributes. Then HNB uses the hidden parent node to replace the corresponding attribute node in the NB classification model when the model is built, so that the HNB classification model fully expresses the dependencies between attributes. Its structure mainly includes three types of nodes, namely class nodes, attribute nodes, and hidden parent nodes. The class node is represented by C, which represents the parent node of all attribute nodes. The attribute node is represented by Ai . The hidden parent node of attribute node Ai is denoted by Ahpi . The structural model diagram is shown in Fig. 1. Its joint distribution probability P(A1 , . . . , An , C) is defined as follows: P(A1 , . . . , An , C) = P(C)

n    P Ai |Ahpi , C

(1)

i=1

where P(C) is the prior probability of node C: n n       P Ai |Ahpi , C = Wi j · P Ai |A j , C , Wi j = 1 j=1, j=i

Fig. 1 Structure of HNB

j=1, j=i

(2)

324

H. Zhang et al.

As can be seen from the above equation, the hidden parent node Ahpi on each node variable Ai is the sum of the weights of all the dependency relationships that have an influence on the attribute Ai . Therefore, in the HNB classification model, a hidden parent node of attribute represents all dependencies between attributes. In addition, in the HNB classification algorithm, weight Wi j is a key issue for classification prediction and Wi j represents the conditional mutual information between attribute variables. The greater the degree of dependency between attribute variables, the greater the weight, and the smaller the weight, the smaller the dependency. The formula is as follows:   I p Ai ; A j |C   Wi j = n (3) j=1, j=i I p Ai ; A j |C   where I p Ai ; A j |C represents the conditional mutual information between attributes Ai and A j , and the calculation formula is as shown: 



I p Ai ; A j |C =



  P ai , a j , c log

ai ,a j ,c

  P ai , a j |c   P(ai |c)P a j |c

(4)

For a given test case x = a1 , a2 , . . . , an , the HNB algorithm can use the following formula to classify prediction instances x. c(x) = arg max P(c) c∈C

n    P ai |ahpi , c

(5)

i=1

2.2 Double-Layer Hidden Naive Bayes Classification Model DHNB is based on HNB and has been extended, adding one more hidden parent node for each attribute node. It not only inherits the advantage that HNB only needs to learn parameters from data without structural learning, but also considers the dependence between attributes and attribute pairs, which further improves the classification accuracy of the classifier. The DHNB classification model is a Bayesian network model for dealing with discrete variables. It includes three types of nodes, namely the root node, the attribute node, and the hidden parent node, which are represented by C, Ai and Ahpi , respectively. Where Ahpi represents the weighted sum of the dependence of single attribute and attribute Ai and Ahpi2 denotes the weighted sum of the attribute Ai dependencies when the other two attributes act simultaneously. The structural model diagram is shown in Fig. 2.

An Improved Attribute Value-Weighted Double-Layer …

325

Fig. 2 Structure of DHNB

Corresponding to its structural model, in DHNB for a given test case x = a1 , a2 , . . . , an , it is classified as follows: c(x) = arg max P(c) c∈C

n       P ai |ahpi1 , c ∗ P ai |ahpi2 , c

(6)

i=1

2.3 Weighted Naive Bayesian Classification Model In practical applications, the influence of the attributes in the data set on the classification results often has some differences. Some attributes have a greater impact on classification, while others have less impact on classification. The NB classification model does not take into account the degree of influence of each attribute on the classification result but assumes that the contribution of each condition attribute to the decision attribute is equally important. In view of this situation, in order to improve the classification accuracy of NB, Ferreira [14] proposed a weighted Naive Bayes (WNB) classification model in 2001. The WNB model is defined as follows: c(x) = arg max P(c) c∈C

where, Wi is the weight of attribute Ai .

n  i=1

P(ai , c)Wi

(7)

326

H. Zhang et al.

3 Attribute Value-Weighted Double-Layer Hidden Naive Bayes Classification Algorithm 3.1 Attribute Value-Weighted Double-Layer Hidden Naive Bayes Classification Model The AVWDHNB classification model improves the HNB algorithm from two aspects: Structure extension and attribute value weighting. According to the classification prediction formula of DHNB and WHNB, the classification prediction formula of AVWDHNB algorithm can be obtained. The AVWDHNB classification model is a Bayesian network model used to process discrete variables. For a given test case x = a1 , a2 , . . . . an , the classification prediction formula of the AVWDHNB algorithm is as follows: c(x) = arg max P(c) c∈C

n   w(i1)  w(i2)

P ai |ahpi1 , c ∗ P ai |ahpi2 , c

(8)

i=1

where P(c) is the prior probability of node c; w(i1) and w(i2) are theweights ofthe attribute value ai ; P ai |ahpi1 , c and P ai |ahpi2 , c are conditional probability formulas calculated as follows: n n       Wi j · P ai |a j , c , Wi j = 1 P ai |ahpi1 , c = j=1, j=i n    P ai |ahpi2 , c =

n 

n      Wi jk · P ai | a j , ak , c ,

j=1, j=i k= j,k=i

(9)

j=1, j=i n 

Wi jk = 1

j=1, j=i k= j,k=i

(10) The calculation method of the weights in Eqs. (11) and (12) uses conditional mutual information. Because mutual information can measure the size of dependencies between attributes, the corresponding weight size represents the size of the dependencies between attributes. The weight is calculated as follows:   I p Ai ; A j |C   j=1, j=i I p Ai ; A j |C     I p Ai ; A j , Ak |C     = n n j=1, j=i k=1,k= j=i I p Ai ; A j , Ak |C Wi j = n

Wi jk

(11) (12)

  where I p Ai ; A j |C represents the conditional mutual information between attributes Ai and A j , and the calculation formula is as follows:

An Improved Attribute Value-Weighted Double-Layer …





I p Ai ; A j |C =



  P ai , a j , c log

ai ,a j ,c

327

  P ai , a j |c   P(ai |c)P a j |c

(13)

3.2 Attribute Value Weighting Calculation In the classification stage, DHNB algorithm regards the contribution of different values of each characteristic attribute to classification as the same, which limits the classification accuracy of the DHNB algorithm to some extent. So according to the influence of different attribute values on the classification result to calculate the weight, the paper improves the calculation method of the weight. Let Num(A  i ) denotes the number of values of attribute Ai in the training set. set whose attribute Count a j , c denotes the number of sample objects in the training  take a j and whose class tag is marked c. Count ai , a j , c denotes the number of sample objects whose corresponding attribute bits in the training set take ai and a j , and whose class tag gives c. The weight is designed according to the influence of each attribute value on the classification. The weight of the attribute value is calculated by the following formula:

w(i1) = where the larger

Count(ai ,a j ,c) Count(a j ,c)

Num(Ai )

(14)

Count(ai ,a j ,c) Count(a j ,c)

indicates that the feature attribute mark ai tends to be Count a ,a ,c class mark c in the training set. That is, the larger the Count( ia ,cj ) the greater the ( j ) contribution of the feature attribute value ai of the test instance to classifying it into the class tag c. Therefore, w(i1) can be used to measure the contribution of attribute values to classification. It can be seen from Eq. (14) that the analysis of the weight only considers the also contribution of the attribute value ai and a j to the classification. The paper   needs to consider the contribution of attribute value ai and attribute pair a j, ak to the classification. Therefore, the effect of attribute value ai and attribute pair a j , ak on classification is defined, which can be calculated by the following formula:

w(i2) =

Count(ai ,a j ,ak ,c) Count(a j ,ak ,c)

Num(Ai )

(15)

328

H. Zhang et al.

3.3 AVWDHNB Classification Algorithm Step Description     In the experiment, the values of P(c), P(ai |c), P ai |a j , c , and P ai |a j , ak , c need to be calculated. In order to avoid the influence of the probability of zero on the experiment, this experiment uses Laplacian smooth estimation [15], the specific formula is as follows: P(c) =

Count(c) + 1 t + Num(C)

Count(ai , c) + 1 Count(c) + Num(Ai )     Count ai , a j , c + 1   P ai |a j , c = Count a j , c + Num(Ai )     Count ai , a j , ak , c + 1   P ai |a j , ak , c = Count a j , ak , c + Num(Ai ) P(ai |c) =

(16) (17) (18) (19)

The specific implementation steps of AVWDHNB classification algorithm are as follows: Step 1: Data preprocessing. The data set is normalized and discretized, the missing data is filled, and the useless data is deleted to obtain complete sample data information. Step 2: Determine whether the data set is a training sample. If it is a training sample data, go to Step 3. If it is a classified sample data, go to Step 5. Step 3: Calculate a priori information. The values of Eqs. (16)–(19) are calculated using training data set D to determine a priori information. Step 4: Calculate the weighting. The values of the weights are obtained by using the data set calculation Formulas (11), (12), (14) and (15). Step 5: Calculate the values of Eqs. (9) and (10) according to the above calculation results, and then construct a double-implicit naive Bayesian network classification model with attribute value weighting. Step 6: Obtain classification results. According to Formula (3), the final classification result is output.

4 Experimental Results and Analysis In order to verify the effectiveness of the algorithm, the experiment was verified using the standard data set in the UCI machine learning database [16] and compares AVWDHNB with the NB algorithm, HNB algorithm, and AVWHNB algorithm. The data set used in the experiment is described in detail in Table 1.

An Improved Attribute Value-Weighted Double-Layer …

329

Table 1 Description of data sets used in the experiments Data set Glass Kr-vs-kp

Instances

Attributes

214

10

Classes

Missing values

Numeric database

7

N

Y

3196

37

2

N

N

Letter

20,000

17

26

N

Y

Sonar

208

61

2

N

Y

5000

41

3

N

Y

101

18

7

N

Y

Waveform-5000 Zoo

During the experiment, data sets containing continuous values generally need to be discretized, and the equal-width discretization method [17] is adopted here. It mainly divides the continuous attribute into ten intervals and discretizes it into discrete values. For a data set with a large number of samples, 70% of them can be used as a training set, and the rest can be used as a test set. For a data set with a small sample size, a different tenfold cross-validation is performed [18]. The specific method is to divide the data set into ten parts, nine parts as the training set, one part as the test set, 10 times of the tenfold cross-validation run repeatedly, and finally, take the average of the ten times as the final result. Table 2 lists the accuracy comparisons of the classification of data sets in the UCI machine learning database by the NB algorithm, the HNB algorithm, and the AVWHNB, respectively. As can be seen from Table 2, for the average of the six data sets, the average classification efficiency of AVWDHNB is 7.1% higher than the average classification efficiency of NB. This shows the feasibility of AVWDHNB and improves the classification efficiency of NB, but the classification effect of AVWDHNB is not obvious enough compared to HNB and DHNB. In addition, as can be seen from Fig. 3, the classification accuracy of AVWDHNB is higher than that of other algorithms, but the classification effect is not stable enough. When the number of samples in the data set is large (such as Letter), the classification effect of AVWDHNB is not as good as that of DHNB. In general, the algorithm proposed in this paper is not only feasible, but also the accuracy of the algorithm is improved. Table 2 Classification accuracy comparison of different algorithms Data set

NB

DHNB

AVWHNB

AVWDHNB

Glass

0.6008

0.6055

0.6155

0.6386

Kr-vs-kp

0.8779

0.9367

0.9389

0.9488

Letter

0.7208

0.8678

0.8615

0.8659

Sonar

0.7032

0.7497

0.7525

0.7653

Waveform-5000

0.7989

0.8469

0.8315

0.8534

Zoo

0.9402

0.9803

0.9899

0.9958

mean

0.7736

0.8311

0.8316

0.8446

330

H. Zhang et al.

Fig. 3 Comparison of classification accuracy with four algorithms

5 Conclusions This article is based on the improved HNB and has improved DHNB. The improved algorithm inherits the advantages of simple NB structure and high classification efficiency. It constructs a weighting function by using the degree of contribution of each attribute value to the classification and weights the DHNB. It can be seen from the experimental results that the classification accuracy of AVWDHNB is higher than that of NB, HNB, and AVWHNB algorithms. Although the algorithm of this paper improves the efficiency of classification to a certain extent, the efficiency of classification is not very good due to the large sample number of data sets. Therefore, in the future research, more focus on the weight of learning, so that the classification effect is more stable.

References 1. Gholizadeh, A., Carmon, N., Klement, A., et al.: Agricultural soil spectral response and properties assessment: effects of measurement protocol and data mining technique. Remote. Sens. 9(10), 1078 (2017) 2. Gallagher, C., Madden, M. G., D’Arcy, B.: A bayesian classification approach to improving performance for a real-world sales forecasting application. In: IEEE International Conference on Machine Learning & Applications. IEEE (2016) 3. Spiegler, R.: Bayesian networks and boundedly rational expectations. Q. J. Econ. 131(3) (2016) 4. Lee, C.H., Gutierrez, F., Dou, D.: Calculating feature weights in naive Bayes with kullbackLeibler measure. In: IEEE International Conference on Data Mining (2012)

An Improved Attribute Value-Weighted Double-Layer …

331

5. Jiang, L.X., Cai, A.H., Zhang, H., et al.: Naive Bayes text classifiers: a locally weighted learning approach. J. Exp. Theor. Artif. Intell. 25(2), 14 (2013) 6. Zhang, H., Sheng, S.: Learning weighted naive Bayes with accurate ranking. In: Fourth IEEE International Conference on Data Mining (ICDM’04). IEEE, pp. 567–570 (2004) 7. Hall, M.A.: Correlation-based feature selection for discrete and numeric class machine learning. In: Seventeenth International Conference on Machine Learning (2000) 8. Frank, E., Hall, M., Pfahringer, B.: Locally weighted naive bayes. In: Nineteenth Conference on Uncertainty in Artificial Intelligence (2003) 9. Hall, M.: A decision tree-based attribute weighting filter for naive Bayes (2007) 10. Li, J.H., Xiao-Gang, Z., Hua, C., et al.: Improved algorithm for learning hidden naive Bayes. J. Chin. Comput. Syst. 21(10), 1361–1371 (2013) 11. Wang, X., Du, T.: Improved weighted naive bayesian classification algorithm based on attribute selection. Comput. Syst. Appl. 24(8), 149–154 (2015) 12. Qin, H.Q., Zhao, M.X.: Hidden naive bayes algorithm based on attribute values weighting. Joural Shandong Univ. Sci. Technol. (Nat. Sci.) 37(3), 73–78 (2018) 13. Zhang, H., Jiang, L., Su, J.: Hidden naive Bayes. In: Proceedings, the Twentieth National Conference on Artificial Intelligence and the Seventeenth Innovative Applications of Artificial Intelligence Conference, 9–13 July 2005. AAAI Press, Pittsburgh, PA (2005) 14. Ferreira, J., Denison, D.G.T., Hand, D.J.: Weighted naive Bayes modelling for data mining (2001) 15. Xiang, Z.L., Yu, X.R., Kang, D.K.: Experimental analysis of naive Bayes classifier based on an attribute weighting framework with smooth kernel density estimations. Appl. Intell. 44(3) (2015) 16. Frank, A., Asuncion, A.: UCI machine learning repository. University of California, Irvine, School of Information and Computer Science. http://archive.ics.uci.edu/ml (2010) 17. Abraham, R., Simha, J.B., Iyengar. S.S.: A comparative analysis of discretization methods for medical data mining with naive Bayesian classifier. In: International Conference on Information Technology (2006) 18. Witten, I.H., Frank, E., Hall, M.A., Booksx, I.: Data mining: Practical machine learning tools and techniques, Third Edition (2005)

An Improved Fuzzy C-Means Clustering Algorithm Based on Intuitionistic Fuzzy Sets Fei Wang, Yushui Geng, and Huanying Zhang

Abstract Since intuitionistic fuzzy sets (IFSs) can effectively deal with fuzzy and uncertain data, this paper proposes a fuzzy C-means clustering algorithm (FCM)based on intuitionistic fuzzy sets for the inaccuracy in real clustering problems. Aiming at the problem that the traditional FCM algorithm is sensitive to the selection of the initial cluster center, the density region is divided, and the initial cluster center is selected in the high-density region to avoid the noise in the low-density region. The intuitionistic fuzzy entropy is introduced to calculate the feature weight of the data set, and the feature value is weighted, and the influence of the feature weight on the clustering result is considered. Finally, the specific steps of the improved algorithm are given, and the feasibility and superiority of the method are illustrated by typical examples. Keywords Intuitionistic fuzzy set · Fuzzy mean algorithm · Intuitionistic fuzzy entropy · Initial clustering center

1 Introduction With the advent of the era of big data, the requirements for information processing are getting higher and higher. In real life, the classes of objects encountered by people cannot be accurately defined, and fuzzy clustering algorithms emerge as the times require, using fuzzy mathematics. This method quantitatively determines the fuzzy relationship between samples, in order to achieve objective and accurate clustering. F. Wang · H. Zhang School of Information, Qilu University of Technology, Shandong Academy of Sciences, 250353 Jinan, China Y. Geng (B) Graduate School, Shandong Academy of Sciences, Qilu University of Technology, 250353 Jinan, China e-mail: [email protected]

© Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_32

333

334

F. Wang et al.

Fuzzy clustering algorithms are widely used in the fields of pattern recognition, image processing, and rule extraction. A variety of fuzzy clustering algorithms have been proposed for different application scenarios. Among them, the fuzzy C-means algorithm [1] is widely used. In real-life experience, the value of clustering objects is often not accurate. The FCM algorithm in fuzzy environment has become a research hotspot, while the intuitionistic fuzzy set is used as an extension of fuzzy set, which increases the important parameter of non-affiliation degree and deals with fuzzy information. The ability is stronger, and the FCM algorithm is extended to intuitionistic fuzzy sets. Xu and Wu [2] proposed the intuitionistic fuzzy mean clustering algorithm for the first time and clustered the intuitionistic fuzzy numbers according to the degree of membership. He and Lei [3] proposed a fuzzy mean clustering algorithm based on intuitionistic fuzzy sets, and extended the relationship between classification objects and cluster centers into intuitionistic fuzzy relations, and applied them to the field of target recognition. Zhang et al. [4] proposed a clustering method based on intuitionistic fuzzy sets and gave a transitive intuitionistic fuzzy equivalence matrix, but this method cannot meet the requirements of large sample size and high real-time requirements. Wu [5] proposed an FCM clustering algorithm based on intuitionistic fuzzy sets, defined the distance between intuitionistic fuzzy numbers, and constructed the objective function of intuitionistic fuzzy number clustering, but the algorithm randomly selected the initial clustering center, robustness. Shen et al. [6] extended the fuzzy mean clustering algorithm of Euclidean space sample points to the fuzzy average number clustering algorithm. Chang and Zhang [7] proposed a clustering model based on weighted intuitionistic fuzzy sets, extending the FCM algorithm to weighted intuitionistic fuzzy sets, however, both algorithms proposed in [6] and [7] ignore the influence of feature weights on clustering results. In fuzzy set theory, fuzzy entropy is a measure of the degree of set ambiguity. Shen and Guo [8] analyzed the insufficiency of the existing intuitionistic fuzzy entropy formula, and gave a new intuitionistic fuzzy entropy formula, and applied the intuitionistic fuzzy entropy into weights and applied it to fuzzy inference. Li and Yu [9] extended the fuzzy entropy to the intuitionistic fuzzy number and used the intuitionistic fuzzy entropy to calculate the feature weight. FCM clustering methods based on intuitionistic fuzzy sets are increasingly applied to many fields such as image segmentation, pattern recognition, and target classification. Wang et al. [10] introduced spatial neighborhood information into the objective function and proposed a fuzzy mean clustering algorithm based on intuitionistic fuzzy sets, which is applied to the field of image segmentation, but the algorithm takes a long time. Yan et al. [11] used intuitionistic fuzzy cross-entropy to calculate the similarity between the distance and the inter-class preference of each customer and carried out customer identification, but the algorithm ignored the problem of the initial clustering center. In this paper, an improved algorithm is proposed after analyzing the existing algorithms. At the same time, considering the influence of the selection feature weights of the initial clustering center and taking into account the real-time performance of the algorithm, the feasibility of the new algorithm is illustrated by an example.

An Improved Fuzzy C-Means Clustering Algorithm Based …

335

2 Preliminaries 2.1 Intuitionistic Fuzzy Set Zadeh [12] proposed a fuzzy set. On this basis, Atanassov proposed the concept of intuitionistic fuzzy sets and added the concept of the degree of non-membership. Definition 1 Atanassov and Rangasamy [13] An intuitionistic fuzzy set X = {x1 , x2 , . . . , xn } on the set can be expressed as A = {xi , μ A (xi ), ν A (xi )|xi ∈ X }, i = 1, 2, . . . , n

(1)

where μ A (xi ) ∈ [0, 1], v A (xi ) ∈ [0, 1] as the membership and non-membership of x i to A, and for any ∀xi ∈ X , there is 0 ≤ μ A (xi ) + v A (xi ) ≤ 1. Definition 2 Atanassov and Rangasamy [13] Let a = μa , va , b = μb , vb  be intuitionistic fuzzy number, then   (1) λa = 1 − (1 − μa )λ , (va )λ , λ > 0 (2) a ⊗ b= μa μb , va + vb − va vb  (3) a λ = (μa )λ , 1 − (1 − va )λ , λ > 0

2.2 Intuitionistic Fuzzy Entropy Definition Burillo and Bustince [14] first proposed the definition of intuitionistic fuzzy entropy. Intuitionistic fuzzy entropy is a measure that reflects the degree of blurring of intuitionistic fuzzy sets. Definition 2 Wu et al. [15] Let F(X) be a set of all intuitionistic fuzzy sets X, and A ∈ F(X ), called the function E : F(X ) → [0, 1] as the intuitionistic fuzzy entropy E(A) of intuitionistic fuzzy set A, then (1) (2) (3) (4)

E(A) = 0, if and only if ∀x ∈ X , μ A (x), v A (x) = 1, 0 or 0, 1; E(A) = 1, if and only if ∀x ∈ X , μ A (x), v A (x) = 0, 0; ∀A, B ∈ F(X ), if A ⊆ B, then E(A) ≤ E(B); E(A) = E(Ac ).

Definition 4 Wu et al. [15] Let X = {x1 , x2 , . . . , xn } be a non-empty set, and A ∈ F(X ), then

336

F. Wang et al.

n 1  E(A) = (π A (xi ) + 1 − |μ A (xi ) − v A (xi )|) 2n i=1

(2)

E(A) is the intuitionistic fuzzy entropy of A.

3 Improved Fuzzy C-Means Algorithm 3.1 Intuitionistic Fuzzy Entropy Definition Define abbreviations and acronyms the first time they are used in the text, even after they have been defined in the abstract. Abbreviations such as IEEE, SI, MKS, CGS, sc, dc, and rms do not have to be defined. Do not use abbreviations in the title or heads unless they are unavoidable. The FCM algorithm divides the m data xi , {i = 1, 2, . . . , n} in the data set into n classes and iteratively minimizes the objective function to find the optimal clustering center and membership degree [8]. Then the objective function of the FCM algorithm can be formulated as follows: minJfcm (U, V ) =

p n  

 mo 2  u ik di j xi , ν j

(3)

i=1 j=1

The Lagrange multiplier method is used to obtain the membership degree and the cluster center iteration formula is, respectively: ui j =

p k=1



1 di j (xi ,ν j ) dik (xi ,νk )

m 2−1 i = 1, 2, . . . , n, j = 1, 2, . . . , p

(4)

0

n mo u ik xi ν j = i=1 m o , i = 1, 2, . . . , n n i=1 u ik

(5)

The algorithm is sensitive to initial values and relies heavily on the choice of the initial cluster center, when the initial cluster center seriously deviates from the global optimal cluster center; the FCM is likely to fall into the local minimum, especially when the number of clusters is large, the choice of the initial cluster center has a greater impact on the clustering results.

An Improved Fuzzy C-Means Clustering Algorithm Based …

337

3.2 New Intuitionistic Fuzzy Entropy Intuitionistic fuzzy entropy should simultaneously reflect the uncertainty and fuzziness of intuitionistic fuzzy sets. The existing definition of intuitionistic fuzzy entropy ignores the degree of blurring between intuitionistic fuzzy numbers. Wei et al. [18] gave the parameters to measure the degree of blur of interval numbers in the proposed improved interval AHP algorithm. This paper gives a new intuitionistic fuzzy entropy formula as follows: Let X = {x1 , x2 , . . . , xn }, A = {xi , μ A (xi ), v A (xi )|xi ∈ X } is intuitionistic fuzzy sets, then n 1 E(A) = n i=1



  δ A (x) f A2 (xi ) + π A2 (xi ) 2

(6)

where δ A (x) =

μ A (x) − v A (x) , (μ A (x) + v A (x))/2

Then n 1 E(A) = n i=1



  (μ A (x) − v A (x)) f A2 (xi ) + π A2 (xi ) μ A (x) + v A (x)

(7)

This is the intuitionistic fuzzy entropy E(A) of the intuitionistic fuzzy set A that satisfies Definition 3. f A (x) = 1 − |μ A (x) − v A (x)|, π A (x) = 1 − μ A (x) − v A (x), f A (x) is the ambiguity of x in A, π A (x) is the hesitation of x in A. δ A (x) indicates the degree of blurring of interval number. The larger the fuzzy entropy E(A) is, the higher the degree of ambiguity and uncertainty of the set is, and the smaller the weight of the feature is. On the contrary, the smaller the fuzzy entropy E(A) is, the larger the weight of the feature is.

3.3 Determining Feature Weights Using Fuzzy Entropy Fuzzy entropy describes the degree of ambiguity and uncertainty of fuzzy sets. If the set is more blurred, the weight is smaller, and vice versa. The characteristic weight of the sample reflects the relative importance of the evaluation index in the overall evaluation. In order to avoid subjective randomness in the process of empowerment, this paper uses intuitionistic fuzzy entropy to determine the weight ω j of features x j .

338

F. Wang et al.

1 − Ex j j=1 1 − E x j

ω j = k

(8)

E x j reflects the ambiguity and uncertainty of the eigenvalues of the sample set Y under the feature. The larger the value of E x j , the higher the degree of blur, indicating that the clustering result is less dependent on feature x j . Weighting the eigenvalue  matrix G according to Definition 2, then get the

, where eigenvalue matrix G = gi j n×s

ωj  ωj   gi j = ω j gi j = 1 − 1 − μi j , vi j

 feature vector corresponding to the sample is G i  The weighted

gi1 , gi2 , . . . , gis .

(9) =

3.4 Selection of Initial Cluster Center The FCM algorithm is very sensitive to the selection of the initial clustering center. The traditional algorithm often randomly selects the initial clustering center, and the clustering results are random. If the Euclidean distance is used as the distance measurement tool, the sample set to be clustered is selected to be the farthest from each other. If the eigenvalue of the sample is the initial cluster center, the noise point is sometimes taken, which affects the clustering result. In order to eliminate the sensitivity of the traditional FCM algorithm to the initial clustering center, Yuan et al. [16] defined the density parameters of the clustering objects, effectively avoiding the noise points with large deviations in the sample set. Lai and Liu [17] proposed to adopt the object distribution density method to determine the initial clustering center. This paper believes that in the large environment of intuitionistic ambiguity, the selected area of the initial clustering center can be subdivided into density, effectively avoid the noise points in the low-density area, take the points farthest from each other in the high-density area, and effectively select the initial cluster center. In order to calculate the density of the region where the feature vector G i is located,

define the region density parameter  ρi as thecenter G i using Definition 2 to calculate n Euclidean distances d G i , G 1 , d G i , G 2 , . . . , d G i , G n and rearrange them, let       d G i , G 1 ≤ d G i , G 2 ≤ · · · ≤ d G i , G n

(10)

  Euclidean distance of the Because d G i , G i = 0, after reordering, theminimum  N feature vectors including G i is recorded as R G i .     R G i = d G i , G (N )

(11)

An Improved Fuzzy C-Means Clustering Algorithm Based …

339

G i area G (1) , G (2) , . . . , G (N ) total N feature vectors, G i area density parameter ρi is ρi =

1   R G i

(12)

where, 0 < N < n is integer. Calculate the regional density parameters of the feature vectors using Eqs. (11) and V1 ,get (12), and compare G i with the highest regional density   as the first cluster center

a feature vector set of high-density regions P = G (1) , G (2) , . . . , G (N ) ,obtaining the feature vector farthest from the distance V1 in P as the second cluster center V2 , recalculate the distance of all feature vectors in P to V1 , V2 ,from P obtain the third cluster center V3 that satisfies the following conditions:       max min d G (r ) , V1 , d G (r ) , V2 , r = 1, 2, . . . , N

(13)

Finally, calculate the distance from all the feature vectors in P to V1 , V2 , . . . , Vk−1 and take them out in P:         max min d G (r ) , V1 , d G (r ) , V2 , . . . , d G (r ) , Vk−1 , r = 1, 2, . . . , N

(14)

As the k cluster center Vk (k = 1, 2, . . . , c), calculate sequentially the cluster center set V = {V1 , V2 , . . . , Vc }. When determining the initial cluster center, avoid too much concentration, and select the feature vector in P to avoid the noise in the low-density region. In this work N ∈ ((n + c)/2, n) and it is integer.

3.5 Algorithm Step After the text edit has been completed, the paper is ready for the template. Duplicate the template file by using the Save As command, and use the naming convention prescribed by your conference for the name of your paper. In this newly created file, highlight all of the contents and import your prepared text file. You are now ready to style your paper. The specific steps of the improved FCM clustering algorithm are as follows: Step 1: Input parameters and data set feature matrix; Step 2: Calculate the weighted eigenvalue matrix G ; Step 3: Determine the initial cluster center V (0) ; Step 4: Calculate the membership matrix U (l) ; Step 5: Update the cluster center V (l) ; Step  whether    6: Determine J U (l−1) , V (l−1) − J U (l) , V (l) < ε is established, the establishment proceeds to Step 7; otherwise, it jumps to Step 4;

340

F. Wang et al.

Step 7: Output the membership matrix U and cluster center V. (1) Input sample eigenvalue matrix G, number of clusters c, ambiguity parameter m, threshold for stopping iteration ε, number of iterations δ, sample data set. (2) Calculate the feature weights using Eqs. (7) and (8) and then calculate the weighted eigenvalue matrix G using Eq. (9). (3) Let l = 0, define the density parameter, and determine the initial cluster center V (0) . (4) Calculate the membership matrix U (l) , U (l) = (u ik )c×l   when 1 ≤ l ≤ c, let d G i , Vl = 0, then  u ik =

1, k = l 0, k = l

(15)

  For any l = 1, 2, . . . , c, exist d G i , Vl > 0, u ik =

c l=1



1 d (G i ,Vk ) d (G i ,Vl )

2 , m is the ambiguity parameter. m−1

(16)

(5) Update the cluster center with the membership matrix, where the k cluster center is recorded as V k

Vk = {vk1 , vk2 , . . . , vks } where,   vk j = αk j , βk j , n n m m i=1 (u ik ) μi j i=1 (u ik ) vi j αk j = n m , βk j = n m , k = 1, 2, . . . , c, j = 1, 2, . . . , s i=1 (u ik ) i=1 (u ik ) (17) (6) The square of the Euclidean distance of the data set for the cluster center is

J (U, V ) =

n  c  i=1 k=1

  2 (u ik )m d G i , Vk

(18)

An Improved Fuzzy C-Means Clustering Algorithm Based …

341

    Use Eq. (18) to determine if J U (l−1) , V (l−1) − J U (l) , V (l) < ε is true. If yes, proceed to Step 7; If not, let l = l + 1, and turn to Step 4. (7) Output membership matrix U and cluster center V.

4 Experiment In order to verify the effectiveness of the improved algorithm, experimental verification was performed on MATLAB. In [2], the clustering problem of intuitionistic fuzzy sets was first proposed, and the proposed method has good transitivity. Therefore, it is better to use the examples in the literature for verification. A comparison was made using the simulated data set, which contained 900 intuitionistic fuzzy numbers from three classes. A car market wants to classify five different cars X i (i = 1, 2, . . . , 5), each car has six attributes Q = {q1 , q2 , . . . , q6 }, q1 is the fuel consumption, q2 is the friction coefficient, q3 is the price, q4 is the comfort, q5 is the design, and q6 is the safety factor. The eigenvalues of each car under each feature are represented by intuitionistic fuzzy numbers, and the eigenvalue matrix of the clustered samples is as shown in Table 1. Now, we use the algorithm in this paper to cluster five cars. The experiment process is as follows: Set c = 3, ε = 0.005, δ = 100, m = 2 enter the car sample matrix G as shown in Table 2. Calculate the feature weights to obtain a weighted sample eigenvalue matrix. Table 1 Car sample data set q1

q2

q3

q4

q5

q6

x1









x2









x3









x4









x5









Table 2 Initial cluster center

V1(0)

V2(0)

V3(0)

























342

F. Wang et al.

Table 3 Membership matrix corresponding to the initial cluster center

(0)

(0)

(0)

u i1

u i2

u i3

x1

0.095

0.903

0.008

x2

0.100

0.892

0.001

x3

0.087

0.974

0.015

x4

0.006

0.034

0.692

x5

0.821

0.083

0.774

According to the calculation method proposed in this work, the initial cluster center is determined, calculate n Euclidean distances using Definition 2 and sort from large to small as follows:           d G i , G 3 ≤ d G i , G 4 ≤ d G i , G 2 ≤ d G i , G 1 ≤ d G i , G 5 Calculate the density parameter according to Eqs. (11) and (12) and obtain the initial values of the three cluster centers as V1(0) , V2(0) , V3(0) , as shown in Table 2. Then calculate the corresponding membership matrix of the initial cluster center by Eqs. (15) and (16), as shown in Table 3. Iterate once to get the cluster in Table 4.  center as shown  Calculate J U (0) , V (0) − J U (1) , V (1) = 0.0130 > ε, since this value is still greater than the iteration threshold, iteration should continue. Let l = 1, the membership degree matrix is shown in Table 5: Let l = 2, continue to iterate,   update the cluster center as shown in Table 6.  Calculate J U (1) , V (1) − J U (2) , V (2) = 0.0029 < ε, stop iteration. Then put out the membership matrix is shown in Table 7. Table 4 Cluster center at l=1

Table 5 He membership degree matrix at l = 1

(1)

(1)

(1)

V1

V2

V3

























(1)

(1)

(1)

u i1

u i2

u i3

x1

0.0671

0.8315

0.0014

x2

0.6591

0.7451

0.0020

x3

0.0053

0.6133

0.0032

x4

0.0008

0.0044

0.7603

x5

0.9197

0.0052

0.0090

An Improved Fuzzy C-Means Clustering Algorithm Based … Table 6 Cluster center at l=2

Table 7 The membership degree matrix at l = 2

(2)

343

(2)

(2)

V1

V2

V3

























(2)

(2)

(2)

u i1

u i2

u i3

x1

0.0374

0.6095

0.0005

x2

0.0354

0.6269

0.0009

x3

0.0391

0.5730

0.0013

x4

1.3637E-10

1.5310E-20

1

x5

1

1.3483E-20

1.3280E-12

As can be seen from Table 7, the classification results of the samples according to the principle of maximum membership are divided into three categories of {x1 , x2 , x3 }, {x4 }, {x5 },as shown in Table 8, which is the same as the clustering results in [2] and [9]. The improved algorithm proposed in this work is compared with the algorithm proposed in the literature, as shown in Table 9. The literature [2] randomly selects the initial cluster center, the initial value of the objective function is larger, and the number of iterations is more; In [9], the intuitionistic fuzzy entropy is used to weight the eigenvalues. Although the noise points are avoided when the initial clustering center is selected, the intuitionistic fuzzy entropy formula used ignores the ambiguity of the set. The algorithm proposed in this work adopts a new intuitionistic fuzzy Table 8 Clustering results of the working algorithm for the car dataset

Table 9 Comparison of clustering results of three algorithms

Data set

Cluster center

x1 , x2 , x3

1

x4

2

x5

3

Using algorithm

Number of iterations

Target function initial value

Ref. [2]

12

0.0001328

Ref. [9]

3

0.0000455

This paper

2

0.0000142

344

F. Wang et al.

entropy formula, which is more in line with the characteristics of the intuitionistic fuzzy set. It can obtain a smaller initial value of the objective function, reduce the number of iterations, and prevent the objective function from falling into the local optimal value. The clustering method can achieve better clustering effect in the case where the difference between the large sample data and the sample feature weight is obvious.

5 Summary The improved intuitionistic fuzzy C-means clustering algorithm proposed in this work; the new intuitionistic fuzzy entropy formula is used to weight the eigenvalues, which solves the problem that the feature weight of the sample has a significant impact on the clustering effect. At the same time, by defining the regional density, the regional density of each sample is compared, and only the high-density region is selected. The initial clustering center improves the iterative efficiency. Finally, the correctness and effectiveness of the clustering method are verified by an example. The algorithm proposed in this paper can be used in large sample data and clustering problems with high real-time requirements. It reduces the time complexity of the algorithm, avoids the objective function falling into the local optimal solution, and is easy to implement on the computer. The problem of determining the weighted index is still waiting to be solved. Therefore, the algorithm still has a lot of research space.

References 1. Bezdek James, C.: Pattern recognition with fuzzy objective function algorithms. Adv. Appl. Pattern Recognit. 22(1171), 203–239 (1981) 2. Xu, Z., Wu, J.: Intuitionistic fuzzy C-means clustering algorithms. J. Syst. Eng. Electron. 21(4), 580–590 (2012) 3. He, Z.H., Lei, Y.J.: Research on intuitionistic fuzzy C-means clustering algorithm. Control. Decis. 26(6), 847–850 (2011) 4. Zhang, H.M., Xu, Z.H., Chen, Q.: Research on clustering method of intuitionistic fuzzy sets. Control. Decis. 22(8), 882–888 (2007) 5. Wu, C.M.: Application of fuzzy c-means algorithm in intuitionistic fuzzy number clustering. Comput. Eng. Appl. 45(16), 141–145 (2006) 6. Shen, X.Y., Lei, Y.J., Cai, R.: An intuitionistic fuzzy clustering initialization method based on density function. Comput. Sci. 36(5), 197–199 (2009) 7. Chang, Y., Zhang, S.B.: Clustering model based on weighted intuitionistic fuzzy sets. J. Comput. Appl. 32(04), 1070–1073 (2012) 8. Shen, X.X., Guo, W.: New intuitionistic fuzzy entropy and its application. Comput. Eng. Appl. 49(240), 28–31 (2013) 9. Li, W., Yu, L.Y.: Improved fuzzy c-means clustering algorithm based on intuitionistic fuzzy sets. J. Shanghai Univ.: Nat. Sci. 2018(4), 634–641 (2018) 10. Wang, Z., Fan, J.L., Pei, et al.: An intuitionistic fuzzy C-means clustering image segmentation algorithm incorporating local information. J. Comput. Appl. 31(9) (2014)

An Improved Fuzzy C-Means Clustering Algorithm Based …

345

11. Yan, X.L., You, X., Lu, W.Y.: Customer clustering and recognition method based on intuitionistic fuzzy C-means. J. Univ. Shanghai Sci. Technol. 2015(1), 13–17 (2015) 12. Zadeh, L.A.: Fuzzy sets. Inf. Control. 8(3), 338–353 (1965) 13. Atanassov, K.T., Rangasamy, P.: Intuitionistic fuzzy sets. Fuzzy Sets Syst. 20(1), 87–96 (1986) 14. Burillo, P., Bustince, H.: Entropy on intuitionistic fuzzy sets and on interval-valued fuzzy sets. Fuzzy Sets Syst. 78(3), 305–316 (1996) 15. Wu, T., Bai, L., Liu, E., et al.: New entropy formula of intuitionistic fuzzy sets and its application. Comput. Eng. Appl. 49(23), 48–51 (2013) 16. Yuan, F., Zhou, Z.Y., Song, X.: K-means Algorithm for Initial Cluster Center Optimization. Comput. Eng. 33(3), 65–66 (2007) 17. Lai, Y.X., Liu, J.P.: Optimization of initial clustering center of K-means algorithm. Comput. Eng. Appl. 44(10), 147–149 (2008) 18. Wei, Y.Q., Liu, J.S., Wang, X.Z.: Consistency concept and weight of judgment matrix in uncertain AHP. Syst. Eng. Theory Pract. 14(4), 16–22 (1994)

SFC Orchestration Method Based on Energy Saving and Time Delay Optimization Zanhong Wu, Zhan Shi, and Ying Zeng

Abstract For the network function virtualization (NFV) environment, the existing virtual network feature (VNF) placement algorithm is difficult to optimize network energy consumption and network delay. This paper constructs an NFV. The network energy consumption and processing delay cost model. The energy consumption in this model includes server energy consumption and link energy consumption. The delay includes processing delay and link transmission delay in the network. Based on this model, this paper proposes an optimization algorithm combining simplex method and genetic algorithm. The simulation results show that compared with the random mapping algorithm, the algorithm designed in this paper can optimize the network energy consumption while ensuring the quality of service. Keywords Network function virtualization · Energy efficient · Quality of service · VNF deployment

1 Introduction With the continuous expansion of the demand for Internet services, the traditional static rigid service model cannot meet the needs of tenants, and there are disadvantages such as poor service function scalability and high maintenance costs. Therefore, the research of new dynamic service models has become a recent research hotspot, especially the network function virtualization technology. The technology is designed to simplify the deployment and management of network services by using virtualization and cloud computing technologies. Aiming at energy consumption and network delay, this paper first constructs a multi-objective optimization model and proposes a hybrid genetic algorithm combining simplex method with genetic algorithm. The main work of this paper is summarized as follows: Z. Wu · Z. Shi (B) · Y. Zeng Electric Power Dispatch & Control Center, Guangdong Power Grid Co., Ltd., Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_33

347

348

Z. Wu et al.

• This paper first builds an NFV network overhead model that includes server overhead and physical link cost. In order to achieve multi-objective optimization, this paper converts the normalized energy consumption and delay into a single deployment cost. • In order to overcome the shortcomings of traditional genetic algorithm, it is easy to fall into the local optimal solution. This paper combines genetic algorithm and genetic algorithm with strong local search ability to obtain a hybrid genetic algorithm. • This paper verifies the effectiveness of the algorithm designed in this paper by comparing with two random algorithms. The experimental results show that the algorithm designed in this paper can improve the success rate of SFC deployment while optimizing the service quality, and optimize the network energy consumption. The rest of this paper is organized as follows: Sect. 2 describes the VNF deployment issues and presents two separate deployment scenarios for energy efficiency and quality of service. Section 3 completes the establishment of the optimization problem model, Sect. 4 introduces the hybrid genetic algorithm designed in this paper, and Sect. 5 describes and analyzes the simulation results.

2 Related Works In response to the quality of service of the network, the author of the literature [1] proposed a heuristic algorithm to solve the VNF link problem. In this scheme, when an SFC with multiple VNF nodes needs to be expanded, it needs to be performed in two steps. The authors of [2] designed an optimization model and deployed SFC in a distributed manner that allowed the deployment of service chains with custom throughput without having to consider the throughput of a single VNF. However, the above two solutions are only for the quality of service (QoS) and do not consider the network energy optimization. The author of the literature [3] proposed a VNF layout algorithm for energy saving, which can maximize the traffic received by mobile clients while reducing the energy consumption generated by the data center. In reference [4], virtual machine migration in cloud data center is taken as the optimization method of network energy consumption. The author of literature [5] takes the traffic transmission cost as the optimization goal, and designs a VNF deployment algorithm in dynamic environment by using Markov approximation technology. In reference [6], a method based on affinity is designed to minimize cloud traffic and service delay in multi-cloud application scenarios. In this paper, energy consumption and network service delay are taken as optimization objectives, and an optimization model is constructed. Based on this model, a heuristic algorithm combining genetic algorithm and simplex is proposed.

SFC Orchestration Method Based on Energy Saving …

349

3 Optimization Problem Model All the symbols used in this article are shown in the following Table 1:

3.1 Cost Model of Sever Server energy consumption includes power consumption and processing energy consumption. This article uses nums representation of the number of VNF instances f deployed on server n: 

pr,n f · br

r ∈R

nums =

bf

 , ∀r ∈ R, ∀ f ∈ F

(1)

Because the power consumption of VNF processing user data is directly proportional to the CPU utilization, the CPU utilization after the VNF instance is deployed on the server can be expressed as:  cp =

r ∈R

pr,n f · br

nums · b f

, ∀n ∈ V, ∀ f ∈ F

(2)

Table 1 Letters used in the article Symbol

Description

br

Bandwidth of r

pr,n f

Binary variable, when the VNF node f of r is placed on n, the value is 1 and vice versa

n f mg

Binary variable, when r data flows from g deployed on n to g deployed on m, the value is 1 and vice versa

Gr

fg

A binary parameter, when g depends on f, it takes a value of 1, otherwise, it takes a value of 0

wrnml

A binary variable, when the data traffic of r flows from the m node to the n node on the physical link l, the value is 1 and vice versa

Cl

Link 1 load capacity

Cv

The total number of CPUs of server v

cf

Number of CPU cores required to deploy f

bf

Throughput of VNF instance f

ps

The energy lost by the server s when it is turned on

pl

Energy lost when link l starts working

pnt

Energy lost when the server is running at full load

plt

Loss of energy when link 1 is running at full load

chr

350

Z. Wu et al.

The energy consumed by the VNF instance f deployed on the server can be expressed as: psw

pnt − ps = · cf · Cv



pr,n f · br

r ∈R

bf

, ∀n ∈ V, ∀ f ∈ F

(3)

The total of the server at this time can be expressed as: pn =  energy consumption    n  ps · min 1, pr, f + psw (4) f ∈F r ∈R

f ∈F

The processing delay of the VNF is related to whether it is deployed on the server n. Therefore, the processing delay of the VNF can be expressed as: ⎧ ⎨

Ts = ts · min 1, ⎩



pr,n f

f ∈F r ∈R

⎫ ⎬ ⎭

(5)

The server’s energy consumption and processing delay are normalized, and the weighted sum is used to obtain the server’s deployment overhead. This overhead can be expressed as: Cn = a ·

pn Ts +b· pmax Tmax

(6)

3.2 Cost Model of Link The utilization of physical links can be expressed as:  BUl =

r ∈R

chrn f mg · f lrnml · br , ∀l ∈ L , ∀ f ∈ F Cl

(7)

The energy consumption of a physical link includes the power consumption of the startup and the energy consumption when transmitting the data. Therefore, the total energy of the physical link can be expressed as: ⎧ ⎨

pla = pl · min 1, ⎩



f ∈F r ∈R

chrn f mg · wrnml

⎫ ⎬ ⎭

+ ( plt − pl ) · BUl

(8)

The physical link transmission delay is related to whether the link transmits user traffic. The transmission delay of the link can be expressed as:

SFC Orchestration Method Based on Energy Saving …

⎧ ⎨

Tl = tl · min 1, ⎩



351

chrn f mg · wrnml

f ∈F r ∈R

⎫ ⎬ ⎭

(9)

Normalize the energy consumption and delay of the link and then weight the sum to get the total cost of the physical link. The indicator can be expressed as: Cl = a ·

pla Tl +b· pmax Tmax

(10)

Adding the cost values of all nodes and links in the NFV network is to obtain the total cost of the network. The cost value can be expressed as: Call =



Cn +

n∈V



Cl

(11)

l∈L

3.3 Restrictions In order to simplify the algorithm design, this paper describes the VNF placement and routing algorithm for energy saving and QoS guarantee as the optimization problem model. The constraints of this model are as follows: First, when mapping virtual links, this paper needs to guarantee the flow direction of traffic, so it is assumed that there are two virtual VNF nodes on the service function chain r: V0 and V1 . The traffic on the service function chain should satisfy the flow from a to b. Therefore, the link constraint relationship can be expressed as:

C1:



f lrn f mg −

m∈V,g∈ fr

m∈V,g∈ fr

f lrn f mg

⎧ ⎪ ⎨ 1, f = V0 = −1, f = V1 ⎪ ⎩ 0, else

(12)

This article assumes that an SFC cannot be decomposed into two physical links, that is, each VNF in any SFC can only be mapped to multiple servers: C2:



pr,n f = 1, ∀ f ∈ Fr , ∀r ∈ R

(13)

n∈V

In order to ensure that the VNF in the SFC must follow the processing order in the SFC, the following constraints should be met: C3:

m,n∈V

f lrn f mg = G rf g , ∀ f, g ∈ Fr , ∀r ∈ R

(14)

352

Z. Wu et al.

In addition, the VNF is placed to meet the load capacity constraints of the server and link. That is, the total number of CPUs required for all VNFs deployed on the server must not exceed the number of CPUs of the server, and the bandwidth consumed by the physical link must not exceed the maximum bandwidth of the link. C4: C5:





N nf · c f ≤ Cv , ∀n ∈ V

(15)

f lrn f mg · wrmnl ≤ Cl , ∀n, m ∈ V

(16)

f ∈F

r ∈R

4 Hybrid Genetic Algorithm The detailed execution steps of the improved genetic algorithm are as follows. Step 1: Initialize the underlying network resources and read the SFC requested by the user. Step 2: Arrange the multiple SFCs in sequence to determine whether there is still no mapping of the SFC. If yes, continue to perform the following operations and vice versa. Step 3: Calculate the fitness function values of all individuals in the population, and select several individuals with the best fitness value as the parent individuals. Step 4: Perform mutation and crossover operations on the parent individuals, and conduct feasibility tests on the newly obtained individuals. Step 5: Perform a simplex algorithm on the resulting new generation of individuals. Step 6: Determine whether the number of iterations reaches the maximum number of iterations, or the range of functional fitness values of the best individuals for five consecutive generations is in the range of 0.001. If the above conditions are met, the program is terminated, otherwise, the process returns to step 3.

5 Simulation and Performance Analysis 5.1 Simulation Result Analysis The algorithm test proposed in this paper runs on a PC equipped with Intel (R) Core i75500 2.40 and 8 GB memory. The algorithm program runs simulation with MATLAB software. The network topology used by the test algorithm consists of 13 nodes and 21 links composition. This article assumes that in the underlying physical network, the maximum bandwidth of each physical link is 1000 Mbps, and the number of CPU cores per server node is 16. This paper also assumes that the bandwidth of all SFC requests is evenly distributed over the range of (10, 50 Mbps).

SFC Orchestration Method Based on Energy Saving …

353

Figure 1 depicts the total cost of the NFV network for the three algorithms when deploying different SFCs. Figure 1 shows that as the number of SFC requests increases (the proportion of node energy consumption to total energy consumption increases), the total cost of the network increases, but the mapping scheme solved by the hybrid genetic algorithm designed in this paper is obviously better than the random algorithm. Compared with the node-link mapping algorithm, the hybrid genetic algorithm has a shorter delay. Compared with the link-node mapping algorithm, the algorithm has higher CPU utilization, so the algorithm designed in this paper is less overhead. Figure 2 depicts the network energy consumption of the three algorithms when mapping a different number of service function chains. With the increase of the number of SFC requests, the energy consumption of the deployment schemes of the three algorithms is increasing, but the algorithm designed in this paper is obviously better than the two random algorithms. The reason for the analysis is as follows: When the hybrid genetic algorithm maps the virtual link of the SFC, it maps according to the shortest path between the nodes. Therefore, the algorithm designed in this paper can effectively reduce the network energy consumption. Figure 3 depicts the average delay of the SFC for the three algorithms when mapping different numbers of service function chains. The average delay of the mapping scheme solved by the algorithm designed in this paper is between the nodelink mapping algorithm and the link-node mapping algorithm. The reason for the analysis is as follows: In order to improve the sharing rate of VNF, the algorithm designed in this paper uses genetic algorithm to encode the mapping when mapping

Fig. 1 Cost of network

354

Z. Wu et al.

Fig. 2 Network energy consumption

Fig. 3 Network average delay

VNF, so the mapping path from the source to the destination may not be the shortest path. Figure 4 depicts the mapping success rate of the three algorithms when deploying different numbers of SFCs. When the number of SFCs requesting mapping is small,

SFC Orchestration Method Based on Energy Saving …

355

Fig. 4 SFC mapping success rate

the idle resources of the NFV network are relatively sufficient, so the mapping success rate of the three is relatively high. As the number of SFCs requesting mapping increases, the acceptance rate of both random and hybrid genetic algorithms decreases to a different extent, but the acceptance rate of hybrid genetic algorithms decreases more slowly, and when mapping the same number of SFCs, mixed inheritance the algorithm has a higher mapping success rate, so the algorithm designed in this paper can satisfy more SFC request mapping.

6 Conclusion This paper first establishes a multi-objective optimization model, which is designed for the model. A hybrid algorithm combining genetic algorithm and simplex method is designed. The simulation results show that the algorithm first uses the genetic algorithm to expand the feasible solution range, and then uses the simplex method to optimize the individuals in the population. Compared with the random mapping algorithm, the proposed algorithm has great advantages in energy saving and service quality. Acknowledgements This work was supported by the science and technology project of Guangdong power grid (036000KK52160025).

356

Z. Wu et al.

References 1. Marotta, A., D’Andreagiovanni, F., Kassler, A., Zola, E.: On the energy cost of robustness for green virtual network function placement in 5G virtualized infrastructures. Comput. Netw. 125, 64–75 (2017) 2. Shojafar, M., Cordeschi, N., Baccarelli, E.: Energy-efficient adaptive resource management for real-time vehicular cloud services. IEEE Trans. Cloud Comput. to be published 3. Ghaznavi, M., Shahriar, N., Kamali, S., Ahmed, R., Boutaba, R.: Distributed service function chaining. IEEE J. Sel. Areas Commun. 35(11), 2479–2489 (2017) 4. Tang, M., Pan, S.: A hybrid genetic algorithm for the energy-efficient virtual machine placement problem in data centers. Neural Process. Lett. 41(2), 211–221 (2015) 5. Jiang, J. W., Lan, T., Ha, S., Chen, M., Chiang, M.: Joint VM placement and routing for data center traffic engineering. In: Proceeding of IEEE INFOCOM, pp. 2876–2880 (2012) 6. Bhamare, D., Samaka, M., Erbad, A., et al.: Optimal virtual network function placement in multi-cloud service function chaining architecture. Comput. Commun. 102, 1–16 (2017)

Predict Oil Production with LSTM Neural Network Chao Yan, Yishi Qiu, and Yongqiong Zhu

Abstract The oil is called as the industrial blood. For one oil well, its oil production is a wavelike process. It can be modeled as a time series data. During the whole life cycle for one well, it can have several similar stages. Meanwhile, the oil wells in the same oilfield may share similar production processes. However, these two similarities are hard to be accurately described by a mathematical formula. Therefore, in this paper, we use LSTM which is a kind of deep learning model to learn the oil production characteristics from the existed wells and predict the new oil well’s production behavior. With the real oil well production data from DaGang Oilfield in Hebei Province of China, two experiments are implemented. One experiment uses one well’s previous production data to predict its future, while the other experiment uses different oil wells from the same oilfield to predict another individual oil well’s production. The results show that the LSTM is able to get satisfactory prediction output. Keywords Oil well · Production prediction · LSTM

1 Introduction Accurately predicting the oil wells’ production is a very meaningful work, which can help oilfield technicians to formulate and adjust development plans more efficiently. In oilfield production process, there are multiple factors, such as monthly production capacity, oil recovery rate, and water cut, to help predict the production of oilfield. Researchers have adopted different methods to predict oilfield production. Zhou et al. [1] proposed an oil and gas field production predicting model based on the two C. Yan (B) China University of Geoscience, Wuhan, China e-mail: [email protected] Y. Qiu Chapelgate Christian Academy, Marriottsville, MD, USA Y. Zhu Wuhan Business University, Wuhan, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_34

357

358

C. Yan et al.

mathematical models of Hubbert’s prediction and generalized Weng’s prediction. Pang and Tang [2] introduced a mathematical model of von Bertalanffy. In addition, Ren et al. [3] combined the changes in oilfield production, using multiple linear regression analysis and time series prediction to establish a dynamic oil and gas field production prediction model. Similarly, the water drive curve is also a very important factor for the prediction of oilfield. Liu et al. [4] established a new development index prediction model suitable for the combination of the C-type water flooding curve and the index prediction in the period of the declining stage of the oil and gas field. As the oilfield would inevitably enter a declining period, Yao et al. [5] proposed to use the yield reduction method and water flooding curve to evaluate the remaining recoverable reserves. In the early forecasting of oilfield production prediction methods, Chen et al. [6] proposed to use the logistic model to predict various development indicators such as production and recoverable reserves in oil and gas fields. Li [7] took a block as an example, making use of four types of water drive curve to study the relationship between cumulative oil production and the water content. Then, different results and trials were derived, which can make an evaluation for the actual development of the oilfield. Through comprehensive prediction model and water drive curve, the relationship between the water content and oilfield actual development time can be successfully established, which can predict various development index of oilfield [8]. Since the traditional methods are concerning about the curve fitting and limited factors modeling, the prediction results are not very satisfactory. Therefore, Yang [9] proposed a method using a multiinput convolutional neural network based on AlexNet. Baku [10] built a multilayer perceptron artificial neural network to predict oil production. To solve the problem for many methods that oilfield production prediction results lacking enough accuracy and integrity, this paper proposes to apply long short-term memory neural network to predict the oil well production.

2 Method As mentioned above, the oil wells in the same oilfield may share similar production process. One example shows such production type’s characteristics of oil wells in one oilfield, in which 46 oil wells in one oilfield are divided into many types. Three of them are chosen to demonstrate their oil production characteristics. Figure 1 shows the first type that goes through a normal high output progress, a minor high output progress and a regular wavelike progress within a certain range. Figure 2 shows the second type with the process that goes from initial high-yield fluctuation to volatility decline. Figure 3 shows the third type with several shutdown periods. According to the observations above, it is reasonable to use time series data prediction model to predict one well’s future production. In this paper, the long shortterm memory neural network is proposed to deal with prediction of oil wells. This method is capable of accurately predicting the complex nonlinear, non-stationary, and non-seasonal oilfield production data over a long period.

Predict Oil Production with LSTM Neural Network

359

Fig. 1 Regular type for one oil well

Fig. 2 Volatile type for one oil well

2.1 Long Short-Term Memory Neural Network The LSTM neural network is improved based on the RNN neural network where longterm dependencies are inaccessible to existing architectures because backpropagated error either blows up or decays exponentially. The LSTM works in a special way to

360

C. Yan et al.

Fig. 3 Shutdown type for one oil well

determine keeping or updating the memory. The data flowing through a memory cell needs the following processing (Fig. 4). Given an input time series x = {x1 , x2 , . . . , xt }, the LSTM converts input time series into one output time sequences h = {h1 , h2 , …, ht } iteratively by updating the states of memory cells with the following procedure. For the input x t and the last time output of the cell ht −1 . i. Computing f t to decide what information to throw away from the old cell state by the “forget gate.”

f t = σ (W f · [h t−1 , xt ] + b f ) Fig. 4 Architecture of LSTM memory block

(1)

Predict Oil Production with LSTM Neural Network

361

A sigmoid function controls cell state according to x t and ht −1 . 0 represents completely ignoring, while 1 represents keeping. ii. it and C t decide what new information to store in the cell state C t . Cell state updating needs the input gate layer and a candidate. i t = o(Wi · [h t−1 , xt ] + bi )

(2)

  Cˆ t = tan h(WC · h t−1 , xt + bc )

(3)

Combining the old cell state C t −1 , the input part from input gate and updating candidate part are all used to generate new cell state by Ct = f t ∗ Ct−1 + i t ∗ Cˆ t

(4)

iii. ot decides what to output Based on the new cell state, a post process is implemented. First to decide what to output, ot = σ (Wo · [h t−1 , xt ] + bo )

(5)

and then prepare the ht for next cell computing. h t = ot ∗ tan h(Ct )

(6)

3 Experiment The data used in this experiment is derived from the real data of a complex block reservoir in Hebei, China. This data is directly measured by oilfield instruments. There are total 46 wells. However, this data contains redundant, missing, and abnormal data. Therefore, the data must be cleaned and improved for the experiment.

3.1 Single Oil Well Prediction The experiment dataset used comes from a sample well belonging to the regular type shown in Fig. 1. The training data is separated from the top 80% of the sample, while the rest 20% is used as testing data. It can also be great to scale the data to the range of 0–1 while using sigmoid activation function. In this experiment, as shown in Fig. 5, for univariate prediction, every ten of previous time steps (From t − 9 to t) is used

362

C. Yan et al.

Fig. 5 Single well prediction result

as input variables to predict the next time step (t + 1). After that, the input moves forward by one step and uses the next 10 variables (From t − 8 to t + 1) to predict the next step t + 2, and repeat the prediction until reaching the end of the testing data. Figure 5 presents the training and prediction result. The green line is the prediction value, the blue line is the true value, and the yellow line is the training value. The testing MSE is 0.0022. The difference is small, which means that LSTM could effectively predict the exact value and changing trend of the prediction. However, the prediction distance is very short. In practice, we hope to predict long-term value for the oil production as soon as possible.

3.2 Relative Well Prediction In this experiment, different oil wells of the same type are used to predict one oil well’s production curve. The dataset consists of four wells in the shutdown type. Three wells’ production data is used as training, while the rest well is used for testing. The experiment process is similar to the single well prediction. Figure 6 presents the training and prediction result. The three black lines distinguish three training wells and one testing well. The green line is the prediction value, the blue line is the true value, and the yellow line is the training value. The testing MSE is 0.0014. Therefore, using similar types of the same oilfield to predict another production well can also be very accurate.

Predict Oil Production with LSTM Neural Network

363

Fig. 6 Relative well prediction result

4 Conclusion Oil production curve is like a wave line, which cannot be illustrated by mathematical formula. LSTM is applied to figure out this problem. It can convert oil production process into time series data. One well’s history can be used to predict its future production process. Besides, there is a correlation between similar oil wells. So, predicting experiment between similar wells within the same type is implemented, which can get good results and high performance. The data collection is limited within 46 wells. When the training data increases, the prediction accuracy can be improved further.

References 1. Zhou, Y., Zhou, F.J., Feng, L.Y.: A new model for predicting oil and gas production. Pet. Geol. Oilfield Dev. Daqing 37(05), 76–80 (2018) 2. Pang, M.Y., Tang, H.: Von bertalanffy mathematical model for predicting oil field cumulative production. China Sci. Pap. 12(21), 2487–2491 (2017) 3. Ren, F.L., Ren, S.D., Li, J.J.: Prediction of oil production based on linear regression method and time series method. Henan Sci. 36(06), 817–822 (2018) 4. Liu, Y.K., Bi, Y.B., Sui, X.G., Wu, X.H.: The development index prediction when oilfield coming into declining stage. Gas Ind. 03, 100–102 (2007) 5. Yao, L.L., Xiong, Y., Luo, B., Ge, F.: The practical method on recoverable reserves when oilfield coming into declining stage. West China Explor. Eng. 10, 83–85 (2017) 6. Chen, Y.Q., Hu, J.G., Zhang, D.J.: The derivation and autoregression of logistic model. Xinjiang Pet. Geol. 02, 150–155 (1996)

364

C. Yan et al.

7. Li, Z.C.: The dynamic prediction on oilfield based on water driving curve. Neijiang Sci. 39(06), 79–81 (2018) 8. Lu, J.Z.: The prediction method on oilfield’s yearly production and water cut. Pet. Geol. Oilfield Dev. Daqing 04, 62–65 (2007) 9. Energy-Oil and Gas Research; Studies from Petroleum University of Technology Further Understanding of Oil and Gas Research (Development of Robust Surrogate Model for Economic Performance Prediction of Oil Reservoir Production Under Waterflooding Process). Energy Weekly News (2019) 10. Leyla, M.: Neural networks for prediction of oil production. IFAC Pap. Line 51(30) (2018)

Improved Fatigue Detection Using Eye State Recognition with HOG-LBP Bin Huang, Renwen Chen, Wang Xu, Qinbang Zhou, and Xu Wang

Abstract Fatigue driving is one of the main factors in traffic accidents. Many driver fatigue alert systems have been developed to prevent fatal car accidents. Existing fatigue detection methods using image processing usually fail in face of illumination and occlusion variations. In this paper, we propose a novel fatigue detection method using eye state recognition with HOG-LBP fused features. Our method first proposes HOG-LBP fusion schemes to combine the advantages of HOG and LBP features. Taking concatenated or additive fused feature as input, we design deep neural networks and train the model on CEW eye dataset for eye state recognition. We give an in-depth analysis to select the optimal fused coefficient for the best model. Based on eye state prediction results, we extract two eye-related features and design a decision criterion for fatigue detection. Experimental results prove the feasibility of the proposed method in detecting drowsiness level at different driving conditions. Keywords Fatigue detection · HOG-LBP fused feature · Additive fusion · Eye state recognition

1 Introduction With the development of modern transportation and the rapid increase of vehicle conservation, traffic accidents occur more and more frequently. Statistical results have shown that most of them are related to fatigue driving [1, 2]. Therefore, it is vital important to develop a robust and accurate fatigue detection system. Fatigue detection has many research results in recent years. Generally speaking, fatigue detection methods can be grouped into three categories [3]: vehicle operating status measurements [4, 5], physiological-based methods [6, 7] and physical-based methods [8–11]. Friedrichs et al. [4] extracted 11 fatigue features based on steering wheel angle and vehicle lane position and explored several fatigue classifiers. B. Huang (B) · R. Chen · W. Xu · Q. Zhou · X. Wang Nanjing University of Aeronautics and Astronautics, 210016 Nanjing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_35

365

366

B. Huang et al.

Physiological-based methods [6] measure drowsiness level based on driver’s physiological signals, including EEG, ECG and EOG. Physical-based methods involve eye, mouth and head pose estimation. Eye movement is the most relevant feature to fatigue. Wierwille et al. [8] captured eye information by using infrared camera and extracted eye movement parameters, such as percentage of eyelid closure time (PERCLOS), average eye closure speed (AECS). Eriksson et al. [9] developed an eye localizing and tracking system for fatigue detection. They used symmetrical information of the face to locate the position of the face and eye and then recognized eye state using template matching. Singh et al. [10] proposed gray template to locate pupil. If their system monitored that eye closure time lasts more than 5 s, it would judge the driver under fatigue state. Smith et al. [11] estimated head pose and facial features through global motion estimation and color statistics and extracted eye- and mouth-related features to recognize drowsiness related states. These methods are real time and non-invasive by using intelligent image processing and machine learning. However, there are still some techniques limitations. The performance of these methods is easily influenced by illumination variation. Besides, many methods do not work when they come to eye images with severe occlusion. In this paper, we propose an improved fatigue detection algorithm using eye state recognition with HOG-LBP fused feature. We give two fusion schedules of HOG and LBP features and construct deep neural networks for eye state recognition. HOG-LBP fused feature makes our model robust to illumination variation and partial occlusion. Based on rather accurate results of eye state recognition, we extract two fatiguerelated features, e.g., PERCLOS and blink rate. Experimental results demonstrate that our method performs better in different driving conditions. The rest of the paper is organized as follows. Section 2 presents the fusion process of HOG and LBP features and designs deep neural networks for eye state recognition. Experiments on eye state recognition and fatigue detection in real driving environment are the topic for Sect. 3. Finally, some conclusions and future work are arranged in Sect. 4.

2 The Proposed Method 2.1 Eye State Recognition Based on HOG-LBP Fused Feature This section introduces eye state recognition method using HOG-LBP fused features. We give a brief description of LBP and HOG and then propose two fusion schemes. Besides, we describe the structure of deep neural networks to eye state recognition. Local Binary Pattern Ojala et al. [12] first utilized local binary pattern (LBP) to extract local texture with classification. It has important properties such as rotation invariance and illumination

Improved Fatigue Detection Using Eye State Recognition …

367

invariance. The original LBP is computed at a sliding window centered at each pixel. In this window, the center pixel is regarded as threshold with other neighborhood pixels. If neighborhood pixel is lesser or larger than center pixel, it is assigned 0 or 1, respectively. Therefore, LBP at a center pixel can be defined as: LBP RP ((xc , yc ))  f (x) =

=

P−1 

2i f ( ji − jc )

(1)

i=0

1, x ≥ 0 0, otherwise

(2)

where (xc , yc ) indicates the coordinate of center pixel, and R is radius of circle LBP. P is the total number of sample pixels. ji and jc are pixel values of neighborhood pixel and center pixel, respectively. After construction of LBP responses, the LBP feature descriptor is formed by a histogram of LBP responses. Figure 1 shows LBP responses of open and closed eye images. LBP features in rows 2 and 3 are calculated with R at 4 and 8, respectively. It can be seen that the smaller the radius R is, the more detailed representation the eye contour obtains. Histogram of Oriented Gradient Histogram of Oriented Gradient (HOG) was proposed by Navneet et al. [13]. It computes density distribution of gradient direction to describe the appearance and

Fig. 1 LBP responses with different radiuses

368

B. Huang et al.

Fig. 2 Visualizations of eye images under different lighting conditions

shape of an image. Concretely, the image is divided into same cells, then all pixels in each cell calculates histogram of oriented gradient and all gradient histograms are concatenated to HOG descriptor, which is robust to illumination. Figure 2 presents visualizations of HOG feature. We find that there are few changes of HOG features under different lighting conditions. HOG-LBP Fused Feature Extraction Both HOG and LBP can represent eye images well, but each has its own focus. HOG shows more information of pupil and eyelid because these regions have large gradients, while LBP pays more attention to local context information. Therefore, we consider to combine HOG and LBP in a reasonable way. The fused feature can be more robust and improve the performance of eye state recognition. For HOG-LBP fused feature, we propose concatenated fusion and additive fusion. We use g and p to indicate HOG and LBP descriptors of an eye image I. Then concatenated fusion feature F fused is written as follow: Ffused (I ) = [g, p]

(3)

Here [·] indicates concatenated combination of two vectors. The process of concatenated fusion is shown in Fig. 3. As for additive fusion, F fused is formulated as: Ffused (I ) = αg + (1 − α) p

(4)

where α is fused coefficient, whose value is in the interval [0, 1]. In order to combine HOG and LBP successfully, both of them should have the same dimension. We employ t-SNE mapping HOG and LBP features to 64-dimensional vectors. In Sect. 3.1, a series of comparative experiments are conducted to choose the optimal α for eye state recognition.

Improved Fatigue Detection Using Eye State Recognition …

369

HOG feature

HOG-LBP fused feature LBP feature Fig. 3 Combined HOG and LBP features using concentrated fusion

Model Structure In this section, we describe deep neural networks for eye state recognition using HOG-LBP fused feature. Given an input Ffused (I ) of eye image, the eye state recognition is to learn a hypothesis H, which outputs the corresponding eye state y∈{0, 1} as follows: H: y ← Ffused (I )

(5)

Specifically, H consists of n hidden layers as a powerful classifier, which is formulated as: H(Ffused (I )) = h n (h n−1 (· · · (h 1 (Ffused (I ))))) ≡ y

(6)

h i (ai−1 ) = σ (Wi ai−1 + bi ) ≡ ai , a0 = Ffused (I )

(7)

Where H = {h1 , h2 , … hn } hi indicates i-th layer with learnable parameters W i , bi and outputs the feature representation ai . σ is activation function using ReLU for the first n−1 layers and Softmax for the output layer. We apply cross-entropy as our loss function. To prevent overfitting, we use dropout [14] and weight decay. Dropout can train and evaluate a bagged ensemble of exponentially many neural networks. Weight decay can decrease some measure of the size of the parameters.

2.2 Drowsiness Evaluation Method Once we have accurate results of eye state recognition, we would detect driver drowsiness based on them. We evaluate drowsiness level using two fatigue parameters, i.e., PERCLOS and blink rate f br . PERCLOS: The testing images are continuous frames captured by camera. We use close frames m of a time window to replace close time. PERCLOS can be formally

370

B. Huang et al.

expressed as: PERCLOS =

m M

(8)

Where M is the total number of face samples. According to work of [15], PERCLOS increases significantly when drivers are under fatigue state. Here, we set threshold of PERCLOS to 0.2. F br : Similar to measurement method of PERCLOS, F br is the ratio of blink frames to total frames in a period time. It can be written as f br =

a T

(9)

Where a denotes the number of blinks, and T is constant time window. Lenskiy and Lee [16] demonstrated by experiments that F br becomes larger during fatigue driving. The threshold of F br set to 0.33 in our experiment. We propose a comprehensive fatigue detection method based on the two eyerelated benchmarks. We give the measure criterion about fatigue or non-fatigue in Eq. (10). 

fatigue, (PERCLOS ≥ 0.2)||( f br > 0.33) non − fatigue, otherwise

(10)

3 Experiment In this section, we conduct several experiments to demonstrate the efficiency and accuracy of HOG-LBP fused feature for eye state recognition. Then we detect fatigue level on our own drivers’ video at different driving conditions.

3.1 Evaluating Improvement of HOG-LBP In this experiment, there are 4846 gray eye images with different eye state in CEW eye dataset. Figure 4 shows open and close eye images with resolution of 48 × 48. We randomly choose 800 open and close eye images for testing. The remaining are split into training and validation sets with a rate of 4:1. Our model consists of 512, 256, 128, 32 and 2 neurons for each layer. As for training our model with different fusion methods, we use stochastic gradient descent with mini-batch combined with a momentum of 0.99. The initial learning rate is 0.001 for 30 epochs and we reduce learning rate by 0.1 for the next 20 epochs.

Improved Fatigue Detection Using Eye State Recognition …

371

Fig. 4 Open and close eye images. Samples have glasses and eyelash occluded. They might vary on different poses and illuminations

First, we train our model with concatenated HOG-LBP feature. Figure 5 gives loss and accuracy on training and validation set. The trend of loss curves between training validation sets is basically similar, which can prove that this model can effectively train parameters without overfitting. The classification accuracy on testing set is 90.56%. To examine additive fusion for HOG-LBP feature, we compare different models with different fused coefficient α using the same implement. The loss and accuracy of these models are recorded in Table 1. It clearly shows that classification accuracy

Fig. 5 Loss and accuracy of eye state recognition using concatenated HOG-LBP feature

372

B. Huang et al.

Table 1 Results of eye state recognition with additive fusion Fused coefficient (α)

Training set

Testing set

Loss

Accuracy (%)

Loss

Accuracy (%)

0

0.3617

0.1

0.3509

84.83

0.3340

86.32

85.72

0.3280

0.2

87.04

0.3133

87.05

0.2816

89.26

0.3

0.2500

90.70

0.2611

89.88

0.4

0.2227

91.69

0.2455

90.62

0.5

0.2204

92.24

0.2514

90.86

0.6

0.2159

92.06

0.2578

90.99

0.7

0.1921

93.08

0.2675

90.99

0.8

0.1889

93.42

0.2498

91.23

0.9

0.1848

93.08

0.2769

91.73

1

0.2025

92.56

0.2546

90.88

increases as α varies from 0 to 1. Further observed in Table 1, classification accuracy of single feature (HOG or LBP) is lower than that of fused feature when α equals to [0.6, 0.7, 0.8, 0.9]. This demonstrates the validity of HOG-LBP fused feature for eye state recognition. When α is 0.9, classification accuracy is highest, which is up to 91.73%. Compared with the two fusion method, we find additive fusion is better when fused coefficient α = 0.9.

3.2 Experiments on Fatigue Detection Based on eye state recognition, we utilize measurement method to fatigue detection. There are five people in our fatigue experiment. They are informed to driver with or without glasses in day or night time. Tables 2, 3, 4 and 5 record results of fatigue detection in different driving conditions. We find that our method with HOGLBP fused feature can work in real driving conditions. It can be observed that the Table 2 Results of fatigue detection in daytime without glasses Person

PERCLOS

f br

Prediction

Gt

A

0.08

0.12

NF

NF

B

0.25

0.31

F

F

C

0.12

0.21

NF

NF

D

0.32

0.41

F

F

E

0.18

0.36

F

F

“Gt” denotes ground-truth label. “NF” and “F” indicate non-fatigue and fatigue, respectively

Improved Fatigue Detection Using Eye State Recognition …

373

Table 3 Results of fatigue detection in daytime with glasses Person

PERCLOS

f br

Prediction

Gt

A

0.45

0.48

F

F

B

0.61

0.56

F

F

C

0.16

0.27

NF

F

D

0.37

0.39

F

F

E

0.15

0.25

NF

NF

Table 4 Result of fatigue detection in nighttime without glasses Person

PERCLOS

f br

Prediction

Gt

A

0.13

0.19

NF

NF

B

0.19

0.37

F

F

C

0.36

0.54

F

F

D

0.07

0.18

NF

NF

E

0.25

0.29

F

F

Table 5 Results of fatigue detection in nighttime with glasses Person

PERCLOS

f br

Prediction

Gt

A

0.24

0.25

F

NF

B

0.06

0.17

NF

NF

C

0.61

0.66

F

F

D

0.11

0.23

NF

NF

E

0.07

0.14

NF

NF

accuracy of fatigue detection would drop with glasses occlusion from Tables 2 and Table 3. Besides, our method is robust to illumination variation through comparison of Tables 2 and 3 when detecting fatigue level in day or night time.

4 Conclusion We have proposed an improved fatigue detection algorithm based on eye state recognition with HOG-LBP fused feature. We provide two fusion schedules of HOG and LBP features and construct deep neural networks for eye state recognition. The HOG-LBP fused feature makes our model robust to illumination variation and partial occlusion. After predicting eye state, we extract two fatigue-related features and experimental results demonstrate our method performs well in different driving

374

B. Huang et al.

conditions. However, some limitations for the proposed method need to be noticed. We would explore multi-visual cues including eye, mouth and head pose to fatigue detection for our future work. Acknowledgements This work was funded by a project that partially funded by National Science Foundation of China (51675265) and the Priority Academic Program Development of Jiangsu Higher Education Institutions (PAPD). The authors gratefully acknowledge this support.

References 1. Bergasa, L., Nuevo, J., Sotelo, M., et al.: Real-time system for monitoring driver vigilance. IEEE Trans. Intell. Transp. Syst. 7, 63–77 (2006) 2. Wheaton, G., Shults, R.: Drowsy driving and risk behaviors 10 states and Puerto Rico. MMWR Morb. Mortal. Wkly Rep. 63(26), 557–562 (2014) 3. Qing, W., Bingxi, S., Bin, X. et al.: A perclos-based driver fatigue recognition application for smart vehicle space. In: Information Processing (ISIP), 2010 Third International Symposium on, pp. 437–441 (2010) 4. Friedrichs, F., Yang, B.: Drowsiness monitoring by steering and lane data based features under real driving conditions. In: European Signal Processing Conference, pp. 209–213 (2010) 5. Rogado, E., Garcia, L., Barea, R. et al.: Driver fatigue detection system. In: Robotics and Biomimetics, 2008. ROBIO 2008. IEEE International Conference on, pp. 1105–1110 (2009) 6. Jap, B.T., Lal, S., Fischer, P., et al.: Using EEG spectral components to assess algorithms for detecting fatigue. Expert Syst. Appl. 36(2), 2352–2359 (2009) 7. Patel, M., Lal, S.K.L., Kavanagh, D., et al.: Applying neural network analysis on heart rate variability data to assess driver fatigue. Expert Syst. Appl. 38(6), 7235–7242 (2011) 8. Wierwille, W.W., Wregget, S., Kirn, C. et al.: Research on vehicle-based driver status/performance monitoring: Development validation and refinement of algorithms for detection of driver drowsiness. In: National Highway Traffice Safety Administration Final Report (1994) 9. Eriksson, M., Nikolaos, P.P.: Eye-tracking for detection of driver fatigue. In: IEEE Conference on Intelligent Transportation System, pp. 314–319 (1997) 10. Singh, S., Nikolaos, P.P.: Monitoring driver fatigue using facial analysis techniques. In: Proceedings 199 IEEE/IEEJ/JSAI International Conference on Intelligent Transportation Systems (Cat. No. 99TH8383), pp. 314–318 (1999) 11. Smith, P., Shah, M., Lobo, N.D.: Monitoring head/eye motion for driver alertness with one camera. In: Proceedings 15th International Conference on Pattern Recognition (2000) 12. Ojala, T., Pietikainen, M., Harwood, D.: A comparative study of texture measures with classification based on featured distributions. Pattern Recogn. 29(1), 51–59 (1996) 13. Dalal, N., Triggs, B.: Histograms of oriented gradients for human detection. In: 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR), vol. 1, pp. 886–893 (2005) 14. Srivastava, N., Hinton, G., Krizhevsky, A., et al.: Dropout: a simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 15(1), 1929–1958 (2014) 15. Dong, Y., Hu, Z., Uchimura, K., et al.: Driver inattention monitoring system for intelligent vehicles: a review. IEEE Trans. Intell. Transp. Syst. 12(2), 596–614 (2011) 16. Lenskiy, A.A., Lee, J.: Driver’s eye blinking detection using novel color and texture segmentation algorithms. Int. J. Control Autom. Syst. 10(2), 317–327 (2012)

Portrait Style Transfer with Generative Adversarial Networks Qingyun Liu, Feng Zhang, Mugang Lin, and Ying Wang

Abstract Portrait style transfer is a hot and practical direction for in-depth learning. As a deep learning model, Generative Adversarial Networks (GANs) have been widely used in image style conversion. We study Generative Adversarial Networks as a solution to the portrait style transfer problem. Here, we use GANs to recognize facial features. With large training in the conversion from plain to cosmetic drawings, this algorithm can make up the plain faces better intelligently. The experimental results provide the representation of facial image features by GANs and show the ability of character transformation and operation of portrait style. Keywords Portrait style transfer · GANs · Loss function · Image style transfer

1 Introduction Since 2016, Deep Neural Networks have been applied to a new field; the motivation of Deep Neural Networks is to build a multi-layer neural network to analyze data [1], with the aim of interpreting data such as images [2–6], sounds, and texts [7–13] by simulating the mechanism of human brain. In the fields of image processing and computer vision, many problems can be considered as “converting” an input image into another [14–17]. We define the problem of portrait-to-portrait conversion as transforming one possible representation of a scene into another. In our work, the loss function is learned by GAN intelligently, while different types of loss functions should be designed for different tasks traditionally. We train our GAN model by inputting a large number of plain and makeup portraits. In the process of iteration, the discriminator which acts as the loss function tries to distinguish real and unreal pictures, while the generator is trained to minimize the loss function. Finally, the generator and discriminator will reach a balanced state. In this way, the image style conversion from pixel-to-pixel level can be realized, and the plain image can be made up intelligently in the test. Q. Liu (B) · F. Zhang · M. Lin · Y. Wang College of Computer Science and Technology, Hengyang Normal University, Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_36

375

376

Q. Liu et al.

2 Related Work Image style transfer with GANs: Usually, the style feature of an image is expressed in some ways, and the texture feature of one image is transferred to another [18–20]. GANs have been widely used in image synthesis and style conversion. Conditional setting-based GAN has also been studied and applied in many previous works [14]. Unlike previous works, we try our best to match the application scenarios of portrait conversion in the selection of generators and discriminators. A “U-Net” generator and a convolutional “PatchGAN” discriminator have been applied to our GAN model, which is used for image conversion at the pixel level. Neural network portrait synthesis: It can be expressed as the classification or regression problem of each pixel [21–24]. Gatys used Gram matrix to represent image style features, which can better render real images into images with a certain artistic style. This method can better express the artistic style and texture features of the image, but it is not accurate enough to express the details of the makeup of the portrait [25]. Chuan Li augments their framework by replacing the bag-of-featurelike statistics of Gram-matrix-matching by an MRF regularizer that maintains local patterns of the “style” exemplar [26].

3 Architecture Auxiliary information y added to the input of D and G by cGAN [27] makes the output of G controllable.Different from the original GAN model, the output of cGAN is random. The optimization goal of cGAN is minG max D V (D, G) = E x∼Pdata [log D(x|y)] + E z∼P z(z) [log(1 − D(G(z|y)))] (1) Under the constraints of conditional picture x, G minimizes this function as much as possible, and D maximizes it as much as possible to reach a balance point.

3.1 Generator The function of the generator is to generate a portrait image that the discriminator considers to be real enough. Our work is to automate makeup for plain-faced portraits. Although the input and output portraits differ in appearance, the overall structure remains unchanged. We design a generator and add many connections to the input symmetry structure to share some low-level information, and this structure is based on U-Net [28] model (Fig. 1).

Portrait Style Transfer with Generative Adversarial Networks

377

Fig. 1 Generator: U-Net with many connections to share low-level information

In the symmetrical generator network structure, the first layer and the N-i layer are connected directly to share feature information between these layers, where N refers to the total number of layers of the network.

3.2 Discriminator In general, the network structure of GAN [29] is not suitable for the image field which requires high-resolution and high-detail preservation. Our research is also based on PatchGAN to design the discriminator. Such discriminator is used to conduce output images with similar sharpness as input images in our work. Generally, GAN only needs to output a vector of real or fake, which represents the evaluation of the whole image; however, PatchGAN outputs a matrix. Each element of the matrix has only two choices: real or fake. Such a discriminator modeled the image as a Markov random field and assumed that the pixels segmented by patch diameter are directly independent of each other [26, 30].

4 Experiments and Discussion This section mainly describes the training results of our GAN, the generation effect, and the comparison with other research results.

4.1 Training for Supervised Learning The GAN of this paper tries to make up for plain portrait through a large number of supervised training of portrait and makeup automatically. To this end, we have processed about 100 sets of plain and cosmetic photographs to form a training set. It takes about one day to train these pictures. The results of the training are shown below (Fig. 2). In terms of the composition of the training set, we try to make the input unadorned and cosmetic photographs consistent in the overall structure of the portrait. Therefore,

378

Q. Liu et al.

1

2

3

1

2

3

Fig. 2 Supervised training for portraits, Input: 1—without makeup, 3—makeup. Output: 2—the picture after training

the main differences between 1 and 3 are facial makeup features, 1 is the input content image, 3 is the input style image, and 2 is the output image. From the output results, 2 and 3 have similar cosmetic features; it is verified that GAN in this paper has basically the ability to make up for unmade portraits under supervised training.

4.2 Cosmetic Ability Test On the basis of the above supervised learning, the following tests are carried out on the generating ability of the model. Among them, 1 is the input of no makeup portrait, 2 is used for comparison of makeup portrait, 2 is not entered into the model, and 3 is our training based on the self-generated makeup map (Fig. 3). From the above test results, 2 has the same cosmetic effect as 3. The test results show that GAN has a basic makeup ability after a lot of training, such as eye shadow, gloss, and lip color.

Portrait Style Transfer with Generative Adversarial Networks

379

1

3

2

Fig. 3 Results of self-makeup test after training

4.3 Comparisons of Cosmetic Ability In addition, the results of our generation are compared with other research results. We use the same unmade portrait to input. In other networks, we use the makeup portrait corresponding to the unmade portrait as the style image to input and get the following test results (Fig. 4). The 3 and 4 methods are all portraits synthesized under the guidance of the specified style map (cosmetic effect). They can add the similar cosmetic effect of the style map to the non-cosmetic portraits. However, we believe that this result can only be achieved on the basis of the corresponding cosmetic effect maps for each portrait. Therefore, it is incomprehensible that this model can intelligently automate the makeup for each portrait. This test result is only a flat between the unadorned portrait and the makeup style maps. Therefore, we believe that they do not have the promotion value of automated makeup. The cosmetic effect of 5 is relatively poor compared with other results. The skin color and background color of the portrait have turned gray. From the understanding of the meaning of cosmetic, this effect is not ideal. We can find that it tries to learn the ability of make-up, but the effect is not ideal. 6 is our test result. Compared with other results, we think our model is slightly better in understanding the meaning of the portrait and the details of the makeup.

5 Conclusion and Future Work For training to generate confrontation networks, we believe that under the guidance of conditional supervised learning, GAN can learn general image conversion ability through a lot of training, such as the ability to automate makeup for unmade portraits in our scene. Compared with the test results of other models in this paper, our model

380

Q. Liu et al.

1

2

3

4

5

6

Fig. 4 Contrast chart of cosmetic ability test, 1 is the original picture of the input of no makeup, 2 is the ideal picture of the effect of makeup, which is not used in our network test and is the input of style chart in other networks. 3 is the output of the GATS method [25], 4 is the test result of CNNMRF method [26], 5 is the test result of MGAN [30], 6 is the test result of our model

is more intelligent in cosmetic ability extension, but due to the insufficient dataset and the model also has some areas to be optimized, the cosmetic ability of the model is still relatively basic, and we need to further optimize our model structure and dataset in the next stage to improve the cosmetic ability and efficiency of our model. Acknowledgements This work is supported by the Hunan Provincial Natural Science Foundation of China (No. 2019JJ40005), the Science and Technology Plan Project of Hunan Province (No. 2016TP1020), the General Scientific Research Fund of Hunan Provincial Education Department (No. 17C0223), the Double First-Class University Project of Hunan Province (No. Xiangjiaotong [2018]469), and Postgraduate Research and Innovation Projects of Hunan Province (No. Xiangjiaotong [2019]248–998). Hengyang guided science and technology projects and application-oriented special disciplines (No. Hengkefa [2018]60–31).

Portrait Style Transfer with Generative Adversarial Networks

381

References 1. Xie, S., Huang, X., Tu, Z.: Top-down learning for structured labeling with convolutional pseudoprior. In: European Conference on Computer Vision, pp. 302–317 (2015) 2. Zhao, H.H., Liu, H.: Multiple classifiers fusion and CNN feature extraction for handwritten digits recognition. Granul. Comput. 1–8 (2019) 3. Zhao, H.H., Rosin, P., Lai, Y.K., Zheng, J.H., Wang, Y.N.: Adaptive gradient-based block compressive sensing with sparsity for noisy images. Multimed. Tools Appl. 1–23 (2019) 4. Buades, A., Coll, B., Morel, J.M.: A non-local algorithm for image denoising. In: CVPR, vol. 2, pp. 60–65 (2005) 5. Denton, E.L., Chintala, S., Fergus, R., et al.: Deep generative image models using a laplacian pyramid of adversarial networks. In: NIPS, pp. 1486–1494 (2015) 6. Tyleˇcek, R.: Spatial pattern templates for recognition of objects with regular structure. In: GCPR, Saarbrucken, Germany (2013) 7. Zhao, H.H., Rosin, P., Lai, Y.K.: Image neural network style transfer with global and local optimization fusion. IEEE Access (2019) 8. Zhao, H., Rosin, P.L., Lai, Y.K.: Automatic semantic style transfer using deep convolutional neural networks and soft masks. Vis. Comput. (2019) 9. Efros, A.A., Freeman, W.T.: Image quilting for texture synthesis and transfer. In: SIGGRAPH, pp. 341–346 (2001) 10. Efros, A.A., Leung, T.K.: Texture synthesis by nonparametric sampling. In: ICCV, vol. 2, pp. 1033–1038 (1999) 11. Gatys, L.A., Ecker, A.S., Bethge, M.: Texture synthesis and the controlled generation of natural stimuli using convolutional neural networks. Preprint at arXiv:1505.07376 (2015) 12. Portilla, J., Simoncelli, E.P.: A parametric texture model based on joint statistics of complex wavelet coefficients. Int. J. Comput. Vis. 40(1), 49–70 (2000) 13. Efros, A.A., Leung, T.K.: Texture synthesis by nonparametric sampling. In: Proceedings of International Conference Computer Vision, Washington, DC, USA (1999) 14. Isola, P., Zhu, J.Y., Zhou, T.H., Efros, A.A.: Image-to-image translation with conditional adversarial networks. In: CVPR (2017) 15. Reinhard, E., Ashikhmin, M., Gooch, B., Shirley, P.: Colortransfer between images. IEEE Comput. Graph. Appl. 21, 34–41 (2001) 16. Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., et al.: Imagenet large scale visual recognition challenge. IJCV 115(3), 211–252 (2015) 17. Zeiler, M.D., Fergus, R.: Visualizing and understanding convolutional networks. In: European Conference on Computer Vision, pp. 818–833 (2014) 18. Zhao, J., Mathieu, M., LeCun, Y.: Energy-based generative adversarial network. Preprint at arXiv:1609.03126 (2016) 19. Zhu, J.Y., Krähenbühl, P., Shechtman, E., Efros, A.A.: Generative visual manipulation on the natural image manifold. In: ECCV (2016) 20. Theis, L., Bethge, M.: Generative image modeling using spatial lstms. Adv. Neural Inf. Process. Syst. 28 (2015) 21. Laffont, P.Y., Ren, Z., Tao, X., Qian, C., Hays, J.: Transient attributes for high-level understanding and editing of outdoor scenes. ACM Trans. Graph. (TOG) 33(4), 149 (2014) 22. Hinton, G.E., Salakhutdinov, R.R.: Reducing the dimensionality of data with neural networks. Science 313(5786), 504–507 (2006) 23. Ioffe, S., Szegedy, C.: Batch normalization: Accelerating deep network training by reducing internal covariate shift. Preprint at arXiv:1502.03167 (2015) 24. Yoo, D., Kim, N., Park, S., Paek, A.S., Kweon, I.S.: Pixel level domain transfer. In: ECCV (2016) 25. Gatys, L.A., Ecker, A.S.: Image style transfer using convolutional neural networks. In: CVPR (2016)

382

Q. Liu et al.

26. Li, C., Wand, M.: Combining markov random fields and convolutional neural networks for image synthesis. Preprint at arXiv:1601.04589 (2016) 27. Radford, A., Metz, L., Chintala, S.: Unsupervised representation learning with deep convolutional generative adversarial networks. Preprint at arXiv:1511.06434 (2015) 28. Ronneberger, O., Fischer, P., Brox, T.: U-net: convolutional networks for biomedical image segmentation. In: MICCAI, pp. 234–241 (2015) 29. Wang, X., Gupta, A.: Generative image modeling using style and structure adversarial networks. In: ECCV (2016) 30. Li, C., Wand, M.: Precomputed real-time texture synthesis with markovian generative adversarial networks. In: ECCV (2016)

Impossible Differential Analysis on 8-Round PRINCE Yaoling Ding, Keting Jia, An Wang, and Ying Shi

Abstract PRINCE is a lightweight block cipher, which was proposed by Borghoff et al. in Asiacrypt 2012. Various cryptanalytic techniques have been employed to evaluate the security of PRINCE. In 2017, Ding et al. constructed a 4-round impossible differential based on some observations on M operation and launched impossible differential attacks on 6- and 7-round PRINCE and the underlying PRINCEcore . In this paper, we explore the differential distribution table (DDT) of the S-box employed in PRINCE and construct a more detailed DDT which contains the input/output values corresponding to each differential. Taking advantage of the table, we compute the subkeys instead of guessing them. With this technique, we extend the impossible differential attacks of PRINCE and PRINCEcore to eight rounds. The corresponding computational and complexities are 2110.7 and 262.26 encryptions, respectively, which are much less than exhaustive search. And the data complexities are 264 and 260 chosen plaintexts, respectively. Keywords PRINCE · Impossible differential · S-box · M operation

1 Introduction Lightweight block ciphers aim to reduce the occupation of resources in hardware implementations, while providing sufficient security. Several lightweight block Y. Ding · A. Wang School of Computer Science, Beijing Institute of Technology, 100081 Beijing, China K. Jia (B) Department of Computer Science and Technology, Tsinghua University, 100084 Beijing, China e-mail: [email protected] A. Wang Key Laboratory of Network Assessment Technology, CAS Institute of Information Engineering, Chinese Academy of Sciences, 100093 Beijing, China Y. Shi State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, 100093 Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_37

383

384

Y. Ding et al.

ciphers have been proposed in the last decades. PRINCE [1] is a representative one. The designers adopt FX construction and α-reflection to achieve the compatibility of encryption and decryption so as to simplify the hardware implementation. Since its publication, PRINCE has attracted numerous cryptanalysis. The designers also organized a PRINCE challenge on Web site [13] to track the best attack and promise cash prizes for winners in order to encourage the cryptanalysis of the cipher. Various cryptanalytic results on PRINCE and the underlying PRINCEcore have been presented. Posteuca et al. [11] introduced integral attacks on 5-round and 6round PRINCE with practical complexity in 2015. After that, Morawiecki [9] presented attacks up to seven rounds relying on integral and higher-order differential cryptanalysis. A boomerang attack was successfully applied to 4-, 5- and 6-round PRINCE by Posteuca et al. [10]. Meet-in-the-middle approach was adopted in [8] and [4] to launch attacks and break up to ten rounds of the cipher. Zhao et al. [14] found that the 5-round and 6-round truncated differential distinguishers and presented an attack on 7-round PRINCEcore using two of them. Till now, the best result on 10round PRINCE is performed using multiple differentials presented by Canteaut et al. [2] in FSE2014. Some new techniques were also introduced to analyse this cipher. A generic technique, named sieve-in-the-middle, was proposed to attack 8-round PRINCE by Canteaut et al. [3]. Soleimany et al. [12] introduced new distinguishers taking advantage of reflection characteristics and provided new design criteria of the selection of α for PRINCE-like ciphers. Recently, impossible differential attacks were adopted to analyse PRINCE. Ding et al. [5] found a property of M operation and constructed a 4-round impossible differential distinguisher. Basing on the distinguisher, they performed impossible differential attacks on 6- and 7-round PRINCE and PRINCEcore . Grassi et al. [6] presented a 4.5-round impossible subspace trail of PRINCE. Our Contributions: Inspired by Jia et al.’s observation on the S-box of Camellia [7], we study the S-box of PRINCE and build a detailed differential distribution table of the S-box which stores the input/output differences and the corresponding values. This table is used to compute the subkeys instead of exhausting all of them. With the help of this technique, we extend the impossible differential attack of PRINCE and PRINCEcore up to 8-round. The time complexity of our attack on PRINCEcore is 262.6 encryptions, and the time complexity of the attack on PRINCE is 2110.7 encryptions. Table 1 summarizes our results compared with the previous impossible differential attacks on PRINCEcore and PRINCE. Organization: The remainder of this paper is organized as follows. In Sect. 2, we give a brief description of PRINCE and the impossible differential distinguisher proposed by Ding et al. Section 2.2 introduces our observations on the S-box of PRINCE. We mount impossible differential attacks on 8-round PRINCEcore in Sect. 4 and PRINCE in Sect. 5. Section 6 concludes this paper. The data complexity is expressed in number of chosen plaintexts, the memory complexity in number of bytes and the time complexity in number of encryptions.

Impossible Differential Analysis on 8-Round PRINCE

385

Table 1 Comparison of our results with the previous impossible differential attacks on PRINCE and PRINCEcore Cipher PRINCEcore

PRINCE

Rounds

Data

Time

Memory

Source

6

242.6

243

230

[5]

7

256

253.8

243

[5]

8

260

262.26

245

Section 4

6

243.1

264

240

[5]

7

255.7

268.9

253

[5]

8

264

2110.7

277

Section 5

2 Preliminaries In this section, we list the notations used in this paper firstly. Then, a brief description of PRINCE is given. Finally, we review the impossible differential distinguisher proposed by Ding et al.

2.1 Notations In this paper, we use the following notations. xi : yi : X [i]: ΔX : ⊕: ≪l: mn:

The input of the (i + 1)-th round, 0 ≤ i < r The output of the (i + 1)-th round, 0 ≤ i < r The i-th nibble of X, 0 ≤ i < 15 The XOR difference of two values, i.e., ΔX = X ⊕ X  Bit-wise XOR Bit rotation to the left by l bits Bit string concatenation of m and n.

2.2 Brief Description of PRINCE PRINCE [1] is a 64-bit block cipher with a key length of 128 bits. It is constructed by a core cipher, named PRINCEcore , and two whitening-key layers with FX construction. PRINCEcore is a 12-round block cipher in substitution-permutation-network (SPN) structure. The encryption process of PRINCE is illustrated in Fig. 1. There is an M operation between the two rounds in the middle. The round functions before and after the M operation are inverse of each other. The details of the three layers in the round function are as follows:

386

Y. Ding et al.

Fig. 1 Encryption process of PRINCE

Key and Constant Addition Layers: The 64-bit state is XORed with the subkey k1 and round constants in this layer. The round constants satisfy the condition RC1 ⊕ RC11−i = α = c0ac29b7c97c50dd, 0 ≤ i ≤ 11. S-box Layer: PRINCE employs a 4-bit S-box in parallel, which is described as S[x] = {B, F, 3, 2, A, C, 9, 1, 6, 7, 8, 0, E, 5, D, 4} in hexadecimal format. Linear Layer: The linear layer is defined as M = S R ◦ M  . SR behaves like the shift row operation of AES. M  denotes a matrix multiplication as well as the matrix for simplification. In fact, M  acts as a diagonal matrices multiplication denoted as 

(0)



(1)



(1)



(0)

(0)





(1)

M  = (M , M , M , M ), in which M and M are 16 × 16 matrices. If we take the state as a 4 × 4 nibble matrix, the four columns of a state are multiplied with (0)



M



or M

(1)

(0)



, respectively. The structures of M ⎛



M

(0)

M0 ⎜ M1 =⎜ ⎝ M2 M3

M1 M2 M3 M0

M2 M3 M0 M1

(1)



and M

are defined as below.

⎞ ⎛ M3 M1 M2 ⎜ M2 M3 (1) M0 ⎟ ⎟, M = ⎜ ⎝ M3 M0 M1 ⎠ M2 M0 M1 

M3 M0 M1 M2

⎞ M0 M1 ⎟ ⎟ M2 ⎠ M3

The four basic matrices are ⎛

⎛ ⎛ ⎛ ⎞ ⎞ ⎞ ⎞ 0000 1000 1000 1000 ⎜ 0100 ⎟ ⎜ 0000 ⎟ ⎜ 0100 ⎟ ⎜ 0100 ⎟ ⎜ ⎜ ⎜ ⎟ ⎟ ⎟ ⎟ M0 = ⎜ ⎝ 0010 ⎠, M1 = ⎝ 0010 ⎠, M2 = ⎝ 0000 ⎠, M3 = ⎝ 0010 ⎠. 0001 0001 0001 0000 Key Schedule: The whole key expansion routine is as follows



k = (k0 k1 ) → k0

k0

k1 := (k0 ||(k0 ≫1) ⊕ (k0  63)||k1 ).

Impossible Differential Analysis on 8-Round PRINCE

387

k0 and k0 are taken as the pre-whitening and post-whitening keys, respectively, and k1 is used in the round function of PRINCEcore .

2.3 The 4-Round Impossible Differential Distinguisher Constructed by Ding et al In [5], Ding et al. construct a 4-round impossible differential distinguisher of (0)



PRINCEcore based on the property of M Observation 1.

(1)



and M

, which is described as 

(0)



(1)

Observation 1 Ding et al. [5] The branch numbers of M and M are four. In the situations that there are two nonzero nibbles in the input and in the output (0)



(1)



of M (M ), respectively, adjacent nibbles (nonzero) in the input will lead to adjacent nibbles (nonzero) in the output, while non-adjacent nibbles (nonzero) in the input will lead to non-adjacent nibbles (nonzero) in the output. That is to say, adjacent nibbles (nonzero) and non-adjacent (nonzero) nibbles cannot lead to each (1)



other through M be adjacent.



(M

(1)

). Here, the first and the fourth nibbles are considered to

Moreover, by exploring the situation of two nonzero nibbles leading to two nonzero nibbles, we can obtain Observation 2, which was mentioned in [5] as well. Observation 2 Ding et al. [5] The probability of adjacent nibbles (nonzero) leading to adjacent nibbles (nonzero) is 2−6 , and the probability of non-adjacent nibbles(nonzero) leading to non-adjacent nibbles(nonzero) is 2−6 . A group of 4-round impossible differentials are constructed based on Observation 1, which are summarized as Observation 3 (see also Fig. 2). Observation 3 Ding et al. [5] For a 4-round PRINCE core with an M operation in the middle, given a pair of inputs whose difference is nonzero in two adjacent columns (i.e., at least one active nibble in the nonzero column) but zero in the other two, then after 4-round PRINCE core encryption, the corresponding output difference cannot be nonzero in two non-adjacent columns but zero in the other two. Here, the first and the fourth columns are considered to be adjacent. For more details, please refer to [52].

3 Observations on the S-Box of Prince Inspired by Jia et al.’s work in [7], we explore the property of the S-box in PRINCE before presenting the impossible differential attacks.

388

Y. Ding et al.

Fig. 2 Impossible differential of PRINCEcore

Table 2 shows the input/output differences and the number of corresponding input = 7 nonzero output differences for a given pairs of S-box. There exist 6×3+7×9+8×3 15 nonzero input difference on average for the S-box in PRINCE. Given (α, β), when 7 ≈ 0.5 α = 0, and β = 0, the probability to make S(x ⊕ α) ⊕ S(x) = β hold is 15 16 and there are averagely 7 ≈ 2 values of x. We summarize the property as Observation 4. Observation 4 For S-box in PRINCE, given an input and output differences pair (α, β), the probability that there exists x such that S(x ⊕ α) ⊕ S(x) = β is 0.5, and α = 0, β = 0. And there exist two values of x when the input difference can propagate by the S-box. Based on Observation 4, a table that stores the input/output differences and the values of the corresponding input pairs is constructed. When the input and output differences of the S-box are known, the values of the corresponding input/output pairs can be obtained by looking up this table.

0

16

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

α\β

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

0

0

2

4

2

0

0

0

0

0

0

2

0

2

4

0

1

2

2

0

0

0

0

2

2

2

2

2

2

0

0

0

0

2

0

0

0

0

0

2

2

0

0

2

2

4

0

4

0

0

3

2

0

0

0

4

2

0

4

0

0

0

2

0

0

2

0

4

0

0

0

2

0

4

0

2

0

2

2

2

2

0

0

0

5

2

4

0

2

0

0

0

0

2

2

0

0

2

0

2

0

6

2

2

2

0

2

4

0

0

0

0

2

0

0

2

0

0

7

0

0

0

0

0

2

0

2

2

0

0

2

2

2

4

0

8

0

0

4

0

0

0

2

2

0

2

2

0

2

0

2

0

9

Table 2 Input/output differences and the number of corresponding input pairs of the S-box

2

0

2

2

0

0

2

0

4

0

0

2

2

0

0

0

A

0

2

0

2

2

0

0

2

0

2

2

0

2

0

2

0

B

2

2

0

2

2

0

4

0

0

0

2

0

2

0

0

0

C

0

2

2

0

0

0

2

2

2

0

2

0

0

4

0

0

D

2

0

2

2

2

0

0

0

2

4

0

0

0

2

0

0

E

2

2

2

0

2

2

2

0

2

0

0

0

2

0

0

0

F

8

7

7

7

7

6

7

7

7

7

8

7

8

6

6

1



Impossible Differential Analysis on 8-Round PRINCE 389

390

Y. Ding et al.

4 Impossible Differential Analysis on 8-Round PRINCEcore In this section, we mount the 4-round impossible differential and extend two rounds on the top and bottom, respectively, to attack 8-round PRINCEcore (see Fig. 3). Data Collection. Take 2m structure of plaintexts, and each takes all the 232 values of x0 [0 − 7] with a fixed value of x0 [8 − 15]. For each structure, query the corresponding ciphertexts, and insert the plaintext/ciphertext into a hash table indexed by y0 [4 − 7, 12 − 15]. For each row with more than one element, save every pair of the elements in that row. We expect to have N a = 2m × 232+32 × 2−1 × 2−32 = 2m+31 pairs on average. Key Recovery 1. For the first column of the first round, since there is only one active nibble after M operation, we traverse all the 24 values to obtain the output difference of the first column after the S-box layer (i.e., the input difference of M operation). Besides, any nibble in this column can be selected as the active nibble. However, we locate it in the first or the fourth nibble in order that this active nibble is in x1 [0 − 7] to reduce the subkeys involved. Then, there are 24 × 2 = 25 probable output differences after the S-box layer. For a pair of plaintexts, the input difference of the S-box layer is known. Looking up the table based on Observation 4 with

Fig. 3 Attack on 8-round PRINCEcore

Impossible Differential Analysis on 8-Round PRINCE

2.

3.

4.

5.

6.

7.

391

the input difference and each of the 25 output differences of S-box layer, one expects to obtain 2−4 × 25 = 2 output differences of the S-box layer, as there are four S-box operations in a column. At the same time, the 2−4 × 25 = 2 values of input/output pairs are obtained. Then, k1 [0 − 3] and x1 [0] can be calculated. 1 × 18 = 2−7 Regarded as one S-box operation, the looking-up-table operation is 16 5 ×4 encryptions. Thus, the time complexity in this step is Na×2 = Na encryptions. 27 Similarly, for the second column in the first round, there is one active nibble after M operation. However, there is only one choice for the location of this nibble, because it is required to be in the same column with the active nibble mentioned in step 1 after the SR operation. Then, there are 24 probable output differences after the S-box layer. By looking up the table, there remains one output difference, and 24 values of input/output pairs are obtained. Then, k1 [4 − 7] and x1 [1] can be calculated. Till now, there are 24 × 25 = 29 values of k1 [0 − 7]. The time 4 ×4 = 2−1 Na encryptions. complexity in this step is Na×2 27 For the first column in the last round, similar with step 1, there are two choices for the active nibble to locate after M operation. Then, there are 25 probable output differences after the S-box layer. By looking up table, there remain two output differences, and 25 values of k1 [0 − 3] are obtained. Since k1 [0 − 3] are calcu9 5 = 2−2 values of k1 [0 − 7]. The time complexity lated in step 1, there are 2 2×2 16 Na×25 ×4 in this step is = Na encryptions. 27 For the third column in the last round, similar with step 2, there is only one choice for the active nibble to locate after M operation. Then, there are 24 probable output differences after the S-box layer. By looking up the table, there remains only one output difference, and 24 values of input/output pairs are obtained. Then, k1 [8 − 11] and y6 [2] can be calculated. Till now, there are 2−2 × 24 = 22 values 4 ×4 = 2−1 Na encryptions. of k1 [0 − 11]. The time complexity in this step is Na×2 27 −2 With 2 k1 [0 − 7] obtained from step 1 to 3, x1 [0, 1] and x1 [0, 1] are known. There are four input differences to M operation according to Observation 2. By looking up the table, there remains 4 × 2−2 = 1 output difference of S-box layer, and 22 values of k1 [0, 1] are obtained. Since k1 [0 − 1] are calculated in step 1 and 2 2 = 2−4 values of k1 [0 − 11] till now. The time complexity step 3, there are 2 2×2 8 −2 4 in this step is Na×2 27×2 ×2 = 2−6 Na encryptions. With the 2−4 k1 [0 − 4, 8 − 11] obtained in step 1 to 5, y6 [0, 2] and y6 [0, 2] are known. There are six input differences to M operation according to Observation 2. By looking up the table, there remain 6 × 2−2 = 20.58 probable output differences of S-box layer, and 20.58 × 22 = 22.58 values of k1 [0, 2] are obtained. Since k1 [0, 2] are calculated in step 1, step 3 and step 5, there are 2−4 ×22.58 = 2−9.42 values of k1 [0 − 11] till now. The time complexity in this step 28 −4 is Na×2 27×6×2 = 2−7.42 Na encryptions.

m+31 −9.42 2 = Repeat step 1 to 6 for Na = 2m+31 pairs, and we expect 248 × 1 − 2 248 2x key candidates remain. Exhaust the remaining 16-bit values of k1 [12 − 15] to achieve the whole 64-bit of k1 . The time complexity in this step is 2x ×216 = 216+x encryptions.

392

Y. Ding et al.

Attack Complexity. The time complexity is 1 + 1 + 2−1 + 2−1 + 2−6 + 2−7.42 × 2m+31 + 216+x . In order to balance the two terms in the equation, we take m = 28.5, and from the equation in step 7, we get x = 45.72. Then, the time complexity is 232.60+m + 216+x ≈ 262.26 encryptions. The data complexity is 2m+32 = 260 chosen plaintexts. Since the structures are processed successively, we only need to store one structure and reuse the space for the next structure. Besides, for the 48-bit subkeys, a 248 -bit array is employed to tag the wrong candidates. Thus, the memory complexity 32 48 ≈ 245 bytes. is about 2 ×64×2+2 8

5 Impossible Differential Analysis on 8-Round PRINCE In this section, we extend the impossible differential attack to 8-round PRINCE. As there are two whitening-key layers before and after the 8-round PRINCEcore , the space of values of key becomes 2128 . We introduce a different extending trail, which is shown in Fig. 4, to involve more subkey bits in order to reduce the complexity of exhausting the values of the remained equivalent key. Data Collection. Similar to Sect. 4, we build 2m structure, query the corresponding ciphertexts and get Na = 2m+31 pairs of plaintext/ciphertext by taking advantage of a hash table.

Fig. 4 Attack on 8-round PRINCEcore

Impossible Differential Analysis on 8-Round PRINCE

393

Key Recovery 1. For the first column of the first round, there is only one active nibble after M operation. We locate it in one of the three nibbles that are not in x1 [0 − 4] in order to increase the number of involved subkeys. Looking up the table based on Observation 4, one expects to obtain 2−4 × 24 = 1 output differences of the S-box layer. At the same time, 24 values of (k0 ⊕ k1 )[0 − 3] are obtained. The 4 ×4 = 2−1 Na encryptions. time complexity in this step is Na×2 27 2. Similarly, for the second column in the first round, there is one active nibble after M operation. However, there is only one choice for the location of this nibble, because it is required to be in the same column with the active nibble mentioned in the last step after the SR operation. Then, there are 24 probable output differences after the S-box layer. By looking up the table, there remains one output difference, and 24 values of (k0 ⊕ k1 )[4 − 7] are obtained. Till now, there are 24 × 24 = 28 values of (k0 ⊕ k1 )[0 − 7]. The time complexity in this 4 ×4 = 2−1 Na encryptions. step is Na×2 27 3. In step 1 and 2, x1 [13, 14] and x1 [13, 14] are obtained for 28 values (k0 ⊕ k1 )[0− 7] at the same time. There are four input differences to M operation according to Observation 2. By looking up the table, there remains 4 × 2−2 = 1 probable output difference of S-box layer, and 22 values of k1 [13, 14] are obtained. We get 28 × 22 = 210 values of (k0 ⊕ k1 )[0 − 7] and k1 [13, 14] till now. The time 8 complexity in this step is Na×227×4×2 = 24 Na encryptions. 4. For the first column in the last round, similar to step 1, there are four choices for the active nibble after M operation. We locate it in one of the two nibbles that will not be in x1 [0 − 4] or the same nibble with the active one mentioned in step 1 in order to involve more subkey bits. Then, there are 24 probable output differences after the S-box layer. By up the table, there remains one looking Till now, we output difference, and 24 values of k0 ⊕ k1 [0 − 3] are obtained. get 24 × 24 = 28 values of (k0 ⊕ k1 )[0 − 7], k1 [13, 14] and k0 ⊕ k1 [0 − 3]. 4 ×4 = 2−1 Na encryptions. The time complexity in this step is Na×2 27 5. For the third column in the last round, similar to step 2, there is only one choice for the active nibble to locate after M operation. Then, there are 24 probable output differences after the S-box layer. By looking up the table, there remains only one output difference, and 24 values of k0 ⊕ k1 [8 − 11] are obtained. now, there are 24 × 24 = 28 values of (k0 ⊕ k1 )[0 − 7], k1 [13, 14] and Till 4 ×4  = 2−1 Na k0 ⊕ k1 [0 − 3, 8 − 11]. The time complexity in this step is Na×2 27 encryptions. 6. In step 4 and 5, y1 [0, 2] and y1 [0, 2] are obtained for 28 values of k0 ⊕ k1 [0 − 3, 8 − 11] at the same time. There are six input differences to M operation according to Observation 2. By looking up the table, there remain 6 × 2−2 = 20.58 output differences of S-box layer, and 20.58 × 22 = 22.58 values 8 2.58 = 210.58 values of (k0 ⊕ k1 )[0 − 7], of k1 [8, 10] are obtained.  There are 2 × 2 k1 [8, 10, 13, 14] and k0 ⊕ k1 [0 − 3, 8 − 11] till now. The time complexity in 8 this step is Na×227×6×2 = 24.58 Na encryptions.

394

Y. Ding et al.

m+31 20.58 2 7. Repeat step 1 to 6 for Na = 2m+31 pairs, and we expect 280 × 1 − 2280 = x 2 key candidates remain. Exhaust the remaining 48-bit values of equivalent key to achieve the whole 128-bit of (k0 , k1 ). The time complexity in this step is 2x × 248 = 248+x encryptions. Attack Complexity. The time complexity is (2−1 + 2−1 + 24 + 2−1 +2−1 + 24.58 )× 2m+31 + 248+x . In order to balance the two terms in the equation, we take m = 32, and from the equation in step 7, we get x = 62.78. Then, the time complexity is 237.63+m + 2148+x ≈ 2110.7 encryptions. The data complexity is 2m+32 = 264 chosen plaintexts. Since the structures can be processed successively, we only need to store one structure and reuse the space for the next structure. Besides, for the 80-bit subkeys, a 280 -bit array is employed to tag the wrong candidates. Thus, the memory 32 80 ≈ 277 bytes. complexity is about 2 ×64×2+2 8

6 Conclusion In this paper, we explore the property of the S-box in PRINCE. Based on it, we perform an impossible differential attack on 8-round PRINCEcore with time complexity of 262.26 encryptions, data complexity of 260 chosen plaintexts and memory complexity of about 245 bytes. Moreover, we extend the attack to 8-round PRINCE with a different balancing strategy. This attack requires 2110.7 encryptions, 264 chosen plaintexts and 28770 bytes of memory. Our result is the best impossible differential cryptanalysis result on PRINCE as far as we know to date. Acknowledgements This work is supported by the National Key Research and Development Program of China (No. 2017YFA0303903), National Cryptography Development Fund (Nos. MMJJ20170121, MMJJ20170201), Zhejiang Province Key R&D Project (No. 2017C01062), National Natural Science Foundation of China (Nos. 61872040, U1836101) and Foundation of Science and Technology on Information Assurance Laboratory (No. KJ-17-009).

References 1. Borghoff, J., Canteaut, A., Güneysu, T., Kavun, E.B., Knezevic, M., Knudsen, L.R., Leander, G., Nikov, V., Paar, C., Rechberger, C. et al.: PRINCE-a low-latency block cipher for pervasive computing applications. In: International Conference on the Theory and Application of Cryptology and Information Security, pp. 208–225 (2012) 2. Canteaut, A., Fuhr, T., Gilbert, H., Naya-Plasencia, M., Reinhard, J.R.: Multiple differential cryptanalysis of round-reduced PRINCE. In: International Workshop on Fast Software Encryption, pp. 591–610. Springer, Berlin (2014) 3. Canteaut, A., Naya-Plasencia, M., Vayssiere, B.: Sieve-in-the-middle: Improved MITM attacks. In: Advances in Cryptology-CRYPTO, pp. 222–240. Springer, Berlin (2013)

Impossible Differential Analysis on 8-Round PRINCE

395

4. Derbez, P., Perrin, L.: Meet-in-the-middle attacks and structural analysis of round-reduced PRINCE. In: International Workshop on Fast Software Encryption, pp. 190–216. Springer, Berlin (2015) 5. Ding, Y.L., Zhao, J.Y., Li, L.B., Yu, H.B.: Impossible differential analysis on round-reduced prince. J. Inf. Sci. Eng. 33(4) (2017) 6. Grassi, L., Rechberger, C.: Practical low data-complexity subspace-trail cryptanalaysis of round-reduced PRINCE. IACR Cryptol. Eprint Arch. 2016, 964 (2016) 7. Jia, K., Wang, N.: Impossible differential cryptanalysis of 14-round camellia-192. In: Australasian Conference on Information Security and Privacy, pp. 363–378. Springer, Berlin (2016) 8. Li, L., Jia, K., Wang, X.: Improved meet-in-the-middle attacks on AES-192 and PRINCE. IACR Cryptol. Eprint Arch. 573 (2013) 9. Morawiecki, P.: Practical attacks on the round-reduced PRINCE. IET Inf. Secur. (2016) 10. Posteuca, R., Duta, C.L., Negara, G.: New approaches for round-reduced PRINCE cipher cryptanalysis. In: Proceedings of the Romanian Academy, Series A-Mathmatics Physics Technical Sciences Information Science 16, pp. 253–264 (2015) 11. Posteuca, R., Negara, G.: Integral cryptanalysis of round-reduced PRINCE cipher. Proc. Rom.Ian Acad., Ser. A 16, 265–270 (2015) 12. Soleimany, H., Blondeau, C., Yu, X., Wu, W., Nyberg, K., Zhang, H., Zhang, L., Wang, Y.: Reection cryptanalysis of PRINCE-like ciphers. J. Cryptol. 28(3), 718–744 (2015) 13. The PRINCE Team: PRINCE challenge. https://www.emsec.rub.de/research/research_ startseite/prince-challenge/ 14. Zhao, G., Sun, B., Li, C., Su, J.: Truncated differential cryptanalysis of PRINCE. Secur. Commun. Netw. 8(16), 2875–2887 (2015)

Multi-step Ahead Time Series Forecasting Based on the Improved Process Neural Networks Haijian Shao, Chunlong Hu, Xing Deng, and Dengbiao Jiang

Abstract This paper proposes a multi-step ahead time series forecasting based on the improved process neural network. The intelligent algorithm particle swarm optimization (PSO) is used to overcome the potential disadvantages of the neural network, such as slow convergence speed and derivative local minima. Firstly, the theoretical analysis of the PSO is given to optimize the multilayer perceptron (MLP) neural network architecture. Secondly, the theoretical analysis and processing flow about the MLP architecture optimization is given. Thirdly, the performance criteria are applied to verify the performance of the proposed approach. Finally, the experimental evaluation based on a typically chaotic time series with rich spectrum information is utilized to demonstrate that the proposed approach has comparative results and superior on forecasting accuracy comparing to the traditional methods. Keywords Time series analysis · Multilayer perceptron · Particle swarm optimization

1 Introduction Time series forecasting has been one of the important research subjects in recent decades, and it has been widely used in signal processing, control science and pattern recognition, such as wind power forecast [1, 2] as well as the solar energy forecasting [3, 4]. The current methods of the time series prediction can be categories as single model-based method and hybrid model-based ones. The former is mainly about the linear model such as autoregressive model, autoregressive moving average model; they are very suitable for the online processing because of the capability at fast H. Shao · C. Hu · X. Deng · D. Jiang School of Computer Science and Engineering, Jiangsu University of Science and Technology, Jiangsu, Zhenjiang, China H. Shao · X. Deng (B) Key Laboratory of Measurement and Control for CSE, School of Automation, Ministry of Education, Southeast University, Nanjing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_38

397

398

H. Shao et al.

processing. Essentially, most of the dynamical behavior is nonlinear, which means they cannot be applied to describe the nonlinear dynamical behavior accurately. So, the nonlinear model has been widely used because of its nonlinear approximation capability such as deep learning [5–7]. Although these models have the ability to capture the dynamical characteristics of the time series, their model architecture still mainly depends on the empirical knowledge from the designer. Taking into account the chaotic time series (CTS), the corresponding forecasting strategy is generally about the “inverse problem” in the dynamical system. The forecasting method should be used to reflect the orbital evolutional process at the phase. Typically, the traditional approach for the CTS forecasting depends on the empirical parameters design, and the dynamical characteristics of the CTS is not reflected in the given model which results in low generality ability. Moreover, some methods such as adaptive filter and SVR still fail to describe the CTS’s dynamical behavior. In fact, long-term CTS forecasting is impossible [8]. This is because the nonlinear coupling of the former is very difficult to be implemented in practical application, and the corresponding parameter has potential influence for the model’s performance. The main disadvantage of the latter is about the parameter criteria, such as punishment factors and parameters of the kernel function; they seriously affect the model performance. The hybrid modelbased method, such as wavelet decomposition and error compensation strategy, is proposed to overcome the disadvantages of the single model-based, for instance, low forecasting accuracy. However, the performance of this type of model is easily influenced by the single model’s performance. In addition, the main disadvantage of the outlined model is that they cannot reflect the dynamical characteristics accuracy and grasp the CTS orbital evolution in phase space, in particular, the incentive feature of the CTS sequence with rich spectrum under different condition. These drawbacks cannot be overcome effectively even for the mature technique such as MLP due to the long training time, slow convergence speed, easy to fall into local extreme with respect to connection weights and thresholds. Based on the above discussion, the intelligent algorithm PSO is given to find out the values which are close to the sub-global optimum to explore a large and complex space in an intelligent way. This paper proposed an accurate model with high performance for the time series analysis based on the MLP in combination with the PSO algorithm (IMLP) to improve the generality ability of traditional approach. This paper is organized as follows. Theoretical analysis and processing flow about the MLP architecture optimization are investigated in Sect. 2. Section 3 introduces the experimental evaluation about the IMLP to demonstrate the effectiveness of the proposed strategy. The prospective research issues are summarized and discussed in Sect. 4.

Multi-step Ahead Time Series Forecasting Based …

399

2 Proposed Approach 2.1 Optimized Processing Strategy PSO is a typical evolution algorithm which optimizes the given objective function by selecting iteratively to improve the candidate solution with respect to measurement standards. The formula of particles update of standard PSO algorithm is given as follows [9, 10],   ⎧ ⎪ ⎨ Vid (t + 1) = ϕVid (t) + c1 ε1 (Pi Bd (t) − xid (t)) + c2 ε2 Pg Bd (t) − xid (t) xid (t + 1) = xid (t) + Vid (t + 1), i = 1, . . . , n, d = 1, . . . , D ⎪ ⎩ ϕ = 2 − (c + c ) − (c + c )2 − 4(c + c )−1  1 2 1 2 1 2

(1)

where n is the number of particles in a population, $D$ is the dimensions of solution spaces, cm , εm , (m = 1, 2) are the nonnegative constant named learning factor and uniform constant with the interval (0, 1), respectively. Vid (t), xid (t) are the velocity and its own position with respect to ith particle at dth dimension. Pi Bd (t), Pg Bd (t) are the optimal location with respect to ith particle at the neighborhood of dth dimension at moment t. ϕ is the contraction coefficient. The evolution process will be terminated if the fitness levels meet specified standards. MLP can be used in various fields to model a given problem, and it is especially useful for classification problems and function approximation problems which are tolerant of some imprecision data. In fact, there are three advantages about the MLP used to forecast the time series: 1. It is a nonlinear model which can perform tasks that linear model cannot; 2. Parallel nature of MLP can still be implemented even an element of the neural network fails, and it does not need to be reprogrammed; 3. MLP’s structure is different from the architecture of microprocessors, and it can be used in any application without any prior knowledge. However, MLP has some disadvantages which cannot be ignored: (1) long training time; (2) slow convergence speed; (3) easy to fall into local extreme with respect to connection weights and thresholds. The outlined factors result in the low generalization ability. In consistent with these problems, the following three aspects about the outlined problem are given: (i)

Model architecture optimization. The evolution algorithm with search heuristic technique PSO is used to optimize the MLP neural network architecture through exploring a large and complex space in an intelligent way to find values close to the sub-global optimum. The processing steps about the PSO are given in Fig. 1, (ii) Parameter optimization. The two-dimensional (2D) Ackley function will be employed in this paper for parameter optimization, and it is defined by f (x) = −c1 e−0.2

√ 1 n n

j=1

x 2j

1

− en

n j=1

cos(2π x j )

+ c2 + e1

(2)

400

H. Shao et al.

Fig. 1 Proposed approaches based on the improved process neural networks

where c1 = c2 = 20, e1 = 2.71282. Practically, there are many local minima arranged in a lattice configuration. The global minima 2D Ackely function can be located by simulation computation based on the PSO algorithm. (iii) Training process optimization. The training processing of model will be terminated if the average errors no longer decrease during prediction; i.e., ETE(t + 1)  ETE(t), where ETE(t) is the average error at t-moment. This can be used to avoid the over-fitting in the training process.

2.2 Processing Flow Analysis In order to preserve the advantages of IMLP such as nonlinear, large time-delay, multivariable and strong coupling characteristics, this paper does not take into account any increase in observation data. Consider the following MLP defined by ⎛ ⎞  n L  m

(l) y = g⎝ vj f j ail wi j − θ j − θw ⎠ j=1

i=1 l=1

(3)

Multi-step Ahead Time Series Forecasting Based …

401

Fig. 2 Flowchart of this paper

where ail is a constant which denotes the lth coefficient with respect to ith input signal of basis function, then the undetermined parameters such as the coefficient of the function of connection weights with respect to the hidden layer wi(l)j , connection weights v j , threshold θ j , the threshold of output layer θw L, and the number of hidden layer m can be  optimized and determined in the following formula based on the PSO by DP = wi(l)j , v j , θ j , θw , i = 1, . . . , n, j = 1, . . . , m, l = 1, . . . , L. Particles’s dimension is Td = m(n L + 1 + 1) + 3, and the specific processing steps are given in Fig. 2. Autocorrelation function and cross-correlation function are used to investigate the lag correlation between the inputs and outputs. Based on the CTS, the experimental evaluation using the performance criteria is given to demonstrate that the proposed approach has comparative results and superior to other traditional methods.  

n 

n    t=1 Rt f − Rtr t=1 Rt f − Rtr

, RMAE = MAE = (4) n n t=1 Rtr where MAE is the absolute average error associated to forecasting Rt f and real data Rtr . RMAE is the relative average absolute error, and n is the number of testing sample. The root mean square error, mean absolute percentage error, mean squared adjusted percentage error and mean absolute adjusted percentage error are helpful in choosing the most valid forecasting method. In this paper, the following formulas are used to evaluate the performance of proposed strategy.

402

H. Shao et al.

3 Experimental Evaluation Chaotic time series (CTS) forecasting is an important research topic, and it is widely used in the signal processing, control science and pattern recognition of the real world. CTS can be used to describe the natural phenomena and human behavior, so its accuracy forecasting is important for the nonlinear modeling related to the time series. Mackey–Glass (MG) is a kind of classic CTS, and the chaotic state will be existed when the delay is 17. MGCTS is typically used for the measurement series because it has rich spectrum which usually can be used to reflect the signal characteristics at different states. The type of this paper is multi-input and single-output (MISO), Levenberg–Marquardt (LM) method is a standard technique used to solve nonlinear least squares problems, and it will be used in both TMLP and IMLP. The size of the inputs is 104 ∗ 2(Order = 2), 104 ∗ 3(Order = 3), and 60%, 20% and 20% of each subset are, respectively, selected as the training sample, verification sample and testing sample in order to avoid the over-fitting of the learning process. The corresponding numbers of hidden layers are four and six based on the Kolmogorov theorem; the structure of hidden layer is, respectively, four and six hyperbolic functions; output structure is one linear function. The interval m ∈ [1, 18], the initial value of L = 1, c1 = c2 = 20, contraction coefficient ϕ = 0.7583, the number of iterative evolution is 100, the initial population size is 20, and the range of other parameters is from −5 to 5. The maximum number of iterations is set as 200, and this paper proposes 1-ahead and 10-ahead step prediction. The trajectories of real data and forecasting data are given in Fig. 3, and the corresponding error analysis is given in Table 1.

Fig. 3 Forecasting results

Multi-step Ahead Time Series Forecasting Based …

403

Table 1 Experiments results Method

Order

MAE

RMAE

HN

ET

TMLP-1

2

0.1026

0.0928

4

4.8147

IMLP-1

2

0.0925

0.0845

4

5.9058

TMLP-10

3

0.1128

0.0998

6

5.1270

IMLP-10

3

0.1049

0.0936

6

6.9134

TMLP-1: 1-step ahead prediction using traditional MLP; IMLP-1: 1-step ahead prediction using PSO-MLP; TMLP-10: 10-step ahead prediction using traditional MLP; IMLP-10: 10-step ahead prediction using PSO-MLP; ORDER: model order estimation via correlation analysis; MAE: MAE for testing sample; RMAE: RMAE for testing sample; HN: the number of the hidden layer; ET: elapsed time for testing sample in seconds.

4 Conclusion In this paper, a multi-step ahead time series forecasting using the IMLP is given to overcome the TMLPs disadvantages and improve the forecasting accuracy. Firstly, the theoretical analysis of the PSO for architecture optimization is introduced. Secondly, strategy design constitutes of model architecture optimization, parameters optimization and training process optimization, etc., are given to illustrate the implement method of the IMLP. Finally, the experimental evaluation based on Mackey– Glass CTS with rich spectrum feature is given to demonstrate that the proposed approach has comparative results compared to the TMLP and has superior advantages on forecasting accuracy. We believe the proposed strategy of this paper has reference value for practical application, and it can be extended to other computational precision, etc. Acknowledgements This project is supported by the National Natural Science Foundation of China (NSFC) (No. 61806087, 61902158), Natural science youth fund of Jiangsu Province (No. BK20150471), Jiangsu Province Natural Science Research Projects (No.17KJB470002) and Jiangsu University of Science and Technology Youth Science and Technology Polytechnic Innovation Project (No. 1132931804).

References 1. Shao, H., Deng, X.: AdaBoosting neural network for short-term wind speed forecasting based on seasonal characteristics analysis and lag space estimation. Comput. Model. Eng. Sci. 114(3), 277–293 (2018)

404

H. Shao et al.

2. Shao, H., Wei, H., Deng, X., Xing, S.: Short-term wind speed forecasting using wavelet transformation and AdaBoosting neural networks in Yunnan wind farm. IET Renew. Power Gener. 11(4), 374–381 (2016) 3. Rusen, S.: Modeling and analysis of global and diffuse solar irradiation components using the satellite estimation method of HELIOSAT. Comput. Model. Eng. Sci. 115(3), 327–343 (2018) 4. Sharma, S., Kalamkar, V.: Numerical investigation of convective heat transfer and friction in solar air heater with thin ribs. Comput. Model. Eng. Sci. 114(3), 295–319 (2018) 5. Li, S.: A deep learning based computational algorithm for identifying damage load condition: A machine learning inverse problem solver for failure analysis. Comput. Model. Eng. Sci. 287–307 (2018) 6. Shao, H., Deng, X., Jiang, Y.: A novel deep learning approach for short-term wind power forecasting based on infinite feature selection and recurrent neural network. J. Renew. Sustain. Energy 10(4), 043303-1–043303-13 (2018) 7. Ren, S., Chen, G., Li, T., Chen, Q., Li, S., Jones, R., Chan, Y.: A deep learning-based computational algorithm for identifying damage load condition: an artificial intelligence inverse problem solution for failure analysis. Comput. Model. Eng. Sci. 117(3), 287–307 (2018) 8. Casdagli, M.: Nonlinear prediction of chaotic time series. Phys. D: Nonlinear Phenom. 35(3), 335–356 (1989) 9. Poli, R., Kennedy, J., Blackwell, T.: Particle swarm optimization. Swarm Intell. 1(1), 33–57 (2007) 10. Bonyadi, M., Zbigniew, M.: Particle swarm optimization for single objective continuous space problems: a review, pp. 1–54. MIT Press, Cambridge (2017)

An Improved Quantum Nearest-Neighbor Algorithm Ying Zhang, Bao Feng, Wei Jia, and Cheng-Zhuo Xu

Abstract With the development of machine learning stepping into a bottleneck period, quantum machine learning has become a new popular research direction. Quantum computing is built on the principle of quantum mechanics, which can abstract the linear evolution process of quantum systems into a linear mathematical calculation process. This paper explores high-efficient storage and parallel computing performance of quantum computing by analyzing some quantum nearest-neighbor algorithms precisely. Based on these ideas, an improved quantum weighted nearestneighbor algorithm (QWNN) is proposed, which sufficiently conforms to the idea of parallel computing. QWNN algorithm not only inherits special efficient coding method and amplitude estimation technique of previous quantum nearest-neighbor algorithm, but also includes the weighting algorithm of quantum version. The experimental data show that the performance of QWNN is comparable to that of similar algorithms. Keywords Machine learning · Nearest neighbor algorithm · Quantum algorithm · Quantum machine learning

Y. Zhang (B) NARI Information and Communication Technology Co., Ltd., Nanjing, China e-mail: [email protected] Y. Zhang · B. Feng · W. Jia NARI Group Corporation/State Grid Electric Power Research Institute, 211106 Nanjing, China e-mail: [email protected] W. Jia e-mail: [email protected] B. Feng · W. Jia NRGD Quantum Technology Co., Ltd., 211106 Nanjing, China C.-Z. Xu School of Computer Science and Engineering, Southeast University, 210096 Nanjing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_39

405

406

Y. Zhang et al.

1 Introduction Recent years, machine learning and quantum computing these two technologies have been developing fast. The activeness of machine learning comes from its wide range of applications, and the activeness of quantum computing comes from its enormous potential. Even though machine learning technology is being widely used today, there are bottlenecks that limit its further development. Due to the rapid growth of global data storage and the growth of digital data [1], the storage and processing of large amounts of data is becoming more and more a problem. Now, academia, research laboratories, and leading IT companies are investigating a promising idea to fully exploit the potential of quantum computing to optimize classical machine learning algorithms. Quantum computing is a discipline developed from the study of quantum physics. In the process of studying quantum mechanics, it has been found that quantum systems have the function of simulating linear mathematical calculations. It proves that the quantum algorithm is far superior to the classical algorithm in some specific problems, and can even achieve exponential acceleration, but not all cases [2]. In the context of machine learning reaching the development bottleneck and the uncertain development of quantum computing, the cross-domain of quantum machine learning has become popular. The quantum machine learning algorithm also expands the theory of quantum computing when quantum computing helps machine learning break through storage and computational speed barriers. Quantum machine learning is also divided into many directions [3]. Among them, quantum algorithms based on neighbor learning and support vector machines have already achieved results, and quantum algorithms based on neural networks are still under study [4]. This article focuses on quantum nearest neighbor algorithm, based on which, an improved idea and a brief algorithm implementation are proposed.

2 Quantum Computing 2.1 Qubit and Quantum Coding One of the most basic ideas in quantum mechanics is that quantum systems can be superimposed at different states at the same time. Quantum experimental techniques can construct quantum superpositions of orbitals, polarizations, angular momentum through double-slit experiments or optical polarization principles. Generally, for a simple quantum two-state system, two orthogonally distinguishable quantum states are selected as the base state. Such a system can be abstracted into a qubit. The quantum state can generally be represented by the Dirac notation |·, and the base of the qubit is usually represented by |0 and |1. A qubit is a unit of quantum computation, and a quantum bit |ψ may be in an arbitrary linear combination of the

An Improved Quantum Nearest-Neighbor Algorithm

407

base, which can be expressed by the following formula, |ψ = α|0 + β|1

(1)

where |α|2 + |β|2 = 1 (normalized into unit vectors) and α and β are both complex numbers, and these coefficients are usually referred to as the amplitude of each base state. It is worth noting that although we use |0 and |1 to represent the base, which is actually a relative concept. For Eq. (1), the state |ψ cannot be simply understood as a probability of |α|2 being |0, and a probability of |β|2 is |1 when measuring. A single qubit system can be analogized to the Hilbert space on a two-dimensional complex domain. When extended to a multi-qubit system, the basis of the n-bit system can be written as |0…00, |0…01, …, |1, …, 11, each base form is equivalent to an n-bit binary number. In quantum computing, we also use the abbreviated form |0, |1, …, | j, …, |2n . The n-bit system is equivalent to a 2n -dimensional Hilbert space. This shows that the amount of information potentially stored by quantum systems increases exponentially as the number of quantum bits increases. Qubits are extended to multiple qubits. The tensor product of two single qubits |ψ1  , |ψ2  is calculated as follows, |ψ1  ⊗ |ψ2  = (α1 |0 + β1 |1) ⊗ (α2 |0 + β2 |1 = α1 α2 |00 + α1 β2 |01 + β1 α1 |10 + β1 β2 |11

(2)

where |00 is short for |0|0. Like classical coding, quantum coding can also denote binary numbers, which is precisely a superposition of binary base state of different amplitudes. However, this coding method does not make full use of the storage capacity of qubits. Lloyd et al. proposed a new coding method [5], which encodes each component of the N -dimension vector into the amplitude corresponding to the quantum state base. The coding mode consumes only log2 N qubits. It is worth noting that the vector still needs to be normalized. Therefore, the relationship between the vector and the corresponding quantum coding can be expressed by Eq. (3), |v = |v|−1/2 v

(3)

Considering the storage of quantum states corresponding to many vectors, there’s a model called quantum random access memory (qRAM) [6–8]. A qRAM is a commonly used quantum storage model. Like classic memory, qRAM is also composed of two parts: address (subscript) and stored   data. According to the address bits, data can be stored or queried. For M data v j encoded as a quantum state, qRAM takes the following form,  √   | j | v j 1/ M j

(4)

408

Y. Zhang et al.

  where | j  represents the address bit and v j represents the data bit [6–8] proves that the ability of qRAM to satisfy parallel access data can greatly reduce the number of access times in some algorithms, and the time for data storage can also be accelerated in logarithmic time.

2.2 Measurement and Inner Product of Quantum States Usually, quantum systems are in a superposition state, and the only way for information in a quantum state is to measure. For Eq. (1), if measured on the bases |0 and |1, the quantum state will collapse, and 0 is measured with a probability of |α|2 , and 1 is measured with a probability of |β|2 . For a quantum system with any number of bases, the measurement process is similar and eventually collapses to one of the bases with the probability of squared the amplitude modulus. More generally, the probability of eventually shrinking to a certain measurement base when measuring at any basis is a measure of the “similarity” of two quantum states, which can be calculated using the “inner product” method. Use the following calculation method to calculate inner product,

ψ1 |ψ2  = α1∗ 0| + β1∗ 1| (α2 |0 + β2 |1) = α1∗ α2 + β1∗ β2

(5)

2.3 Quantum Circuits

Swap Test To calculate the inner product of two given quantum states, we usually use a quantum circuit called an Swap Test [9], using a special projection method. The ancilla bit

in the end of the circuit, and the probability of measuring 0 is is measured 1 + |ϕ|ψ|2 /2, which is associated with inner product of |ϕ and |ψ (Fig. 1).

Fig. 1 The quantum circuit for the swap test. The initial quantum state on the left can also be mixed states. If |ϕ is replaced by a mixed state represented by the density operator ρ, the probability of successful projection to |ψ is (1 + ψ|ρ|ψ)/2

An Improved Quantum Nearest-Neighbor Algorithm

409

Preparation acceleration For the initial preparation of vectors or matrices, if the vectors or matrices are sparse, quantum Oracle can be used to accelerate them. Operators O and F are given as follows. For a sparse matrix V , O| j |i |0  : = | j|i|vi j , F| j |  : = | j | f ( j, ) 

(6)

where f (i, ) is the th non-zero term of jth column of V .

2.4 Quantum Algorithms

Quantum search algorithm Quantum search algorithm is a quantum version of search algorithm which provides quadratic acceleration. It’s also called Grover algorithm [10, 11]. The Grover algorithm starts with an equal superposition state constructed by H ⊗n gates. Through an oracle and iterations of algorithm, the amplitude of the base corresponding to the solution value gradually increases, and finally the measurementis performed. The √  N . value to be searched is measured with high probability within O For the search of the smallest data in qRAM, the Dürr Høyer minimum search algorithm can be used [12]. As an extension of the Grover algorithm, the minimum search algorithm can also give a quadratic acceleration. For qRAM:N −1/2 j | j |y , we randomly select an address j, use the quantum search algorithm to search for addresses with smaller data, and repeat the process. When the running time reaches a certain critical value, the algorithm must obtain the address of minimum value. This algorithm can also be used to search for the maximum value. Amplitude estimation algorithm The amplitude of a certain base can be extracted into binary qubits through amplitude estimation algorithm [13] (AE). The specific process and proof of the AE algorithm can be found in [13]. Although AE is called amplitude estimation, it can only estimate the modulus of amplitude.

3 Quantum Weighted Average Nearest Neighbor Algorithm Based on quantum nearest neighbor algorithm [14], we propose an improved algorithm. Instead of searching for nearest vector, this algorithm calculates the weighted average distance of each cluster, which decides the classification of sample vector. We call this algorithm quantum weighted average nearest neighbor algorithm (QWNN).

410

Y. Zhang et al.

3.1 Classical Description Assuming that in a classification problem, G(= 2g ) marked clusters are given. Each v→ of the clusters contains M(= 2m ) N (= 2n )-dimensional vectors − g j , then for a new vector u, the inner product between the vector and each is calculated as dg j . Considering a weighting function f, choose the appropriate incremental function so that the closer the vector is to u, the higher the weight obtained. For each cluster, we get the average value of each weight f (d). The weighted average distance of the vector from each cluster is calculated and then the vector is assigned to the closest cluster.

3.2 Quantum Algorithm

Initial state preparation For the jth vector of the gth cluster, the operators O and F are used to prepare the following quantum states. ⎛ ⎞ ⎞ ⎛ 2  v v 1 ⎝  ⊗ log2 N g ji g ji |1 |1  + d −1/2 |i ⎝ 1 − 2 e−iφg ji |0  + |ψ  ← √ |0  0 |1⎠|1⎠, r r 2 i:vg ji =0 ⎛ ⎞⎞ ⎛ 2  u 1 ⎝  ⊗ log2 N u i |φ ← √ |0 0 |1 |1  + d −1/2 |i |1⎝ 1 − 2i e−iφ0i |0  + |1⎠⎠ r r 2 i:u i =0 (7) where r ≥ rmax , and can be adjusted arbitrarily. Similarity calculation and weighting Perform Swap Test on the above two quantum states without measurement, and the inner product information d of the two vectors is stored in the amplitude of base |0  in ancilla. The qubit can be written as  d|0  +

1 − |d|2 |1

(8)

Coming to the selection of f , we must consider the two aspects of implementation difficulty and algorithm effect. For d, we choose f (d) = d α

(9)

as the weight function, where α is a variable integer parameter and α > 1. It’s easy to prove that f (d) is an incremental function.

An Improved Quantum Nearest-Neighbor Algorithm

411

Make α copies of (8) and we get ⊗α    2 d|0  + 1 − |d| |1  = d α |00 . . . 0  + 1 − |d α |2 |00 . . . 0⊥ 

(10)

Through a certain controlled gate, we get d α |0  +

 2 1 − |d α | |1 

(11)

Then apply AE to extract the information stored in the amplitude into qubits. Output of the AE is  a| f (d)  +

1 − |a|2 |i

(12)

where | f (d)  is the encoding of the amplitude information, and |i is orthogonal to | f (d), which is an irrelevant state. Repeat this step to prepare several equal amounts of AE output. Introducing a coherent majority voting mechanism,  ⊗k    2 |0  = A|Ψ | f (d) + 1 − |A|2 Φ; i ⊥  M a| f (d) + 1 − |a| |i 

(13)

where M calculates the mean of the quantum bit string and stores the result information in ancilla. According to the binomial theorem, we will get a | f (d)  with high probability. So, the overall output of AE based on a coherence majority voting step is ⎞ ⎛ G−1 M−1   ⎝|g| | j| f (d)⎠ (14) g=0

j=0

where |g is the group number. The superposition of the above formula and the general qRAM is only different in form. In fact, only the first few bits of the subscript are extracted and regarded as the group number; in actual operation, the data is installed in groups and sorted to ensure the number of data in each group to be a power of 2. Average calculation For the average calculation, we construct a quantum algorithm

, (15)

algorithm is able to calculate the average of each data for a given qRAM and then store it in the resulting qubit. This quantum algorithm can be used in search algorithms.

412

Y. Zhang et al.

Apply

on (14) and we get G−1 





⎝|g|⎝

g=0

M−1 



⎞   | j| f (d)⎠  f (d) ⎠

(16)

j=0

Ignoring the intermediate qubits, we finally get G−1 

 

|g|  f (d)

(17)

g=0

Maximum search Apply the maximum search algorithm (which can be transformed from the minimum search algorithm). Find the largest average weight value and its corresponding group number.

3.3 Numerical Experiment

0.08

0.09

0.07

0.08

error rate

error rate

Take the handwritten digital image classification problem as an example, and test the performance of the algorithm, then compare it with other algorithms. This experiment takes 4600 images as training data and 400 as test data. Each image is 28 * 28 pixels, which is represented as a 784-dimension vector. We compare this algorithm with k-nearest neighbor algorithm (KNN), with a parameter k. Both two algorithms have a parameter to be adjusted for lower error rate, as Fig. 2 shows. Here we choose KNN due to another improved quantum machine learning algorithm [15]. From Fig. 2, we can see that when a = 100, the error rate reaches the minimum value of 0.054, which is slightly lower than the minimum value of 0.059 when k = 4 in the k-nearest neighbor algorithm.

0.06 0.05

10 40 70 100 130 160 190 220

α

0.07 0.06 0.05

2

4

6

8 10 12 14 16 18

k

Fig. 2 Left is α-error diagram in weighted average nearest neighbor algorithm. Right is k-error diagram in k-nearest neighbor algorithm

An Improved Quantum Nearest-Neighbor Algorithm

413

3.4 Summary The core process of the quantum weighted neighbor algorithm is the selection of f (d). It is not difficult to find that the quantum nearest neighbor center algorithm and the quantum nearest neighbor algorithm can be counted as subclasses of the algorithm. Therefore, reasonable function selection should make the algorithm not exceed the original algorithm in time and space complexity, and the algorithm effect will be better than the original algorithm.

References 1. Martin, H., Priscila, L.: The world’s technological capacity to store, communicate, and compute information. Science 332, 60 (2011) 2. Tang, E.: A quantum-inspired classical algorithm for recommendation systems. CoRR https:// arxiv.org/abs/1807.04271. (2018) 3. Schuld, M., Sinayskiy, I., Petruccione, F.: An introduction to quantum machine learning. Contemp. Phy. 56, 172 (2015) 4. Schuld, M., Sinayskiy, I., Petruccione, F.: The quest for a quantum neural network. Quantum Inf. Process. 13, 2567 (2014) 5. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine learning. Eprint Arxiv (2013) 6. Vittorio, G., Seth, L., Lorenzo, M.: Quantum random access memory. Phy. Rev. Lett. 100, 160501 (2008) 7. Giovannetti, V., Lloyd, S., Maccone, L.: Architectures for a quantum random access memory. Phy. Rev. A 78, 4948 (2008) 8. De Martini, F., et al.: Experimental quantum private queries with linear optics. Phy. Rev. A (2009) 9. Nielsen, M.S., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000) 10. Boyer, M., Brassard, G., Hoyer, P., Tapp, A., Boyer, M., Brassard, G.: Tight bounds on quantum searching. Fortschritte Der Physik (Prog. Phy.) 46, 493 (1996) 11. Grover, L.K.: A fast quantum mechanical algorithm for database search (1996) 12. Dürr, C.: A quantum algorithm for finding the minimum (1996) 13. Brassard, G., Høyer, P., Mosca, M., Tapp, A.: Quantum amplitude amplification and estimation. Quantum Comput. Inf. 5494, 53 (2012) 14. Wiebe, N., Kapoor, A., Svore, K.: Quantum algorithms for nearest-neighbor methods for supervised and unsupervised learning. Quantum Inf. Comput. 15, 316 (2015) 15. Chen, H., Gao, Y., Zhang, J.: Quantum K-nearest neighbor algorithm. J. SE Univ. (Nat. Sci. Ed.). 45, 647 (2015)

A Trend Extraction Method Based on Improved Sliding Window Ming Lu, Yongteng Sun, Hao Duan, and Zuguo Chen

Abstract Trend analysis, a database method for condition identification, is widely used in engineering. The sliding window method is an important method for trend analysis. However, the original sliding window method uses an invariant preset threshold and a fixed initial window, which will lead to inaccurate segmentation and long processing time. To solve this problem, it is a reasonable choice to improve the original scheme with dynamic threshold and dynamic initial window. In this paper, a trend extraction method based on improved sliding window is proposed, which can extract the trend characteristics of variables accurately and quickly. Keywords Trend extraction · Sliding window · Dynamic threshold

1 Introduction The amount of data generated in the industrial process is very large, so it becomes very complex and difficult to extract useful information from it. Qualitative trend analysis is a database method for condition identification. This method obtains potential information from data sequence and recognizes process condition, so it is widely used in fault diagnosis, process state monitoring and other fields [1, 2]. Trend extraction and trend matching are important components in the qualitative trend analysis method, which is used to extract trend features from process data [3]. Trend extraction is used to extract trend features, especially visual features of data change, such as rising, falling and invariance. Trend matching is used to match the extracted trend features with the knowledge base and recognize the working conditions. To extract trends, we need to describe and define the characteristics of trends. Williams proposed the concept of events, which is defined as a set of time intervals and qualitative content [4]. On this basis, Janusz et al. proposed a language to represent trends [5]. This language defines seven basic shapes as primitives, which are M. Lu (B) · Y. Sun · H. Duan · Z. Chen School of Information and Electrical Engineering, Hunan University of Science and Technology, 411201 Xiangtan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_40

415

416

M. Lu et al.

uniquely represented by symbols of the first and second derivatives. Compared with other extraction methods, the extraction method based on polynomial fitting has the advantages of strong robustness to noise and short processing time and is widely used. Moreover, the extraction method based on polynomial fitting can be divided into three categories: top-down, bottom-up and sliding window [6–9]. The sliding window extraction method adds or deletes data points to the current window until the fitting error meets the preset threshold. After data segmentation using the sliding window extraction method, primitive symbols are allocated to segments, and trend features are obtained [10]. In the extraction of trend characteristics by sliding windows, invariant preset thresholds and fixed initial windows will lead to inaccurate segmentation and long processing times. On the basis of defining seven primitives, a trend extraction method based on improved sliding window is proposed in this paper. This method abandons the fixed window and threshold in the original method, adopts least square fitting method and applies the dynamic threshold and dynamic initial window.

2 Trend Extraction 2.1 Primitives The language used in this paper to describe trend characteristics is proposed by Janusz et al. [5]. This language defines seven primitives based on seven common changing shapes: A(0, 0), B(+, +), C(+, 0), D(+, −), E(−, +), F(−, 0), G(−, −). The two symbols in parentheses are symbols of the first derivative and the second derivative of the signal. These shapes cover the basic changing shapes in working conditions.

2.2 Polynomial Fitting Firstly, the least square method is used in fitting data. Assuming that the original time series function y has N data points, an M-order polynomial is established as follows: f M (x, w) = w0 + w1 x + w2 x 2 + · · · + w M x M =

M 

wjx j

(1)

j=0

where x j means a variable of order J, wj means the coefficient of the first variable J. Let L(w) be the variance of time series function y and fitting polynomial, as follows.

A Trend Extraction Method Based on Improved Sliding Window

⎛ ⎞2 N M   1 j ⎝ L(w) = w j xi − yi ⎠ 2 i=1 j=1

417

(2)

Find the partial derivative of Formula (2) and make it equal to 0. ⎛ ⎞ N M ∂ L(w) ⎝ j = w j xi − yi ⎠ · xik = 0 ∂wk i=1 j=0

(3)

Through Formula (3), the polynomial coefficients can be obtained by inputting the time series data to be fitted. In the fitting step, this paper adopts the step-by-step fitting strategy. The fitting error is calculated by Formula (4) N ε2f

=

i=1 (yi

v

− Pi )2

(4)

where yi means the original data, Pi means the fitted data, and v means freedoms. In this paper, the value of freedoms is L-(n-1), L means the window width, and n means the number of polynomial coefficients.

2.3 Improved Sliding Window The sliding window method is a good data mining method, which can adjust the size of the window adaptively according to the fitting situation, realizing the optimal segmentation of trend fragments. After completing data fitting, the size of the data window is adjusted according to whether the final error is lower than the threshold. As shown in Fig. 1, if the first fitting error of the initial window is lower than the threshold value, the window will be enlarged. Increase the amount of data and fit again. If the error is still below the threshold, repeat it until the fitting error is higher than the threshold. After execution, the fitting function with the last error below the threshold is obtained, and the first derivative and second derivative symbols of the function are calculated, which is used to assign primitive symbols to the segment of data and record the window size and time points. If the first fitting error of the initial window data is greater than the threshold value, the window will be reduced, the amount of data will be reduced, and the fitting will be repeated until the fitting error is lower than the threshold value. After execution, the fitting function with the error less than threshold can be obtained, and the first derivative and second derivative symbols of the function can be calculated to assign primitive symbols to the data and record the window size and time points. However, the fixed initial window of original sliding window method increases fitting time and takes a long processing time. Moreover, its constant preset threshold

418

M. Lu et al.

Fig. 1 Window adjustment diagram

brings too many trivial fragments and inaccurate segmentation. To solve these two problems, a dynamic initial window and dynamic threshold are adopted. The time length of each event in industrial data is not fixed, and its length fluctuates near the average of these event windows. According to this feature, the proposed trend extraction method calculates the average value of all extracted window sizes after obtaining two or more sizes and takes this value as the initial window for the next extraction. For threshold setting, the initial threshold is set according to process characteristics. In order to use the reasonable threshold value, this paper adjusts the threshold according to the size difference between the sliding window and the initial window. The flow chart of the improved algorithm is shown in Fig. 2.

3 Experiment and Analysis The data used in this experiment comes from industrial processes. In order to verify the effect of the trend extraction algorithm proposed in this paper, three groups of data are extracted using the original method and the improved method, respectively. The results of extraction are shown in the figures. In Fig. 3, it can be seen that trends of the original method are more trivial, some effective fragments are divided into several small fragments, and the overall performance is poor. However, trend of the improved method are more complete and overall segments are accurate. In addition,

A Trend Extraction Method Based on Improved Sliding Window

419

Fig. 2 Flowchart of improved method

it can be seen from Figs. 4 and 5 that the improved method is more accurate than the original method. Table 1 provides detailed data for trend extraction.

4 Conclusion In view of the challenges of trend extraction in industry, sliding window is used to extract the trend. To solve the problems of inaccurate segmentation and low segmentation efficiency existing in the original method, this paper adopts dynamic threshold

420

M. Lu et al.

Fig. 3 Comparison of extraction between the improved method (up) and the original method

Fig. 4 Comparison of extraction between the improved method (up) and the original method

and dynamic initial window and proposes a new trend extraction method based on improved sliding window. Compared with the existing methods, the results of experiments show that the trend of the improved method is more accurate and takes less time.

A Trend Extraction Method Based on Improved Sliding Window

421

Fig. 5 Comparison of extraction between the improved method (up) and the original method

Table 1 Data comparison of trend extraction results Order

Methods

Primitive sequence

Time node

Processing time (s)

Figure 3

Reference value

CFBG

[0, 50, 90, 140, 200]



Improved method

CFBG

[0, 47, 98, 142, 200]

0.46

Conventional method

GDEGBG

[0, 40, 60, 80, 100, 140, 200]

0.91

Reference value

BFC

[0, 113, 178, 220]



Improved method

BFC

[0, 119, 183, 220]

0.31

Conventional method

DFC

[0, 148, 177, 220]

0.65

Reference value

EADF

[0, 100, 150, 200, 300]



Improved method

EADF

[0, 101, 154, 202, 300]

0.48

Conventional method

EADF

[0, 122, 154, 202, 300]

0.82

Figure 4

Figure 5

Acknowledgements This research was funded by the National Natural Science Foundation of China (grant number 61672226).

422

M. Lu et al.

References 1. Thürlimann, C.M., et al.: Soft-sensing with qualitative trend analysis for wastewater treatment plant control. Control. Eng. Pract. 70, 121–133 (2018) 2. Zhao, L., Peng, T., et al.: Recognition of flooding and sinking conditions in flotation process using soft measurement of froth surface level and QTA. Chemom. Intell. Lab. Syst. 169, 45–52 (2017) 3. Zhou, B., Ye, H.: A study of polynomial fit-based methods for qualitative trend analysis. Process. Control. 37, 21–33 (2016) 4. Williams, B.C.: Doing time: putting qualitative reasoning on firmer ground. In: Readings in Qualitative Reasoning About Physical Systems, pp. 353–360 (1990) 5. Janusz, M., Venkatasubramanian, V.: Automatic generation of qualitative description of process trends for fault detection and diagnosis. Eng. Appl. Artif. Intell. 4(5), 329–339 (1991) 6. Keogh, E., Chu, S., et al.: An online algorithm for segmenting time series. In: IEEE International Conference on Data Mining, pp. 289–296 (2001) 7. Dash, S., Maurya, M.R., et al.: A novel interval-halving framework for automated identification of process trends. AICHE J. 50(1), 149–162 (2004) 8. Villez, K.: Multivariate and Qualitative Data Analysis for Monitoring, Diagnosis and Control of Sequencing Batch Rectors for Wastewater Treatment. Ghent University, Gent (2007) 9. Charbonnier, S., Gentil, S.: On-line adaptive trend extraction of multiple physiological signals for alarm filtering in intensive care units. Int. J. Adapt. Control. Signal Process. 4(5), 382–408 (2010) 10. Gao, D., Ma, X., Xu, Xin., Zhang, B.K.: Method and application of qualitative trend analysis with sliding window. Appl. Res. Comput. 3(15), 1441–1444 (2016)

Three-Dimensional Dense Study Based on Kinect Qin Wan, Yueping Xiao, Jine Yan, and Xiaolin Zhu

Abstract With the continuous improvement of image processing technology as well as the rapid development of camera hardware, scene reconstruction has attracted more and more research attention in our production and life. Currently, the scene sensing technology based on two-dimensional RGB is quite mature. However, it is difficult to accurately perceive the scene only by RGB information in the complex scenes, and the spatial position of the object is also an extremely important factor to describe the scene. This paper adopts consumer-grade Kinect depth camera and high-resolution two-dimensional color camera to form a composite vision system, registering and fusing spatial position information and color RGB information to obtain as much scene information as possible. In contrast to other 3D reconstruction techniques, this paper provides more color information. Keywords Kinect · Dense SLAM · Data fusion

1 Introduction The three-dimensional dense reconstruction is inseparable from the depth camera. After Microsoft released Kinect in 2010, the three-dimensional dense reconstruction based on the depth camera has set off the research upsurge. The representative work at the early stage is that Davison [1] proposed a three-dimensional sparse reconstruction based on two-dimensional camera. In 2011, the Microsoft’s Newcombe [2] proposed the KintFusion, which fused the Kinect depth data to the scene surface. The KintFusion algorithm first accomplished the real-time rigid body reconstruction based on the cheap consumer camera. It was a influential work at that time, which greatly facilitated the commercialization of the real-time three-dimensional dense Q. Wan · Y. Xiao (B) · J. Yan · X. Zhu Hunan Institute of Engineering, 411104 Xiangtan, Hunan, China e-mail: [email protected] Q. Wan Hunan University, 410082 Changsha, Hunan, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_41

423

424

Q. Wan et al.

reconstruction. After KintFusion, numerous excellent works have emerged, including Kintinuous [3] and BundleFusion [4]. Among these, the BundleFusion algorithm, proposed by Stanford University in 2017, could be regarded as the best method for dense 3D reconstruction based on RGB-D camera. However, the construction resolution is only 640 × 480, which does not play the role of the high-definition 2D camera in the current market. Moreover, the color two-dimensional information of the scene is not fully utilized. Aiming to this problem, this paper proposes the registration fusion of Kinect1.0 depth camera and HD 2D camera. The chessboard corner detection calibration method is performed by the infrared image taken by the Kinect1.0 depth camera to obtain the internal and external parameters of the depth camera and the color chessboard corner detection calibration method of the HD 2D camera to obtain the internal and external parameters of the color two-dimensional camera. The parameters are optimized by genetic algorithms to obtain more accurate camera parameters for subsequent registration, conduct the correction registration, and form the dense 3D spatial information eventually.

2 3D Dense Algorithm 3D dense construction is to construct dense 3D digital space by obtaining spatial information. The overall algorithm block diagram is shown in Fig. 1.

2.1 Camera Calibration The calibration process is to determine the geometrical and optical parameters of the camera. This paper detects the corner points of all the chessboards based on the Zhang Zhengyou’s checkerboard calibration method [5] for calibration and has more corner information than the traditional method [6]. In order to obtain more Camera Calibration 2D High – precision Camera

3D Depth Camera

Calculating The Internal And External Parameters Of The Two Cameras

Fig. 1 Overall block diagram of the algorithm

Camera Registration Genetic algorithm optimization parameter

Calculating the Rotation and Translation Matrix R = Rrgb Rir−1 Y = Trgb − RTir Matching Effect Chart

Three-Dimensional Dense Study Based on Kinect

425

Fig. 2 a–c Represent the corner detection maps of the HD two-dimensional camera and the depth camera (infrared image). b–d Shows the calibration results of the two cameras. From data analysis, our method has excellent calibration results

accurate internal and external parameters, we use genetic algorithms to optimize the calibration results. The calibration experiment is shown in Fig. 2 as follows: This paper uses genetic algorithm to optimize the internal parameters of the camera that have been obtained. The algorithm flowchart is shown in Fig. 3. The internal parameters H_rgb (logic) and H_ir (Kinect1.0) of the two cameras can be obtained (see Table 1). Likewise, the external parameters of the two cameras can be calibrated as follows: R_ rgb (rotation matrix of the logic camera), T _rgb (the translation matrix of the logic camera), R_ir (rotation matrix of the Kinect depth camera), and T _ir (the translation matrix of the Kinect depth camera).

Fig. 3 Basic process of genetic algorithm

426

Q. Wan et al.

Table 1 Internal parameters of logic and Kinect depth cameras H_rgb (logic)

H_ir (Kinect1.0)

989.6168 (Focus x)

0

0

988.1878 (Focus y)

0 0

427.1384 (Optical Center x)

352.7879 (Optical Center y)

1.0000

553.4843 (Focus x)

0

0

0

552.1271 (Focus y)

0

314.2644 (Optical Center x)

232.7517 (Optical Center y)

1.0000

2.2 Camera Registration The internal and external parameters of the two cameras can be obtained by the calibration above. According to the coordinate transformation relationship (including pixel coordinates, physical coordinates, camera coordinates, and world coordinates). Let us assume that the P_ir is the spatial coordinate of a point in the depth camera, and the p_ir is the projection coordinate of the point on the image plane. The relationship can be described as: p_ ir = H_ ir P _ ir

(1)

P_ ir = H_−1 ir p_ ir

(2)

Meanwhile, P_rgb is the spatial coordinate of the same point in the coordinates of two-dimensional high-definition logic camera, p_rgb is the projection coordinate of this point on the RGB image plane, and H_rgb is the internal parameter matrix of the RGB camera. Two cameras can be linked by a rotation and translation transformation may be expressed as: P_rgb = RP_ir + T

(3)

where R is the rotation matrix and T is the translation vector. The RGB coordinates corresponding to this point can be obtained by projecting with H_rgb to P_rgb as follows: p_rgb = H_rgb P_rgb

(4)

Two forms of transformation relationship in the two camera: rotation and translation. Let R is the rotation matrix and T is the translation matrix. Suppose P is one world coordinate point, then P has the following relationship in the coordinate system of two cameras: P_ir = R_ir P + T_ir

(5)

Three-Dimensional Dense Study Based on Kinect

P_rgb = R_rgb P + T_rgb

427

(6)

The above equations can be obtained: −1 R = R_rgb R_ir

(7)

−1 T = T_rgb − R_rgb R_ir T_ir = T_rgb − RT_ir

(8)

By calculating R and T, we obtain the spatial conversion relationship between Kinect depth camera and logic two-dimensional HD camera. As shown in Eqs. (7) and (8), the registration results are obtained by MATLAB simulation, which will be described in detail in the fourth section.

3 Experiment and Analysis The experiments were carried out on a computer. The details of this computer are as follows: The CPU is Intel Core i5-8400; the main frequency is 2.81 GHz; the memory is 8.00 GB; the graphics card is GTX 1060; the operating system is Windows 10; and the algorithm is programmed with MATLAB 2018b software. The comparing experimental diagram between the literatures [6] with our method is shown in Fig. 4. Figure 4a–c shows the literature [6] color camera corner detection graph, depth image corner point detection graph, and registration effect diagram. Figure 4d–f

Fig. 4 Camera calibration comparison result

428

Q. Wan et al.

Table 2 Data of calibration and dense Number of corners Literature [4] Our

4 70

Distortion correction

Optimization

Manual

Traditional

Automatic

Genetic algorithm

Table 3 Data of dense Depth resolution

Color resolution

Literature [4]

640 × 480

640 × 480

Our

640 × 480

1280 × 960

Number of point cloud spaces 307,200 1,228,800

shows the color camera corner detection graph, the depth camera infrared corner detection graph, and the registration effect diagram of the method. The calibration related data is shown in Table 2. The point cloud dense data is shown in Table 3. As can be seen from Table 2 that our method is more accurate and convenient than the literature [6] and has better calibration results. As can be seen from Table 3 that our method has more color information and point cloud data than the literature [4], which achieved data dense between data spaces and make a significant contribution to 3D space reconstruction. At the same time, the existing problem of calibration edge information loss will be the direction we need to breakthrough in the future. According to the calibration results, using the method that this paper proposed to construct a three-dimensional dense interior. The experimental results are shown in Fig. 5. In Fig. 5, (a) is an RGB color image; (b) is a Kinect depth image; (c) is a threedimensional dense image. It can be found from the experimental results that the algorithm in this paper extracts more color information for 3D dense construction, and the color camera and depth camera are accurately registered, but the lack of information on the edge is that the algorithm needs to be improved.

4 Conclusion This paper proposes a new three-dimensional dense reconstruction method. The method obtains depth information based on the inherent depth camera. Introducing a high-resolution 2D camera with a depth camera for pixel fusion to form a 3D densely reconstructed composite vision system. The experimental results reveal that on the basis of the original depth data, this system can obtain more RGB information simultaneously and provide more useful scene information for 3D reconstruction. Meanwhile, there are considerable research spaces in this method. In this case, the

Three-Dimensional Dense Study Based on Kinect

429

Fig. 5 Three-dimensional dense experiment

subsequent work will continue to study the hole completion and edge repair of the dense three-dimensional space. Acknowledgements This work was supported in part by the National Natural Science Foundation of China under Grant 61841103, Grant 61673164, and Grant 61602397, in part by the Natural Science Foundation of Hunan Provincial under Grant 2016JJ2041, in part by the Graduate Research Innovation Projects of Hunan Province under Grant CX2018B813 and Grant CX2018B805.

References 1. Newcombe, R.A., et al.: KinectFusion: Real-time dense surface mapping and tracking. In: 10th IEEE International Symposium on Mixed and Augmented Reality, pp. 127–136. Basel (2011) 2. Davison, A.J.: Real-time simultaneous localisation and mapping with a single camera. In: Proceedings Ninth IEEE International Conference on Computer Vision 2, pp. 1403–1410 (2003) 3. Whelan, T., Johannsson, H., Kaess, M., Leonard, J.J., McDonald, J.: Robust real-time visual odometry for dense RGB-D mapping. In: IEEE International Conference on Robotics and Automation, pp. 5724–5731 (2013) 4. Angela, D., Matthias, N.: BundleFusion: real-time globally consistent 3D reconstruction using on-the-fly surface reintegration. ACM Trans. Graph. 36(3), 24:1–24:18 (2017) 5. Zhang, Z.: A flexible new technique for camera calibration. IEEE Trans. Pattern Anal. Mach. Intell. 22(11), 1330–1334 (2000) 6. Ilya, V.M., Lee, P.G., Sahakian, A.V.: Automatic, fast, online calibration between depth and color cameras. Vis. Commun. Image Represent. 25(1), 218–226 (2014)

A Cascaded Feature Fusion Residual Network for Image Super-resolution Wang Xu, Renwen Chen, Bin Huang, Qinbang Zhou, and Yaoyu Wang

Abstract In view of existing problem of image super-resolution (SR) algorithms based on convolutional neural network (CNN) that they ignore the feature hierarchical characteristic in deep networks and fail to take fully use of prior information, a cascaded feature fusion residual network (FFResNet) is proposed. Especially, a feature fusion residual block (FFresblock) is proposed in cascaded way to densely fuse the prior information in mid-layers. Each FFresblock not only learns the feature spatial correlation and channel correlation between features, but also adaptively decides how much of the prior information and current state should be reserved by concatenating intermediate features from previous ones which leads to a global contiguous information memory mechanism. Moreover, with the benefit of fully use of intermediate status information, FFResNet achieves favorable performance against state-of-the-art methods on the benchmark tests. The results show that the image details reconstructed by FFResNet are more visual pleasing with clearer outline. Keywords Super-resolution · Feature fusion · Convolutional neural networks

1 Introduction Image super-resolution (SR) is a classical problem in computer vision tasks due to its wide use and great application value, which aims to reconstruct high-resolution (HR) image from its degraded low-resolution (LR) one. Recently, convolutional neural networks (CNN)-based methods have been proved to have better performance than traditional methods. Among these methods, Dong et al. [1] firstly introduced CNN with three layers named SRCNN into image SR, learning an end-to-end mapping between LR image and HR image. Kim et al. [2] made a deeper network with 20 convolution layers VDSR, while introducing skip connection to ease the training difficulty. Kim et al. [3] also proposed a deeply recursive convolution network (DRCN) with recursive convolution layer and recursive supervision, giving help to control the W. Xu (B) · R. Chen · B. Huang · Q. Zhou · Y. Wang Nanjing University of Aeronautics and Astronautics, 210016 Nanjing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_42

431

432

W. Xu et al.

amount of model parameters. SRResNet [4] utilized a residual backbone proposed by He et al. [5]. Tai et al. [6] proposed MemNet based on DenseNet [7]. Hence, the state information of some layers can not only be influenced by the feed-forward information, but also by certain previous information with direct connection, helping the network to achieve better performance. The use of intermediate information can provide more clues for image SR. Although most methods such as VDSR, DRCN and MemNet successfully improved the performance by using the intermediate information of the network, the status information is not obtained directly from the original LR image, but from the interpolated image which would greatly increase computational complexity for extremely deep networks. Thus, it is hard to say these methods build an end-to-end mapping between an LR image and HR image. To address these problems, a cascaded feature fusion residual network (FFResNet) is proposed. FFResNet can extract dense features directly from the original LR image to reconstruct HR image without any image scaling operator. Especially, a feature fusion residual block (FFResblock) is proposed to adaptively fuse raw global features from the previous layers, leading to a continuous global memory mechanism. By fusing the intermediate features, our FFResNet achieved superior performance on benchmark datasets over state-of-the-art methods.

2 Proposed Method 2.1 Network Architecture FFResNet consists of three parts: (1) coarse feature extraction block (CFblock), (2) cascaded FFResblocks (CFFRs) and (3) reconstruction block (RecB) as shown in Fig. 1. Denote x and y which are input and output of the network. CFblock consists of single one convolution layer, which can be formulated as: F0 = f extract (x) = W0 x

Fig. 1 Basic FFResNet architecture

(1)

A Cascaded Feature Fusion Residual Network for Image …

433

where W0 is the weight parameter, and F0 is the output features extracted by f extract . In CFFRs, supposing there are N FFblocks, the output of each FFblock can be represented as: Fn = FFblockn (Fn−1 )

(2)

where FFblockn denotes nth FFblock function, and Fn 与 Fn−1 are the output and input. Fn would be processed by another more convolution layer and then added with F0 . Recblock utilizes a similar structure like ESPCN [8] to reconstruct HR image: Fn+1 = Wn+1 Fn + F0

(3)

y = f FPNet (x) = f rec (Fn+1 )

(4)

where f rec is Recblock function, and f FPNet is a function of the proposed FFResNet. (i) M Given a training dataset {img(i) lr , imghr }i=1 , imghr denotes the original HR image, imglr denotes the LR image, and the loss function of our FFResNet is: M  1   (i) (i)  Loss = imghr − f FPNet (imglr ) M i=1

(5)

2.2 Feature Fusion Residual Block As shown in Fig. 2, the block includes three parts: global feature fusion unit (GFF), feature extraction unit (FE) and residual learning (RL).

Fig. 2 Feature fusion residual block. Blue dash box indicates the global feature fusion unit, and green dash box represents the feature extraction unit

434

W. Xu et al.

Global feature fusion unit. GFF concatenates the intermediate features in channel dimension as the input of FFResblock. Output features of previous FFResblock can directly pass to subsequent ones, leading to a continuous information memory mechanism: fusionn = [[F0 , . . . , Fn−2 ], Fn−1 ]

(6)

where fusionn denotes the output of the nth GFF, and [F0 , . . . , Fn−2 ] denotes the summary of outputs from previous FFResblocks. For the nth FFResblock, the number of GFF output feature maps G GFFn can be represented as: G GFFn = G F0 + G F1 + · · · + G Fn−1

(7)

where G Fn−1 denotes the number of (n − 1)th FFResblock output features. The network can densely fuse global features by utilizing GFF, and each FFResblock can read raw features directly from previous ones. Feature extraction unit. FE unit consists of two convolutional layers with kernel size 3 × 3. The first convolution layer output would be activated by ReLU function before putting it into the second layer. At last, the output of FE unit would directly add with the input of the current FFResNet, which leads to residual learning. With the network forward process, the number of GFF output features would increase linearly, resulting in an increased amount of the model parameters. The number of features of first convolution layer is compressed by factor θ to be as [θ G n ]. Scaling. Moreover, when the feed-forward features grow more, the training process is prone to be unstable, like the situation mentioned in Inception V4 [9]. The output of FE unit is multiplied with a constant factor with value of 0.1 before residual learning. The training can be more stable, and the performance would also gain.

3 Experiment 3.1 Datasets and Metrics A dataset DIV2K [10] released by Timofte et al. [10] is used for model training as HR images, which contains 800 training images, 100 validation images and 100 testing images. The corresponding LR images are the down-sampled versions with bicubic function in MATLAB of HR images. Standard benchmark testing datasets includes: Set5 [11], Set14 [12], B100 [13], Urban100 [14]. For fair comparison, SR results would be evaluated with structural similarity (SSIM) and peak signal-to-noise (PSNR) index on the luminance channel in transformed YCbCr color space.

A Cascaded Feature Fusion Residual Network for Image …

435

3.2 Training As for training, 16 RGB LR-HR image patches with size 48 × 48 are randomly cropped from LR images and the HR images in each training batch. Model with different scale factors (e.g., x2, x3, x4) would be trained individually. Patches are augmented during training with random horizontal flip, 90-degree rotation and so on. We train all models with Adam optimizer [12], and the learning rate is initialized to be 0.0001 and decreased to half every 200 epochs. We implement FFResNet in TensorFlow framework.

3.3 Ablation Study Table 1 presents the ablation study on the effects of components GFF, RL and scaling to the model performance. Models with different structures are trained with 200 epochs and tested on Set5 with scale factor x2, and all models (baseline, GFF_only, RL_only, RL+scaling, FFResNet) have same the number of FFResblocks and feedforward features. The baseline model cancels GFF, RL and scaling, the performance is the worst and the training is extremely unstable as shown in Fig. 3. Thus, only Table 1 Effects of different structures on model performance Baseline

GFF_only

RL_only

RL+scaling

FFResNet

GFF

×



×

×



RL

×

×







Scaling





×





PSNR

37.30

37.92

37.86

37.91

38.05

Fig. 3 Effect of GFF unit on model convergence

436

W. Xu et al.

Fig. 4 Effect of different components on model convergence

cascading same convolution layers cannot guarantee performance gain and training stabilization. The results of Table 1 also show that each structure can efficiently improve the performance of baseline model. With the help of GFF, the training is more stable, and the convergence speed is faster as shown in Fig. 3. This is mainly because GFF enhances the flow of information and gradient. Combination of these components would also perform better than the single one, which is also demonstrated in Fig. 4. FFResNet can benefit greatly from GFF, RL and scaling.

3.4 Benchmark Results In this section, FFResNet is compared with other methods on benchmark testing, including SRCNN [1], VDSR [2], DRCN [3], SRResNet [4] and MemNet [6]. The number of cascaded FFResblocks N is 8 and number of feed-forward features is set to be 128. From Table 2, FFResNet performs best on all benchmarks with all scale factors. When scale factor goes larger (e.g., x3, x4), it is harder for all models to reconstruct HR images from highly degraded LR images, the proposed FFResNet still outperforms the others. Specifically, most images in Urban100 contain selfsimilar textures, although MemNet [6] utilizes a gate unit to fuse global information to restore similar structures, FFResNet gives PSNR/SSIM of 0.6 dB/0.0263 better than MemNet on Urban100 with scale factor x4. In Figs. 5 and 6, all methods fail to restore the horizontal and vertical line textures, while FFResNet recovers them with clear shaper edges. This is mainly due to fully use of global intermediate features.

Urban100

BSD100

26.88/0.8403

24.46/0.7349

23.14/0.6577

x4

25.96/0.6675

x4

x3

27.21/0.7382

x2

29.56/0.8431

26.00/0.7027

x4

x3

27.55/0.7742

x2

30.24/0.8688

x3

28.42/0.8104

x4

x2

30.39/0.8682

x3

Set14

33.66/0.9299

x2

Set5

Bicubic

Scale

Datasets

24.52/0.7221

26.24/0.7989

29.50/0.8946

26.90/0.7101

28.41/0.7863

31.36/0.8879

27.49/0.7503

29.28/0.8208

32.42/0.9063

30.48/0.8628

32.75/0.9090

36.66/0.9542

SRCNN

25.14/0.7510

27.15/0.8276

30.75/0.9133

27.23/0.7233

28.80/0.7963

31.85/0.8942

28.02/0.7670

29.76/0.8311

33.04/0.9118

31.53/0.8854

33.82/0.9226

37.63/0.9588

DRCN

Table 2 Mean PSNR/SSIM of benchmark for x2, x3 and x4 super-resolution

26.07/0.7839

–/–

–/–

27.57/0.7354

–/–

–/–

28.53/0.7804

–/–

–/–

32.05/0.8810

–/–

–/–

SRResNet

25.18/0.7524

27.14/0.8279

30.76/0.9140

27.29/7251

28.82/0.7976

31.90/0.8960

28.01/0.7674

29.77/0.8314

33.03/0.9124

31.35/0.8838

33.66/0.9213

37.53/0.9587

VDSR

25.50/0.7630

27.56/0.8376

31.31/0.9195

27.40/0.7281

28.96/0.8001

32.08/0.8978

28.26/0.7723

30.00/0.8350

33.28/0.9142

31.74/0.8893

34.09/0.9248

37.78/0.9597

MemNet

26.11/0.7893

28.18/0.8545

32.27/0.9302

27.57/0.7376

29.07/0.8057

32.19/0.9002

28.65/0.7810

30.32/0.8408

33.58/0.9176

32.05/0.8940

34.40/0.9272

38.08/0.9607

FFResNet

A Cascaded Feature Fusion Residual Network for Image … 437

438

W. Xu et al.

Fig. 5 Whole and local comparisons of 119082.bmp in BSD100 processed by different methods with scale factor of 4. a Bicubic (22.30 dB); b SelfEx (23.52 dB); c SRCNN (23.38 dB); d VDSR (24.17 dB); e DRCN (24.02 dB); f FFResNet (24.76 dB)

Fig. 6 Whole and local comparisons of foreman.bmp in Set14 processed by different methods with scale factor of 4. a Bicubic (29.62 dB); b SelfEx (32.55 dB); c SRCNN (31.37 dB); d VDSR (33.23 dB); e DRCN (33.34 dB); f FFResNet (33.51 dB)

A Cascaded Feature Fusion Residual Network for Image …

439

4 Results In this paper, we proposed a cascaded feature fusion residual convolution network (FFResNet) for image SR, where cascaded feature fusion residual blocks (CFFRs) densely fuse intermediate features in the network, improving the flow of information. Each feature fusion residual block can directly read raw features from previous ones and adaptively decide how much of the previous features should be reserved, leading to a global continuous information memory mechanism. Quantitative and visual evaluation results on benchmark tests have demonstrated well that our FFResNet achieves superior performance over state-of-the-art methods.

References 1. Dong, C., Loy, C.C., He, K., Tang, X.: Learning a deep convolutional network for image super-resolution. In: ECCV (2014) 2. Kim, J., Kwon Lee, J., Lee, K.M.: Accurate image super-resolution using very deep convolutional networks. In: CVPR (2016) 3. Kim, J., Le, J.K., Le, K.M.: Deeply recursive convolutional network for image super resolution. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 1637–1645 (2016) 4. Ledig, C., Theis, L., Huszar, F., Caballero, J., Cunningham, A., Acosta, A., Aitken, A., Tejani, A., Totz, J., Wang, Z., et al.: Photo-realistic single image super-resolution using a generative adversarial network. Preprint at arXiv:1609.04802 (2016) 5. He, K., Zhang, X., Ren, S., et al.: Deep residual learning for image recognition. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778 (2015) 6. Tai, Y., Yang, J., Liu, X. et al.: MemNet: a persistent memory network for image restoration. In: IEEE International Conference on Computer Vision, pp. 4549–4557. IEEE Computer Society, Washington, DC (2017) 7. Huang, G., Liu, Z., Maaten, L.V.D., et al.: Densely connected convolutional networks. In: IEEE Conference on Computer Vision and Pattern Recognition. IEEE Computer Society, pp. 2261– 2269 (2017) 8. Shi, W., Caballero, J., Huszár, F., Totz, J., Aitken, A. P., Bishop, R., Rueckert, D., Wang, Z.: Real-time single image and video super-resolution using an efficient sub-pixel convolutional neural network. In: CVPR (2016) 9. Szegedy, C., Ioffe, S., Vanhoucke, V., et al.: Inception-v4, Inception-ResNet and the impact of residual connections on learning. In: Thirty-First AAAI Conference on Artificial Intelligence (2016) 10. Timofte, R., Agustsson, E., Van Gool, L., Yang, M.H., Zhang, L., et al.: Ntire 2017 challenge on single image super-resolution: Methods and results. In: CVPR 2017 Workshops 11. Bevilacqua, M., Roumy, A., Guillemot, C., Alberi-Morel, M.L.: Low-complexity single-image super-resolution based on nonnegative neighbor embedding. In: BMVC (2012) 12. Zeyde, R., Elad, M., Protter, M.: On single image scale-up using sparse-representations. In: Proceedings of the International Conference on Curves and Surfaces (2010) 13. Martin, D., Fowlkes, C., Tal, D., Malik, J.: A database of human segmented natural images and its application to evaluating segmentation algorithms and measuring ecological statistics. In: ICCV (2001) 14. Huang, J.B., Singh, A., Ahuja, N.: Single image super resolution from transformed selfexemplars. In: CVPR (2015)

Spp-U-net: Deep Neural Network for Road Region Segmentation Yang Zhang, Dawei Luo, Dengfeng Yao, and Hongzhe Liu

Abstract In order to better solve the problem about lack of real time in road region segmentation algorithm, this paper designs a deep neural network of road region segmentation Spp-U-net with U-net structure as the core. In addition, the use of spatial pyramid pooling (Spp) to replace the conventional pooling makes up for the lack of accuracy of the Spp-U-net network. The accuracy of Spp-U-net network algorithm is improved compared with U-net model. The model has strong realtime performance on the road segmentation problem under the premise of ensuring accuracy. Keywords Road segmentation · Spatial pyramid pooling · Convolutional neural network

1 Introduction Road region segmentation is actually considered as image segmentation. Image segmentation is a key technology in the field of image processing and computer vision [1]. It is an important premise and foundation of image processing, and it is also one of the most difficult problems in image processing. With the continuous introduction of deep learning algorithms, image segmentation has also developed rapidly.

Y. Zhang · D. Luo · D. Yao (B) · H. Liu Beijing Key Laboratory of Information Service Engineering, Beijing Union University, Beijing, China e-mail: [email protected] Y. Zhang e-mail: [email protected] D. Yao Lab of Computational Linguistics, School of Humanities, Tsinghua University, Beijing, China Center for Psychology and Cognitive Science, Tsinghua University, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_43

441

442

Y. Zhang et al.

According to my understanding, image segmentation can be divided into traditional methods and deep learning-based algorithms. Traditional image segmentation methods input manual features into a new data set. At the meantime, expert knowledge and time cost are required additionally to adjust features [2, 3]. However, algorithms based on deep learning which learn feature representations from different data sets are popular in recent years. Fully convolutional network (FCN) proposed by Long J et al. in 2014 is the earliest image segmentation on depth learning. After that, MaskRCNN [4], BiSeNet [5], SegNet [6], Deeplab [7] derived from framework of FCN and other algorithms have been proposed. These algorithms can classify and label pictures at pixel level but they are time-consuming and not easy to meet real-time applications. This paper designs a deep neural network of road region segmentation Spp-U-net with U-net structure as the core, to segment the road in real time.

2 Segmentation of Road Region Traditional image segmentation requires a large scope of perception to include the whole image information so that the segmentation results are complete. The more deep features of an image are available, and the larger perception can be obtained. However, the boundary of road image is irregular due to occlusion of people, vehicles, etc. It is necessary to obtain shallow features for fine segmentation to extract road segments. The U-net structure was originally used in the medical field to segment some medical cell images. It is good to extract both deep and shallow features. Moreover, this structure is simple. The difference between U-net and FCN is that U-net uses features that are stitched together in the channel dimension to form thicker features. But in FCN, corresponding points are added for fusion which do not form thicker features. Therefore, we use Unet as a road segmentation. However, pure U-net network segmentation has defects with insufficient accuracy. We replace the pooling layer of U-net network with Spp and adopt multi-window pooling to improve the accuracy as much as possible without changing the entire network structure. The picture is sent to the Spp-U-net network as input data. In order to reduce the computational complexity and speed up the operation, the convolutional layer in Spp-U-net is mainly composed of a 3 × 3 convolution kernel. It makes no great difference to the network structure between Spp-U-net and U-net network. The backbone network consists of five convolutional layers and four downsampling layers. The feature fusion part consists of four convolutional layers and four upsampling layers. Although the lightweight U-net algorithm is very fast, its feature extraction ability of the backbone network is low, and the multi-scale local area features are not fully utilized, which limits the improvement of image segmentation accuracy. To this end, this paper uses an improved spatial pyramid pool in the U-net backbone to fuse and connect multi-scaled local region features, enabling the network to learn features more comprehensively. The specific implementation is to add the Spp

Spp-U-net: Deep Neural Network for Road Region Segmentation

443

output input

Output feature

Fixed-length representation

5x5

9x9

13x13

Connect input feature

Feature maps of convs (arbitrary size)

Spatial Pyramid Pooling Max 1x1 Conv 3x3 Conv pooling

Upsample

Copy and crop

Spp

Fig. 1 Structure of Spp-U-net network

layer at the bottom of the U-net backbone network. The Spp layer pools the input features by 5 × 5, 9 × 9, 13 × 13 maxpooling to extract local features of different receptive fields. Finally, these three features are connected to the original features. Each scale feature is extracted using a 3 × 3 convolution. Due to the Spp and feature fusion operation, the defects of insufficient accuracy are compensated on the basis of real-time performance reaching a higher level, and finally, multi-scale features are obtained to improve the road feature map. Finally, 1 × 1 convolution kernel is used to generate multiple feature maps and output the results (Fig. 1).

3 Results We tested Spp-U-net on the test set, and the test results are shown in Fig. 2. Compared with U-net, Spp-U-net has achieved good experimental results. For the edge of road segmentation, especially for the right and left edges, the segmentation effect is good and the road area is effectively divided. We also conducted a comparison experiment on adding Spp layer to the middle of backbone network, and the effect is shown in Fig. 3. The effect of Spp (m)-U-net network added to other layers of backbone network is obviously not as good as that of Spp-U-net added to the bottom of backbone network.

444

Y. Zhang et al.

Fig. 2 Contrast diagram. a The original drawing. b U-net segmentation. c Spp-U-net segmentation

Fig. 3 Contrast diagram. a Spp(m)-U-net segmentation. b Spp-U-net segmentation

Spp-U-net: Deep Neural Network for Road Region Segmentation

445

4 Conclusion This paper designed a road segmentation algorithm which has the strong real-time performance. This algorithm combines the characteristics about good real-time performance of U-net network and enhances the accuracy of the algorithm through Spp layer, so that the algorithm has strong real-time performance while ensuring the accuracy. In further research, more modules will be combined to further improve the performance of the network. Acknowledgements This work was supported by the National Natural Science Foundation of China (NSFC) under grant no. 61433015: 61602040, the National Social Science Foundation of China under grant no. 14ZDB154, the key project of the National Language Committee (ZDI13531), the support plan for high level teacher team construction in Beijing municipal universities (IDHT20170511), the Science and Technology project of Beijing Educational Committee (KM201711417006) and Premium Funding Project for Academic Human Resources Development in Beijing Union University (BPHR2019CZ05).

References 1. Xu, X.Z., Ding, S.F., Shi, Z.Z., Jia, W.K.: New theory and method of image segmentation. Chin. Image Graph. J. (08) (2018) 2. Otsu, N.A.: Threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 9(1), 62–66 (2007) 3. Boykov, Y.Y., Jolly, M.P.: Interactive graph cuts for optimal boundary & region segmentation of objects in N-D images. Computer vision, 2001. In: Proceedings the Eighth IEEE International Conference on ICCV, vol. 1, pp. 105–112 (2001) 4. He, K., Gkioxari, G., Dollar, P., et al.: Mask R-CNN. In: IEEE Transactions on Pattern Analysis & Machine Intelligence, vol. 99, p. 1 (2017) 5. Yu, C., Wang, J., Peng, C., et al.: BiSeNet: bilateral segmentation network for real-time semantic segmentation. Eur. Conf. Comput. Vis. 1–17 (2018) 6. Kendall, A., Badrinarayanan, V., Cipolla, R.: Bayesian SegNet: Model uncertainty in deep convolutional encoder-decoder architectures for scene understanding. Preprint at arXiv:1511. 02680 (2015) 7. Chen, L.C., Papandreou, G., Kokkinos, I., et al.: Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. IEEE Trans. Pattern Anal. Mach. Intell. 40(4), 834–848 (2018)

Research on the Computational Model of Problem-Based Tutoring Yan Liu, Qiang Peng, and Lin Liu

Abstract The existing intelligent tutoring still follows the traditional classroom teaching mode, with knowledge point as the center, which emphasizes the transfer of knowledge and neglects the problem-solving ability training. Problem-based learning can effectively solve the dilemma of the above teaching mode, but the existing intelligent tutoring technology still does not support it. To this end, this paper puts forward a new idea of problem-based intelligent tutoring and carries out the theoretical analysis about its computational feasibility. Firstly, we make a deep analysis about the cognitive activities of human teachers in the process of problem-based learning and abstract out the core elements in this process from the four aspects of concept, relationship, operation and control. After that, by using these core elements, we give an abstract description about the teachers’ cognitive process in the problem tutoring situation, so as to complete the construction of the cognitive model for problembased tutoring. Based on this cognitive model, we firstly make the formal definitions about all of the conceptual and relational elements, then analyze the control schemes and the functional requirements about the operational elements completely, lastly use the pseudocode to describe the complete algorithm implementations of these operations. All of the above formal specifications about the concepts, relations and operations make up the computational model for problem-based tutoring, which lays the foundation for the system design and development int the future. Keywords Intelligent tutoring · Computational model · Cognitive model · Problem-based learning

1 Introduction The existing classroom teaching mode originated in the era of mechanized production, whose main characteristics are standardization and streamline: students are regarded as the raw materials inputted into the assembly line and are processed Y. Liu (B) · Q. Peng · L. Liu Wuhan University of Technology, 122 Luoshi Road, 430070 Wuhan, Hubei, P.R. China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_44

447

448

Y. Liu et al.

according to the unified standard and procedure, and then, the workers who meet the needs of the society are manufactured massively. In this traditional classroom teaching mode, teachers are in the dominant position, teaching is mainly knowledge indoctrination, while the capability training for the students to explore and solve problems independently is ignored. In order to solve the above problems, some educational experts began to explore the transformation of classroom teaching mode and put forward a variety of solutions such as exploratory learning, independent learning and cooperative learning. In the 1980s, some scholars further proposed the problembased learning [1]. In the following decades, more and more educational theoretical researchers and front-line teachers joined the research and practice of the problembased learning, so that this theory has been continuously improved, perfected and deepened, a lot of theoretical results have been obtained, and a wealth of practical experience has been accumulated. The successful practice of the problem-based learning in the field of classroom teaching has attracted the attention of some online educational researchers, and they began to explore the possible ways to extend the problem-based learning to online education. In 2007, Maggi Savin-Baden et al. proposed to use the problem-based tutoring method to improve the learning quality and problem-solving skills of online learners, with a hope to promote the online education service providers to transform their teaching method gradually [2]. But in practical application, this solution still has the following limitations: (1) The number of online learners is so large that the teacher cannot guide everyone; (2) The learning foundation of the online learners varies so wide that it is difficult for the teacher to guide all these learner by using the same set of tutoring problems prepared in advance; (3) Many online learners are busy at work, so it is hard for them to fix their learning time. When the live teaching time is missed, they can only watch on-demand course, thus cannot receive the problem-based tutoring. In order to overcome the limitations of the above solution, it is worth trying to use machine to replace the human teachers to implement the problem-based tutoring. The complete realization of the solution includes a great deal of research and development work, in which the computational feasibility study is of special importance, because it provides the theoretical basis for other research and development activities. This paper mainly describes our research in this direction, including the cognitive model and the computational model for problem-based tutoring.

2 Current State of Research and Our Research Approach 2.1 Current State of Research on Problem-Based Tutoring Implementing the teaching functions of human teachers by machine has always been an active research field in artificial intelligence, and the various related studies in

Research on the Computational Model of Problem-Based Tutoring

449

this field on system architecture and intelligent algorithm are referred to as the intelligent tutoring research collectively [3]. The existing intelligent tutoring is deeply influenced by the traditional classroom teaching mode that it organizes the teaching resources around the knowledge point, plans the learning path according to the dependency between knowledge points and evaluates the learning effect by testing the knowledge points that have been taught. Therefore, more accurately, the existing intelligent tutoring is essentially the knowledge point-based intelligent tutoring. Unlike the above traditional classroom teaching mode, the problem-based learning focuses on the capacity cultivation in problem discovery, analysis and solving, and the teacher organizes the teaching activities around problems. For all kinds of solutions that use machine to implement the teaching functions in the problem-based learning, this paper calls them collectively as the problem-based intelligent tutoring. The existing studies on the intelligent tutoring are focused on the knowledge point-based intelligent tutoring almost. Some representative research achievements are shown in the following. In 1970, Professor Jaime Carbonell systematically discussed the feasibility of applying artificial intelligence technology in computerassisted instruction and put forward the concept of intelligent tutoring system for the first time [4]. In 1985, based on their research results in cognitive psychology, Professor John R. Anderson’s research team proposed the design scheme for the intelligent tutoring based on the ACT-R cognitive architecture model [5]. In 1987, Professor Etienne Wenger, who has completed the analysis about various intelligent tutoring solutions existed by then, abstracted out the modular structure of the intelligent tutoring system that included domain knowledge management, learner status tracking and evaluation, teaching control and user interface. Most of the subsequent intelligent tutoring systems adopt or learn from this structure [6]. In 1994, R. A. Khuwaja et al. proposed the dialogue-based intelligent tutoring system scheme [7]. In 1996, Baffes et al. proposed the rule-based intelligent tutoring system design for the first time [8]. In 1997, Cristina Conati et al. first proposed and implemented the learner model and the teaching control scheme based on Bayesian network [9]. In 2002, Timothy Wang et al. first proposed the teaching control technology based on artificial neural network [10]. In 2003, Alenka Kavˇciˇc et al. used the fuzzy sets to describe the learner status and the content topics for the first time and selected the suitable learning content for learners based on fuzzy reasoning mechanism [11]. As to the study of the problem-based intelligent tutoring, this research direction is still in the initial stage, and no influential research results have been seen.

2.2 Basic Research Approach As mentioned earlier, the research on the problem-based intelligent tutoring is still in the initial stage; to achieve this goal, a large number of research and development works wait to be completed. But before that, the following question must first be

450

Y. Liu et al.

answered clearly: Can the problem-based tutoring be achieved by means of computation? This paper will carry out the corresponding theoretical analysis and then gives a clear answer. The research approach in this paper is as follows. First of all, the cognitive activities of human teachers in the process of the problem-based learning are analyzed in depth, and some core elements are abstracted out from the four aspects of concept, relationship, operation and control; then, these elements are used to describe and define the cognitive process of the teacher in the problem-based tutoring situation, so as to complete the construction of the cognitive model for problem-based tutoring. Then, the connotation of the conceptual and relational elements in the cognitive model will be clearly defined, and the control and operational elements will be specified formally and completely; all of them make up the computational model for problembased tutoring. Finally, based on the previous theory analysis, a clear conclusion about the computational feasibility of the problem-based tutoring is given.

3 Cognitive Model for Problem-Based Tutoring Intelligent tutoring essentially means to implement the teaching functions of the human teacher by algorithm. Because the teaching behaviors of the human teacher are controlled by his inner psychological activities which, from the viewpoint of cognitive psychology, are cognitive activities, the problem-based intelligent tutoring means to algorithmize the cognitive activities which are implemented by human teachers in the process of problem-based tutoring. But to complete the above algorithmization, we must first have a clear understanding and accurate description of these cognitive activities. To this end, this section will carefully analyze the cognitive activities in the process of problem-based tutoring and construct the corresponding cognitive model. Any teaching process includes two sub-processes: “teaching” and “learning.” According to the cognitive psychology, whether it is the process of “learning” or “teaching,” they all are cognitive processes. For “learning”, the subjects of the cognitive activities are learners and the cognitive process can be regarded as the cognitive state migration process of learners, as shown in Fig. 1; the learner starts from the initial cognitive state a, through the cognitive state b, h in turn, and finally reaches the target cognitive state n. Compared with “learning”, “teaching” is another kind of higher cognitive process. The subjects of this cognitive process are teachers, and the problem they want to solve is to guide the learner from the initial cognitive state to the target cognitive state. As a “teaching” method, the problem-based tutoring manifests itself as a special cognitive process, as shown in Fig. 1: (1) When starting the problem-based tutoring, the teacher first identifies the learner’s initial and target cognitive state, then refers to the problem system (which may only exist in the teacher’s mind) to plan the problem-based tutoring, determines the tutoring problems (Pab , Pbh and Phn ) and the order of their use, then guides the learner through these problems in turn and finally

Research on the Computational Model of Problem-Based Tutoring

451

Fig. 1 Learner’s cognitive state transition in the process of problem-based tutoring

helps the learner migrate from the cognitive state a to the cognitive state n; (2) For the same learner, another teacher may choose another set of tutoring problems (Pai , Pij , Pjk and Pkn ) and can also help the learner migrate from the cognitive state a to the cognitive state n; (3) For another learner with the different initial cognitive state (such as the cognitive state o), the same teacher will choose another set of tutoring problems (Pop , Ppq , Pqr , Prm and Pmn ), so as to help this learner migrate from the cognitive state o to the cognitive state n after completing these problems in turn; (4) In the process of problem-based tutoring, when the teacher receives the response from the learner that the current tutoring problem (Pbh ) cannot be solved, he will consult the problem system and then reduces the problem Pbh to several other subproblems (Pbc , Pcd and Pdh ). After the learner solved these subproblems in turn, he also mastered the solution approach of the original problem; (5) When the learner still cannot successfully answer all the above subproblems (Pbc , Pcd and Pdh ), the teacher can consult the problem system and reduce the original problem Pbh to another set of subproblems (Pbe , Pef , Pfg and Pgh ). After the learner solved these new subproblems in turn, he also can solve the original problem. After summarizing the above descriptions about various cognitive activities in the problem-based tutoring, a cognitive model is extracted, as shown in Fig. 2, which describes the cognitive process of the problem-based tutoring entirely. (1) After receiving the request from some educational organization or learner, the teacher initiates the problem-based tutoring; (2) Querying the related information, including the learner’s current cognitive state, the classroom objective problem and the problem system and then creating the tutoring problem system; (3) Selecting the next tutoring problem from the tutoring problem system; (4) Requesting the learner to solve the tutoring problem; (5) Waiting for the feedback about the problem-solving result from the learner; (6) Determining whether the learner solved the tutoring problem successfully, if so, continue, otherwise go to (3);

452

Y. Liu et al.

Fig. 2 Cognitive process in problem-based tutoring

(7) Determining whether the learner solved the problem that describes the classroom objective problem, if so, continue, otherwise go to (3); (8) Updating the cognitive state records about the learner; (9) Ending the problem-based tutoring.

4 Computational Model for Problem-Based Tutoring The cognitive process in the problem-based tutoring is described in the previous section, and the so-called problem-based intelligent tutoring is to implement this cognitive process by machine. To achieve this goal, the following tasks must be accomplished first: (1) Making the clear definitions about the connotation of related concepts and relations in cognitive model, and providing their formal representations; (2) Making in-depth analysis of the input and output requirements about the relevant operations in the cognitive model, and giving a complete formal description about

Research on the Computational Model of Problem-Based Tutoring

453

the algorithm implementation of these operations; (3) Giving a complete formal description about the algorithm implementation of the cognitive process. By means of careful analysis of the description of the cognitive activities in the problem-based tutoring, we can extract the following core concepts: problem, problem system, tutoring problem system, cognitive state, initial cognitive state, target cognitive state, current cognitive state and so on. In this section, the formal representations of these core concepts are discussed first. (1) Problem: refers specifically to any problem that can be used for teaching with the clear answer. The complex problem always can be reduced to some other simpler subproblems. In order to represent this hierarchical relation, we partition all the problems into the problem sets with different order numbers. For the ith problem in the mth-order problem set, we write it as pi(m) (m, i ∈ N). It is the basic concept that will be used to define other concepts listed below; (2) Classroom objective problem: For the problem-based learning, its teaching objectives can be expressed in problems. For the problem that is used to express the class teaching objective, this paper refers to it as the classroom objective problem and write it as COP; (3) Problem set: the set that is composed of some problems that satisfy the Definition (1). For each problem set that includes all the problems with the same complexity, we write it as P (m) (The superscript m refers to the order of the problem set and is some natural number). For the nth subset in the mth-order problem set, we write it as Pn(m) (The subscript n refers to the index of the problem subset and is a natural number); (4) Problem system: consisting of a problem set and two binary relationships defined on that set, mainly used for the creation of the tutoring problem system, written as (Pall , synthesis, reduction). Its components are defined below: (4.1) Pall : represents the problem set that includes all the problems that satisfy the Definition (1); (4.2) synthesis: represents the synthesis relation among more than one prob  (m+1) (m) indicates that the problem pi(m+1) can be lem; synthesis Pn , pi created by all the problems in the problem set Pn(m) , and   synthesizing (m) indicates the set that are made up by all the problems synthesis Pn that can be created by synthesizing all the problems in the problem set Pn(m) , so synthesis can also be seen as the problem creation operation which accepts one problem set as input and outputs the problem set that all its element is created by synthesizing all the problems in the input problem set. From the point of view of the algorithm implementation, synthesis mainly represents a problem creation operation, while the synthesis relation can entirely be determined by this operation; (4.3) reduction: the inverse relation of synthesis, that is, reduction =   (m+1) −1 (m) indicates that the problem , Pn synthesis . The reduction pi pi(m+1) can be reduced to the whole problems in the problem set Pn(m) , and

454

Y. Liu et al.

  reduction pi(m+1) indicates all those problem sets that can be obtained by reducing problem pi(m+1) , so reduction can be seen as a problem reduction operation; (5) Tutoring problem system: used to provide the tutoring problems required in the process of the problem-based tutoring. It is a problem system created by the teacher according to the problem system, the learner’s current cognitive state and the classroom objective problem. This system consists of a set of problems and a binary relationship defined on that set, written as (Pt , reductiont ). Its components are defined below: (5.1) Pt : a set of tutoring problems that are needed in the process of the problem-based tutoring; (5.2) reductiont : represents the reduction function: Pt → Pt × Pt . It can be used to reduce the specified tutoring problem to two tutoring subproblems; (6) Cognitive state: the set which contains all the problems that can be solved by the corresponding learner; when the highest order of the problem sets included in this cognitive state is n, we write it as Sn (n ∈ N). The more problems learners can solve, the stronger their cognitive ability is, the weaker the opposite. Sn =

n k=0

   P (k) ∪ p1(n+1) , p2(n+1) , . . . , pk(n+1)

(1)

pi(n) represents the ith problem in the n -order problem set that can be solved by the learner with the cognitive state Sn . In the description of the cognitive process of the problem-based tutoring, the following cognitive states are often used: (6.1) Initial cognitive state: the cognitive state that the learner has at the beginning of learning, written as Si ; (6.2) Target cognitive state: the cognitive state that the learner has at the end of learning, written as Sg ; (6.3) Current cognitive state: the learner’s cognitive state that the teacher gets when he creates the corresponding tutoring problem system, written as Sc ; (6.4) Primitive cognitive state: Any learning cannot be carried out without foundation and is always based on certain cognitive basis. This paper refers to the cognitive state in which people start learning at the first time as the primitive cognitive state and write it as S p . In the process of formalizing the above concepts, in addition to the core concepts, we also defined two cognitive relations: synthesis, reduction. By further analysis of the cognitive activities about the problem-based tutoring that are described

Research on the Computational Model of Problem-Based Tutoring

455

in the previous section, two other cognitive operators can be extracted: CreateTutoring_Problem-System, Select_Tutoring_Problems and their formal definitions are showed as follows.

4.1 Create-Tutoring-Problem-System Based on the zero-order problem set P (0) and the synthesis operator, N-order problem system (P (N ) , synthesis(N ) , reduction (N ) ) (N ≥ 1) can be constructed as follows: P (N ) =



y|y = synthesis(x), x ∈ 2 P

(N −1)

, (|x| = 2 or |x| = 1)

 (2)

  (N −1) synthesis(N ) = (x, y)|x ∈ 2 P , (|x| = 2 or |x| = 1), y ∈ synthesis(x)

(3)

  (N −1) reduction(N ) = (x, y)|y ∈ 2 P , (|y| = 2 or |y| = 1), x ∈ synthesis(y)

(4)

The problem system constructed in the above way has the following features: (1) The N-order problem set P (N ) contains the N-1-order problem set P (N −1) ; (2) Any problem in the problem set P (N ) can be reduced to the subproblems in P (N −1) , and there may be multiple reduction results; any reduction result contains only two subproblems, as shown in Fig. 3. When implementing the problem-based learning, teachers use the tutoring problems to help the learner implement the cognitive state migration. With the increasing of the solvable problems, the learner’s cognitive state migrates continually from the primitive cognitive state. When the set of solvable problems is a superset of the Norder problem set and a proper subset of the (N + 1)-order problem set, the learner’s Fig. 3 Problem system structure

456

Y. Liu et al.

current cognitive state can be defined as Sn , and at the same time, depending on the Formula (1), it can be inferred that P (n) ⊆ Sn ⊂ P (n+1)

(5)

As shown in Fig. 2, in order to help the learner solve the classroom objective problem, after receiving the tutoring request, the teacher needs to construct the tutoring problem system according to the learner’s current cognitive state and the classroom objective problem; the basic idea is as follows: suppose the classroom objective problem COP belongs to the newly added part of the N-order problem set and suppose the learner’s current cognitive state is SK , then from the above Formula (5), it can be concluded that, for the learner, all the problems in the K-order problem set are solvable and can be regarded as the primitive problems during the construction of the tutoring problem system. As can be seen from the above construction Formula (2),(3) and (4), for the classroom objective problem COP, there always exist the set p1(N −1) , p2(N −1) that satisfy the N-order relation reduction(N ) , that is,   p1(N −1) , p2(N −1) ⊂ reduction(N ) (COP), so COP can be reduced to two subproblems p1(N −1) and p2(N −1) . If p1(N −1) and p2(N −1) are not the primitive problems, they need to be reduced also, and each of them will be reduced to the two subproblems in the (N−2)-order problem set. The reduction operation will continue until all unreduced problems are primitive problems. Once the tutoring problem system is built, it will have the structure shown in Fig. 4. As the Fig. 4 shows, the classroom objective problem COP in the N-order problem set, need to be reduced to the two (n-1)-order problem p1(N −1) and p2(N −1) , these two subproblems are not included in the learner’s current cognitive state SK , so they need to be reduced respectively to the more basic problems in the (N-2)-order problem set, which generates the two subproblem

Fig. 4 Tutoring problem system structure

Research on the Computational Model of Problem-Based Tutoring

457

    sets p3(N −2) , p4(N −2) and p5(N −2) , p6(N −2) respectively. The above reduction oper(K ) (K ) ation will continue until all the unreduced problems (such as p2M−1 , p2M ) belong to the current cognitive state SK . The cognitive psychological activities of the Create-Tutoring-Problem-System operation are detailed above. When using a machine to implement the above cognitive psychological activities, we must transform them to a sequence of symbolic processing which is shown below.

458

Y. Liu et al.

4.2 Select-Tutoring-Problem As shown in Fig. 2, after the creation of the tutoring problem system is completed, the teacher will select the appropriate problem from this system to guide the learner to complete the learning task. Learners have two possible responses to any tutoring problem: problem-solving is successful, problem-solving is failed. The teacher needs to choose the next tutoring problem based on the learner’s feedback information, so as to ensure that the learner can finally answer the class objective problem. Similarly, in order to implement Select-Tutoring-Problem psychological operation, the above psychological activities need to be converted into a sequence of symbol processing, and the results of which are shown below.

5 Conclusion The existing intelligent tutoring system still follows the traditional classroom teaching mode, teaching around the knowledge points, emphasizing the transfer of knowledge, while neglecting the problem-solving ability training. In order to solve the above problem, this paper puts forward a new idea of problem-based intelligent tutoring and completes in turn the construction of the cognitive model and the computational model for problem-based tutoring.

Research on the Computational Model of Problem-Based Tutoring

459

The study of the problem-based intelligent tutoring is still in the initial stage, and there are still a lot of theoretical analyses and system development works to be completed. We will continue to advance the follow-up research and development works on the basis of this paper, including the description method about the learner’s cognitive state, the semantic description about the problem, the structure design about the problem system, the architecture design for the problem-based tutoring system, the cognitive state detection algorithm, the planning algorithm for the problem-based tutoring, etc.

References 1. Moallem, M., Hung, W., Dabbagh, N.: The Wiley Handbook of Problem-Based Learning. Wiley, Hoboken, NJ (2019) 2. Savin-Baden, M.: A Practical Guide to Problem-based Learning Online. Routledge, NY, USA (2009) 3. Nkambou, R., Bourdeau, J., Mizoguchi, R.: Advances in Intelligent Tutoring Systems. Springer, Berlin (2010) 4. Carbonell, J.R.: AI in CAI: Artificial intelligence approach to computer assisted instruction. IEEE Trans. Man Mach. Syst. 11(4), 190–202 (1970) 5. Anderson, J.R., Boyle, C.F., Reiser, B.J.: Intelligent tutoring systems. Science 228, 456–462 (1985) 6. Wenger, E.: Artificial Intelligence and Tutoring Systems: Computational and Cognitive Approaches to the Communication of Knowledge. Morgan Kaufmann, Los Altos, CA (1987) 7. Khuwaja, R.A., Evens, M.W., Michael, J.A., Rovick, A.A.: Architecture of CIRCSIM-Tutor (v.3): A smart cardiovascular physiology tutor. In: Proceedings of the 7th Annual IEEE Computer-Based Medical Systems Symposium, pp. 158–163. IEEE Computer Society Press, Winston-Salem, NC (1994) 8. Baffes, P., Mooney, R.: Refinement-based student modeling and automated bug library construction. J. Artif. Intell. Educ. 7(1), 75–116 (1996) 9. Conati, C., Gertner, A.S., VanLehn, K., Druzdzel, M.J.: On-line student modeling for coached problem-solving using bayesian networks. In: Proceedings of Sixth International Conference on User Modeling, pp. 231–242. Springer, Vienna (1997) 10. Wang, T., Mitrovic, A.: Using neural networks to predict student’s performance. In: Proceedings of International Conference on Computers in Education, pp. 969–973. IEEE, Auckland (2002) 11. Kavcic, A., Pedraza-Jimenez, R., Molina-Bulla, H., Valverde-Albacete, F.J., Cid-Sueiro, J., NaviaVazquez, A.: Student modeling based on fuzzy inference mechanisms. In: The IEEE Region 8 EUROCON 2003. Computer as a Tool, pp. 379–383. IEEE, Ljubljana (2003)

Research on Face Recognition Algorithms and Application Based on PCA Dimension Reduction and LBP Kangman Li and Ruihua Nie

Abstract In the face recognition system on campus, the influence of time and age change on face features can be neglected. This paper proposes a dimension reduction algorithm based on principal component analysis (PCA) algorithm and local binary patterns (LBP), and it is applied to campus face recognition APP. It is proved that the algorithm can significantly improve the speed and ensure its recognition accuracy in the application of small changes in the face and has certain reference value for practical application. Keywords Face recognition · PCA · Local binary patterns

1 Introduction Face recognition technology has been widely used in various fields. However, too many uncontrollable factors of the face and the large amount of data to be processed lead to slow recognition speed and low recognition rate [1, 2]. An APP for face recognition on campus has little change in the face features of the students it deals with. Therefore, we can design a dimension-reduced LBP face recognition algorithm based on PCA algorithm, which not only ensures the recognition rate, but also improves its speed [3–5].

2 Principle of PCA Face Recognition Principal component analysis (PCA) known as K-L transformation, mainly relies on the position information of samples in space, is a linear data analysis method based on statistical characteristics [1, 2]. Assuming that the variance of samples is the largest K. Li (B) · R. Nie College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, Hunan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_45

461

462

K. Li and R. Nie

in some directions (it is considered that the signal has a larger variance and the noise has a smaller variance in signal processing), we can project samples onto the straight lines of these directions, eliminating the correlation and noise between samples in the projection process [6–9]. Next, the algorithm can be analyzed by example training.

2.1 Training For the convenience of narration, the eigenvectors corresponding to 60 images are selected as training samples. Its corresponding eigenvector x i is [1, 2, ts]T Construct the following matrix: x = (x1 , x2 , . . . , x60 )T

(1)

The average face is obtained by calculating the average value of the image [2]. 1  xi 60 i=1 60

Ψ =

(2)

Calculate the difference between each image and “average face”: di = xi − Ψ, i = 1, 2, . . . , 60

(3)

Construct covariance matrix [2]: 1 1  A A T , A = (d1 , . . . , d60 ) di diT = 60 −1 60 60

C=

(4)

In order to save computing time, the method of singular value decomposition (SVD) can be adopted to reduce the dimension. The ratio of intercepted eigenvalue to occupied eigenvalue can be calculated (the λ is the eigenvalue of AT A.): p ϕ = i=1 60 i=1

λi λi

(5)

The eigenvectors are arranged by eigenvalues in descending order, and the first p eigenvectors are selected. Then, we can solve the eigenvector of primary covariance matrix as follows [3]: 1 u i = √ A Vi , i = 1, 2, eip λi

(6)

Research on Face Recognition Algorithms and Application …

463

Constituting feature face space:   w = u1, u2, . . . , u p

(7)

If i is the difference between the image i and the average face, then [3] Ωi = w T di , i = 1, 2, . . . , 60

(8)

The training part is completed by projecting i to “feature face space.”

2.2 Recognition The difference between the face to be recognized and the average face is calculated, and the eigenvectors are obtained as follows: Ω Γ = wT (Γ − Ψ )

(9)

Define classification criteria threshold: θ=

1 max {Ωi − Ω∂ }i, j = 1, 2, e th 2 i, j

(10)

Finding eigenvector T Euclidean distance from each image in “feature face space” εi :

 2 εi2 = Ωi − Ω  , i = 1, 2, . . . , 60

(11)

Computing the distance (ε) between of the original face and f of the face reconstruction based on “featured face space”:   ε2 =  − 2f , When f = wΩ + Ψ

(12)

If ε ≥ θ , then there is no face in the input. If ε < θ, εi ≥ θ , then there is a face in the input, but the face is unknown. If ε < θ, ε i < θ , then the input is the image of the K person in the library.

3 LBP Operator Principle LBP operator is a feature extraction method based on the relationship between the gray value of a pixel and its surrounding pixels [10–12]. A window of 3 × 3 size can be chosen as an example.

464

K. Li and R. Nie

Fig. 1 Round LBP operator diagram

The gray value of the center pixel is chosen as the threshold value to mark as gC . Start with the first pixel on the right of the central pixel, number counterclockwise from 0, the weights of pixel i are 2i , and the gray values are recorded as g0 , g1 , . . . , g7 in turn. The pixels around the center pixel are binarized. It is recorded as 1 when gi > gc, otherwise is recorded as 0. Finally, the binarization results of each pixel are multiplied by their weights and accumulated to get the final results. There are LBPgc =

7 

S(gi − gc )2i , S(x)is a binary function.

(13)

i=0

It is not difficult to see that the area of this square has limitations. At most, only eight pixels around it can be analyzed. So, the circular LBP operator is introduced, which is expressed as LBP RP , where R denotes the radius of a circular neighborhood and P denotes the number of neighborhood pixels (Fig. 1) [10–12]. Local texture in region P (p > 1) is marked as T, and its distribution is as follows:   T = t gC , g0 , . . . , g p−1

(14)

Since some points may not fall on a certain pixel, we need to use a bilinear interpolation to calculate the gray value of these pixels. Let the coordinates   algorithm of g p be x p , y p and central be (xc , yc ). Then 

 x p , y p = (xc + R cos(2π p/P), yc − R sin(2π p/P))

(15)

Ideally, no information will be lost. If the joint distribution of the difference between central and peripheral pixels is obtained, the joint distribution can be used to represent local texture features. T = t(gc )(g0 − gc , . . . , g P−1 − gc )

(16)

If g P − gC ( p = 0, 1, . . . , p) Independent of gC , then T ≈ t(gc )(g0 − gc , . . . , g P−1 − gc )

(17)

Research on Face Recognition Algorithms and Application …

465

Considering that LBP has the invariance of gray translation and the influence of double gray value, texture features can be expressed as follows:    T ≈ t s(g0 − gc ), . . . , s g p − gc

(18)

Weighting every position in the field and the weight of position P is 2P , then sum it up. The texture features of the neighborhood of the central pixel are described as follows: LBP P,R (xc , yc ) =

P−1    S g p − gc 2 p

(19)

p=0

In the above formula, the case of the difference in theneighborhood is represented  as a binary sequence, and the value of LBP is limited to 0, 2 p−1 ,. Within this scope, it has become a LBP mode.

4 Improved Face Recognition Algorithm Based on PCA Dimensionality Reduction and LBP Through the study of PCA and LBP algorithm and the analysis of simulation experiment results, the two algorithms have their own advantages and disadvantages. Although PCA algorithm has some advantages in the efficiency of the algorithm and multi-face recognition, the recognition rate of LBP algorithm is not as good as that of LBP algorithm. In contrast, although the recognition rate of LBP algorithm is higher than that of PCA algorithm, it needs to calculate more vector information. The computational complexity is higher. When the change of the face features is small, we can use the PCA dimensionality reduction LBP algorithm.

4.1 Overview of LBP Operator Based on PCA Dimension Reduction Feature extraction can be used to achieve dimensionality reduction. Ideally, the result of feature extraction should be the most representative feature of an image, which contains the most basic information of the image. As mentioned above, PCA algorithm satisfies the requirement, and its essence is to use lower-dimension vectors to represent higher-dimension vectors as far as possible. On the one hand, PCA eliminates the correlation between samples. On the other hand, PCA eliminates redundant information and preserves useful information as completely as possible.

466

K. Li and R. Nie

4.2 LBP Suboperators Seek Principal component analysis is actually projecting the unit orthogonal vector to a principal direction, in which the group of vectors with the smallest error from the original sample is the principal component, and the principal component is selected as the subspace. If W is used to represent pattern categories, then C pattern categories are expressed as follows: w1 , w2 , . . . , wC . If “i” is used to represent the category, the range of values is [1, c], then n i of each training sample image; N is used to represent the total number of samples; f i j (x, y) is used to represent the image j of class i; m is used to represent a certain LBP mode, which varies according to the different LBP operators used. The histogram of LBP mode can be expressed as follows by histogram statistics after calculating with LBP RP operator: Hi j (m) =

   I f i j (x, y) = m , m = 0, 1, 2, . . .

(20)

x,y

Defined function I for: I ( A) =

1 A = true 0 A = false

(21)

If we want to reduce the dimension to m, we arrange the eigenvalues of H covariance matrix in descending order, and then select the eigenvectors corresponding to the first m eigenvalues to form A. The matrix is projected onto projection transformation matrix A by linear transformation L = AH. L is the projection of H in LBP subspace, which is called LBP suboperator.

4.3 Algorithm Algorithmic flow: (1) Image preprocessing The recognition image is preprocessed by denoising, histogram equalization, homomorphic filtering and geometric correction. (2) Feature extraction The recognition image is segmented. The texture features of the image are extracted by LBP operator, and the corresponding histogram representation is obtained. The response vector is obtained by histogram.

Research on Face Recognition Algorithms and Application …

467

(3) Dimension reduction The mean vectors of the response vectors are obtained, the covariance matrix is constructed, the eigenvalues of the covariance matrix are arranged in descending order, and the eigenvectors corresponding to the first n eigenvalues are selected. (4) Classification and recognition The Euclidean distance between the sample to be classified and the training sample is calculated and classified according to the nearest neighbor classification method.

5 Simulation Experiment and Analysis 5.1 Simulation Experiments of Three Algorithms Running these three algorithms on the MATLAB platform and ORL face database is selected as training set and testing set [13] in the experiment (Fig. 2). In this experiment, the recognition accuracy of the algorithm is tested by controlling the training rate. When x (the training rate, it means the first 10 * x images of each person will be used as the training set, while the other 10 * (1−x) images will be used as the test set.) is 0.1, 0.3, 0.5, 0.6, 0.7 and 0.8, respectively, the accuracy of face recognition algorithms based on three different algorithms is calculated. (1) PCA face recognition algorithm Observed from Table 1, its accuracy is positively correlated with the training rate. The recognition rate increases rapidly with the training rate when x is lower than 0.6,

Fig. 2 Some head images in ORL image library

Table 1 Recognition rate of face recognition algorithms based on PCA x

0.1

0.3

0.5

0.6

0.7

0.8

Recognition rate (%)

54.44

63.57

78.5

90.62

92.3

93.75

468

K. Li and R. Nie

Table 2 Recognition rate of face recognition algorithms based on LBP x

0.1

0.3

0.5

0.6

0.7

0.8

Recognition rate (%)

67.2

86.4

92.5

95.5

97.5

98.3

Table 3 Recognition rate of PCA dimensionality reduction LBP face recognition algorithm x

0.1

0.3

0.5

0.6

0.7

0.8

Recognition rate (%)

65

84.6

91.6

94

96.2

96.7

but the recognition rate is higher than 90% and the recognition rate increases slowly with x when x is higher than 0.6. (2) LBP face recognition algorithm (Table 2) Compared with the previous table, LBP algorithm has the higher recognition rate, but because of its high feature dimension, it consumes more computational work and its speed is lower than PCA. (3) PCA dimensionality reduction LBP face recognition algorithm (Table 3) At the same training rate, the recognition accuracy lies between PCA algorithm and LBP algorithm. However, the experimental calculation scale is greatly reduced.

5.2 The Application of the Algorithms in Face Recognition App The algorithm based on this idea is applied to the face recognition app on Android platform, and the results of face recognition are as follows: (Fig. 3). The face recognition test is carried out through the face recognition app. The registration information of the same face is taken in real time, and the recognition login is successful. The recognition accuracy is not affected, but the speed is accelerated.

6 Conclusion By comparing the three algorithms, we can find that LBP has the highest recognition accuracy, but also the largest amount of computation. In the application of face features with little change, we can use the PCA dimension-reducing LBP method to reduce the requirement of eigenvalues, greatly reduce the amount of computation and improve the speed.

Research on Face Recognition Algorithms and Application …

469

Fig. 3 Face recognition app

Acknowledgements This work was supported by Application-oriented Special Disciplines Double First-Class University Project of Hunan Province (Xiangjiaotong [2018] 469), Hunan University Students’ Research Learning and Innovative Experiment Project (Hunan Education Tong [2018] 255:750) and National Innovation and Entrepreneurship Training Program for College Students (201810546007).

References 1. Xu, J.Z., Wu, Z.H., Xu, Y. et al.: Face recognition based on PCA, LDA and SVM algorithms. Comput. Eng. Appl. 1–6 (2019) 2. Li, M.X., Yao, S.Y.: Design and improvement of face recognition system based on PCA. Comput. Sci. 46(S1), 577–579 (2019) 3. Wang, W.Q., Gao, G.K.: Cross-age face recognition based on PCA and SVM classification. Comput. Era (7) (2019) 4. Yu, F.J., Zhang, B., Jia, B.L.: A model of face recognition based on feature location and PCA algorithm to reduce the interference of age factors. Electron. Qual. 6, 79–86 (2019) 5. Dong, E.Z., Wei, K.X., Yu, X., Feng, Q.: A model recognition algorithm integrating PCA into LBP feature dimension reduction. Comput. Eng. Sci. 39(2), 359–363 (2017) 6. Zhao, H.H., Liu, H.: Multiple classifiers fusion and CNN feature extraction for handwritten digits recognition. Granul. Comput. (2019) 7. Zhao, H.H., Rosin, P., Lai, Y.K.: Image neural network style transfer with global and local optimization fusion. IEEE Access (2019) 8. Zhao, H.H., Rosin, P., Lai, Y.K. Zheng, J.H., Wang, Y.N.: Adaptive gradient-based block compressive sensing with sparsity for noisy images. Multimed. Tools Appl. (2019) 9. Zhao, H., Rosin, P.L., Lai, Y.K.: Automatic semantic style transfer using deep convolutional neural networks and soft masks. Vis. Comput. (2019) 10. Hu, C.S., Ding, D.H.: Multiplayer target dynamic face recognition. Mod. Comput. (Prof. Ed.) 30, 7–10 (2016)

470

K. Li and R. Nie

11. Zhu, L., Hu, T., Luo, F., Mao, L., Ji, Z.Y.: Identity authentication base on adaptive LBP face recognition. Comput. Eng. Sci. 36(11), 2217–2222 (2014) 12. Wang, W., Huang, F.F., Li, J.W., Feng, H.L.: Face description and recognition by LBP pyramid. J. Comput. Aided Des. Comput. Graph ICS 1, 301–304 (2009) 13. Ma, X.L., Liu, Q., Hu, K.Y.: MATLAB Image Processing. China Railway Publishing House, Beijing, pp. 189–191 (2013)

Research on Algorithms for Setting up Advertising Platform Based on Minimum Weighted Vertex Covering Ying Wang, Yaqi Sun, and Qinyun Liu

Abstract A classical problem in combinatorial optimization is the minimum weighted vertex covering problem. In practical applications, the weights on vertices are usually composed of some uncertain factors. This paper combines the stochastic fuzzy theory, uses the backtracking method to search subset tree to solve the minimum weighted vertex covering, and finally obtains the key points of setting up the advertising platform and solves the problem of how to set up the advertising platform reasonably under the stochastic fuzzy uncertain environment. Keywords Minimum weighted vertex covering · Random fuzzy theory · Uncertain environment · Advertising platform

1 Introduction Combination optimization problem is to find out the optimal grouping, arrangement, screening or sorting of discrete events by studying mathematical methods [1]. Minimum weighted vertex covering (MWVC) is a classical combinatorial optimization [2]. The practical problems in transportation, economic management and other fields can be transformed into the minimum weighted vertex covering problem [3, 4]. The weight on the vertex usually represents many factors such as time, cost and so on, which are uncertain in most cases [5, 6]. With the rapid development of the industry, customers are demanding higher and higher propaganda effects that advertising platforms can achieve, and more new requirements are put forward for the form of advertising platforms [7, 8]. Aiming at the advertising platforms of urban traffic intersection, this paper uses backtracking method to search subset tree to solve the minimum weighted vertex covering, puts forward the key platform point setting scheme and obtains the optimal solution under many uncertain factors.

Y. Wang (B) · Y. Sun · Q. Liu College of Computer Science and Technology, Hengyang Normal University, 421008 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_46

471

472

Y. Wang et al.

2 Basic Concepts 2.1 Vertex Covering Given an undirected vertex Weighted graph G = (V, E, W ), where V is the vertex set, E is the edge set, and each vertex i ∈ V has a weight wi ∈ W . Let v ∈ V , e ∈ E, if v is associated with e, then vertex v covers edge e. Let vertex subset V1 ⊆ V , if every edge in E is associated with a vertex in V 1 , then V 1 is a vertex covering of graph G, and V 1 is the minimum vertex covering of graph G if there is |V1 | ≤ |V2 | for any vertex covering V 2 of graph G [9, 10]. Figure 1 contains seven vertices and seven edges. The vertex subsets {1, 2, 3, 4, 5, 6, 7}, {1, 3, 4, 5} are vertex covering of graph G1 , and the subset {1, 3, 5} is a minimum vertex covering of graph G1 . The minimum weighted vertex covering is to find a vertex covering so that the sum of the weights of the vertices in it is minimum. It can be described by the following formula:   xi wi (1) Minimize 

i∈V

Subject to : xi + x j ≥ 1 ∀(i, j) ∈ E 

xi , x j ∈ {0, 1} ∀i, j ∈ V

(2) (3)

Among them, Formula (1) is the objective function, which finds a vertex covering so that the sum of the weights of the vertices in it is the smallest. Formula (2) guarantees that at least one endpoint of each edge is in the candidate solution, so that the edge (i, j) is covered by the candidate solution. Formula (3) determines the range of constrained variables [11, 12]. In graph G1 , the subset of vertices {1, 2, 6, 7} is the minimum weighted vertex covering, whose weights are 12. It can be found that the minimum weighted vertex covering is not necessarily the minimum number of vertices; it is not only related to the number of vertices, but also to the weight of each vertex. Fig. 1 Undirected vertex weighted graph G1

Research on Algorithms for Setting up Advertising Platform …

473

2.2 Minimum Weighted Vertex Covering in Uncertain Environment In practical applications, the weights of vertices are usually uncertain, and the solution of the problem is usually much more complex. Therefore, in uncertain environments, the minimum weighted vertex covering problem needs to be solved by a new method. A set of vertices is represented by C = ci |i ∈ V }, where ci = 1 represents vertex i in the set and ci = 0 indicates that vertex i is not in the set. Assuming that the weight on each vertex i ∈ V is an uncertain variable, it is expressed by ξi . If ξ = {ξi } is used to represent the set of uncertain weights of all vertices in a graph, then the weights of any vertex covering C can be expressed by the following mathematical formulas: W (C, ξ ) =



ξi ci

(4)

2.3 Random Fuzzy Theory Fuzzy theory is based on the concept of fuzzy sets. L. Azad, a famous cybernetics expert and professor at the University of California, first proposed the concept of fuzzy set in l965. Complex systems, especially those with human intervention, have some uncertainties. Fuzzy mathematics is simple and powerful in dealing with such common systems. Assuming that  is a non-empty set and the power set ρ() of  represents the credibility measure, (, ρ(), Cr ) can be expressed as a credibility space. Define 1 If ξ is a function of the credibility space (, ρ(), Cr ) to the set of random variables, ξ is said to be a random fuzzy variable. Define 2 If ξ is a random fuzzy variable on the credibility space (, ρ(), Cr ) and B is a Borel set in R, then the chance measure of random fuzzy event {ξ ∈ B} is a function from (0, 1] to [0, 1], expressed as: Ch{ξ ∈ B}(α) =

sup inf Pr{ξ (θ ) ∈ B}

Cr {A}≥α θ∈A

(5)

Theorem If ξ is a random fuzzy variable on the credibility space (, ρ(), Cr ), then E[ξ ] =

+∞ 0 Cr {θ ∈ Θ|E[ξ (θ )] ≥ r }dr − Cr {θ ∈ Θ|E[ξ (θ )] ≥ r }dr 0

−∞

(6)

474

Y. Wang et al.

E[ξ ] is the expected value of the fuzzy variable ξ , and E is called the expected value operator. Define 3 If ξ and η are two random fuzzy variables, and the expectations of ξ and η are limited, a and b represent any pair of real numbers, then there are formulas as follows: E[aξ + bη] = a E[ξ ] + bE[η]

(7)

Define 4 If ξ is a fuzzy variable and has a finite expectation value E[ξ ], then    V [ξ ] = E[ ξ − E ξ ]2

(8)

is called the variance of fuzzy variable ξ .

2.4 Advertising Platform Problems Nowadays, with the rapid development of urban traffic network and the increasing traffic volume, more and more advertisers choose to set up advertisements at urban traffic intersections to attract customers. Figure 2 is a simple network map of advertising platforms. Each vertex in the graph represents a traffic intersection where advertising platforms can be set, and the edges between platforms represent the road where vehicles are traveling. Because of the uncertainties of geographical location, passenger flow, fire safety and other environments, the cost of setting advertisements on different platforms, the time of building platforms and the maintenance during the service life are also different, so the weights on the vertex of the graph have many meanings. Advertisers need to consider many factors, choose some key platforms, set up the number of advertising platforms reasonably, that is to say, reduce the cost Fig. 2 Simple network of advertising

Research on Algorithms for Setting up Advertising Platform …

475

of advertising platforms construction and achieve higher advertising efficiency. So this problem is a typical MWVC problem under uncertain environment.

3 Minimum Weighted Vertex Covering Algorithms in Uncertain Environment Uncertainty in reality often has multiple characteristics; that is, multiple uncertainties exist at the same time. Most scholars believe that the two most important uncertainties are randomness and fuzziness. Random fuzzy uncertain environment refers to a situation where both randomness and fuzziness exist. For this case, the uncertain variables can be represented by random fuzzy variables.

3.1 Random Fuzzy Expected Minimum Weighted Vertex Covering In practical application, the expected value is usually used to measure the level of random fuzzy variables. Define 5 In weighted undirected graph G, W (X, ξ ) denotes the weight of a vertex covering, C denotes a vertex covering of graph G, C  denotes any vertex covering in graph G; if E[W (C, ξ )] ≤ E[W (C  , ξ )]

(9)

then the vertex covering C is a random fuzzy expected minimum weighted vertex covering. Based on the above concepts, the following formulas are obtained: 

Minimize E





ξi ci

(10)

i∈V

Subject to : xi + x j ≥ 1 ∀(i, j) ∈ E 

xi , x j ∈ {0, 1} ∀i, j ∈ V

According to the theorem, it can be transformed into

(11) (12)

476

Y. Wang et al.

⎧  ⎪ Minimize E[ξi ]ci ⎪ ⎪ ⎨ i∈V

Subject to : xi + x j ≥ 1 ∀(i, j) ∈ E ⎪ ⎪ ⎪ ⎩ xi , x j ∈ {0, 1} ∀i, j ∈ V

3.2 Design of Algorithms Given that graph G has n vertices and m edges, the weight of vertex i is stored in w[i], the edge between vertex i and j is marked by e[i][j], and the vertex i is marked by c[i] in the vertex covering set. (1) Function cover (): Determines whether graph G is covered by vertices (marked with t) {

t=0,i=1; while (i=bestw) return; if (i>n) { if (cover ) bestw=s; return; } c[i]=0; cut (i+1, s); c[i]=1; cut (i+1, s+w[i]);

} The main function calls cut (1, 0) once to complete the whole backtracking search process, and the final best w is the sum of the minimum vertex weights.

Research on Algorithms for Setting up Advertising Platform …

477

4 Numerical Simulation Experiment Because the vertex covering problem in the fuzzy environment is an abstract combinatorial optimization problem, the actual data in real life is often not easy to obtain; this paper will take the numerical simulation method to verify. The simple undirected graph G2 = (V, E) shown in Fig. 3 represents a network of advertising platforms in an urban area. The weight of each vertex in the graph belongs to a fuzzy variable, and the fuzzy weight represented by each vertex is shown in Table 1. In uncertain environments, randomness can be measured by the set of influencing factors, while fuzziness is an inherent uncertainty, which is related to the meaning of information, so it is necessary to define a fuzzy membership function because the main purpose of this paper is to solve the key platforms of advertising platforms through minimum weighted vertex covering, and put forward a reasonable plan for setting up advertising platforms. So in the experiment, the maximum number of Fig. 3 Undirected graph G2

Table 1 Random fuzzy weight table represented by each vertex Vertex

Fuzzy weight

Vertex

Fuzzy weight

Vertex

Fuzzy weight

1

59, 27, 30, 7

13

53, 41, 67, 11

25

43, 99, 98, 9

2

92, 61, 40, 2

14

22, 73, 75, 6

26

78, 37, 49, 4

3

93, 34, 31, 6

15

69, 34, 22, 6

27

38, 38, 55, 8

4

83, 89, 59, 5

16

83, 38, 72, 5

28

59, 50, 98, 9

5

31, 52, 41, 5

17

73, 73, 89, 8

29

24, 28, 91, 1

6

88, 59, 94, 1

18

23, 68, 41, 8

30

59, 96, 45, 7

7

55, 55, 87, 3

19

43, 47, 41, 4

31

40, 71, 64, 20

8

59, 60, 33, 6

20

66, 49, 68, 3

32

35, 65, 84, 3

9

22, 57, 37, 4

21

33,23,61,12

33

91, 56, 23, 6

10

57, 92, 73, 1

22

81, 21, 71, 5

34

46, 49, 57, 2

11

97, 46, 36, 3

23

30, 20, 24, 7

35

93, 56, 75, 2

12

39, 60, 83, 7

24

98, 83, 93, 5

478

Y. Wang et al.

Table 2 Fuzzy minimum weighted vertex covering Influence factor

Minimum weighted vertex covering

1

{1, 6, 7, 8, 9, 10, 11, 12, 13, 18, 19, 20, 21, 22, 27, 28, 29, 30, 31, 32, 34}

2

{1, 6, 7, 8, 11, 12, 13, 15, 16, 17, 20, 21, 22, 23, 26, 27, 28, 29, 34, 35,}

3

{1, 2, 4, 8, 9, 10, 11, 12, 15, 19, 20, 21, 22, 23, 27, 28, 29, 30, 33, 35}

4

{1, 6, 7, 8, 9, 10, 11, 12, 15, 19, 20, 21, 22, 23, 26, 27, 28, 29, 34, 35}

influence factors is 6, and the fuzzy membership function is described by simple linear function or normal function. In practice, advertisers can use the above algorithm to find the minimum weighted vertex covering under different influencing factors according to the requirements of customers, as shown in Table 2. Through Table 2, advertisers can decide which traffic intersection advertising platforms must be set up and which traffic intersection advertising platforms need not be considered, which provides a reference value for business decision-making.

5 Conclusion In this paper, the minimum weighted vertex covering problem in uncertain environments is studied, and the minimum weighted vertex covering problem in stochastic fuzzy uncertain environments is discussed. On the basis of classical theory, corresponding decision models are established for different decision criteria. However, the anomalies in the data still make the relevant parameters lose their authenticity and representativeness; that is, they cannot reflect the ambiguity and possibility interval of the relevant parameters. Acknowledgements This work was supported by Science and Technology Plan Project of Hunan Province (2016TP1020), Application-oriented Special Disciplines Double First-Class University Project of Hunan Province (Xiangjiaotong [2018] 469).

References 1. Liu, B.: Random Fuzzy Theory. Uncertainty Theory. Springer, Berlin (2004) 2. Ni, Y.: Minimum weight covering problems in stochastic environments. Inf. Sci. 214, 91–104 (2012) 3. Chen, L., Peng, J., Zhang, B., et al.: Uncertain programming model for uncertain minimum weight vertex covering problem. J. Intell. Manuf. 28(3), 625–632 (2017) 4. Xu, H., Kumar, T.K.S., Koenig, S.: A new solver for the minimum weighted vertex cover problem. In: International Conference on Integration of Artificial Intelligence and Operations Research Techniques in Constraint Programming. Springer, Berlin (2016)

Research on Algorithms for Setting up Advertising Platform …

479

5. Zhao, H.H., Rosin, P., Lai, Y.K., Zheng, J.H., Wang, Y.N.: Adaptive gradient-based block compressive sensing with sparsity for noisy images. Multimed. Tools Appl. (2019) 6. Zhao, H.H., Rosin, P., Lai, Y.K.: Image neural network style transfer with global and local optimization fusion. IEEE Access (2019) 7. Zhao, H., Rosin, P.L., Lai, Y.K.: Automatic semantic style transfer using deep convolutional neural networks and soft masks. Vis. Comput. (2019) 8. Zhao, H.H., Liu, H.: Multiple classifiers fusion and CNN feature extraction for handwritten digits recognition. Granul. Comput. (2019) 9. Chen, L., Peng, J., Zhang, B. et al.: Uncertain programming model for uncertain minimum weight vertex covering problem. J. Intell. Manuf. (2017) 10. Goubko, M.: Minimizing wiener index for vertex-weighted trees with given weight and degree sequences. Mathematics 60(2), 2928–2937 (2015) 11. Lei, K., Cui, X.C., Chen, J.R.: Minimum vertex covering problem based on the shortest path algorithm. J. Lanzhou Jiaotong Univ. (2015) 12. Li, R., Hu, S., Zhang, H. et al.: An efficient local search framework for the minimum weighted vertex cover problem. Inf. Sci. 372(C), 428–445 (2016)

Lane Detection Based on DeepLab Mingzhe Li

Abstract Lane detection is an important part of car autopilot. It helps the vehicle to stabilize itself in the lane, avoid risks, and determine the direction of driving. In this paper, we propose a neural network approach to detect lanes in different conditions. We also collect 1761 frames of front-view pictures from driving recorders, preprocess them with ROI analysis as training and testing data. Resulted models have overall high accuracy over tests. Keywords Lane detection · DeepLab · Deep learning · Semantic segmentation

1 Introduction Lane detection plays a key role in autonomous driving. It helps to determine the direction of the road and position of each lane, thus providing significant information to autonomous driving system. Lane detection has been considered as an important topic since mid-1980s [1–3]. Since 2012, there evolved many deep convolutional neural networks on ImageNet Large Scale Visual Recognition Challenge (ILSVRC) [4], such as AlexNet [5], VGG16 [6], ResNet [7], which have proven the excellence of deep learning in image identification [8]. There is a branch challenge of ILSVRC that asks for semantic segmentation. Fully convolutional network, known as FCN [9], has stepped up to be the milestone model for semantic segmentation in 2015, managing to identify object category in pixel level. Further, models from DeepLab series [10, 11] provide improved results, which give high confidence for applications requiring semantic segmentation work. With such good progress, it is believed that neural network can be widely applied to lane detection [12–14]. In this paper, we used a DeepLab network as the principal approach to detect lanes in different conditions.

M. Li (B) University of Southern California, Los Angeles, USA e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_47

481

482

M. Li

Fig. 1 Algorithm flowchart

2 Related Works So far there are known traditional methods doing great in lane detection work for straight, clear lanes on highways: Inverse Perspective Mapping (IPM) [15]. It transforms front-view images into top-view ones, expecting to get rid of perspective effect in images and to get nearparallel lanes. It may be a good solution to utilize the parallel characteristic, but sometimes it will also transform cars, trucks, railings into thin, long lines, which will create additional noises for images. After IPM, boundary detection [16] and line detection [17] can be used to find lanes in images. A widely used algorithm would be Hough Transformation [18, 19]. It is capable to detect straight lines in images. However, its results are easily distracted by noise. Results of Hough Transformation can be highly interfered if part of the lane is occluded or accompanied with reflected sunlight. Because Hough Transformation requires straight lines output, anything that affects end point determination can be detrimental to the result. Neural Network Approaches. There is recent research treating multiple lanes in a single image into different segmentation channels [13] or categories because different lanes show different directions, positions, and characteristics, especially when they are not fully straight. While it performs well on its dataset, its resource cost would be enormous, which will raise the cost when turned into application [20].

3 Approaches 1. DeepLab Model The algorithm applies DeepLab-v2 model, which uses ResNet with atrous convolution kernel as backbone and applies fully connected CRFs before output. As DeepLab model is more of an advancement of traditional FCN, the additional application of atrous convolution kernel and fully connected CRF is the key.

Lane Detection Based on DeepLab

483

(1) Atrous Convolution Convolution operations can extract the characteristics of an image, and these features tend to be holistic. That is, identifying a feature in an image may require a larger range of checks to determine all the information for that feature. This is also why deep image networks continue to shrink the input image with pooling: when the image is reduced, the size of the original image corresponding to the small convolution kernel becomes larger so that the convolution operation can contain more complete information. The range of image data included in the convolution kernel is called the perceptual domain. For example, in the classic FCN, after reducing the picture to the size of 1/32 * 1/32, the perceptual field of a 3 × 3 convolution kernel is expanded from eight pixels around to 1023 pixels around. Although this helps to extract features, a large amount of information loss can have a huge impact on the accuracy of recovered image. To solve this problem without padding too many blank pixels around or adding up convolutional kernel size, atrous convolution [10] is came up to increase the perceptual field. As shown in Fig. 2c, each convolution kernel no longer convolves three consecutive pixels but adds a pixel hole between every two convolution pixels. The other coefficients in Fig. 2c are equal to those in Fig. 2b, but the perceptual range of each convolution kernel extends from 3 × 3 to 5 × 5. Although there are still only nine pixels participating in the convolution in the range of 5 × 5, the image feature extraction is important, that is, the characteristic general of the image in a large area, not the continuity of feature extraction. Because the continuous pixels in a small area are less robust, the recognition of actual things is not helpful. By adjusting the hole size of the convolution kernel, DeepLab has completed the task of maintaining the convolution-aware domain without significantly reducing the size of the data.

Fig. 2 Three convolutional kernels

484

M. Li

(2) Fully connected CRF Conditional Random Fields (CRF) [21], is often used to smooth out image segmentation results with noise, but this is not suitable for optimization of neural network output results in this paper. Because we expect clear identification for thin lanes that are far away from the views. Using short-term CRF may smooth out these thin structures and thus be detrimental to the result. Instead, fully connected CRF (DenseCRF) is used with following energy equations: E(x) =

 i

θi (xi ) +



  θi j xi , x j

(1)

ij

θi (xi ) = − log P(xi )

(2)

K       θi j xi , x j = μ xi , x j wm . k m f i , f j

(3)

m=1

K 

wm .k

m



m=1

fi , f j



       pi − p j 2  Ii − I j 2 = w1 exp − − 2σα2 2σβ2      pi − p j 2 + w2 exp − 2σγ2

(4)

i; P(xi ) represents the xi represents the network-calculated classification   of pixel = 1 if and only if xi = x j , ; μ x , x probability that pixel i is assigned as category x i i j   otherwise μ xi , x j = 0; pi represents the position of the pixel i, Ii represents the pixel color intensity of the pixel i; w1 , w2 , σα , σβ , σγ are parameters for adjusting the use effect of the CRF. The energy equation reflects the constituent factors of the output of the CRF: the higher probability of the current pixel classification, the less the influence of other pixels on the classification result of the current pixel; the influence factors of other pixels on the current pixel include distance, color intensity, etc. If two pixels are assigned the same category by the network, they do not affect each other; if two pixels are assigned different categories by the network, they will affect each other. The closer the distance is, the greater the influence; the closer the color intensity is, the greater the influence. The five parameters w1 , w2 , σα , σβ , σγ are used to adjust the weight of each factor. Finding a set of parameters that adapt to different scenarios is the key to using this algorithm. 2. Data preprocessing We collect 1761 frames of data from front-view videos collected by Desay SV Automotive [22]. They include images of lanes on highways, urban multi-lane roads, big turns, urban single-lane roads, etc. The first step is to mark all lanes inside images. We have four engineers who have more than three-year experience working on autonomous driving to complete and cross-validate the accuracy of marking. Next step is to determine the region of interest (ROI) of these images. There is an easy and

Lane Detection Based on DeepLab

485

intuitive way: removing parts of images over the horizon. It often happens that cars, buildings, street lights appear in images in real-life driving conditions, which may be interference for lane detection, especially when they reflect the sunlight and look over bright. By decreasing these objects may we train a model that focuses more on detecting lanes. In this paper, we remove upper 45% of the whole image, turning 1920 × 1080 size images into 1920 × 594 ones, then rescale them into 600 × 186 to decrease the computational cost of neural network training and fully connected CRF processing.

4 Results 1. Accuracy We split 1761 frames of data to 1100 frames of training and validation data and 661 as test. We applied cross-validation with ratio of training: validation = 9:1 during the training process. We have also applied FCN and non-CNN approach as baselines for testing. Results are shown in Table 1. It is observed that with ROI preprocessing results prove to be good for urban driving environment. But the accuracy is higher for CNN approaches without ROI preprocessing. After investigation of outputs, the higher accuracy is mainly due to more background pixels in images. But most of those different pixels do not sensitively affect actual decisions of our methods. 2. Case Demonstration Fig. 3 shows four testing result images, including conditions with different occlusions, shadowing, and road curving environment. Pixels that are detected as lanes are marked green in the image, which are screenshot from test videos as requested by Desay SV Automotive 3. Uncertainty Even though the test result from DeepLab model shows strong robustness when road is under shadow (Fig. 3 Top-right example), it provides uncertainty when the Table 1 Pixel-wise test accuracy, i.e., the ratio of how many pixels have been correctly classified Test accuracy

ROI preprocessing

Without ROI preprocessing

Highway (%)

Urban (%)

Highway (%)

Urban (%)

Baseline

88.23

66.16

86.16

54.33

FCN

91.21

84.77

92.42

82.64

ResNet-101 + Atrous + DenseCRF

94.92

90.81

96.31

90.08

486

M. Li

Fig. 3 Testing result images

environment is strongly affected by weather, large area of mud or water that reflects sunlight.

5 Conclusion We collect frames from front-view videos and build up a dataset for lane detection with the help of Desay SV Automotive. In this paper, we discover, apply, and evaluate a popular model in semantic segmentation for lane detection. We also demonstrate an easy and possible way to decrease the amount of interference of surrounding objects and environment.

References 1. Taylor, C., Seck, J., Blasi, R., Malik, J.: A comparative study of vision-based lateral control strategies for autonomous highway driving. Int. J. Robot. Res. (1999) 2. Mccall, J.C., Trivedi, M.M.: Video-based lane estimation and tracking for driver assistance: survey, system, and evaluation. IEEE Trans. Intell. Transp. Syst. 7(1), 20–37 (2006) 3. Bertozzi, M., Broggi, A.: Real-time lane and obstacle detection on the gold system. In: Intelligent Vehicles Symposium, pp. 213–218 (1996) 4. Deng, J., Dong, W., Socher, R., et al.: ImageNet: a large-scale hierarchical image database. In: Computer Vision and Pattern Recognition, pp. 248–255 (2009) 5. Krizhevsky, A., Sutskever, I., Hinton, G.E., et al.: Imagenet classification with deep convolutional neural networks. Neural Inf. Process. Syst. 141(5), 1097–1105 (2012) 6. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. In: Computer Vision and Pattern Recognition (2014)

Lane Detection Based on DeepLab

487

7. He, K., Zhang, X., Ren, S., et al.: Deep residual learning for image recognition. In: Computer Vision and Pattern Recognition, pp. 770–778 (2016) 8. Jia, Y., Shelhamer, E., Donahue, J., et al.: Caffe: convolutional architecture for fast feature embedding. In: ACM Multimedia, pp. 675–678 (2014) 9. Long, J., Shelhamer, E., Darrell, T., et al.: Fully convolutional networks for semantic segmentation. In: Computer Vision and Pattern Recognition, pp. 3431–3440 (2015) 10. Chen, L., Papandreou, G., Kokkinos, I., et al.: Deep lab: semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected CRFs. IEEE Trans. Pattern Anal. Mach. Intell. 40(4), 834–848 (2018) 11. Chen, L., Papandreou, G., Kokkinos, I., et al.: Semantic image segmentation with deep convolutional nets and fully connected CRFs. In: International Conference on Learning Representations (2015) 12. Azimi, S.M., Fischer, P., Korner, M., et al.: Aerial LaneNet: lane-marking semantic segmentation in aerial imagery using wavelet-enhanced cost-sensitive symmetric fully convolutional neural networks. IEEE Trans. Geosci. Remote Sens. 57(5), 2920–2938 (2019) 13. Pan, X., Shi, J., Luo, P., et al.: Spatial as deep: spatial CNN for traffic scene understanding. In: Computer Vision and Pattern Recognition (2017) 14. Philion, J.: FastDraw: addressing the long tail of lane detection by adapting a sequential prediction network. In: Computer Vision and Pattern Recognition, pp. 11582–11591 (2019) 15. Aly, M.: Real time detection of lane markers in urban streets. In: IEEE Intelligent Vehicles Symposium, pp. 7–12 (2008) 16. Wu, P., Chang, C., Lin, C.H., et al.: Lane-mark extraction for automobiles under complex conditions. Pattern Recognit. 47(8), 2756–2767 (2014) 17. Narote, S.P., Bhujbal, P.N., Narote, A.S., et al.: A review of recent advances in lane detection and departure warning system. Pattern Recognit. 216–234 (2018) 18. Duda, R.O., Hart, P.E.: Use of the hough transformation to detect lines and curves in pictures. Commun. ACM 15(1), 11–15 (1972) 19. Zheng, F., Luo, S., Song, K., et al.: Improved lane line detection algorithm based on hough transform. Pattern Recognit. Image Anal. 28(2), 254–260 (2018) 20. Zou, Q., Jiang, H., Dai, Q., et al.: Robust lane detection from continuous driving scenes using deep neural networks. In: Computer Vision and Pattern Recognition (2019) 21. Lafferty, J.D., Mccallum, A., Pereira, F., et al.: Conditional random fields: probabilistic models for segmenting and labeling sequence data. In: International Conference on Machine Learning, pp. 282–289 (2001) 22. https://en.desaysv.com/

Hybrid Program Recommendation Algorithm Based on Spark MLlib in Big Data Environment Aoxiang Peng and Huiyong Liu

Abstract The ratings of TV programs are irregular, and most of the viewers do not score every program they have watched, which leads to uneven distribution of user-program ratings matrix and low sparseness of the matrix in the recommendation system. For the recommendation algorithm, the sparsity of the input matrix has a great impact on the accuracy of the recommendation algorithm. Especially in the face of big data sets, the problems are enlarged. Aiming at these problems, a program recommendation algorithm based on LDA topic model and improved ALS collaborative filtering is proposed. This algorithm combines the program similarity matrix obtained from program features, preprocesses the score matrix to get the prescore matrix as input, and then dynamically weights the user and program features to improve the collaborative filtering algorithm to achieve the effect of “stable recommendation” and “multiple recommendation.” The simulation results show that the parallel operation of Spark MLlib algorithm library not only solves the problem of low timeliness of big data sets but also stabilizes the average RMES of hybrid recommendation algorithm at about 0.52. Compared with the traditional ALS collaborative filtering recommendation algorithm, the effect is significantly improved. Keywords LDA topic model · ALS collaborative filtration · Dynamic weighting · TV program recommendation · Spark MLlib

1 Introduction In recent years, smart TV makes programs more and more abundant, which also makes it more and more difficult for users to find TV programs that they are interested in. At the same time, TV operators can also obtain viewing data through set-top boxes, which provides data conditions for the research of program recommendation algorithm in big data environment. For recommendation systems, there are three A. Peng (B) · H. Liu Network Management Center, Institute of Network Technology, Beijing University of Posts and Telecommunications, 100876 Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_48

489

490

A. Peng and H. Liu

issues. Firstly, the sparsity of the user-program score matrix as input affects the recommendation results to a great extent [1]. How to reduce the sparsity of the input matrix reasonably to improve the recommendation accuracy? Secondly, the long iteration of recommendation algorithm makes recommendations very single, how to provide users with novel “multiple recommendation” on the premise of guaranteeing “stable recommendation”? Thirdly, to solve the problem of low timeliness of complex matrix operation is also the key point to measure the quality of the recommendation algorithm. To solve the appeal problem, first of all, we use LDA topic model to extract keywords and construct keyword matrix for each program [2]. Then we can get the program similarity matrix according to the similarity of keyword matrix, and fill the off-line user-program score matrix with the program similarity matrix as the weight factor. The obtained prescoring matrix is the input of ALS. Then, collaborative filtering is divided into user collaborative recommendation and project collaborative recommendation. On the one hand, based on user collaborative recommendation, similar programs that users have identified their preferences are recommended. On the other hand, through the dynamic weighted fusion project collaborative recommendation to suppress the risk of recommendation, the recommendation of programs with a large gap from the user’s previous preferences, which ensures the stability of the recommendation results and improves the diversity. Finally, Spark’s flexible RDD operator transformation and algorithm library integrated with Spark MLlib provide convenient conditions for matrix operation and algorithm improvement in big data environment and solve the problem of low efficiency of the algorithm [1]. The rest of our paper is constructed as follows. Section 2 introduces the design and process of hybrid program recommendation algorithm model based on LDA topic model and improved ALS collaborative filtering. In Sect. 3, hybrid program recommendation algorithm is implemented based on Spark MLlib in big data environment. Section 4 analyses the experimental process and results. Finally, conclusions are drawn in Sect. 5.

2 Hybrid Program Recommendation Algorithms Based on LDA Theme Model and ALS Collaborative Filtering 2.1 Using LDA Theme Model to Obtain Theme Distribution of Programs Topic model is a statistical model used to count the number of topics in a series of documents. Latent Dirichlet allocation (LDA) can discover implicit program topics in program description information through unsupervised learning [3, 4]. LDA is a three-level Bayesian probability model of topic, document, and vocabulary. Table 1 gives LDA’s Bayesian graphical model (Fig. 1).

Hybrid Program Recommendation Algorithm Based on Spark MLlib …

491

Table 1 LDA’s Bayesian graphical model and parameters description [5] Parameters

Parameters description

K

Number of topics

M

Number of documents

V

The number of words in the vocabulary

N

The number of times in the mth document

α

Document-theme Dirichlet distribution parameter

β

Topic-word Dirichlet distribution parameter

θm

Parameters of multiple distributions of topics under the mth document

ϕk

Parameters of multinomial distribution of feature words under the kth topic

zm,n

The subject of the nth word in the mth document

wm,n

The nth word in the mth document, wm,n ∈ V

Fig. 1 LDA’s Bayesian graphical model

In the LDA model, each document represents a probability distribution of some topics, and each topic represents a probability distribution of many words. Combining two physical processes, we can get Formula (1):   K  n M    k + β   ( n m + α )    z | α , β = p w|  z , β p(z | α) = p w, ( α)  β m=1 k=1 

(1)

Gibbs sampling iterates over LDA algorithm to determine parameters [6]. Gibbs sampling is used to get new document’s inference and training, such as Formula (2):     (t) t n (k) m,¬i + αk ∗ n k,¬i + βt + n k     P(z i = k|w = t, z ¬i , w¬i ; M) =   (t) (k) V K t n + β n −1 + n + α m t k k,¬i t=1 k=1 k (2)

492

A. Peng and H. Liu

zi : The subject of the ith word; z ¬i : Probability of all z k (k = i); n (k) m,¬i : Vocabulary (t) assigned to topic k in the mth article; n k,¬i : The frequency of the occurrence of the topic K word t. The formula means the path probability of doc → topic → word, the physical meaning of the Gibbs sampling formula is to sample in these K paths. The process of estimating the parameters of the new document is the same as that during the training, and finally, the distribution of the topics under each document is obtained. The calculation formula is as follows: n (k) m,¬i + αk θˆm(k) =  K (k) k=1 n m + αk

(3)

LDA algorithm inference process [7]: Algorithm 1 Inference process of LDA algorithm by Gibbs sampling method Input: New program description document Output: Topic distribution θnew 1 Initialize sampling parameters and randomly assign topic K, z m,n = k ∼  Mult k1 ; 2 Reassign topic resampling to each word w in the document according to the sampling Formula (2); 3 Repeat step 2 to continually update the topic assignment matrix until the algorithm iteration ends; 4 Based on the final result, the subject distribution θ new under the document is calculated; 5 Finally, the cosine similarity calculation formula is used to obtain the similarity matrix between each program.

2.2 Improved ALS Collaborative Filtering Algorithm User’s preference is measured by user’s rating vector based on user’s UserCF algorithm, and then recommendation is made according to the similarity between other users’ preferences and current users’ preferences. ItemCF-based collaborative filtering algorithm is to find items similar to current user preferences. At present, collaborative filtering algorithm is solved by ALS matrix decomposition method, which fills the score matrix by alternating least squares method. The core of ALS algorithm is based on the following assumptions: the score matrix R is approximate low rank, that is to say, an m * n score matrix R can be approximated by the product of two dense matrices X(m * k) and Y (n * k), where R ≈ XY T , k m, n, k is implicit factor [8]. Alternating least squares method is one of the common methods of matrix decomposition. The aim of this algorithm is to find a low-rank matrix X to approximate the score matrix, ALS matrix decomposition Formula (4), λ prevents over-fitting [9].

Hybrid Program Recommendation Algorithm Based on Spark MLlib …

L(U, V ) =



Ri j − Ui V jT

2

2 + λ Ui 22 +λ V j 2

493

(4)

ij

Fixed V, derive U i . Fixed U, derive V j , and the result are as shown in Formula (5):   −1 −1 Ui = Ri Vui VuiT Vui + λn ui I ; V j = R j Umi UmT j Um j + λn m j I

(5)

Ri denotes a vector composed of user i’s ratings; Vui is a feature matrix, which consists of the feature vectors of the items evaluated by user i; n ui denotes the number of items evaluated by user i; R j denotes a vector composed of user’s ratings of item j; Umi is a feature matrix, which consists of a group of feature vectors of users who have rated the items. Complete; n m j denotes the number of users rating item j; I represents a unit matrix of (d × d). Previous hybrid recommendation algorithms mostly use fixed weights to fuse algorithms, but this method ignores some information about user behavior preferences to some extent. Because user-based and program-based predictions focus on different directions, this paper introduces dynamic weights W i and W u to fuse the two kinds of collaboration. Formula 6 combines user-based and program-based collaborative filtering methods for comprehensive prediction. P(u, i) = wu × u¯ +

 u a ∈ S(u)



 sim(u a , u) ra,i − u a

u a ∈ S(u)

sim(u a , u)

(6)

The calculation of wu and wi in Eq. (6) is as shown in Eq. (7). wu =

conu − coni coni − conu λ + (1 − λ) (1 − λ) + λ; wi = conu + coni conu + coni

(7)

Because the data distribution and similarity have different performance for different scenarios and will change with time, when combining the weight of user collaborative recommendation and project collaborative recommendation, because the reliability of the predicted results is different, the reliability calculation Formula (8) is introduced.   n ∈ neighboru simu (u, n) n ∈ neighbori simi (i, n) ; coni = . (8) conu = n neighboru n neighbori In Formula (8), simu (u, n) represents the user similarity between user u and user n, and simi (i, n) represents item n and item n project similarity, neighboru indicates user neighbor set, neighbori indicates project neighbor set, conu indicates credibility based on user collaborative recommendation result, coni indicates based on project collaborative recommendation result reliability. The introduction of credibility conu

494

A. Peng and H. Liu

and coni makes the distribution of weights more reasonable and also avoids the uncertainty of artificially defined weights [9, 10].

3 Implementation of Hybrid Program Recommendation Algorithm Based on Big Data Environment and Spark MLlib 3.1 Get Prescoring Matrix with Spark LDA Spark uses Graph X to implement a parallel LDA algorithm, training the model by manipulating the edge and vertex data of the graph. At the same time, Spark LDA uses Gibbs sampling method to estimate the model parameters and updates the model after each iteration. Finally, the training theme-word distribution is stored on the vertices of Graph X, which belongs to distributed storage [11]. Algorithm 2 Spark LDA iterative training algorithm Input Word frequency matrix RDD Output Document-Theme Distribution RDD, Theme-Word Distribution RDD 1 For m in [0,M-1] 2 For t in [0,V-1] 3 result: Edge RDD(m,t,P[m][t]) 4 Traversing each side of the edge RDD (m,t,P[m][t]) 5 Randomly initialize the subject of the current edge to belong to k(1~K) to get RDD(m,t,k) 6 Get Vertex RDD(m,K) based on the document class vertex aggregation theme 7 while:Model does not converge and does not reach the maximum number of iterations 8 for edge in Edge RDD 9 for(i{ 6 curr Rat RDD=Rating RDD.filter(m=>m._2==j) 7 User TFactor RDD= RDD[(x1,x2, ,xk)] 8 M1=User Factor RDD.cartesian(User TFactor RDD).map(u=>u+ unit vector * ) 9 M2=User Factor RDD.cartesian(curr Rat RDD) 10 return M1.cartesian(M2).map(p=>1/p._1*p._2) 11 }) 12 User Factor RDD solution step reference 4~13 13 C is calculated according to Item Factor RDD, User Factor RDD, and Rating RDD. If C converges, it jumps out of the loop. 14 The convergence result is obtained by the formula (6) (7), and the user u is used to obtain the score of the program i by the formula, thereby performing program recommendation.

4 Experimental Setting and Results 4.1 Experimental Setting The dataset is the Movie Lens-100 k dataset collected by Group Lens in the USA. The dataset contains 943 users’ ratings of 100,000 movies in 1682 movie. On the IMDB Web site, the film review information of the corresponding movie is crawled. The film review information includes two columns: the movie index number and the movie review information. The experimental environment is Spark distributed computing, HDFS distributed storage, Intelli J-scala, and Spark-submit. In order to show the experimental results, Aliyun ECS is used as a physical node in this experiment. The operating system is Centos 7.2-64 bits. Its physical properties are dual core CPU, Intel Xeon E5-2682 v4, 2G DDR4 memory, and 40G cloud disk. Its software environment is jdk1.8.0_151, scala-2.11.8, hadoop-2.7, and spark-2.3.2 [5]. The method of scoring prediction accuracy is the absolute mean error (MAE). The definition of MAE is as shown in Formula (10), where r i is the true score, vi is the prediction score, and N is the number of test set data. The smaller the MAE, the higher the score accuracy [12].

496

A. Peng and H. Liu

MAE

Fig. 2 Effect of the scoring matrix’s preprocessing

1.059 1.2 0.96 0.915 0.887 0.88 1 0.71 0.64 0.8 1.047 0.54 0.95 0.887 0.6 0.81 0.81 0.4 0.64 0.6 0.52 0.2 0 2 4 6 8 10 12 14 16

Steady factor change of step=2 ALS

N MAE =

i=1 |ri

N

− vi |

LDA-ALS

(10)

4.2 Results and Analysis In order to verify the argument that reducing the sparsity of scoring matrix after data preprocessing can improve the accuracy of recommendation, the traditional ALS collaborative filtering algorithm [12] is used as a control in Fig. 2 to compare the effect of using LDA topic model to preprocess the recommendation of scoring matrix. The experimental results show that the MAE value of LDA-ALS algorithm is always less than that of ALS collaborative filtering algorithm, and the minimum MAE value is 0.52 when the hidden factor is 10. It shows that before using ALS collaborative filtering algorithm, using LDA topic model to preprocess data and reduce the sparsity of scoring matrix can significantly improve the final recommendation accuracy. In order to mitigate the diversified recommendation risk, an improved ALS collaborative filtering algorithm LDA-UI-ALS based on dynamic weighted fusion of user and project features is used. To verify the working of improved algorithm, LDAUI-ALS and LDA-ALS are compared in Fig. 3. The experimental results show that two algorithms’ MAE fluctuates stably, and the MAE value of the LDA-UI-ALS is 0.54 when the implicit factor is 9. This shows that the hybrid recommendation algorithm can guarantee the improvement of recommendation accuracy and provide users with “stable recommendation” and “multiple recommendation.” In the big data environment, Spark technology can improve the performance of the hybrid recommendation algorithm. Figure 4 compares the time-consuming performance of the hybrid recommendation algorithm in different cluster environments. The experimental results show that when the number of Spark distributed nodes is increased to 3, the acceleration effect is obvious, and the problem of low timeliness in big data environment is solved. The minimum running time of the hybrid algorithm is 102 s.

Hybrid Program Recommendation Algorithm Based on Spark MLlib … 1.4

1.21

1.2

MAE

1

497

0.92 1.139

0.8

0.83

0.887 0.832

0.6

0.79 0.8

0.77 0.64

0.61

0.57

0.6

0.56

0.54

7

8

9

0.75

0.4 0.2 0

2

3

4

5

6

Steady factor change of step=1 LDA-ALS

LDA-UI-ALS

Time Consuming/s

Fig. 3 Effect of ALS’s improvement 200 180 160 140 120 100 80 60 40 20 0

0

1

2

3

The number of slaver ALS

LDA-ALS

LDA-UI-ALS

Fig. 4 Runtime of three recommended algorithms under the Spark distributed platform

5 Conclusions The hybrid program recommendation algorithm proposed in this paper is based on ALS collaborative filtering algorithm. Aiming at its low timeliness, sparse data, and single recommendation result, the following improvements are made: Firstly, the off-line original score matrix is processed by LDA topic model, and the prescore matrix with reduced sparsity is obtained. Secondly, the prerating matrix is used as input, and the dynamic weighted fusion ALS collaborative filtering algorithm is used to provide users with “stable recommendation” and “multiple recommendation.” Finally, in the big data environment, Spark technology is used to achieve the fusion of algorithms to solve the problem of low timeliness. The experimental results show that the hybrid algorithm has significantly improved the recommendation accuracy compared with the traditional ALS collaborative filtering algorithm. The MAE value of the algorithm is stable at about 0.52, and the recommendation results are more

498

A. Peng and H. Liu

diverse. The application of Spark technology accelerates the speed of the algorithm and solves the problem of low timeliness.

References 1. Li, Z., Lin, Y., Zhang, X.: Hybrid employment recommendation algorithm based on spark. J. Phys. Conf. Ser. 887, 012045 (2017) 2. Guo, C., Lu, M., Wei, W.: An improved LDA topic modeling method based on partition for medium and long texts. Annals Data Sci. (2019) 3. Cao, B., Liu, X., Liu, J., et al.: Domain-aware mashup service clustering based on LDA topic model from multiple data sources. Inf. Softw. Technol. 90, 40–54 (2017) 4. Xiao, Y., Zhong, R.: A hybrid recommendation algorithm based on weighted stochastic block model (2019) 5. Zhang, C., Yang, M.: An improved collaborative filtering algorithm based on Bhattacharyya coefficient and LDA topic model. In: International CCF Conference on Artificial Intelligence. Springer, Singapore (2018) 6. Chen, L.C.: An effective LDA-based time topic model to improve blog search performance. Inf. Process. Manage. 53(6), 1299–1319 (2017) 7. Geng, X., Zhang, Y., Jiao, Y., et al.: A novel hybrid clustering algorithm for topic detection on chinese microblogging. IEEE Trans. Comput. Soc. Syst. 6(2), 289–300 (2019) 8. Juan, W., Wei, X., Statistics, S.O.: Collaborative filtering recommender system based on matrix factorization and its application. Statistics & Decision (2019) 9. Yuan, Z., Ke, M., Weicong, K., et al.: Collaborative filtering-based electricity plan recommender system. IEEE Trans. Ind. Inform. 1–1 (2018) 10. Panigrahi, S., Lenka, R.K., Stitipragyan, A.: A hybrid distributed collaborative filtering recommender engine using apache spark. Proc. Comput. Sci. 83, 1000–1006 (2016) 11. Song, W., Shao, P., Liu, P.: Hybrid recommendation algorithm based on weighted bipartite graph and logistic regression. In: Artificial Intelligence. Springer, Singapore (2019) 12. Fengrui, Y., Yunjun, Z., Chang, Z.: Hybrid recommendation algorithm based on probability matrix factorization. J. Comput. Appl. (2018)

A Deep Learning Method for Intrusion Detection by Spatial and Temporal Feature Extraction Haizhou Cao, Wenjie Chen, Shuai Ye, Ziao Jiao, and Yangjie Cao

Abstract Intrusion detection of network traffic is essential in the field of network security. The types of network traffic are diverse. Their attributes are highly correlated at the same time and are continuous in time. However, existing deep learning methods do not use them together for classification. The traditional intrusion detection methods that rely on manual extraction features have problems such as high false positive rate and low recognition performance. This paper proposes a deep learning method DeepIDN that uses the spatial and temporal features of data attributes to perform classification tasks and applies it to intrusion detection. DeepIDN uses a two-dimensional convolution operation to construct a convolutional neural network (CNN) layer to extract the association between data attributes and establish a spatial feature model. Then, by constructing a long short-term memory (LSTM) layer to extract time-related correlation between features, a relational model on time series is established. Finally, using the support vector machine as a classifier, the intrusion detection of network traffic is realized, and the prediction performance is greatly improved. Compared to traditional methods, DeepIDN does not require a lot of data preprocessing workload. The experimental results show that compared with the similar intrusion detection methods, the accuracy of DeepIDN for malicious network traffic judgment is significantly improved, reaching 98.66% training accuracy and 97.15% testing accuracy and higher robustness during the training and testing. Keywords Intrusion detection · Deep learning · Convolutional neural network · Long short-term memory · Support vector machine

H. Cao · W. Chen · S. Ye · Z. Jiao · Y. Cao (B) School of Software, Zhengzhou University, Zhengzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_49

499

500

H. Cao et al.

1 Introduction Intrusion detection system (IDS) is a fundamental defense in the field of network security. Networks tend to be more complex, which may have numerous bugs to malicious attacks easily. IDS are used to identify malicious intrusions. The essence of intrusion detection is how to classify normal data and malicious data. In other words, the main goal is to improve the performance of the classifier. For classification problems, machine learning is considered to be one of the most valid algorithms. In the previous studies, many algorithms based on machine learning such as knearest neighbors (KNN) [1] and random forest (RF) [2] have been applied to IDS and achieved certain results. A nonparametric estimation method of Parzen-window estimators based on the Gaussian kernel is proposed by Yeung and Calvin [3]. Mukkamala et al. [4] compare the performance of linear genetic programming methods with artificial neural networks and support vector machine (SVM). Kayacik et al. [5] propose a machine learning method based on unsupervised data representation. Yang et al. [6] combined the stacked denoising autoencoder (SDA) to extract features from the original traffic data, using Softmax classifier to complete the classification, and proposed a session-based network traffic identification method. Gao and Gopalakrishnan [7] combine a rectified linear unit (ReLU) with an adaptive moment estimation (ADAM) optimization algorithm to detect advanced persistent threat (APT). Javaid et al. [8] proposed a self-taught learning (STL) intrusion detection method using a sparse autoencoder (SAE) and a Softmax classifier. The above research works have obviously achieved certain results. However, because of the variety of network traffic and the high correlation of attributes in space and time, it is difficult to extract features effectively by manual methods. Moreover, data preprocessing is also cumbersome and subject to subjective influence of data processors. These factors limit the classification accuracy of existing methods. And they do not use the spatial and temporal features of network traffic together for intrusion detection. For example, [15] only pays attention to the features of time, ignoring the connection between different attributes of network traffic. Therefore, this paper proposes a deep learning method DeepIDN that extracts spatial and temporal features of data for classification and applies it to intrusion detection. It uses network traffic data as input and extracts the spatial features between attributes through the convolutional layer. Then, the LSTM is used to extract the timing relationship between attributes. Finally, the SVM is used for classification, and high classification performance is obtained. Moreover, we verified that our method is the best among five methods by comparing the differences in their performance.

2 DeepIDN In order to extract the spatial and temporal features of network traffic and use them together for classification, the network structure of DeepIDN is designed as shown

A Deep Learning Method for Intrusion Detection by Spatial …

501

Fig. 1 DeepIDN architecture

in Fig. 1. It consists of four parts: convolutional layer, LSTM layer, fully connected layer and SVM classification layer. The traffic data is feature extracted and linked through a convolutional layer and an LSTM layer, wherein the former is based on a spatial dimension and the latter is based on a temporal dimension. And two fully connected layers are added to integrate the learned feature representation and map into the marked space and finally classified by SVM. Next, the basic principles and design of each layer will be described.

2.1 Convolution Layer DeepIDN contains a convolution layer, which extracts spatial features from the association between attributes through a two-dimensional convolution operation. The formula is as follows:  I (m, n)K (i − m, j − n) (1) S(i, j) = (I ∗ K )(i, j) = m

n

where I is the input data, K is the convolution kernel and * represents the convolution operation. The input to the convolutional layer is network traffic data with 24 features, with the classification label removed, and each of the remaining features using One-Hot encoding with a depth of 10. Therefore, the final input data size of

502

H. Cao et al.

the convolutional layer is 23 × 10, and each row represents a feature’s One-Hot encoding. In this layer, there are 30 5 × 3 convolution kernels to perform the convolution operation to extract features. The convolution kernel has a step size of 1 in both horizontal and vertical directions, and 30 19 × 8 feature maps are obtained. Then, by calculating the mean variance and other data, the obtained 30 feature maps are subjected to batch normalization (BN) processing, thereby enhancing the recognition accuracy of the entire neural network and enhancing the convergence ability of the model training process. A ReLU is used as an activation function between the convolutional layer and the fully connected layer.

2.2 LSTM Layer After extracting spatial features, combining the temporal features of the data will further improve the classification performance. Because network traffic is continuous over a period of time, DeepIDN uses LSTM to extract features in the time dimension. In 1997, Hochreiter and Jürgen [9] proposed the long short-term memory (LSTM). Compared with the standard recurrent neural network (RNN), it solves the problem of gradient explosion and gradient disappearance (Fig. 2). In DeepIDN, the input of the LSTM layer is the output of the convolutional layer mapped through the fully connected layer which is xt , a tensor of 23 × 100 dimensions. Among them, 23 correspond to the time steps, the input of each time step is a 100-dimensional vector, and the number of hidden layer neurons is 256. The parameters are learned by the LSTM gating mechanism. The formulas are as follows:

Fig. 2 A diagram for a one-unit LSTM

    f t = σ W f . h t−1 , xt + b f

(2)

    i t = σ Wi . h t−1 , xt + bi

(3)

    C˜ t = tanh WC . h t−1 , xt + bC

(4)

A Deep Learning Method for Intrusion Detection by Spatial …

Ct = f t ∗ Ct−1 + i t ∗ C˜ t

503

(5)

Finally, the current time step output h t is obtained in combination with the current cell state Ct . The formulas are as follows:     ot = σ Wo . h t−1 , xt + bo

(6)

h t = ot ∗ tan h(Ct )

(7)

where ot is obtained by xt and h t−1 . The output h t is a 256-dimensional vector (when the batch size is 1). To prevent overfitting, the dropout method is used between the LSTM layer and the fully connected layer.

2.3 Fully Connected Layer There are two fully connected layers, one between the convolution layer and the LSTM layer, and the other between the LSTM layer and the SVM layer. The purpose of adding a fully connected layer after convolution is to map the extracted highdimensional feature information to the low-dimensional hidden space to prepare for the feature link of the LSTM layer. The full connection layer is added before the SVM classification to map the feature information containing the timing relationship outputted by the LSTM layer into classification information, which facilitates further classification of the SVM.

2.4 SVM Layer Intrusion detection here is a classic binary classification problem, which is to detect whether network traffic is malicious. SVM is a widely used bi-classifier. DeepIDN introduces L2-SVM as the last layer and updates the parameters by optimizing the objective function. The standard SVM assumes that the sample space is linearly separable, but it is difficult to determine in the real task that there is a suitable kernel function to guarantee it, and whether it is caused by overfitting. In order to alleviate the above problems, L2-SVM introduces the concept which does not  of soft margin,  need to be mandatory to satisfy this constraint: yi W T xi + bi ≥ 1. It maximizes the margin while making as many samples as possible satisfying the constraints. In order to maintain good mathematical properties, hinge loss is used as a surrogate loss so that the loss function is completely differentiable and more stable [10]. Finally, the optimized objective function is as follows:

504

H. Cao et al.

  2  1 min w22 + C max 0, 1 − yi W T xi + bi 2 i=1 n

(8)

where w represents the weight of the previous fully connected layer, C is used  to adjust the error proportion of the  misclassified samples, yi is the real clas T sification information, W xi + bi is the output of the previous layer (predictive classification information). The optimization goal is a regularization problem. In this experiment, 21 w22 is used to describe the margin size of the hyper-plane.  2  The max 0, 1 − yi W T xi + bi is used to describe the loss on the training set. Finally the optimizer is used to get classification result by adjusting the parameters. Experiments have shown that SVM is more suitable for this model than Softmax.

3 Experiment 3.1 Databases The data set for training and testing comes from the network traffic data of the Kyoto University honeypot system in 2013 [11]. There are 24 attributes, 14 of which are from the KDD Cup 1999 data set [12], and the remaining 10 are new attributes. The attribute “Label” is used as the label for model training and testing (Table 1). The dataset for training and testing used a total of one-fourth of the entire (from January 1, 2013, to June 1, 2013). The class distribution of the dataset is as follows (Table 2). Table 1 Network traffic data attributes No.

Attribute

Type

No.

Attribute

Type

1

Duration

Continuous

13

Dst_host_srv_serrorrate

Continuous

2

Service

Symbolic

14

Flag

Symbolic

3

Source

Symbolic

15

IDS_detection

Symbolic

4

Destination

Symbolic

16

Malware_detection

Symbolic

5

Count

Continuous

17

Ashula detection

Symbolic

6

Same_srv_rate

Continuous

18

Label

Symbolic

7

Serror_rate

Continuous

19

Source_IP_Address

Symbolic

8

Srv_serror_rate

Continuous

20

Source_PortNumber

Symbolic

9

Dst_host_count

Continuous

21

Destination_IP_Address

Symbolic

10

Dst_host_srv_count

Continuous

22

Destination_PortNumber

Symbolic

11

Dst_host_same_src_Port_rate

Continuous

23

Start_Time

Symbolic

12

Dst_host_serror_rate

Continuous

24

Duration

Symbolic

A Deep Learning Method for Intrusion Detection by Spatial … Table 2 Distribution of training and testing dataset

Class

505

Training data

Testing data

Normal

794,512

157,914

Intrusion detected

1,103,728

262,694

3.2 Data Preprocessing The data is preprocessed before input. For continuous attributes, first normalize them with z-score: z=

X −μ σ

(9)

where X is the attribute value to be normalized, μ is the average of the given attributes and σ is its standard deviation. It is then discretized using the binning method. Boxing is based on the 10th, 20th, …, 90th and 100th quantiles of the attributes. Replace the attribute values with the box number of the bin you are in. Discretization of data by binning can improve the classification performance of the model while reducing the computational cost [13]. For a tag attribute, first map it to [0, n−1] by index and then use it to encode One-Hot.

3.3 Hyper-parameter Setting For preprocessed data, this experiment uses a binary classification to enter the “Label” attribute (whether intrusion) as a tag into the constructed network for training. The specific parameters are configured as follows (Table 3). Table 3 Hyper-parameter configuration

Hyper-parameter

Value

No. of data points—training

1,898,240

No. of data points—testing

420,608

Batch size

256

LSTM cell size

256

Epochs

10

Learning rate

0.00001

Optimizer

Adam

Dropout rate (LSTM)

0.85

SVM C

0.5

506

H. Cao et al.

4 Results Experiments are based on the TensorFlow [14] framework, and GRU + SVM [15] as the baseline. The accuracy of the training is to take the average of the last 1000 times as it tends to be stable. For this task, a significant difference can be found when comparing loss with SVM and Softmax. As can be seen in Tables 4 and 5, in general, DeepIDN has higher performance than other models in the test set and training set. From the evaluation indicators such as true positive rate and true negative rate, the quality of our model classification results is better than other models. There are several conclusions as follow. After replacing the SVM of the baseline model with Softmax, it has a higher performance, which is confirmed by other models. Therefore, SVM is considered to be more suitable for binary classification intrusion detection tasks. The GRU of the baseline model was replaced by LSTM, and it has higher accuracy and lower loss, with the accuracy in training set increasing by about 10%. After adding a convolution layer and fully connected layers, the accuracy in the training set can be improved by about 17% compared to the baseline model, and the accuracy in the testing set is improved by about 13%. Table 4 Training and testing tasks performance in different models Models

Accuracy-testing (%)

Loss-testing

Accuracy-training (%)

Loss-training

DeepIDN

97.15

25.93

98.66

15.64

CNN + LSTM + Softmax

95.14

−15.64

98.78

−28.27

LSTM + SVM

88.27

85.91

91.97

65.79

GRU + SVM (baseline)

84.15

129.62

81.54

131.21

GRU + Softmax

70.75

0.6252

63.07

0.6214

Table 5 Statistical measures on binary classification in different models Models

True positive rate (%)

True negative rate (%)

False positive rate (%)

False negative rate (%)

DeepIDN

95.57

98.63

1.37

4.43

CNN + LSTM + Softmax

93.22

96.48

3.52

6.78

LSTM + SVM

87.43

81.33

18.67

12.57

GRU + SVM (baseline)

84.37

77.61

22.39

15.63

GRU + Softmax

55.68

95.92

4.08

44.32

A Deep Learning Method for Intrusion Detection by Spatial …

507

Fig. 3 Comparison of the loss of DeepIDN and baseline model during training and testing

Fig. 4 Comparison of the accuracy of DeepIDN and baseline model during training and testing

Figure 3 shows the loss in training and testing process. Compared to the baseline model, DeepIDN converges faster, the convergence process is more stable, and the loss converges in a smaller interval. Figure 4 shows that DeepIDN has higher accuracy and robustness in the training set and testing set.

5 Conclusion The traditional intrusion detection methods tend to have a worse throughput performance, and it is not competent for efficient processing of large amounts of data. Besides, it is time-consuming and laborious to maintain and update the signatures database. On the other hand, existing deep learning methods do not make good use of the spatial and temporal features of network traffic when classifying. In this paper, DeepIDN is proposed by constructing neural network to extract both of them and

508

H. Cao et al.

perform intrusion detection tasks. It can extract features effectively and recognize them with higher accuracy, and it has high throughput. Experiments have shown that DeepIDN hosts higher performance and it is practical in IDS applications, enabling accurate intrusion detection.

References 1. Li, W.C., et al.: A new intrusion detection system based on KNN classification algorithm in wireless sensor network. J. Electr. Comput. Eng. 2014 (2014) 2. Nabila, F., Jabbar, M.A.: Random forest modeling for network intrusion detection system. Proc. Comput. Sci. 89, 213–217 (2016) 3. Yeung, D.Y., Calvin, C.: Parzen-window network intrusion detectors. In: Object Recognition Supported by User Interaction for Service Robots, vol. 4, 2002 4. Mukkamala, S., Andrew, H.S., Ajith, A.: Modeling intrusion detection systems using linear genetic programming approach. In: International Conference on Industrial, Engineering and Other Applications of Applied Intelligent Systems, Springer, Berlin (2004) 5. Kayacik, H.G., Zincir-Heywood, A.N., Heywood, M.I.: A hierarchical SOM-based intrusion detection system. Eng. Appl. Artif. Intell. 20(4), 439–451 (2007) 6. Yang, Y., Long, J., Cai, Z. P.: Session-based network intrusion detection using a deep learning architecture. In: International Conference on Modeling Decisions for Artificial Intelligence, Springer, Cham (2017) 7. Gao, Y., Gopalakrishnan, A.K.: Network traffic threat feature recognition based on a convolutional neural network. In: 11th International Conference on Knowledge and Smart Technology (KST) (2019) 8. Javaid, A., et al.: A deep learning approach for network intrusion detection system. In: Proceedings of the 9th EAI International Conference on Bio-inspired Information and Communications Technologies (formerly BIONETICS), ICST (Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering) (2016) 9. Hochreiter, S., Jürgen, S.: Long short-term memory. Neural Comput. 9(8), 1735–1780 (1997) 10. Tang, Y. C.: Deep learning using linear support vector machines. arXiv preprint arXiv:1306. 0239 (2013) 11. Song, J., Hiroki, T., Yasuo, O.: Description of kyoto university benchmark data. Available at link: http://www.takakura.com/Kyoto_data/BenchmarkData-Description-v5 (2006) 12. Stolfo, S.J., et al.: Cost-based modeling for fraud and intrusion detection: results from the JAM project. In: Proceedings DARPA Information Survivability Conference and Exposition, vol. 2 (2000) 13. Lustgarten, J.L., et al.: Improving classification performance with discretization on biomedical datasets. In: AMIA Annual Symposium Proceedings, American Medical Informatics Association (2008) 14. Abadi, M., et al.: Tensorflow: a system for large-scale machine learning. In: 12th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 16) (2016) 15. Agarap, A.F.M.: A neural network architecture combining gated recurrent unit (GRU) and support vector machine (SVM) for intrusion detection in network traffic data. In: Proceedings of the 2018 10th International Conference on Machine Learning and Computing. ACM (2018)

Network Traffic Prediction in Network Security Based on EMD and LSTM Wei Zhao, Huifeng Yang, Jingquan Li, Li Shang, Lizhang Hu, and Qiang Fu

Abstract With the rapid development of the Internet, the scale of the network continues to expand, and the situation of network security is getting more and more severe. Network security requires more reliable information to support, and the prediction of network traffic is an important part of network security. Network traffic prediction data can provide important data reference for network security, especially for reliable data transmission and network monitoring. In fact, network traffic data is affected by a variety of complex and random factors, so network traffic data is a nonlinear data sequence. This paper analyzes the characteristics of network traffic data and proposes an EMD-LSTM model for network traffic data prediction. Firstly, the complex and variable network data traffic is decomposed into several smooth data sequences, and then, the LSTM neural network model, which is suitable for data sequence prediction, is used to predict. The results of the comparison experiments show that the proposed network traffic prediction method reduces the prediction root mean square error in network traffic prediction. Keywords Network traffic · Prediction · LSTM · EMD

1 Introduction With the gradual development of the modern Internet, the network scale has been expanding, and the network data is becoming larger and larger. Network security has become a major issue in current network development, and network traffic provides data support for network security. Network traffic data plays a vital role in network monitoring, network attack and defense, etc. For example, network traffic prediction can help monitors quickly discover abnormal traffic data and prevent network attacks. How to more accurately predict future network traffic data becomes an important issue in network security. W. Zhao (B) · H. Yang · J. Li · L. Shang · L. Hu · Q. Fu State Grid Hebei Electric Power Co., Ltd., Information and Telecommunication Company, Shijiazhuang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_50

509

510

W. Zhao et al.

Whether it is based on traditional mathematical models or network traffic prediction algorithms based on general neural network models, there are many limitations. The essence of network traffic data is a time-based data sequence, but this data sequence is affected by various uncertain factors, such as holidays and major emergencies, which are difficult to express in the network traffic data by mathematical models. Aiming at the problems existing in the existing network traffic prediction model and the analysis of the nature of network traffic data, we propose an LSTM neural network model combined with EMD data processing to predict network traffic data. The EMD decomposition is used to decompose the complex and variable nonlinear network traffic data into a smoother IMF sequence, which effectively reduces the complexity of the data sequence and reduces the difficulty for subsequent prediction. Secondly, the LSTM neural network model is used to predict the decomposition. Compared with other neural network models, LSTM neural network has a better expression of nonlinear sequences and has memory. It also has a good effect on timebased data sequence prediction and can solve the problem of the gradient disappears when inputting long time series. This paper also uses the Adam algorithm to update the gradient during training, which speeds up the convergence and is not trapped at the saddle point. The remaining chapters of this paper are organized as follows: Chapter 2 introduces relevant domestic and foreign research work, Chap. 3 introduces the EMDLSTM model, Chap. 4 carries out simulation experiments, and Chap. 5 summarizes the work of this paper.

2 Related Works In recent years, network traffic prediction methods mainly include regression model, time series model, grey prediction method, neural network, fuzzy theory, mean-value method, wavelet theory, and statistical learning theory method [1]. According to the characteristics of short-term traffic data of LAN, Lin uses the ARMA method commonly used in time series analysis, establishes the time prediction model of network traffic based on ARMA model, and determines the prediction parameters of ARMA model based on short-term traffic prediction requirements [2]. This method changes the previous network management response method, making early warning of network overload and prediction of network traffic possible. A large number of studies have found that the use of a linear method to predict nonlinear network traffic is theoretically inadequate, and its prediction accuracy is not high. Researchers have demonstrated that neural network systems with nonlinear structures can approximate arbitrary nonlinear functions [3]. However, the network traffic prediction algorithm based on the general neural network model such as the BP neural network model has a slow convergence rate and the over-fitting problems when there are more layers [4–6].

Network Traffic Prediction in Network Security Based on EMD …

511

Aiming at the problems existing in the existing network traffic prediction model and the analysis of the nature of network traffic data, we propose an LSTM neural network model combined with EMD data processing to predict network traffic data.

3 Algorithm The flow of the network traffic prediction model in this paper is designed as follows: 1. Collect and organize raw network traffic data. 2. Use the empirical mode to decompose the collated network traffic data so that the network traffic sequence is decomposed into 6–7 more stationary IMF sequences. 3. Convert the decomposed IMF sequence into a supervised learning column 4. Input the supervised learning sequence into the long and short memory neural network model and output the predicted IMF sequence value. 5. Calculate the predicted network traffic data by adding the values of the predicted IMF sequences. This paper combines EMD and LSTM, proposes an EMD-LSTM hybrid model for network traffic prediction, and uses Adam optimization algorithm for gradient descent (Fig. 1).

3.1 Empirical Mode Decomposition EMD is a new adaptive signal time–frequency processing method proposed by Huang et al. in 1998, which is very effective for analyzing nonlinear non-stationary signals. EMD does not require a pre-set basis function for signal decomposition because it is based on the time-scale characteristics of the data itself. Any complex data set can be decomposed into a finite intrinsic mode function (IMF) by EMD. The intrinsic mode function is defined as a function that satisfies the following requirements: (1) The number of extreme points of an IMF must be equal to the number of zero crossings, or the number of the two is only one difference. (2) At all points in time, the average of the upper envelope defined by the local maximum and the lower envelope defined by the local minimum is zero. The basic principle of empirical mode decomposition: (3) Initialize the original time series: r0 = x(t), i = 1 (4) Obtain the ith IMF (5) Subtract the new arrival IMF component from the original sequence:

ri (t) = ri−1 (t) − imfi (t)

(3.1)

512

W. Zhao et al.

Fig. 1 Network traffic prediction model flowchart

(6) If the number of extreme points of ri (t) is still more than two, calculate i = i +1, and go to step 2; otherwise, the decomposition ends and ri (t) are the residual component. (7) The algorithm is finally available:

x(t) =

n 

imfi (t) + rn (t)

(3.2)

i=1

Figure 2 is a graph of all the corresponding data. The signal column indicates the original data, and the IMF and res. are the decomposed data. Adding the IMF data of all the columns and the res. data can obtain the original data signal.

Network Traffic Prediction in Network Security Based on EMD …

513

Fig. 2 EMD decomposition signal sequence

3.2 LSTM Long short-term memory networks (LSTM) is a special kind of recurrent neural network (RNN). It was first proposed by Hochreiter & Schmidhuber in “LONG SHORT-TERM MEMORY” and improved by many people in the research and work. At present, LSTM has performed very well in natural language translation, computer vision, speech recognition, and trend prediction. It has been widely used in recent years. The neuronal structure of LSTM includes input gates, output gates, forgetting gates, and cell units (Fig. 3). The sigmoid activation function is used to control the information of the three gates, and the tanh activation function is used to update the candidate cell state and determine the output information. The sigmoid and tanh and their derivatives are as follows:

514

W. Zhao et al.

Fig. 3 Structure of LSTM neuron

ht + tanh

+

σ σ

tanh

σ

Xt

1 1 + e−z

(3.3)

σ  (z) = y(1 − y)

(3.4)

σz = y =

tanh(z) = y =

ez − e−z ez + e−z

(3.5)

tanh  (z) = 1 − y 2

(3.6)

The forgotten gate mainly determines the output value h t−1 at one moment and the input variable xt at this moment. What information needs to be forgotten: f t = sigmoid(Wh f ∗ h t−1 + Wx f ∗ xt + b f )

(3.7)

The input gate mainly determines the value to be updated: i t = sigmoid(Whi ∗ h t−1 + Wxi ∗ xt + bi )

(3.8)

Update candidate cell unit status: C˜ t = tanh(Whc ∗ h t−1 + Wxc ∗ xt + bc )

(3.9)

Update cell unit status: Ct = f t ∗ Ct−1 + i t ∗ C˜ t

(3.10)

The output gate determines which part of the information can be outputted: ot = sigmoid(Who ∗ h t−1 + Wxo ∗ xt + bo )

(3.11)

Network Traffic Prediction in Network Security Based on EMD …

515

Final output value: h t = ot ∗ tanh(Ct )

(3.12)

3.3 Adagrad Optimization Algorithm for Gradient Descent A common method for updating the gradient parameters is to use the stochastic gradient descent algorithm SGD. But SGD has the problem of difficulty in selecting the learning rate and unbalanced learning rate, this paper adopts Adagrad to update the gradient. The algorithm has the following advantages: (1) Good at dealing with problems involving higher noise and sparse gradients. (2) Ability to adjust different adaptive learning rates for different parameters. The Adagrad algorithm imposes a constraint on the learning rate. During each iteration, each parameter is optimized using a different learning rate. n t = n t−1 + gt2

(3.13)

η θt = − √ ∗ϕ nt + 

(3.14)

gt is the weight gradient, n t is the second moment estimate of the weight gradient, θt is the amount of weight reduction, ϕ is the learning rate, and  is used to ensure that the denominator is not 0.

4 Experiment 4.1 Simulation Implementation The EMD-LSTM network traffic prediction model designed in this paper uses the EMD algorithm for data preprocessing, predicts through the LSTM-based neural network model, adds the perceptual layer and dropout layer to the neural network model, and uses Adagrad algorithm in gradient descent. In this paper, the prediction effects of the four models are simulated. The first one is the model designed in this paper, and the other three are the models when a certain condition is missing (1) Data preprocessing is performed using EMD, the LSTM with dense and dropout layer is used for prediction, and gradient degradation is performed using the Adagrad algorithm.

516

W. Zhao et al.

(2) Data preprocessing is performed using EMD, the LSTM with dense and dropout layer is used for prediction, and gradient reduction is performed using the SGD algorithm. (3) Without decomposing the data, the LSTM with dense and dropout layer is used for prediction, and the Adagrad algorithm is used for gradient descent. (4) Data preprocessing was performed using EMD decomposition, the only LSTM is used for prediction, and gradient degradation was performed using the Adagrad algorithm.

4.2 Performance Comparison The data set simulated in this article is Internet traffic data (in bits) from a private ISP with centers in 11 European cities which downloaded from datamarket.com. In order to evaluate the performance of the network traffic prediction model, root mean squared error (RMSE) was selected as the evaluation index in this simulation experiment. The RMSE value reflects the extent to which the predicted data deviates from the true value. The smaller the value of RMSE, the smaller the deviation between the predicted value of a neural network and the true value, and the better the performance. In the simulation, the first 12,000 of the 14,776 network traffic sequence data is used as the training set, and the last 2776 data is used as the test set. Figure 4 shows the loss of the training set of the four models. Figure 5 shows the test set prediction values of the four models and the original values. From the comparison results in Fig. 4 and Fig. 5, the first model, which is the EMD-LSTM model designed in this paper, has the best prediction effect. Table 1 shows the RMSE of the training set and test set prediction values of the four models. From the comparison results in Table 1, the first model, which is the EMD-LSTM model designed in this paper, has the best prediction effect. Fig. 4 Loss of each model

Network Traffic Prediction in Network Security Based on EMD …

517

Fig. 5 Prediction data and the origin values

Table 1 Performance comparison of network traffic prediction Train RMSE

Test RMSE:

(1) EMD + LSTM (+Dense + Dropout) + Adagrad

112,290,084.077

103,795,012.873

(2) EMD + LSTM (+Dense + Dropout) + SGD

264,396,199.224

261,092,042.262

(3) EMD + LSTM + Adagrad

127,929,176.098

125,715,469.326

(4) LSTM (+Dense + Dropout) + Adagrad

145,828,276.612

132,289,805.802

Compared with the model using the SGD algorithm, the RMSE of the training set is reduced by 57.53%, and the root mean square error of the test set is reduced by 60.24%. The RMSE on the training set was reduced by 23.00% compared to the model without EMD and was reduced by 21.54% on the test set. The LSTM model in this paper adds the perceptual layer and the dropout layer. The RMSE of the training set is reduced by 12.22%, and the RMSE of the test set is reduced by 17.44%. It can be seen that the Adagrad gradient descent algorithm is more suitable for the data set of this paper. The data preprocessing using EMD effectively reduces the prediction error, and the addition of the dense layer and the dropout layer also achieve certain optimization effects. Analysis of performance comparison data can lead to the following conclusions (1) The Adagrad algorithm is more suitable for training the EMD-LSTM model of this paper than the SGD algorithm. (2) Using the EMD, preprocess data effectively reduces the prediction error. (3) Adding the dense layer and the dropout layer to the LSTM model is more effective than using a single LSTM model directly, but the improvement effect is not obvious, which may be caused by fewer data in this paper.

518

W. Zhao et al.

5 Conclusions In order to reduce the prediction error of the network traffic prediction model in current network security, this paper proposes a method to predict network traffic by combining EMD and LSTM neural network. We use the LSTM model which is good at processing time series because the time series of network traffic data is nonlinear. Considering that the change of network traffic data contains many influencing factors that are difficult to collect and express, we add the EMD decomposition to decompose a complex single network data sequence into multiple smoother sequence data as input in the data preprocessing part. In the simulation experiment, we use the Adagrad algorithm to carry out the gradient descent and achieve good results. The experimental result shows that the EMD-LSTM prediction method reduces the prediction error and can effectively predict the network traffic in the network traffic prediction task.

References 1. Wang, X.S.: Network traffic predicting model based on improved support vector machine. Comput. Syst. Appl. 26(3), 230–233 (2017) (In Chinese) 2. Lin, Y.Y., Ju, F.C., Lu, Y.: Research on application of ARMA model in short in short-term traffic prediction in LAN. Comput. Eng. Appl. 53(S2), 88–91 (2017) (In Chinese) 3. Hornik, K., Stinchcombe, M., White, H.: Multilayer feed forward networks are universal approximators. Neural Netw. 2(5), 359–366 (1989) 4. Chen, Y., Yang, B., Meng, Q.: Small-time scale network traffic prediction based on flexible neural tree. Appl. Soft Comput. 12(1), 274–279 (2012) 5. Miguel, M.L.F., Penna, M.C., Nievola, J.C., et al.: New models for long-term internet traffic forecasting using artificial neural networks and flow based information. In: Network Operations and Management Symposium, pp. 1082–1088 (2012) 6. Park, D.C.: Structure optimization of BiLinear recurrent neural networks and its application to ethernet network traffic prediction. Inf. Sci. 237(13), 18–28 (2013)

An Introduction to Quantum Machine Learning Algorithms Rongji Li, Juan Xu, Jiabin Yuan, and Dan Li

Abstract Machine learning, as a collection of powerful data analytical methods, is widely used in classification, face recognition, nature language processing, etc. However, the efficiency of machine learning algorithms is seriously challenged by big data. Fortunately, it is found that quantum mechanics properties can help overcome this problem. In this paper, we introduce typical ideas and methods of quantum machine learning to show how quantum algorithms improve the performance of machine learning process. These quantum machine learning methods can generally be divided into four categories: the efficient calculation methods of classical distances on a quantum computer, the construction of quantum models, the reformulation of traditional machine learning by a quantum system, and quantum dimensionality reduction algorithms. Finally, the challenges and opportunities of quantum machine learning are discussed. Keywords Machine learning · Quantum machine learning · Quantum algorithms

1 Introduction Named by Arthur Samuel in 1959, machine learning refers to an area of artificial intelligence in which computer systems are given the ability to “learn” from data through statistical techniques [1]. Machine learning is a collection of methods to find patterns in data by automatically building analytical models. The methods mainly consist of classification, regression, clustering, density estimation, dimensionality estimation, etc. Researchers apply these techniques to data mining, face recognition, nature language processing, biometric identification, spam classification, medical diagnosis, etc. R. Li · J. Xu (B) · J. Yuan · D. Li College of Computer Science and Technology, Nanjing University of Aeronautics and Astronautics, 210016 Nanjing, China e-mail: [email protected] Collaborative Innovation Center of Novel Software Technology and Industrialization, 210023 Nanjing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_51

519

520

R. Li et al.

The problem of dealing with massive data for machine learning is arising according to the estimation made by the International Data Corporation (IDC) that global data amount will reach 40 ZB by 2020 [2–4]. In the past 20 years, physicists have already demonstrated that some quantum algorithms can outperform the best-known classical algorithms. This is known as quantum speed-up [5]. However, it is difficult to find out first-class quantum algorithms that outperform their classical counterparts [6]. Besides the design of new quantum algorithms, the verification of existing quantum algorithms remains difficult because of the absence of universal quantum computer in the last two decades. Since the area of quantum computing has developed from concept to demonstration devices [7–9], many researchers believe that a big break of quantum machine learning (QML) can be expected. Up to now, although the interest of quantum machine learning increases rapidly, a unified theory of quantum machine learning is still far from appearance. Some researchers study the combination of quantum speed-up and classical machine learning techniques [10–12], some researchers are trying to produce entire quantum algorithms to solve pattern recognition problems [13–19], some researchers prefer to run subroutines of classical machine learning algorithms on a quantum computer to gain an improvement by hardware, and some stochastic models such as Bayesian decision theory or hidden Markov models need an appropriate translation into the language of the quantum system. In this review, some basic background knowledge about classical machine learning and their quantum counterpart is briefly discussed. Then, we introduce some QML algorithms in the following four aspects: the efficient calculation methods of classical distances on a quantum computer, the construction of quantum models, the reformulation of traditional machine learning by a quantum system, and quantum dimensionality reduction algorithms. Finally, we discuss briefly the opportunities of QML research.

2 Quantum Machine Learning Basics This part introduces some basic background knowledge of classical machine learning and quantum machine learning. QML is basically built on the foundation of linear algebra. The quantum basic linear algebra subroutines (qBLAS) are based on the quantization of their counterparts including least squares fitting, linear algebra, Newton’s method, principal component analysis, gradient descent, support vector machines, and topological analysis [8, 11, 19, 20]. In the perspective of overall process of quantum machine learning, there are basically two opinions about the machine learning quantization. One opinion is in support of constructing a total

An Introduction to Quantum Machine Learning Algorithms

521

quantum machine learning process, which means both the data and the methods should be quantum. And someone believe there is no evidence indicating that total quantum systems behave better than those classical machine learning techniques with quantum subroutines. For example, a quantum Boltzmann machine proposed by Amin in [21] shows that neural network with quantum sampling methods or a quantum annealing has better performance than traditional counterpart.

2.1 Classical Machine Learning Machine learning is a powerful tool in data process and analysis. A variety of learning algorithms, such as logistic regression [22], support vector machines [23], and associated rules mining [24], are basically based on two main different ideologies: Bayesians, which is also called probability graph model, and Frequentist, which is also known as statistical machine learning. In short, Bayesians focus on integration, which is usually accomplished with the help of Markov chain Monte Carlo (MCMC) methods, a class of algorithms for sampling from a probability distribution. As far as Frequentist, the main problems consist of the design of models, the construction of loss function, and the solution of loss function, which are all to achieve optimization. Traditionally, machine learning can be divided into two main categories according to the training data: supervised machine learning and unsupervised machine learning. Supervised learning accomplishes the learning tasks by learning a stationary function that maps an input to an output based on example input–output pairs. Some widely used algorithms are as follows: support vector machine, linear regression, naïve Bayes, k-nearest neighbor algorithm, etc. Unsupervised learning originates from Hebbian learning. It finds patterns in dataset without existing input–output pairs. Two main methods of unsupervised learning are principal component analysis (PCA) and cluster. Some common algorithms of unsupervised learning are clustering, neural networks, etc. Maria Schuld proposed different quantum speed-up methods corresponding to different machine learning methods in Fig. 1 [11]. Methods with the calculation of classical distances, such as support vector machine, k-nearest neighbor algorithm, and k-means clustering algorithm, can be accelerated by accomplishing the calculation on quantum computers. The quantization of neural networks and decision tree can start with the quantum models’ building. As for Bayes theory, hidden Markov models need a reformulation in the language in open quantum systems [10, 25].

2.2 Quantum Machine Learning The parallelism of quantum computing is the base of quantum machine learning. Servedio, Aaronon, and Cheng studied the learnability of quantum states [25–27]. From the perspective of information theory, Servedio pointed out that the learnability

522

R. Li et al.

Fig. 1 Different classes of machine learning methods [11]

of quantum information and classical information is equivalent. Based on Servedio’s theory, Cheng proposed that quantum learning algorithms are mainly divided into two categories, one is quantum computing learning and the other is quantum probability learning. The former mainly studies two points: (1) how to use the principles of quantum mechanics to improve the traditional machine learning process, to improve computational efficiency, and to reduce computational complexity; (2) how to use machine learning theory to solve quantum state tomography, to find hidden structures of quantum systems. So far, most researchers’ work focuses on solving the computational complexity problem, so this paper mainly introduces quantum computing learning. A wide variety of data analysis and machine learning methods are operated by performing matrix operations on vectors in a high-dimensional vector space, which is the mathematical foundation of quantum computation. Over the past decades, quantum machine learning algorithms generally take three steps to be completed. Firstly, in order to make full use of the high parallelism of the quantum computer, the classical information must be encoded and transformed into the quantum information in a smart way that makes it easier to exploit the potential of quantum computing. Secondly, researchers must design specific algorithms to quantum computer to transplant classical computer methods. Finally, the data structure, database, and other technologies must be combined in harmony to match different quantum algorithms.

An Introduction to Quantum Machine Learning Algorithms

523

3 Quantum Machine Learning Algorithms 3.1 Efficient Quantum Algorithms for the Calculation of Classical Distance Based on a collection of training objects consisting of corresponding feature vectors and attributes, the computer is supposed to accurately classify a set of unknown feature vectors. Quantum k-Nearest Neighbor Algorithms KNN is a classic machine learning algorithm based on instance classification, which classifies the similarity between the data to be classified and the sample data. Similarity needs to be defined according to actual problems, usually by estimating similarity. Commonly used similarity criteria are Euclidean distance, Manhattan distance, Hamming distance, angle cosine distance, etc. In 2014, Chen Hanwu proposed his quantum KNN algorithm in his paper to realize the partial steps of the classical KNN using quantum algorithm [27]. It realizes the parallel computing by quantum state superposition principle and accelerates the time of the classical KNN by concurrently computing the similarity between the sample to be classified and other samples. Using Grover’s algorithm, the search obtains k sample instances that are most similar to the samples to be classified (Figs. 2 and 3). Aïmeur proposed the idea of taking the overlap |a|b | of two quantum states | a and |b  as a “similarity measure.” The overlap can be completed by a simple quantum subroutine, sometimes called as a swap test [15]. On the base of the swap test, in 2013, Lloyd proposed a way to regain the distance of two real-valued n-dimensional vectors |a  and |b  by a quantum measurement. He calculated the inner product of Fig. 2 1-nearest neighbor classification map [9]

524

R. Li et al.

Fig. 3 5-nearest neighbor classification map [9]

the ancilla state |φ  =

√1 (| a| Z 2

+ a | b) by the state |ϕ =

√1 (| a ||0 Z

 + |b||1) and

then calculated |φ|ψ | as a part of the swap test. The classical distance between 



vectors a and b can be regained by a simple quantum swap test of carefully formulated states. Quantum support vector machine algorithms The principle of SVM is as follows (see Fig. 4): First, the training dataset is nonlinearly mapped to a high-dimensional feature space [14]. The purpose of this nonlinear mapping is to linearize the input space. After the indivisible dataset is mapped to the high-dimensional feature space, it becomes a linearly separable data set, and then an optimal separation hyperplane with the largest isolation distance is established in the feature space, which is equivalent to generating an optimal nonlinear decision boundary in the input space. The plane is the optimal separation hyperplane. The optimality, which is a solid line, can be seen from Fig. 5. Several separate hyperplanes can separate the two classes, but only one is optimal, which is represented by the solid line in Fig. 5. Geometrically speaking, the support vector is the minimum number of sample vectors that determine the optimal separation hyperplane [17]. The most attractive part of SVM is the idea of structural risk minimization.

Fig. 4 Schematic diagram of SVM

An Introduction to Quantum Machine Learning Algorithms

525

Fig. 5 Optimal separation hyperplane (full line) and nonoptimal separation hyperplane (imaginary line)

To this problem, it has been proved that a linear function can be used to map linearly indivisible problems in the input space to a linear separable problem in a feature space. Besides, the determination of optimal separation hyperplane is a typical constrained quadratic programming problem. The first quantum support vector machine algorithm was proposed by Anguita et al. in 2003 [14]. Subsequently, Rebentrost et al. proposed his quantum of SVM in 2014. The core ideas are using both quantum algorithms to solve the inner product operation problem (nuclear method) of training data. Rebentrost et al. first encode the dimensional features feature vector to the  of the   quantum state probability amplitude |xi  = |xi −1 g Nj=1 (xi ) j | j , where N represents the eigenvector norm. Second, make preparation of the following quantum √ −1  M  M |xi |2 , and xi repstates |x  =  N x  g i=1 (xi ) j |i  |xi ), where the N x = i=1 resents the i-th training sample. Rebentrost et al. later linked the nuclear matrix to the density matrix of the quantum system. Since each element of the kernel matrix is the     −1   −1    inner product between vectors K i j = xi gx j and x j xi = |xi | xi g x j x j , at this time, the normalized kernel matrix can be obtained by finding the skew of the density matrix |x  x| . By this method, the quantum system is connected with the nuclear matrix of traditional machine learning. Because the evolutionary operation between quantum states has high parallelism, the acceleration of the corresponding kernel matrix calculation in traditional machine learning can be completed by this method. Rebentrost et al. also propose least squares support vector machine of quantum version [17]. They turned the traditional SVM classification problem into solving the  ˆ d = |y , s.t.F ≤ 1; the solution process is similar to following problem: F|b, the HHL algorithm. Finally, the classification task is converted to use the controlled 

SWAP operation to compare the distance with |b, d; thus, we obtain the category |x . There are also some advances in the physical experiments of quantum support vector machine algorithms. Recently, Li et al. physically realized a 4-qubit quantum

526

R. Li et al.

SVM by means of nuclear magnetic resonance and recognized the most basic handwritten digits 6 and 9. The experimental results show that the recognition accuracy is as high as 99%, although the experimental sample is small. Quantum Support Matrix Machine Algorithm The support matrix machine is very similar to the support vector machine; the only difference is that the vector is replaced by a matrix for classification. In SMM, the samples are x1 , x2 , . . . , xn , the number of samples is n, the feature space dimension is p ∗ q, and each sample is a matrix of p ∗ q. Although vector processing is faster and more convenient than matrix in terms of computational complexity, in many applications, such as image classification, there will be a certain spatial relationship between two-dimensional image pixels [23]. If SVM is used for classification, the matrix is first converted into the form of a vector, which will lose the structural information of the matrix, further affecting the accuracy of the classification. Therefore, in the application of the matrix of the input elements of the original feature space, in order to effectively retain the structural information of the matrix, Luo et al. proposed a classification algorithm called a support matrix machine. The SMM training process is solved by the alternating direction method of multipliers, which includes the solution of two core steps, which involve the quadratic programming problem and the solution process of the singular-value threshold. These problems can be solved within the time complexity of the polynomial. The two processes of learning and classification are shown in Fig. 6. QSVT represents quantum singular-value threshold algorithm. In 2017, Bojia Duan and her group proposed a quantum algorithm for SMM [28]. The core steps in SMM are the least squares technique and updating ADMM by QSVT algorithm. There are two main innovations in the algorithm. First, before the execution of the HHL algorithm, the original problem is transformed by the least

Fig. 6 Design of SMM (the process of SMM can be divided into two parts: learning and classification) [25]

An Introduction to Quantum Machine Learning Algorithms

527

squares method; without this conversion, the original problem cannot directly apply the quantum algorithm. The second is to design the QSVT quantum algorithm. Quantum k-Means Clustering Algorithm In 2013, Lloyd et al. proposed the quantum nearest-center algorithm [17]. This method can be used to exponentially speed up the classical algorithm. The core idea of the quantum nearest-center algorithm is to continuously compare the dis tances between real vectors and find the nearest distance between the vector u and c    m the set {v}, represented as arg minc u − m −1 · j=1 v j . To optimize the initial point, Lloyd uses a quantum adiabatic evolution algorithm to implement the initial point selection of the k-means quantum version. In 2015, Jianwei Pan and his team used a small-scale optical quantum computer as an experimental platform to perform experiments of quantum K-means algorithm [22]. It uses a single photon as a qubit with spontaneous parametric down-conversion technique preparing an entangled photon pair. In the experiment, the qubit numbers of 4, 6, and 8 were all verified. The results show that classical computer can be substituted by quantum computer to realize the calculation of distance between highdimensional vectors.

3.2 Construction of Quantum Models

Quantum Algorithms of Neural Networks Artificial neural network is a biomimetic computing model named after biological neural network [5]. Artificial neural network is a nonlinear data modeling tool, which consists of many neurons. The neurons between the layers are connected through different weights to form a model of the network structure. Network consists of input layer, output layer, and hidden layer. As shown in Fig. 7, the left nodes {X ij }nj=1 are the neurons of i-th layer. They are connected with the j-th  node in i + 1 layer through weights {Wki j }nk=1 , while X i+1 = nk=1 Wki j X ki . j The training methods mainly include two stages: (1) forward propagation and (2) back propagation. Calculate the error between the output layer and the label, optimize the loss function using the gradient drop, and update the weight of each layer in the network from the output layer to the input layer. Each training sample performs a forward calculation and a reverse update operation, and finally, the network converges. In 1995, Kak combined the concepts of neural networks and quantum computing to present quantum neural network calculations for the first time [20]. Also, in 1995, Menneer et al. proposed a quantum-derived neural network that uses a dataset to train the same network to find network parameters that fit different modes. Menneer trains multiple isomorphic networks in the same mode to obtain quantum superposition of isomorphic networks corresponding to different modes. Behrman et al. proposed the

528

R. Li et al.

Fig. 7 Neural networks

concept of quantum dot neural networks in 1996. They found that quantum pointbased time evolution models can perform forward or reverse calculations in neural networks. In 1998, Ventura et al. combined the principle of superposition in quantum theory to replace the weight vector of the network with the quantum state representation in Hilbert space. The training of neural networks corresponds to the evolution of these quantum states. In 2002, Kouda et al. used a three-layer quantum neural network for image compression, which is more efficient than traditional methods. In 2005, they verified that the quantum bit-based neural network is superior to the traditional neural network by the 4-bit and 6-bit parity check methods. In 2006, Zhou et al. proposed a quantum neural network that can implement traditional XOR operation only with a single neuron and solve the linear inseparable problem that traditional neural network requires two layers to solve. Schuld et al. performed a systematic comparative analysis of existing quantum neural networks. Schuld believes that the framework of quantum neural networks should satisfy three conditions: (1) the input and output of the neural network must be encoded data; (2) quantum neural network and structure of basic neural must be expressed in quantum language; and (3) the evolution process in quantum neural networks must obey the laws of quantum mechanics, such as superposition and entanglement. Quantum decision tree algorithms The decision tree model is a tree structure model that describes the object attributes or features and maps them to the categories to which the objects belong to. Each node in the tree represents an object, which is divided into internal nodes and leaf nodes. The internal node represents the attribute value of the object, and the leaf node represents the category of the object. Earlier, Farhi et al. first proposed a combination of quantum computing and decision tree models in 1997 [22]. In 2014, Lu and Braunstein also proposed quantum decision tree classifiers. It uses the von Neumann entropy to replace the Shannon entropy and calculates the eigenvalue by calculating its expected value.

An Introduction to Quantum Machine Learning Algorithms

529

3.3 Reformulation in Quantum System

Algorithms for Hidden Quantum Markov Models The Markov chain is a special discrete form of Markov stochastic process. In this process, the conditional probability distribution of its future state depends only on the current state. The hidden Markov model was based on the Markov chain [10]. Each observation vector is represented by various probability density distributions in various states, and each observation vector is generated by a sequence of states having a corresponding probability density distribution. To observe a HMM algorithm, we usually use parameters as follows: N (which is used to indicate the number of the hidden states in models); M (which is used to indicate the number of the corresponding observable states); A (which indicates state transition probability matrix); B (observation probability matrix); and π (which indicates the initial state distribution). Thus, a HMM model can be represented as λ = (N , M, π, A, B). The first hidden quantum Markov model is introduced by Monras. Being different from what K. Wiesner has proposed in the way of von Neumann or projective measurement of an evolving quantum system, Monras consider a more general formalism of open quantum systems. The state of a system is given by a density matrix ρ, and transitions between states are governed by completely positive tracenonincreasing superoperators Ai acting on these matrices. These operations can always be represented by a set of Kraus operators {K 1i , . . . , K qi } fulfilling the probability conservation condition K ki† K qi ≤ 1; thus, we get the probability of obtaining state ρs = P(ρs )−1 As ρ. In the future, there may be the possibility of “calculating” the outputs of classical models via quantum simulation. That idea would be interesting if the quantum setting could learn models from given examples, a problem which is nontrivial. Clark et al. add the notion that hidden quantum Markov models can be implemented by using open quantum systems with instantaneous feedback [29].

3.4 Quantum Dimensionality Reduction Algorithms The data structure processed by machine learning methods is usually high dimensional, especially in the areas of computer vision and natural language processing [16]. Some algorithms may not work well in high-dimensional space. Therefore, dimensionality reduction is very important in machine learning. The dimensionality reduction operation reduces the complexity of the data and eliminates unnecessary useless information. Commonly used dimensional learning operations in classical machine learning include principal component analysis, linear discriminant analysis, and popular learning [20]. In recent years, some researchers have focused on combining quantum mechanics with dimensionality reduction algorithm. Lloyd et al. proposed a quantum principal component analysis algorithm in 2014 [23]. Since the density matrix of a quantum system is a Hermite matrix, it can be expressed as a

530

R. Li et al.

form of a Gram matrix, which can be regarded as a covariance matrix of a set of vectors. Therefore, the method constructs a feature vector with a larger feature value using a plurality of density matrix copies of the quantum system. In 2015, Cong et al. proposed the quantum linear discriminant analysis [29]. This method, like QPCA, is based on the reliable physical implementation of QRAM. This algorithm associates the covariance matrix of the original problem data with the density matrix of the quantum system and then performs the eigenvalues and eigenvectors of the density matrix. In 2019, Bojia Duan [30] and her group proposed a quantum algorithm and a quantum circuit to efficiently perform A-optimal projection (QAOP). For dimensionality reduction, QAOP algorithm has an exponential speed-up compared with the best-known classical algorithms [31].

4 Conclusion This paper depicts the four classes of quantum machine learning methods, including efficient calculation methods of classical distances on a quantum computer, the construction of quantum models, the reformulation of traditional machine learning by a quantum system, and the quantum dimensionality reduction algorithms. However, there are still some difficulties. Firstly, QML researchers have not yet established a unified framework. Secondly, although the design of entire quantum algorithms for QML is hard to achieve, it is still a considerable question that whether entire quantum algorithms perform better than classical methods with quantum subroutines. Thirdly, the construction of universal quantum computers would be important hardware support for the research of quantum machine learning [4, 7, 8]. Despite these challenges, quantum machine learning remains a mysterious and promising field of research [2, 32–34]. Acknowledgements This work was supported by the National Natural Science Foundation of China (Grant Nos. 61571226 and 61701229) and the Natural Science Foundation of Jiangsu Province (Grant No. BK20170802).

References 1. Kohavi, R.: Glossary of terms. Special Issue Appl. Mach. Learn. Knowl. Discovery Process 30(271), 127–132 (1998) 2. Guo, H., Wang, L., Chen, F., Liang, L.: Scientific big data and digital earth. Sci. Bull. 59(35), 5066–5073 (2014) 3. Gantz, J., Reinsel, D.: The digital universe in 2020: big data, bigger digital shadows, and biggest growth in the far east. IDC iView: IDC Analyze Future 2007(2012), 1–16 (2012) 4. Figgatt, C., Ostrander, A., Linke, N.M., Landsman, K.A., Zhu, D., et al.: Parallel entangling operations on a universal ion-trap quantum computer. Nature 572(7769), 368–372 (2018) 5. Feynman, R.P.: Simulating physics with computers. Int. J. Theor. Phys. 21(6), 467–488 (1982)

An Introduction to Quantum Machine Learning Algorithms

531

6. Kak, S.C.: Can we define levels of artificial intelligence? (1996) 7. Larsen, M.V., Guo, X., Breum, C.R., Neergaard-Nielsen, J., Andersen, U.L.: Deterministic generation of a two-dimensional cluster state for universal quantum computing. arXiv preprint arXiv:1906.08709 (2019) 8. Wright, K., Beck, K.M., Debnath, S., Amini, J.M., Nam, Y., et al.: Benchmarking an 11-qubit quantum computer. arXiv preprint arXiv:1903.08181 (2019) 9. Biamonte, J., Wittek, P., Pancotti, N., et al.: Quantum machine learning. Nature 549(7671), 195 (2017) 10. Wittek, P.: Quantum machine learning: what quantum computing means to data mining. Academic Press (2014) 11. Adcock, J., Allen, E., Day, M., Frick, S., Hinchliff, J., Johnson, M., et al.: Advances in quantum machine learning. arXiv preprint arXiv:1512.02900 (2015) 12. Schuld, M., Sinayskiy, I., Petruccione, F.: An introduction to quantum machine learning. Contemporary Phys. 56(2), 172–185 (2015) 13. Horn, D., Gottlieb, A.: Algorithm for data clustering in pattern recognition problems based on quantum mechanics. Phys. Rev. Lett. 88(1), 018702 (2001) 14. Lloyd, S., Mohseni, M., Rebentrost, P.: Quantum algorithms for supervised and unsupervised machine learning. arXiv preprint arXiv:1307.0411 (2013) 15. Aïmeur, E., Brassard, G., Gambs, S.: Quantum speed-up for unsupervised learning. Mach. Learn. 90(2), 261–287 (2013) 16. Wiebe, N., Kapoor, A., Svore, K.: Quantum algorithms for nearest-neighbor methods for supervised and unsupervised learning. arXiv preprint arXiv:1401.2142 (2014) 17. Rebentrost, P., Mohseni, M., Lloyd, S.: Quantum support vector machine for big data classification. Phys. Rev. Lett. 113(13), 130503 (2014) 18. Wiebe, N., Kapoor, A., Svore, K.M.: Quantum deep learning. arXiv preprint arXiv:1412.3489 (2014) 19. Giovannetti, V., Lloyd, S., Maccone, L.: Quantum random access memory. Phys. Rev. Lett. 100(16), 160501 (2008) 20. Giovannetti, V., Lloyd, S., Maccone, L.: Architectures for a quantum random access memory. Physical Rev. A, 78(5), 052310. Bammann, K. Statistical models: theory and practice. Biometrics 62(3), 943–943 (2008) 21. Amin M H, Andriyash E, Rolfe J, et al. Quantum boltzmann machine [J]. Physical Review X, 8(2): 021050. (2018) 22. Cortes, C., Vapnik, V.: Support-vector networks. Mach. Learn. 20(3), 273–297 (1995) 23. Agrawal, R., Imieli´nski, T., Swami, A.: Mining association rules between sets of items in large databases. ACM Sigmod Rec. 22(2), 207–216 (1993) 24. Servedio, R.A., Gortler, S.J.: Equivalences and separations between quantum and classical learnability. SIAM J. Comput. 33(5), 1067–1092 (2004) 25. Cheng, H.C., Hsieh, M.H., Yeh, P.C.: The learnability of unknown quantum measurements. arXiv preprint arXiv:1501.00559 (2015) 26. Aaronson, S.: The learnability of quantum states. Proc. Royal Soc. A: Math., Phys. Eng. Sci. 463(2088), 3089–3114 (2007) 27. Duan, B., Yuan, J., Liu, Y., Li, D.: Quantum algorithm for support matrix machines. Phys. Rev. A 96(3), 032301 (2017) 28. Qu, Z., Zhu, T., Wang, J., Wang, X.: A novel quantum stegonagraphy based on brown states. Comput. Mater. Continua 56(1), 47–59 (2018) 29. Clark, L.A., Huang, W., Barlow, T.M., Beige, A.: Hidden quantum markov models and open quantum systems with instantaneous feedback. In ISCS 2014: Interdisciplinary Symposium on Complex Systems, pp. 143–151. Springer, Cham (2015) 30. Duan, B., Yuan, J., Xu, J., Li, D.: Quantum algorithm and quantum circuit for A-optimal projection: dimensionality reduction. Phys. Rev. A 99(3), 032311 (2019) 31. Cong, I., Duan, L.: Quantum discriminant analysis for dimensionality reduction and classification. New J. Phys. 18(7), 073011 (2016)

532

R. Li et al.

32. Liu, W., Chen, Z., Liu, J., Su, Z., Chi, L.: Full-blind delegating private quantum computation. Comput. Mater. Continua 56(2), 211–223 (2018) 33. Huang, Y., Lei, H., Li, X.: A survey on quantum machine learning. Chin. J. Comput. 41(1), 145–163 (2018) 34. Hilbert, M., López, P.: The world’s technological capacity to store, communicate, and computer information. Science 332(6025), 60–65 (2011)

Information Analysis

Design of Seat Selecting System for Self-study Room in Library Based on Smart Campus Jiujiu Yu, Jishan Zhang, Liqiong Pan, Cuiping Wang, and Gang Xiao

Abstract A seat selecting system for self-study room in library is designed to integrate the sub-platform of “Campus Service” in smart application layer of the existed architecture of smart campus. The system is based on Struts–Spring–Hibernate (SSH) architecture, and Android platform is used for the client side. Mode of process driven is used for data exchange of the system to implement the major functions of seat search, seat reservation, my seat view, and seat selecting conveniently. The application of the system achieves good results in author’s experimental university. Finally, further work is expected on development of the system in this paper. Keywords Smart campus · Seat selecting · Android platform · Seat reservation · Process driven

1 Introduction Smart campus is the hot spot at university informatization [1]. Smart campus is centered on users and highlights the important supporting role of teaching, scientific research, and management in universities. Smart campus is developed from digital campus. Currently, many universities in domestic are in the transition phase from digital campus to smart campus. On one hand, many universities only integrate the entrances on various campus business systems through standardized portals, but the cooperation among various departments on campus cannot be achieved and many cross-system business processes cannot be realized either [2]. On the other hand, most of the campus business sub-systems are also developed according to the business requirement and processes of the different management departments, and convenient service-oriented process cannot be formed for service of the function implementation. J. Yu (B) · J. Zhang · L. Pan · G. Xiao Anhui Sanlian University, 230601 Hefei, China e-mail: [email protected] C. Wang Wuhu Hanjiang Cultural Consulting Co., Ltd., 241000 Wuhu, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_52

535

536

J. Yu et al.

Application is the presentation of wisdom of smart campus; the existed researches on smart campus application mainly focus on three aspects: supplement of teaching resource, update service on campus, and campus management transformation [3]. Based on smart learning environment, the use of information technology to innovate the life services on campus has become the major research hot spot of smart campus. Additionally, full management of teaching systems, scientific research systems, and all kinds of office systems can be also achieved by the platform of smart service of smart campus [4]. In addition to improve the design for top level, the construction of smart campus needs to consider the application and implementation of specific business sub-systems from the micro-level. It also needs to highlight micro-services and micro-applications and provide smart applications and smart services for teachers and students on campus. Moreover, it also provides scientific decision and management for university administrators. Reading and studying in self-study room in library is one of the main campus activities for university college students at present. In recent years, the seating management system has been introduced in the university library for prevent seat-occupying behavior [5]. This paper is based on smart campus to design a seat selecting system for self-study room in library, and the system is fully applied on seat selecting process for students on local campus. The structure of this paper is organized as follows: Section 2 presents the relevant technologies of the development. Section 3 describes the process of designing the system based on smart campus. Section 4 describes the implementation and application of the system. At last, Sect. 5 concludes the paper and puts forward the further work.

2 Relevant Technologies 2.1 Architecture of Smart Campus The traditional smart campus system consists of a basic environment layer, a data layer, and a business application layer. However, the support for mobile applications is not enough yet. Real data sharing and data synchronization are difficult to implement either, and data exchange can be solved by reading data across application systems only, but it is difficult to write data across different systems [1]. At present, the major models of architecture of smart campus in famous foreign universities are Integrated Controls and Analytics Program (ICAP) [6], spatially enabled smart campus [7], P + A (Platform + App) [8], and service-oriented based on mobile technology [9]. In the era of education informatization 2.0, it is more urgent for universities in domestic to integrate and apply the smart environment with intelligent resources, and to make classrooms, self-study rooms, libraries, conference centers, and so on into a share learning area for autonomous learning, exploratory learning, evaluating, and displaying to support multiple learning methods [10]. In this paper, the “4 + 1” hierarchical architecture of smart campus platform [1] which is

Design of Seat Selecting System for Self-study Room in …

537

composed of infrastructure layer, data and resource layer, business support layer, and smart application layer is used to support the designing of the seat selecting system for self-study room in library in local experimental university. Due to space limits, the method of construction on “4 + 1” hierarchical architecture of smart campus platform is not introduced in this paper. Readers who are interested in this could search the relevant content in reference [1].

2.2 SSH and Android Platform Struts–Spring–Hibernate (SSH) are the three layers on architecture based on J2EE for Web server [11]. SSH is a lightweight design solution for the J2EE architecture of small enterprise applications, enabling to complete the functions of network and system management. Android is developed by Google, based on the Linux kernel, and designed primarily for touch screen mobile devices such as smartphones and PADs [12]. Android platform is very suitable for providing campus digital and information application services, and the main advantage is that Android platform is completely opened to the third-party software and the service is free [13]. As the client platform of Web application system, Android is a platform that is very suitable for all kinds of software information and application services and has been widely used in Web applications.

3 Design of Seat Selecting System for Self-study Room in Library 3.1 Analysis on User Requirement The system is in the form of an Android app which provides the major functions of register/login, seat search, seat reservation, seat selection, user/seat management, my seat view, and data statistics for students on local campus. The system has a good human–computer interaction. It conforms to the user’s usage habits and is easy to promote. User authorization is divided into students and administrators, and the functional description of each module is shown in Table 1.

3.2 Design of Architecture The “4 + 1” hierarchical architecture of smart campus platform [1] is used for the construction of smart campus in author’s experimental university. As a new subsystem, the seat selecting system is integrated into the sub-platform of “Campus

538

J. Yu et al.

Table 1 Functional description of each module of seat selecting system Module

Functional description

User authorization

Register/login

Real name registration and login the system for students on local campus

Students/administrators

Seat search

Search on the information whether the seats are occupied or not in the self-study room

Students/administrators

Seat reservation

Students reserve free or unoccupied seats in the self-study room

Students

Seat selecting

Students can select unoccupied seats in the self-study room in the form of code scanning by smartphone

Students

My seat view

Students can view their information on seat reservation or seat selecting

Students

Data statistics

Data statistics on occupation on seats, number of students, etc. in the self-study room daily

Administrators

User/seat management

Information setting on students and seats

Administrators

Service” in smart application layer of the existed architecture of smart campus, which is shown in Fig. 1. As the same as other smart applications, the seat selecting system is based on J2EE framework of SSH and is divided into client and server. The smart application layer includes various applications of smart campus information business services [1],

Fig. 1 “4 + 1” hierarchical architecture of smart campus

Design of Seat Selecting System for Self-study Room in …

539

such as education/teaching, scientific research, and other kinds of campus services for local students. It is the key interface between the campus users and smart campus.

3.3 Design of Database The data of each smart applications of the smart campus platform is exchanged and shared by the business process, and the data is transmitted orderly [1]. The smart campus in experimental university could extract the data of the relevant user roles of each existed business sub-system through the service bus and the process engine and connect the existed data with the new data table field according to the functions of new service application to form the data table of new applications. The database of the new smart application in smart campus is designed for process driven that is shown in Fig. 2. It is different from the method of database designing on traditional digital campus. For example, some data fields of the data table of “seat reserving” could be generated automatically from the data tables of “student,” “class,” “seat,” and so on from other existed database of sub-systems. When a new sub-system for service application is started, users need not to input a large amount of repeated data. Fig. 2 Design of database for process driven

540

J. Yu et al.

4 Implementation and Application of Seat Selecting System for Self-study Room in Library 4.1 Implementation A new project of “edu.self.LoginActivity” is created on Android development platform. JDK configuration and Tomcat environment settings are completed at http:// 127.0.0.1:8080/. The local client IP address (192.168.43.98) is modified to design the client main interface. The source code files’ map of the project of seat selecting system and the main interface of the client are shown in Fig. 3. Due to space limitations in this paper, only the implementation of the major function of seat reservation for seat selecting system is introduced. When a registered student clicks on the seat reservation, the system will check whether the student has already a seat. If the student has no seat yet, the reservation can be made automatically or manually. After the reservation is successfully made, the system will send the seat number that is reserved to the student, and the reservation data is stored in the database. Of course, the reserved seat can be canceled if the seat selecting is not happened in self-reading room. The process of seat reservation is shown in Fig. 4, and the user functionality interface is shown in Fig. 5 (Note: 1. There are unoccupied

Fig. 3 Source code files’ map and main interface of client side of the seat selecting system

Design of Seat Selecting System for Self-study Room in …

541

Fig. 4 Process of seat reservation

Fig. 5 User functionality interface

seats in self-study room. 2. All seats are occupied. 3. The student has occupied a seat. 4. The student wants to cancel the seat reservation when he or she has already occupied a seat.).

542

J. Yu et al.

4.2 Application As a sub-system for campus service, the seat selecting system for self-study room in library was integrated into the local architecture of smart campus platform in author’s experimental university in the year of 2018. More than 500 students on local campus use the system to complete the reading and studying activities through the mobile phone conveniently every day. Situation on seat occupying was eliminated, and it greatly improves the effective utilization rate of the library resources. The operating parameters on performance, stability, and security of the system are well, and there was no failure happened. More than 90% students believe that learning effectiveness could be achieved during the period of the application.

5 Conclusions and Further Work The construction and application of smart campus is in-depth integration and innovation with the university’s various businesses [3]. With the development of key technologies of artificial intelligence, big data, and so on, through the optimization of designing of database and data collection in the education and teaching process, the scientific and precision on modern education and the resource supplement are realized, and the mode of campus service is changed. The establishment of the seat selecting system for self-study room in library provides convenience, faster, and practical campus service for local students to improve the level on information management in universities. Further work will be done in the future. Firstly, with the gradual deepening of information construction and the continuous promotion of applications in smart campus, all sorts of business data are becoming more and more comprehensive [14]. Framework of big data should be constructed to analyze the reasonable data in massive data; some hidden but valuable information is possible to be found and is serviced for the decision-making and management information systems on campus. Secondly, some functions of handling of irregularities should be added in seat selecting system to protect the rights of more readers. For example, a seat is reserved by a student, but he or she does not studying in the self-study room for a long time. The system needs to add the function of fining for violations. Thirdly, technologies of virtual reality (VR) and augmented reality (AR) should be used in development of seat selecting system to enhance the real experience of students and help them to improve learning interests and efficiency on campus. Acknowledgements The work in this paper was supported by the Excellent Young Talent Support Project of Anhui Province University under Grant No. gxyq2019138, Projects of Quality Engineering of Anhui Province University under Grant No. 2019jyxm0508, 2019jxtd122, 2017jxtd131, and Project of Quality Engineering of Anhui Sanlian University under Grant No.16zlgc031. As the corresponding author of this paper, I would like to express my heartfelt gratitude to Jishan Zhang,

Design of Seat Selecting System for Self-study Room in …

543

Liqiong Pan, Cuiping Wang, Gang Xiao, and all the authors of the references, which are listed at the end of this paper.

References 1. Liu, G.P., Zhong, J., Xie, T.: Research and practice of process-driving based basic framework of smart-campus in higher education. J. China Educ. Technol. 40(4), 23–28 (2019) 2. Jiang, D.X., Fu, X.L., Yuan, F., Jiang, L.H.: Design of the technical reference model of Wisdom Campus in Universities. J. China Educ. Technol. 37(9), 108–113 (2016) 3. Xie, Y.R., Li, J., Qiu, Y., Huang, Y.L.: The new development of smart campus construction and research in the 2.0 Era of educational informatization. J. China Educ. Technol. 40(5), 63–69 (2019) 4. Yu, C.H.: Research on the construction of intelligence service and maintenance platform of smart campus. J. China Educ. Technol. 36(8), 16–20 (2015) 5. Chu, W.J., Chu, Z.H., Xu, X.Y.: Research on the readers’ behavior of self-study in library based on the seating management system data. J. Libr. Sci. 47(5), 107–112 (2017) 6. Shah, A.: Components of an Intelligent Campus. Documents/Components of an Intelligent Campus.pdf. https://www.appa.org/training/APPA2017/. Last accessed 2 July 2019 7. Jennifer, F.: A spatially-enabled smart campus for community-based learning. http:// digitalcommons.fiu.edu/cgi/viewcontent.cgi. Last accessed 21 May 2019 8. Joaquin, H., Ana, S., Michael, G.: Smart Campus. http://www.spatial.ucsb.edu/eventfiles/ ASESC/docs/Huerta-presentation.pdf. Last accessed 11 June 2019 9. Yonsei University. World’s Best Smart Campus! The Future of the World Begins at Yonsei. https://www.yonsei.ac.kr/en_sc/campus/scampus.jsp. Last accessed 6 April 2019 10. Gan, R.H., Yuan, Z.Q., He, G.D.: The latest advances of overseas smart campus construction and its enlightenment. J. Mod. Educ. Technol. 29(2), 19–25 (2019) 11. Yu, J.J.: Analysis and design of course website for software testing based on SPOC. In: International Symposium on Power Electronics and Control Engineering, pp. 1–6. IOP Publishing Ltd., Xian (2018) 12. Peng, J., Liu, Y., Fu, L.: Computer English. Aviation Industry Press, Beijing (2016) 13. Yu, J.J.: Design of a lightweight autonomous learning system for the course of software testing based on android. Unpublished 14. Chen, G.S., Gu, M.Y., Zhang, H.Y., Liu, M.: Construction practice of micro-service and microapplication in smart campus construction. J. Anhui Univ. Technol. (Social Sciences Edition) 36(1), 92–93 (2019)

An Optimized Scheme of Information Hiding-Based Visual Secret Sharing Yi Zou, Lang Li, and Ge Jiao

Abstract Information hiding-based visual secret sharing (IH-VSS) uses the information hiding techniques to embed secret data into images. In the IH-VSS scheme, hidden images are divided into n shadows under the guidance and constraints of some predetermined methods, and only a certain number or all of the credible shadows work together to recover hidden information. Based on (2, 2)-threshold IH-VSS scheme, this paper proposes an optimized IH-VSS scheme, it can randomly locate the hidden position of the secret data. We set a random number and use it as the initial hiding position, then combined with the length of the secret data, assigns the address, and completes the hiding of the secret data. The experimental results show that under the same embedding capacity, the peak signal-to-noise ratio (PSNR) of the optimized scheme is higher than other similar schemes, which is high to 55.41 dB. Moreover, the difference between the two shadows is very small. Keywords IH-VSS · Reference matrix · Random position

1 Introduction The visual secret sharing (VSS) scheme was proposed by Naor and Shamir at the European cryptography conference in 1994 [1]. Because VSS need not with any cryptology knowledge or computer help in restoring a secret, it has a wide range of practical applications and has been extensively studied in the literature. And secret sharing technology combines with information hiding has become a hot research topic in recent years. The algorithms related to IH-VSS have unique methods that are different from each other, but they are not immune to the trade-off between the embedded capacity and the image quality of the generated shadows [2–4]. In this Y. Zou (B) · L. Li · G. Jiao College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_53

545

546

Y. Zou et al.

paper, we propose an optimized scheme based on (2, 2)-threshold IH-VSS scheme [5], the optimized scheme can randomly locate the hidden position of the secret data, and get higher peak signal-to-noise ratio than others similar scheme. The rest of this paper is organized as follows. Section 2 discusses Kim et al.’s EMD-2 scheme [6] and (2, 2)-threshold IH-VSS scheme [7]. The optimized scheme we proposed is introduced in Sect. 3, and the experimental results and performance analysis are shown in Sect. 4. Finally, the conclusions are presented in Sect. 5.

2 Related Works 2.1 EMD-2 Scheme The EMD scheme was first proposed by Zhang and Wang in 2006. It generated high-quality stego-image with the PSNR value of more than 52 dB and achieved a significant embedding rate by modifying at most one least significant bit of n pixels. Later, Kim et al. proposed a new information hiding method called EMD-2 in 2010, which improved EMD by allowing the modification of up to two pixels and using different directions of modification to represent different secret data. But both the two schemes embedded the secret to the fixed position. Thus, we present an improved scheme with the random position to hide the secret. In EMD-2 scheme, the author defined a pixel group, which expressed by pn and pn = ( p1 , p2 , . . . , pn ), (n ≥ 2). It is worth mentioning that while n = 1, the processing is carried out with a pixel as the unit, without forming a pixel group. So in this paper, we will not discuss it in detail. In order to hide secret data to the pixel group pn , it uses the following method to achieve. According to the value of pn , we can calculate the value of f (pn ) as shown in Eq. (2). The basic element bi , where i ∈ [0, 8], is used as the input to the function f as a weighted sum with modulo (2ω + 1).  f ( p1 , p2 , . . . , pn ) =

n 

 ( pi . bi ) mod (2ω + 1)

i=1

And where  Bn = [b1 , b2 , . . . , bn ] =

n = 2, [1, 3] [1, 2, 3, 11, . . . , 6 + 5(n − 3)] n > 2.

and  ω=

4 n = 2, 8 + 5(n − 3) n > 2.

(1)

An Optimized Scheme of Information Hiding-Based Visual …

547

Then, the subscript value v is calculated using Eq. (2). Here, d is the secret data. f is the value calculated by Eq. (1) associated with the pixel group Pn . ⎧ d ≥ f, ⎨d − f v = (2ω + 1) − |d − f | d < f and n > 2, ⎩ 4 − |d − f | d < f and n = 2.

(2)

Lastly, the vector of the treated pixel value Pn can be acquired using Eq. (3). Where Cv is the exponential vector when the number v is associated with the basis vector Bn which has been defined in Eq. (3). Pn = Pn + Cv

(3)

Combined with the (2, 2) IH-VSS scheme, the M matrix can be obtained, and its value can be calculated by Formula (4). For example, suppose a pixel pair (153, 47), its derived value is 6 based on Eq. (4): M (153, 47) = (153 × 1 + 47 × 3) mod 9 = 6. M( pi , pi+1 ) = f ( pi , pi+1 ) = P2 · B2 mod 9 = ( pi × 1 + pi+1 × 3) mod 9

(4)

2.2 (2,2)-Threshold IH-VSS Scheme (2, 2)-threshold IH-VSS scheme has the feature of high embedding capacity, without distortion and low computational complexity. In this scheme, in the shadow generation phase, using Kim et al.’s M matrix and a random number, two meaningful shadows are produced and distributed to participants. In the extraction and restoration phase, the hidden secret information and cover image, respectively, can be reconstructed credibly and correctly. Experimental results confirm that no complex computation of shadow generation is involved, but high security is achieved. The detailed description of (2, 2)-threshold IH-VSS scheme can be found in the script [5]. Notations and their descriptions in this scheme are listed in Table 1.

3 The Optimized Scheme The optimized scheme of visual secret sharing, which based on (2, 2)-threshold IHVSS scheme, was proposed in this paper. The optimization about the concealment and sharing process will be introduced in Sect. 3.1−3.3, respectively. The notations and descriptions are the same as listed in Table 1.

548

Y. Zou et al.

Table 1 Notations and descriptions Notation

Description

S

The secret data

Oi

An H × W grayscale image, O = {Oi |i = 1, 2, . . . , H × W }, where Oi ∈ [0, 255]

O

The image which is randomly updated after the first four pixel values of O

R

A binary string form by the least significant three digits of O1 –O4

S

A 9-base number



Stego-image which was embedded with the secret data, with the size H × W

RNum

A random binary string, such as (100010100110 1001…00101110)2 , of which the length is not greater than H × W/2 − 2.

O˜ 1 , O˜ 2

The two meaningful shadow with the size H × W

3.1 Initialization Phase There is no different inputs between the optimized scheme and (2, 2)-threshold IHVSS scheme, they are nearly the same. And the detail steps for initialization are as follow: 1. For the cover image O, the first four pixel values are randomly updated, and the updated image is represented as O ; the method to update is: Let the least significant three digits of the binary value of O1 –O4 , randomly generate a three-bit value between 000 and 111 and update by replacing the original three-bits. 2. Take the least significant three digits of O1 –O4 to form a binary string, it is denoted by R. The secret data S and R are concatenated into a binary string, and the binary value corresponding to the string is converted into a 9-base number, and it is denoted by S  .

3.2 Concealment Phase While the processed secret data S  and the cover image O have been obtained, the secret data hiding process can be completed by follows: 1. Randomly generate an integer k (k ∈ [1, H × W/2 − 2]), and share it with the dealer and two participants.  2. Starting from the pixel pair (Oi , Oi+1 ), where i = (k × 2). Combining with the M matrix, concealing the secret data S’. Supposed the length of S’ is n. Updating   ) → ( O˜ i , O˜ i+1 ), then the new the pixel pair value of the image O , (Oi , Oi+1 pixel pair value will be obtained. The detail is as follow steps.   (1) If M(Oi , Oi+1 ) = S j , j ∈ (1, n), no change is required, (Oi , Oi+1 ) in cover  ˜   ˜ image O will be copied to ( Oi , Oi+1 ) in stego-image O .

An Optimized Scheme of Information Hiding-Based Visual …

549

  (2) Otherwise,M(Oi , Oi+1 ) = S j , j ∈ (1, n), set m = M(Oi , Oi+1 ) as the   center (Oi , Oi+1 ) and form a 3 × 3 search area. In the 3 × 3 square search  area, find the corresponding O˜ i and O˜ i+1 , whose intersection is SK in the M matrix. Here, a new pixel pair (( O˜ i , O˜ i+1 ) = M 1 (Sk ) of the stego-image  ) and is derived to carry the secret digit Sk . The subscripts of (Oi , Oi+1   ( O˜ i , O˜ i+1 ) are one-to-one correspondence. Thus, a pixel, pairs (Oi , Oi+1 )   ˜  ˜ of O conceals a base-9 digit Sk . By setting values of pixel pair( Oi , Oi+1 ) ˜ of stego-image O.

3. Each pixel pair is replaced, update the value of i and calculate as Eq. (6).  i=

i +2 i < (H × W − 2) (i + 6)mod (H × W ) i ≥ H × W − 2

(6)

4. Repeat step 2 until all the pixel pairs except the first four pixels are processed, and a new image O˜ is obtained.

3.3 Shadow Generation Phase After the image O˜ is obtained, we can combine with the image O  to complete the generation of the shadow image. The specific steps are as follows: 1. Randomly generate a binary string as described in the (2, 2)-threshold IH-VSS scheme, and denoted by Rnum. 2. The corresponding pixel values of the images O  and O˜ are processed according to the corresponding bit values of the binary string to generate Shadow1 and Shadow2. The solution is: (1) Where the corresponding bit of the binary string is ‘1’, the pixel pair value of the corresponding position in image O  and O˜ would be exchanged, respectively, as to be the corresponding pixel pair value of Shadow1 and Shadow2;  ) → (Shadow2i , Shadow2i+1 ), (Oi , Oi+1  ( O˜ i , O˜ i+1 ) → (Shadow1i , Shadow1i+1 )

(2) Where the corresponding bit of the binary string is ‘0’, the pixel pair value of the corresponding position in image O  and O˜ directly serves as the corresponding pixel pair value of Shadow1 and Shadow2.  ) → (Shadow1i , Shadow1i+1 ), (Oi , Oi+1  ˜ ˜ ( Oi , Oi+1 ) → (Shadow2i , Shadow2i+1 )

Do step 2 until all pixel pairs except the first four pixels have been processed.

550

Y. Zou et al.

3. Respectively, set the lowest significant bit of the last pixel value of Shadow1 to be 0, and the least significant position of the last pixel value of Shadow2 to be 1, then, share shadows with p1 and p2.

4 Experimental Results and Analysis 4.1 Security Analysis In the foregoing, it can be seen that the improved hidden scheme does not disclose any information of the secret data. Even if the attacker randomly selects pixels from the received shadows to perform a brute force attack to recover the cover prob

image, the M×N ) , , and 1 ≤ k ≤ ability of obtaining an accurate {0, 1} string is 1/ k×2(M×N 2 2 if the size of image is 512×512, the possibility of brute force attack is only . This probability value is a smaller value than the scheme IH-VSS(2, 1/ k×2(512×512) 2 2) proposed by Lin Li et al., and it is almost impossible to solve in real time. Therefore, the security of the optimization scheme proposed in this paper is guaranteed more.

4.2 Visual Quality (1) Calculate the PSNR value. In general, the PSNR is a performance parameter used to evaluate the visual quality of an image. Its definition is: PSNR = 10 × log

1 H ×W

H i=1

2552 W j=1

( pi j − p¯ i j )2

where pi j is the pixel value of the original image at position (i, j). p¯ i j is the pixel value of shadow image at position (i, j). a.

b.

Table 2 is the list of PNSR by hiding different bits of data and the generated PNSR value of cover image and shadows are listed. Shown in Table 2, the PNSR is even as high as 87.80 dB when EC is 415,485 bits. Here is the comparison of PNSR value under the same embedded size between different images. As shown in Table 3, it can be concluded that the optimized scheme makes the PSNR greater than 55 dB in most cases. Moreover, the EC reaches more than 400,000 bits, and the optimized scheme is more efficient than other schemes.

An Optimized Scheme of Information Hiding-Based Visual …

551

Table 2 PSNR among different size of secret data Secret (bit)

Cover image

Stego-image

Shadow1

Shadow2

51,935

88.85

57.87

58.35

58.50

103,871

84.43

58.35

56.12

56.12

207,742

87.20

55.41

55.41

55.40

415,485

87.80

55.41

55.41

55.40

Table 3 Comparison of PSNR among different schemes Cover image

Chang et al.’s scheme [8]

EMD-2 scheme

Optimized scheme

Shadow1

Shadow2

Shadow1

Shadow2

Shadow1

Shadow2

Lena

37.71

37.92

52.90

52.89

55.41

55.40

Baboo

36.46

37.92

52.91

52.89

55.42

55.41

Couple

37.52

37.92

52.92

52.89

55.41

55.41

Peppers

37.59

37.93

52.87

52.89

55.42

55.41

Fig. 1 Comparison of cover image and shadows

(2) As shown in Fig. 1, when EC is 415,485 bits, there is no difference between the original image and shadows. (3) The distribution of the pixel values of cover image and shadows. With our optimized scheme, there are pixel histograms of the cover image “lena” and its two shadows. Pixel value is selected ranging from 111 to 180. With lower embedding capacity, their histograms are nearly the same, but under higher embedding capacity, their histograms are also similar. Here is the histogram of cover image and shadows, where the pixel values are from 111 to 150. Figure 2 shows the details.

5 Conclusions This paper proposes an optimized scheme based on (2, 2)-threshold IH-VSS. In the shadow generation phase, Kim et al.’s M matrix and random numbers are used to

552

Y. Zou et al.

Fig. 2 Histogram of the cover image and shadows (pixel value: 111 –150)

hide the secret data and randomly locate the hidden position of the secret data, and finally generate two meaningful shadows and distribute them to the participants. The experimental results confirm that the method can be used to hide the secret data into two meaningful shadows, and the PNSR value of the shadow image is very close to the cover image under the same embedding capacity. Even more, the difference between the two shadows is very small, and their PNSR value higher than 55 dB. Therefore, the optimized scheme is more friendly and meaningful and can also achieve reversibility. It is very suitable for real-time applications. Acknowledgements This research is supported by the National Natural Science Foundation of China under Grant (No. 61572174), and Hunan Provincial Natural Science Foundation of China (Grant No. 2017JJ2010), Application-oriented Special Disciplines, Double First-Class University Project of Hunan Province (Xiangjiaotong [2018] 469) and Young Backbone Teacher of Hengyang Normal University.

References 1. Naor, M., Shamir, A.: Visual cryptography. In: De Santis, A. (ed.) Advances in CryptologyEUROCRYPT, vol. 950, pp. 1–12. Springer, Berlin (1994) 2. Liu, Y.X., Yang, C.N., Wu, C.M., et al.: Threshold changeable secret image sharing scheme based on interpolation polynomial. Multimed. Tools Appl. 78(13), 18653–18667 (2019) 3. Cheng, T.F., Chang, C.C., Liu, L.: Secret sharing: using meaningful image shadows based on gray code. Multimed. Tools Appl. 76, 9337–9362 (2017) 4. He, J.H., Lan, W.Q., Tang, S.H.: A secure image sharing scheme with high quality stego-images based on steganography. Multimed. Tools Appl. 76, 7677–7698 (2017)

An Optimized Scheme of Information Hiding-Based Visual …

553

5. Li, L., Lin, C.C., Chang, C.C.: Using two meaningful shadows to share secret messages with reversibility. Symmetry 11(1) (2019) 6. Kim, H.J., Kim, C., Choi, Y., Wang, S., Zhang, X.: Improved modification direction methods. Comput. Math Appl. 60, 319–325 (2010) 7. Zhang, X., Wang, S.: Efficient steganographic embedding by exploiting modification direction. IEEE Commun. Lett. 10, 781–783 (2006) 8. Chang, C.C., Liu, Y.J., Chen, K.M.: Real-time adaptive visual secret sharing with reversibility and high capacity. J. Real-Time Image Proc. 16(4), 871–881 (2018)

Constructions of Lightweight MDS Diffusion Layers from Hankel Matrices Qiuping Li, Lang Li, Jian Zhang, Junxia Zhao, and Kangman Li

Abstract Maximal distance separable (MDS) matrices are used as optimal diffusion layers in many block ciphers and hash functions. Recently, the designers paid more attention to the lightweight MDS matrices because it can reduce the hardware resource. In this paper, we give a new method to construct the lightweight MDS matrices. We provide some theoretical results and two kinds of 4 × 4 lightweight Hankel MDS matrices. We also prove that the 2s × 2s involution Hankel MDS matrix does not exist in finite field. Furthermore, we searched the 4 × 4 Hankel MDS matrices over GL(4, F2 ) and GL(8, F2 ) that have the better s-XOR counts until now. Keywords Diffusion layer · Lightweight MDS matrix · Hankel matrix

1 Introduction In the design of block cryptographic primitives, the diffusion layer is an important component and it was described by Shannon [1]. The diffusion layer refers to dissipate the statistical structure of plaintext over most of ciphertext. The branch number is a criterion to measure the ability of a diffusion layer that resists to the differential and linear attack. The larger the branch number, the better resistance to differential and linear attack. A diffusion layer with the maximum branch number is called an optimal diffusion layer or MDS diffusion layer. The main method to obtain MDS diffusion layer is using some special structures to construct. The advantage of construction is making the arbitrary order MDS diffusion layer can be obtained. In [2], the authors use the Cauchy matrices to construct the Q. Li · L. Li · J. Zhang · J. Zhao · K. Li Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] L. Li (B) Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_54

555

556

Q. Li et al.

MDS diffusion layer and involution MDS diffusion layer. The involution matrix is the matrix that the inverse is equal to itself. The involution MDS diffusion layer allows encryption and decryption to be done using the same set of devices. So, many designers devote to construct the involution MDS matrices. In [3], the authors construct MDS diffusion layer and involution MDS matrices using Vandermonde matrices. According to the determinant of the Vandermonde matrices, the authors use two Vandermonde matrices to construct the arbitrary order MDS diffusion layer. In [2], the authors proposed a Cauchy-like matrix to construct the MDS matrices and also give the relation of two Vandermonde matrices and the Cauchy-like matrix. Since the generation matrix of MDS code is the MDS diffusion layer, some designers construct MDS diffusion layer by some linear codes. Another common way to obtain MDS diffusion layer is searching from some special matrices. An obvious advantage of searching MDS diffusion layer from some special matrices can obtain lightest MDS matrices for the given matrix type. The metric of lightweight is XOR count that is introduced in [4]. This kind of XOR count is the most frequently used method. In [5], the authors optimize the XOR count by reusing the intermediate results. Special matrices are often used to search MDS matrices include circulant matrix [6], Hadamard matrix [6], Toeplitz matrix [7]. These matrices only need fewer elements that can be defined. Hence, they can save the storage space by using the serialized manner. A classic example is that the diffusion layer of AES is a 4 × 4 MDS matrix over F82 . The paper is build up as follows. In Sect. 2, we outline some metrics of XOR counts and some properties of MDS matrix. We also introduce some special matrices, which are used to construct the MDS. In Sect. 3, we give some properties to construct the Hankel MDS matrix. We also discussed the conditions of the lightweight involution Hankel MDS matrix. In Sect. 4, we conclude this paper.

2 Preliminaries In this section, there are two major ingredients. Firstly, we give some definitions of XOR counts. Secondly, we review the definition of MDS matrices and some properties of them. F2 is the binary finite field. In this paper, the matrices considered are all square matrices over GL(m, F2 ), where GL(m, F2 ) is the set of all m × m non-singular matrices over F2 .

2.1 XOR Counts of Matrices over F2 In 2014, the authors of [4] proposed using XOR count to quantify the implementation cost of cryptographic primitives. The XOR count of a matrix over F2 is the number of XOR operations of the matrix-vector multiplication, which is called d-XOR count by [8]. For α1 , α2 ∈ F2 , α1 ⊕ α2 is called one-bit XOR operation. For M ∈ GL(m,

Constructions of Lightweight MDS Diffusion Layers …

557

F2 ), the d-XOR count #M denotes the number of XOR operations that required to implement Mv, where v ∈ Fm 2. Afterward, [5] proposed the idea of reusing intermediate results to decrease the XOR count, resulting a new metric called s-XOR count. In this paper, we use the metric s-XOR count to calculate the implementation cost of a matrix. Definition 1 (see [5]) An invertible matrix M has an s-XOR count of t over F2 , denoted by XOR(M) = t, if t is the minimal number such that M can be written as M=P

t 

(I + E ik , jk )

k=1

with i k = jk for all k, where E ik , jk is the matrix with a unique nonzero element 1 at the (i k , jk )-th entry, k ∈ {1, …, t}. As an example, consider ⎛

1 ⎜0 Mv = ⎜ ⎝1 0

0 0 1 0

1 1 1 0

⎞ ⎞⎛ ⎞ ⎛ a1 ⊕ a3 0 a1 ⎟ ⎜ ⎟ ⎜ a3 0⎟ ⎟. ⎟⎜ a 2 ⎟ = ⎜ 0 ⎠⎝ a 3 ⎠ ⎝ a 1 ⊕ a 2 ⊕ a 3 ⎠ a4

1

a4

From the matrix-vector multiplication, we know the d-XOR count of this matrix is 3. However, we can reuse the intermediate result a1 ⊕ a3 , so we get its s-XOR count is 2. So, we use the s-XOR count to quantify the implementation cost of a matrix. For simplicity, we extract the nonzero positions in each row of a matrix to represent the matrix over GL(m, F2 ). For example, the above matrix M can be represented by [[1, 3], 3, [1, 2, 3], 4].

2.2 MDS Matrices and Their Properties Given a vector v = (v0 , v1 , . . . , vn−1 )T ∈ (F2m )n where each component viT ∈ Fm 2 (0 ≤ i ≤ n − 1) is also a vector, its bundle weight wb (v) is defined as the number of nonzero components. The branch number of an n × n diffusion matrix M is defined as follows. Definition 2 (see [2]) Let M be an n × n matrix over GL(m, F2 ). The differential branch number of M is defined as Bd (M) = min{wb (v) + wb (Mv)} v=0

and the linear branch number of M is defined as

558

Q. Li et al.



B (M) = min wb (v) + wb M T v v=0

From the singleton bound, we can know the upper bound of Bd and Bl of any matrix is n + 1. Thus, we have: Definition 3 (see [2]) An n × n matrix M over GL(m, F2 ) is called an MDS matrix if Bd (M) = Bl (M) = n + 1. From the definition, we can see an MDS matrix has the maximal branch number, so the diffusion layer designed from it is also called an optimal diffusion layer. The following theorem gives a sufficiency and necessary condition which estimates that a matrix is an MDS matrix. It is a commonly used method. Theorem 1 (see [6]) An n×n matrix M over GL(m, F 2 ) is MDS if and only if all square block sub-matrices of M are non-singular. For a matrix over GL(m, F2 ), a k × k sub-matrix is actually km × km matrix over F2 , and we should compute determinant of this matrix. However, we can compute the determinants of sub-matrices in a simpler manner thanks to the following lemma. Lemma 1 (see [2]) Let F be a field and M = (M i,j ) be an n×n matrix, where M i,j ∈ GL(m, F 2 ) are pairwise commutative, 0 ≤ i, j ≤ n − 1. Then ⎛ det(M) = det⎝

⎞ (−1)τ ( j0 ... jn−1 ) M0, j0 . . . Mn−1, jn−1 ⎠,

j0 ... jn−1

where τ ( j0 . . . jn−1 ) denotes the number of inverse-ordered pairs in the permutation j0 . . . jn−1 .

3 Lightweight Hankel MDS Matrices In this paper, we will search lightweight 4 × 4 MDS matrices from Hankel matrices. Definition 4 A matrix is called Hankel if every ascending skew diagonal from left to right is constant. The following matrix is an example of n × n Hankel matrix. ⎛

⎞ K 0 K 1 · · · K n−1 ⎜ K1 K2 · · · Kn ⎟ ⎜ ⎟ K =⎜ . .. . . . ⎟ ⎝ .. . .. ⎠ . K n−1 K n · · · K 2n−2

(1)

Constructions of Lightweight MDS Diffusion Layers …

559

Obviously, left circulant matrix is a special form of Hankel matrix. A Hankel matrix is defined by its first row and last column. For instance, {K 0 , K 1 , . . . , K n−1 , K n , K n+1 , . . . , K 2n−2 } defined the Hankel matrix K in (1). This matrix can also be defined as follows:   K = K i, j where K i, j = K i+ j . In this section, we will use Theorem 1 to check whether the Hankel matrix is MDS. According to these proposed results, we will give some examples of lightweight Hankel MDS matrices. We now give some theoretical constructions of Hankel MDS matrices. As we know, the XOR count of identity matrix is zero. So, we keep the identity matrix occurring as more as possible and expect the low XOR count to be searched in MDS matrices. As follows, we consider the special 4 × 4 Hankel matrices that have nine identity matrixes and give the conditions for them to become MDS matrices. Proposition 1 Let K 1 (X, Y, Z) be the following 4 × 4 Hankel matrix defined over GL(m, F 2 ): ⎛

X ⎜Y K 1 (X, Y, Z ) = ⎜ ⎝I I

Y I I Z

I I Z I

⎞ I Z⎟ ⎟ I ⎠ X

(2)

where X, Y, Z ∈ GL(m, F2 ) and I is the identity matrix. Then K 1 (X, Y, Z) is MDS if and only if the following matrices are all non-singular. X + I, Y + I, Z + I, Y + X, Z + X,

Z + Y, X 2 + I, Z 2 + I, Y 2 + X, Z 2 + X,

X Z + Y, Y X + Z, X Z + I, Z X + I, Y Z + I,

Y Z + Y X + Z 2 + X + Z + I, X2 + Y 2 X + X Z2 + I Y 2 Z + X Z + X + I, Z 3 + Z X + X + I, X Z X + Z,

X Z 2 + Y Z + Y + X + Z + I, X Z + Y X + X 2 + Y + Z + I, Y Z + XZ + Y2 + X + Y + I Y Z X + Z 2 + X + Y + Z + I, X 2 + Y 2 + Z 2 + X 2 Z + Y 2 Z X + X Z 3 + Z + I.

Proof From Theorem 1, we will show that all the square sub-matrices are nonsingular with this choice of X and Y. The distinct determinants of 2 × 2 sub-matrices are



det(X + I ), det(Z + Y ), det X 2 + I , det Z 2 + X , det(Y Z + I ), det(Y + I ), det(Y + X ), det Z 2 + I , det(X Z + Y ), det(X Z + I ), det(Z + I ), det(Z + X ), det Y 2 + X , det(Y X + Z ), det(Z X + I ), The distinct determinants of 3 × 3 sub-matrices are     det(X Z X + Z ), det X 2 + Y 2 X + X Z 2 + I , det X Z + Y X + X 2 + Y + Z + I ,       det Z 3 + Z X + X + I , det Y Z + Y X + Z 2 + X + Z + I , det Y Z + X Z + Y 2 + X + Y + I ,       det Y 2 Z + X Z + X + I , det X Z 2 + Y Z + Y + X + Z + I , det Y Z X + Z 2 + X + Y + Z + I .

560

Q. Li et al.

The determinants of K 1 (X, Y Z) are det(X 2 + Y 2 + Z 2 + X 2 Z + Y 2 ZX + XZ 3 + Z + I). So K 1 (X, Y, Z) is MDS if and only if the above matrices are all non-singular. From Proposition 1, we have the following 4×4 lightweight MDS matrices over GL(4, F2 ) and GL(8, F2 ). Example 1 Consider the matrix K 1 (A, B, C) over GL(4, F2 ) as given in Proposition 1, where A = [2, 3, 4, [1, 4]], B = [[3, 4], 1, 2, 3], C = [3, 4, [1, 4], [1, 2, 4]]. According to Proposition 1, this is an MDS matrix. The XOR counts of I, A, B, C are 0, 1, 1, 2, respectively, and there are 2A’s, 2B’s, and 3C’s. Therefore, the XOR count of K 1 (A, B, C) is 2 + 2 + 3 · 2 + 4 · 3 · 4 = 10 + 4 · 3 · 4. The following corollary will give lightest 4 × 4 MDS matrix over GL(8, F2 ). Corollary 1. If A is the companion matrix of the polynomial x 8 + x 3 + 1 or x 8 + x 5 + 1, then the matrix K 1 (A, A−1 , A2 ) as given in Proposition 1 is MDS and has XOR count 10 + 4 · 3 · 8. Proof From Proposition 1, we know the K 1 (A, A−1 , A2 ) matrix is MDS. Since A is the companion matrix of the polynomial x 8 + x 5 + 1 or x 8 + x 3 + 1, XOR(A) = XOR(A−1 ) = 1, XOR(A2 ) = 2. So, the local XOR count of K 1 (A, A−1 , A2 ) is 2 + 2 + 3 · 2 + 4 · 3 · 8 = 10 + 4 · 3 · 8. This is equal to the known best XOR count 10 + 4 · 3 · 8 in [6]. Furthermore, the following proposition only uses two different elements to construct the Hankel MDS matrices. Proposition 2 Let K 2 (X, Y ) be the following 4 × 4 Hankel matrix defined over GL(m, F2 ): ⎛

Y ⎜I K 2 (X, Y ) = ⎜ ⎝X I

I X I I

X I I Y

⎞ I I ⎟ ⎟ Y⎠ X

(3)

where X, Y in GL(m, F2 ) and I is the identity matrix. Then K 2 (X, Y ) is MDS if and only if the following matrices are all non-singular. X + I, Y + I, X 2 + Y, Y 2 + X,

X + Y, X Y + I, Y X + I, X 2 + I,

X Y 2 + X 2 + X + I, Y X Y + X 2 + X + I, X 3 + Y X + Y + I, X 3 + X Y + Y + I,

X 3 + Y 3 + Y X + I, X 2 + Y 2 + Y X + X + Y + I, X 2 + Y 2 + X Y + X + Y + I, X 4 + Y X Y 2 + X 2 Y + X 2 + Y 2 + Y X + Y + I.

From Proposition 2, we have the following 4 × 4 lightweight MDS matrices over GL(4, F2 ) and GL(8, F2 ). Example 2 Consider the matrix K 2 (A, B) over GL(4, F2 ) as given in Proposition 2, where A = [[3, 4], 1, 2, 3], B = [3, 4, [1, 4], [1, 2, 4]]. According to Proposition 2,

Constructions of Lightweight MDS Diffusion Layers …

561

this is an MDS matrix. The XOR counts of I, A, B are 0, 1, 2, respectively, and there are 4A’s and 3B’s. Therefore, the XOR count of K 2 (A, B) is 4 + 3 · 2 + 4 · 3 · 4 = 10 + 4 · 3 · 4. This is equal to the lightest 4 × 4 MDS matrices by exhaustive searching in [6]. Example 3 Consider the matrix K 2 (A, B) over GL(8, F2 ) as given in Proposition 2, where A = [2, 3, 4, 5, 6, 7, 8, [1, 2]], B = [[5, 6], 6, 7, 2, 8, 1, [3, 7], 4]. According to Proposition 2, this is an MDS matrix. The XOR counts of I, A, B are 0, 1, 2, respectively, and there are 4A’s and 3B’s. Therefore, the XOR count of K 2 (A, B) is 4 + 3 · 2 + 4 · 3 · 8 = 10 + 4 · 3 · 8. This is equal to the known best XOR count 10 + 4 · 3 · 8 in [6]. It is noticed that the number of identity matrix in Proposition 1 and Proposition 2 is the maximum possible occurrences of identity matrix in 4 × 4 MDS matrix as proposed by [9]. Next, we summarize our propositions and compare with the previous constructions of MDS matrices (Table 1). In the following, we will give some results about involution Hankel MDS matrix. In the section, on special matrix, we know the Hankel matrix K = [K i,j ] = [K i+j ], and then, we have K = K T . Then, we will prove the Hankel MDS matrix is neither involution matrix nor orthogonal matrix in finite field. Proposition 3 Let K be an n × n Hankel matrix defined over F m2 . Then K cannot be both MDS and orthogonal when n = 2s . Proof Let K be an 2s × 2s Hankel matrix that is both MDS and orthogonal in finite field. Let K  = K K T and γ i be the diagonal element of K  for i = 0, 1, …, n−1. We have γi =

n−1

2 K i+ j = 1, for i = 0, 1, . . . , n − 1.

j=0

Since γi = γi+1 , we have K i = K i+n , for i = 0, 1, …, n − 1. Table 1 Comparisons with previous constructions of 4 × 4 MDS matrices Matrix type

Elements

XOR count

References

Hankel

GL(4, F2 )

10 + 4 · 3 · 4 = 58

Proposition 2

Toeplitz

F42

10 + 4 · 3 · 4 = 58

Sarkar and Syed [7]

Circulant

GL(4, F2 )

12 + 4 · 3 · 4 = 60

Li and Wang [6]

Serial

F42

16 + 4 · 3 · 4 = 64

LED [10]

Hankel

GL(8, F2 )

10 + 4 · 3 · 8 = 106

Proposition 2

Toeplitz

F82

27 + 4 · 3 · 8 = 123

Sarkar and Syed [7]

Optimal

GL(8, F2 )

10 + 4 · 3 · 8 = 106

Li and Wang [6]

Circulant

F82

56 + 4 · 3 · 8 = 152

AES [11]

562

Q. Li et al.

Then the Hankel matrix is the left circulant matrix. By [liu2016lightweight], we know the 2s × 2s left circulant matrices cannot be both orthogonal and MDS in finite field. So, the 2s × 2s Hankel matrix cannot be both MDS and orthogonal in finite field. Since the Hankel matrix K = K T , we have the 2s × 2s Hankel matrix also cannot be both MDS and involution in finite field.

4 Conclusion The MDS matrix is often used as optimal diffusion layer in block cipher and hash function. With the lightweight cryptography being a major trend in symmetric cryptography, the lightweight MDS matrices received more and more attention. In this paper, we give a new method to search the lightweight MDS matrices. We provided two theoretical results of 4 × 4 lightweight Hankel MDS matrices. Moreover, we find the 4 × 4 Hankel MDS over GL(4, F2 ) and GL(8, F2 ) that have the best s-XOR counts so far. We also prove that the 2s × 2s involution Hankel MDS matrices and orthogonal Hankel MDS matrices do not exist in finite field. On the implementation, we searched the 4 × 4 Hankel MDS matrices over GL(4, F2 ) and GL(8, F2 ) that have the better s-XOR counts. Acknowledgements This research is supported by the National Natural Science Foundation of China under Grant No. 61572174, Science Foundation Project of Hengyang Normal University No. 18D23, Hunan Province Special Funds of Central Government for Guiding Local Science and Technology Development No. 2018CT5001, Hunan Provincial Natural Science Foundation of China with Grant No. 2019JJ60004, the Science and Technology Plan Project of Hunan Province No. 2016TP1020, Subject group construction project of Hengyang Normal University No. 18XKQ02, Scientific Research Fund of Hunan Provincial Education Department No. 18C0678.

References 1. Shannon, C.E.: Communication theory of secrecy systems. Bell Syst. Tech. J. 28(4), 656–715 (1949) 2. Li, Q., Wu, B., Liu, Z.: Direct constructions of (involutory) MDS matrices from block vandermonde and cauchy-like matrices. In: Budaghyan, L., Rodríguez-Henríquez, F. (eds.) Arithmetic of Finite Fields. WAIFI 2018. LNCS, vol. 11321, pp. 275–290. Springer, Cham (2018) 3. Sajadieh, M., Dakhilalian, M., et al.: On Construction of involutory MDS Matrices from q Vandermonde Matrices in F2 . Des. Codes Cryptograph. 2012(64), 287–308 (2012) 4. Khoo, K., Peyrin, T., et al.: FOAM: searching for hardware-optimal SPN structures and components with a fair comparison. In: Batina, L., Robshaw, M. (eds.) Cryptographic Hardware and Embedded Systems 2014. LNCS, vol. 8731, pp. 433–450. Springer, Heidelberg (2014) 5. Beierle, C., Kranz, T., Leander, G.: Lightweight multiplication in Fn2 with applications to MDS matrices. In Robshaw, M., Katz, J. (eds.) CRYPTO 2016. LNCS, vol. 9814, pp. 625–653. Springer, Heidelberg (2016)

Constructions of Lightweight MDS Diffusion Layers …

563

6. Li, Y., Wang, M.: On the construction of lightweight circulant involutory MDS matrices. In: Peyrin, T. (ed.) Fast Software Encryption 2016. LNCS, vol. 9783, pp. 121–139. Springer, Heidelberg (2016) 7. Sarkar, S., Syed, H.: Lightweight diffusion layer: importance of toeplitz matrices. IACR Trans. Symmetric Cryptol. 2016(1), 95–113 (2016) 8. Jean, J., Peyrin, T., et al.: Optimizing implementations of lightweight building blocks. IACR Trans. Symmetric Cryptol. 2017(4), 130–168 (2017) 9. Junod, P., Vaudenay, S.: Perfect diffusion primitives for block ciphers. In: International Workshop on Selected Areas in Cryptography, pp. 84–99. Springer, Berlin (2004) 10. Guo, J., Peyrin, T., et al.: The LED block cipher. In: International Workshop on Cryptographic Hardware and Embedded Systems, pp. 326–341. Springer, Heidelberg (2011) 11. Daemen, J., Rijmen, V.: The design of Rijndael: AES-the advanced encryption standard. Springer Science Business Media, Berlin (2013)

Power Analysis Attack on a Lightweight Block Cipher GIFT Jian Zhang, Lang Li, Qiuping Li, Junxia Zhao, and Xiaoman Liang

Abstract GIFT is a new lightweight block cipher with smaller area and higher efficiency, which is very suitable for the Internet of Things (IoT) devices with constrained resources. The power analysis attack is an efficient method to extract the key from the cryptographic equipment. However, it is not easy to reveal the key by means of power analysis attack, when the cipher is implemented by hardware. In this article, we present the method of power analysis attack against GIFT. Firstly, we implemented GIFT on FPGA using the SAKURA-G board. Then, we explored the impact of point of interest (POI) on power analysis attack. We proposed the method of power analysis attack against the diffusion layer of GIFT. The experimental results show that the result of power analysis attack is affected by POI, and the key can be recovered when POI is registered. We can reveal the key using correlation power analysis, when targeting the diffusion layer of GIFT. Keywords Power analysis attack · Lightweight block cipher · GIFT · SAKURA-G

1 Introduction In recent years, with the development of new generation IoT technologies such as NB-IoT and LoRa, embedded devices are widely used in smart water meters, smart street lamps, consumer electronics, and agriculture. These devices have constrained resources and are mostly battery powered, and it is not suitable for running traditional cryptographic algorithms like AES. Therefore, many scholars have designed lightweight block cipher algorithms to ensure the data security of these resourceconstrained devices. GIFT is a new lightweight block cipher proposed by Banik J. Zhang (B) · L. Li · Q. Li · J. Zhao · X. Liang College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] L. Li Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_55

565

566

J. Zhang et al.

et al. [1]. GIFT has an excellent performance in power consumption and hardware resources. In addition, GIFT is highly resistant to differential and linear attacks [2], which is particularly suitable for the IoT devices. GIFT is mathematical secure. However, power analysis attack can recover the secret key using power consumption during encryption processing. Various power analysis attacks have been proposed in the past decades, which mainly include simple power analysis (SPA) attack, differential power analysis (DPA) attack, and correlation power analysis (CPA) [3] attack. In some literature, research on power analysis attacks is based on simulation [4] or software [5, 6]. The characteristic of power consumption is quite different [7], when the cipher is implemented by hardware. Many factors influenced the result of our experiment, when we performed power analysis attack on the cipher. Point of interest (POI) is an important factor that affects the success of our experiment. In this paper, we focus on the power analysis attack of GIFT. GIFT is written in Verilog HDL and downloaded to an FPGA in the SAKURA-G board. The power consumption of the cipher is measured during encryption processing. We used different POIs in our experiment to explore the impact of POI on power analysis attacks. Besides, we explored the method of power analysis attack on the diffusion layer of GIFT.

2 Preliminaries 2.1 GIFT GIFT is a lightweight block cipher using SPN structure. Its key length is 128 bits, and its block length can be 64 or 128 bits. So there are two versions of GIFT: GIFT-64 with 64-bit block and GIFT-128 with 128-bit block. In our work, we use the version of GIFT-64. In this paper, we abbreviate the GIFT-64 as GIFT. The encryption process of GIFT is shown in Fig. 1. GIFT contains 28 iterative rounds, and each round includes three operations: Substitution (S-box), Permutation (P-layer), and AddRoundKey. The GIFT algorithm uses a 4-bit S-box with 4-bit input and 4-bit output in subcells. The permutation layer changes the bit position of the cipher state according to the permutation table. The AddRoundKey contains adding the round key and round constant; the LSB 32 bits of round key and the 7 bits round constant are XORed with part of the cipher state.

Power Analysis Attack on a Lightweight Block Cipher GIFT

567

Fig. 1 Encryption process of GIFT

2.2 Power Analysis Attacks As CPA attack has the advantages of low cost and high success rate, it has been widely used in power analysis attack. In our work, we used CPA attack to reveal the key of GIFT. The steps of a CPA attack are as follows [8]: (1) Identify POI of the cipher; (2) Measure power consumption during encryption processing; (3) Guess the key and calculate hypothetical intermediate values using the input plaintext; (4) Convert hypothetical intermediate value to hypothetical power consumption; (5) Calculate the correlation coefficient between hypothetical and real power consumption.

568

J. Zhang et al.

2.3 Power Analysis Model There are two methods to convert intermediate value to hypothetical power consumption: hamming distance model and hamming weight model [9]. Hamming distance model describes power consumption of the register. In CMOS-integrated circuit, dynamic power consumption is much larger than static power consumption. When the register stores a high or low level, there is almost no power to be consumed. If the value of the register changes from R to R  , the power consumed can be expressed as: W = aHD(R ⊕ R  ) + b

(1)

where HD(R ⊕ R  ) is the hamming distance between the two values of the register, and a and b are constants related to the actual circuit. Hamming weight model is a simplification of hamming distance model, which assumes that the power consumption is only related to the high level of the register. Hamming weight model has a good performance in some microcontrollers with pre-charge bus [6, 9].

3 Experimental Environment Our power analysis attack platform is shown in Fig. 2, which consists of three parts: the SAKURA-G board, PicoScope oscilloscope, and computer. The SAKURA-G board has two spartan-6 FPGAs which serve as the controller and main security circuits. The main FPGA runs the GIFT encryption algorithm written in Verilog HDL. The controller FPGA communicates with the computer through USB, receives plaintext and key sent by the block cipher algorithm control software on computer, and controls the encryption process of the main FPGA. The Fig. 2 Power analysis attack platform

Power Analysis Attack on a Lightweight Block Cipher GIFT

569

Fig. 3 Power trace of GIFT

power consumption was measured at 500 MHz frequency using the PicoScope oscilloscope. MATLAB is used to analyze the correlation between hypothetical power consumption and real power consumption. Figure 3 depicts the power trace of GIFT, the red power trace above is the original power trace, and the black power trace below is the noise-reduced power trace. The original power trace contains a lot of noise; it will bring difficulty to power analysis attack. The noise is generated by circuits such as power supplies and clocks, and obeys normal distribution N (0, σ 2 ) [10]. We use two methods to reduce the noise. On the one hand, we connected the low-pass filter to the input channel of the oscilloscope. On the other hand, we calculated the average value of the power consumption.

4 Proposed Method 4.1 Point of Interest (POI) Figure 4 shows the rolled-based implementation of GIFT. In this architecture, the register is used to store the value of the AddRoundKey output. The register is initialized by plaintext in the first round and updated in each round. It is not easy to recover the key by means of power analysis attack. Actually, many factors will affect the result of the experiment. POI is an important factor that affects the success of the experiment. There are many points in GIFT that can be selected as POI, such as the output of S-box, bit permutation, and AddRoundKey. In our experiment, we used two different POIs to explore the impact of POI on power analysis attack: AddRoundKey and S-box output. As the key and plaintext are known, we can calculate hypothetical power consumption of GIFT. Then, we can get the correlation coefficient between hypothetical power consumption and real power consumption.

570

J. Zhang et al. y2

RC1

RC1

POI

p2

y1

p16

y16

RC1

Register

Register

Register

S-box

S-box

S-box

P-layer

P-layer

P-layer (ki31,ki15)

(ki17,ki1)

(ki16,ki0) y1

x28 rounds

p1

y2

y16

Fig. 4 Rolled-based implementation of GIFT

Firstly, we performed power analysis attack on AddRoundKey, where POI is registered. The experiment result is shown in Fig. 5. We can see that there is a significant peak near the 1000th point of the power trace, indicating that we can recover the key of GIFT using power consumption of these points. Then, we performed power analysis attack on S-box output, where POI is not registered. The experiment result is shown in Fig. 6. The correlation coefficient of all points is approximately 0, which indicates that hypothetical power consumption has no relationship with real power consumption. Therefore, the key of GIFT cannot be recovered by power analysis attack.

Fig. 5 Power analysis attack on AddRoundKey

Power Analysis Attack on a Lightweight Block Cipher GIFT

571

Fig. 6 Power analysis attack on S-box output

4.2 Power Analysis Attack on the Diffusion Layer of GIFT In practical applications, in order to improve the ability to resist power analysis attacks, the register is usually set in the diffusion layer. In this case, the value stored by the register is related to multiple keys and it is impossible to reveal the key in segments by divide-and-conquer method. Figure 7 shows power analysis attack on the diffusion layer of GIFT. In this architecture, the register is used to store the output of the diffusion layer. It seems

POI

p2

y1

y2

RC1

p16

y16

RC1

S-box

S-box

S-box

P-layer

P-layer

P-layer

Register

Register

Register

(ki16,ki0)

(ki31,ki15)

(ki17,ki1) y1

y2

Fig. 7 Power analysis attack on the diffusion layer

y16

x28 rounds

p1 RC1

572

J. Zhang et al.

Fig. 8 Correlation coefficient of different number of traces

impossible to reveal the key using power analysis attack. However, the diffusion layer of GIFT only permutes the bits of S-box output. Therefore, we can attack the S-box output of GIFT and recover the key. In this experiment, we set the key to 0xfedcba9876543210fedcba9876543210 and encrypted random plaintext. Figure 8 depicts the impact of the number of power traces on power analysis attack, and the minimum number of power traces to reveal the key is about 1000. We used 1000 power traces to reveal the key in our experiment. Guessing LSB 8 bits of the key (k19k18k17k16k3k2k1k0) and calculating hypothetical intermediate values of GIFT. According to Hamming distance model, the lowest 16 bits of the plaintext are XORed with the lowest 16 bits of the S-box output at the first round, and the result is hypothetical power consumption. Then, we calculated the correlation coefficient between hypothetical power consumption and real power consumption. Figure 9 shows the result of power analysis attack. In the figure, the abscissa is the guess key, and the ordinate is the correlation coefficient. The correlation coefficient is the largest when the guess key is 64. Therefore, we believe that the correct key is 64, which is consistent with the real key we use, meaning that we successfully recovered the key of GIFT. Using the same method, we can reveal the remaining keys.

Power Analysis Attack on a Lightweight Block Cipher GIFT

573

Fig. 9 Power analysis results

5 Conclusion In this paper, we have proposed the method of power analysis attack on GIFT implemented by hardware. Our research includes the impact of POI on power analysis attack and the method to reveal the key targeting the diffusion layer of GIFT. Although there are many intermediate values associated with the key in the cipher, POI should be registered; otherwise, we will not be able to reveal the key. The diffusion layer of GIFT is bit permutation; hence, it did not bring more difficulties to our experiments, and the key can be recovered using correlation power analysis. The experimental results show that the GIFT cryptographic algorithm without protection cannot resist power analysis attack. In the future, we will study the countermeasures of GIFT with low power consumption and small area. Acknowledgements This research is supported by the Science Foundation Project of Hengyang Normal University (18A14), National Natural Science Foundation of China under Grant No. 61572174, Application-oriented Special Disciplines. The Double First-Class University Project of Hunan Province is supported by Hunan Province Office of Education (Xiangjiaotong [2018] 469), Hunan Province Special Funds of Central Government for Guiding Local Science and Technology Development No. 2018CT5001, Hunan Provincial Natural Science Foundation of China with Grant No. 2019JJ60004, the Science and Technology Plan Project of Hunan Province No. 2016TP1020, Subject group construction project of Hengyang Normal University No. 18XKQ02.

574

J. Zhang et al.

References 1. Banik, S., Pandey, S.K., Peyrin, T., Sasaki, Y., Sim, S.M., Todo, Y.: GIFT: a small present towards reaching the limit of lightweight encryption. In: Fischer, W., Homma, N. (eds.) CHES 2017, LNCS 10529, pp. 321–345. Springer, Cham (2017) 2. Zhao, J.Y., Xu, S.Y., Zhang, Z.J., Dong, X.Y., Li, Z.: Differential analysis of lightweight block cipher GIFT. J. Cryptol. Res. 5(4), 335–343 (2018) 3. Cai, C., Chen, Y., Wan, W.N., Chen, J., Hu, X.X.: Correlation power analysis for AES based-on principal component analysis. Appl. Electr. Tech. 41(8), 101–105 (2015) 4. Hu, W.J., Wang, A., Wu, L.J., Xie, X.J.: Power attack of SM4 hardware implementation based on SAKURA-G board. Microelectr. Comput. 32(4), 15–20 (2015) 5. Li, L., Li, R.F., Li, K.L., Wang, Y., Jiao, G., Zou, Y.: Differential power analysis attacks on PRESENT. Appl. Res. Comput. 31(3), 843–845 (2014) 6. Zhang, X.Y., Chen, K.Y., Zhang, Y., Gui, W.L.: Improved correlation power analysis based on difference variability. Appl. Res. Comput. 34(9), 2791–2794 (2017) 7. Zhang, S.W., Yang, X.Y., Zhong, W.D., Wei, Y.C.: Combinational side-channel attack on S-box in block cipher. Appl. Res. Comput. 33(2), 498–501 (2016) 8. Wang, Z.Y., Zhang, P., Chen, C.S., Hu, H.G.: Pre-processing of power traces in power analysis. Commun. Technol. 50(4), 765–770 (2017) 9. Luo, P., Feng, D.G., Zhou, Y.B.: Power model in power analysis attack. J. Commun. 33(S1), 276–281 (2012) 10. Zhang, Y., Chen, K.Y., Li, X.W., Chen, J.G., Li, Y.: Side channel attack of cipher chips based on difference variability. J. Commun. 36(3), 104–109 (2015)

Research and Development of Fine Management System for Underground Trackless Vehicles Xu Liu, Guan Zhou Liu, Feng Jin, Xiao Lv, Yuan-Sheng Zhang, and Zhong-Ye Jiang

Abstract This paper researches and designs a fine management system for underground trackless vehicles. The system mainly consists of vehicle base station, location tag, wireless communication base station, and fine management platform software. And it designs algorithms and identification logic of vehicle operation process. We tested the system in a mine, and the results show that it can realize the function of location recognition of underground vehicles, trajectory recording and analysis, screening abnormal phenomena (unloading disorder) and alarm. Keywords Fine management system · Underground · Vehicles

1 Introduction Trackless conveying is one of the most important conveying ore modes in metallic and non-metallic mines in China. In the process of ore drawing, the scraper transports ore and waste rock to the transverse and then loads ore and waste to truck. Last, the truck unloads from trucks to corresponding ore chutes and waste rock chutes. In some cases, the scraper directly transports ore or waste rock to the chute for unloading. In the current mining and transportation process, some trackless vehicles reduce workload that exists in the cases of random unloading. These cases seriously affect the normal production order and production income. So, there is an urgent need to introduce fine management system for underground trackless vehicles to effectively monitor and eliminate “unloading disorder” which can improve the effect of mine production monitoring and management.

X. Liu (B) · G. Z. Liu · F. Jin · X. Lv · Y.-S. Zhang BGRIMM Technology Group, 102628 Beijing, China e-mail: [email protected] Beijing Key Laboratory of Nonferrous Intelligent Mining Technology, 102628 Beijing, China Z.-Y. Jiang Northeastern University, Shenyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_56

575

576

X. Liu et al.

The fine management system for underground trackless vehicles can realize the function of location recognition of underground vehicles, trajectory recording and analysis, screening abnormal phenomena (unloading disorder) and alarm.

2 The Design of the System 2.1 System Composition In order to reduce the laying of underground communication and power supply cables, the scheme adopts distributed architecture; the system mainly consists of vehicle base station, location tag, wireless communication base station, and fine management platform software, as shown in Fig. 1. In this framework, the location tag is installed in the key working areas of mines operation areas of mining houses and chutes and the vehicle base station is installed in the vehicle cockpit; the wireless base station is installed at the end of the key access channel that the vehicle accesses; the data acquisition center and data warehouse and fine management platform are deployed in the dispatching center. When the system runs, the vehicle base station identifies the location tag fixed that installed in the mining room, waste rock chute, ore chute, etc. The wireless Fine Management Platform

Database Server

Data Acquisition Center

Industrial Industrial Ethernet Ethernet Ring Ring Network Network Surface

Underground

Mine truck Vehicle Terminal

Scraper Location Tag

Wireless Base station

Waste rock chute

Fig. 1 System composition of the fine management system

Mine room

Ore pass

Research and Development of Fine Management System for …

577

base station identifies the location tag and records the identified identification information in sequence; when arriving at the designated data transmission location, the vehicle base station automatically uploads all identification information to the fine management platform software through wireless communication and the original underground industrial ring network. Through the analysis and processing of these data, the fine management visually and clearly presents the vehicle operation and working status to the staff and record to the abnormal data. The staff can consult vehicle moving trajectory, loading/unloading statistics, and illegal operation.

2.2 Development of Mining Vehicle Base Station Mine vehicle base station is a special vehicle communication equipment which integrates RFID radio frequency technology, Wi-Fi communication technology, and onboard storage function. Mine vehicle base station has a fast radio frequency identification module which can quickly identify the location tag, and at the same time, the mine vehicle base station records the ID of the location tag to the storage module. When the vehicle passes by the wireless coverage area of the wireless base station, the vehicle base station uploads the location record information to fine management platform software in the remote monitoring center [1]. As shown in Fig. 2, The mine vehicle base station contains the following hardware components: • SoC AR9531 single-core, the basic frequency up to 650 MHz, and built-in 2.4 GHz baseband chip • DDRII 64 M memory • SPI Nor flash 16 M NOR Flash 16M

DDRII 64M

GL823

2.4G antenna

TFCard

AR9531 RFID Reader

RTC DS1302

Console

LAN1-3

Fig. 2 Principle of mine vehicle base station

578

• • • • •

X. Liu et al.

RTC DS1302 real-time clock module Serial port, baud rate 115200 GL823 T-Flash Card Reader RFID Reader 2.4G 11NG antenna

After the system power on, the AR9531 starts initialization module and network configuration. The AR9531 sends acquisition instructions to the RFID Reader at a certain period, after the RFID reader receives the acquisition instructions and it sends the location tag information to the AR9531. The AR9531 according to the time which RTC DS1302 real-time clock module provides and composes specified information. And then, the AR9531 stored the information to the T-flash card reader. When the vehicles move to wireless network coverage area, the mine vehicle base station connects the access point (AP), and it transmits the information to the access point. The flowchart of the software is shown in Fig. 3 [2].

System Initialization

Sniffer the AP

RFID Reader Sends instructions to AR9531

Connected AP

AR9531 Receives the instruction from RFID Reader at regular intervals

Transmits the lable information No

Through RTC CLock work

Composite label information

Transmission complete?

Yes

Ends Stored in T-flash

Fig. 3 Hardware of the system

Research and Development of Fine Management System for …

579

Fig. 4 Location tag

We design the communication interface protocol of mine vehicle base station, as shown in Fig. 3.

2.3 Location Tag The location tag is composed of passive RF label which does not need a battery cell to supply power. The location tag uses specific processes and plastic substrates that package chip and antenna into labels with different shapes for protection. It has the characteristics of high temperature resistance and corrosion resistance. It works at 860–960 MHz band and has a total storage capacity of 2048 Bits. The global unique ID number accounts for 64 Bits (ISO-18000-6B), 96 bits EPC coded 64 bits unique ID number and 224 bits user data area (ISO18000-6C), as shown in Fig. 4. The fine management platform is the center of data processing center and human– computer interaction. It receives the information that the AP transmitting the information to the fine management platform. The fine management platform fuses and analyzes the collected information according to the operation judgment logic, forms the operation process records of each underground shoveling vehicle, and then makes statistics on the transport volume and abnormal operation of the vehicle [3–5]. According to user’s requirement, it forms customizable business reports, as shown in Fig. 5.

3 Design of Operational Pattern Recognition Algorithms for Underground Trackless Equipment 3.1 Stope Model of a Middle Section • Chute: There are two kinds, one is ore chute and the other is waste rock chute. It will be replaced according to the task, as shown in Fig. 6. • Location Tag: The location tag can be installed in ore chute, waste rock chute, waste rock room, and mine room. • Wi-Fi access point: It is installed in the location of vehicles passing by. Waste rock room/mine room: the waste rock room produces waste stone, and the mine room produces ore.

580

Fig. 5 Fine management system

Fig. 6 Schematic drawings of stopes, chutes, roadways, and location tag

3.2 Definition of Data Transfer Protocol for Mine Waste Mixing typedef struct sdserver_message_header { uint16 mark; /* Message flag*/ uint32 source_id; /* Mine vehicle base station ip */ uint32 destin_id; /* The server ip */

X. Liu et al.

Research and Development of Fine Management System for …

581

uint32 msg_version; /* Protocol Version = 1*/ uint32 msg_type; /* Message type = 0*/ uint32 msg_length; /* Message length */ } sdserver_msg_t; typedef struct sdserver_epc { uint64 time_stamp; /* World Coordination Time */ uint8 epc[12]; /* Location tag Code */ } sdserver_epc_t;

3.3 Recognition Algorithms of Mine Waste Mixed Inversion The behavior vehicles contain two modes as shown below: • Mine/Waste rock room—Ore chute or waste rock chute This type is mainly the mode of ore transportation from mine/waste rock room to the ore chute or waste rock chute. • Roadway—Ore chute or waste rock chute This type is mainly the mode of ore transportation from roadway to the ore chute or waste rock chute. The main reason of this case is that the vehicle does not go into the mine/waste rock room.

3.4 Design of Identification Logic of Vehicle Operation Process Based on the data that the vehicle base station received, we design the identification logic of vehicle operation process, and through fusing the identification sequence, identification times and identification frequency to achieve the effective identification of target operation process and solve the problem of vehicle avoidance. The result of misjudgment can improve the identification accuracy and efficiency of vehicle operation process. The concrete logic design is as follows (1) vehicle material loading In the light vehicle state, the vehicle base station can continuously capture the location tag information, but also capture the label information of the scraper multiple times at a specified time interval (default multiple shoveling, not considering one shoveling), and there is no label information inside the mine. As loading is completed, it is recorded as heavy truck.

582

X. Liu et al.

(2) Truck material unloading In the condition of heavy truck, the base station captures the external tag information of the chute for the first time, but not the internal tag information of the chute. As unloading is completed, it is recorded as light truck. (3) Light trucks let light/heavy trucks into mines Logic 1: Light trucks successively capture external and internal identification information of mining houses. Logic 2: Light truck captures the identification information inside the mine and captures other vehicle identification information for a short time (at unspecified intervals). (4) Light trucks let light/heavy trucks into the chute Light trucks entering the chute shall be regarded as wrong trucks and shall not be handled. (5) Heavy trucks give way to heavy trucks and enter mines Heavy trucks entering the mining room are regarded as wrong trucks and not handled. (6) Heavy trucks let heavy trucks into chutes The heavy truck is a truck and captures the identification information of two external and internal chutes. It is regarded as driving in the wrong direction, as shown in Fig. 7.

4 Test Verification of Trackless Fine Transportation System The fine management system for underground trackless vehicles is tested in a mine. According to the underground conditions, we chose −140, −413 m level as the experimental sites. These middle sections contain many ore chutes and waste rock chutes. The transportation situation in the middle section is complex. There are not only trucks and scrapers unloading ore to ore wells, unloading waste rocks to waste rock wells and other paths, but also in the production and transportation of roadways, there is often miscarriage avoidance behavior, and the transportation situation is more complex as shown in Table 1. The test result shows that the total number of ore unloading is 27, and the number of mine waste mixing is 7. The fine management system for underground trackless vehicles can count the number of violations.

Research and Development of Fine Management System for … Fig. 7 Identification logic of vehicle operation process

583

Start

Trackless Vehicle Data

All initial loading positions

Record vehicle passing position

judge vehicle passing position

No mixing of mine waste or not

Yes

give an alarm

Table 1 Statistical statement of the test result

Total number of ore unloading

Number of mine waste mixing

27

7

584

X. Liu et al.

5 Conclusion This paper introduces a fine management system for underground trackless vehicles. It presents the system composition, which includes hardware composition and software design. Through the fine management system for underground trackless vehicles can realize the function of location recognition of underground vehicles, trajectory recording and analysis, screening abnormal phenomena (unloading disorder) and alarm., it can It will have fine plication prospects in the mine. Acknowledgements This research was supported by the State Key Research Development Program of China (Grant No. 2017YFC0804404); The State Key Research Development Program of China (Grant No. 2018YFC0604402); National international scientific and technological cooperation Program (Grant 2015DFA60330); 2017 China Intelligent Manufacturing Comprehensive Standardization Project (Z135060009002).

References 1. Liu, X., Zhang, D., Lv, X., Jin, F.: Research of image transmission system based on ZigBee and GPRS network. Int. J. Mach. Learn. Comput. 10, 458–460 (2013) 2. Pan, T., Liu, X.: Hybrid wireless communication system using ZigBee and WiFi technology in the coalmine tunnels. Measur. Technol. Mechatron. Autom. 2, 340–343 (2011) 3. Mohanan, P., Vasudevan, K., Augustin, G., Shynu, S.V., Aanandan, C.K.: Electron. Lett. 42(9), 502–503 (2006) 4. Zhang, Y., Li, L., Zhang, Y.: Research and design of location tracking system used in underground mine based on WiFi technology. Int. Forum Comput. Sci. Technol. Appl. 3(3), 417–419 (2009) 5. Lv, X., Zhang, D., Jin, F., Liu, X.: Research of mining high power 802.11 n access point. Appl. Mech. Mater. 571–572, 447–452 (2014)

A Certificate-Based Authentication for SIP in Embedded Devices Jie Jiang and Lei Zhao

Abstract Session Initiation Protocol (SIP) is commonly used for the establishment of Voice over IP (VoIP) calls. The security problem during the SIP certification process, such as server spoofing and tampering with message bodies, is also should be solved. This paper proposes a technique by using a certificate authentication for SIP in embedded devices. Firstly, we design a certification with extending the certificate format for SIP authentication. Secondly, we integrate the certification in SIP authentication interaction. Experiments on ARM processor-based platform prove that our proposed approach has many advantages. Keywords SIP · Security · Certificate-based authentication

1 Introduction Session Initiation Protocol (SIP) is a kind of IP-based telephony protocol proposed by the IETF [1], and its basic functions are to create, modify and terminate sessions and to support user mobility. Due to its simplicity, flexibility and scalability, the technology of the Voice over IP (VoIP) service using the SIP is booming. SIPbased system implemented by embedded hardware was widely used by its good realtime performance, low power consumption, high reliability and easy to be extended characteristics [2]. Figure 1 is the base authentication procedure in SIP defined by rfc3261. The specific certification process can be found in rfc3261-26: Security Considerations: Threat Model and Security Usage Recommendations. The advantage of this basic authentication is that no key is transmitted on the network, and it depends on the initial key agreed by both parties. The disadvantage of base authentication procedure in SIP is that one-way authentication leads to the authenticity of the server which cannot be determined. According to the defects in the basic security certification of J. Jiang (B) · L. Zhao College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_57

585

586

J. Jiang and L. Zhao

Fig. 1 Base authentication procedure in SIP

SIP, [3] propose authenticated key exchange protocol and gave proof of safety. In [4] used Elliptic Curves Cryptography (ECC) encryption in the IoT (Internet of Things) system. The organization of this paper is as follows: Section 1—Introduction: A brief introduction of SIP authentication and related research. Section 2—Attacks in SIP authentication and solution: The security problems during the SIP certification process and solutions. Section 3—Simulation Results: We implemented Certificate-based SIP authentication on the embedded platform and compare the differences with base SIP authentication. Section 4—Conclusion: Summarization of this paper.

2 Attacks in SIP Authentication and Solution The authentication mechanism is the basis of the confidentiality communication. Proper authentication mechanism can reduce security threats.

2.1 Attacks in SIP Authentication In the SIP authentication process, there are many kinds of security problems, typical attacks include: (a) Server spoofing The SIP user agent usually directly forwards the call request through the intradomain proxy server. When the call request is forwarded hop by hop outside the domain, the malicious attacker will pretend to send the response to the remote

A Certificate-Based Authentication for SIP in Embedded Devices

587

server according to the key header information of the sent request, resulting in the user agent, requests are redirected to other domains. This type of attack can be prevented by digital signature. (b) Tampering with message bodies User agents usually use the SIP message body to transfer session description attributes, such as “From,” “Via,” “Expires” and other fields. Malicious attackers can easily obtain such information through interception, and even tamper with session description attributes, resulting in legitimate users, unable to establish call properly. This type of attack can be prevented by the integrity hash. (c) Man in the middle attack The attack mode is to place an intruder-controlled communication connection device between the SIP client and server in the network connection by various technical means. This type of attack can hardly preventable in the interaction between SIP client and server and needs to be processed by a trusted third party.

2.2 Certificate-Based Authentication for SIP We consider the use of the digital certificate authentication to enhance SIP authentication process safety. A digital certificate based on a public key cryptosystem is an electronic document that combines the identity of a user with the public key it holds. The communication participant entity can use a digital certificate to prove itself in the network interaction. In the issuance process, the identity of the user needs to be verified, and the user identity and the corresponding public key are bound and digitally signed. In order to provide authentication for SIP interaction parties, we use third-party certification authorities to prevent man in the middle attack. The format of the certificate we design is as follows: Each server and client participating in SIP authentication has a set of ECC algorithm public parameters: (q, F a , E, P, n), (q: q∈ {p, 2m } (p is a large prime number, m is a prime number), F a is a finite field, E is an elliptic curve on F a , P is the base point of order n) and a certificate issued by a CA. The certificate contains the node SIP message header field “From,” the public key of the node, certificate validity date and the signature of the CA. For example, the clientA certificate format can be described as: CertA = {InfoA , pA , DateA , [h(IDA , pA , DateA )] sCA }, In the above expression: (a) (b) (c) (d) (e)

InfoA is clientA unique information such as Name. h( ) is a hash function to reduce the amount of signature calculations. Date is the deadline for the certificate. pA Public key for client A [h(IDA , pA , DateA )] sCA is the CA using the CA’s private key sign of the certificate h(IDA , pA , DateA ).

588

J. Jiang and L. Zhao

We chose the FourQlib as ECC algorithm [5]. It is an efficient and portable math library that provides functions for computing essential elliptic curve operations. It is defined by the twisted Edwards equation:    E GF p 2 : − x 2 + y 2 = 1 + dx 2 y 2 Where p is the Mersenne prime p = 2127 – 1, and d is a non-square in GF(p2 ). FourQ comes equipped with two efficiently computable endomorphisms which enable fourdimensional scalar decompositions. The powerful combination of these endomorphisms together with the use of complete, extended twisted Edwards coordinates and very efficient arithmetic over p = 2127 − 1 facilitates scalar multiplications that are significantly faster than any other available alternative. This algorithm has been implemented in many embedded systems [6, 7]. The secure interaction for SIP authentication will look like this: (a) Client INVITE request adds a header field CERTIFICATE to the request, and the certificate signed by the CA is placed in the domain to verify the identity of the client. (b) Server responds to the INVITE request and parses the header field CERTIFICATE. If the check is passed, the message with its own certificate is replied to the client, otherwise the reply requires an authentication message. (c) Client verifies the certificate of the server. If it passes, it sends its own registration request. In the registration request, the header field INTEGRITY was added in, and all messages are hashed and signed by client inside this field to avoid message tampering. (d) Server responds to the REGISTER request and parses the header field Integrity. If the verification passes, the authentication passes. The SIP authentication process embodies the advantages of digital certificate authentication and considers the actual situation of the embedded system. m Certificate-based SIP authentication’s advantages are: (a) A CA-signed digital certificate is issued after the applicant is authenticated by a trusted third party. The certificate is unique to the applicant, and the signature is secure. (b) ECC algorithm selected for embedded systems, and its high speed and high security have been tested. In [8], FourQ calculation speed is between four and five times faster than standard curve K-283 on ARM processors. (c) Increase integrity verification domain and digital signature, which can be used for secure message transmission after authentication.

A Certificate-Based Authentication for SIP in Embedded Devices

589

3 Simulation Results In order to compare the difference between the certificate-based authentication and the base authentication procedure in SIP, we simulated an embedded system composed of SIP client, SIP server and CA server which are developed under Linux. The client software is based on oSIP and its extension library eXosip on the Ubuntu16. We modified the SIP message according to the design interaction process and transplanted it to the ARM9 processor mobile terminal. The operating system of the mobile terminal is embedded Linux, and the kernel version is 2.6.30. The SIP server uses the asterisk modified pjsip stack, CA server uses Enterprise Java Bean Certificate Authority (EJBCA) integrated with FourQLib. Both servers use the ARM11 processor. We tested the common indicators on this platform within 100 experiments call. As expected, the results show that the difference between these two solutions is of 20% on average: The average one-way network delay using SIP based on certificate authentication is 85.54 ms and the delay jitter is 28.15 ms, which is 125% of the call delay using basic SIP authentication, and other performance indicators, such as call success rate and packet loss rate, are less than 10% of the way using the original SIP authentication. The test results show that SIP based on certificate authentication is reached the requirements of the VoIP project. Based on the advantages of public key authentication, we will focus on using the Elliptic Curves Diffie-Hellman (ECDH) to protect the content of the project (Fig. 2). 100

CerƟficate-based SIP AuthenƟcaƟon

90

basic SIP authenƟcaƟon

80 70 60 50 40 30 20 10 0 call success rate(%)

one-way network delay jiƩer(ms) delay(ms)

packet loss rate(%)

Fig. 2 Difference between certificate-based SIP authentication and basic SIP authentication

590

J. Jiang and L. Zhao

4 Conclusion This paper proposes the technique which uses certificate authentication for SIP in embedded devices, which overcomes the weaknesses of base authentication procedure in SIP. The ECC-based SIP authentication scheme proposed in this paper increases the authentication mechanism by extending the SIP field and uses the ECC suitable for the embedded system to guarantee the encryption speed and authentication efficiency of the application. With embedded SIP communication test, we can see authentication based on FourQ ECC which is efficient and preferable in the embedded devices. Due to the high bit strength security of ECC, this solution effectively solves the security problem of SIP authentication.

References 1. Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M., Schooler, E.: RFC3261-SIP: Session Initiation Protocol (2002) 2. Pjani´c, E., Liši´c, S.: A customizable embedded WebRTC communication system. Advanced technologies, systems, and applications II. In: International Symposium on Innovative and Interdisciplinary Applications of Advanced Technologies, pp. 819–829 (2017) 3. Takahara, H., Nakamura, M.: Enhancement of SIP signaling for integrity verification. In: 10th IEEE/IPSJ International Symposium on Applications and the Internet 4. Dhillon, P.K., Kalra, S.: Secure and efficient ECC based SIP authentication scheme for VoIP communications in internet of things. Multimed. Tools Appl. 78(16), 22199–22222 (2019) 5. Cards, C.: Four, Q.: Four-dimensional decompositions on a curve over the mersenne prime. In: Advances in Cryptology-ASIACRYPT. Springer, Berlin (2015) 6. Liu, Z., Longa, P., Pereira, G., Reparaz, O., Seo, H.: Fourq on embedded devices with strong countermeasures against side-channel attacks. IEEE Trans. Dependable Secure Comput. 99, 1 (2017) 7. Järvinen, K., Miele, A., Azarderakhsh, R., Longa, P.: Four mathbb on FPGA: new hardware speed records for elliptic curve cryptography over large prime characteristic fields. In: Cryptographic Hardware and Embedded Systems, pp. 517–537 (2016) 8. Longa, P.: FourQNEON: faster elliptic curve scalar multiplications on ARM processors. In: International Conference on Selected Areas in Cryptography. Springer, Cham (2016)

An Anti-Power Attack Circuit Design for Block Cipher Ying Jian Yan and Zhen Zheng

Abstract To improve the Anti-Power Attack capability of the Block Cipher algorithm circuit, we briefly summarized the research status of Anti-Power Attack technology and the advantages and disadvantages in each thesis. On the basis of Masking Technique, the concept of Reverse Interleaving was put forward and its key property was proved. A Reverse Interleaving circuit structure was designed then, whose timing alignment is disturbed by adding a register. On this basis, an optimized circuit structure was further designed and the generation of essential signal sequences was analyzed. Then, the protecting mechanism and the timing of the optimized structure were discussed: The Anti-Power Attack capability of the algorithm circuit is improved by realizing Power Randomization. Finally, the structure was applied to the AES algorithm circuit and was verified in terms of encryption function and protection performance. The results show that AES algorithm circuit with the protective structure designed in this paper can correctly realize encryption in two different timings in 12 clock cycles and the addition of the Reverse Interleaving circuit structure can greatly improve the Anti-Power Attack capability: Before protection, the attack sample size is 600, and the obtained correlation coefficient is 0.225; after protection, the sample size rises to 10,000, and the correlation coefficient decreases to 0.016. The circuit structure designed in this paper has a high reference value. Keywords Block Cipher · Anti-Power Attack · Masking Technique · Reverse Interleaving · Power Randomization

1 Introduction During the operation of the cryptographic device, power consumption, electromagnetic, time, and other information are inevitably leaked, and attackers can obtain information about the key through this information. The way an attacker attacks a device by getting the power consumption leak is called Power Attack. The Power Y. J. Yan · Z. Zheng (B) Information Engineering University, Zhengzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_58

591

592

Y. J. Yan and Z. Zheng

Attack is implemented on the basis that the power consumption of the cryptographic device depends on the intermediate value of the cryptographic algorithm executed by the device [1]. To defend against Power Attack, we can try to reduce or even eliminate this dependency and achieve randomization of power consumption which is called Power Randomization. At present, the main protection technologies are hiding technique and Masking Technique. The hiding technique is mainly to make the power consumption in the running process of the algorithm as random as possible so as to achieve the purpose of protection; Masking Technique is divided into a Boolean masking, polynomial masking, inner product masking, etc. The method of Masking Technique is mainly by masking the intermediate value to mask the true value in the algorithm. The intermediate result increases the difficulty for the attacker to decipher the key. In the context of Masking Technique, Miyajan A. et al. introduced a masking scheme for AES in [2], used Karnaugh maps to reduce computational complexity, and performed parallel process by using single-instruction multiple data techniques. The implementation of the encryption cycle is shorter, but it occupied more resources, which is a scheme that sacrifices resources to increase the operation rate; Gross H. et al. implemented a dedicated circuit in [3]. The scheme has higher flexibility for multi-level Power Attack, but its application range is small. Li Lang et al. designed a masking scheme based on random selection transform in [4], through random generation, etc. The masking group of the probability Hamming weight uses the random transposed matrix transform for S-box. The scheme protects the intermediate value in the algorithm running process, but the decrease of computing efficiency is obvious; Pu et al. proposed and implemented a masking scheme based on Boolean matrix with provable security in [5], but the overall performance of the scheme is more ordinary. In addition, a large quantity of scholars have carried out research on different aspects of Masking Technique, and it still has great extensibility. In the first chapter, the basic concepts of Power Attack were introduced and the related research was summarized. The second chapter put forward the concept of Reverse Interleaving and proved its key property. In the third chapter, the circuit structure was designed and optimized. The fourth chapter applied the designed structure to the AES algorithm circuit and verified its encryption function and protection performance.

2 Reverse Interleaving The main idea of the Masking Technique is to handle the intermediate values processed by the cryptographic device so that the power consumption of the device does not depend on the intermediate value of the algorithm executed by the device. In the specific implementation, the plaintext or ciphertext that needs to be encrypted/decrypted is often subjected to certain arithmetic or finite field transformation, so that the attacker cannot obtain the real value in the cryptographic algorithm, thereby realizing the protection of the key information. After the decryption is

An Anti-Power Attack Circuit Design for Block Cipher

593

completed, the corresponding reverse transformation is performed to obtain the real plaintext or ciphertext. Based on this principle, the definition of Reverse Interleaving is put forward as follows. Once Power Attack is performed on the Block Cipher algorithm after applying a certain protection measure. The sample size is N, and the actual power consumption → → p1 ; if N/2 elements sequences collected before and after the protection are − p0 and − → − → p0 (where a in p1 satisfy the same power consumption model P = aH + b as − is the power consumption mapping coefficient, H is the intermediate value of the algorithm somewhere, and b is the Gaussian white noise), and the remaining N/2 elements satisfy the model P = a(1 − H ) + b, then the protection measure is called Reverse Interleaving. After the Reverse Interleaving protection measure is applied to the Block Cipher algorithm, the value of the correlation coefficient in the Power Attack will be greatly reduced, and the limit value is 0. The proof process is as follows: Let the hypothetical power consumption sequence corresponding to the correct − → key after protection be H . According to the definition of Reverse Interleaving, taking − → the N/2 element sequence H1 that satisfies the P = a H + b model in H , then the − → remaining N/2 element sequence H2 satisfies P = a(1 − H ) + b. Correspondingly, → after the guarded power consumption sequence − p1 is split into P11 and P12 , the number of elements is N/2, and the element satisfies: 

  P11 = a H1 + b ⇒ ρ H1 , P11 = ρ(H, P0 )   P12 = a(1 − H2 ) + b = a − a H2 + b ⇒ ρ H2 , P12 = ρ(H2 , −a H2 + b)

When the sample size N is large enough, the following formula holds:   ρ H2 , P12 = ρ(H2 , −a H2 + b) ≈ ρ(H2 , −a H2 − b) = −(H2 , a H2 + b) = −ρ(H, P0 ) According to the relevant knowledge in mathematical statistics, the following formula holds: ρ(H, P1 ) =

   1 1  ρ H1 , P11 + ρ H2 , P12 = ρ[(H, P0 ) − ρ(H, P0 )] = 0 2 2

The above results show that when the sample size N is large enough and when Power Attack is applied to the circuit with the Reverse Interleaving structure, the value of the correlation coefficient will be greatly reduced and approached to 0. Therefore, the Anti-Power Attack capability of the Block Cipher algorithm circuit can be enhanced by adding a Reverse Interleaving structure.

594

Y. J. Yan and Z. Zheng

3 Reverse Interleaving Circuit Design To satisfy the condition of Reverse Interleaving, the intermediate value of the algorithm running process should alternate randomly. Referring to the relevant theory in realizing the Block Cipher algorithm circuit, it is difficult to insert the Reverse Interleaving circuit structure in the round operation of the Block Cipher. Therefore, this paper mainly considers inserting the protect unit outside the round operation. In order to realize the negation of the intermediate value of the cryptographic operation, this paper adds an inverter before and after the register and controls whether the value is inverted by random number. The basic circuit structure is shown in Fig. 1. The existence of a nonlinear part such as an S-box in the round operation of the Block Cipher makes it necessary to convert the inverted intermediate value to the correct value before performing the round operation; otherwise, the correct encryption and decryption result cannot be obtained. On the other hand, if the value is not inverted, the intermediate value of the algorithm and the protection will not change, and the Power Randomization during the running process of the algorithm cannot be realized. Therefore, the basic circuit structure in Fig. 1 can only defend against Power Attack against the register R1, the attack on the cryptographic operation component (i.e. the component in the round operation) cannot achieve the expected protection effect, and the power consumption is randomized. So, the circuit structure must be further optimized. To realize the randomization of the power consumption of the circuit, this paper combines the countermeasures of disturbing the timing alignment [6–8], referring to the method of inserting the complementary register [9, 10], and extends the encryption cycle randomly by adding the primary register R2 to achieve timing disruption. The specific circuit structure is shown in Fig. 2. Compared to the basic circuit structure in Fig. 1, the control signal of the optimized structure turns to the logical AND of the two signals. In Fig. 2, the control signal Sel is a random number generated by a random number generator. According to the

0 1

R1

clk Random Number

Fig. 1 Basic circuit structure that satisfies Reverse Interleaving

0 1

Round Operation

An Anti-Power Attack Circuit Design for Block Cipher

0 1

595

0

R1 0 1

R2

1

Round Operation

clk

Control Signal Sel First or last round 1 0

Fig. 2 Optimized circuit structure

Table 1 Control signal Sel sequence generation

The first bit of random number

Control signal Sel sequence

0

{0, 0, {n − 3’b0},1, 1, 0}

1

{1, 1, 0, {n − 3’b0}, 0, 0}

structure of the circuit, to realize Power Randomization, the control signal Sel should change according to the difference of the first bit of the random number (Table 1). Existing Power Attacks on Block Cipher select the first or last round as the attack point, so the design of the Reverse Interleaving structure mainly considers the protection of the first and last rounds. In the first or last round, the register R2 is assigned by R1, and the circuit controls to disturb the timing through the register R2: When the control signal is 1, the register R2 ensures that the circuit disturbs the timing; when the control signal is 0, the register R2 is invalid, the data selector is valid for the 0 input, and the circuit performs the round operation normally. When the algorithm runs to the middle round, the correctness of the round operation input is guaranteed by the two-level reversion, and the circuit is normally encrypted. As can be seen from the analysis of Fig. 2, according to the first bit of the random number generated by the control signal Sel, the timing of the attacked sample can be divided into two types, as shown in Fig. 3. The anti-attack capability of the optimized Reverse Interleaving structure in the first and last rounds is discussed below: (1) The first round When an attacker attacks an external register of a round operation, different samples alternate, in the first clock cycle of the circuit, in accordance with the condition of Reverse Interleaving; when the internal cryptographic component is attacked, in the two timings, the input of the round operation in the second clock cycle is round encryption results and random numbers, and the attacker cannot obtain information leak.

596

Y. J. Yan and Z. Zheng

Fig. 3 Two timings of optimized Reverse Interleaving structures

(2) The last round For different samples, in the n + 1th clock cycle, the data selector has a set terminal of 0, register R2 is invalid, and register R1 is random number and round encryption results, respectively, at two timings. The attacker cannot attack the external register of the round operation; in the two timings, the values between the n + 1th and n + 2th clock cycles are random numbers and round encryption results, and round encryption results and the encryption result, respectively, and the attacker is also unable to obtain information leak. In summary, the optimized Reverse Interleaving structure in Fig. 2 can achieve Power Randomization in the first and last rounds of Block Cipher operation.

4 Application and Verification of Reverse Interleaving Circuit To verify the Anti-Power Attack performance of the Reverse Interleaving structure proposed in this paper, the optimized structure is applied to the AES-128 algorithm circuit. The overall circuit is shown in Fig. 4. (1) Encryption and decryption function verification The AES-128 algorithm based on the optimized Reverse Interleaving structure has two different encryption timings. Taking the encryption function as an example, VCS is used to simulate the circuit, and the result is shown in Fig. 5. In the figure, clk is the clock signal, load is the load signal, trng_128 is the random number, data_in is the plaintext, data_o is the ciphertext, state is the register, and Sel

An Anti-Power Attack Circuit Design for Block Cipher

597

Plain Text Key First round 1 0

1 0 0 1

0

R1 0 1

Random Number

R2

1

Round Operation Last round operation Ciphertext:0

clk Control Signal Sel

First or last round 1 0

Fig. 4 Application of AES-128 algorithm

Pre-protection encryption timing

Post-protection encryption timing 1

Post-protection encryption timing 2 Fig. 5 Encryption timings before and after protection

598

Y. J. Yan and Z. Zheng

is the control signal. The simulation results show that the protected AES-128 circuit can successfully implement the encryption in two different timings in 12 clock cycles. (2) Protection ability verification To verify the protection effect, the designed circuit is firstly implemented in the Verilog Hardware Description Language, and then the Vivado software is used to synthesize the bitstream file and download it to the ChipWhisperer experimental development board. After the encrypted power traces are collected, the circuits before and after the protection are attacked and compared, and the protection ability of the optimized Reverse Interleaving structure is analyzed. Attacks were performed on the circuits before and after protection. The result is shown in Fig. 6. Before protection, the correct key value can be obtained when the attack sample size is 600. The correlation coefficient value corresponding to the correct key is 0.225. After protection, when the sample size is 10,000, the correlation coefficient has multiple spikes, which indicates that the sample is still insufficient. The correlation coefficient value corresponding to the correct key reduced to 0.016. According to the above results, the Reverse Interleaving circuit structure can greatly improve the Anti-Power Attack capability of the circuit.

Before protection

After protection Fig. 6 Comparison of attack results before and after protection

An Anti-Power Attack Circuit Design for Block Cipher

599

5 Conclusion In this paper, based on summarizing some existing protection technologies, from the perspective of Masking Technique, in the method of randomly inserting random numbers, the definition of Reverse Interleaving was proposed, and the basic circuit structure that satisfies the Reverse Interleaving was designed and optimized. The specific implementation of Power Randomization of the designed circuit structure was analyzed. Finally, the optimized circuit structure was applied to the AES-128 algorithm circuit and was verified in the aspects of encryption function and protection performance. The results show that the Reverse Interleaving circuit structure designed in this paper can achieve correct encryption and has strong Anti-Power Attack capability and high reference ability. At the same time, there are some aspects that can be improved: The design of the circuit is not flexible enough; the selected components are relatively simple; the utilization rate of the register R2 added in the optimization structure is kind of low; the timing analysis is not specific enough; some tools and actuals used in the verification are certainly different from the actual attack and defense; there could be a discrepancy between the parameters obtained in the verification results and the actual attack and defense scene. The next step is to further optimize the problem of the highest frequency and throughput of the circuit to achieve better performance.

References 1. Feng, D.G., Zhou, Y.B., Liu, J.Y., et al.: Power Analysis Attack. Science Press, Beijing (2010) 2. Miyajan, A., Huang, C. H., Al-Somani, T. F. Speedup higher-order masking of AES using normal basis and SIMD. In: International Conference on Computer Engineering & Systems (2017) 3. Gross, H., Mangard, S., Korak, T. An efficient side-channel protected AES implementation with arbitrary protection order. In: Cryptographers’ Track at the RSA Conference. Springer, Cham (2017) 4. Li, L., Ou, Y., Zou, W.: An AES random transformation mask scheme and anti-DPA analysis. CMD J. 5(4), 112–124 (2018) 5. Pu, S., Guo, Z., Liu, J. et al.: Boolean matrix masking for SM4 block cipher algorithm. In: International Conference on Computational Intelligence & Security. IEEE (2018) 6. Folgado, D., Barandas, M., Matias, R., et al.: Time alignment measurement for time series. Pattern Recogn. 81, 268–279 (2018) 7. Bhattacharya, S., Rebeiro, C., Mukhopadhyay, D.: A formal security analysis of even-odd sequential prefetching in profiled cache-timing attacks. In: Hardware & Architectural Support for Security & Privacy (2016) 8. Yi, J., Daneshrad, B., Pottie, G.J.: A practical approach to joint timing, frequency synchronization and channel estimation for concurrent transmissions in a MANET. IEEE Trans. Wirel. Commun. 16(6), 3461–3475 (2017) 9. Tanimura, K., Dutt, N. ExCCel: Exploration of complementary cells for efficient DPA attack resistivity. In: IEEE International Symposium on Hardware-oriented Security & Trust (2010) 10. Zhang, B.N., Gei, W., Zhen, W.: A distributed cross-domain register file for reconfigurable cryptographic processor. J. Southeast Univ. (English Ed.) 33(3), 260–265 (2017)

A New Data Placement Approach for Heterogeneous Ceph Storage System Fei Zheng, Jiping Wang, Xuekun Hao, and Hongbing Qiu

Abstract In the condition of heterogeneous Ceph storage cluster, the data distribution is imbalanced due to the pseudo-randomness of the CRUSH algorithm. In addition, the CRUSH algorithm only considers the nodes storage capacity to determine data storage location without considering the different ability of nodes in data processing, which will reduce the performance of cluster. A new data placement approach for heterogeneous Ceph storage system is proposed to solve these two problems. This proposed approach first adopts a multiple attribute decision-making model integrating the factors of storage capacity, CPU performance, memory size of each node, and then the probability weight of each heterogeneous node is determined by solving the proposed model to balance the data distribution. The result of series real-scene experiments shows that the proposed approach can not only improve the reading and writing performance and the fault tolerance but also make the data distribution more balanced. Keywords Ceph · Heterogeneous storage · CRUSH · Load balancing

1 Introduction Distributed storage system is usually adopted to meet the requirement of massive data storage and computing processing. As a scalable high-performance distributed file system, Ceph implements truly centerless nodes in storage systems. Storage systems often adopt multi-copy strategy in order to ensure the security of data. Literature [1] proposes a distributed multi-copy verification model for dynamic

F. Zheng · X. Hao The 54th Research Institute of China Electronics Technology Group Corporation, Shijiazhuang, China F. Zheng · J. Wang (B) · H. Qiu Ministry of Education Key Laboratory of Cognitive Radio and Information Processing, Guilin University of Electronic Technology, Guilin, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_59

601

602

F. Zheng et al.

provable data possession scheme of multiple copies. This model has good efficiency in calculation, storage, and cost. Recently, amount of work has concern with the load of system resources, and related load balancing algorithms are referred to literature [2]. These algorithms weight the load of different system resources and classify the load weight by the fuzzy method as the basis of load transfer. In terms of data load in heterogeneous environment, literature [3] proposes a load balancing algorithm based on feature-weighted fuzzy clustering. Literature [4] proposes a dynamic message-aware scheduling strategy for a Ceph storage system, which solves the load imbalance between nodes because of simple polling scheduling scheme in asynchronous communication. Data location in heterogeneous cluster can greatly affect system performance and load balancing. Literature [5] proposes a Ceph-based framework model, which takes into account cluster load, computing power, and heterogeneous network bandwidth, and designs an efficient algorithm to approximate the optimal solution. However, it is only applicable to mobile computing, and not applicable to data transfer between clusters. In terms of storage systems, literature [6] proposes a Ceph cluster-based method to create heterogeneous storage pools on bottom storage nodes and to meet different application requirements. Literature [7] builds heterogeneous storage environment with mixed Ceph storage system and distributed storage system and designs a distribution mechanism based on file ratio to improve the security of files and prove the system effectiveness. We consider node capacity, CPU performance, and memory size, then design a heterogeneous Ceph storage system-based data placement method. This method can determine the probability weight of data storage of heterogeneous nodes to improve the cluster performance.

2 Optimization Problem We introduce the concept of storage pool into Ceph storage systems. A storage pool has a certain number of placement groups (PG), and a PG is the smallest unit for data storage, migration, and change in the Ceph system. PGs are distributed among all of OSDs and can be dynamically increased or decreased based on the size of the cluster and the number of copies. Three steps of data storage are as follows: First, uploaded files are cut into objects of a certain size, then Hash algorithm maps an object to a PG uniquely, and finally, the controlled replication under scalable hashing (CRUSH) algorithm maps PGs to OSDs. The storage steps can be viewed as the uploaded data are stored in PGs, and PGs are mapped to OSDs. The data migration in the clusters is essentially PG migration between nodes. In this paper, we consider the case where there is only one storage pool in the cluster, but the related model also applies to multiple storage pools in the cluster. Given the cluster has m storage nodes, the storage pool has T PGs in total, and ith

A New Data Placement Approach for Heterogeneous Ceph …

603

m−1 OSD has t i PGs, T = i=0 ti . M is the total capacity of the cluster and β is the capacity utilization of the cluster. The data load of each OSD node is as follows: Si = ti /T · M · β

(1)

We can see that the final data load of a node is proportional to the number of PGs mapped to the OSD node when the capacity utilization is constant, and that the imbalanced PG distribution among nodes will lead to imbalanced data load among nodes. The PG-to-OSD mapping process is a pseudo-random process in the CRUSH algorithm (CEPH), and the PG number of each node is relatively balanced theoretically. In fact, the PG number of each node is greatly imbalanced when Ceph applies to video storage. The imbalance results in up to 90% capacity utilization in high load nodes and less than 70% in low load nodes. Due to large data volume, intensive writing and 7 × 24-h service in video storage, imbalanced data load among nodes leads to low quality of service and some nodes even go down because of high capacity utilization exceeding the threshold. In addition, capacity, CPU, and memory size are different between nodes in the heterogeneous environment. Hence, the decision based on capacity only (DCO) is inefficient for PG-to-OSD mapping.

3 Design and Implementation for Heterogeneous Ceph Storage System Nodes provide computing, migration, and storage services in Ceph storage system. The physical configurations of nodes will determine the data load and data processing capacity of storage nodes in heterogeneous environment. Therefore, we define storage devices as follows: the storage node devices W = (R, C, M), where R, C, and M represent the physical capacity, the computing capacity, and the memory size of nodes, respectively. To calculate the PG load weight for each node based on the above three attributes, we design a decision model based on multi-attribute as follows: The cluster owns m alternative   storage nodes and T PGs in total, and each decision bases on n attributes. A = ai j m×n is the decision matrix, aij is the jth attribute of ith alternative node. ai1 , ai2 and ai3 (i = 1, 2, …, m) are alternative node capacity, computing capacity, and memory size, respectively. First, calculate the decision matrix. ai j q i j = m i=1

ai j

(i = 1, 2, . . . , m, j = 1, 2, . . . , n)

Second, calculate the weighted decision matrix.

(2)

604

F. Zheng et al.

Table 1 Algorithm pseudo-code Input: osd_host_info Output: osd load PG number 1

osd_optimal_pg () ← DMA(osd_host_info); #caculateing osd and optimal pg number

2

while update== True

3

Result ← osd_current_pg ()/osd_optimal_pg ();

4

max ← Max(Result())

5

if max > μ

6

update ← True

7

i ← osd_id # finding the maximum ratio and the node id

8

osd_i_reweight ← osd_i_reweight - 

9

sleep(T) # redistributing PG

10

else update ← False

⎛ vi j = ω j · qi j ⎝ω j is the weight of m j ,

n 

⎞ ω j = 1⎠

(3)

j=1

Third, calculate the weight of each alternative decision. ri =

n 

vi j ( j = 1, 2, . . . , n)

(4)

j=1

Fourth, calculate the optimal PG number for each alternative decision. si = ri · T (i = 1, 2, . . . , m)

(5)

Table 1 shows the algorithm related to the above decision model.

4 Experiment and Analysis In the following experiments, we use a NF5270M3 server with E5-2620 CPU, 64 G-memory, and Windows Server 2008 R2 Datacenter operating system, and build 7 virtual machines with Ubuntu14.04LTS operating system and 0.94-version Ceph. One virtual machine is the monitoring node, and the other six are storage hosts, Host-1, …, Host-6, respectively. Tables 2 and 3 show results of three experiments. The reweight values of all nodes are 1 in CEPH method. The j of Eq. (2) is constant 1 in DCO method. The weight ratio of physical capacity, computing capacity, and memory size is 0.85:0.05:0.10 in DMA method. Column weight and PG of Table 3 are, respectively, node weight and ideal PG number for each node in DCO method and DMA method. DCO and DMA

0

1.000

0.837

0.819

OSD

CEPH

DCO

DMA

1.000

1.000

1.000

1

0.891

0.891

1.000

2

Table 2 Reweighted values in three methods

0.909

0.891

1.000

3

0.945

1.000

1.000

4

0.819

0.873

1.000

5

0.855

0.927

1.000

6

0.855

0.855

1.000

7

0.819

0.819

1.000

8

0.801

0.801

1.000

9

0.819

0.765

1.000

10

0.765

0.819

1.000

11

A New Data Placement Approach for Heterogeneous Ceph … 605

0.099

152

PG

149

PG

Weight

0.097

Weight

DCO

DMA

0

OSD

152

0.099

149

0.097

1

Table 3 Calculation results in two methods

152

0.099

149

0.097

2

152

0.099

149

0.097

3

143

0.093

149

0.097

4

143

0.093

149

0.097

5

143

0.093

149

0.097

6

143

0.093

149

0.097

7

89

0.058

86

0.056

8

89

0.058

86

0.056

9

89

0.058

86

0.056

10

89

0.058

86

0.056

11

606 F. Zheng et al.

A New Data Placement Approach for Heterogeneous Ceph …

607

methods can dynamically adjust reweight parameters of storage nodes to get actual PG numbers close to the optimal values as shown in Table 2, but DMA performs better. In the experimental environment, PG number is 512, copy number is 3. Figure 1 shows the PG distribution in each node in three methods and Fig. 2 shows actual data load of each node when 260G data are written into the cluster. PG distribution is uneven among OSD nodes in CEPH method, and osd-7 is 48 more PGs than osd-4 in the same capacity. As a result, osd-7 utilization is nearly 23% higher than osd-4 shown in Fig. 2. The osd-10 is 20 more PGs than osd-8, osd-9, and osd-11 at least, and then the difference leads to the osd-10 utilization being 19%, 13%, and 15% higher than the other three nodes, respectively. The utilization varies greatly among 180 160

PG number

140 120 100 80 60 40 20 0

osd-0 osd-1 osd-2 osd-3 osd-4 osd-5 osd-6 osd-7 osd-8 osd-9 osd-10 osd-11 CEPH

DCO

DMA

Fig. 1 PG distributions in three methods 100

Node utilization (%)

90 80 70 60 50 40 30 20 10 0

osd-0 osd-1 osd-2 osd-3 osd-4 osd-5 osd-6 osd-7 osd-8 osd-9 osd-10 osd-11 CEPH

Fig. 2 Data load distribution in the cluster

DCO

DMA

608

F. Zheng et al.

Writing speed (MB/s)

20

15

10

5

0

1K

4K

256K

1M CEPH

4M DCO

10M

40M

Fig. 3 Writing speed

OSD nodes, and the standard deviation reaches 9.95 in the whole cluster. The PG distributions are more even in DCO method and DMA method, and the standard deviations drop to 1.29 and 2.54, respectively. Figure 3 shows that the three methods are almost of the same performance because of the slow writing speed of small files. When the file size is larger than 256 K, the performance differences are obvious between the three methods. Generally, PG distribution differences cause the writing speed slower in the cluster. The DCO method takes into account the capacity of storage nodes, and PG distribution is more balanced. So that the writing speed increases 4%, 4.2%, 5.3%, 6.4%, 7.3%, respectively, when writing 256 K, 1 M, 4 M, 10 M, and 40 M files. PG distribution is less balanced in the DMA method than in the DCO method, but the writing speed increases 7%, 8.8%, 8.7%, 8.3%, 9.8%, respectively. Therefore, DMA method leads to the fastest writing speed. As shown in Fig. 4, the reading speed is almost the same between DCO method and DMA method when reading files of different sizes. Compared with CEPH method, DCO method improves reading speed by about 3% and DMA method improves reading speed by about 6%.

A New Data Placement Approach for Heterogeneous Ceph …

609

400

Reading speed (MB/s)

350 300 250 200 150 100 50 0

1K

4K

256K CEPH

1M DCO

4M DMA

10M

40M

Fig. 4 Reading speed

Acknowledgements The work presented in this paper has been supported by Special Program of Guangxi Science and Technology Base and Talents (2018AD19048) and Dean Project of Key Laboratory of Cognitive Radio and Information Processing, Ministry of Education (CRKL150109).

References 1. Ren, J.S., Wang, J.L., Cheng, X., et al.: Provable multi copy dynamic data possession in cloud storage. J. Xidian Univ. 44(6), 156–161 (2017) 2. Toosi, A.N., Buyya, R.: A fuzzy logic-based controller for cost and energy efficient load balancing in geo-distributed data centers. In: Proceedings of 2015 IEEE/ACM 8th International Conference on Utility and Cloud Computing, pp. 186–194 (2016) 3. Huang, W.H., Ma, Z., Dai, X.F., et al.: A load-balancing Algorithm for weighted fuzzy clustering. J. Xidian Univ. 44(2), 127–132 (2017) 4. Han, Y.J., Lee, K., Park, S.Y.: A dynamic message-aware communication scheduler for Ceph storage system. In: Proceedings of the 2016 IEEE 1st International Workshops on Foundations and Applications of Self-Systems, pp. 60–65 (2016) 5. Sha, H., Liang, Y., Jiang, W.W., et al.: Optimizing data placement of map reduce on Ceph based framework under load-balancing constraint. In: Proceedings of the IEEE International Conference on Parallel and Distributed Systems, pp. 585–592 (2017) 6. Meyer, S., Morrison, J.P.: Supporting heterogeneous pools in a single Ceph storage cluster. In: Proceedings of the 17th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing, pp. 352–359 (2016) 7. Cheng, W., Chiang, C., Yang, C., et al.: The implementation of supporting uniform data distribution with software-defined storage service on heterogeneous cloud storage. In: Proceedings of the 2016 IEEE 22nd International Conference on Parallel and Distributed Systems, pp. 610–615 (2017)

Construction-Based Secret Image Sharing Xuehu Yan, Guozheng Yang, Lanlan Qi, Jingju Liu, and Yuliang Lu

Abstract Most secret image sharing (SIS) schemes output noise-like shadows and are fragile to any noise due to their restoring methods are based on mathematical operations. A noise-like shadow increases the suspicion of an attacker and the fragileness leads to the secret pixel is wrongly restored even if a bit error occurs. In this paper, we propose a construction-based SIS (CSIS) scheme for a (k, n)-threshold based on quick response (QR) code and the principle of polynomial-based SIS. In the proposed CSIS, each output shadow is a valid QR code, which is thus comprehensible and robust to typical noises. The secret image is losslessly restored by barcode scanning operation and Lagrange interpolation with any k or more shadows. The comprehensible shadow not only reduces the suspicion of an attacker but also improves the management efficiency of shadows. The robustness makes the proposed scheme applicable to noisy channel when transmitting shadows. We provide experiments to validate the proposed scheme. Keywords Secret image sharing · Extended secret image sharing · Comprehensible shadow · Construction-based secret image sharing · Noise

1 Introduction Secret image sharing (SIS) splits a secret image into several shadows, also called shares or shadow images, which are then distributed to participants. (k, n)-threshold SIS has a feature of loss-tolerance, i.e., the user can restore the secret with at most n − k shadows lost. Therefore, SIS is useful for many scenarios, such as password transmission [1], key management [2–4], identity authentication [5, 6], digital watermarking [7, 8], access control [9], blockchain [10], and distributive storage for the cloud [11–13]. Because one grayscale (binary) pixel is represented by one byte (bit) and a digital image is a specific form of data, SIS is easily extended to secret X. Yan (B) · G. Yang · L. Qi · J. Liu · Y. Lu National University of Defense Technology, Hefei, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_60

611

612

X. Yan et al.

(data) sharing. The principles of traditional SIS methods chiefly include visual secret sharing (VSS) [14, 15], also called visual cryptography (VC), and a polynomial [16]. In a (k, n)-threshold VSS [17, 18], we first print the n shadows onto transparencies and then send them to the corresponding n participants. In the recovery phase, the secret image is restored from any k or more shadows by stacking them and visually recognizing the secret image using only the naked human eyes without any cryptographic computations. If an attacker steals any less than k shadows, he cannot restore the secret image even with high computational power. However, the conventional VSS schemes are lossy with a low-quality secret image and are only suitable for a binary secret image [19–22]. In order to restore a high-quality secret image, Shamir [16] first introduced a polynomial-based secret sharing approach for (k, n)-threshold through constructing a random (k − 1)-degree polynomial in a field of P to output n noise-like shadows, which were then distributed to the n participants. When we collect any k or more shadows, we can restore the secret according to Lagrange interpolation. Inspired by Shamir’s work, many studies [23–27] proposed several polynomial-based SIS schemes to achieve better features, such as encrypting a grayscale image. Polynomialbased SIS is admirable since the restored secret image has both high quality and no pixel expansion. However, most SIS schemes have three drawbacks, which are discussed and analyzed as follows. 1. Each output shadow is noise-like. The noise-like shadow increases the suspicion of an attacker and reduces the management efficiency of the shadows. 2. Because the restoring method is Lagrange interpolation and fragile to any noise, the secret pixel is wrongly restored even if a bit error occurs. 3. The restored grayscale secret image is a little distorted. When polynomial-based SIS is applied to a grayscale secret image, in general P is a prime. The primes close to 255 are 251 or 257. If 251 is selected, we cannot restore the secret pixel when its value is greater than 250; otherwise 257 is selected, we cannot store the shadow pixel when its value is equal to 256. Most SIS schemes select 251 and secret pixel value greater than 250 is forced to be 250, thus the restored grayscale secret image is a little distorted. The motivation (contribution) of this paper is to propose a construction- based SIS (CSIS) for a (k, n)-threshold, which has the following advantages. 1. Each output shadow is comprehensible rather than noise-like. The comprehensible shadow not only reduces the suspicion of an attacker but also improves the management efficiency of the shadows [28]. 2. The proposed scheme is robust to typical noises, which is thus applicable to noisy channel when transmitting shadows. 3. The restored grayscale secret image is lossless. In this paper, we propose a CSIS scheme for a (k, n)-threshold based on quick response (QR) code and the principle of polynomial-based SIS. In the proposed CSIS, each output shadow is a valid QR code, which is thus comprehensible and robust to typical noises. P is equal to 257 and the random elements in polynomial-based SIS

Construction-Based Secret Image Sharing

613

are used to avoid the value of the shadow pixel equaling to 256. In the restoring phase, the secret image is losslessly restored by a barcode scanning operation and Lagrange interpolation with any k or more shadows. The comprehensible shadow not only reduces the suspicion of an attacker but also improves the management efficiency of shadows. The robustness makes the proposed scheme applicable to noisy channel when transmitting the shadows. We provide experiments to validate the proposed scheme. The arrangement of the following sections is as follows. Section 2 introduces the preliminary. In Sect. 3, we discuss the introduced CSIS algorithm in detail. Section 4 gives the performance analysis of our algorithm. Section 5 illustrates the experimental results and comparisons, and Sect. 6 provides the conclusion.

2 Preliminaries In this section, we present the principle of polynomial-based SIS and a short introduction to QR code. In conventional (k, n) threshold SIS, an original grayscale secret image S with size of W × H is split into n shadows, denoted by SC1 , SC2 , …, SCn . The restored secret image, denoted by S  , is reconstructed from any t (k ≤ t ≤ n, t ∈ Z +) shadows.

2.1 The Principle of Polynomial-Based SIS A pixel value of the secret image is denoted by s. Then we apply Shamir’s original polynomial-based SIS to split s into n pixels, which are then distributed to n shadow pixels according to the following steps. Step 1: Construct a k − 1 degree polynomial g(x) = (a0 + a1 x + · · · + ak−1 x k−1 ) mod P

(1)

where a0 = s, ai is a random value in [0, P − 1], for i = 1, 2, …, k − 1, P = 251 and i can be served as an order label for the ith participant. Step 2: sc1 = g(1), . . . , sci = g(i), . . . , scn = g(n).

(2)

Repeat the above two steps until all the secret pixels are processed. n are collected, In the restoring phase, when any k pairs of the n pairs {(i, sci )}i=1 we solve the coefficients of g(x) by Lagrange interpolation, and then let s = g(0) to restore the current secret pixel value. However, the secret image S cannot be restored when any k − 1 or less shadows are collected.

614

X. Yan et al.

We see that in step 1, ai , for i = 1, 2, …, k − 1, is a random number in [0, P − 1], which will be utilized in the proposed scheme to achieve lossless recovery in the field of 257.

2.2 QR Code Figure 1 shows the standard structure of a QR code. QR code [29] is represented by a matrix symbol that can be quickly scanned and decoded by a barcode reader. Three corners including a special kind of finder pattern play important roles in scanning because they help to locate the position and calculate size and inclination. The size of the symbol depends on the version of the QR code, which ranges from 1 to 40, denoted by V (1–40). Each version has four different levels of error correction ability, denoted by E(L) = 7%, E(M) = 15%, E(Q) = 25%, and E(H) = 30%. The QR code covers data with several formats. QR codes with different versions and error correction levels have different data capacities [30, 31]. The error correction ability guarantees the QR code robust to typical noises in the scanning and decoding process, which is used in the proposed scheme to achieve robustness.

Fig. 1 Structure of a QR code

Construction-Based Secret Image Sharing

615

3 The Proposed CSIS Scheme The design concept for the proposed CSIS algorithm is given in Fig. 2. Algorithm 1 presents the detailed algorithm, which takes a secret image with a size of W × H to output n shadows, namely SC1 , SC2 , …, SCn , also with a size of W × H. The restoring steps are presented in Algorithm 2. Regarding Algorithm 1, we note the followings. 1. In step 5, all the grayscale pixel values of TSCi are encoded by the standard QR encoding software. 2. In step 6, each shadow is a valid QR code. Regarding Algorithm 2, we make the following comments.

Fig. 2 Design concept for the proposed construction-based secret image sharing algorithm

616

X. Yan et al.

1. In step 1, scan and decode SCi to obtain all the pixel values of TSCi , where TSCi is resized to W × H. 2. In step 1, when more than k shadows are collected, we only use the first k ones to restore the secret image. Algorithm 1 The proposed construction-based secret image sharing for (k, n) threshold. Input: Threshold parameters (k, n), where 2 ≤ k ≤ n; an original secret image S with size of W × H; a set of participants, denoted by {1, 2, …, n}. Output: Shadow SCi , i = 1, 2, …, n. Step 1: Set, P = 257. For every secret pixel position (w, h) ∈ {(w, h) | 1 ≤w ≤ W, 1 ≤ h ≤ H}, repeat steps 2–4. Step 2: Let s = S(w, h). Randomly generate a1 , a2 , … ak −1 ∈ [0, P − 2]. Construct a k − 1 degree polynomial   g(x) = s + a1 x + · · · + ak−1 x k−1 mod P

(3)

Step 3: If g(i) < P − 1, for i = 1, 2, …, n, go to step 4; otherwise, go to step 2. Step 4: Set TSCi (w, h) = g(i), for i = 1, 2, …, n, where TSCi denotes the temporary shadow. Go to the next secret pixel position. Step 5: Use a standard QR encoding software to encode TSCi to obtain SCi , for i = 1, 2, …, n. Step 6: Output n binary shadows SC1 , SC2 , …, SCn . Algorithm 2 The restoring method   Input: Any t binary shadows SCi1 , SCi2 , . . . , SCit {t ≥ k); the image size parameters W × H. Output: The restored grayscale secret image S  , with a size of W × H. Step 1: Scan and decode SCi j to obtain TSCij using a standard QR decoding software, for j = 1, 2, …, k. Step 2: For each position (w, h) ∈ {(w, h) | l ≤ w ≤ W, 1 < h < H}, repeat step 3. Step 3: Set g(ij ) = TSCi j i (w, h) for j = 1, 2, …, k. Solve the coefficients of g(x) in the field of P by Lagrange interpolation, and then let S(w, h) = g(0). Go to the next secret pixel position. Step 4: Output the restored grayscale secret image SC  with a size of W × H.

4 Performance Analysis Here, we present the performance analysis of the designed CSIS by theoretically analyzing the capacity and features.

Construction-Based Secret Image Sharing Table 1 Pixel capacity of some typical QR versions

617

QR version

Digit capacity

Pixel capacity

17 L

1548

516

27 L

3517

1172

40 L

7089

2363

Since each grayscale pixel value is represented by 3 digits, we know the pixel capacity according to digit capacity of each QR version. The pixel capacity of some typical QR versions is in Table 1. The proposed CSIS for (k, n)-threshold has the following features. 1. Because each output shadow is a valid QR code, each shadow looks like a QR code and is comprehensible rather than noise-like. 2. Since each output shadow is a valid QR code, the proposed scheme is robust to typical noises, whose robustness is close to the adopted QR code. 3. The shadow pixel value of 256 is screened in step 3, thus the temporary shadow has the same size as the original secret image and the restored grayscale secret image is lossless. 4. The polynomial-based SIS for (k, n)-threshold is adopted, the proposed scheme is a valid SIS construction for (k, n)-threshold.

5 Experiments and Comparisons In this section, we conduct experiments to prove the effectiveness of the proposed CSIS. Then, comparisons with related scheme are presented by means of illustrations.

5.1 Image Illustration Figure 3 shows the results of the proposed (k, n) threshold CSIS, where k = 2, n = 3, a QR version of 26 L is adopted and the input grayscale secret image with size of 32 × 32 is shown in Fig. 3a. Figure 3b–d present the output of three comprehensible shadows SC1 , SC2 , and SC3 , which look similar to QR codes, as well as their sizes. Figure 3e–h present the secret images restored with any two or three shadows, where  presents the secret image restored with the first two shadows. From Fig. 3e–h, the S12 secret images restored with any two or more shadows are lossless, i.e., Figure 3e–h are the same as the original secret image in Fig. 3a. Figure 4 shows the results of the proposed (k, n) threshold CSIS, k = 3, n = 4, a QR version of 40 L is adopted and the input grayscale secret image with size of 48 × 48 is shown in Fig. 4a. Figure 4b–e present the output of four comprehensible shadows SC1 , SC2 , SC3 and SC4 , which look similar to QR codes, as well as their

618

X. Yan et al.

Fig. 3 Experimental results of the proposed (k, n) threshold CSIS, where k = 2, n = 3 and a QR version of 26 L is adopted. a The grayscale secret image; b–d Three binary comprehensible shadows SC1 , SC2, and SC3 ; e–h the grayscale secret images restored with any two or three shadows

sizes. Figure 4f–h present the secret images restored with any two or three shadows, where only the first t-th shadows are used to save pages. From Fig. 4f–h, the secret images restored with any three or more shadows are lossless, i.e., Figure 4e–h are the same as the original secret image in Fig. 4a, while nothing of the secret image restored with any two shadows is recognized.

Construction-Based Secret Image Sharing

619

Fig. 4 Experimental results of the proposed (k, n) threshold CSIS, where k = 3, n = 4 and a QR version of 40 L is adopted. a The grayscale secret image; b–e four binary comprehensible shadows SC1 , SC2 , SC3, and SC4 ; f–h the grayscale secret images restored with the first two or more shadows

620

X. Yan et al.

5.2 Robustness Test To test the robustness of the proposed scheme, for shadows in Fig. 3b–d we use practical screen-to-camera images, where some typical noises occur simultaneously, such as rotation, resizing, pepper and salt and Gaussian noises, and JPEG compression. Figure 5 shows the robustness test results of the proposed (k, n) threshold CSIS based on the results of Fig. 3. Figure 5a–c present the three noisy shadows SC1 , SC2 , and SC3 , which are practical screen-to-camera images. Figure 5d, e present the secret images restored with the first two or three shadows. From Fig. 5d, e, the secret images restored with any two or more shadows are lossless, i.e., Fig. 5d, e are the same as the original secret image in Fig. 3a. According to the above experiments, we can conclude the followings: 1. The shadows with large pixel expansion are comprehensible. 2. No secret information is leaked with less than k shadows, which shows the security of our CSIS. 3. With any k or more shadows, the secret image is losslessly restored. 4. Our method is robust to typical noises. 5. A comprehensible robust CSIS algorithm for a general (k, n)-threshold is achieved, where n ≥ k ≥ 2.

Fig. 5 Robustness test of the proposed (k, n) threshold CSIS based on the results of Fig. 3. a– c Three noisy shadows SC1 , SC2 and SC3 ; d–e the grayscale secret images restored with the first two or three shadows

Construction-Based Secret Image Sharing

621

Fig. 6 Experimental example of the Zhou et al.’s method [27], where k = 2, n = 3. a The grayscale secret image; b–d three grayscale noise-like shadows SC1 , SC2 and SC3 ; e–f the grayscale secret images restored with the first two or three shadows

5.3 Comparisons with the Related Scheme We will compare our CSIS with the method of Zhou et al. [27], in which the same secret image as Fig. 3a and a (2, 3) threshold are used. The method of Zhou et al. [27] is selected for comparison because their SIS method is lossless and published more recently. Zhou et al. [27] proposed a SIS approach with lossless recovery. We utilize the same parameters as those in the Zhou et al.’s illustration to realize their results, as shown in Fig. 6, where k = 2, n = 3 and the grayscale secret image of size 32 × 32 is shown in Fig. 6a. Figure 6b–d are the three output shadows of size 32 × 32, which are noise-like. Figure 6e–f indicate the grayscale secret images of size 32 × 32 restored with the first two or three shadows using Lagrange interpolation, which are lossless. According to Figs. 6 and 3, comparisons between the proposed scheme and that of Zhou et al. [27] indicate the following. 1. In the splitting phase, the proposed scheme increases the screening operation in step 3 and the QR encoding operation in step 5. Therefore, in the splitting phase the proposed scheme has higher computational complexity. The screening operation is performed at a probability of n/P, which is low and acceptable. QR encoding operation is easily performed by a mobile phone. While Zhou et al.’s method needs no QR encoding operations. 2. In the restoring phase, the proposed scheme increases the QR decoding operation in step 1. Therefore, in the restoring phase the proposed scheme has higher computational complexity. The QR decoding operation is also easily performed by a mobile phone. 3. The proposed scheme is lossless, comprehensible, and robust to typical noises, while Zhou et al.’s method is noise-like and fragile to any noise because their restoring method is Lagrange interpolation.

622

X. Yan et al.

6 Conclusion In this paper, we have introduced a construction-based secret image sharing (C-SIS) algorithm for a (k, n)-threshold based on quick response (QR) code and the principle of polynomial-based SIS to achieve the features of robustness, lossless restoring, and shadow comprehensibility. The experimental results have proven the effectiveness of the proposed algorithm. The performance has been analyzed as well. We have performed experimental comparison with the related method to show the advantages of our scheme. In the future works, we will focus on the following aspects. First, we will improve our design to balance the image quality and security of the output QR code. Second, we will decrease the pixel expansion. Acknowledgements This work is supported by the National Natural Science Foundation of China (Grant Number: 61602491) and the Key Program of the National University of Defense Technology (Grant Number: ZK-17-02-07).

References 1. Wang, W., Liu, F., Guo, T., Ren, Y.: Temporal integration based visual cryptography scheme and its application. In: Digital Forensics and Watermarking: 16th International Workshop, IWDW 2017, Magdeburg, Germany, 406–419 (August 23–25 2017) 2. Cheng, Y., Fu, Z., Yu, B.: Improved visual secret sharing scheme for qr code applications. IEEE Trans. Inf. Forensics Secur. 13(9), 2393–2403 (2018) 3. Jia, X., Wang, D., Nie, D., Luo, X., Sun, J.Z.: A new threshold changeable secret sharing scheme based on the chinese remainder theorem. Inf. Sci. 473, 13–30 (2019) 4. Fuyou, M., Yan, X., Xingfu, W., Badawy, M.: Randomized component and its application to (t, m, n)-group oriented secret sharing. IEEE Trans. Inf. Forensics Secur. 10(5), 889–899 (2015) 5. Li, Y., Guo, L.: Robust image fingerprinting via distortion-resistant sparse coding. IEEE Signal Process. Lett. 25(1), 140–144 (2018) 6. Chavan, P.V., Atique, M., Malik, L.: Signature based authentication using contrast enhanced hierarchical visual cryptography. In: Electrical, Electronics and Computer Science, 1–5 (2014) 7. Luo, H., Lu, Z.M., Pan, J.S.: Multiple watermarking in visual cryptography. In: International Workshop on Digital Watermarking, 60–70 (2007) 8. El-Latif, A.A.A., Abd-El-Atty, B., Hossain, M.S., Rahman, M.A., Alamri, A., Gupta, B.B.: Efficient quantum information hiding for remote medical image sharing. IEEE Access (2018) 9. Yan, X., Lu, Y., Liu, L., Wan, S., Ding, W., Liu, H.: Exploiting the homomorphic property of visual cryptography. Int. J. Digit. Crime Forensics (IJDCF) 9(2), 45–56 (2017) 10. Fukumitsu, M., Hasegawa, S., Iwazaki, J., Sakai, M., Takahashi, D.: A proposal of a secure p2p-type storage scheme by using the secret sharing and the blockchain. In: 2017 IEEE 31st International Conference on Advanced Information Networking and Applications (AINA), 803–810 (March 2017) 11. Zou, S., Liang, Y., Lai, L., Shamai, S.: An Information Theoretic Approach to Secret Sharing. Arxiv preprint (2014) 12. Komargodski, I., Naor, M., Yogev, E.: Secret-sharing for NP. J. Cryptol. 30(2), 444–469 (2017) 13. Stinson, D.R.: An explication of secret sharing schemes. Des. Codes Crypt. 2(4), 357–390 (1992)

Construction-Based Secret Image Sharing

623

14. Naor, M., Shamir, A.: Visual cryptography. In: Advances in Cryptology EUROCRYPT’94 Lecture Notes in Computer Science, Workshop on the Theory and Application of Cryptographic Techniques, May 9–12, Perugia, Italy, Springer, Springer (1995) 1–12 15. Wang, G., Liu, F., Yan, W.Q.: Basic visual cryptography using braille. Int. J. Digit. Crime Forensics 8(3), 85–93 (2016) 16. Shamir, A.: How to share a secret. Commun. ACM 22(11), 612–613 (1979) 17. Weir, J., Yan, W.: A comprehensive study of visual cryptography. Trans. DHMS V, LNCS 6010. Springer, Berlin, 70–105 (2010) 18. Wang, Z., Arce, G.R., Di Crescenzo, G.: Halftone visual cryptography via error discussion. IEEE Trans. Inf. Forensics Secur. 4(3), 383–396 (2009) 19. Fu, Z.x., Yu, B.: Visual cryptography and random grids schemes. In: Digital Forensics and Watermarking. Springer, Auckland, New Zealand, 109–122 (2014) 20. Guo, T., Liu, F., Wu, C.: Threshold visual secret sharing by random grids with improved contrast. J. Syst. Softw. 86(8), 2094–2109 (2013) 21. Yan, X., Liu, X., Yang, C.N.: An enhanced threshold visual secret sharing based on random grids. J. Real-Time Image Proc. 14(1), 61–73 (2018) 22. Yan, X., Lu, Y.: Progressive visual secret sharing for general access structure with multiple decryptions. Multimed. Tools Appl. 77(2), 2653–2672 (2018) 23. Thien, C.C., Lin, J.C.: Secret image sharing. Comput. Graph. 26(5), 765–770 (2002) 24. Yang, C.N., Ciou, C.B.: Image secret sharing method with two-decoding-options: lossless recovery and previewing capability. Image Vis. Comput. 28(12), 1600–1610 (2010) 25. Li, P., Liu, Z., Yang, C.N.: A construction method of (t, k, n)-essential secret image sharing scheme. Sig. Process. Image Commun. 65, 210–220 (2018) 26. Liu, Y., Yang, C., Wang, Y., Zhu, L., Ji, W.: Cheating identifiable secret sharing scheme using symmetric bivariate polynomial. Inf. Sci. 453, 21–29 (2018) 27. Zhou, X., Lu, Y., Yan, X., Wang, Y., Liu, L.: Lossless and efficient polynomial-based secret image sharing with reduced shadow size. Symmetry 10(7) (2018) 28. Li, S., Zhang, X.: Toward construction-based data hiding: from secrets to fingerprint images. IEEE Trans. Image Process. 28(3), 1482–1497 (2019) 29. Denso, W.: qrcode. http://www.qrcode.com 30. Saito, K., Morii, M.: Efficient decoding of qr code using error correcting capability: decoding method using erasure error correction and the ability. Techn. Rep. IEICE ISEC 111, 79–84 (2011) 31. Wan, S., Lu, Y., Yan, X., Wang, Y., Chang, C.: Visual secret sharing scheme for (k, n) threshold based on qr code with multiple decryptions. J. Real-Time Image Process. 9, 1–16 (2017)

A Novel AES Random Mask Scheme Against Correlation Power Analysis Ge Jiao, Lang Li, and Yi Zou

Abstract With the wide application of smart card, people’s demand for the security of smart card is increasing. The Advanced Encryption Standard (AES) algorithm in smart card itself is safe enough, but the encryption algorithm is still threatened by side-channel attacks due to time, power consumption, electromagnetic radiation, and other information leakage during operation. Aiming at the shortcomings of existing mask schemes in security, a smart card AES encryption NARMS mask against sidechannel attack is proposed. This scheme calculates the random mask according to the random hamming weight value and random integer, selects three rounds of random selection and NARMS random mask strategy for protection in the first, second, and ninth rounds of AES algorithm, optimizes and improves the design of the random mask and the overall process of mask protection. The mask scheme designed in this paper is comprehensively compared with ordinary AES algorithm, fixed value mask scheme and rotating S-box masking scheme (RSM). Experiments show that this scheme can effectively resist the first- and second-order correlation power analysis (CPA) attacks and has high efficiency, thus ensuring the key security of AES algorithm and privacy security of smart card application. Keywords Random mask · Advanced encryption standard · Correlation power analysis · Hamming weight

G. Jiao · L. Li · Y. Zou College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China G. Jiao (B) Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_61

625

626

G. Jiao et al.

1 Introduction With the widespread use of smart cards, people are increasingly demanding the security of smart cards. The AES encryption algorithm used in the smart card has the characteristics of high security, simple implementation, and optional key length. Under the current computing power, the probability of trying to crack the key by brute-force attack is almost zero. It can resist traditional mathematical methods such as differential cryptanalysis [1] and algebraic analysis. Even if the cryptographic algorithm itself is sufficiently secure, the smart card is still threatened by side-channel attack. Any encryption device will have different forms of information leakage during operation, such as time, power consumption, sound, and electromagnetic radiation. Side-channel attacks use this information and attack the smart card encryption module based on the principle of statistical analysis. As the most representative method of algorithm layer protection, the core idea of mask technology is to add random mask value [2]. Random mask technology was first proposed by Paul Kocher et al. In 2012, Nassar et al. proposed a rotating S-box masking algorithm for AES, which can effectively resist variance-based power attack and second-order zero-offset CPA, but the method still has a first-order leakage [3]. In 2017, Yu et al. proposed a lightweight AES mask implementation for securing IoT against CPA attacks [4]. In 2018, Jiao G. et al. proposed an improved mask defense algorithm, which has comprehensively considered security and resource overhead, is a kind of high security and easy to implement masking defense algorithm, and can resist first-order and second-order CPA attacks [5].

2 A Novel AES Random Mask Scheme: NARMS Since the mask is implemented at the algorithm layer and has the advantage of crossplatform porting, it has been widely used. At the same time, because the addition of mask also increases the software and hardware implementation cost of the algorithm, how to obtain an efficient masking scheme is an urgent problem to be solved.

2.1 Mask Generation Algorithm We take the AES algorithm with a key length of 128 bits as an example. The mask sequence M = {M0 , M1 , . . . , M15 } contains 16 mask bytes M i , i ∈ [0, 15], each mask word. The section consists of 8 bits, Mi = m 0 , m 1 , . . . , m j , j ∈ [0, 7]. In the design of the random mask generation, the hamming weight is a random seed. For each 8-bit mask value, the possible hamming weight ranges from [0, 8].

A Novel AES Random Mask Scheme Against Correlation Power …

627

The steps for generating a random mask are as follows: (1) Using [0, 8] as the seed, randomly generate a hamming weight value HWi , HWi ∈ [0, 8], i ∈ [0, 15]; (2) Randomly generate 1 integer V i , V i ∈ [0, 255], i ∈ [0, 15], Vi = v0 , v1 , . . . , v j , j ∈ [0,7]; (3) Calculate the hamming weight value of V i , expressed by HW(V i ), t = HW(V i ) − HWi , t represents the difference between the hamming weight value of V i and HWi , t ∈ [0, 8]; (4) If t = 0, M i = V i ; if t > 0, look up from v(t+1)mod 8 , if vtmod 8 = 1, then vtmod 8 = 0, otherwise continue from v(t+1)mod 8 after the search, until HW(V i ) = HWi , Mi = V i ; if t < 0, then look up from v|t|mod 8 , if v|t|mod 8 = 0, make v|t|mod 8 = 1 Otherwise, continue searching from V (|t|+1)mod 8 until HW(V i ) = HWi , M i = V i ; (5) Repeat Steps (1–4) to ensure that the number of bits 1 in the mask matches the weight of the byte and generate 16 mask bytes M. The flowchart of random mask generation is shown in Fig. 1.

2.2 Random Mask Implementation We set hamming weight as random seed, and the specific implementation process of random mask generation is as follows: First randomly generate 16 hamming weight value and an integer, respectively, to HWi = {3, 6, 2, 1, 5, 8, 4, 7, 3, 2, 5, 1, 7, 2, 4, 8}, V i = {56, 101, 34, 220, 127, 79, 160, 71, 235, 178, 123, 87, 12, 43, 194, 64}, HW(V i ) = {3, 4, 2, 5, 7, 5, 2, 4, 6, 4, 6, 5, 2, 4, 3, 1}, t = HW(V i ) − HWi = {0, − 2, 0, 4, 2, −3, −2, −3, 3, 2, 1, 4, −5, 2, −1, −7}; Then we get a random mask M = {38H, 7DH, 12H, 08H, 73H, FFH, ACH, 7FH, 83H, 82H, 79H, 04H, EFH, 03H, C6H, FFH}. For example, HW0 = 3, V 0 = 00111000B, t = HW(V 0 ) − HW0 = 0, M 0 = V 0 = 38H; HW1 = 6, V 1 = 01100101B, t = HW(V 0 ) − HW0 = −2, starting from v|−2|mod 8 for comparison, if v2 = 1, continue to look forward, since v3 = 0, make v3 = 1, similarly v4 = 0, make v4 = 1, until HW(V 1 ) = HW1 , M 1 = V 1 = 01111101B = 7DH; HW3 = 1, V 3 = 11011100B, t = HW(V 3 ) − HW3 = 4, starting from v4mod 8 for comparison, since v4 = 1, make v4 = 0, similarly v6 = 1, v7 = 1, v2 = 1, make v6 = 0, v7 = 0, v2 = 0, until HW(V 3 ) = HW3 , M 3 = V 3 = 00001000B = 08H.

2.3 Mask Addition and Compensation The SubBytes in AES is an important part of ensuring the security of block ciphers. During the byte replacement operation, the original S-box must be replaced; the new S-box is recalculated according to the mask, the mask added in the previous round

628

G. Jiao et al.

Fig. 1 Procedure of random mask generation

key XOR operation is removed, and then a new mask is added. The specific steps are as follows: (1) According to the method of Sect. 2.2, 16 random mask constants M 0–15 are generated. These constants are used as mask seeds. The mask required for each round of encryption process is transformed by 16 constants MR0 = {M0 , M1 , . . . , M15 }. (2) For each round of byte replacement operations, 16 new S-boxes need to be recalculated  based on the sub-key and mask values, and they are recorded as: Snew_i state = S(MRki ⊕ state ) ⊕ MR(ki+1) mod 16 i ∈ [0, 15]. where state’ represents the status byte to which the mask is added, and k i randomly generates an offset indicating the S-box.

A Novel AES Random Mask Scheme Against Correlation Power …

629

(3) Each round of encryption operation needs to use a different random mask, as  follows: MRi = Mi mod 16 , M(i+1) mod 16 , . . . , M(i+15) mod 16 , i ∈ [0, 15]. The 16 sub-masks in the 16 random masks MR0–15 can be mapped one by one according to the S-box offset k i . The 16 new S-boxes satisfy the following relationship: SubBytenew_i (state ) = SubByte(MRki ⊕ state ) ⊕ MR(ki+1)mod 16 . For the i-round iteration, the value of state can be expressed as: state = state ⊕ MRki , SubByte(MRki ⊕ state ) eliminates the mask of the previous round by state ⊕ MRki , and adds the mask for the next round by MR(ki+1)mod 16 .

2.4 Mask Scheme The existing AES mask scheme mainly protects the first and last round of AES encryption, so it cannot resist the high order CPA attack. If all iterations of AES encryption are masked, the operation efficiency of the algorithm will be reduced. In order to improve the operation efficiency and security of the algorithm, three rounds of random selection and the last round of the first and second rounds of AES algorithm are protected by hamming random weight mask strategy. In this way, the overall mask protection scheme can guarantee the security of AES algorithm and reduce the protection cost to a certain extent.

3 Experimental Results and Analysis 3.1 CPA Analysis Correlation power analysis uses the calculation of the correlation coefficient between the actual energy consumption and the assumed energy consumption to crack the key. This paper takes AES cryptographic algorithm as the target for analysis. The flowchart of correlation power analysis is shown in Fig. 2. The CPA attack process is as follows: (1) Select the first round of key addition of AES algorithm as the intermediate value. A CPA attack on the registers at the output attacks only the first byte of the first round. (2) Calculate the corresponding hypothesis intermediate value for each possible key k. The possible key values are denoted by the vector k = (k 1…K ), K represents the number of all possible values of K and is denoted as d = (d 1…N ), N is the number of encryption times, and a matrix V (N, K) of size N × K is calculated. (3) Power consumption model is selected, and intermediate value V is mapped to energy consumption value matrix H(N, K).

630

G. Jiao et al.

Fig. 2 Correlation power analysis process

(4) The actual power consumption T (N, M) when using oscilloscope to collect cryptography chip and run AES encryption algorithm. t = (t 1,1… t 1,M ), M represents the number of power points, and N represents the number of power trajectories. (5) Calculate the correlation coefficient between the assumed power consumption matrix H(N, K) and the actual power consumption matrix T (N, M). Formula (1) is as follows:

A Novel AES Random Mask Scheme Against Correlation Power …

⎧ ⎨r

631

N

i, j

= √ N

(h d,i −h i )×(td, j −t j ) N (h d,i −h i )2 × d=1 (td, j −t j )2

d=1

⎩ R = [r ] i, j 256×M , (i = 1, 2, . . . , 256; j = 1, 2, . . . , M) d=1

(1)

The correlation coefficient matrix R is calculated according to Formula (1). Each line in R represents a hypothetical key, traversing R to find the corresponding hypothetical key corresponding to the maximum correlation coefficient, as the correct key. The higher the correlation, the closer it is to correctly guess the key.

3.2 Comparison of Experimental Results The experiment takes information leakage of the first S-box output value of the first round of AES algorithm as an example to study. The STC89C52 MCU platform used in the experiment conforms to the hamming weight model. The unmasked AES algorithm, RSM algorithm, and the scheme proposed in the literature were selected for comparison with the NARMS scheme designed in this paper, and the first-order CPA and second-order CPA were used for attack, with the sample size ranging from 0 to 10,000 waveforms. The statistics of the security analysis results of the four AES algorithms are shown in Table 1. From the above analysis of test results, the unmasked AES algorithm can obtain all the keys with only 80 sample curves under the first-order CPA attack. Figure 3 is the second-order CPA attack analysis diagram of NARMS. It can be seen from the figure that in the 0–2000 sample range, all the keys do not show obvious peak value. Compared with ordinary AES algorithm, the NARMS scheme designed in this paper can effectively resist the first-order CPA attack. Compared with the security defects of fixed mask and RSM schemes, it can effectively resist the second-order CPA attack. Experiments show that the NARMS mask scheme has advantages in security and can effectively resist various power analysis attack methods, so as to ensure the key security of AES algorithm and privacy security of smart card application. In the sample interval of 0–10,000, the running efficiency of the four schemes was counted for several times and averaged. The running efficiency of algorithms is shown in Table 2. In terms of the operation efficiency of the algorithm, the time required by Table 1 Result of security analysis Mask scheme

First-order CPA

Second-order CPA

The average cost of a successful attack

AES without mask added

× √

×

80



× √

100





Fixed mask RSM NARMS

1000 –

632

G. Jiao et al.

Fig. 3 Second-order CPA attack analysis diagram of NARMS

Table 2 Efficiency of algorithms Sample size

AES (min)

RSM (min)

6 (min)

NARMS (min)

1000

2

42

44

2000

4

86

84

82

5000

8

210

181

175

16

421

362

331

10,000

40

the schemes of NARMS, RSM, and literature [6] for 1000–2000 encryption operations is very close, but much slower than that of the ordinary AES algorithm. This is because the generation of random masks, the recalculation of S-boxes, and the compensation process of masks will all result in reduced efficiency. When carrying out 5000 encryption operations, the time of NARMS scheme is reduced by 16.7% compared with that of RSM scheme and 3.3% compared with that of the literature [6]. When carrying out 10,000 encryption operations, the time of NARMS scheme is reduced by 21.4% compared with that of RSM scheme and 8.6% compared with that of the literature [6]. With the increase of encryption times, the efficiency of NARMS scheme is improved significantly, which reduces the protection cost to some extent.

4 Conclusion In this paper, a NARMS mask method is proposed to defend against the attack of correlation power. The mask scheme designed in this paper is systematically compared with ordinary AES algorithm, fixed value mask scheme, and RSM scheme. Experiments show that this scheme significantly improves the security of the algorithm and does not reduce the efficiency.

A Novel AES Random Mask Scheme Against Correlation Power …

633

Acknowledgements This work is supported by the Science and Technology Plan Project of Hunan Province [2016TP1020], the Application-oriented Special Disciplines, Double First-Class University Project of Hunan Province [Xianjiaotong[2018] 469], the Hunan Province Special Funds of Central Government for Guiding Local Science and Technology Development [2018CT5001], the Subject Group Construction Project of Hengyang Normal University [18XKQ02].

References 1. Mangard, S., Oswald, E., Popp, T.: Power Analysis Attacks: Revealing the Secrets of Smart Cards. Graz University of Technology, pp. 1–306. Springer, Austria (2007) 2. Li, L., Ou, Y., Zou, Y.: On AES random transform masking scheme against DPA. J. Cryptol. Res., 442–454 (2018) (In Chinese) 3. Nassar, M., Souissi, Y., Guilley, S., Danger, J.L.: RSM: A small and fast countermeasure for AES, secure against 1st and 2nd-order zero-offset SCAs. In: Design, Automation and Test in Europe Conference and Exhibition-DATE 2012, pp. 1173–1178. IEEE, Dresden (2012) 4. Yu, W., Köse, S.: A lightweight masked AES implementation for securing IoT against CPA attacks. In: IEEE Transactions on Circuits and Systems I: Regular Papers, pp. 2934–2944 (2017) 5. Jiao, G., Li, L., Zou, Y.: An optimized AES masking method for resisting side channel analysis. In: International Conference on Computer Engineering and Networks, pp. 876–884. Springer, Cham (2018) 6. Jiao, G., Li, L., Zou, Y.: Research on power attack comprehensive experiment platform based on SAKURA-G hardware circuit. In: Proceedings of the 2017 7th International Conference on Computer Engineering and Networks, pp. 343–349. Shanghai (2017)

Deployment Algorithm of Service Function Chain with Packet Loss Rate Optimization Yingjie Jiang, Xing Wang, Tao Zhao, Ying Wang, and Peng Yu

Abstract The development of network function virtualization (NFV) and softwaredefined network (SDN) has made the service function chain (SFC) a popular service paradigm. In the SDN/NFV environment, SFC is an ordered set of (VNFs) and network traffic can pass through a specific sequence of VNFs according to the business logic requirements. Flexible chaining and orchestration enable the service function chain to implement a variety of business logic. The service function chain defines a specific sequence of network function sets. In order to make it really work, we need to use SDN and NFV technology to deploy the SFC into a specific physical network. After the SFC is deployed to the physical network, the end-to-end packet loss rate is a key QoS indicator because many kinds of flows are sensitive to packet loss rate. In this paper, we present a mathematical model for the placement of VNFs which ensures the end-to-end packet loss rate as low as possible and we propose an algorithm based on ACS to solve this problem. Keywords SFC · Packet loss rate · ACS · MILP

1 Introduction By decoupling the software implementation of network functions from hardware, network function virtualization (NFV) [1] is revolutionizing the design and deployment of network services. Compared to traditional network functions that require dedicated hardware, the VNFs can be deployed on general hardware (such as x86 servers). This increases the flexibility and scalability of the network while also reducing the cost of the service providers. With the application of NFV, service function Y. Jiang (B) · Y. Wang · P. Yu State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] X. Wang · T. Zhao State Grid Liaoning Electric Power Co., Ltd. Jinzhou Power Supply Company, Jinzhou, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_62

635

636

Y. Jiang et al.

chain (SFC) [2] has become an important service paradigm for promoting network flexibility and improving cost efficiency. An SFC is a collection of VNFs that process traffic flowing through the SFC in a certain order. The continuous development of SDN architecture [3] and NFV technology provides technical support for the dynamic deployment of SFC. The SFC deployment problem is called VNF placement (VNF-p) problem and proved to be NP-hard. Different SFC placement methods have a great impact on the QoS performance of the service function chain, especially the end-to-end packet loss rate. Therefore, in this paper, we developed an ACS-based approach to reduce the end-toend packet loss rate after SFC deployment to the physical network while ensuring SFC end-to-end latency and bandwidth requirements. The main contributions of this paper are as follows: (1) We formalize the VNF-p problem as a MILP problem with packet loss rate optimization; (2) We propose an algorithm based on ant colony system (ACS) to solve the MILP problem, which can obtain the approximate optimal solution and has a low time complexity compared with CPLEX. The structure of this paper is organized as follows. In Sect. 2, the related work of VNF-P is analyzed. Section 3 describes the network model and mixed integer linear programming (MILP) formula. In Sect. 4, the VNF-P algorithm for ant colony system proposed by us is introduced in detail. The analysis and discussion are given in Sect. 5. Section 6 summarizes this paper.

2 Related Work In this section, we review some of the most relevant research works on virtualization and placement of network functions. The previous works [4–7] used the placement of virtual network functions as an extension of the virtual network embedding (VNE) problem. Chained VNFs can be modeled as graphs mapped to the underlying network, where each connection between VNFs can be mapped to a physical link, and multiple VNFs can be mapped to the same physical node. However, the VNF-p problem has different goals and constraints from the VNE problem [7]. One of the goals of the NFV architecture is to reduce operating costs (CapEx and OpEx [8]). Bari et al. [9] have the VNF orchestration problem equivalent to the VNF-P problem and model it as an integer linear programming (ILP) problem to minimize OPEX and maximize network utilization. In [10], based on Markov approximation technology, an algorithm to solve VNF-P problem is proposed to minimize the cost of energy sensing and traffic sensing. Pham et al. [10] model the problem as an ILP problem, define the operating cost and the flow cost separately, and use a linear combination of the two cost goals as the final optimization goal. Reducing CPU resource consumption can reduce OpEx, and the previous work [11– 13] put reducing CPU resource consumption as one of the optimization objectives

Deployment Algorithm of Service Function Chain with Packet Loss …

637

of VNF-p problem. Tajiki et al. [14] consider the VNF-p problem in the case of QoS awareness and energy consumption constraints. As can be seen from these existing works, current research on VNF-p issues has made many advances in reducing operational costs and traffic-aware placement. However, these solutions do not consider the end-to-end packet loss rate of SFC.

3 Mathematical Model and Problem Definition In this section, we describe the VNF placement problem and introduce our proposed mixed integer linear programming (MILP) model.

3.1 Physical Network We represent the physical network as an undirected graph G = (N, E), where N and E donate the set of servers and links, respectively. We use n iG to present each server belonging to N. Each server has its own processing capacity represented by CiG . In turn, each edge (i, j) ∈ E represents an undirected link. In a real environment, each physical link has its own attributes. We use L i,G j , Bi,Gj , and Di,Gj to represent the packet loss rate, bandwidth, and delay of link (i, j), respectively.

3.2 Virtual Network Functions and Service Function Chains We can provision different types of VNFs (e.g., firewall, load balancer, NAT, proxy, IDS, etc.). Set F is used to represent the above VNFs. After the location of each VNF belonging to a certain SFC is determined on the physical network, these VNFs can be instantiated on the required server. For each type of VNF, we use FmC to represent the processing capacity requirement of VNF m ∈ F. Set Q represents the service function chain requests. In our model, each service function chain request is composed of VNFs from F and represented by q. Each SFC request has a bandwidth represented by BqS . Furthermore, the tolerate end-to-end delay of one SFC request is represented by DqS .

638

Y. Jiang et al.

3.3 Binary Variables In order to represent the SFC placement results, we have defined some binary variables. If an SFC request is accepted, we can get the specific VNF placement location and link mapping information through these variables. N —Assignment of required network function of SFC request q. This variable Ai,q,m indicates whether an instance of VNF m which is required by SFC q is placed on server n iG . Ai,L j,q —This variable indicates whether physical link (i, j) is used to carry the traffic of SFC q. Based on the above discussion, we propose an mixed integer nonlinear programming (MNILP) model for the VNF placement problem. In our model, according to [15], the objective function (Objective1) is to minimize the end-to-end packet loss rate of a SFC request q. The objective function and constraints are set according to the previous variables. We will describe it in detail. Objective1: 

Min 1 −

  AL 1 − L i,G j i, j,q

(1)

(i, j)∈E,q∈Q

In order to simplify the discussion of the problem, we propose a concept of endto-end pass-through rate of a path. The end-to-end pass-through rate is defined as follows: 

  AL 1 − L i,G j i, j,q

(2)

(i, j)∈E,q∈Q

To minimize the end-to-end packet loss rate of an SFC request q is to maximize the end-to-end pass-through rate of an SFC request q. Because Objective1 contains an exponential function on decision variables, we need to convert it equivalently to Objective2 with the help of ln function to make the model an MILP instead of an MINLP. Objective2: 

Max

  Ai,L j,q · ln 1 − L i,G j

(3)

(i, j)∈E,q∈Q

Subject to: 

N Ai,q,m · FmC ≤ CiG ∀i ∈ N

(4)

q∈Q,m∈F

 i∈N

N Ai,q,m = 1 ∀q ∈ Q, ∀m ∈ F

(5)

Deployment Algorithm of Service Function Chain with Packet Loss …



Ai,L j,q · BqS ≤ Bi,Gj (i, j) ∈ E

639

(6)

q∈Q



Ai,L j,q · Di,Gj ≤ DqS ∀q ∈ Q

(7)

N Ai,q,m ≤ 1 ∀q ∈ Q, ∀m ∈ F

(8)

N Ai,q,m ≤ 1 ∀q ∈ Q, ∀i ∈ N

(9)

q∈Q

 i∈N



m∈F



Ai,L j,q ≤ 1 ∀q ∈ Q

(10)

(i, j)∈E

Constraint (4) ensures that the total processing capacity required by VNFs from F which are mapped to server i does not exceed the available processing capacity of server i. Constraint (5) ensures that each VNF in the SFC request q has to be instantiated and just instantiated once. Constraint (6) ensures that the bandwidth of link (i, j) can satisfy the bandwidth request of all SFC requests it carries. Constraint (7) ensures that the placement result satisfies the delay constraint of the SFC request. Constraint (8) ensures that for each SFC request q, the same type of VNF can only be selected at most once. Constraint (9) ensures that for each SFC request q, the same physical server can only be selected once. Constraint (10) ensures that the same physical link (i, j) can be selected at most once by the same SFC request.

4 Algorithm Based on ACS In this section, we will introduce our proposed SFC placement algorithm based on ACS in detail.

4.1 Ant Colony System Compared with the original ACO algorithms, the ACS has great improvements. The ACS was proposed by Dorigo and Gambardella initially for solving traveling salesman problem (TSP). Because of the similarity between the VNF placement problem and TSP, we can also apply ACS to VNF placement problems. In the ACS, the main three parts of the algorithm are state transmission rule, global updating rule, and local updating rule. Next, we will introduce these three parts, and then, we will give a detailed implementation of our algorithm.

640

Y. Jiang et al.

4.2 Sate Transmission and Updating Rules 4.2.1

State Transmission

The state transmission rule used by ant system is called a random-proportional rule and given by (11). This formula gives the probability with which ant k in server r chooses to move to server s.  [τ (r,s)]·[μ(r,s)]β  β if s ∈ Jk (r ) u∈Jk (r ) [τ (r,s)]·[μ(r,u)] (11) pk (r, s) = 0 otherwise In Formula (11), τ is the pheromone between physical server r and s. μ is defined by Formula (12) and represents the heuristic information between server r and s. Jk (r ) is the set of physical servers which remain to be chosen by ant k on server r. β is the weight of heuristic information. μ(r, s) =



G (1 − L k,l )

(12)

(k,l)∈Pr,s

where Pr,s is the shortest path between r and s. It is composed of several continuous physical links. When we use Dijkstra’s algorithm to get the path Pr,s , the packet loss rate of physical link is used as the distance metric. Obviously, μ is pass-through rate of path Pr,s . The above state transmission algorithm is adopted by the original ant colony algorithm. In ACS, the state transmission rule is called pseudorandom proportional rule and shown as follows: an ant positioned on server r chooses the next server s to deploy the next VNF by applying the rule given by (13)  s=



arg maxu∈Jk (r ) [τ (r, s)] · [μ(r, u)]β if q < q0 S otherwise

(13)

where q is a random number uniformly distributed in [0,1], q0 is a parameter (0 ≤ q0 ≤ 1), and S is a random variable selected according to the probability distribution given by (11).

4.2.2

Global Updating Rule

In our algorithm, only the ant which constructs the best placement solution (solution with minimum packet loss rate) can deposit pheromone. Global updating is performed after all ants have completed their tours. The pheromone level is updated by applying the global updating rule of (14). τ (r, s) = (1 − ρ) · τ (r, s) + ρ · τ (r, s)

(14)

Deployment Algorithm of Service Function Chain with Packet Loss …

641

where  τ (r, s) =

pheinit if (r, s) ∈ global_best_solution 0 otherwise

(15)

0 < ρ < 1 is the pheromone decay parameter. pheinit is the initial pheromone we set between two nodes. Equation (15) shows that only those links belonging to the globally best solution will be reinforced.

4.2.3

Local Updating Rule

While an ant is building a solution, it will change the pheromone of the link it visited by applying the following rules of (16) τ (r, s) = (1 − σ ) · τ (r, s) + σ · pheinit

(16)

where 0 < σ < 1 is a parameter.

4.2.4

Proposed Algorithm

Our algorithm is described in the following six steps. Step 1: Initialization. Set the initial pheromone pheinit . Set the number of ants m. Set the maximum number of iterations T. Set the number of ants m. Set the best solution set S b as an empty set. Step 2: Let m ants construct m solutions according to the construction rules. While all ants having finished constructing solutions, perform local pheromone updating rule on each solution. Step 3: Evaluate the path-through rate of the m solutions. Step 4: Find out the current best solution S C and add it to S b . Step 5: Perform global pheromone updating on S C . Step 6: Termination detection. If the maximum iteration number is reached, find out the final best solution from set S b and output the best solution and the algorithm ends. Otherwise, set t = t + 1, and move to step 2 for the next iteration.

5 Evaluation In this section, experimental tests are carried out to verify the performance of the SFC placement algorithm we proposed. We will show and discuss the results to demonstrate the effectiveness of our algorithm. The MILP model formalized in Sect. 3

642

Y. Jiang et al.

Table 1 VNF type and processing capacity requirement Type

VNF1

VNF2

VNF3

VNF4

VNF5

FmC

2

4

5

7

15

Fig. 1 Experimental topologies

was implemented in CPLEX. In turn, our placement algorithm based on ACS was implemented and run in Python3.

5.1 Experimental Environment In the experiment, five different types of VNFs were considered and their processing capacity requirement FmC is shown in Table 1. We choose the German backbone topology (Fig. 1a) and USNET (Fig. 1b) as our experimental topologies. We set the processing capacity of each node to 200. For each physical link, bandwidth is set to 100 Mbps, delay obeys a uniform distribution between 1 and 7 ms, and packet loss rate obeys a uniform distribution between 0.01 and 0.04. Each SFC contains four different VNFs which are randomly selected from Table 1. The bandwidth requirement of an SFC obeys a uniform distribution between 5 and 20 Mbps. Moreover, each SFC request has a maximum end-to-end delay obeys a uniform distribution between 30 and 50 ms.

5.2 Analysis of Algorithm Parameters Our algorithm contains some parameters that affect the performance of the algorithm. To find out the influences of parameters to the solution quality, we do several experiments by taking different values for the parameters. For each set of experiments, the number of maximum iterations and SFC requests are set to 1000 and 40, respectively. The initial pheromone pheinit is set to 10. The default values of other parameters we will investigate are shown in Table 2.

Deployment Algorithm of Service Function Chain with Packet Loss …

643

Table 2 Default value of parameters Parameter

m

q0

β

ρ

σ

Value

5

0.1

2

0.1

0.3

From the five pictures in Fig. 2, we can see the influence of different parameter settings on the experimental results. In order to get the best experimental results, we set the parameters as follows: m is 5; q0 is 0.9; β is 5; ρ is 0.1; σ is 0.3. From the above discussion, we can see that our algorithm is not very sensitive to parameters. This is also an advantage of our SFC placement algorithm.

Fig. 2 Influence of parameters

644

Y. Jiang et al.

5.3 Performance Comparison Between ACS and CPLEX In this subsection, we compare the performance of our ACS algorithm with the optimal solution. As have been discussed in the previous subsection, we set the parameters of the algorithm the optimal value: m is 5, q0 is 0.9, β is 5, ρ is 0.1 and σ is 0.9. Figure 3a, b shows the execution time of the two algorithms in German backbone topology and USNET, respectively. From the pictures, we can see that as the length of SFC and the scale of network increase, the execution time of CLEX increases sharply. Compared with the CPLEX, our solution based on ACS has a very low time complexity. Figure 4a, b depicts the average path-through rate of the two algorithms under German backbone topology and USNET, respectively. Firstly, for the two algorithms, the average pass-through rate decreases with the length of the deployed SFC. This is reasonable, since longer SFC needs more hops from source node to the destination node. Secondly, we can see that our ACS algorithm performs poorly than CPLEX but the difference between the two algorithms does not exceed 10%.

Fig. 3 Execution time of ACS and CPLEX

Fig. 4 Average path-through rate of ACS and CPLEX

Deployment Algorithm of Service Function Chain with Packet Loss …

645

6 Conclusion This paper formulated the SFC placement problem as a MILP model which aims to minimize the end-to-end packet loss rate of an SFC. Our model takes into consideration bandwidth constraint and delay constraint simultaneously. In order to solve this problem efficiently, we proposed a heuristic algorithm based on ACS. We run extensive tests to evaluate our algorithm. The results show that there is only a 10% gap between our algorithm based on ACS and the optimal solutions (generated by CPLEX) but our algorithm has low time complexity.

References 1. NFV. Available: https://portal.etsi.org/nfv/nfvwhitepaper.pdf 2. Service function chaining. Available: https://tools.ietf.org/html/draft-boucadair-sfcframework-02 3. Mckeown, N., et al.: OpenFlow: enabling innovation in campus networks. ACM SIGCOMM Comput. Commun. Rev. 38(2), 69–74 (2008) 4. Bouet, M., Leguay, J., Conan, V.: Cost-based placement of vDPI functions in NFV infrastructures. Network Softwarization IEEE (2015) 5. Bagaa, M., Taleb, T., Ksentini, A.: Service-aware network function placement for efficient traffic handling in carrier cloud. In: Wireless Communications and Networking Conference IEEE (2014) 6. Riggio, R., et al.: Scheduling wireless virtual networks functions. IEEE Trans. Netw. Serv. Manage. 13(2), 240–252 (2016) 7. Mehraghdam, S., Keller, M., Karl, H.: Specifying and placing chains of virtual network functions. In: IEEE 3rd International Conference on Cloud Networking (CloudNet) (2014) 8. Li, Y., Chen, M.: Software-defined network function virtualization: a survey. IEEE Access 3, 2542–2553 (2015) 9. Bari, M.F., et al.: On orchestrating virtual network functions in NFV. In: 11th International Conference on Network and Service Management (CNSM) (2015) 10. Pham, C., et al.: Traffic-aware and energy-efficient vNF placement for service chaining: joint sampling and matching approach. IEEE Trans. Serv. Comput. 1 (2017) 11. Luizelli, M.C., et al.: Piecing together the NFV provisioning puzzle: efficient placement and chaining of virtual network functions. In: IFIP/IEEE International Symposium on Integrated Network Management. IEEE (2015) 12. Addis, B., et al.: Virtual network functions placement and routing optimization. In: IEEE 4th International Conference on Cloud Networking (CloudNet). IEEE (2015) 13. Cheng, Y. L., Yang, L. X., Zhu, H. B.: Deployment of service function chain for NFV-enabled network with delay constraint. In: International Conference on Electronics Technology (ICET) (2018) 14. Tajiki, M.M. et al.: Joint energy efficient and QoS-aware path allocation and VNF placement for service function chaining. IEEE Trans. Netw. Serv. Manag. 6(1), (2017) 15. Miyamoto, A., Watanabe, K., Ikeda, K.: Packet loss rate estimation with active and passive measurements. In: Signal and Information Processing Association Summit and Conference IEEE (2012)

Security Count Query and Integrity Verification Based on Encrypted Genomic Data Jing Chen, Zhiping Chen, Linai Kuang, Xianyou Zhu, Sai Zou, Zhanwei Xuan, and Lei Wang

Abstract Biomedical research is increasingly dependent on a large number of genomic and clinical data, and in order to protect sensitive information from being exposed to multiple partners, these data are often encrypted before being outsourced to third-party cloud service providers with abundant storage and computing resources. However, these third parties will become potential targets to be violated. Hence, in this paper, a novel method is proposed for secure sharing and management of genomic and clinical data on an untruthful cloud server firstly, in which the Hamming codes and HashMap are adopted to ensure the privacy and integrity of biomedical data during counting queries. And then, the performance of our newly proposed method is evaluated on the basis of the existing single-nucleotide polymorphism (SNP) sequence database, and simulation results show that the new method has good encryption efficiency and realizability, and can guarantee the privacy and integrity of biomedical data effectively while being implemented in counting queries. Keywords Genomics · Data sharing · Cryptography · Privacy

1 Introduction Clinical medical practice plays a vital role in the healthcare field [1], and genomics research is becoming increasingly popular. Research on genomics also helps identify potential associations between disease and a gene. To this end, biomedical researchers Z. Chen · L. Kuang · L. Wang Changsha University, Changsha, China e-mail: [email protected] J. Chen · L. Kuang · Z. Xuan · L. Wang Xiangtan University, Xiangtan, China X. Zhu · S. Zou (B) Hengyang Normal University, Hengyang, China e-mail: [email protected] S. Zou Chongqing College of Electronic and Engineering, Chongqing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_63

647

648

Z. Chen et al.

have conducted large-scale investigations of patient clinical status and DNA sequence data, and analysis of most genetic data. Both are based on the National Institutes of Health Genome-Wide Association Study (GWAS). In order to improve the accuracy of research, it is necessary to aggregate data from different sources [2]. For this reason, various service systems for sharing and storing data have been established, such as the US genotype and phenotype database (dbGaP) [3, 4] and Wellcome Trust’s biobanking program in the UK [4]. Genomic data involve the privacy of the research subject. If the data are leaked, it may lead to many social and legal problems. For example, the health insurance company may know that the genetic information carrying the mutation of the specific cancer possibility may refuse to insure it. Based on the sensitivity of genetic data, multiple organizations sharing genetic data need to store and access genomic data through privacy protection methods. Today, there are security frameworks that manage clinical genomic data in a centralized database in a specific format [5–9], which proposes a method for secure sharing and storage of genomic data on a less-than-honest cloud server. First, the data owner sends the clinical information to a third-party organization for encryption and authentication, and the third-party organization sends the aggregated large amount of data to the cloud server for storage in a certain structure. The cloud server then performs a query on behalf of the investigator (e.g., the number of patient records with hypertensive patients and specific genomic variation characteristics) and returns the results of the query to the investigator. However, directly returning the results of the query to the researcher does not rule out that the attacker attacks the researcher and captures the encryption protocol. In order to realize scientific research under the condition of sharing medical data query without leaking the data subject identity, this paper proposes a method for processing the query result returned by the cloud server using a third-party agent. In this paper, our goal is to design a secure counting framework based on outsourcing genomic data queries to determine the number of records in the database that match the query criteria. The framework we propose uses a secure encryption mechanism to process and store data, and a third-party agent to perform a security assessment of each stored record of the query.

2 System Architecture Figure 1 presents a general architecture of our proposed framework. As depicted in the figure, it incorporates five main participants: data providers, certified institution (CI), cloud server (CS), agency and scientists. Each participant is responsible for performing different specific tasks, ensuring that the entire system is secure and functional. The information flow in this framework consists of two phases: the data integration phase and the query processing phase. During the data integration phase, CI authority encrypts patient records receiving from the data providers and sends encrypted data

Security Count Query and Integrity Verification Based …

649

Fig. 1 Architecture of network model

to CS. In the query processing phase, the agency encrypts the query of the scientists’ research personnel and sends them to the CS to execute the query. Data providers consist of many organizations who agreed to share the genomic data they possess. They might be hospital, academic research institution or government research institution or health departments such as the main contributors of data samples to dbGaP [3]. These organizations process the patient’s genomic data in a prescribed format and send it to the CI in cleartext. Our goal is that both CI and CS cannot learn anything about the query provided by scientists and CS learns nothing about the sharing data. As a trusted entity, CI performs the same validation as the NIH Data Access Committee (DAC), which is responsible for the generation and encryption of hash tables and verifies the identity of individuals and organizations that request access to data. We assume that CS is semi-honest, which itself complies with the agreement correctly and does not intend to maliciously produce erroneous results. Unlike CI, CS stores a large amount of sensitive data and performs query processing. When CS is captured, an attacker can obtain a large amount of data and might forge a query result or provide an incomplete query result to scientists. Once CS is attacked, its hazard will greatly exceed the risk of capturing CI captured. Therefore, this article focuses on the situation in which CS is attacked.

650

Z. Chen et al.

3 Methods 3.1 Count Query Given a database D and a query Q, D = {S1 , S2 , . . . , Sn } represents the SNP sequence of n patients. The count query can be defined as the number of patients looking up for multiple query conditions q that satisfy Q in D. Assuming that the gene sequence of m sites of a patient is represented as S = {d1 , d2 , . . . , dm }, where di (1 ≤ i ≤ m) represents the SNP value of the ith site of the patient, the total number of count queries can be expressed as: {∀i, di ∈ D|di satiss f iesq}. If the data are stored as plaintext, count query is a simple operation. Traditional database management systems (DBMSs) support the operation of executing count query, but are not designed to execute the query on encrypted data. Then, how does the database respond to the count query for the encrypted value without decrypting the data, which is used to execute the query for the number of records under the user-specified condition without decryption.

3.2 Data Encryption In order to achieve the simplicity and flexibility of the architecture, our paper uses the Paillier cryptosystem encryption algorithm. Paillier cryptosystem is a member of homomorphic cryptosystem family. It is semantically secure, ensuring that opponents with finite computational power and possessing ciphertext cannot obtain plaintext information. Paillier cryptosystem is a probabilistic asymmetric algorithm for public key cryptography that generates a different ciphertext when the same message is encrypted multiple times. A pair of keys is generated in the Paillier encryption algorithm: One is the public key pk, and the other is the private key sk. The public and private keys are used for encryption and decryption of data, respectively. The Paillier cryptosystem can be defined as follows: Key generation phase: Choose two large prime numbers p and q randomly and independently of each other such that gcd( pq, ( p − 1)(q − 1)) = 1. Calculate η = pq and λ = lcm( p − 1, q − 1), and choose a random integer g such that g ∈ Z η∗2 . The division order of n is determined by performing a module −1   mod η, where L is multiplication inverse operation on g: μ = L g λ mod η2 x−1 defined as L(x) = η . Thus, the public key (η, g) and the private key (λ, μ) can be obtained. Encryption phase: For the message ω(0 ≤ m < η) to be encrypted, select the random number γ (0 < γ < η) to calculate the ciphertext c: c = g ω · γ η mod η2 . Decryption phase: c ∈ Z η∗2 is satisfied for the ciphertext c that needs to be   decrypted, and the plaintext after decryption is expressed as: ω = L cλ mod η2 · μ mod η.

Security Count Query and Integrity Verification Based …

651

Homomorphic properties: Assuming that there are two data ω1 and ω2 , the product of its ciphertext is decrypted to be the sum of their corresponding plaintext:   E sk E pk (ω1 ) · E pk (ω2 ) mod η2 = ω1 + ω2 mod η. Add one plaintext to another plaintext and  index ωvalue,  after decryption 2 2 E = ω1 ω2 mod η, mod η it is the product of two plaintexts: E (ω ) sk pk 1  E sk E pk (ω2 )ω1 mod η2 = ω1 ω2 mod η.   Suppose there are n patients in the database, Data = S 1 , S 2 , . . . , S n represents the gene sequence dataset in the database. The genomic data  of the sequence of j j j j the jth patient can be expressed as S = d1 , d2 , . . . , dm , where 1 ≤ j ≤ n. j

Each genomic data di (1 ≤ i ≤ m) in the encryption process is represented by the j j Hamming addition bit as Bi . The Bi encryption can be expressed  code   detection  j

as E pk Bi

j

j

j

= E pk ti |di , where “|” indicates that the detection bit ti is added j

to the  base  pairdi . The  ciphertext  for each data encryption is expressed as: j j j j j j E pk t1 |d1 , E pk t2 |d2 , . . . , E pk tm |dm .

4 Experimental Analysis In our safety count query experiment, we used four different query sizes with 500, 1000 and 5000 SNP datasets and 10, 20, 30 and 40 randomly selected SNP sequences. Our article tested the impact of different record counts on the HashMap built time. This experiment analyzes from the following three aspects: HashMap generation time: It refers to the time required to process a genomic database and construct a hash table using genotypes and phenotypes. We analyzed the creation time of dataset with 500 and 1000 SNPs, as shown in Fig. 2. Experiments have shown that as the number of SNPs increases, the amount of time required to consume increases. Encryption time: The encryption time for data in our method is mainly consumed by encrypting the geno and count value of each entity, as shown in Fig. 3. The CTR scheme used in our paper encrypts the Bloom filter and does not need a long time [6], which is negligible. Second, the time of encryption also depends on the total number of sequences in the SNP dataset. As the number of SNPs increases, the encryption time consumed increases, and our method has a clear advantage over index tree in terms of encryption time. For example, for 1000 records, we only need 2.11 min. Since it needs to encrypt sensitive information after traversing each node of the index tree, it takes a relatively long time. Query execution time: The query time is the time from the researcher provides a query request to the return result. To calculate the query time, we randomly selected 10, 20, 30 and 40 SNP sequences to perform a query on 5000 records. Figure 4 shows the execution time of these query sizes on the encrypted hash table. Because we need

652

Z. Chen et al.

Fig. 2 Generation time

Fig. 3 Encryption time

to search and match the phenotype information in the entity in the table, we need to traverse the query of all the entities in it to obtain the gene sequence that satisfies the query conditions. As the number of queries increases, our query execution time increases linearly, and the time is in seconds.

Security Count Query and Integrity Verification Based …

653

Fig. 4 Execution time for count queries

5 Conclusion Based on the analysis of existing schemes, this paper proposes a safe and effective method of genomic data outsourcing, which is used to encrypt the security counting query of genomic data. In order to achieve data privacy, the method stores data in a special data structure and outsources the stored data to a third-party cloud server. Through the use of third-party agency, investigators have implemented security counting queries on the cloud server. In order to verify the integrity of the data, our paper proposes to use Hamming code technology to add parity bits to the genomic data to ensure that no sensitive genetic data could be displayed during the data processing and query execution phase. Although our paper proposes a secure framework, it does not solve the problem of data processing after extracting privacy infringement from the query results. This can be handled by adding the third authorized institution, and we intend to address this issue in the future work. Acknowledgements This work is supported by the National Natural Science Foundation of China (61873221, 61672447), the Natural Science Foundation of Hunan Province (2018JJ4058, 2017JJ5036, 2019JJ70010), the CERNET Next Generation Internet Technology Innovation Project (NGII20160305, NGII20170109), the National Scientific Research Foundation of Hunan Province Education Committee (17C0224, 18B367), the Science Plan Project of Chongqing College of Electronic Engineering (XJPT201707), 5 batches of excellent talents in university plan of Chongqing (2017.29), College Innovation Research Groups of Chongqing Education Commission (2019.9.38), the National Scientific Foundation of Chongqing City (cstc2019jcyj-msxm2570), the National Scientific Research Foundation of Chongqing Education Commission (KJQN201803110, KJZD-K201903101).

654

Z. Chen et al.

References 1. Voges, J., Ostermann, J., Hernaez, M.: CALQ: compression of quality values of aligned sequencing data. Bioinformatics 34(10), 16–50 (2018) 2. Spence, O., et al.: Patient consent to publication and data sharing in industry and NIH-funded clinical trials. Trials 19(269), 1–5 (2018) 3. Mailman, M., Uba, R.O., Shin, S., Doshi, P.: The NCBI dbGaP database of genotypes and phenotypes. Nat. Genet. 39(10), 1181–1186 (2007) 4. Peakman, T., Elliott, P.: The UK biobank sample handling and storage validation studies. Int. J. Epidemiol. 37(1), 2–6 (2008) 5. Hadjadj, L., Jiyipong, T., Bittar, F., Morand, S., Rolain, J.M.: First draft genome sequences of two bartonella tribocorum strains from laos and cambodia. Genome Announc. 6(2), e01435-17 (2018) 6. Kantarcioglu, M., Jiang, W., Liu, Y., Malin, B.: A cryptographic approach to securely share and query genomic sequences. IEEE Trans. Inf Technol. Biomed. 12(5), 606–617 (2008) 7. Jha, S., Kruger, L.: Towards practical privacy for genomic computation. In: IEEE Symposium on Security and Privacy, pp. 216–230 (2008) 8. Wang, R., Wang, X.F., Li, Z., Tang, H.X., Reiter, M.K., Dong, Z.: Privacy-preserving genomic computation through program specialization. In: 16th ACM Conference Proceedings of the on Computer and Communications Security, pp. 338–347 (2009) 9. Troncoso-Pastoriza, J.R., Katzenbeisser, S., Celik, M.: Celik privacy preserving error resilient DNA searching through oblivious automata. In: 14th ACM Conference Proceedings on Computer and Communications Security, pp. 519–528 (2007)

Homological Fault Attack on AES Block Cipher and Its Countermeasures Ning Shang, Jinpeng Zhang, Yaoling Ding, Caisen Chen, and An Wang

Abstract As the physical security of hardware systems becomes more and more serious, a large number of physical attacks and countermeasures against on-chip cryptographic algorithms are proposed. Clock glitch injection is an easy-to-implement and effective fault type. This paper presents a novel clock glitch-based fault attack on hardware-implemented encryption algorithm called homological fault attack (HFA). It allows us to attack with coarse-grained clock glitches and can extract the key only by the plaintext and whether the encryption result is correct. At the same time, this paper carries out HFA experiment on AES-128 encryption algorithm implemented on FPGA in the real physical environment. Experimental results show that HFA can be used for serial and parallel implementation of AES hardware implementation. And this method can be easily extended to attack other block encryption algorithms. Keywords Homological fault attack · Clock glitch · Hardware security

1 Introduction With the development of the Internet of things, embedded devices have been widely used in industrial control, infrastructure and other scenarios. The security issue of embedded devices is also a problem that needs to be considered in the long run. Encryption algorithms implemented in embedded systems are vulnerable to a variety of physical attacks, such as side channels and fault injection attacks. The discovery of security vulnerabilities and increased protection measures require constant exploration. N. Shang · J. Zhang · Y. Ding · A. Wang (B) School of Computer Science, Beijing Institute of Technology, Beijing, China e-mail: [email protected] C. Chen Military Exercise and Training Center, Army Academy of Armored Forces, Beijing, China A. Wang State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_64

655

656

N. Shang et al.

A fault clock generator integrated into the FPGA was proposed to evaluate the fault injection attack and its countermeasures to the cryptographic module [1]. Power variance analysis was revealing the danger of using the same mask on several instances of an algorithm [2]. After the first fault sensitivity analysis was proposed [3], more and more fault attacks relying on clock sensitivity were proposed [4–9]. A clockwise collision attack called fault rate analysis on masked AES appeared next [10]. An attack against substitution permutation networks that did not need to know the exact password input and output values was proposed [11, 12]. A new DFA technique appeared that used the inherent bias of the error rate between different signals as the basis for critical discriminator design [13]. The transient-steady effect means that the output of the combinational circuit will remain for a period of time. The process from transient-steady state changes to the correct value can be used to extract the key [14]. A novel framework called SAFARI was proposed for automatically synthesizing fault attack-resistant implementations of block ciphers [15]. In this paper, we propose a new attack method homological fault attack (HFA) based on clock glitch injection. Compared to previous methods of clock fault injection, HFA has the following advantages: • The demand for the frequency of the clock glitch is not harsh. At the same time, high-precision clock signal generator is not required for fault injection. • The attack location is flexible, and both the first round and the last round can be the attack point. At the same time, it can be applied to the AES algorithm of serial implementation of S-box and parallel implementation of S-box. • HFA also has a strong migration capability and can complete attacks on other block ciphers with a small amount of adjustment. The rest of this article is organized as follows. Section 2 introduces some of the techniques related to this paper. Section 3 introduces HFA in detail, mainly including how to find a suitable clock glitch injection frequency band and how to use the fault extracting the secret key. Section 4 shows the experiment on FPGA. Section 5 is a conclusion.

2 Preliminary In this subsection, we will introduce related work of our work from two aspects: fault sensitivity analysis and fault rate analysis.

2.1 Fault Sensitivity Analysis Fault sensitivity analysis has been massively researched. Li et al. [3] proposed a fault-based attack named fault sensitivity analysis, which needs lower attack requirements than other attack methods for a different fault analysis. This attack utilized the

Homological Fault Attack on AES Block Cipher …

657

dependency between the sensitivity data and the critical conditions. They defined the critical conditions as faulty outputs beginning to exhibit detectable characteristics. The proposed FSA attack could retrieve 3 out of 16 key bytes with 12,000 plaintexts. In the literature [4], researchers proposed clockwise collision analysis, an effective attack technique, to achieve the goal that used little computation. This work focused on the condition when inputs for two consecutive clocks collide. They used active and passive work to demonstrate their attack concept and attack approach. In 2012, an extension of fault sensitivity analysis based on clockwise collision has been proposed [7]. Researcher used clock-glitch-based fault injections and unprotected AES implementation to process and verify the concept of CC-FSA. Based on the clock-glitch-based fault injections, researchers showed a successful key recovery using CC-FSA in which only 1 fault injection is performed for each plaintext. And the results showed that CC-FSA is a low-cost solution to identify the final secret bits for the model-less FSA attacks. Li et al. [8] focused on the information leakage that comes from the non-uniform distribution of the fault calculation for hardware. The fact, probability of the emergence of a particular faulty value is much higher than other values for the widely used composite field-based AES S-box, has been explained and demonstrated in their work. Their result showed the NU-FVA can recover the key in a remote fault injection scenario, where no trigger or no input control is available.

2.2 Fault Rate Analysis In 2013, Wang et al. [10] presented a clockwise collision attack on masked AES, which was call as fault rate analysis (FRA). They analyzed the critical and non-critical paths of the S-box, and they found that the path relating to the output mask is much shorter than those relating to the other two inputs (input value and input task). They demonstrated that their attacks are applicable to most hardware implementations of many block ciphers. Ren et al. [14] proposed an attack method which does not need a large amount of encryptions to build a statistical model. Attackers can obtain the information of key from faulty outputs by injecting a clock glitch to capture the temporal value caused by transient-steady effect. They conducted both unmasked S-box and masked S-box. Their results showed that TSE attack could recover a key byte of the unmasked Sboxes with 1 encryption and recover a key byte of the masked S-box with less than 20 encryptions.

2.3 Definitions and Notations Definition 1 Positive Stage Operation. The operations performed in a clock cycle when the cryptographic algorithm is running are called a stage operation. And a

658

N. Shang et al.

Table 1 Notation description Notation

Description

λ, m

Block size and word size

k

Secret key of the encryption algorithm

ki

The ith key part with word size m. i = 1, . . . , λ/m

p

Plaintext of the encryption algorithm

pi

The ith plaintext part with word size m. i = 1, . . . , λ/m

S (·)

The function in encryption algorithm that has unique data dependency

S f (·)

Function S (·) that is injected fault.

U

The set of all input of S (·)

CU L

  The invariant set of input x. L = x|S f (x) = S (x)   The non-invariant set of input x. CU L = x|S f (x) = S (x)

Pi

The set of ith plaintext part value that satisfied Pi = { pi | pi ⊕ ki ∈ L}

L

positive stage operation should be an invariable mapping function. It means the same inputs will always result in the same outputs. Definition 2 Negative Stage Operation. Negative operation refers to the operation that the same input will not always lead to the same output. For example, a random number is introduced to perform an operation. Definition 3 Data Dependency. The same fault injection on the same stage operation leads to different fault characteristics caused by the difference of the stage operation input. This type of stage operation has data dependency for this kind of fault injection. Definition 4 Unique Data Dependency. If for a kind of fault injection the stage operation has data dependency and only the data dependency can cause the different fault characteristics, we called this data dependency as unique. Obviously, it is only possible to satisfy the unique data dependency if the stage operation is positive. In other words, the positive stage operation is a prerequisite for unique data dependency. The notations used in this paper are described in Table 1.

3 Homological Fault Attack This section provides details about the proposed homological fault analysis methodology. We use AES-128 as an example encryption algorithm to show how HFA works, but it should be emphasized that other kinds of block cipher algorithms meeting certain conditions can also be attacked by HFA.

Homological Fault Attack on AES Block Cipher …

659

3.1 Fault Model The homological fault analysis sets up with such a few assumptions. • There exists a kind of fault injection that makes the stage operation having unique data dependency. • The adversary has a way to detect the fault characteristics, i.e., observed ciphertext to know whether the fault changes the intermediate state or not. • The fault injection position is the SubBytes sub-operation in the first round of AES-128, and the unique data dependency of the S-box in the first round needs to have the same fault characteristic. The first assumption is not harsh because most circuits have a long–short path, and this can cause the stage operation corresponding to the long–short path part circuit having data dependency. To numerous cryptographic circuits, the data dependency is unique. The second assumption is easy to achieve, and the third assumption is reasonable because many cryptographic algorithm hardware implementations only use one S-box implementation scheme in order to save space on the chip. In AES-128, the SubBytes is a positive stage operation and the long–short path implementation of it can cause unique data dependency. Next, we use the SubBytes operation in AES as the attack point for fault injection. When the encryption algorithm is running, we introduce a clock glitch to speed up the clock frequency of SubBytes calculations in the first round.

3.2 Method and Procedure In this part, we will give the details of the homological fault analysis. For a simple explanation, the fault we use may simply cause the output of the S-box error depended on the input of the S-box. This means some inputs of the S-box can protect the corresponding outputs of the S-box from the fault injection, and other inputs will have wrong outputs by the fault. For the ith S-box in the first round, the input of it is αi = pi ⊕ ki , and the output of it is βi = S(αi ). Thinking about the S-box operation which has unique data dependency under a kind of fault injection f, then the βi change into βi = S f (αi ). S f (x) is defined as the following:  S f (x) =

S(x), x ∈ L S(x), x ∈ CU L

(1)

in which L is the invariant input set and Cu L is the non-invariant input set. Defining · as the size of set, obviously we have the following equation:   Pi  = P j  = L

(2)

660

N. Shang et al.

And XORSum(Pi ) is defined as follows: XORSum(Pi ) = pi,1 ⊕ pi,2 ⊕ . . . ⊕ pi,Pi 

(3)

Consider the set L; if L is odd, obviously established, then we can do the following operation:   ki ⊕ k j = (Pi   ki ) ⊕ P j  k j   = (Pi  ki ) ⊕ P j  k j ⊕ (XORSum(L)) ⊕ (XORSum(L))         = αi,1 ⊕ ki ⊕ . . . ⊕ αi,L ⊕ ki ⊕ α j,1 ⊕ k j ⊕ . . . ⊕ α j,L ⊕ k j   = XORSum(Pi ) ⊕ XORSum P j As a conclusion, we got Eq. (4):   ki ⊕ k j = XORSum(Pi ) ⊕ XORSum P j

(4)

Then, we can get the XOR value of every two key parts and traverse the value of the first key part k1 to get the key k. So, finding a fault makes the function S(·) meet the odd number of the size of L which is the main part of extracting keys. Let us consider the HFA in the case of S-box serial. At first, we need to find an effective clock glitch fault that can distinguish all pi possible values into two sets Pi and CU Pi with odd size. The method to find such a clock glitch fault in the case of S-box serial is shown in Algorithm 1. Algorithm 1 Effective Clock Glitch Fault Search in S-box Serial Step 1. Randomly select plaintext p = { p1 , p2 , . . . , p16 }, and perform encryption to get the correct ciphertext c. Step 2. Use the same plaintext in step 1, and perform fault injection during the running of the AES algorithm. The location of the fault injection is the first S-box in the first round, and get the ciphertext c after the fault injection. Step 3. If c is equal to c , p1 belongs to P1 ; if not, then p1 belongs to CU P1 . Step 4. Repeat step 1 to step 3 with the same frequency clock glitch fault injection, traversing all possible cases of the first byte. Then, we can get P1 and CU P1 . Step 5. If P1 is odd, fine-tune the frequency of clock glitch and repeat the above steps until finding an effective clock glitch fault f that can get odd P1 . Searching for the effective clock glitch fault f is not a different thing. The probability of finding success once is 50%. If unfortunately not found the fault once, using the dichotomy to find the effective fault can also be found quickly. After finding the effective clock glitch fault f, we can use Algorithm 2 carry out all XOR values between the different key parts.

Homological Fault Attack on AES Block Cipher …

661

Algorithm 2 Non-invariant Plaintext Set Search in S-box Serial Step 1. Iterate through the possible values of a part of plaintext pi and fixed remaining plaintext parts, and then encrypt to get corresponding each plaintext ciphertext c. Step 2. Perform fault injection, and the location of the fault injection is the first S-box in the first round. Repeat encryption of plaintext, and get ciphertext c . Step 3. If c is equal to c , pi belongs to Pi ; if not, then pi belongs to CU Pi . Then, we get Pi and CU Pi . Step 4. Repeat step 1 to step 3 with the different parts of plaintext and corresponding fault injection location, and then we get all {Pi } and {CU Pi }. After we get {Pi }, we can get all XOR values between the different key parts with Eq. (4). Then, it is easy to traverse the secret key for 256 possibilities to find the right one.

4 Experiment and Discussion 4.1 Attack Under S-Box Implemented in Serial We implemented serial AES-128 encryption algorithms on the Atlys Spartan6 Xilinx FPGA (Xilinx Spartan-6 LX45 FPGA, 324-pin BGA package, 128 Mbyte DDR2) and performed HFA with Rigol DG4102. We analyzed the intermediate value of the S-box input during the first round of AES and scanned the coarse-grained clock glitch frequency, and the result is shown in Fig. 1. If we choose 172 MHz as the frequency of clock glitch fault injection, we can see that there are exactly 15 intermediate values that will not cause the encryption result to be wrong (stars), and the remaining intermediate values will cause the encryption

Fig. 1 Different intermediate values of the input S-box fail at different frequencies

662

N. Shang et al.

result to be wrong (points). This conclusion directly proves the validity of HFA. Different intermediate values for clock glitches of the same frequency will result in different encryption results; using this difference, we can extract key with HFA.

4.2 Weaker Assumption and Attack Under S-Box Implemented in Parallel In some scenarios, we may not be able to get the ciphertext after encrypted; i.e., in the authentication scenario, it may only tell if the authentication passed. Fortunately, in fact, we do not need to get the specific value of the ciphertext. We only need to know if the result of the operation is correct. So, an oracle that can verify if the encryption is correct is enough for our attack. The attack scenario using oracle is shown in Fig. 2. Fig. 2 Use oracle to distinguish whether the encryption result is correct

Homological Fault Attack on AES Block Cipher …

663

Fig. 3 Use the distinguisher to find the associated plaintext set and extract the key

And if we seem fault injection and the oracle as a distinguisher of different values of plaintext part, the overall attack process can be seen as the pattern shown in Fig. 3. The next question to discuss is how do we find a valid fault when S-box is paralleled. In fact, this is not difficult to implement HFA when S-box is paralleled. We only need to find a plaintext so that for the plaintext, the fault we applied is an invalid fault. When the fault we implemented caused half of the intermediate value to fail, we could find such a plaintext after about 500 trials. Then, only change one of the plaintext bytes and reduce the frequency of clock glitch injection. This can ensure the discard from the oracle is only caused by the changed byte. Then, we can use Method 1 to find an effective clock glitch fault. Use the similar way, continue to use Method 2 to find {Pi }, and extract secret key.

5 Conclusions and Countermeasures We discuss method that can still use low-frequency clock glitch to perform a fault attack in the event that a precise-frequency or high-frequency clock glitch fault injection cannot be performed. Of course, this type of attack is not indefensible and

664

N. Shang et al.

can be protected by changing the data dependencies in cryptographic operations. However, using a mask is not an effective defense and can implement HFA on the last round of AES. Dynamically changing the path length of different S-boxes may be an effective countermeasure. On the one hand, HFA reduces the need for accuracy of faults, and on the other hand it reduces attack costs. At the same time, the key can be inferred because only the plaintext and ciphertext are correct, which allows the HFA to carry out the attack under extremely limited attack conditions. At the same time, we also discuss the difficulty analysis of implementing HFA in parallel and serial S-box in AES hardware implementation and give corresponding solutions for parallel conditions. HFA can also be extended to more fault injection distinguishers based on data dependencies for key extraction. Acknowledgements This work is supported by National Natural Science Foundation of China (Nos. 61872040, U1836101), National Cryptography Development Fund (No. MMJJ20170201), Foundation of Science and Technology on Information Assurance Laboratory (No. KJ-17-009).

References 1. Endo, S., Sugawara, T., Homma, N., Aoki, T., Satoh, A.: An on-chip glitchy-clock generator for testing fault injection attacks. J. Cryptogr. Eng. 1(4), 265–270 (2011) 2. Li, Y., Sakiyama, K., Batina, L., Nakatsu, D., Ohta, K.: Power Variance Analysis breaks a masked ASIC implementation of AES. In: Proceedings of the Conference on Design, Automation and Test in Europe, pp. 1059–1064 (2010) 3. Li, Y., Sakiyama, K., Gomisawa, S., Fukunaga, T., Takahashi, J., Ohta, K.: Fault sensitivity analysis. In: International Workshop on Cryptographic Hardware and Embedded Systems, pp. 320–334. Springer, Berlin, Heidelberg (2010) 4. Li, Y., Nakatsu, D., Li, Q., Ohta, K., Sakiyama, K.: Clockwise collision analysis-overlooked side-channel leakage inside your measurements. IACR Cryptol. eprint Arch. 579 (2011) 5. Moradi, A., Mischke, O., Paar, C., Li, Y., Ohta, K., Sakiyama, K. On the power of fault sensitivity analysis and collision side-channel attacks in a combined setting. In: International Workshop on Cryptographic Hardware and Embedded Systems, pp. 292–311. Springer, Berlin, Heidelberg (2011) 6. Sakamoto, H., Li, Y., Ohta, K., Sakiyama, K. Fault sensitivity analysis against elliptic curve cryptosystems. In: 2011 Workshop on Fault Diagnosis and Tolerance in Cryptography, pp. 11– 20. IEEE (2011) 7. Li, Y., Ohta, K., Sakiyama, K.: An extension of fault sensitivity analysis based on clockwise collision. In International Conference on Information Security and Cryptology, pp. 46–59. Springer, Berlin, Heidelberg (2012) 8. Li, Y., Endo, S., Debande, N., Homma, N., Aoki, T., Le, T.H., Sakiyama, K.: Exploring the relations between fault sensitivity and power consumption. In: International Workshop on Constructive Side-Channel Analysis and Secure Design, pp. 137–153. Springer, Berlin, Heidelberg (2013) 9. Schellenberg, F., Finkeldey, M., Gerhardt, N., Hofmann, M., Moradi, A., Paar, C.: Large laser spots and fault sensitivity analysis. In: 2016 IEEE International Symposium on Hardware Oriented Security and Trust, pp. 203–208. IEEE (2016) 10. Wang, A., Chen, M., Wang, Z., Wang, X.: Fault rate analysis: breaking masked AES hardware implementations efficiently. IEEE Trans. Circuits Syst. II Express Briefs 60(8), 517–521 (2013)

Homological Fault Attack on AES Block Cipher …

665

11. Korkikian, R., Pelissier, S., Naccache, D.: Blind fault attack against SPN ciphers. In: Workshop on Fault Diagnosis and Tolerance in Cryptography, pp. 94–103. IEEE (2014) 12. Li, Y., Chen, M., Liu, Z., Wang, J.: Reduction in the number of fault injections for blind fault attack on SPN block ciphers. ACM Trans. Embed. Comput. Syst. 16(2), 55 (2017) 13. Liu, Y., Zhang, J., Wei, L., Yuan, F., Xu, Q.: DERA: yet another differential fault attack on cryptographic devices based on error rate analysis. In: Proceedings of the 52nd Annual Design Automation Conference, p. 31. ACM (2015) 14. Ren, Y., Wang, A., Wu, L.: Transient-steady effect attack on block ciphers. In: International Workshop on Cryptographic Hardware and Embedded Systems, pp. 433–450. Springer, Berlin, Heidelberg (2015) 15. Roy, I., Rebeiro, C., Hazra, A., Bhunia, S.: Safari: automatic synthesis of fault-attack resistant block cipher implementations. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. (2019)

Researching on AES Algorithm Based on Software Reverse Engineering Qingjun Yuan , Siqi Lu , Zongbo Zhang , and Xi Chen

Abstract As one of today’s mainstream encryption algorithms, AES has the characteristics of rapid computing speed, strong intensity of algorithm, and high safety performance, and it has been widely used in all kinds of software. During the ten-year research process, most people tried to crack the algorithm from the perspective of mathematics. From the angle of software reverse and according to the encryption in practical use, this article puts forward the corresponding attack strategy and safeguard measures for AES algorithm through the reverse analysis on three different types of software, during which we compared the AES code. Keywords AES algorithm · Software reverse engineering · Attack strategy

1 Introduction With the progress of technology, cryptographic technique has seeped into people’s everyday life. Rijndael’s algorithm [1], a kind of block cipher algorithm, was recognized as the algorithm of American Electroplaters Society (AES) in 2000, and its appearance provided strong support for data security. Since then, further studies have been done on AES algorithm and great achievements have been achieved [2, 3]. At present, AES algorithm has been broadly used in all kinds of software, acting as an important technique in software protection. Q. Yuan · S. Lu (B) · Z. Zhang · X. Chen PLA Strategic Support Force Information Engineering University, 450001 Zhengzhou, China e-mail: [email protected] Q. Yuan e-mail: [email protected] Z. Zhang e-mail: [email protected] X. Chen e-mail: [email protected] Henan Key Laboratory of Network Cryptography Technology, 450001 Zhengzhou, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_65

667

668

Q. Yuan et al.

Software reverse engineering [4, 5] is one significant method of software system study. Using this method, we can achieve giving detailed analysis on the target software, identifying the components in the software system and the relationship among them, and summarizing or abstracting the software structure and system application. To be specific, software reverse engineering includes two contents: (1) constructing the corresponding source program reversely from the application program and (2) making clear software’s inner system framework and construction principle from the source program and finally sorting out detailed software application documents. Software reverse engineering is of great importance in analyzing software structure, understanding programming framework, and studying function realization. Studies conducted by the cryptographic circle on AES algorithm have been deeper and deeper nowadays. Based on these studies, a lot of attack methods have been put forward. However, AES algorithm still shows high security in practical use. This article, from the perspective of system attack, tries to find the key code and acquire the secret key of software through reversely restoring the software’s AES encryption process, thus achieving the goal of cracking. Meanwhile, we make conclusion and propose attach hypothesis through analyzing AES algorithm under specific application model.

2 Preliminaries 2.1 AES Algorithm AES is a kind of new encryption standard initiated by National Institute of Standards and Technology (NIST). After 5 years of study, Rijndael’s algorithm was finally selected and published as AES, which since then has been widely studied and largely used by people all over the world. In today’s information era, AES algorithm can be found in numbers of applications and computer programs; therefore, its characteristics are worthy of further studies. Since being put forward, AES algorithm has been studied scientifically and systematically. These studies mainly concentrate on three aspects: encryption process analysis, anti-attack performance analysis, and data processing capability study. Based on the existing studies, series improvements on the algorithm have been made. In 2016, Abdelrahman Altigani [6] researches the performance of five modes of operation of AES, presenting a code using Crypto++ to benchmark as well. Based on the comparison and evaluation, the counter mode of operation has been found generally superior to others. In response to this issue, Amir Moradi [7] presents a successful side-channel attack on the bitstream encryption. Based on reverse engineering, they demonstrate that the full 128-bit AES key of a Stratix II can be recovered by means of side-channel analysis with 30,000 measurements, which can be acquired in less than three hours.

Researching on AES Algorithm Based on Software Reverse …

669

2.2 Overview of Software Reverse Engineering Although domestic study on software reverse engineering has lasted for decades, there is still no normative and systematic research method for software reverse engineering study. Overseas studies on software reverse engineering seem deeper. For example, Carnegie Mellon University established a professional software reverse engineering center aiming at developing application programs for software reverse engineering and popularizing program understanding technology. The majority of existing studies on AES algorithm are conducted from the angle of mathematics. And some achievements on AES algorithm’s performance against differential cryptanalysis and linear attack have been obtained. However, these achievements have obtained little effect on software’s actual operation. Hence, in this article, from the angle of reverse analysis and by means of software reverse engineering, we try to study AES algorithm in relating software, extract critical code and function characteristics in programming, and deepen the understanding of AES algorithm in practical use.

3 Cracking AES Algorithm with Software Reverse Engineering This letter takes three kinds of software used AES algorithm as an example, analyzes the algorithm of AES algorithm, and finds out the implementation vulnerability of some AES algorithm.

3.1 Application Background Crob FTP Server is a piece of FTP server controlling software, which can provide interface for uploading files, conduct verification, etc. Generally speaking, its major function is to operate on files; therefore, in this software, AES algorithm is not used to process files but used as the tool to generate registration code. This is because AES algorithm is suitable for registration code generation as it is irreversible under ciphertext circumstances. AES 5.1.0 is a piece of encryption software specially designed to encrypt character and file with AES algorithm. Due to the special function of this software, in the process of applying AES algorithm, it supports optional key length, optional encryption module, and changeable encryption key. From this point, this software is helpful for us to do a more comprehensive study on AES algorithm. Chinese Chess Family V5.0 is a piece of game software; therefore on the one hand, it makes little sense to encrypt user’s operation orders in the game with AES algorithm, and on the other, the delay caused by encryption would weaken the playful

670 Table 1 Application of AES algorithm

Q. Yuan et al. Name

Software type

Function of AES algorithm

Significance of application

Crob FTP Server

FTP management tool

Generating registration code

Restricting user authority

AES 5.1.0

Encryption

Encrypting files

Guarding information security

Chinese chess family

Game

Generating serial number

Preserve copyright

experience of the game. Therefore, AES algorithm is also used to generate registration code. However, it is rather unsafe to some extent as the program stores the registration code, after generated, in the memory for contrast. To sum up, AES algorithm is widely used in various kinds of software because of its advantages such as high strength and quick encryption; however, due to different software developer would have different programming means, the safety level of AES algorithm in different software differs. The following paragraphs elaborate on the safety performance of each software from the angle of encryption process. From the angle of the ways AES algorithm being applied, the three pieces of software mentioned in this article process their own characteristics, as listed in Table 1.

3.2 Encryption Means While using AES algorithm, none of the three pieces of software mentioned in this article have dealt with data in the way of AES source code does in that it would increase the calculation amount and prolong the calculation time. Therefore, AES algorithm is treated with flexibility in practical use, i.e., to reduce the calculation time through expanding storage space. According to the analysis on disassembly code, we have reached following conclusions. As can be seen in Table 2, the parameters of AES algorithm differ in the three pieces of software. And since Crob FTP Server is a kind of commercial FTP management tool, the parameters of AES algorithm it adopts are relatively large and, therefore, its algorithm strength is higher. Meanwhile, AES 5.1.0 is a piece of software specially designed for encryption, and its parameters are set as optional, which is convenient for users to set up. In addition to the differences in parameters, the encryption ways of the three pieces of software also differ. As Table 2 demonstrating, as to SubByte operation, Crob FTP

Researching on AES Algorithm Based on Software Reverse …

671

Table 2 AES parameters Name

Key length

Encryption rounds

SubByte

Seed key

Crob FTP Server

256

14

Array subscript location

Related to user’s name

AES 5.1.0

optional

optional

Sub-function realization

User inputting

Chinese Chess Family

192

12

Array subscript location

Fixed key

Server, and Chinese Chess Family perform locating according to the location of array subscripts, and the result of location is directly involved in other operations. Thus, Crob FTP Server avoids to separate SubByte as a sub-function, which is benefit for reducing the calculation amount and accelerating the processing speed. Nevertheless, due to the expandability of its parameters, AES 5.1.0 separates SubByte as a subfunction. Moreover, in the execution of round function (except the last round), the round function is transformed into table lookup operation by all the three pieces of software. The detail of the transformation principle is as follows: Given the input of round function is a, and the output of SubByte is b, then bi, j = S[ai, j ], 0 ≤ i < 4, 0 ≤ j < N b

(1)

And given the output of ShiftRow is c, and output of MixColumn is d, then ⎤ ⎡ ⎤ b0, j+0 c0, j ⎢ c1, j ⎥ ⎢ b1, j+1 ⎥ ⎥ ⎢ ⎥ ⎢ ⎣ c2, j ⎦ = ⎣ b2, j+2 ⎦, 0 ≤ j < N b c3, j b3, j+3 ⎡ ⎤ ⎡ ⎤ ⎤ ⎡ d0, j 02 03 01 01 c0, j ⎢ d1, j ⎥ ⎢ 01 02 03 01 ⎥ ⎢ c1, j ⎥ ⎢ ⎥ ⎢ ⎥ ⎥ ⎢ ⎣ d2, j ⎦ = ⎣ 01 01 02 03 ⎦ · ⎣ c2, j ⎦, 0 ≤ j < N b ⎡

d3, j

03 01 01 02

(2)

(3)

c3, j

And now Formulas (1) and (3) can be merged as ⎡

⎤ ⎡ d0, j 02 ⎢ d1, j ⎥ ⎢ 01 ⎢ ⎥ ⎢ ⎣ d2, j ⎦ = ⎣ 01 d3, j 03

03 02 01 01

01 03 02 01

⎤ ⎤ ⎡ 01 S[a0, j+0 ] ⎥ ⎢ 01 ⎥ ⎥ · ⎢ S[a1, j+1 ] ⎥, 0 ≤ j < N b ⎦ ⎣ S[a2, j+2 ] ⎦ 03 S[a3, j+3 ] 02

(4)

672

Q. Yuan et al.

⎡⎡

⎤ ⎡⎡ ⎤ ⎤ ⎤ 02 03 ⎢⎢ 01 ⎥ ⎥ ⎢⎢ 02 ⎥ ⎥ ⎥ ⎢⎢ ⎥ ⎥ ⎢ ⎥ =⎢ ⎣⎣ 01 ⎦ S[a0, j+0 ]⎦ ⊕ ⎣⎣ 01 ⎦ S[a1, j+1 ]⎦ 03 01 ⎡⎡ ⎤ ⎤ ⎡⎡ ⎤ ⎤ 01 01 ⎢⎢ 03 ⎥ ⎥ ⎢⎢ 01 ⎥ ⎥ ⎢ ⎥ ⎥ ⎢⎢ ⎥ ⎥ ⊕⎢ ⎣⎣ 02 ⎦ S[a2, j+2 ]⎦ ⊕ ⎣⎣ 03 ⎦ S[a3, j+3 ]⎦ 03

(5)

02

Thus, we can define the four tables mentioned above. And each T table occupies 256 4-byte (32-bit) double words which call for 4 KB memory. To use those tables, we can transform Formula (4) into ⎡⎡

⎡⎡ ⎤ ⎤ ⎤ ⎤ 02 03 ⎢⎢ 01 ⎥ ⎢⎢ 02 ⎥ ⎥ ⎥ ⎢⎢ ⎥ ⎢ ⎥ ⎥ ⎥ T0 [a] = ⎢ ⎣⎣ 01 ⎦ S[a]⎦, T1 [a] = ⎣⎣ 01 ⎦ S[a]⎦, 03 01 ⎡⎡ ⎤ ⎡⎡ ⎤ ⎤ ⎤ 01 01 ⎢⎢ 03 ⎥ ⎢⎢ 01 ⎥ ⎥ ⎥ ⎢⎢ ⎥ ⎢ ⎥ ⎥ ⎥ T2 [a] = ⎢ ⎣⎣ 02 ⎦ S[a]⎦, T3 [a] = ⎣⎣ 03 ⎦ S[a]⎦ 03 02

(6)

Therefore, to use the 4 KB table, it only needs four times table lookup and four times XOR over each round and column of status array. And it is worth noting that, there is no MixColumn operation in the last round. In the process of storing tables, since IDA has the ability to identify specific tables, tables in Crob FTP Server are labeled as Rijndael_Tex; while Chinese Chess Family performs transposition on the table data and conducts corresponding transposition during operation, which causes that IDA cannot recognize the table data and to some extend plays a role in preventing reverse. ⎤ d0, j ⎢ d1, j ⎥ ⎥ ⎢ ⎣ d2, j ⎦ = T0 [a0, j+0 ] ⊕ T1 [a1, j+1 ] ⊕ T0 [a2, j+2 ] ⊕ T0 [a3, j+3 ], 0 ≤ j < N b d3, j ⎡

(5)

As to the field of encryption module, as AES 5.1.0 is a piece of software specially designed for encryption, there is no need to contrast it with other two pieces of software which both employ ECB module to perform encryption. ECB module has the merit of fast processing speed, and its defect is that the ciphertext of the same plaintext is definitely the same.

Researching on AES Algorithm Based on Software Reverse …

673

In the field of key generation, the seed key of Crob FTP Server is obtained through processing user’s name, while the key of AES 5.1.0 is optional and that of Chinese Chess Family is fixed resulting in its registration code being also fixed. Furthermore, from the perspective of software data processing, the reverse ways of the three pieces of software are also different. Software like Crob FTP Server requires users to input user’s name and generates registration code according to the name. Therefore, during disassembling, we can start with API, which means to locate the data processing segment by looking for the API that receives the string. Then, we can approximately figure out the algorithm adopted by the software. If the algorithm is AES, we can find the seed key by thorough analysis, build a decoder according to the seed key, and finally reach the purpose of crack the software. As for encryption software like AES 5.1.0, because of its encryption characteristic, a lot of ciphertext must be produced. Therefore, with the help of disassembling means, we can backtrack to find the encrypted segment, work out the key generation scheme, and finally achieve to crack the software. Last but not least, to crack software like Chinese Chess Family which generates registration code with fixed key, we can directly adopt the way of dynamic debugging. And during debugging, what should be paid attention to is looking for the stack because the key and the final ciphertext generated in the encryption process can definitely be found in the stack. Once those information been intercepted, the software can be cracked.

3.3 Attacking Strategy Through the reverse analysis on three pieces of software, this article gives a rough idea of the practical application of encryption algorithm in different kinds of software. Table 3 presents the corresponding attacking strategies and protecting measures for the three pieces of software. Since Crob FTP Server is a piece of paid commercial software, if its user wants to obtain all the function’s usage permission, the user needs to send its name to the client of the Web site, and then the client will process and calculate the data and return the result to the user. Meanwhile, the same operation process occurs inside the software. The operation result will be compared with user’s input, and if correct, the user will get Table 3 Attacking and protecting strategies

Name

Attacking strategies

Protecting strategies

Crob FTP Server

Seed key extraction

Add high-intensity encryption pack

AES 5.1.0

Code injection

Code self-check

Chinese Chess Family

Dynamic debugging

Write the information into registry

674

Q. Yuan et al.

high-level function using permission, otherwise the registration fails. According to this principle, the encryption way of such kind of software is symmetrical encryption, which means the calculation process can be found in its program. Therefore, what needed to carry out an efficient attack is just finding the encrypted segment and the key generation process through reverse analysis on the software. For this kind of attacking strategy, the software can defend itself by introducing anti-reverse mechanism, for example packing its files. The three pieces of software mentioned in this article only adopt simple packer that can easily be unpacked with some tools. And complicated packer can be obtained with the tools such as ASprotect and EncryptPE. As mentioned before, AES 5.1.0 is a piece of software specially designed for encryption, whose key is inputted by the user. The key processing of this kind of software during encryption can definitely be found in disassembling code. Furthermore, the encryption segment of the ciphertext stored in stack can be found by backtracking, thus obtaining the information of key. And in a deeper level, we can perform code injection on the software, thus intercepting and storing the data input by the user. Then, by processing the data with its corresponding key processing function, the key can be restored and the ciphertext or encrypting file can be decrypted. Against this kind of attacking strategy, two kinds of protection are available. The first one is not to use the system-provided string operation function which is easy to be located. Instead, reverse analysis can be efficiently prevented by storing the data and hiding the function with self-programming. The second one is against code injection. Code self-check, which checks the integrity of code, is an efficient way to prevent malicious tampering. Last but not least, Chinese Chess Family, as a piece of game software, uses AES algorithm to generate registration code and stores the key and ciphertext in the memory. Such kind of behavior extremely reduces the difficulty to crack the software. The feasible measure is to write pertinent information into registry and read the information directly from the registry when necessary, thus avoiding the ciphertext being captured during dynamic debugging and sheltering the software from cracking.

4 Prospect Forecast This letter includes reverse study on three different pieces of software, which analyzes the encrypted segment with AES algorithm and summarizes the realization process of AES algorithm in today’s application. By contrast, this article not only introduces feasible attacking strategies for the three kinds of software, but also proposes corresponding protective measures toward different attacking ways. Based on the present conclusion, we will deepen our study in the following aspects: (1) Working on the code of AES algorithm and trying to develop a tool to directly locate AES code in software;

Researching on AES Algorithm Based on Software Reverse …

675

(2) Having an in-depth learning about software attacking and protection, and combining the knowledge with software reverse engineering to propose more perfect attacking and protection strategies; (3) As software varieties covered in this article are just in a small scale, the conclusions may not be universal; therefore, we would reverse more kinds of software and try to figure out more comprehensive solutions.

References 1. Daor, J., Daemen, J., Rijmen, V.: AES Proposal. Rijndael (1998) 2. Kumarverma, H., Singh, R.K.: Performance analysis of RC6, twofish and rijndael block cipher algorithms. Int. J. Comput. Appl. 42(16), 1–7 (2012) 3. Sajadieh, M., Mirzaei, A., Mala, H., Rijmen, V.: A new counting method to bound the number of active S-boxes in Rijndael and 3D 4. Canfora, G., Penta, M.D., Cerulo, L.: Achievements and challenges in software reverse engineering. Commun. ACM 54(4), 142–151 (2011) 5. Bergmayr, A., Bruneliere, H., Cabot, J. et al.: fREX: fUML-based reverse engineering of executable behavior for software dynamic analysis. In: IEEE/ACM, International Workshop on Modeling in Software Engineering, pp. 20–26 (2016) 6. Altigani, A., Abdelmagid, M., Barry, B.: Analyzing the performance of the advanced encryption standard block cipher modes of operation: highlighting the national institute of standards and technology recommendations. Indian J. Sci. Technol. 9(28) (2016) 7. Moradi, A., Oswald, D., Paar, C. et al.: Side-channel attacks on the bitstream encryption mechanism of Altera Stratix II:facilitating blackbox analysis using software reverse-engineering. In: ACM/SIGDA International Symposium on Field Programmable Gate Arrays. ACM, pp. 91–100 (2013)

MC-PKS: A Collaboration Public Key Services System for Mobile Applications Tao Sun, Shule Chen, Jiajun Huang, Yamin Wen, Changshe Ma, and Zheng Gong

Abstract Digital certificates provided by PKI are commonly used for identification and authentication services. The corresponding private key can be protected by USB keys, TEE/SE, etc., in the hardware environment. But in the software environment, the private key is relatively easy for an attacker to steal. This paper presents the design and implementation of a collaboration public key services system for mobile applications, which is named MC-PKS. The MC-PKS system provides a set of mobile digital certificate signatures and decryption schemes for PKI in the form of APPserver collaboration. It protects the private key utilizing information hiding and secret splitting on two-party signature schemes, which ensures that the split private key which has been split can still generate a digital signature if and only if with the cooperation of the server. We then analyze the security of the proposed system and show that it satisfies all known security requirements in practical applications. The performance analysis demonstrates that the MC-PKS system also achieves the resource-constrained requirements of mobile applications. Keywords Public key infrastructure · Digital signature · Two-party secure computation

T. Sun · J. Huang · C. Ma · Z. Gong School of Computer Science, South China Normal University, 510630 Guangzhou, China S. Chen Guangdong Electronic Certification Authority, Co., Ltd., 510060 Guangzhou, China Y. Wen (B) School of Statistics and Mathematics, Guangdong University of Finance and Economics, 510320 Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_66

677

678

T. Sun et al.

1 Introduction Public key infrastructure (PKI) is a trustworthy infrastructure that provides security services for e-commerce based on public-key cryptography (PKC). To provide authentication services, PKI manages users’ public keys by issuing digital certificates which essentially bind public keys with identities of entities. Specifically, a certificate authority (CA) is responsible for realizing the registration and issuance of certificates [1]. The widely used PKC primitives in PKI are RSA [2], SM2 [3], ECDSA [4]. Since digital certificates provided by PKI can be applied to e-government, OA, authentication, and other fields, it is important to guarantee the security of private keys in digital certificates. Some organizations and enterprises with higher security levels typically use a USB key, TEE/SE, and other hardware cryptodevices to protect the private key. But this strategy is not widely used because of expensive costs and incompatibility. Most of organizations and enterprises tend to choose the software protection, which is summarized as a set of schemes and algorithms designed to protect the private key. In specific, the software protection can be divided into three types: (t, n)-threshold secret sharing, oblivious transfer, and multi-party computation. The secret sharing schemes are potential solutions to this issue [5–7]. In a (t, n)threshold secret sharing scheme, a private key is shared among n parties. No one can obtain the complete private key if less than t parties participate in the key recovery process. The security is based on the assumption that most attackers will not be able to compromise and obtain t or more key shares. A large number of protocols based on (t, n)-threshold secret sharing have been proposed in the literature [8–10]. Oblivious transfer was first proposed by Rabin [11]. In Rabin’s oblivious transfer scheme, the sender sends a message to the receiver with probability 1/2, while the sender remains oblivious as to whether or not the receiver received the message. Multi-party computation was first introduced by Yao for solving the millionaires’ problem [12]. Wu et al. [13] proposed a secure key agreement and key protection for mobile device user authentication. It considers the special case that two devices at the user’s side are required to perform user authentication with a server jointly, and neither device can complete the authentication process alone. Contribution Our contribution is the proposal of mobile-collaboration public key services system (MC-PKS). MC-PKS is a general universal public key system designed for mobile applications. Inspired by the multi-party computation, MC-PKS can securely generate digital signatures or authentications by utilizing the two-party computation. In particular, MC-PKS can be compatible with three commonly used algorithms (i.e., RSA, SM2, and ECDSA). Organization The rest of the paper is organized as follows. In Sect. 2, we review the relevant background materials. In Sect. 3, we give an overview of MC-PKS. The security and performance of MC-PKS are presented in Sects. 4 and 5, respectively. Finally, we conclude the paper in Sect. 6.

MC-PKS: A Collaboration Public Key Services System for Mobile …

679

2 Preliminaries This section introduces two collaborative public key algorithms collaboration-RSA and collaboration-SM2. Table 1 partially summarizes the symbols used in this paper.

2.1 Collaboration-RSA Collaboration-RSA (CoRSA) [14] is a two-party signature scheme based on RSA. It protects the signature private key so that the client and the server do not have to adopt the traditional private key escrow scheme. It also protects the random numbers used in generating signatures. Figure 1 illustrates the process of signature generation. Table 1 Partial list of symbols A, B

Two users who use public key system

dA

The signature private key of A

G

Elliptic curve base point

n

Integer order of G

UT

User information table

ID A

The real identity of user A

RA

Registration authority

Cert A

Certificate signing request

A→B:m

A sends message m to B

H(m)

The digital digest of m

random(a, b)

Select a secure random number greater than or equal to a and less than or equal to b

random(S)

Select a secure random number from set S

ZA

The real identity of user A, partial elliptic curve parameters, and the digital digest of A’s public key

Fig. 1 Process of signature generation

start S1.Server and client complete RSA private key hiding S2.Client generates mask signature S3.Server transforms the mask signature into RSA signature S4.Server verifies RSA signature and output RSA signature end

680

T. Sun et al.

2.2 Collaboration-SM2 Collaboration-SM2 (CoSM2) is a two-party signature scheme based on SM2. It is designed to enhance the security of mobile applications using digital certificates to sign and maximize the difficulty of stealing the private key. Overview CoSM2 uses information hiding and secret splitting to protect key information and random numbers in the key generation and signature processes of SM2. To ensure that split private key which has been split can still generate a digital signature if and only if with the cooperation of the server, CoSM2 exploits the twoparty signature scheme. To improve the readability and scalability, a mechanism similar to Diffie-Hellman key exchange (D-H) [15] should be utilized to generate a collaborative key, and a scheme similar to digital multi-signature scheme should be used to generate a signature. Algorithms It assumes that S has passed the audit of RA and has a D-H key pair (hd A , W A ), the dedicated server S has a D-H key pair (hd S , W S ). The collaborative key generation algorithm is shown in Algorithm 1. In this algorithm, hd A and hd S are the collaborative keys of A and S, respectively. PA is the public key of A. The signature generation algorithm is shown in Algorithm 2. Algorithm 1 Collaborative key generation algorithm Input: G, I D A , (hd A , W A ), (hd S , W S ) Output: (PA , W A ) 1. 2. 3. 4. 5. 6.

A : W A = [hd A ]G; A → S : (r equest, I D A , W A ); S → A : WS ; S : PA = [hd S ]W A − G; A : PS = [hd A ]W S − G; return PA , W S ;

Algorithm 2 signature generation algorithm Input: M, n, (hd A , W A ), (hd S , W S ) Output: signature σ = (r, s) 1. 2. 3. 4. 5. 6. 7. 8.

A : k A = random(1, n − 1), Q A = [k A ]W S ; A → S : Q A; S : k S = random(1, n − 1), (x1 , y1 ) = [k S ]W S + Q A ; S : r = (H (M) + x1 ) mod n; s1 = (hd S )−1 × (k S + r ) mod n; S → A : (s1 , r );  A : s = (hd A )−1 × (k A + s1 ) − r mod n; return σ = (r, s);

MC-PKS: A Collaboration Public Key Services System for Mobile …

681

3 Collaboration Public Key Services System 3.1 The Framework of MC-PKS According to the two-party signature scheme, a client and a dedicated server should be in place. We introduce a CA to issue certificates to users. Besides, the actions of users and the server should all be under uniform management. So, we need to improve the management functions. The above functions and entities are collectively called collaboration public key services system (MC-PKS). MC-PKS can be divided into three parts: server-side, client-side, and management-side. We set up the four modules based on the system’s functions, that is, collaborative key generating module, signature generating module, key recovering module, and certificate applying module. According to these modules, the duties of every part can be summarized as follows: • Server-side In this system, the duties of the server are listening for requests from the client and response. The server is relatively secure and honest, that is, its running status information will not be exposed, and it will not steal user runtime information. • Client-side The duties of the client are to complete the user’s request by communicating with the server. This system allows the client to be an untrusted device. • Management-side It is not an independent entity but a collection of system management and user management. It contains the user’s actions such as registration, certificate management, log review, and so on, as well as the administrator’s actions.

3.2 The Main Process of MC-PKS Assume that a user A already registered and passed the audit of RA. A can generate the key by following the steps of Table 2. Under the premise of having a collaborative key, A should generate a digital signature by using the collaborative key instead of a private key, as shown in Table 3. The user can verify the signature through the corresponding public key algorithms. By the character of this system, collaborative algorithms are used to sign the CSR in the process of applying a digital certificate. In other words, if A wants to apply a digital certificate, A should execute the following steps: 1. A: Generates CSR. 2. A: Signs CSR. a. CoSM2: signatur e = CoSM2Sign (hd A , C S R). b. CoRSA: signatur e = CoRSASign (H S K A , C S R).

682

T. Sun et al.

Table 2 Collaborative key generation Algorithm:

CoSM2

CoRSA

Initialization:

A has a D-H pair (hd A , W A ), S has a DH pair (hd S , W S ).

A and S both have an RSA key pair.

Process:

1. A : W A = [hd A ]G; 2. A → S : (r equest, I D A , W A ); 3. S → A : W S ; 4.S : PA = [hd S ]W A − G; 5. A : PS = [hd A ]W S − G; 6. S: saves (I D A , hd S ) to UT.

1.

A : n A = random(Z ) S K A = (d A , n A );

2. A → S : (r equest, I D A , S K A ); 3.

4.

S : d S A = random(Z n A ) hd A = d A − d S A ; S : hd S A = (d S A )eS mod n S HSK A = (hd A , hd S A , n A );

5. S → A : H S K A . Finally:

After that, the collaborative key of A communicating with S is hd A , and the collaborate key of S communicating with A is hd S .

After that, the collaborative key of A communicating with S is H S K A .

Table 3 Signature generation Algorithm:

CoSM2

CoRSA

Function:

CoS M2Sign(hd A , M)

CoR S ASign(H S K A , M) A : h = H (M)

Process:

1. A : Q A = [k A ]W S ; 2. A → S : Q A ; 3. S : (x1 , y1 ) = [ks ]W S + Q A ; r = (H (m) + x1 )mod n s1 = (hd S )−1 × (k S + r ) mod n;

1.

σ¯ = h hd A mod n A mds = (σ¯ , hd S A ).

2. A → S : mds. 3. S : d S A = (hd S A )d S mod n S 4. S → A : σ

4. S → A : (s1 , r ); 5. A : s =   (hd A )−1 × (k A + s1 ) − r mod n; Finally:

3. 4. 5. 6. 7.

After that, the signature of m is the pair (r, s). The pair (r, s) is equal to the pair    r , s which is generated by d A signing m with SM2.

A → S : (C S R, signatur e). S → C A : (I D A , C S R, signatur e). C A: Generates certificate. C A → S : (cer t A ). S: Updates (I D A , cer t A ).

After that, the signature of m is σ. σ is equal to σ which is generated by d A signing m with RSA.

MC-PKS: A Collaboration Public Key Services System for Mobile …

683

After that, a new digital certificate has been generated. What needs to be highlighted is collaborative key recovery. When the collaborate key of A is lost or stolen, the collaborative key can be recovered if CA’s KM has escrowed the private key of A. If not, A has to revoke previous collaborate keys and apply a new collaborate key. Under the premise that the CA’s KM has escrowed the signature key of A, we use CoSM2 to illustrate the collaborative key recovery, which are demonstrated as follows: 1. 2. 3. 4. 5. 6. 7.

A → S : key recovery request. S → C A : (request, I D A ). K M: Generates pair (hd A , hd S ) based on d A . C A → S : (hd A , hd S ). S: Updates hd S . S → A : hd A . A: Updates hd A .

After that, A gets a new collaborate key. No matter whether key recovery is achieved or a new collaborate key is applied, the lost key is invalid.

4 Security Analysis 4.1 The Security of Collaborate Signature Schemes and MC-PKS Black-box attack security. It assumes that the attacker cannot invade the user and the server system, but can eavesdrop and tamper the communication information. In the signature generation protocol, the communication messages include Q A , r, and (s1 , s).(s1 , s) is blinded by the randomly generated number independently, so it is difficult for an attacker to obtain the signature key information which is hidden in (s1 , s). The random numbers which are used to produce signatures are hidden separately in Q A . The difficulty of the discrete logarithm problem ensures that it is difficult for an attacker to obtain the random numbers. Thus, the solution is secure for passive attackers. User-side white-box attack security. Under this attack model, the attacker can not only eavesdrop, tamper the message of the signature generation protocol but also obtain the running status information of the user A. Assuming that A is an attacker, we show that A cannot generate a digital signature separately without the cooperation of the server. −d A 1 and 1+d in the SM2 signature algorithm does Firstly, the key information 1+d A A not appear in the algorithm. In the scheme, A uses a randomly blinded key slice hd A of its real signature key d A , so A who knows hd A cannot obtain signature key d A . Furthermore, each signature must be done to use hd S of the server-side to calculate

684

T. Sun et al.

cooperatively, which means that it cannot use hd A independently to generate a valid signature. Secondly, the scheme protects the random number k in the SM2 signature algorithm, which is generated by A and S through the secure two-party calculation. Therefore, A does not know the random number k. On the other hand, the random number k S generated by the server is not replaceable because the server adds it to the signature. If it is replaced, it may cause the client to generate an incorrect signature. Hence, the attacker A cannot separately generate a legitimate SM2 digital signature. Server-side attack security. Under this security model, the server is semi-trusted. It can make full use of the messages exchanged with the users but cannot invade the user system (that is, cannot obtain user runtime status information). The unforgeable security of the scheme can be reduced to the SM2 standard signature algorithm because the SM2 standard signature algorithm leaks more information to the server than the signature algorithm in the scheme. On the flip side, the messages obtained by the server from the signature algorithm in this scheme can be simulated by the SM2 standard signature algorithm. Therefore, if the server can successfully forge the digital signature in this scheme, there must be another attacker who can successfully forge the digital signature in the SM2 standard. Symmetry of scheme design. The calculations of A and S in the scheme are almost identical, so the roles of A and S can be interchanged when the scheme is applied.

5 Experimental Results We analyze the computation cost and communication cost of the MC-PKS in this section. In our experiments, we use a personal computer (Thunderobot with an Intel(R) Core(TM) i7-6700 K CPU @ 4.00 GHz processor, 16 GB main memory, and the Ubuntu 18.04.2 LTS operating system) as the server and use a personal mobile device(Samsung Galaxy C9 pro with a Quad-core 2.0 GHz processor, 6 GB memory, and the Google Android 8.0.0 operating system) as the user. Then, we have executed the above operations for 10,000 times to get the average running times. The results are listed in Table 4.

6 Conclusion In this paper, we propose a collaboration public key services system based on twoparty computation. The system is designed to mitigate key exposure attack. Our security and performance evaluations demonstrate the practicality of our system.

MC-PKS: A Collaboration Public Key Services System for Mobile …

685

Table 4 Running times of related processes Algorithm

Key-size (bits)

Key generation (ms)

CoKey-generation (ms)

Signature (ms)

Verify (ms)

RSA

1024

478



0.166

0.012

CoRSA

1024

478

0.084

17

0.052

RSA

2048

2243



1.152

0.035

CoRSA

2048

2243

0.118

25

0.083

SM2

256

23



0.039

0.116

CoSM2

256

23

2.572

18.653

1.046

Acknowledgements This work is supported by the National Natural Science Foundation of China (Nos. 61572028, 61672243), the National Cryptography Development Fund (No. MMJJ20180206), the National Science Foundation of Guangdong Province (No. 2019A1515011797) and the Project of Science and Technology of Guangzhou (201802010044), the State Scholarship Fund of China Scholarship Council (CSC) (Grant No. 201808440097), and the Research Team of Big Data Audit from Guangdong University of Finance and Economics.

References 1. Buchmann, J.A., Karatsiolis, E., Wiesmaier, A.: Introduction to public key infrastructures (2013) 2. Rivest, R., Shamir, A., Adleman, L.M.: A method for obtaining digital signatures and public-key cryptosystems. Commun. ACM 26(2), 96–99 (1978) 3. CNNIC: Public key cryptographic algorithm SM2. https://cnnic.com.cn/ScientificResearch/ LeadingEdge/soea/SM2/201312/t20131204_43349.htm. Last Accessed 21 July 2019 4. Johnson, D., Menezes, A., Vanstone, S.: The elliptic curve digital signature algorithm (ecdsa). Int. J. Inf. Secur. 1(1), 36–63 (2001) 5. Harn, L.: Comments on ‘fair (t, n) threshold secret sharing scheme’. IET Inf. Secur. 8(6), 303–304 (2014) 6. Harn, L., Fuyou, M.: Multilevel threshold secret sharing based on the chinese remainder theorem. Inf. Process. Lett. 114(9), 504–509 (2014) 7. Shamir, A.: How to share a secret. Commun. ACM 22(11), 612–613 (1979) 8. Kumar, R., Verma, H. K.: An advanced secure (t, n) threshold proxy signature scheme based on rsa cryptosystem for known signers. In: IEEE 2nd International Advance Computing Conference (IACC). pp. 293–298 (2010) 9. Muxiang, Y., Fan, H., Minghui, Z., Jun, L.: Efficient and robust two-party rsa key generation. Wuhan Univ. J. Nat. Sci. 11(6), 1617–1620 (2006) 10. Xiong, H., Li, F., Qin, Z.: Certificateless threshold signature secure in the standard model. Inf. Sci. 237, 73–81 (2013) 11. Rabin, M.O.: How to exchange secrets with oblivious transfer. IACR Cryptol. ePrint Arch. 2005, 187 (2005) 12. Yao, A.C.: Protocols for secure computations. In: 23rd Annual Symposium on Foundations of Computer Science, pp. 160–164 (1982) 13. Wu, L., Wang, J., Choo, K.R., He, D.: Secure key agreement and key protection for mobile device user authentication. IEEE Trans. Inf. Forensics Secur. 14(2), 319–330 (2019)

686

T. Sun et al.

14. Ma, C.S., Zheng G.: RSA cloud signature generation method (CN Patent 108923911A 2018) 15. Merkle, R.C.: Secure communications over insecure channels. Commun. ACM 21(4), 294–299 (1978)

Security Analysis and Improvement of User Authentication Scheme for Wireless Body Area Network Songsong Zhang, Xiang Li, and Yong Xie

Abstract Wireless body area network as a promising technology has been widely known can make the medical system more convenient. However, the rise of cloud computing and smart medical system has made patient data quite fragile. In this case, a perfect authentication system is particularly important. A secured authentication system ensures that only legitimate patients can obtain permission to access the information. This paper reviews and points out the shortcomings of the Sharma et al.’s scheme in terms of forward security and analyzes that the scheme cannot resist some attacks. We propose an improved scheme. The security and the performance analysis show the proposed scheme is more secure and efficient. Keywords Wireless body area network · Anonymity · Authentication scheme · Security analysis

1 Introduction The development level of medical technology is directly linked to people’s quality of life. Healthcare industry can provide protection for patients’ help and facilitate hospital management. Therefore, in the actual application of technology, the relevant departments of the hospital should effectively introduce the Internet of things technology and effectively identify the medical equipment and information monitoring systems to improve the hospital’s service quality. The wireless body area network is composed of a series of sensor nodes and personal smart devices, which is an important application of the Internet of things in smart medical care. The physiological information of the individual is collected by sensors deployed around the human body. These sensor nodes can use physiological signals (such as temperature, blood sugar, and blood pressure.), human activities or motion signals, and environmental information of the human body. And then sensors send them to diagnostic which analyzes on the telemedicine side and the diagnostic results are returned by S. Zhang · X. Li · Y. Xie (B) Department of Computer Technology and Application, Qinghai University, 810016 Xining, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_67

687

688

S. Zhang et al.

telemedicine. Although this method is more convenient, the cost of storage, power, and algorithm calculation of the server of the remote medical diagnosis end point has higher requirements for the base station. Although there already have dozen of protocols for the medical professionals, gateways and sensors to maintain the data security, unfortunately, most of these schemes have been demonstrated to be flawed or lack of desired security features. In recent years, more and more related works about these problems have been found. In the communication process, only nodes could be trusted and allowed to participate in the communication between systems. Chakravorty [1] introduced the service architecture for mobile patient care. It was detected by deploying medical sensors on patients and provided the software to dynamically implement clinical services necessarily. And the author further discussed the confidentiality of the system, the integrity of the data, and the authentication and encryption issues. Kim et al. [2] discussed some of the security requirements in smart medical system. They proposed a system security policy that only allowed patients to access sensitive data. Bao et al. [3] proposed biometrics by the method of authentication. But this technique is only used for sensors with biometrics. Jeong et al. [4] began to innovate and proposed a distributed system framework by dividing the collected data. The corresponding users were given corresponding access rights. However, Khan et al. [5] have found some security weaknesses in the DAS protocol. Since then, there has been a lot of work to handle WSN user authentication. ECC is not efficient enough for user authentication in WMSNS. Recently, Kumar et al. [6] proposed a new WMSNS authentication protocol. Their protocol is valid because they only use symmetric encryption and hash functions to secure communications. Unfortunately, their agreement is vulnerable to certain attacks. Subsequently, He et al. [7] proposed a robust WMSNS anonymous authentication protocol to eliminate these shortcomings. However, we found that the authentication process was incorrect, so their agreement could not achieve proper mutual authentication. In this paper, we use Sharma et al.’s scheme [8] as a case study and demonstrate the subtleties and challenges in designing a practical user authentication base healthcare services scheme preserving user privacy. We reveal that it cannot achieve the claimed security and privacy targets. Then, we present an improved scheme and show that the new protocol fulfills session key security. Additionally, performance analysis shows that our proposed protocol is a practical solution, which provides a reasonable balance between security and efficiency.

2 Analysis of Sharma et al.’s Scheme The scheme proposed by Sharma et al.’s claims to be safe and able to withstand some attacks. But through our analysis, we found that it is not a perfect scheme in some aspect.

Security Analysis and Improvement of User Authentication Scheme …

689

(1) Not provide anonymity. According to the definition of Sharma’s scheme, each registered doctor can compute H (K ) = ci ⊕ H (MPSi ||bi ) after he/she has input correct I di and P Si . Assume A is a malicious registered doctor. A obtains H (K ) firstly, then he/she can get anyone’s message V1 , V2 , V3 , T1 , IdSNi  and V1 , V2 , V3 , T1 , T2 , MIdSNi , V4 , V5  from public communication channel. Next, A can reveal the doctor’s identity by I di = V1 ⊕ H (H (K )||T1 ), and also reveal the sensor identity by IdSNi = MIdSNi ⊕H (H (K )||T2 ). Therefore, Sharma’s scheme can not provide anonymity. (2) Be not secure against to forward security. In Sharma’s scheme, the doctor and patient’s sensor node can obtain a session key in authentication process. The session key is calculated by Sk = H (Ni ||N j  ). N j  is obtained by N j  = V6 ⊕ H (bi ||T3 ), where V6 and T3 are sent via public channel. Assume an adversary A always monitors a particular doctor communication for a long time. If A obtains bi , he/she can reveal all of previous session key. Therefore, Sharma’s scheme cannot provide forward security. (3) No security for K. stored in each sensor In Sharma’s scheme, K is the key of registration center’s secret key for the gateway node. It is the core secret value of system security. If it leaks, the whole system is not safe at all. As we all know, the value in sensor nodes can be obtained without a particular difficulty; these nodes are unlikely to have particularly high technical anti-leakage techniques because of cost. Therefore, Sharma et al.’s scheme cannot meet the security requirements of wireless body area networks.

3 The Proposed Scheme In this section, we present a new scheme which can withstand all know passive and active attacks. To fix vulnerability, we make the following changes to the register phase and authentication (Table 1). To initialize the system, the gateway selects the number according to the Ellipse Encryption Algorithm (ECC) to compute for the next section. Table 1 Notations used in the proposed scheme

Notation

Description

Ui

Medical professional

GN

Gateway node

Idi

Unique identity of Ui

PWi

Password of Ui

Id j

Sensor’s identity

690

S. Zhang et al.

The GN runs this phase with security level parameter l as follows. Let P be one of generators of G. GN chooses x ∈ Z q∗ for each GN and computes Ppub = x P as its public key. Then choose four one-way hash functions h(•) → Z q∗ .

3.1 The Registration Phase The medical profession registration phase is as follows: Sept 1: The medical profession Ui chooses the identity Idi , password PWi . Ui sends the message Idi to GN to register. Sept 2: The gateway selects n i ∈ Z q∗ , and computes K i = h(Idi ||x||n i ) and sends   K i , Ppub , l, h() to Ui .   = Sept 3: After receiving the K i , Ppub , l, h() , Ui computes the Vi  ||PW ) mod l), K = K ⊕ h (Id ||PW ) and stores the h(h(Id i i 1 i i i    i K i , Ppub , l, h, Vi into his/her smart devices. The patient sensor registration phase is as follows: When a user sensor (I d j be identity) is registered with GN; GN computes and sends L j1 = h(Id j ||x||n i ) and L j2 = h(h(Id j ||n j )||h(K i )) to sensor in a secure way. Then, the sensor stores L j1 and L j2 . GN also sends Id j to corresponding medical professional.

3.2 The Login and Authentication Phase After a successful registration, the doctor can connect to the sensor node. In this process, the sensor nodes, gateways, and medical profession and patient can authenticate each other. Sept 1: The professional Ui inputs his/her Idi and PWi into smart device. Sept 2: The smart device Vi ? = h(h(Idi ||PWi ) mod l) is using the  K i , Ppub , l, h, Vi . If the condition holds, the smart device accepts the login request of Ui and computes K i = K i ⊕ h(Idi ||PWi ). Else, login request is declined. Sept 3: The gateway GN selects di ∈ Z q∗ and computes Dg = dg P. Next, GN sends   the msg1 = Dg to Ui . Sept 4: When the login request is accepted, the Ui selects di ∈ Z q∗ and generates a current timestamp T1 .Ui computes Di = di P, AIDi = Idi ⊕ h(di Dg ||Di Ppub ||T1 ), SId j = Id j ⊕ h(di Dg ||Di Ppub ||T1 ||Idi ), M1 = h(Idi ||IdSNi ||Di ||di Dg ||K i ). Next the Ui transmits the msg2 = AIDi , SIdi , Di , T1 , M1  to the GN. AS the GN receives the message, it

Security Analysis and Improvement of User Authentication Scheme …

Sept 5:

Sept 6:

Sept 7:

Sept 8:

691

generates a current timestamp Tcur and checks if Tcur − T1 < T , where T is the maximum transmission delay. If the condition holds true, GN generates a fresh timestamp T2 , and calculate Idi = AIDi ⊕h(di Dg ||Di Ppub ||T1 ), Id j = SId j ⊕h(di Dg ||Di Ppub ||T1 ||Idi ). Then the GN searches n i , n j from database and computes K i = h(Idi ||x||n i ), M1 ? = h(Idi ||Id j ||Di ||di Dg ||K i ). If it is true, the GN calculates L j1 = h(Id j ||x||n i ), L j2 = h(h(Id j ||n j )||h(K i )), K i∗ = h(K i ) ⊕ h(Id j ||dg P j ||L j1 ||n j ) M2 = h(Id j ||Di ||AIDi ||T2 ||T1 ||h 1 (K i )||dg P j ||Dg ||L j1 ||L j2 ) and send the msg3 = AIDi , Di , Dg , T1 , T2 , K i∗ to sensor Id j . The Id j verifies the timestamp Tcur − T2 < T . If the condition is true, the Id j computes h(K i ) = K i∗ ⊕ h(Id j ||x j Dg ||L j1 ||n j )  = h(h(Id j ||n j )||h 2 (K i )), M2 ? = and examines L j2 ?  h(Id j ||Di ||AIDi ||T2 ||T1 ||h 1 (K i )||dg P j ||Dg ||L j1 ||L j2 ), If it is true, the Id j selects d j ∈ Z q∗ and generates timestamp T3 . Then, it computes D j = d j P, M3 = h(Id j ||h(K i )||d j Di ||T3 ||T1 ||AIDi ||Dg ), M4 = h(Id j ||L j1 ||h(K i )||d j Dg ||L j2 ) and SK = h(Id j ||h(K i )||d j Di ||T3 ||T1 ) Next, Id j send msg4 = T3 , DSN , M3 , M4  to GN. On receiving the msg4 = T3 , DSN , M3 , M4 , GN verifies the Tcur − T3 < the M4 ? = T and generates the T4 . If the conditions are true, GN computes  h(Id j ||L j1 ||h(K i )||dg D j ||L j2 ) and transmits msg5 = T4 , T3 , D j , M3 to Ui . Ui examines Tcur − T4 < T and ||T3 ||T1 ||AIDi ||Dg ) that if it is true. Ui calculates the session SK = h(Id j ||h(K i )||di D j ||T3 ||T1 ).

4 Performance Analysis In this section, the performance analysis of security requirement and computation cost is presented among four authentication schemes for WBANs, that are the proposed authentication scheme, Sharma et al.’s scheme [8], He et al.’s scheme [7], and Li et al.’s scheme [9]. The most important requirement of an authentication scheme is security. To this end, we first analyze the security of these four authentication schemes. Let sr1, sr2, sr3, sr4, sr5, sr6, sr7, sr8, sr9, and sr10 denote the security requirements of mutual authentication, forward secrecy, malicious user attack, user anonymity, replay attack, online password guessing attack, insider attack, hidden server attack, offline password guessing attack, and spoofing attack, respectively. According to the definition of the four schemes, we can draw the security comparison of the four authentication schemes as shown in Table 2. Tip: Yes denotes scheme meets the corresponding security requirements. No denotes vice versa. Therefore, the proposed scheme can meet all security requirements of WBANs.

sr1

No

Yes

Yes

Yes

Scheme

Sharma ‘s

He et al.’s

Li et al.’s

Our

Yes

No

No

No

sr2

Yes

No

No

No

sr3

Yes

Yes

Yes

No

sr4

Table 2 Security comparison of the four authentication schemes

Yes

No

No

Yes

sr5

Yes

No

No

Yes

sr6

Yes

Yes

Yes

Yes

sr7

Yes

Yes

Yes

Yes

sr8

Yes

No

Yes

Yes

sr9

Yes

No

No

Yes

sr10

692 S. Zhang et al.

Security Analysis and Improvement of User Authentication Scheme … Table 3 Computation cost comparison of the four scheme

693

Scheme

Medicine professional

Sensor node

Sharma ‘s scheme

11Th

5Th

He et al.’s scheme

3Ts + 5Th

3Ts + 4Th

Li et al.’s scheme

3Ts + 6Th

3Ts + 5Th

Our proposed scheme

3Tm + 5Th

3Tm + 5Th

Next, we analyze computation cost in the authentication phase of the four schemes. Table 3 lists the computation costs of medicine professional in the authentication process. The three main computation costs are considered in the comparison: symmetric decryption/encryption function (Ts for short), Hash function (Th for short), and scalar multiplication (Tm for short). Other operations are ignored for they are less than the three operations. As shown in Table 3, the proposed scheme uses scalar multiplication of ECC to ensure the security requirements, such as forward security and user anonymity. Therefore, the proposed scheme is slightly more than that of He et al.’s scheme and Li et al.’s scheme, but the proposed scheme meets all the security requirements of WBANs, while the other three schemes cannot meet the security requirements. Therefore, the increased computational overhead is worthwhile.

5 Conclusions In this paper, we reviewed Geeta Sharma et al.’s scheme and pointed out it losses forward security and lacks user anonymity. Then, we have presented an improved scheme and demonstrated the comparison about the security and computation cost. Detailed heuristic security analysis is capable of withstanding a variety of attacks, and provides desired security features. In addition, performance analysis shows that we have performance differences compared to the original solution, but security performance is greatly improved to authentication.

References 1. Chakravorty, R.: A programmable service architecture for mobile medical care. In: 4th IEEE International Conference on Pervasive Computing and Communications (2006) 2. Kim, J., Beresford, A.R., Stajano, F.: Towards a security policy for ubiquitous healthcare systems. In: Proceedings of the 1st International Conference on Ubiquitous Convergence Technology, pp. 263–272 (2006) 3. Bao, S.D., Zhang, Y.T., Shen, L.F.: Physiological signal based entity authentication for body area sensor networks and mobile healthcare systems. In: Proceedings of the 27th Annual International Conference of Engineering in Medicine and Biology Society, pp. 2455–2458 (2005)

694

S. Zhang et al.

4. Jeong, C.W., Kim, D.H., Joo, S.C.; Mobile Collaboration framework for u-healthcare agent services and its application using PDAs. In: Proceedings of the 1st KES International Symposium on Agent and Multi-Agent Systems: Technologies and Applications, pp. 747–756 (2007) 5. Khan, M.K., Alghathbar, K.: Cryptanalysis and security improvements of ‘two-factor user authentication in wireless sensor networks’. Sensors 10(3), 2450–2459 (2010) 6. He, D.B., Kumar, N., Chen, J.H., Lee, C.C., Chilamkurti, N., Yeo, S.S.: Robust anonymous authentication protocol for health-care applications using wireless medical sensor networks. Multimed. Syst. (in press). https://doi.org/10.1007/s00530-013-0346-9 7. He, D., Kumar, N., Chen, J., Lee, C.C., Chilamkurti, N., Yeo, S.S.: Robust anonymous authentication protocol for health-care applications using wireless medical sensor networks. Multimed Syst 21(1), 49–60 (2015) 8. Sharma, G., Kalra, S.: A lightweight user authentication scheme for cloud-IoT based healthcare services. Iran. J. Sci. Technol., Trans. Electr. Eng. 1–18 (2018) 9. Li, X., Ma, J., Wang, W.D., Xiong, Y.P., Zhang, J.S.: A novel smart card and dynamic ID based remote user authentication scheme for multi-server environments. Math. Comput. Model. 58(1), 85–95 (2013)

Research and Implementation of Hybrid Encryption System Based on SM2 and SM4 Algorithm Zhiqiang Wang, Hongyu Dong, Yaping Chi, Jianyi Zhang, Tao Yang, and Qixu Liu

Abstract In recent years, the mobile platform network communication performance has made significant progress, with an increasingly large user base and market platform. At the same time, it also brings many problems such as the leakage of sensitive information after the loss of smartphones, the theft and tampering of private information. Aiming at the above problems, this paper proposes a hybrid cryptosystem based on the national secret algorithm SM2 and SM4 and its system solution for implementing secure communication. The asymmetric encryption algorithm SM2 and the symmetric encryption algorithm SM4 are combined to encrypt the key and the plaintext information of the symmetric encryption algorithm to achieve the double encryption effect. The experimental results show that the system designed in this paper improves the security of information transmission and key sharing. Keywords Android · National secret hybrid algorithm · Information encryption · Data security · Terminal interaction

Z. Wang · H. Dong · Y. Chi (B) · J. Zhang Beijing Electronic Science and Technology Institute, Beijing, China e-mail: [email protected] J. Zhang e-mail: [email protected] Z. Wang State Information Center, Beijing, China Z. Wang · T. Yang Key Lab of Information Network Security, Ministry of Public Security, Shanghai, China Q. Liu Key Laboratory of Network Assessment Technology, Institute of Information Engineering, Chinese Academy of Sciences, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_68

695

696

Z. Wang et al.

1 Introduction With the rapid development of the Internet and communication technologies, the mobile platform network communication performance has made significant progress. However, although mobile communication can bring great convenience to human life and work, its potential security problems are also very significant. In current network communication applications, communication data between end users is mostly transmitted in clear text, which poses a great security risk, as shown in Fig. 1. With the extensive use of Android smartphones, the terminal applications of the Android platform are also more colorful. For example, the mobile terminal short message application can not only transmit traditional text information, but also can transmit pictures, videos, audios, and the like. Users also use SMS applications to transmit information such as network transaction verification codes that involve personal privacy, and such information is likely to be intercepted and stolen, causing serious economic losses to users. Therefore, it is of great practical significance to study the end-to-end encryption system of Android platform and its key technologies. There are more or less problems that cannot be ignored in the existing SMS encryption system. For example, when the key is encrypted and decrypted, two mobile terminals are required to complete the exchange of keys. There is no unified server to manage the stored key information. The encryption mechanism adopted by the encryption application on the market cannot guarantee the effective security of the system. This paper proposes a hybrid cryptosystem based on the combination of the national secret SM2 algorithm and the SM4 algorithm, combining the advantages of symmetric cryptosystem and asymmetric cryptosystem. Hash algorithm is used to hash the plaintext to verify the integrity of the information, which can effectively improve the security and efficiency of information transmission. The advantages of work can be summarized as follows. • We implemented a hybrid encryption system based on the national secret SM2 algorithm and the SM4 algorithm. • The secure hash algorithm is used to compare the plaintext before and after the transmission, and the user identity is verified to further improve the security of short message transmission and key sharing. • Our improved system protection technology can effectively prevent cracking techniques such as interception, packet capture, and crawling. • Experiments show that our system can effectively improve the efficiency of information encryption, reduce resource consumption, and improve the security of information transmission and key sharing.

Fig. 1 Clear transmission mode

Research and Implementation of Hybrid Encryption System Based …

697

2 Related Work The research on information encryption of Android platform has been carried out at home and abroad. Li et al. [1] and others proposed an Android short message encryption scheme based on dynamic key, which uses dynamic key, hash, and symmetric encryption algorithm to encrypt the short message data. Liu Hui et al. [2] proposed an end-toend secure short message system based on the public key encryption of the Symbian OS platform. In foreign countries, many experts have also studied the issue of information security. In terms of transmission structure, De Santis et al. [3] proposed a secure extensible and efficient SMS (SEESMS) information transmission framework based on client/server architecture. RSA algorithm is used to encrypt short messages and sign information. Johnny et al. [4] proposed a short message security system called SMSSec, which can be used for end-to-end information security communication. In addition, there is a short message communication architecture based on the SMS user identity authentication protocol MSCP [5] and trusted SMS [6] security system. These security systems, which often require hardware equipment and system management problems caused by a large number of users, still need to be further improved.

3 Basic Concept 3.1 The Basic Principle of SM2 Algorithm SM2 algorithm, a commercial cryptographic algorithm for China’s independent intellectual property rights, is one of the elliptic curve cryptography (ECC) algorithms. The computational complexity is exponential and the solution is difficult in the elliptic curve discrete logarithm problem. 1. select the element G of the elliptic curve Ep (a, b) such that the order n of G is a large prime number; 2. The order of G is the minimum n satisfying nG = O; 3. secretly select the integer k, calculate P = kG, then public (p, a, b, G, P), P is the public key, k is the private key; 4. Encryption M. Transform the message M into a point Pm in Ep (a, b), select the random number r, calculate the ciphertext Cm = (r G, Pm + r P). If r satisfies rG or rP is 0, reselect r; 5. Decrypt ciphertext Cm : (Pm + r P) − k(r G) = Pm + r kG − kr G = Pm . As a public key cryptography algorithm, the SM2 algorithm has the advantages of simple key distribution and management.

698

Z. Wang et al.

3.2 The Basic Principle of SM4 Algorithm The SM4 algorithm is a group symmetric cryptographic algorithm designed by China. The algorithm has a packet length of 128 bits and a key length of 128 bits [7]. 1. Define the reverse order transformation R as: R(A0 , A1 , A2 A3 ) = (A3 A2 , A1 , A0 ), A ∈ Z 232 , i = 0, 1, 2, 3. Let the plaintext input be  4  4 ((X 0 , X 1 , X 2 , X 3 ) ∈ Z 232 , the cipher text output is (Y0 , Y1 , Y2 , Y3 ) ∈ Z 232 , and the round key is r ki ∈ Z 232 , i = 0, 1, . . . , 31. 2. The encryption transformation of the SM4 algorithm is as follows: 3. X i+4 = F(X i , X i+1 , X i+2 , X i+3 , r ki ) = X i ⊕ T (X i+1 ⊕ X i+2 ⊕ X i+3 ⊕ r ki ), = R(X 32 , X 33 , X 34 , X 35 ) = i = 0, 1, . . . , 31. (Y0 , Y1 , Y2 , Y3 ) (X 35 , X 34 , X 33 , X 32 ). 4. The decryption transformation and encryption transformation structure of the SM4 algorithm are the same, the only difference is the order of use of the round key. 5. Wherein the order of use of the encrypted round key is: (r k0 , r k1 , . . . , r k31 ). 6. The order of use of the round key during decryption is: (r k31 , r k30 , . . . , r k0 ). The key length of the SM4 algorithm is 128 bits, which is higher in security than the 3DES algorithm. However, since the encryption and decryption keys are the same, the key needs to be transmitted to the other party through the private channel, and the risk of leakage is large. Hybrid encryption system for SM2 and SM4 algorithms In order to combine the advantages of the symmetric encryption algorithm and asymmetric encryption algorithm, this paper uses SM2 and SM4 hybrid encryption algorithm to encrypt and decrypt, uses asymmetric encryption algorithm SM2 to encrypt the key of symmetric encryption algorithm SM4, and encrypts plaintext information with encrypted key. There is no need to use secret channel to send keys, which makes the distribution and management of keys more simple and convenient. For the convenience of users, the system designed in this paper also provides receiver import and digital signature authentication functions to further improve the security of the information encryption transmission process, as shown in Fig. 2. Input information encoding It is used to deal with garbled characters that may occur when the Chinese system sends Chinese characters. Convert Chinese characters to Unicode encoding. The English and numeric ASCII codes are less than 128. According to this condition, it is judged whether the characters are Chinese characters. If it is a Chinese character, convert each character into a 16-bit Unicode code and add the Unicode escape character ‘\u’ to the front, then convert the plaintext into the corresponding hexadecimal string; After receiving the ciphertext, the receiver only needs to convert the Unicode code of ‘\u’ to Chinese after decryption to get the correct plaintext. Hybrid encryption and decryption of SM2 and SM4 algorithms In the encryption and decryption module, a hybrid encryption algorithm of SM2 and SM4 algorithm

Research and Implementation of Hybrid Encryption System Based …

699

Fig. 2 System module diagram

is used to encrypt plaintext. First, the ciphertext is encrypted by the key of the SM4 algorithm, the key of the SM4 algorithm is encrypted by the SM2 algorithm, and the ciphertext and the encrypted key are sent to the receiver together. Since the SM4 algorithm is a block cipher algorithm, the packet size of the encryption and decryption is 128 bits. If the message length is greater than 128 bits, it needs to be grouped, and if the message length is less than 128 bits, it will be padded. The SM4 algorithm adopts PKCS7 filling mode, and the insufficient part is filled with the number of bytes to be filled. If the data size is N times the block size, add a block that is all N. For example, when an 8-byte block needs to be filled with 4 bytes, it is filled as follows: . . . |DD DD DD DD DD DD DD DD|DD DD DD DD 04 04 04 04| The decryption process is similar to the encryption process. After receiving the ciphertext and the encryption key, the receiver decrypts the key of the SM4 algorithm according to the private key of the SM2 algorithm and then decrypts the ciphertext with the key of the SM4 algorithm to obtain the plaintext. Even if the ciphertext is intercepted during transmission, the illegal attacker cannot decipher the encrypted key, because the private key of the SM2 algorithm is stored on the receiver, let alone the ciphertext. Database import receiver After the sender enters the plaintext, the database technology is used to realize the quick import of contacts, as shown. The sender clicks the contact icon to add the recipient from the SQLite database that stores the contact information and can also store the new contact information into the database, providing a convenient and quick interface.

700

Z. Wang et al.

Digital signature authentication The digital signature authentication module is mainly for identity authentication to further ensure the security of information transmission. First, the plaintext is hashed to obtain a summary, and then the digest is encrypted by the private key of the SM2 algorithm to form a digital signature; the receiver compares the digests by the digital signature verification algorithm to verify the identity of the sender, and if the identity is the same, the identity verification succeeds. If they are not the same, they fail to pass the verification and request a retransmission.

4 System Implementation and Testing The SM2 algorithm and the SM4 algorithm hybrid encryption systems are applied to the Android platform, and three types of 6.2, 6.3.1, and 7.3 simulators are selected to test the algorithm functions.

4.1 Test Data We tested pure English, pure Chinese, pure numbers, and their mix of different data in different Android environments (Table 1).

4.2 Test Results Enter the plaintext in the message input box and click the ‘Send’ button. After the receiver receives the ciphertext, the system automatically performs digital signature authentication to verify the sender. If the verification is successful, the ciphertext is automatically decrypted, and some test results are shown in Fig. 3. Table 1 Test content

1

All chinese

Christie

2

All english

We are family

3

All number

3.1415926

4

Chinese and digital mixed

Marx 1818

5

English and digital mixed

Marxism-1840

6

Chinese and english mixed

Marx Marxism

7

Chinese, english, and digital mixed

Marx Marx-18

Research and Implementation of Hybrid Encryption System Based …

701

Fig. 3 Partial test results

4.3 Security Analysis In the hybrid cryptosystem, the security is determined by the symmetric cryptosystem and the asymmetric cryptosystem. First, compare the SM4 algorithm with the traditional symmetric cipher AES. The security of both algorithms is based on the diffusion provided by the nonlinear transformation and linear transformation of the S-box. The security of both algorithms is based on the diffusion effect provided by the nonlinear transformation and linear transformation of the S-box. In terms of safety, the two levels are equivalent. However, the process of generating keys by AES algorithm is cumbersome. According to the analysis, the SM4 algorithm and the AES algorithm are equivalent in terms of security, but the SM4 algorithm is simpler to implement and better than the AES algorithm. Compared with the traditional asymmetric cryptography RSA algorithm, the SM2 algorithm has a simple mathematical principle and a relatively low unit security strength. At present, the most effective attack method for the RSA algorithm, namely the number field sieve (NFS) method, is used to decipher and attack the RSA algorithm, and its decoding or solving difficulty is sub-index level. The mathematical theory of the SM2 algorithm is more esoteric and complex, and the unit security strength is relatively high. Using the internationally recognized Pollard’s rho method, the most effective attack method and ellipse curve cryptography (ECC) algorithms,

702

Z. Wang et al.

to decipher and attack the ECC algorithm, its deciphering or solving difficulty are basically exponential. The unit security strength of the SM2 algorithm is higher than that of the RSA algorithm, that is, to achieve the same security strength, the key length required by the SM2 algorithm is much lower than the RSA algorithm, and the short key means shorter processing time and key storage and space. In short, SM2 has the advantages of higher security performance, less computation, faster processing speed, and smaller storage space.

5 Conclusion The hybrid encryption system based on SM2 algorithm and SM4 algorithm implemented in this paper combines the advantages of symmetric cryptosystem and asymmetric cryptosystem, realizes fast encryption of information and safe, convenient management of keys. It greatly improves the encryption efficiency of SMS, is innovative, and takes into account the security, can also be transplanted by multiple platforms, easy to promote and implement. Acknowledgements This research was financially supported by the National Key Research and Development Plan (2018YFB1004101), Key Lab of Information Network Security, Ministry of Public Security (C19614), Special fund on education and teaching reform of Besti (jy201805), the Fundamental Research Funds for the Central Universities (328201804), and key laboratory of network assessment technology of Institute of Information Engineering, Chinese Academy of Sciences.

References 1. Li, Z., Wang, Y.W., Lei, L.G.: Android short message encryption scheme based on dynamic key. J. Grad. Sch. Chin. Acad. Sci. (03), 272 (2013) 2. Sun, H.R.: Research on smart phone sms encryption system based on AES algorithm. Heilongjiang University (2017) 3. De Santis, A., Castiglione, A., Cattaneo, G. et al.: An extensible framework for efficient secure SMS. In: International Conference on Cisis (2010) 4. Toorani, M., Beheshti Shirazi, AA. SSMS-A secure SMS messaging protocol for the m-payment systems[C]//. IEEE Symposium on Computers and Communications (ISCC’08). IEEE (2008) 5. Albuja, J.P., Camera, E.V.: Trusted SMS communication on mobile devices. Brazilian Workshop on Real-time and Embedded Systems (2009) 6. Hossain, M.A., Jahan, S., Hussain, M.M. et al.: A proposal for short message service in GSM. In: International Conference enhancing the security system of on Anti-Counterfeiting, Security and Identification. IEEE Xplore, pp. 235–240 (2008) 7. Nanda, A.K., Awasthi, L.K.: Secure SMS encryption using NTRU cryptosystem. J. Inf. Assur. Secur. (2012)

STL-FNN: An Intelligent Prediction Model of Daily Theft Level Shaochong Shi , Peng Chen , Zhaolong Zeng , and Xiaocheng Hu

Abstract Theft is a long-standing crime against property, which exists alongside the development of private ownership. If the time pattern of thefts could be found out well, police officers can take preventive measures in advance to control the occurrence of theft crimes. However, thieves are smart enough to pick targets randomly. This makes it difficult for police to predict accurately when and where the offenders would commit crimes. In this paper, STL-FNN is proposed based on a seasonal trend decomposition procedure based on loess (STL) and full-connected neural network (FNN),which is designed to predict daily theft level in order to find out when criminals are most likely to commit crimes. The empirical case of prediction of daily theft level in City B shows that the STL-FNN model is better than the other five traditional models for prediction of the long-term sequence (365 days). This model is expected to have high potential application value in the schedule of anti-theft activities planned by polices. Keywords Crime prediction · STL-FNN · Daily theft level

S. Shi · P. Chen (B) · Z. Zeng Department of Information Technology and Cyber Security, People’s Public Security, University of China, 102600 Beijing, China e-mail: [email protected]; [email protected] P. Chen · Z. Zeng Key Laboratory of Security Technology & Risk Assessment, Ministry of Public Security, 102600 Beijing, China X. Hu National Engineering Laboratory for Public Safety Risk Perception and Control by Big Data, 102600 Beijing, China China Academy of Electronics and Information Technology, 102600 Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_69

703

704

S. Shi et al.

1 Introduction In the practice of policing, theft, one of the oldest forms of crimes [1], frequently occurs. It is difficult to arrest these stealers sometimes, because it is very hard for victims to realize when, where, and how they are stolen. It also is nearly impossible for investigators to find out who these lawbreakers are to close cases based on few clues. In order to maintain the dignity of social legal system, police agencies want to find a better strategy to perceive, mine, analyze, and predict the crime to control and prevent theft crimes. At present, many business departments of police agencies only could adopt some relatively simple statistical methods to analyze the pattern of theft criminal activities, such as means analysis, cyclical analysis, regression analysis, and so on [2]. To a certain extent, these methods although could assist policemen in mining and analyzing periodicity and trend of criminal activities, they could neither help policemen know when, how, or where the crime will be committed in the future, nor alarm them to prepare something for the coming crimes. At present, some foreign researchers use time series to predict the trend of crimes, which has achieved some results. For example, Borowik et al. utilize Prophet to analyze crimes within a region of the Republic of Poland involving about 1.2 million crime events [3]. Chandra proposes an approach to find similar crime trends among various crime sequences of different crime locations based on dynamic time wrapping and parametric Minkowski modeland [4]. Yadav uses auto-regressive integrated moving average model to locate the offender site in advance with more accuracy [5]. At the same time, many Chinese experts and scholars also have done a lot of works on this aspect. For instance, Xie proposes a method based on recurrent LS-SVM with mixed kernel to do time series prediction [6]. Chen and Hu predict the number of reporting cases in Langfang City based on the Gray-Markov model [7]. Tu and Chen utilize a hybrid ARIMA-LSSVM model to forecast crime time series [8]. Liu uses a hybrid ANN-STARM model to predict the number of reporting case [9]. In general, these crime prediction works with time series are mainly divided into two parts, one is to use a single model, and the other is to utilize a complex model. Single or complex, these methods are only suitable for predicting changes in criminal activities for a short period, but not for a long term. What’s more, criminal activities is easily affected by multiple factors such as policing work by police, precautions taken by people, other uncertain factors, and so on. The data about crime time series is highly random, and it increases the difficulty of forecasting crime time series. It is very difficult for police to accurately predict the real trend of offenders’ committing crimes. Neither could a single or complex model alert policemen when offenders might commit crimes. But, a suitable method is required by police agencies in desperate need to perceive and predict changes in criminal activities over a long period in order to arrange annual plans to specifically target specific criminal activities to create a good social atmosphere. To this end, this paper proposes an STL-FNN model suitable for predicting a long-term crime time series. By introducing standard deviation classification (SDC), it is possible to effectively reduce the effects of irregular increase and decrease caused

STL-FNN: An Intelligent Prediction Model of Daily Theft Level

705

by the randomness of time series, which could narrow the difference between the predicted value and the actual value to improve the accuracy of long-term prediction. Police agencies would perceive the situation of the coming crimes and then take appropriate measures to prevent crime and arrange patrols. The left contact of this paper is organized as follows. In Sect. 2, we introduce each component of the STL-FNN model in detail so as to demonstrate our ideas more clearly. In Sect. 3, we will explain clearly how the SDC works. We also illustrate the measures of the performance of the STL-FNN model and use a sample data to demonstrate and verify the performance of STL-FNN model. Conclusions are provided in Sect. 4.

2 STL-FNN Model STL-FNN is a composite model composed of a seasonal trend decomposition procedure based on loess and full-connected neural network (see Fig. 1). Figure 1 shows the logical relationship between the STL module and the FNN module. The function of the STL module is to decompose the time series into three parts: trend, seasonal, and remainder. The function of the FNN module is to learn the periodic time series from the data and to predict what it is in the near future. The predicted value about the future is the linear superposition of the two parts, the predicted value of the trend term from the STL module and the predicted value of the periodic term from the FNN module. SDC would divide the predicted values about the daily theft into four levels: mild, medium, heavy, and severe, which illustrate the level of theft occurrence. The calendar of STL-FNN model could visually display the level of everyday. The following introduces STL and FNN, respectively.

2.1 STL Cleveland proposed a time series decomposition method [10], STL, a seasonal trend decomposition procedure base on loess. It is a filtering procedure for decomposing a time series. It treats time series as a linear superposition process of three components: trend, seasonal, and remainder. It is defined as follows: Fig. 1 STL-FNN Model

706

S. Shi et al.

Y (t) = T (t) + S(t) + R(t)

(1)

That is, the data, the trend component, the seasonal component, and the remainder component are denoted by Y (t), T (t), S(t), and R(t), respectively, for t = 1 to N. STL has a simple design that consists of a sequence of applications of the loess smother. The simplicity allows analysis of the properties of the time series and supports fast computation, no matter how long and complex the time series are and how large the amounts of trend and smoothing are. The STL model could not be affected by abnormal data and abnormal seasonal factors and is very robust.

2.2 FNN FNN is a nonlinear model that evolves based on the working principle of the bionic human brain nervous system, which could fit complex nonlinear systems. All nodes of two adjacent layers are connected to their neighbors in FNN. That is, nodes in the nth layer are connected to the node in the (n − 1)th layer. Equation (2) is denoted as follows. ⎞ ⎛ n  (2) wjxj⎠ yi = f ⎝ j=1

The input value of the activation function of each node in the nth layer is the weighted average of all the neural nodes in the (n − 1)th layer. yi is the input value of the ith node in the (n − 1)th layer. The activation function of ith node in the nth layer is f. The corresponding weight value is wi . In this paper, there are eight hidden layers in FNN and 365 nodes in each hidden layer. The activation function is rectified linear unit (ReLU). In total, there are 2937 parameters.

3 Sample Data In order to avoid geographical discrimination, we will name the city we are researching about the theft cases as B City. There are 519,337 recorded cases about theft in B City from 2004 to 2014. Before embarking on our formal research, we need to convert the recording cases log data into time series. The theft time series are measured in days and have 4018 observations totally. The number of theft cases is increasing on the whole, which makes our crime prediction even more meaningful.

STL-FNN: An Intelligent Prediction Model of Daily Theft Level

707

3.1 Standard Deviation Classification SDC is applied widely, which could show the difference between the data distribution and the average by dividing the data into several intervals. In this paper, we use SDC to divide the predicted values into four levels: mild, medium, heavy, and severe. It is defined as follows: ⎧ Mild(Color: Green) Min ≤ Value < μ − σ ⎪ ⎪ ⎨ Medium(Color: Yellow) μ − σ ≤ Value < μ SDC = (3) ⎪ Heavy(Color: Orange) μ ≤ Value < μ + σ ⎪ ⎩ Severe(Color: Red) μ + σ ≤ Value ≤ Max The Value is the numerical about predicted and real value of daily theft occurrence. The Min is the minimum of the Value, The μ is the mean of the Value. The σ is the standard deviation of the Value. The Max is the maximum of the Value. SDC could help the policemen know at which level the daily theft is. In other words, police agencies can perceive the time pattern of offenders’ activities.

3.2 Measures of Performance We apply some measurement methods in machine learning to measure the STLFNN model, precision, recall, accuracy, and kappa, which can reasonably reflect the predictability of the trained model [11]. They are defined as follows. Kappa =

Pr(a) − Pr(e) 1 − Pr(e)

Precision = Recall = Accuracy =

TP TP + FP

TP TP + FN

TP + TN TP + TN + FP + FN

(4) (5) (6) (7)

In these formulas, true positive (TP) means the number of instances correctly classified as the level that the daily theft is at. True negative (TN) means the number of instances correctly classified as not the level that degree the daily theft is at. False positive (FP) means the number of instances incorrectly classified as the level that the daily theft is at. False negative (FN) means the number of instances incorrectly classified as not the level that degree the daily theft is at. Pr(a) refers to the proportion of the actual agreement and Pr(e) refers to the expected agreement between the

708

S. Shi et al.

classifier and the true values, under the assumption that they were chosen at random. These measurement methods could help us know how well the STL-FNN model works.

3.3 Prediction Results The STL-FNN model was trained with the time series from 2004 to 2013 as the training set and the time series in 2014 as the test set. The actual value and the predicted value are displayed in the form of a calendar chart as follows (Figs. 2 and 3). Comparing the calendar of the actual level of daily theft with the one of predictive level, we find that the predictive chart is very similar to the real level of theft occurrence. We will give a few examples to illustrate that the performance of the STL-FNN model is greet. There are 19 days in April at which level of theft and the STL-FNN model could predict precisely 13 of them. There are 7 days at which level of theft occurrence is heavy in January and five of them are accurately predicted. There are 23 days at which level of theft is heavy in July and nineteen of them are accurately predicted.

Fig. 2 The actual level of daily theft

STL-FNN: An Intelligent Prediction Model of Daily Theft Level

709

Fig. 3 The predictive level of daily theft

3.4 Performances of the STL-FNN Model The accuracy represents the ability of correct classification about four levels. The precision is defined as the proportion of positive examples that are truly positive. The recall is a measure of how complete the results are. The precision and the recall represent the ability of classifying the daily theft level as the class we are interested in. Kappa statistic is used to indicate the agreement between the model’s prediction and true values. Additionally, Precision1 , Precision2 , Precision3 , Precision4 stand for the values of precision about the Mild, the Medium, the Heavy, and the Severe respectively. Recall1 , Recall2 , Recall3 and Recall4 stand for the values of recall about the Mild, the Medium, the Heavy, and the Severe respectively. To make the results more objective, STL model is compared with other mainstream time series prediction models, such as Holt-Winter, LSTM, Prophet, and ARIMA. The results are shown as follows (see Table 1). Comparing the STL-FNN model with other models, we find that the STL-FNN is a good predictive model for its high scores in all the measurement methods we mentioned above. These models, Holt-Winter, LSTM, Prophet, and ARIMA, could not distinguish one or more levels of daily theft, which makes the STL-FNN model more excellent. The average accuracy is 0.6247. In other words, the model could correctly predict the crime risk level of 228 days in a year. In general, it seems that STL-FNN is the most suitable model to predict daily theft level.

710

S. Shi et al.

Table 1 Comparison of different models Model

STL-FNN

Holt-Winter

LSTM

Prophet

ARIMA (5, 1, 1)

Precision1

0.6809

0.3635

0.0001

0.0001

0.0001

Precision2

0.6412

0.2990

0.4913

0.3883

0.3507

Precision3

0.6181

0.4217

0.5957

0.4277

0.0001

Precision4

0.5349

0.5000

0.4634

0.0001

0.0001

Recall1

0.6531

0.0816

0.0001

0.0001

0.0001

Recall2

0.6562

0.2266

0.8828

0.6250

0.9995

Recall3

0.6181

0.7292

0.3889

0.4722

0.0001

Recall4

0.5228

0.0909

0.4318

0.0001

0.0001

Accuracy

0.6247

0.3890

0.5151

0.4055

0.3507

Kappa

0.4537

0.0317

0.3945

0.0566

0.0001

4 Conclusion This paper designs a model of forecasting the level of daily theft. The results show that the STL-FNN model has a good prediction ability and a good credibility for predicting which level the daily theft is at. We hope this model could assist the police agencies to perceive the time pattern of committing crimes activities of the lawbreakers. When police agencies arrange specific plans about crime prevention and fighting activities, STL-FNN model can assist policemen to make a better decision to decide on which date policemen should make patrol plans and crime control plans. Due to the confidentiality of policing information, the shortcomings of this work are failure to obtain the recent data about the theft. We fail to provide substantial assistance to the current policing work. Therefore, the next stage of this paper will further optimize the STL-FNN model and use the latest data of the theft to provide useful help for policemen to combat and control crimes. Acknowledgements This work was supported by Natural Science Foundation project (71704183) and Beijing Natural Science Foundation (9192022). Also, it is grateful to the sponsorship from foundation of National Engineering Laboratory for Public Safety Risk Perception and Control by Big Data and National Engineering Laboratory for Public Safety Risk Perception and Control by Big Data.

References 1. Song, L.G., Zhang, L.F.: a new interpretation of the crime of theft stealing mode. Hebei Law Sci. 33(8), 94–100 (2015) 2. Huang, C., Li, J.H.: Method of crime prediction. J. JiangSu Police Off. Coll. 26(1), 107–110 (2011) 3. Grzegorz, B., Zbigniew, M.W., Paweł, C.: Time series analysis for crime forecasting. In: 26th International Conference on Systems Engineering, pp. 1–10. IEEE, Sydney, Australia (2018)

STL-FNN: An Intelligent Prediction Model of Daily Theft Level

711

4. Chandra, B., Gupta, M., Gupta, M.P.: A multivariate time series clustering approach for crime trends prediction. In: 2008 IEEE International Conference on Systems, Man and Cybernetics, pp. 892–896. IEEE, Singapore (2008) 5. Yadav, R., Kumari Sheoran, S.: Crime prediction using auto regression techniques for time series data. In: 3rd International Conference and Workshops on Recent Advances and Innovations in Engineering, pp. 1–5. IEEE, Jaipur, India (2018) 6. Xie, J.H.: Time series prediction based on recurrent LS-SVM with mixed kernel. In: 2009 Asia-Pacific Conference on Information Processing, pp, 113–116. IEEE, Shenzhen, China (2009) 7. Chen, P., Hu, S.Y., Luo, W.J.: Study about crime reporting forecasting based on Grey-Markov Model. China Public Security. Acad. Ed. 2, 32–35 (2014) 8. Tu, X.M., Chen, G.Q.: A hybrid ARIMA-LSSVM model for crime time series forecast. Comput. Technol. Appl. 41(2), 160–163 (2015) 9. Liu, M.L., Gao, J., Huang, H.Z.: A model of crime intelligence prediction based on a hybrid model of spatio-temporal sequence. J. Intell. 37(9), 27–31 (2018) 10. Cleveland, R.B., Cleveland, W.S., McRae, J.E.: STL: a seasonal_trend decomposition procedure base on loess. J. Off. Stat. 6(1), 3–73 (1990) 11. Brett, L.: Machine learning with R. PACKT Publishing Ltd, Birmingham, UK (2016)

WeChat Public Platform for Customers Reserving Bank Branches Based IoT Jie Chen, Xiaoman Liang, and Jian Zhang

Abstract With the development of the social economy, the amount of currency circulation has increased and become more frequent, but the customer gathering often occurs in many bank’s business. In this paper, with some framework technology, Spring Boot and MyBatis, a WeChat public platform software is developed for customers who are available to book branch business, such as branch service reservation, bank business reservation, reservation information inquiry and so on. Combined with WeChat public number and small program, the software offers humanized service and simple operation. Therefore, it can meet the needs of users who can choose a reasonable time to go to the ideal branch to handle their business quickly, which not only saves users’ time, but also improves the efficiency of the bank’s system. Keywords Reservation · Branch · WeChat public platform

1 Introduction Since the reform and opening up, China’s economic construction has achieved remarkable achievement, and China’s economy develops rapidly. In China, people’s life is increasingly rich, and trade activities become increasingly complex. As a result, the banking business volume continues to increase, and the business volume of each branch is very random, which often leads to a phenomenon that a lot of customers spend much time to wait for business in many branches [1–3]. The occurrence of this phenomenon not only leads to an impatience and boredom of the J. Chen (B) · X. Liang · J. Zhang College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] X. Liang e-mail: [email protected] X. Liang · J. Zhang Hunan Provincial Key Laboratory of Intelligent Information Processing and Application, 421002 Hengyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_70

713

714

J. Chen et al.

customers on the spot, but also causes more pressure of the staff. And at the same time, it makes the customers to waste time and wait a long time. The WeChat public platform combines Internet of Things technology with deep neural network technology and can construct multi-layer neural network to interpret images [4, 5], sounds and texts [6, 7] by simulating the mechanism of human brain. With its advantages of “micro, small and light,” WeChat public platform applet has quickly been favored by people who work at different industries since its appearance. It is likely to replace the traditional customer service platform by effectively remedy the deficiency of the traditional customer service platform [8–10]. Therefore, developing a WeChat platform for customers to reserve bank branch business can take advantage of the trend. The WeChat platform [8, 9, 11] can balance business for banks, use human resources effectively and improve the efficiency of business handling. And customers can enjoy convenient and fast services. At the same time, it can avoid the servers who have a bad mood which brought by the business cluster. On this basis, the WeChat platform can also speed up money circulation effectively, reduce or even eliminate the negative impact on normal production which caused by the capital circulation and promote the orderly and smooth development of social production activities.

2 System Planning and Design 2.1 System Composition The bank branch business reservation system [12–14] is shown in Fig. 1. The bank branch reservation system includes: User Portable Terminal It can be mobile phone, notebook, PDA, bracelet, PC, etc. They have acquisition, storage, display, transmission, preprocessing and other functions. During of them, the cell phones, PDAs and bracelets are the most suitable devices. Server Terminal It is a dedicated server for bank reservation and related business. It provides reliable real-time service and reservation information for salesmen and customers, and feedbacks the best business reservation guidance information. Network Server The client portable side contains sensors that can be used to obtain the user’s personal identity information and geo-location information. It collects the reservation information and geographic location information, and transmits data by wireless and wired. The bank terminal server is composed of information collection server and related database server. The information collection server is responsible for receiving the data sent by users. It is a platform to provide the bank administrator with the historical data retrieval and view of reservation, as well as a platform to feedback real-time reservation data information to customers. Each part of the network is connected with other networks through mobile network (2G, 3G and 4G) and

WeChat Public Platform for Customers …

Bank account binding

Changing

715

Personal reservation

Account reservation Opening

Accessing branch

Large amount withdrawal

Branch naviaagation

Fig. 1 Bank branch business reservation system

can get support services provided by cloud computing platform, expert system, IoT management center (authentication, authorization, billing), IoT information center (sample base, algorithm base, information base) and mobile network which plays a pivotal control function.

2.2 System Functional Requirements System design requirements: (1) For bank customers who register and bind a bank card, they can choose and locate the most suitable bank branches nearby, no matter they are the permanent population in the area where the bank branches are located or the floating population who go to the nearby bank branches for business; (2) customers can make an appointment with a branch to handle the business that must be handled on site, such as opening an account, withdrawing large amount of cash and cash change; (3) customers can query their own reservation results.

716

J. Chen et al. Reserving Public Platform

Personal Center

Bank account bindIng

Reservation information querying

Business Hall

Changing

Account opening Large amount reservation withdrawal

Branch Information

Accessing branch

Branch navigation

Fig. 2 WeChat public platform structure

2.3 System Structure As shown in Fig. 2, the system is implemented on the WeChat public platform. It provides three functional modules: personal center, business hall and branch information. Through the branch information module, users can use the map to locate the branch location and inquire about the users who have been booked at nearby bank branches. The business hall module is used to handle the business of bank reservation, such as changing small change, opening an account reservation and large amount withdrawal. The personal center module provides a service for users to bind their bank account and view their reservation information.

2.4 Database Design According to the business requirements of WeChat public platform for bank branch business reservation, five data tables including business application table, dictionary configuration table, user table, bank information table and log table are designed. (1) Business application table T_Ywsq (business ID, the applicant, the applicant ID number, the phone, business type, business type name, serial number, conduction time and deal with place) is used to store user information to apply for business. (2) Bank branch information table T_Bank (bank branch ID, bank branch name, bank branch address and bank branch telephone number) is used to store information about bank branch. (3) Savings account information table T_User (user ID, name, password, contact number and WeChat account name) is used to store the information of people who have bank savings accounts. (4) Dictionary configuration table S_Dict (dictionary ID, category, code and code name) provides the configuration information which is required by the national administrative division information, business category and other systems.

WeChat Public Platform for Customers …

717

(5) Log table S_Login (log ID, operator, operation time and operation details) stores relevant operation records of users.

3 System Implementation 3.1 Construction Function The system is developed with Spring Boot+MyBatis+WX4J framework. Considering the actual requirements of robustness and reusability of the system, the following functions are constructed: (1) chenkLogin(): login verification function, it is used to prevent non-card users from maliciously reserving and occupying public resources. (2) save(): account binding function, it is used to increase data security and ensure the uniqueness of users. (3) myinfoStep2(): reservation information query function, it is used to query the reservation information to facilitate the user to view the time and location. (4) getSumCount(): the function to summarize the change amount in real time and calculate the exchange amount for the user. (5) bankInfo(): bank status function, it is used to query the number of reserved people reflecting the busy degree of the target bank branch. (6) getLocation(): getLocation function, it is used to get the geographic location of the current WeChat user. (7) togohere(): open the map navigation function to determine the longitude and latitude of the target address and open tencent map navigation. (8) getCount(): amount verification function, it is used to verify the amount of withdrawal, and the amount of interception is less than the amount specified by the bank (such as: Y −50,000). (9) getDict(): dictionary configuration function, it is used to get configuration data such as branch name and account opening type from the dictionary table.

3.2 Personal Center Module The personal center module provides two functions, bank account binding and reservation information inquiring. Bank account binding Withdrawals and changing small change can only be made by binding a bank account. The steps of bank account binding are as follows: (1) the user can click the bank account binding in WeChat public platform to enter, or trigger chenkLogin() method when the user submits a business application for

718

J. Chen et al.

Fig. 3 Bank account binding. platform structure

binding a bank account and will jump to the binding information input interface; (2) the user fills in name, account number, mobile phone number and other information; (3) the system encrypts and displays the password information. The SHA-1 encrypts the password information before the submission and calls save() function, which is encrypted and stored in the database through MD5 again; (4) return the binding success information. The successful effect of binding bank account is shown in Fig. 3. Reservation information querying The reservation information is placed in “my reservation,” and the methods of implementing reservation inquiry are as follows: (1) click my reservation in WeChat public platform to enter the query condition interface; (2) the user inputs the telephone number or reservation number and clicks the “query” button; (3) call myinfoStep2() in background platform to query according to the criteria; (4) the system feeds back the query results to user. The query results of reservation information are shown in Fig. 4.

3.3 Business Hall Module The business hall module includes three major services: changing, account opening reservation and large amount withdrawal. Changing Changing is a traditional business at bank branches, which is very frequent around the Spring Festival. The system provides the reservation function of

WeChat Public Platform for Customers …

719

Fig. 4 Reservation information querying

this service according to the reality. The methods are as follows: (1) Choose changing from the business hall of WeChat public platform and enter the interface of changing small change; (2) the user fills in the reservation application information such as the id number, mobile phone number and quantity of different denominations; (3) getSumCount() method triggered by onkeyup() accumulates, calculates and displays the total amount. Meanwhile, through Ajax and background interaction, relevant information about customers are obtained and filled in corresponding columns. (4) Click the next step, and a feedback information interface for changing will appear, as shown in Fig. 5. Account Opening Reservation Opening an account is the basic business of a bank. The methods of opening an account reservation are as follows: (1) The user focus on “customer reservation bank branch business platform” WeChat public, click the opening account reservation in the business hall, and enter the function module of opening account reservation; (2) fill in the name and other relevant user information; (3) the system obtains the corresponding account opening type and relevant branch information from the dictionary through getDirct() method; (4) verify and submit the application for opening account reservation. The implementation is shown in Fig. 6. Large Amount Withdrawal Large amount withdrawal refers to the withdrawal of more than Y −50,000, such business bank customers must make an appointment in advance. The implementation steps are as follows: (1) Click the large amount withdrawal item in the TAB of business hall; (2) input mobile phone number, branch name, withdrawal amount and other information; (3) the system triggers getCount() to

720 Fig. 5 Changing

Fig. 6 Account opening reservation

J. Chen et al.

WeChat Public Platform for Customers …

721

Fig. 7 Large amount withdrawal

verify the withdrawal amount through onkeyup(); (4) click next to submit withdrawal business application. The implementation is shown in Fig. 7.

3.4 Branch Information Module The branch information module includes two functions: accessing branch and branch navigation. Accessing Branch Some steps realize the accessing branch function are as follows: (1) Input the target area and submit it after entering the function interface of “accessing branch” of WeChat public platform; (2) bankInfo() method is called in the background to query the database tables T_Ywsq and T_bank; (3) the system feeds back the information of the current queuing number of bank branches obtained through inquiry to user. The implementation effect is shown in Fig. 8. Branch Navigation The branch navigation function is realized by opening tencent map through the map applet. The steps are as follows: (1) The system first obtains the longitude and latitude information of the mobile phone user’s location by getLocation() and confirms the user’s location; (2) the user clicks the location on the map and triggers togohere() to track the longitude and latitude of the target address by clicking the “gohere” button; (3) the system gets tencent map for target navigation.

722

J. Chen et al.

Fig. 8 Accessing branch

4 Conclusion The system has been tested, and the three business modules (personal center, business hall and branch information) have now met the requirements and specifications [10]. It can meet the needs of customers to reasonably arrange their time to appropriate branches by checking the busy degree of bank branches in advance. However, the current system only simulates the bank reservation service and has not been connected to the bank’s internal system because of security. And the number of people queuing in the acquired branches is not completely consistent with the actual number. And we are confident that these issues will be resolved soon. Acknowledgements This work is supported by the National Science Foundation of China (Grant Nos. 61772179, 61503128), Double First-Class University Project of Hunan Province (Xiangjiaotong [2018]469), Hunan Natural Science Foundation (Grant No. 2017JJ4012), Open fund project of Hunan Provincial Key Laboratory of Intelligent Information Processing and Application for Hengyang Normal University, Scientific Research Fund of Hunan Provincial Education Department (Grant No. 2016-557), Hengyang guided science and technology projects and Application-oriented Special Disciplines (Hengkefa [2018]60-31), and the Science and Technology Plan Project of Hunan Province (2016TP1020).

WeChat Public Platform for Customers …

723

References 1. Natoli, C., Gramoli, V.: The balance attack or why forkable blockchains are Ill-suited for consortium. In: 47th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN). IEEE Computer Society (2017) 2. Santoso, W.: Comment on “the determinants of cross-border merger and acquisition activity in the banking sector in Asia: did the Asian financial crisis change them?” 2. NBER Chapters (2009) 3. Galal, M., Hassan, G., Aref, M.: Developing a personalized multi-dimensional framework using business intelligence techniques in banking. In: International Conference on Informatics and Systems. ACM (2016) 4. Zhao, H.H., Liu, H.: Multiple classifiers fusion and CNN feature extraction for handwritten digits recognition. Granul. Comput. (2019) 5. Zhao, H.H., Rosin, P., Lai, Y.K.: Image neural network style transfer with global and local optimization fusion. IEEE Access (2019) 6. Zhao, H.H., Rosin, P., Lai, Y.K., Zheng, J. H., Wang, Y.N.: Adaptive gradient-based block compressive sensing with sparsity for noisy images. Multimed. Tools Appl. (2019) 7. Zhao, H., Rosin, P.L., Lai, Y.K.: Automatic semantic style transfer using deep convolutional neural networks and soft masks. Vis. Comput. (2019) 8. Hua, X., Qi, W., Zhang, S.: Research on undergraduates’ perception of Wechat acceptance. In: IEEE 11th International Conference on e-Business Engineering, 2014 9. Liang, D., Li, S., Ji, B. et al.: Research on matrix multiplication based wechat group tagging technology. In: IEEE First International Conference on Artificial Intelligence and Knowledge Engineering (2018) 10. Hans, V., Sethi, P. S., Kinra, J.: An approach to IoT based car parking and reservation system on Cloud. In: International Conference on Green Computing & Internet of Things (2016) 11. Gan, C., Wang, W.: Uses and gratifications of social media: a comparison of microblog and WeChat. J. Syst. Inf. Technol. 17(4), 351–363 (2015) 12. Liu, T., Ma, Y., Yang, X.: Service quality improvement of hospital reservation system based on text sentiment analysis. In: 9th International Conference on Information Technology in Medicine and Education (ITME). IEEE Computer Society (2018) 13. Boudali, I., Ouada, M.B.: Smart parking reservation system based on distributed multicriteria approach. Appl. Artif. Intell. 31(5–6), 518–537 (2017) 14. Bidulya, Y., Brunova, E.: Sentiment analysis for bank service quality: a rule-based classifier. In: IEEE International Conference on Application of Information and Communication Technologies (2017)

Metadata Management Algorithm Based on Improved LSM Tree Yonghua Huo, Ningling Ge, Jinxi Han, Kun Wang, and Yang Yang

Abstract Hadoop distributed file system (HDFS) is one of the cores of Hadoop, but because HDFS storage and management of data capacity is limited by the memory size of NameNode, its scalability is constrained. In this article, we analyze two problems when NameNode manages metadata: loading FSImage takes too long and the capacity is limited by memory size. We propose optimizing the HDFS hierarchical metadata structure into a flat structure and removing metadata from memory. To this end, we design the F-HDFS based on improved log-structured merge-tree (LSM tree) and memory-mapped file for metadata management and introduce the F-HDFS metadata operations. In addition, F-HDFS is also compatible with features such as high availability of HDFS and snapshot, so that F-HDFS can be applied to existing HDFS-based applications. We implement the F-HDFS prototype system and compare it with HDFS. The results show that F-HDFS performance is better than HDFS for providing stable and fast metadata services. Keywords Metadata · NameNode · Hash map · Bloom filter

1 Introduction In the big data era, Hadoop has been widely used and its file system HDFS can provide PB-level data-distributed storage service for users on a large number of cheap hardware. Similar to PVFS [1], MooseFS [2] and GFS [3] distributed file system, the HDFS also uses a master–slave mode with a NameNode and multiple DataNodes in an HDFS cluster. When the NameNode restart, the namespace will be reconstructed Y. Huo The 54th Research Institute of CETC, Shijiazhuang, China N. Ge · K. Wang · Y. Yang (B) State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] J. Han Institute of Systems Engineering, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_71

725

726

Y. Huo et al.

in memory based on the data on the disk. The main problem with NameNode in this way is that: (1) When the number of metadata to the NameNode certain memory size, it will cause the JVM garbage collection frequently. (2) NameNode restores the namespace based on the Editslog and FSImage in the disk and gradually loads into memory each time after restarting, which will be time consuming. To break through the above limitations and improve HDFS metadata management performance, we start with NameNode hierarchical metadata management. We separate metadata from NameNode memory and manage metadata by improved logstructured merge-tree and memory-mapped files. And we build a prototype system called F-HDFS to verify the feasibility and effect.

2 Related Work During the HDFS run, file system metadata will reside in memory and all files and directory information and change logs are periodically persisted into FSImage and Editslog on disk. FSImage saves the entire HDFS directory, and Editslog stores the operation logs for the HDFS. In addition, NameNode constructs the mapping information of BlockInfo to block according to the BlockInfo of each file, thus ensuring that the client can access the data block corresponding to the file. In addition to the master–slave structure of HDFS and GFS, the current metadata management scheme of distributed file system includes virtual shared disk technology, static namespace partition method and dynamic namespace partition method. GPFS [4] uses virtual shared disk technology. GPFS does not have dedicated metadata management servers but distributes metadata across disk arrays, and all nodes can manage metadata. In the static namespace division method, HDFS Federation is representative and uses subtrees to divide the namespaces into different subtrees, which are managed by separate NameNode. PanFS [5] also uses a static subtree partition method. Each metadata server is responsible for some metadata services. Ceph [6] uses dynamic namespace partition to introduce multiple metadata servers. It realizes dynamic load balancing and high availability through dynamic subtree partitioning and migration among metadata servers.

3 Design of F-HDFS 3.1 Design of Separation of Metadata from NameNode 3.1.1

Improved LSM Tree

The improved LSM tree adopts a divide-and-conquer strategy. According to certain characteristics of the key, a key classifier is used to classify a large number of keys

Metadata Management Algorithm Based on Improved LSM Tree

727

Fig. 1 Structure of improved LSM tree

in a specific way and indirectly achieve the effect of classifying the entire mass of data. Since the keys in the MDDB storage component use the “(pid, name)” of the directory or file item as a unified format, the two uniquely identify a directory entry, and the belonging collection of a key is always the same. Therefore, this paper selects an efficient and averaged hash function such as BKDRHash, APHash and DJBHash as a fixed key classifier to quickly classify the keys that enter the MDDB storage component. Therefore, the memory of the improved LSM tree contains more than one B+ tree. Instead, the B+ tree is divided into multiple small B+ trees according to the category of the key, as shown in Fig. 1. When making a data query, first determine which category the target data is in. Then, all the B+ trees in the class are taken out according to the classification. Finally, the B+ trees are queried to obtain the target data. By determining the classification to exclude most of the impossible B+ trees, the query performance of the system is greatly improved.

3.1.2

Metadata External Storage Component

We designed MDDB (MetaData DataBase) for the NameNode metadata access scenario of F-HDFS, a lightweight key database based on improved log-structured merge-tree (LSM tree) and memory-mapped file. Unlike the original HDFS, which loads metadata into memory and stores on FSImage, metadata storage and processing of F-HDFS are carried out in MDDB. MDDB consists of four levels, including the active layer, the L0 layer, the L1 layer and the L2 layer. The top layer is the active layer, which contains a key classifier and multiple active tables. The active table consists of two parts, one of which is the hash map that resides in the memory of the NameNode, and the other part is the index file and the data file loaded in memory-mapped mode.

728

Y. Huo et al.

The composition of each table in the L0 layer is consistent with the active table of the top layer. However, from the L0 layer, the tables in L0, L1 and L2 only support the read operation. When tables of the same classification in the L0 layer reach a certain number, such as two, multiple tables will be sorted into a table, and the resulting table will be placed in the table queue header of the L1 layer. In the sort and merge process, the old data in the table will be eliminated, the data items in the data file and the index file are ordered. Each table of the L1 layer contains two parts, one is the Bloom filter and the other is the data file. The data files are sorted by the L0 layer. In the sort and merge process of the L0 layer, the data is written to both the Bloom filter and the data file. The read operation of the L1 layer needs to be retrieved in the Bloom filter first, and if the Bloom filter reports that the target term may exist, the index file is queried. To speed up the search, Bloom filter is stored in memory, and data files and index files are loaded and accessed in memory-mapped files. When tables of the same classification in the L1 layer reach a certain number, such as 4 or 8, multiple tables will be sorted into a new table and placed in the L2 layer. If there is an old table in the L2 layer, the old table will participate in the sort–merge together, and eventually, the L2 layer retains only one table per category and its Bloom filter. L2 layer data files are stored directly on disk because there is a lot of cold data [7] in HDFS, and we keep the Bloom filter of the L2 layer data file in memory, and the index file is still accessed in memory-mapped form, providing stable metadata manipulation.

3.2 Metadata Index Optimization 3.2.1

Metadata Index File

In F-HDFS, metadata is stored in the data files of each MDDB table, and the metadata of the corresponding directory items can be searched through the directory path. In order to speed up metadata access, each data file corresponds to an index file. We indexed the directory entries in the data file by key, i.e., (pid, name). The format of the data file and index item are shown in Fig. 2. In the index item format, KeyHash is combined by the “pid” value and the hash value of “name” in the current key. DataOffset represents the location of the data item in the data file. KeyLength and ValueLength record the length of the key and the length of metadata content value, respectively. CreateTime represents the data item creation time. Status for the status of identification, including whether to use, delete the mark, the compression format used. Each index item is sorted by the KeyHash value in the index file. If the KeyHash value is the same, the index entries are sorted by key in non-decreasing order, but CreateTime values in descending order for the same key. In the data file, the data items of the same KeyHash value are also stored in that order.

Metadata Management Algorithm Based on Improved LSM Tree

729

Fig. 2 Format of the data file and index item

3.2.2

Hash Map and Bloom Filter

F-HDFS has carried out special processing and optimization for the active layer and L0 layer data. In these two layers, the F-HDFS keeps a hash map in memory for each table in the active layer and the L0 layer. Therefore, when we save the key and the corresponding simple index in a hash map, we can access the location data directly through a memory read operation, which improves the access speed of the new directory items. The data of L1 and L2 levels are large and have been reordered, which is not suitable for using the hash map. F-HDFS adds the Bloom filter to each table of L1 and L2 and places it in memory to quickly determine whether the target directory exists on the table. If the directory does not exist in the Bloom filter, we can continue to find the next table. There is the possibility of false positives for the Bloom filter. F-HDFS improves the overall metadata access efficiency by appropriately expanding the Bloom filter space to achieve a small false alarm rate.

3.2.3

High Availability and Snapshot

F-HDFS is compatible with the high availability of original HDFS. F-HDFS still uses synchronous Editslog to achieve high availability. In the cluster, both Active NameNode and Standby NameNode run a MDDB instance and communicate by Journal Nodes. All MDDB operations of Active NameNode will be recorded in Editslog and written to the majority of the Journal Nodes. When the Standby NameNode listens to the changes in Editslog on the Journal Nodes, it reads Editslog and executes the changes locally, keeping the data in the local MDDB consistent with the Active NameNode. F-HDFS has partially modified the snapshot feature of the original HDFS. FHDFS flattened directory structure cannot snap against a directory, so the way to

730

Y. Huo et al.

select the snapshots of the entire namespace is replaced. MDDB records the creation time of each directory metadata item. When the snapshot is created, the F-HDFS records snapshot creation time and snapshot ID. In the sort–merge process of the L0 and L1 layers, the latest data that is earlier than the snapshot time is saved for each snapshot. When the metadata corresponding to the directory entries is accessed in the user snapshot, the latest data is created at the time when the snapshot is not later than the creation time. The snapshot record obtained from MDDB is basically the same as the normal access method, adding only steps to compare the CreateTime attribute of the index item. Deleting a snapshot is similar to a normal delete directory operation, where F-HDFS implements the recovery of the corresponding block of data by sorting and merging the invalid items in each layer.

4 Experiment 4.1 Experimental Environment In this paper, the experiment is carried out on three clusters with the same specifications. The NameNode configuration of the three clusters is 2.4 GHz CPU, 8 GB RAM, 1 GB Ethernet and 200 GB HDD. Each cluster contains five DataNodes, configured as 4 GB RAM, 1 GB Ethernet and 500 GB HDD. All nodes’ operating system is Ubuntu 14.04 64 bit with Java 1.8.0. HDFS, HDP and F-HDFS run on three separate clusters, respectively.

4.2 Benchmarking of Metadata Operations We use the Hadoop benchmark [8] as a test tool to test the performance of HDFS, HDP and F-HDFS’s NameNode for metadata and directory entries. The test content includes the throughput of the mkdir, create, open, fileStatus, rename and delete operations. We also tested the performance of NameNode under the number of different threads. (1) The mkdir operation For mkdir operations, we create 50,000 directories with 1, 2, 4, 8, 16, 32 and 64 threads for HDFS, HDP and F-HDFS, respectively. When the number of threads is 2, the throughput of F-HDFS is 2317.65 op/s, slightly lower than the 2510.84 op/s of HDFS, but as the number of threads increases, the number of throughputs continues to grow. When the number of threads is 64, the throughput of F-HDFS reaches 9458.86 op/s, which is 1.14 times of the throughput of HDP (Fig. 3).

Metadata Management Algorithm Based on Improved LSM Tree

731

Fig. 3 Comparison of mkdir operation throughput

(2) The fileStatus operation As shown in Fig. 4, the performance of HDP and F-HDFS fluctuates greatly. When the number of threads is 2, HDP reaches the peak of 77,396.31 op/s, and F-HDFS reaches the peak value of 77,934.83 op/s when the number of threads is 4. The performance of HDFS increases with the increase of the number of threads. When the number of threads is 1, the throughput is only 2679.24 op/s, while the throughput is 5968.4 op/s when the number of threads is 64. At this time, the throughput of HDP is 52,439.69 op/s, and the throughput of F-HDFS is 45,825.37 op/s. (3) The delete operation The delete test uses the automatic generation of directory structures including half a million files and 5000 directories, and the test results are shown in Fig. 5. F-HDFS Fig. 4 Comparison of fileStatus operation throughput

732

Y. Huo et al.

Fig. 5 Comparison of delete operation throughput

throughput is slightly higher than HDP between 1 and 4 threads, but as the number of threads increases, its performance is not as high as HDP. When the number of threads is 64, the throughput of all three reaches the maximum, HDFS is 4940.1 op/s, HDP is 11,539.32 op/s, and F-HDFS is 10,347.45 op/s. (4) Load test In addition to the metadata performance test for NameNode, we also use Load Generator [9] to do actual file read and write load tests on three clusters. The experiment starts from 1 million files and increases the number of files by 100 thousand units. When the number of files is 1 million 500 thousand, HDFS reaches the limit. The NameNode cannot continue to provide services if we add files. The overall throughput of HDFS is slightly higher than that of F-HDFS in the range of 1 million to 1 million 200 thousand but less than HDP. After the number of files reached 1 million 400 thousand, the comprehensive throughput of F-HDFS changed more smoothly, which was better than that of HDFS and HDP. HDP reaches the limit when the number of files is 1 million 800 thousand, and its file storage is 1.2 times that of HDFS (Fig. 6).

5 Conclusion This paper puts forward the F-HDFS improvement scheme based on improved LSM tree and flat directory based on the limitation of metadata management for HDFS storage of massive small files. By isolating the metadata from the NameNode memory, we designed the external components MDDB, flat catalogs and metadata and the corresponding optimization measures. It can quickly load metadata and expand the scale of metadata management, and when the NameNode starts, it ensures that HDFS can still manage complete small file metadata when storing large amounts

Metadata Management Algorithm Based on Improved LSM Tree

733

Fig. 6 Results of cluster load test

of small files. The experimental results show that F-HDFS has excellent metadata operation performance, which can provide metadata management ability for large size small file storage scale, and solves the time-consuming problem of loading the FSImage file to rebuild the directory tree when the cluster is started. Acknowledgements This work was supported in part by Open Subject Funds of Science and Technology on Information Transmission and Dissemination in Communication Networks Laboratory (SKX182010049), Fundamental Research Funds for the Central Universities (2019PTB-019) and the Industrial Internet Innovation and Development Project 2018 of China.

References 1. Haddad, I.F.: PVFS: a parallel virtual file system for linux clusters. Linux Journal 2000(80es), 5 (2000) 2. Bai, S., Wu, H.: The performance study on several distributed file systems. In: International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery, pp. 226–229 (2011) 3. Ghemawat, S., Gobioff, H., Leung, S. T.: The Google file system. In: Nineteenth ACM Symposium on Operating Systems Principles, pp. 29–43 (2003) 4. Schmuck, F.B., Roger, L.H.: GPFS: a shared-disk file system for large computing clusters. FAST 2(19) (2002) 5. Nagle, D., Serenyi, D., Matthews, A.: The panasas activescale storage cluster: delivering scalable high bandwidth storage. In: Proceedings of the ACM/IEEE SC2004 Conference, vol. 53 (2004) 6. Weil, S.A., Brandt, S.A., Miller, E.L. et al.: Ceph: a scalable, high-performance distributed file system. In: Symposium on Operating Systems Design and Implementation, pp. 307–320 (2006) 7. Karun, A.K., Chitharanjan, K.: A review on Hadoop-HDFS infrastructure extensions. In: Information and Communication Technologies, pp. 132–137 (2013) 8. Hadoop Benchmark. http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoopcommon/Benchmarking.html 9. Load Generator. http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/ SLGUserGuide.html

A Text Information Hiding Method Based on Sentiment Word Substitution Fufang Li, Han Tang, Liangchen Liu, Binbin Li, Yuanyong Feng, Wenbin Chen, and Ying Gao

Abstract Text information hiding based on synonym substitution is sensitive to synonym dictionary quality. Synonym word forest has a large number of irreplaceable old words, and the network new words are not added, using this dictionary to perform synonym substitution steganography on the carrier text which is easy to change the statistical features of the original text. To solve the above problem, this paper proposed a method that dynamically expands sentiment dictionary. Firstly, we collected and merged the three basic sentiment dictionaries that are widely used and using the conjunction rules to identify the candidate sentiment words. Then the cosine similarity between the sentiment words is calculated by the distributed word vector representation tool Word2vec. The sentiment words have a high similarity value which is added to the sentiment word dictionary. The expanded sentiment dictionary is used as a text information hiding dictionary based on sentiment word substitution, and the 7/3 matrix encoding method is used. Experimental analysis shows that the conjunction rules can effectively identify sentiment words, and the extended sentiment dictionary with 42.8% embedding rate for sentiment word substitution steganography can effectively reduce the possibility of statistical analysis. Keywords Synonym substitution · Sentiment dictionary · Dynamic expanding · Conjunction rules · Matrix coding

1 Introduction With the rapid development of Internet user-generated content, people use social networks to generate a large amount of text data every day, which provides a good research channel for information hiding and sentiment analysis. Mikhail J. and M. Attalla of Purdue University first proposed the concept of natural language text information hiding in 2000 [1], information hiding technology developed rapidly. F. Li · H. Tang · L. Liu · B. Li · Y. Feng (B) · W. Chen · Y. Gao School of Computer Science and Educational Software, Guangzhou University, 510006 Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_72

735

736

F. Li et al.

Compared to other types of carrier, text has the advantages of intuitive processing, large amount of data, but at the same time, there are serious challenges to hide more information in the text due to low text redundancy. At present, the most researched at home and abroad is semantic-based text hiding. The semantic-based text hiding method is a hidden method that does not change the semantics by transforming the words themselves, which is represented by the method of synonym substitution algorithm [2]. But there are two issues to have considered: Firstly, the synonym substitution algorithm depends on a high-quality synonym dictionary which can suit the sharp development of the Internet new words. Secondly, the low in the redundancy of text cause the embedding efficiency is generally not high. Therefore, based on the previous studies, this paper proposes to use the sentiment dictionary in the sentiment analysis task instead of the synonym dictionary, use the conjunction rules to expand the sentiment dictionary, and then use the similar sentiment words in the sentiment dictionary to replace it to achieve the purpose of text hiding. In order to solve the problem of low embedding rate, the extended sentiment dictionary adopts 7/3 matrix coding to reduce the operation modification of the carrier data. Finally, the paper compares the steganography texts generated by different lexicons and different embedding rates. The experimental results show that the steganography method proposed in this paper has higher anti-detection than traditional synonym substitution.

2 Related Work Currently, text information hiding based on synonym substitution relies on the dictionaries. The most widely used synonym dictionary in Chinese is the synonym word forest which artificially constructed by Mr. Mei Jiaju and others in 1983. Because of the age, many words in the synonym word forest became uncommon words, and many new words were not added. With the rise of Web 2.0, many researchers are limited by the lack of domain sentiment dictionary when doing sentiment analysis tasks. Therefore, the automatic construction and expansion of sentiment dictionaries have attracted widespread attention in recent years. Great progress has been made in the study of sentiment dictionary construction in English. Nielsen et al. automatically extended ANEW on Twitter corpus and built the AFINN dictionary [3] In order to overcome the contextual context and the adaptability of the dictionary established above at the grammatical level, researchers have proposed a method based on conceptual sentiment dictionary [4], such as SenticNet. Chinese sentiment dictionary constructions were based on the English method; Lu proposed an extension method of sentiment dictionary based on Word2vec and built a sentiment dictionary of ecommerce platform for sentiment analysis [5]. Xie proposed an expanding method based on conjunction rules, which can identify the candidate sentiment words as the seed dictionary [6], and in this paper, we improve the conjunction rule method and use distributed. The vocabulary representation tool Word2vec builds a sentiment dictionary.

A Text Information Hiding Method Based on Sentiment Word …

737

With the rapid development of natural language-based text hiding, more and more researchers are attracted. There are mainly three kinds of text information hiding methods: based on changing the format of the text, based on the syntax of text, and based on the semantic of the text [7]; the first two methods are easy to be seen by attackers due to the lack of hidden capacity and the semantic confusion caused by the modification. Many researchers are working on the third method now, especially based on synonyms substitution information hiding. Gelbukh A uses the WordNet dictionary and collects synonym-related statistical information on the Internet, combined with synonyms and other words to select the appropriate synonym for substitution [8]. Due to the particularity of Chinese relative to English, Gan can study the synonym substitution hiding method suitable for Chinese texts [2]. Although such a method can keep the semantics of the text well, the embedding efficiency is generally not high. Yang used matrix coding to improve the synonym substitution method [9], this method can effectively improve the embedding efficiency and maintain the original statistical features of the text; in this paper, we improve this method along with an extended sentiment dictionary for the text information hiding.

3 Sentiment Dictionary Expanding To extend the sentiment dictionary, we first have to build a basic sentiment dictionary with a large coverage. We organize and merge the three sentiment dictionaries, use the conjunction rules to identify the new sentiment words in the corpus, and then utilize Word2vec to convert the words into word vectors. Finally, we use the cosine similarity to calculate the similarity between newly recognized sentiment words and the sentiment words in the basic sentiment dictionary. The similarity finally adds words with similar similarity to the sentiment dictionary.

3.1 Original Sentiment Dictionaries Combination Building a comprehensive basic sentiment dictionary is the key to expanding sentiment dictionary. There are currently three major sentiment dictionaries in the sentiment analysis task that are widely used: HowNet Sentiment Dictionary (HowNet), Tsinghua University (Li Jijun) Sentiment Dictionary, and National Taiwan University Sentiment Dictionary (NTUSD). Table 1 shows the negative words and positive words size in different original dictionaries. Table 1 Size of positive, negative lists in different original dictionaries

NTUSD

TsingHua

Positive words

2641

5567

HowNet 836

Negative words

7736

4469

1254

738

F. Li et al.

Table 2 Repeat numbers of positive and negative words in different original dictionaries NTUSD

HowNet

negRepeat

posRepeat

negRepeat

posRepeat

TsingHua

1274

851

313

283

HowNet

357

193

These dictionaries are mainly built manually or semiautomatically, which may exist different sentiment polarities or repeat words in different sentiment dictionaries; Table 2 shows the repeated numbers of positive and negative words in different original dictionaries. In order to solve the problem of repeated sentiment words in different dictionaries and the opposite polarity of the same sentiment words in different sentiment dictionaries, we have formulated rules for combining three sentiment dictionaries: We set up a rule of merging the three sentiment dictionaries. When sentiment words appear in three sentiment dictionaries at the same time, we set the priority of HowNet>TsingHua>NTUSD. Then according to this priority, we determine the polarity and repetition of words. Finally, 19,571 basic sentiment words were compiled, including 7664 positive words and 11,907 negative words.

3.2 Identify the Candidate Sentiment Words Conjunctions in language are used to connect words and words, phrases and phrases, or sentences and sentences. When we analyze Douban movie reviews, we find that some rules are as follows: The semantic polarity of two words connected by a conjunction often has a certain relationship, such as the sentiment words connected by coordinating conjunctions have the same polarity, while the sentiment words connected by the transitional conjunctions are opposite. In this paper, we choose coordinating conjunctions, transitional conjunctions, and progressive conjunctions. Table 3 shows the conjunctions collected from the online Chinese dictionary Web site. This paper uses these conjunctions to identify new sentiment words in the corpus, in order to effectively identify sentiment words. We select a window based on Table 3 List of conjunctions Conjunction type

Conjunction words

Coordinating conjunction

own, and, go with, with, as well as, same as, however, reach, and that, situation, furthermore, just, much less, so that

Transitional conjunction

yet, but, nevertheless, while, deliberately, only, nothing but, as to, deliver, beyond ones’ exception, wetting

progressive conjunction

Not only, more than, let alone, furthermore, even, and that

A Text Information Hiding Method Based on Sentiment Word …

739

the core word in the seed dictionary with a range of 3 and select the appropriate window, so that the amount of information provided by the context calculation is large enough.

3.3 Calculate the Similarity of Sentiment Words In order to calculate the similarity between sentiment words, we have to use the distributed word vector representation tool Word2vec to convert the words into vectors. The most widely used word vectorization method is One-Hot Encoding. The OneHot Encoding method uses an N-bit status register to encode N states. Each state has its own independent register bit and is arbitrary. At the time, only one of them is valid. Assuming that the word vectorization of n words is performed using the One-Hot Encoding, each word needs to be converted into a vector with n features but only one of them is 1 and the others are all 0. Although the One-Hot Encoding converts the discrete symbol information of natural language into digital information in vector form, this coding method will cause a huge dimensional disaster; that is, the dimension of the vector in the text is equal to the number of words, and even for similar words, it is difficult to calculate the relationship between them. Mikolov et al. proposed two neural network-based language models, continuous bag-of-words (CBOW) model and skip-gram model, to implement distributed representation of words [10]. Figure 1 shows the framework of the model in Word2vec. Both models belong to the shallow two-layer neural network, including the input layer, the hidden layer, and the output layer. The input layer needs to input the vector after the One-Hot Encoding coding. The linear neurons of the hidden layer obtain the input weight matrix after performing the matrix operation on the One-Hot Encoding vector, and the output layer uses the softmax function to make each node output value between 0–1, but the sum of the probabilities of these nodes is 1. We use the skip-gram model to train the low-dimensional dense vector from the corpus and need to calculate the similarity between words and words. This paper uses the cosine distance between the word vectors obtained by vectorization of two words to define the similarity of words. Assuming that the word vectors of words w1 and w2 are V (w1 ) and V (w2 ), respectively, the similarity between w1 and w2 is input

hidden

output

input

hidden

W(t-2)

W(t-2)

W(t-1) W(t+1)

output W(t-1)

W(t+2)

W(t+2)

W(t+2)

W(t+2)

W(t+2)

W(t+1) W(t+2)

CBOW model Fig. 1 Framework of the models in Word2vec

Skip-gram model

740

F. Li et al.

(b)

(a)

Fig. 2 Most similar words of one given word and cosine similarity between two words

Fig. 3 Expanded sentiment dictionary

sim(w1 , w2 ) =

joyfulness,delightfulness joyfulness,jubilance joyfulness,happiness joyfulness,merriment

V (w1 ) · V (w2 ) V (w1 ) · V (w2 )

0.93 0.82 0.81 0.76

(1)

Word2vec gives a method for calculating the similarity between two words based on Formula (1) and also provides a list of the most similar words that can be calculated based on a certain word. Figure 2 shows how to use a trained model calculated the most similar words of one given word and cosine similarity between two words. After the training, we can calculate the similarity of the two sentiment words measured by the numerical values in the candidate dictionary. If the cosine value is less than zero, this means that there is any relationship between the two words. Conversely, a value greater than zero means that there is a certain relationship. Figure 3 shows the expanded sentiment words dictionary.

4 Matrix Coding Algorithm Based on Sentiment Word Substitution The sentiment word substitution algorithm based on (n, k) matrix coding divides the sentiment words existing in the sentiment dictionary into a set of n in the carrier text and divides the secret information to be embedded into a group of k bits, where (n = 2k −1), by mass-encoding these carrier sentiment words and secret information groups, each group replaces at most one sentiment word to embed secret information. In this paper, 7/3 matrix coding is used means every 7 carrier sentiment words are embedded in 3-bit information.

A Text Information Hiding Method Based on Sentiment Word …

741

4.1 Embedded Algorithm The steps of the proposed embedding algorithm are as follows: Step 1. Encode the sentiment dictionary, and the sentiment words in each sentiment pairs are encoded as 0, 1. Step 2. Read the carrier sentiment words in the sentiment dictionary in the text, recording total number is N, and obtain their coding information and similarity value. Step 3. Determine the relationship between the M bit information of the secret information to be hidden and the total number N of the carrier sentiment words. If N/7 ≥ M/3, the secret information and the carrier sentiment words are grouped and then proceed to step 4, otherwise the embedding fails. Step 4. Each set of 7 carrier sentiment words is numbered according to Formula (2) and converted into binary. Each set of 3 bits of information to be embedded is x1 , x2 , x3 , and the sentiment word coded information of the secret information is a1 , a2 , . . . , a7 .   i = bi,k , bi,k−1 , . . . , bi,1 2 1 ≤ i ≤ 7

(2)

where the bi, j value is 0, 1; based on the bi, j value and the carrier’s sentiment word 2k −1 (ai · bi, j ), and the relationship between the value and code value ai calculate ⊕i=1 the embedded secret information x j is calculated:

cj =

⎧ 2k −1 ⎪ ⎪ ⎨ 0 X j = ⊕ (ai · bi, j ) i=1

2k −1 ⎪ ⎪ ⎩ 1 X j = ⊕ (ai · bi, j )

1≤i ≤k

(3)

i=1

Assuming that the numbering unit that needs to be modified is C, and then it is: C=

k 

c j · 2 j−1

(4)

j=1

If C is equal to 0, no changes will be made, otherwise ac will be changed.

4.2 Extraction Algorithm Step 1. Find the sentiment words in the sentiment dictionary in the carrier, record the total number is N, and record the encoded information.

742

F. Li et al.

Step 2. The carrier sentiment words are grouped into groups of 7 and the last groups of less than 7 sentiment words are discarded (where n = 2k − 1). Step 3. For each group, the sequence number of the sentiment word is binary coded and the value is obtained according to Formula (2). Let the 3-bit secret information to be extracted in each group be x1 , x2 , x3 , the code of the carrier data carrying the secret information as a1 , a2 , . . . , a7 . The value of each secret information x j is obtained according to Formula (5). 2k −1

x j = ⊕ (ai · bi, j ) 1 ≤ j ≤ 3

(5)

i=1

Step 4. Repeat Step 3 to complete the extraction of secret information from all groups. Finally, they are connected together to get the final secret information.

5 Experimental Results 5.1 Sentiment Dictionary Expanded Result The experimental data in this paper uses Douban’s short comments that were crawled from Douban’s hot 2000 movies. After corpus preprocessing, we have to use segmentation tools to segment sentences. We use jieba word segmentation tool to cut the sentence with precise mode, which can cut the sentence most accurately, suitable for text analysis. In order to quantitatively evaluate the performance of the sentiment dictionary expansion method proposed in this paper, we manually select the sentiment words in these comments: 80 positive sentiment words, 100 negative sentiment words and totally 180 sentiment words for algorithm testing. The evaluation uses the accuracy rate (ACC), precision rate (P), the recall rate (R), and the F value (F) as indicators. According to Table 4, ACC = 77.78%, P = 87.01%, R = 83.75%, F = 85.35%. The experimental results show that the recognition of the sentiment words in the film field is higher based on the conjunction rules. Table 4 Sentiment dictionary expanded experimental result

Total

Recognized as positive

Recognized as negative

Positive sentiment words

80

67

5

Negative sentiment words

100

10

73

A Text Information Hiding Method Based on Sentiment Word …

743

Table 5 Detection results for different embedding rates and substitution dictionaries Test results Total

Normal text

Steganographic text

Synonym forest with 100% embedding rate

25

5

5

Expanded sentiment dictionary with 100% embedding rate

25

10

15

Synonym forest with 7/3 embedding rate

25

14

11

Expanded sentiment dictionary with 7/3 embedding rate

25

18

7

5.2 Matrix Coding Based on Sentiment Substitution Result After the expansion of the sentiment dictionary, in order to compare the performance of the 7/3 matrix-coded text information hiding algorithm based on the sentiment word substitution proposed in this paper, we selected 100 original texts, respectively, using the extended sentiment dictionary and the synonym word forest. Dictionary generates 25 steganographic texts using 100% embedding rate and 7/3 (42.8%) embedding rate. For natural text, embedding a secret message will result in a change in the statistical characteristics of the text. If the statistical feature parameter of the text is extracted as a feature vector, the classifier is trained by a certain amount of secret text and natural text, which may be achieved the successful classification of natural text and confidential text. Through the analysis of statistical models and characteristics of natural texts, Fu proposed a general detection algorithm based on the support vector machine [12]. The detection algorithm uses the two relative eigenvalues of the relative frequency (NRF) of the relative frequency (NRF) as the final classification feature to distinguish between normal text and steganographic text [11]. Table 5 shows the results detection for different embedding rates and dictionaries. It can be seen from the experimental results that the extended sentiment word substitution algorithm is superior to the synonym substitution algorithm based on the synonym word forest, whether using 100% embedding rate or 7/3 embedding rate.

6 Summary and Future Work This study proposed a method to dynamically expand sentiment dictionary and related information hiding algorithm. The expanded sentiment dictionary is constructed from three widely used basic sentiment dictionaries by using the distributed word vector representation tool Word2vec to calculate the cosine similarity of sentiment words. Based on the expanded sentiment dictionary, and by using 7/3 matrix coding, we proposed a novel information hiding algorithm that its embedding rate

744

F. Li et al.

reached 42.8%. Experiment results show that our method can obtain a high embedding rate and sound concealment. In the future, we will do more work on improving the algorithm’s holistic performance and put it to be used in practical occasions. Acknowledgements We would like to thank the anonymous referees for their careful readings of the manuscripts and many useful suggestions. This work had been co-financed by Natural Science Foundation of China under Grant No. 61472092 and U1405254; Guangdong Provincial Science and Technology Plan Project under Grant No. 2013B010401037.

References 1. Atallah, M., McDonough, C., Raskin, V. et a1.: Natural language processing for information assurance and security: an overview and implementations. In: Proceedings 9th ACM/SIGSAC, pp. 51–65, New Security Paradigms Workshop, Ireland (2000) 2. Gan, C., Sun, X.M., Liu, Y.L.: An improved steganographic algorithm based on synonymy substitution for chinese text. J. Southeast Univ. 37(1), 137–140 (2007) 3. A new ANEW: Evaluation of a word list for sentiment analysis in microblog. https://arxiv.org/ abs/1103.2903 4. Tsai, A.C., Wu, C., Tsai, R.T., et al.: Building a concept-level sentiment dictionary based on commonsense knowledge. IEEE Intell. Syst. 28(2), 22–30 (2013) 5. Feng, L.: Analysing propensity of product reviews based on extending sentiment lexion with Word2vec. Comput. Knowl. Technol. 13(5), 143–145 (2017) 6. Xie, S.X., Zhao, S.Y.: A Chinese sentiment lexicon extension method based on mixing features. Comput. Eng. Sci. 38(7), 1502–1508 (2016) 7. Liu, G., Ding, X.Y., Su, B., Meng, K.: A text information hiding algorithm based on alternatives. J. Softw. 8(8), 2072–2079 (2013) 8. Bolshakov, I.A., Gelbukh, A.: Synonymous paraphrasing using wordnet and internet. In: Meziane F., Métais E. (eds.) Natural Language Processing and Information Systems. NLDB. Lecture Notes in Computer Science, vol. 3136, pp. 312–323. Springer, Berlin, Heidelberg (2004) 9. Yang, X., Li, F., Xiang, L.Y.: Synonym substitution-based steganographic algorithm with matrix coding. J. Chin. Comput. Syst. 36(06), 1296–1300 (2015) 10. Efficient estimation of word representations in vector space. https://arxiv.org/pdf/1301.3781. pdf 11. Chen, Z.L., Huang, L.S., Yang, W.: Detection of substitution-based linguistic steganography by relative frequency analysis. Digit. Investig. 8, 68–77 (2011) 12. Sui, X.G., Luo, H., Zhu, Z.L.: Text steganalysis based on support vector machine. Comput. Eng. 35(06), 188–191 (2009)

Research on Information Hiding Based on Intelligent Creation of Tang Poem Fufang Li, Binbin Li, Yongfeng Huang, WenBin Chen, Lingxi Peng, and Yuanyong Feng

Abstract Text is the most important and frequent way for people to exchange information and daily communication in today’s society; thus, text information hiding has great research value and practical significance. This paper explored a novel method of information hiding based on intelligent creation of Tang poem. Based on the construction of meaning intention vocabulary, and by using the recurrent neural network language model, the proposed steganography method can effectively generate carrier Tang poem which confidential information embedded in it. In our method, each line can hide 9-bit sensitive information. The hidden capacity of the five-character Tang poem is 11.25%. Experiments showed that this algorithm had relatively high carrying capacity and concealment. Keywords Text information hiding · Deep learning · Dictionary of meaning intention · Tang poem creation

1 Introduction and Related Work Although there is not much redundant information in the text to provide enough space for information hiding, research on text information hiding is very important, for text is still the most important and frequent way for people to access all kinds of information. Thus, research on text-based information hiding has always been a challenging and important hot spot in the field of information hiding, and many researchers are seeking new ways in this area. The literature [1] proposed a text steganography method that performed not only in ordinary, but also in special (soft F. Li · B. Li · W. Chen · Y. Feng (B) School of Computer Science and Educational Software, Guangzhou University, 510006 Guangzhou, China e-mail: [email protected]; [email protected] Y. Huang Department of Electronic Engineering, Tsinghua University, 100084 Beijing, China L. Peng School of Mechanical and Electrical Eng, Guangzhou University, 510006 Guangzhou, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_73

745

746

F. Li et al.

hyphen, line break, etc.) symbols and spaces. The literature [2] proposed a novel technique to embed message (or cover text) into email by making it colored using a color coding table. The literature [3] presented a method to embed secret information bits within Arabic letters using two features, which are the moon and sun letters and the redundant Arabic extension character “-” known as Kashida. Their method had reached a high embedding ratio. The literature [4] proposed an information hiding method based on Chinese synonym replacement. The literature [5] studied the characteristics of Song Ci’s word count and word card format, and hid information in the process of generating Song Ci lyrics by selecting specific words and sentence patterns. The literature [6] proposed a textual steganography algorithm by using Markov chain model when generating Song Ci Poetry. In recent years, Chinese scholars have carried out many active and effective explorations in the field of Chinese test-based steganography methods. The literature [7] created the knowledge base of Tang and Song poems, and completed the vocabulary statistical classification and semantic classification of the knowledge base. The literature [8] developed a set of poetry language processing system based on the natural language processing technology of word join and its application. The literature [9] established the corpus of ancient Chinese poetry, completed the poetry classification of unconstrained and graceful style, and established the generation of lower couplet based on the upper couplet. The literature [10–12] used the recurrent neural networks to generate Tang poems. Based on the latest achievements in the analysis and processing of Tang poem, this paper proposed an information hiding method based on the intelligent generation of Tang poem. At first, by combing to the needs of information hiding, we collected the Tang poems from Tang Dynasty to Qing Dynasty in China, to build the initial Tang poem corpus. Then, the secret dictionary of meaning intention vocabulary was constructed through the semantic similarity and word meaning correlation analysis. Finally, the confidential information is embedded into the generated Tang poem in the process of generating Tang poem by using the machine learning model on recurrent neural networks. Here are the following parts of this paper: Sect. 2 introduced the machine learning language model on recurrent neural networks briefly; Sect. 3 showed the construction of Tang poem corpora and meaning intention lexical secret dictionary; Sect. 4 discussed the proposed information hiding method in detail; Sect. 5 was the experiment and the result analysis; Sect. 6 summarized the work of this paper.

Research on Information Hiding Based on Intelligent Creation …

747

2 Intelligent Language Model Based on Recurrent Neural Network Research on the forward-propagating machine learning language model based on recurrent neural networks has achieved remarkable success in the field of text generation [13, 14]. The structure of the recurrent neural network language model is as shown in Fig. 1. As is shown in Fig. 1, the neural network is composed of three input layers: hidden layer, output layer, and associated weight matrix. The input layer is composed of two vectors: w(t) and s(t–1), while w(t) represents the 1-of-V-type word vector of the current word wt and s(t–1) represents the output value of the previous step of hidden layer. The matrices U and W are the weight matrix of the operation between the input layer and the hidden layer. The matrix V is located between the hidden layer and the output layer. The formulas are shown as follows: s j (t) = f

 

wi (t)u ji +

i



 sl (t − 1)w jl

(1)

l

⎛ ⎞  s j (t)vk j ⎠ yk (t) = g ⎝

(2)

j

1 1 + e−z

(3)

ez m g(z m ) = z k ke

(4)

f (z) =

where the functions of f (z) and g(zm ) represent the sigmoid and softmax activation functions separately. The softmax activation function of the output layer activates the valid probability values of all the outputs, while the sum of all the probability values is 1. The matrix vector forms of Formulas (1) and (2) are: s(t) = f (U · w(t) + W · s(t − 1)) Fig. 1 Intelligent language model based on recurrent neural networks

(5) y (t)

w (t)

s (t)

s (t–1)

748

F. Li et al.

y(t) = g(V · s(t))

(6)

After the network being trained, the output layer y(t) represents the probability P(wt=1 |wt , s(t − 1) ).

3 Construction of Secret Dictionary of Meaning Intention Vocabulary Based on “Shi-Xue-Han-Ying” (note: a book on classical theory of Chinese ancient poem), this paper analyzed “sim” semantic similarity [15] and word meaning relevance [16] so as to obtain the two-Chinese-character depiction vocabulary which highly correlated with the meaning intention, further built the level and oblique tones dictionary by annotating the pronunciation of the related depiction vocabulary, and finally formed the secret dictionary of meaning intention vocabulary by screening. The procedure of making the secret dictionary of meaning intention vocabulary is shown in Fig. 2. In the level and oblique tones dictionary of meaning intention vocabulary, the flat sound was represented by the number 0, and the humming sound was represented by the number 1. In the subsequent vocabulary replacement of information hiding, we should make sure not only that the information hiding had good concealment, but also that the level and oblique tones of pronunciation of the replaced vocabulary were the same as the original vocabulary. Screening of the 1024 kinds of meaning intentionrelated depiction vocabulary was carried out, and the meaning intention types that did not have all the four kinds of combinations (00, 01, 10, and 11) were deleted; thus, 782 kinds of meaning intentions were remained. From the remaining 782 meaning intentions, the top 512 kinds of them with more common related vocabulary were selected (note: 512 is equal to 2 to the 9th power, i.e., 9 bits), and the secret dictionary of meaning intention vocabulary was generated by randomly grouping the meaning intentions. An example item of meaning intention vocabulary is shown in Table 1.

Semantic lexical analysis Meaning intention category of "Shi-XueHan-Ying"

Transcription of level and oblique tones of pronunciation

Depiction vocabulary of related Meaning intention

Secret index label (number)

Vocabulary of the level and oblique tones

Secret dictionary of meaning intention vocabulary

Fig. 2 Flowchart for making the secret dictionary of meaning intention vocabulary

Research on Information Hiding Based on Intelligent Creation …

749

Table 1 Nostalgic (“poet”) group of the secret dictionary Index number

Meaning intention

The tones of level and oblique

Related depiction vocabulary

Number of vocabulary

353

Poet

00

Etymology, high standard, poetry written in Qing Dynasty, great talent

4

01

Obtain a poetry line, thousands of volumes, spacious mind, high gentility

4

10

Angel writing brush, heroic spirit, poems of Du Fu, hundreds of poems

4

11

Vigor of strokes (in calligraphy or drawing), elegant rhyme, gumption, powerful writing style

4

4 Information Hiding Algorithm Based on Intelligent Creation of Tang Poem 4.1 Idea of the Proposed Information Hiding Algorithm In the CentOS system environment, with the TensorFlow1.0 framework released by Google, the authors used the Python2.7 development platform to build the information hiding system based on Tang poem intelligent generation. The system was mainly made up of the word vector Word2vec module, the Train training module and the PoemGenerator module for Tang poem generation. The PoemGenerator module mainly used the recurrent neural network model in the TensorFlow framework. The proposed system was a deep recurrent neural network language model with 5 layers and 128 neurons per layer. The Word2vec module converted each vocabulary into numerical vector, based on the word vector idea. The numerical vector was used as the parameter of the network in input layer. The procedure of the proposed information hiding algorithm is as follows: First, according to the secret sensitive information that needs to be hidden (note: the secret sensitive information is grouped in groups of 9 bits), the same meaning intention word

750

F. Li et al.

Original secret sensitive information groups (grouped in groups of 9 bits) Restore

Secret dictionary of meaning intention vocabulary Find out & select

Query

The meaning intention vocabularies corresponding to sensitive information groups Use as

The keywords of poetry generation module

Query

Arrow for extraction process

Arrow for embedding process

Query

The depiction vocabularies related to the meaning intention

Generate

Find out

The Tang poetry with sensitive information embedded in Fig. 3 Information hiding and extraction process based on Tang poetry generation

as the secret information code was selected out from the meaning intention depiction dictionary. Then, the selected meaning intention words were used as the keywords for generating Tang poems, which were provided to the recurrent neural networks to generate verses sentence by sentence. Thus, the verses contained vocabulary for the meaning intention, while the vocabulary came from the related vocabulary of the meaning intention vocabulary. When extracting information, the vocabulary of the verses was examined, and the meaning intention to which the vocabulary belongs was justified; therefore, the secret information could be obtained. The main idea and process of the proposed information hiding and extraction algorithm based on Tang poetry generation are shown in Fig. 3.

4.2 Algorithm of Information Hiding The secret meaning intention dictionary is used as the basis of secret coding when conducting information hiding. According to the binary bit string that needs to be hidden, the value was calculated for every 9 bits, which was a serial number for a meaning intention in the secret dictionary, while the meaning intention words were used as the keywords. The Tang poem intelligent generation system read a keyword each time and gradually generated the verses’ line through the recurrent neural network model. In the process of generating each verse, for the corresponding keywords, the network model automatically generated vocabulary according to the

Research on Information Hiding Based on Intelligent Creation …

751

Convert the secret information into a binary bit string with #(00100011) as the terminator; if the bit number of the binary bit string is not exactly an integer multiple of 9, padded it with 0. Calculate each 9 bits to get a value, which is the corresponding serial number of a keyword of the secret dictionary, thus to obtain the corresponding keyword table of the information to be hidden. Read a keyword from the above keyword table.

If the current keyword is not empty ?

Y

N

If the number of verses line is even ?

The input layer parameters of the recurrent neural networks of the time step of the current verse are composed of the state of the hidden layer of the previous time step and the word vector of the current input layer, that is, the keyword wt and the state st-1 of previous hiding layer. In the process of generating words of the current verse line, the relevant vocabulary is selected from the secret dictionary which matches the needs of level and oblique tones of pronunciation to replace the vocabulary to be generated, and update the learning rate parameter at the same time.

Y

N So, the hidden flag is false, and the number of verses is odd. The word vector of the recurrent neural network input of the time step of the current verse is empty. At this time, the input layer parameter has only the last time step state. Thus, generates a new verse line so as to finish the generation of the poetry.

End

Fig. 4 Proposed information embedding algorithm

context and replaced the existing vocabulary with the depiction vocabulary in the secret dictionary. The detailed description of the proposed algorithm is shown in Fig. 4.

4.3 Algorithm of Information Extraction The information extraction process is the reverse operation of the hiding process. The algorithm extracting secret information from the generated carrier Tang poems with information being hidden in is shown in Fig. 5. Read a line from the Tang poem with sensitive information embedded in. If the poem end ?

Y

N

For each two Chinese characters of the current Tang poem line, try to match the relevant vocabulary item in the secret dictionary; thus to get the corresponding meaning intention index number of the word. Convert the matched index number into binary bit strings, i.e., the secret hidden information has been extracted.

End Fig. 5 Proposed information extraction algorithm

752

F. Li et al.

5 Experimental Results and Analysis 5.1 Example of Steganography in Created Tang Poem In the process of generating verses of secret carried Tang poem by the recurrent neural networks using the lexical secret dictionary, each verse line hid 9-bit secret information. The sender can post the secrecy-carried Tang poems in the open Internet self-media or other scenarios, and the recipient can extract the secret hidden information according to the meaning intention dictionary. Here is an example of the secret 5-Chinese-word Tang poem generated related to the sensitive information that is to be converted: the secret sensitive bit string to be hidden (they are grouped by 9 bits per group): 100101110 011000001 110100100 101100100. Convert each 9-bit group into decimal index numbers, and their corresponding keywords in the meaning intention secret dictionary are as follows: 302 corresponding to “begonia,” 193 corresponding to “trade caravan,” 420 corresponding to “chrysanthemum,” 356 corresponding to “magpie.” Then, the above meaning intention serial number-related words are used to generate Tang poem with information hidden in: Spring scenery is gone, and the spring of crossroads is thin. The yellow flowers are heavy on the platform, and the birds are flying and singing. The procedure of extracting the hidden information from the verses of the secret carried Tang poem: Traverse the verses of the secret Tang poem, pick out the depiction vocabulary matched with the relevant two Chinese words in the meaning intention secret dictionary, and thus the corresponding meaning intention and their serial number are obtained: “the capital of shu” ⊂ “begonia 302,” “branch road” ⊂ “trade caravan 193,” “yellow flower” ⊂ “chrysanthemum 420,” “flight sing” ⊂ “magpie 356.” Thereby, the serial numbers of the meaning intentions can be converted into corresponding original secret sensitive information.

5.2 Comparison Experiment of Embedding Capacity with Similar Methods In terms of hiding capacity, for the Tang poems of the five-character sentence, each sentence has a total of 80 bits, and the hiding capacity of the hidden 9-bit information is 11.25%. Thus, the algorithm in this paper had a high hiding capacity and concealment. To compare the embedding efficiency of the presented algorithm, we list the embedding ratio of existing similar algorithms or systems in Table 2. As is shown in Table 2, the embedding capacity of the method proposed in this paper is higher than reference [17, 18] and [6], while paper [5] has the highest embedding ratio. For the method described in reference [5], although its’ listed embedding ratio is the highest, its high embedding capacity is at the expense of the quality of generated Ci poetry, for it chooses words randomly. As pointed out in

Research on Information Hiding Based on Intelligent Creation …

753

Table 2 Embedding capacity of similar algorithms or systems Algorithms or systems

Embedding capacity (%)

Comments

NICETEXT

0.29

From paper [18]

Steganography of the literature [17]

5–10

From paper [17]

High embedding ratio steganography of paper [5]

10–16

From paper [5]

Cistega of the literature [6]

7–10

From paper [6]

Steganography based on generation of Tang poem

11

paper 6, method of [5] can theoretically improve efficiency infinitely by expanding the word bank, but their kind of high embedding rate is no point in practical use.

5.3 Comparison Experiment of Human Evaluation of the Quality of Generated Poems To evaluate the quality of generated poems, we conducted professional judgments by inspecting the fluency, coherence, meaningfulness, etc., of the generated Tang poetries. Similarly with the literature [6], we also adopted a so-called ABX blind test to evaluate the performance of our presented Tang poetry generation method and thus to reveal the concealment of the proposed steganography algorithm. Before the blind test began, we mixed the Tang poetries, both written by human and generated by machine together, and did not let the people who attended the experiment have any idea about the poetries that they received. By this way, experiment can effectively eliminate influence of any priori information. Experiment participants are 30 senior students from the Department of Literature, College of Humanities. We compare our poetry generation method against the literature [19], and let the classic “Complete Tang Dynasty Poems” be our reference system. When the tests began, we distribute the mixed Tang poetries to the people participating in the experiment, and let them mark letter “A” on the Tang poem if they think it is written by human or mark letter “B” if they think it is generated by machine. The experimental results of our human evaluation are shown in Table 3. Table 3 Human evaluation score of similar algorithms or systems

Methods

Tang poem (5 Chinese words per sentence) (%)

Paper [19]

53.6

Complete Tang dynasty poems

73.4

Our method

69.4

754

F. Li et al.

As is shown in Table 3, we had conducted experiments on 5-Chinese-word poems. The data in the table is the percentage of Tang poems that is considered by the participants as written by humans, which means that the higher this percentage is, the better the poems is. From Table 3, we can see that the classic “Complete Tang Dynasty Poems” has the highest score of 73.4% of quality, and quality score of poems generated by our method reached 69.4% which is slightly lower, while paper [19] only obtained the quality score of 33.6% which is far behind the previous two methods. The experimental results strongly show that our method can generate very fluent, coherent, meaningful, and natural Tang poem, which thereby shows that the proposed method has strong concealment.

6 Summary and Outlook This study constructed a secret meaning intention dictionary with 512 kinds of meaning intentions. Based on the theory of the recurrent neural network language model, a system capable of intelligently generating Tang poem was built. This study designed the textual information hiding algorithm based on intelligent generation of Tang poetry: According to the secret sensitive bit string information to be hidden, the meaning intention in the secret meaning intention dictionary was indexed; in the process of generating the secret carried Tang poem, the words containing secret information were selected from the secret meaning intention dictionary to replace the words in the corresponding position; finally, a carrier Tang poem with sensitive information embedded in was generated. Each verse of Tang poem can hide 9-bit information. The hiding capacity of the five-character Tang poem could reach 11.25%. It is necessary to optimize the secret dictionary, and we will design a more concealment hiding method in the future. Acknowledgements We would like to thank the anonymous referees for their careful readings of the manuscripts and many useful suggestions. This work had been co-financed by: National Natural Science Foundation of China under Grant Nos. 61472092 and U1405254, and Guangdong Provincial Science and Technology Plan Project under Grant No. 2013B010401037.

References 1. Nadzeya, S., Pavel, U., Pawel, U.: A method of syntactic text steganography based on modification of the document-container aprosh. Prz. Elektrotechniczny 94(6), 82–85 (2018) 2. Malik, A., Sikka, G., Verma, H.K.: A high capacity text steganography scheme based on LZW compression and color coding. Eng. Sci. Technol.-An Int. J. 20(1), 72–79 (2017) 3. Shaker, A.A., Ridzuan, F., Pitchay, S.A.: Text steganography using extensions kashida based on the moon and sun letters concept. Int. J. Adv. Comput. Sci. Appl. 8(8), 286–290 (2017) 4. Chiang, Y.L., Chang, L.P., Hsieh, W.T. et al.: Natural language watermarking using semantic substitution for Chinese text. Digital Watermarking, Springer, Berlin Heidelberg, pp. 129–140 (2003)

Research on Information Hiding Based on Intelligent Creation …

755

5. Yu, Z.S., Huang, L.S., Chen, Z.L., Li, L.J., Yang, W., Zhao, X.X.: High embedding ratio text steganography by Ci-Poetry of the song dynasty. J. Chin. Inf. Process. 23(4), 55–62 (2009) 6. Luo, Y.B., Huang, Y.F., Li, F.F., et al.: Text steganography based on Ci-poetry generation using Markov chain model. KSII Trans. Internet Inf. Syst. 10(9), 4568–4584 (2016) 7. Hu, J.F., Yu, S.W.: The computer aided research work of chinese ancient poems. Acta Scientiarum Naturalium Universitatis Pekinensis 37(5), 727–733 (2001) 8. Li, L.Y., He, Z.S., Yi, Y.: Poetry stylistic analysis technique based on term connections. J. Chin. Inf. Process. 19(6), 100–106 (2005) 9. Yi, Y., He, Z.S., Li, L.Y., Zhou, J.Y., Qu, Y.B.: A traditional chinese poetry style identification calculation improvement model. Comput. Sci. 42(5), 156–158 (2005) 10. Huang, Y.F., Li, Q.: Classical poetry classification model based on feature terms clustered. J. Donghua Univ. (Nat. Sci. Ed.) 40(5), 599–604 (2014) 11. Zhang, X.X., Lapata, M.: Chinese poetry generation with recurrent neural networks. In: Conference on Empirical Methods in Natural Language Processing, pp. 670–680 (2014) (University of Edinburgh) 12. Yi, X., Li, R., Sun, M.: Generating Chinese classical poems with RNN encoder-decoder. In: Chinese Computational Linguistics and Natural Language Processing Based on Naturally Annotated Big Data. Springer, Cham, pp. 211–223 (2017) 13. Wang, Z., He, W., Wu, H. et al.: Chinese poetry generation with planning based neural network. In: 26th International Conference on Computational Linguistics, pp. 1051–1060 (2016) 14. Mikolov T, Karafiát M, Burget L, et al.: Recurrent neural network based language model. In: INTERSPEECH 2010, Conference of the International Speech Communication Association, Makuhari, Chiba, Japan, Sept. DBLP, pp. 1045–1048 (2010) 15. Mikolov, T., Kopecky, J., Burget, L. et al.: Neural network based language models for highly inflective languages. In: IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 4725–4728 (2009) 16. Hu, J.F., Yu, S.W.: Word meaning similarity analysis in Chinese ancient poetry and its applications. J. Chin. Inf. Process. 16(4), 39–44 (2002) 17. Pantel, P., Lin, D.: Discovering word senses from text. In: ACM SIGKDD Conference on Knowledge Discovery and Data Mining, pp. 613–619 (2002) 18. Wu, S.F.: Research on information hiding. Master Thesis, University of Science and Technology of China (2003) 19. Yi, Y.: Analysis of style in computer-aided poetry creation and research on joint language response. Doctoral thesis, Chongqing University (2005)

Design and Evaluation of Traffic Congestion Index for Yancheng City Fei Ding, Yao Wang, Guoxiang Cai, Dengyin Zhang, and Hongbo Zhu

Abstract With the rapid development of the Internet of vehicles (IoV), how to analyze and apply the big data based on the IoVs has become a research hotspot. Among them, the traffic performance index (TPI) is an important method to evaluate the urban congestion. In this paper, the actual bus data of Yancheng are analyzed to evaluate the TPI of urban public transport. Based on the speed of urban public transport, the definition of urban TPI is defined by partitioning its running speed. With the JavaScript (JS) development environment, the TPI under the urban bus scene based on Baidu map is realized. Based on the analysis of bus big data, the change rules of TPI of urban morning and evening peak can be evaluated. It is helpful for the urban bus manager to make a decision and correct the traffic condition by studying the actual operation of urban public transportation. Keywords Traffic · Bus · GPS · Traffic performance index

1 Introduction Traffic, an essential part of residents’ live, is also the focus of scholars’ research. Today, the traffic condition has changed enormously. Traffic jams in China’s firsttier cities are very common now [1, 2]. Meanwhile, many problems are emerging and the efficiency of road traffic has been greatly reduced. In china, public transport is an important component of urban transportation, and it is the first choice for citizens to travel [3]. If one certain section of the road is in poor condition, facing traffic peaks F. Ding (B) · Y. Wang · D. Zhang School of Internet of Things, Nanjing University of Posts and Telecommunications, 210003 Nanjing, China e-mail: [email protected] F. Ding · H. Zhu School of Telecommunications and Information Engineering, Nanjing University of Posts and Telecommunications, 210003 Nanjing, China G. Cai China Mobile Group Jiangsu Co., Ltd., 210029 Nanjing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_74

757

758

F. Ding et al.

and conflicts with cars, the passage of buses will not only increase the passage time, but also bring about the danger that cannot be ignored at the same time [4]. Traffic performance index (TPI), as an efficient indicator of road saturation according to vehicle operating speed, is a reflection of the rule of complicated traffic congestion [5]. A reasonable bus route has significant practical effect for alleviating traffic congestion and solving traffic problems [6]. This article takes the Yancheng B1 bus route as an example and puts forward a suitable model of public traffic performance index. From the open platform of Baidu map, we design a new kind of software relies on the traffic model, which combined with the bus data source, is used for further analysis [7, 8]. The analysis of public traffic conditions based on traffic performance index software helps us understand the actual traffic situation behind the data [9]. The purpose of this article is to measure the daily operational efficiency of Yancheng bus and provide reference for passenger transport companies to optimize bus routes [10].

2 Bus DPI Based on Actual Data Processing The Yancheng B1 bus studied in this article belongs to the urban BRT. Because the vehicle-mounted GPS records vehicle information in real time and feeds back summary data, the data source is derived from Yancheng bus’s existing dispatching system, which becomes the main data object for this study. The data source summarizes nearly 83,000 data for a B1 bus within 30 days of December 2017. Each piece of data records information such as operating time, vehicle latitude and longitude, and instantaneous speed. Due to the disorder and loss of some data in the data source and the overall data volume is too large, this paper extracts data by date and sorts it out. The GPS latitude and longitude in the table cannot be used directly on Baidu maps. As the international latitude and longitude coordinate standard is WGS-84, China must use at least the GCJ-02 developed by the State Survey Bureau to encrypt the geographical location. Based on this, Baidu coordinates conducted BD-09 secondary encryption measures. Therefore, the coordinate system used by Baidu is not the true latitude and longitude of GPS acquisition. There is actually a few hundred meters of deviation between the GPS coordinates of a point on Earth and Baidu map coordinates. Assume that the latitude and longitude of this point are: 120.1396, 33.40219. Then enter the above coordinates in the demo (http://lbsyun.baidu.com/jsdemo.htm#a5_2), there is a few hundred meters between the original coordinates and the converted coordinates. This is a deviation that cannot be ignored. It points out that the latitude and longitude of the data source must be converted in batches before the converted latitude and longitude can be correctly displayed on the Baidu map to facilitate the next step. To convert the original GPS coordinates to Baidu coordinates, you need to call Baidu map API interface. To use the API, you must apply for Baidu map developer

Design and Evaluation of Traffic Congestion Index for Yancheng City Fig. 1 Coordinate conversion process of bus acquisition data

759

Data preparation

Exist processed data?

N

Exit

Y Data conversion

Data storage

Get next row of data

qualification in advance. After obtaining the qualification, apply for the key (API key, AK for short) and declare the AK in the program before use. Because the basic program for transforming coordinates can only implement a single coordinate transformation, obviously this approach is very inefficient. The batch processing flow of bus source data is shown in Fig. 1. The coordinate transformation is done in the Java development environment. Based on the Java development environment, automated processing of real-world data (excel form files) is implemented. After the file is uploaded, the data in the data source is automatically read and batch operations are performed.

3 Map-Based TPI Design Since China’s road resources are very limited, when the city enters an active peak and there are more and more vehicles, bus lanes are easily compressed. Because of the real-time monitoring of the vehicle speed by the bus-mounted GPS monitoring system, and different road sections and intersections have restrictions; in fact, the bus speed is basically lower than 40 yards. It requires that the range of traffic performance indexed in this paper should not be too large, and the number of divisions should not be too much.

760 Table 1 Definition of TPI speed and GIS-based map rendering

F. Ding et al. TPI

Bus speed (km/h)

Distance in unit time (m)

Color in map

0–2

[30, +∞)

[1250, +∞)

Green

2–4

[20, 30)

[830, 1250)

Blue

4–6

[10, 20)

[416, 300)

Yellow

6–8

[0, 10)

[0, 416)

Red

According to the characteristics of the constructed road index model as shown in Table 1, we refer to the definition of speed and determines the interval speed by calculating the moving distance per unit time, connecting different sections of the map with different colored lines. Baidu maps is a platform for customers to provide real-time traffic conditions, smart planning, and other travel services and is the preferred smart assistant for people traveling. This article uses the application interface provided by Baidu maps for developers to implement traffic performance index software design [14]. Baidu map is divided into mobile phone terminal and Web page terminal, and correspondingly introduced two major map development portals of JavaScript API and WEB API. This program is based on web pages, comprehensively uses two kinds of APIs, displays Baidu maps in the browser, makes corresponding annotations on the map, and presents the final results based on the map; the main software code is completed in the Javascript compiler, and the program runs. You must ensure that you are in a networked environment. The program is divided into the following modules: data import, data transmission, speed determination, and labeling connection. These modules work in order. Figure 2 shows the process flow of data reception and map display of bus congestion index. After batch uploading the latitude and longitude information in the data source, the software automatically processes it and converts it to a Baidu map point. The distance between the two points is obtained through the function provided by the Baidu map interface and is converted into the average speed. At the same time, this article builds two kinds of pages in the same directory. Page A is used to upload files, which is equivalent to input; B pages are used for map display, which is equivalent to output. Using the method provided by HTML 5—local storage to achieve cross-Web data storage [15]. Then on the foundation this article adds a control at the top right corner of the map, which shows the speed sections.

Design and Evaluation of Traffic Congestion Index for Yancheng City

761

Loading file data

Save data into array

Data Receiving

Y

Data Processing Completed?

Exit

N Use map interface

Speed 30km/h

N

Y

Speed 20km/h

N

Y

Speed 10km/h

N

Y Green icon

Blue icon

Yellow icon

Next set of data

Fig. 2 TPI software processing flow

Red icon

762

F. Ding et al.

4 Experimental Results and Analysis 4.1 Daily Bus TPI Analysis In order to understand the actual operation status of daily buses in Yancheng and further improve the public transportation system [16], this paper adopts a well-designed procedure to input the source data after screening and focuses on the one-way direction (off-town to off-city) of public transportation companies heading for the Ocean Road. The source of the analysis data learned that latitude and longitude information had already appeared at 5:30 in the morning, but the actual morning bus started at 6:00. For example, on the morning of December 1, from 6:01 to 6:34, the trajectory is as follows (Fig. 3). Figure 3 (a) is the traffic congestion index of the first bus period, and Fig. 3 (b) is the traffic congestion index of the early peak period. It can be seen that compared with the first bus period, there is a continuous long-distance traffic jam in the early peak period, as shown in Fig. 3 (b), at area A and B. Due to the occurrence of congestion, B1 bus runs more than 15 minutes in the early peak period. Through the analysis of congestion at different times of every day, it can be used as reference data to optimize B1 bus line.

(a)

(b)

Fig. 3 B1 bus congestion analysis results via vehicle trajectory at different times within a day

Design and Evaluation of Traffic Congestion Index for Yancheng City

763

Fig. 4 Bus speed at morning and evening peaks

It is shown that all roads are open and there is very little congestion. The average speed is 21.28 km/h. However, large-scale congestion occurred in the trajectory within 7.34–8.16 of the morning peak of this day. Severe congestion occurred at the intersection of Xilong West Road and Jiefang North Road, and the duration of the bus trip exceeded 40 min. Figure 4 shows the speed change curve.

4.2 Working Day Bus TPI Analysis Select the data from December 4 (Monday) to 8 (Friday) for a total of five days for continuous analysis, and divide the morning and evening peaks. Calculate the total average speed of one-way journey. In the above equation, the numerator S represents the total distance of the trajectory, and the denominator t is the total time spent in the entire journey. The average speed for the five consecutive days in the morning and evening peak hours are shown in Fig. 5. The mean average speed is about 19.8 km/h. The comparison shows that during the working days of Yancheng, the peak morning and Tuesday morning conditions were the worst, with frequent congestion. Observe that the frequency of congestion in the sections below the morning peak in five days is high. At the same time, it was found that when the bus reached the junction of Luming Road or Dongjin Road, the speed began to accelerate until it reached the end of the Ocean Road, and the speed reached over 30 km. Here is the speed comparison for five consecutive days during late peak hours. After calculation, the average speed of the late peak is 16.47 km/h; the congested section of the late peak of Yancheng was viewed more continuously and concentrated on the continuous road section of Jiefangbei Road, Jiefangzhong Road, and Jiefang South Road to the Youth Road elevated. The following table shows the peak traffic congestion during the last five days.

764

F. Ding et al.

Fig. 5 Speed distribution at the peak of the morning and evening of the bus on working days (5 days). a Speed at early peaks. b Speed at evening peaks

4.3 Holiday Bus TPI Analysis December 25 is the date of Christmas in western festivals. Chinese pay more attention to Christmas in recent years. This paper also analyzes the traffic performance index on this day. The following figure shows the traffic performance index in the early morning peak on Christmas Day. From the actual data, the morning peak was calculated at an average speed of 19.3 km/h, which was 2.5% lower than the average speed of the ordinary time period. Due to the large number of pedestrians in the daytime during the holidays, roads in the urban areas are more crowded than usual. Figure 6 shows the traffic performance index during the Christmas peak hours. It shown from the above figure, the overall road traffic performance index is blue, indicating that the traffic condition of the bus route B1 in the early evening is basically unimpeded. According to the statistical analysis of actual data, the average speed of public transport B1 (transport company to Ocean Road) is 20.9 km/h, which is more than 10% of the average speed of normal working days. On the one hand, this indicates that the number of motor vehicles on the roads on the holidays is relatively small. On the other hand, it is also shown from the side that the flow of people who commuted to and from work on Christmas Day is not as usual.

Design and Evaluation of Traffic Congestion Index for Yancheng City

(a)

765

(b)

Fig. 6 Analysis results of traffic congestion index in the morning and evening peak on Christmas Day. a TPI in morning peak. b TPI in evening peak

5 Conclusions Based on the actual bus data of Yancheng, this paper defines the partition rules of TPI, and designs the distribution of bus speed based on Baidu map, and evaluates the distribution of bus TPI. In general, the software based on traffic performance index has been basically implemented, and the in-depth daily operation of public transportation in Yancheng has been thoroughly studied. In the follow-up study, we will further integrate the traffic characteristics of Yancheng and optimize the bus traffic performance index model that can reflect the operation of public transport. Acknowledgements This work is partially supported by the Ministry of Education-China Mobile Research Foundation, China (No. MCM20170205), the Communication Science Research Project of Ministry of Industry and Information Technology, China (No. 2019-R-26), the Six talent peaks project of Jiangsu Province (No. DZXX-008), the Postdoctoral Science Foundation, China (Nos. 2019M661900 and 2019K026) and the Research Foundation of NJUPT (Nos. NY220028 and NY217146). Yancheng Bus Co., Ltd and China Mobile Group Jiangsu Co., Ltd have cooperated with the real-time public transportation system. The actual bus data used in this paper is provided by China Mobile Group Jiangsu Co., Ltd and approved by Yancheng Bus Co., Ltd.

766

F. Ding et al.

References 1. Cui, Y.: Research on evaluation index system of urban traffic based on correlation analysis. Forest Engineering (2009) 2. Gao, W.J., Chen-Hu, L.I., Ting, L.I.: Prevalence of post-stroke depression and factor analysis in community of first-tier cities. Chin. J. Gen. Pract. 13, 395–411 (2014) 3. Farahani, R.Z., Miandoabchi, E., Szeto, W.Y., Rashidi, H.: A review of urban transportation network design problems. Eur. J. Oper. Res. 229, 281–302 (2013) 4. Tao, G., Song, H., Liu, J., Zou, J., Chen, Y.: A traffic accident morphology diagnostic model based on a rough set decision tree. Transp. Plan. Technol. 39, 45–47 (2018) 5. Currie, J., Walker, R.: Traffic congestion and infant health: evidence from E-ZPass. Am. Econ. J. Appl. Econ. 3, 65–75 (2011) 6. Wang, Q., Ayalew, B.: A probabilistic framework for tracking the formation and evolution of multi-vehicle groups in public traffic in the presence of observation uncertainties. IEEE Trans. Intell. Transp. Syst. 3, 1–12 (2018) 7. Wang, H.S., Zhou, H.Y.: Development of tourism geographic information system based on Baidu Map API. Mod. Comput. 5, 44–47 (2012) 8. Washington, D.: Highway capacity manual. Spec. Rep. 12, 5–7 (1994) 9. Pathak, V., Tripathi, B.D., Mishra, V.K.: Evaluation of anticipated performance index of some tree species for green belt development to mitigate traffic generated noise. Urban For. Urban Green. 1, 32–34 (2011) 10. Sun, X., Chen, X., Gao, Y.: Correlation analysis of traffic performance index and bus performance index with econometric model. Harbin Gongye Daxue Xuebao J. Harbin Inst. Technol. 1, 61–66 (2016) 11. He, F., Yan, X., Liu, Y., Ma, L.: A Traffic congestion assessment method for urban road networks based on speed performance index. Procedia Eng. 137, 425–433 (2016) 12. Wang, L., Lei, Y. U., Sun, J., Song, G. An overview of studies and applications on traffic performance index. J. Transp. Inf. Saf. (2016) 13. Jian, S.F.: The construction of performance evaluation index system for traffic management department in the county-level public security. J. Sichuan Police Coll. 32–34 (2015) 14. Wu, C., Shengli. Discussion on rational evaluation index of heavy traffic paving asphalt performance. Pet. Asph. 45–49 (2007) 15. Zhou, Z.H., Zhang, J., Qin, W.X., Zeng, Q.Y.: Train running performance and traffic safety index for Wuyi river bridge of Jinwen line. J. Vib. Shock 10, 9–13 (2011) 16. Zhou, Z., Lin, L., Yang, L., Wen, Y., Zeng, Q.: Study on running performance of train and index for traffic safety of Shiguo bridge. Appl. Mech. Mater. 8, 768–771 (2011)

A Survey on Anomaly Detection Techniques in Large-Scale KPI Data Ji Qian, Guangfu Zeng, Zhiping Cai, Shuhui Chen, Ningzheng Luo, and Haibing Liu

Abstract For Internet-based services quality, it is very necessary for Internet companies to monitor a large number of key performance indicators (KPIs) and accurately detect anomalies. With the increasingly complex structure of the system, the changing characteristics of the performance monitoring data have gradually become a challenge for anomaly detection. Recently, in the performance management sector, there has been renewed interest in research on anomaly detection of KPI streams. There has been a lot of work in the area of clustering-based unsupervised anomaly detection. This paper presents a survey of various clustering-based anomaly detection techniques and discusses the advantages, limitations, and practical significance of different algorithms. Some practical application-related kinds of literature are summarized. At the end of the paper, we put forward some new research trends and opinions and suggestions for the research direction. Keywords Performance monitoring · Anomaly detection · Dimensionality reduction

1 Introduction Internet-based services companies’ constant monitoring service quality and detecting performance to keep their services reliable for the anomalies on KPIs (e.g., sudden increase, sudden drop, or jitter) which often means that some potential failures have occurred on their applications. To ensure the stability of their services, anomaly detection technique, an important data analysis task, is useful to mitigate the loss brought by such events (e.g., network failures, server failures, configuration errors, network overload, server overload, or external attacks) [1]. J. Qian · Z. Cai (B) · S. Chen College of Computer, National University of Defense Technology, 410073 Changsha, China e-mail: [email protected] G. Zeng · N. Luo · H. Liu Shenzhen Ningyuan Technology Company, 518000 Shenzhen, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_75

767

768

J. Qian et al.

Anecdotal evidence indicates that the performance management level has a major impact on the quality of service (QoS) and quality of experience (QoE). Since the widely monitoring layers and the long monitoring time, there is a large scale of KPI streams generated every day. Besides, different types of KPIs require different anomaly detection models. Directly used anomaly detection algorithm to these complicated KPIs is invalid. This will bring huge computational overhead. It is challenging to meet the daily operation and maintenance work by collecting performance indicators and correlating abnormal application logs according to their quantity and type. Fortunately, many KPIs have implicit associations and similarities. If we can identify homogeneous KPIs based on their similarities and group them into a few clusters, perhaps only one anomaly detection detector is needed per cluster, in this way significantly solving all sorts of overhead mentioned above [2]. Though many anomaly detectors have been proposed for the past years [3], the anomaly detection model selects an appropriate anomaly detection algorithm according to different KPI type and needs to apply the anomaly detection algorithm to a given KPI to achieve an effective anomaly detection score for which the parameter combinations must be tuned. This process requires the developer of the anomaly detection model to communicate with the operator to obtain domain knowledge. Only when the iterative adjustment of the anomaly detection algorithm has completed, can the developer get the appropriate parameters. However, after such time-consuming consumption of model selection, parameter tuning, the anomaly detection model can only be applied to a given KPI stream. Therefore, a strategy for automatically adapting the anomaly detectors is crucial. Because of the specific needs in the large-scale KPI data anomaly detection aforementioned, this paper focuses on the dimension reduction and clustering of performance monitoring KPI data and the state-of-the-art applications in recent years. The goal is to comprehensive grasp the key techniques and applications for anomaly detection techniques for performance management and an overview of the most recent techniques. Finally, some interesting related research points about anomaly detection in performance management are discussed and future research trends are also summarized, which is hopefully beneficial to the researchers of relative domains. The remaining part of this paper is organized as follows. The second chapter introduces the dimensionality reduction and clustering methods of time series. The third chapter introduces the anomaly detection algorithm of KPI data and some representative research results under practical application scenarios. The fourth chapter briefly describes some interesting related research points for KPI anomaly detection in performance management. In the fourth chapter, we will look into future research work and summarize the full text in the sixth chapter.

2 Dimensionality Reduction and Clustering Due to the large amounts of components in the Internet company, the indicators range from tens of thousands to hundreds of thousands. These KPIs range from the CPU,

A Survey on Anomaly Detection Techniques in Large-Scale KPI Data

769

Table 1 Comparison of dimensionality reduction algorithms Algorithms

Positive

Negative

PCA

Simple model, computational efficiency

Ignore category attributes

LDA

Prior knowledge for categories

Unsupport non-Gaussian samples

LLE

Fewer parameters

Strict restrictions on samples

MDS

A significant difference in various data

No evaluation measures

LTSA

Present local geometric features

Not support to online learning

memory, and network of the infrastructure to hundreds of thousands of different tasks. It has the characteristics of large scale and high dimension, so performing data analysis tasks in these huge datasets tasks are almost impossible. Fortunately, many KPI streams are similar since their implicit associations and similarities. Therefore, in large-scale KPI data anomaly detection, we can make data preprocess for getting a quicker and easier experience in data analysis tasks. In the remaining part, the dimensionality reduction and clustering methods of KPI data will be introduced separately in the following two sections.

2.1 Dimensionality Reduction Algorithms for KPI Data The dimensionality reduction algorithms of KPI data are mainly divided into linear data dimensionality reduction and nonlinear data dimensionality reduction. Linear data dimensionality reduction methods such as principal component analysis (PCA) [4], hidden Dirichlet model, linear discriminant analysis (LDA) [5], and locally linear embedding (LLE) [6]. Nonlinear dimensionality reduction methods such as the dimensionality reduction methods based on the local tangent space analysis (LTSA) [7] and the dimensionality reduction methods based on the neural network (NN). The linear dimensionality reduction methods have less error but complicated calculation, while the nonlinear dimensionality reduction methods have high computational efficiency, but the error is high. The relative linear dimensionality reduction algorithm is large, and the specifically related dimensionality reduction algorithm pairs are shown in Table 1.

2.2 Clustering Algorithms for KPI Data For the KPI data dimensionality reduction, in order to further reduce the overhead and to match the anomaly detection model with different types of KPI curves, it is necessary to classify different types of KPI curves, because of the numerous KPI types of performance monitoring data. KPIs are time series. Clustering methods group time series data into their respective states and discover changes by identifying

770

J. Qian et al.

Table 2 Comparison of clustering algorithms Algorithms

Positive

Negative

K-means

Fast, simple, linear

Configuration difficulty

DBSCAN

Easy implement

Sensitive parameters

FCM

Accurate, flexibility, accuracy

Poor adapt imbalanced samples

ROCKA

Robust and rapid

For large-scale KPI data

differences between features of the states. [8] Time series clustering is a popular research direction that has caught lots of attention for over 20 years. Aghabozorgi et al. [9] summarized large numbers of methods on this topic, however, most of which are designed for smooth and idealized data, not for KPI data. In Table 2, we compare the advantages and disadvantages of different representative algorithms, such as pre-clustering algorithm such as K-means [10], density-based clustering algorithms such as the famous DBSCAN [11], only contains 0 and 1 classifications in membership degree, that is, each object belongs to A classification or belongs to B classification. Soft clustering algorithms such as fuzzy set based clustering such as FCM (Fuzzy c-Shape) [12], also known as fuzzy clustering, In fuzzy clustering, an object has a degree of membership in each cluster and make each object have a membership degree between 0 and 1. If the membership degree is 0, it does not belong to the classification at all. And while the membership degree is 1 means it belongs to the classification completely. In most cases, there will be an object with a 0.4 membership degree belonging to A classification, and 0.6 membership degree belongs to B classification, which makes the description of the facts more accurate in the actual situation. ROCKA [13] is an important step toward the KPI anomaly direction of using KPI clustering to enable (previously infeasible) large-scale KPI anomaly detection. It is a robust and rapid time series clustering algorithm, to cluster a large number of KPIs, which are a special type of time series, with noises, anomalies, phase shifts, amplitude differences, and high dimensionality.

3 Anomaly Detection Methods for KPI Data As a hot research direction, a series of KPI anomaly detection algorithms, including traditional statistical algorithms, supervised learning-based methods, and unsupervised learning-based methods [14], have been proposed by many researchers for these years [15]. Anomaly detection for KPI streams is a two-class classification problem. The mean idea of the above anomaly detection methods is to compute the anomaly score of the change point and group each data point in KPI streams to the normal points or anomalies based on its anomaly score, which represents the degree of abnormality.

A Survey on Anomaly Detection Techniques in Large-Scale KPI Data

771

The early researchers focused on traditional statistical-based anomaly detection methods, including ARIMA [16], SVD [17], time series decomposition (TSD) [18], etc. [19, 20]. According to the deviation between the performance monitoring value and the prediction value, the rate of the predicted value changes to detect anomalies. Using this method, operators have to select an anomaly detection algorithm for each KPI scenario and tune its parameters manually for each KPI stream, which is not feasible for the large overhead of model selection and parameters tuning. Krishnamurthy et al. [21] find suitable parameters from historical data through multi-step grid search, and Himura et al. [22] propose methods for finding suitable parameters from historical data for anomalous events with the highest probability of anomaly. Although these works can get the appropriate parameters, the scope of application is too limited. When the anomaly detector is first applied to a given service, there is usually not enough to mark history data to make it work well. With the rapid development of big data, the application of machine learning technology has become widely used, and anomaly detection algorithms based on machine learning have become popular. To address the challenge posed by the large overhead of algorithm selection and parameter tuning, a series of classification algorithms based on supervised learning such as EGADS [23] and Opprentice [24] have been proposed, automatically combining and tuning diverse detectors to address the above two challenges. However, the heavy reliance on manually labeling anomalies for new KPI streams is not satisfied with a large number of newly emerging KPI streams either. Unsupervised learning has become a hopeful research direction of KPI anomaly detection, such as the isolation-based methods [25] and the variational autoencoder (VAE) [26] are applied to detect anomalies in the KPI stream. These methods can be trained dispense with manually anomaly labels so they can be applied to a large number of KPI streams. However, isolation-based methods are less accurate [27] (for its sensitive to noises). Additionally, Donut [26] requires long-term (6 months) training data for emerging newly KPI streams. During the long term, Internet-based services may suffer from false alarms (due to loss of accuracy) and/or missed alerts (due to low recalls) and result to affect user experience and revenue. Erfani et al. [28] proposed an unsupervised anomaly detection technique for highdimensional large-scale unlabeled datasets. This technique is a combination of a DBN and one-class SVM. The DBN is trained as a dimensionality reduction algorithm, generating a nonlinear manifold and transforming the data into a lower-dimensional set of features. This research significantly improved the efficiency of training and detection of anomaly detection models but does not support online learning and incremental learning. Xu et al. [29] introduce an adaptive detection method based on reinforcement learning, which automatically triggers the transformation of the anomaly detection model to the Markov decision process by perceiving the changes in the characteristics of the monitoring data, but the parameters tuning time cost may not satisfy with a large number of newly emerging KPI streams online anomaly detecting. Bu et al. [30] proposed the first framework anomaly detection through self-training (ADS) and quickly deployed a large number of anomaly detection models of emerging KPI streams through clustering and semi-supervised learning methods, without

772

J. Qian et al.

the need to select algorithms, parameter adjustments, or emerging KPI stream new exception tag. ADS is a significant step toward practical anomaly detection on largescale KPI streams in Internet-based services. In addition, Ma et al. [31], the problem of concept drift in anomaly detection is studied: a framework stepwise is proposed, which can detect concept drift without adjusting the detection threshold or per KPI model parameters in large-scale KPI flow.

4 Related Research Intelligent performance management is a new research direction that has emerged in recent years. The anomaly detection of KPI data is one of its basic tasks. In addition, in order to further maintain the robustness of the system and application based on Internet, the following are listed in this section. Meaningful research direction: Devices logs anomaly detection and troubleshooting With the continuous breakthrough of NLP technology, a large number of system equipment logs have become valuable research materials. Devices logs describe a vast range of events, which are extremely valuable in network device management (say anomaly detection and troubleshooting). Author of [32–34] conducts a series of studies on the switch and router Syslogs date mining for novel template extraction and prediction of devices failures in a data center network. Network environment optimization Nie et al. [35, 36] used machine learning to improve the initial window mechanism of the network transport layer TCP protocol, thereby improving the network communication efficiency of specific services and reducing the abnormalities that may occur in the transmission. Reference [37] proposes a fault-tolerant DCN solution that reduces network failure recovery time. Abnormal diagnosis and positioning Literature [38, 39] proposed an automatic diagnosis system based on a causal map, which extracts the causal map from the historical data of the monitoring system to help the system operation and maintenance personnel find the root cause of the anomaly. Hotspot [40], the problem of the abnormal location of multi-dimensional attribute KPI is studied, which provides a solution for the root cause of rapid location anomaly when the overall KPI is abnormal. Software change impact estimates Literature [41] designed an automated tool for rapid impact assessment of software changes in large Internet-based services. Automatically collect relevant performance measurements for each software change. It also detects significant changes in performance behavior and effectively avoids anomalies by assessing the risk in advance. Tools Literature [42] designed a special database for performance monitoring data for its needs of time series anomaly detection (general data model, specific builtin functions, storage efficiency, and fast query execution), and optimized database operations for data effectiveness.

A Survey on Anomaly Detection Techniques in Large-Scale KPI Data

773

5 Discussion Although the research results in the field of anomaly detection of performance monitoring data are becoming more and more significant, there are still some key open research problems that are worthy of attention. As a summary, the following points are proposed for the anomaly detection of KPI data: A. Use a large amount of high-quality data to serve: Data volume and quality are important when cultivating large and complex intelligent anomaly detection architectures, as deep models often have a large number of parameters to learn and configure. This problem still exists in monitoring data anomaly detection applications. Unfortunately, unlike some popular research areas (such as computer vision and NLP), there is still a lack of high-quality and large-scale tagged data sets for intelligent operation and maintenance anomaly-related applications, because service providers prefer to retain their data. Confidential and unwilling to publish its data set, this has restricted the development of this field to a certain extent. B. Further research on abnormal decision making, the current research results mainly stay at the stage of fault discovery and location, but there are still few researches on fault intelligent handling, etc. The research on automatic decision making for anomalies is still a need for further research and development. Direction, intensive learning, and knowledge mapping may be good directions, and all of these tools require further research to complete the potential of operations. C. Concerning the further improvement of the anomaly detection algorithm for performance monitoring data, the algorithm efficiency of the current anomaly detection algorithm is still not satisfactory. Therefore, how to further reduce the complexity of the algorithm to adapt to dynamic timing monitoring anomaly mining needs further research.

6 Conclusion This paper reviews the key techniques of anomaly detection in a large number of KPI data. Firstly, it introduces the related technologies of large-scale high-dimensional KPI anomaly detection, data preprocessing the dimension reduction and clustering of performance monitoring KPI data and the state-of-the-art applications in recent years. The goal is to grasp the key techniques and applications for anomaly detection techniques in performance management and begin a brief overview of the most recent techniques. Finally, some interesting related research points about anomaly detection in performance management are discussed and future research trends are also summarized, which are hopefully beneficial to the researchers of relative domains. Acknowledgements This work was supported in part by the Mobile Internet-based medical treatment and health management service platform project (S2016I64200024).

774

J. Qian et al.

References 1. Luo, M., Wang, K., Cai, Z., Liu, A., Li, Y., Cheng, C.F.: Using imbalanced triangle synthetic data for machine learning anomaly detection. Comput. Mater. Contin. 58(1), 15–26 (2019) 2. Cui, J., Zhang, Y., Cai, Z., Liu, A., Li, Y.: Securing display path for security sensitive applications on mobile devices. Comput. Mater. Contin. 55(1), 17 (2018) 3. Sun, W., Cai, Z., Li, Y., Liu, F., Fang, S., Wang, G.: Security and privacy in the medical internet of things: a review. Secur. Commun. Netw. (2018) 4. Huizinga, W., Poot, D.H., Guyader, J.M., Klaassen, R., Coolen, B.F., van Kranenburg, M., Van Geuns, R., Uitterdijk, A., Polfliet, M., Vandemeulebroucke, J., et al.: PCA-based groupwise image registration for quantitative MRI. Med. Image Anal. 29, 65–78 (2016) 5. Zhou, X., Wu, S.: Rating lda model for collaborative filtering. Knowl.-Based Syst. 110, 135–143 (2016) 6. Roweis, S.T., Saul, L.K.: Nonlinear dimensionality reduction by locally linear embedding. Science 290(5500), 2323–2326 (2000) 7. Zhang, Z., Zha, H.: Principal manifolds and nonlinear dimensionality reduction via tangent space alignment. SIAM J. Sci. Comput. 26(1), 313–338 (2004) 8. Fang, S., Cai, Z., Sun, W., Liu, A., Liu, F., Liang, Z., Wang, G.: Feature selection method based on class discriminative degree for intelligent medical diagnosis. Comput. Mater. Contin. 55(3), 419–433 (2018) 9. Aghabozorgi, S., Shirkhorshidi, A.S., Wah, T.Y.: Time-series clustering-a decade review. Inf. Syst. 53, 16–38 (2015) 10. Arora, P., Varshney, S., et al.: Analysis of k-means and k-medoids algorithm for big data. Procedia Comput. Sci. 78, 507–512 (2016) 11. Kumar, K.M., Reddy, A.R.M.: A fast DBSCAN clustering algorithm by accelerating neighbor searching using groups method. Pattern Recogn. 58, 39–48 (2016) 12. Fahiman, F., Bezdek, J.C., Erfani, S.M., Palaniswami, M., Leckie, C.: Fuzzy c-Shape: a new algorithm for clustering finite time series waveforms. In: 2017 IEEE International Conference on Fuzzy Systems (FUZZ-IEEE). pp. 1–8. IEEE (2017) 13. Li, Z., Zhao, Y., Liu, R., Pei, D.: Robust and rapid clustering of KPIs for large-scale anomaly detection. Quality of Service (IWQoS) pp. 1–10 (2018) 14. Yu, G., Cai, Z., Wang, S., Chen, H., Liu, F., Liu, A.: Unsupervised online anomaly detection with parameter adaptation for KPI abrupt changes. In: IEEE Transactions on Network and Service Management. pp. 1–1 15. Aminikhanghahi, S., Cook, D.J.: A survey of methods for time series change point detection. Knowl. Inf. Syst. 51(2), 339–367 (2017) 16. Zhang, Y., Ge, Z., Greenberg, A., Roughan, M.: Network anomography. In: Proceedings of the 5th ACM SIGCOMM conference on Internet Measurement. pp. 30–30. USENIX Association (2005) 17. Mahimkar, A., Ge, Z., Wang, J., Yates, J., Zhang, Y., Emmons, J., Huntley, B., Stockert, M.: Rapid detection of maintenance induced changes in service performance. In: Proceedings of the Seventh Conference on emerging Networking Experiments and Technologies. p. 13. ACM (2011) 18. Chen, Y., Mahajan, R., Sridharan, B., Zhang, Z.L.: A provider-side view of web search response time. In: ACM SIGCOMM Computer Communication Review. vol. 43, pp. 243–254. ACM (2013) 19. Barford, P., Kline, J., Plonka, D., Ron, A.: A signal analysis of network traffic anomalies. In: Proceedings of the 2nd ACM SIGCOMM Workshop on Internet mea- surement. pp. 71–82. ACM (2002) 20. Yan, H., Flavel, A., Ge, Z., Gerber, A., Massey, D., Papadopoulos, C., Shah, H., Yates, J.: Argus: End-to-end service anomaly detection and localization from an ISP’s point of view. In: INFOCOM, 2012 Proceedings IEEE. pp. 2756–2760. IEEE (2012)

A Survey on Anomaly Detection Techniques in Large-Scale KPI Data

775

21. Krishnamurthy, B., Sen, S., Zhang, Y., Chen, Y.: Sketch-based change detection: methods, evaluation, and applications. In: Proceedings of the 3rd ACM SIGCOMM conference on Internet measurement. pp. 234–247. ACM (2003) 22. Himura, Y., Fukuda, K., Cho, K., Esaki, H.: An automatic and dynamic parameter tuning of a statistics-based anomaly detection algorithm. In: 2009 IEEE International Conference on Communications, ICC’09. pp. 1–6. IEEE (2009) 23. Laptev, N., Amizadeh, S., Flint, I.: Generic and scalable framework for automated time-series anomaly detection. In: Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. pp. 1939–1947. ACM (2015) 24. Liu, D., Zhao, Y., Xu, H., Sun, Y., Pei, D., Luo, J., Jing, X., Feng, M.: Opprentice: towards practical and automatic anomaly detection through machine learning. In: Proceedings of the 2015 Internet Measurement Conference. pp. 211–224. ACM (2015) 25. Ding, Z., Fei, M.: An anomaly detection approach based on isolation forest algorithm for streaming data using sliding window. IFAC Proc. Vol. 46(20), 12–17 (2013) 26. Xu, H., Chen, W., Zhao, N., Li, Z., Bu, J., Li, Z., Liu, Y., Zhao, Y., Pei, D., Feng, Y., et al.: Unsupervised anomaly detection via variational auto-encoder for seasonal kpis in web applications. In: Proceedings of the 2018 World Wide Web Conference on World Wide Web. pp. 187–196. International World Wide Web Conferences Steering Committee (2018) 27. Zhang, Y.L., Li, L., Zhou, J., Li, X., Zhou, Z.H.: Anomaly detection with partially observed anomalies. In: Companion of the Web Conference 2018 on The Web Conference 2018. pp. 639– 646. International World Wide Web Conferences Steering Committee (2018) 28. Erfani, S.M., Rajasegarar, S., Karunasekera, S., Leckie, C.: High-dimensional and large-scale anomaly detection using a linear one-class SVM with deep learning. Pattern Recogn. 58, 121–134 (2016) 29. Xu, Y., Chen, N., Huang, R., Zhang, H.: KPI data anomaly detection strategy for intelligent operation and maintenance under cloud environment. In: International Conference on Intelligent Information Processing. pp. 311–320. Springer, Berlin (2018) 30. Bu, J., Liu, Y., Zhang, S., Meng, W., Liu, Q., Zhu, X., Dan, P.: Rapid deployment of anomaly detection models for large number of emerging KPI streams. In: 2018 IEEE 37th International Performance Computing and Communications Conference (IPCCC). IEEE (2018) 31. Ma, M., Zhang, S., Pei, D., Huang, X., Dai, H.: Robust and rapid adaption for concept drift in software system anomaly detection. In: IEEE International Symposium on Software Reliability Engineering (ISSRE). IEEE (2018) 32. Meng, W., Liu, Y., Zhang, S., Pei, D., Dong, H., Song, L., Luo, X.: Device-agnostic log anomaly classification with partial labels. Quality of Service (IWQoS). IEEE pp. 1–10 (2018) 33. Zhang, S., Liu, Y., Meng, W., Luo, Z., Bu, J., Yang, S., Liang, P., Pei, D., Xu, J., Zhang, Y. et al.: Prefix: switch failure prediction in datacenter networks. In: Proceedings of the ACM on Measurement and Analysis of Computing Systems vol. 2, no. 1, p. 2 (2018) 34. Zhang, S., Meng, W., Bu, J., Yang, S., Liu, Y., Pei, D., Xu, J., Chen, Y., Dong, H., Qu, X., et al.: Syslog processing for switch failure diagnosis and prediction in datacenter networks. In: Quality of Service (IWQoS), 2017 IEEE/ACM 25th International Symposium on. pp. 1–10. IEEE (2017) 35. Nie, X., Zhao, Y., Chen, G., Sui, K., Chen, Y., Pei, D., Zhang, M., Zhang, J.: TCP wise: one initial congestion window is not enough. In: 2017 IEEE 36th International Performance Computing and Communications Conference (IPCCC). pp. 1–8. IEEE (2017) 36. Nie, X., Zhao, Y., Pei, D., Chen, G., Sui, K., Zhang, J.: Reducing web latency through dynamically setting TCP initial window with reinforcement learning 37. Chen, G., Zhao, Y., Xu, H., Pei, D., Li, D.: F2 tree: rapid failure recovery for routing in production data center networks. IEEE/ACM Trans. Netw. (TON) 25(4), 1940–1953 (2017) 38. Chen, J., Cai, Z., Chen, S.: Efficient distributed joint detection of widespread events in large networked systems. In: Global Communications Conference (GLOBECOM), 2016 IEEE. pp. 1–6. IEEE (2016) 39. Nie, X., Zhao, Y., Sui, K., Pei, D., Chen, Y., Qu, X.: Mining causality graph for automatic web-based service diagnosis. In: 2016 IEEE 35th International Performance Computing and Communications Conference (IPCCC). pp. 1–8. IEEE (2016)

776

J. Qian et al.

40. Sun, Y., Zhao, Y., Su, Y., Liu, D., Nie, X., Meng, Y., Cheng, S., Pei, D., Zhang, S., Qu, X., et al.: Hotspot: anomaly localization for additive kpis with multidimensional attributes. IEEE Access 6, 10909–10923 (2018) 41. Zhang, S., Liu, Y., Pei, D., Chen, Y., Qu, X., Tao, S., Zang, Z., Jing, X., Feng, M.: Funnel: Assessing software changes in web-based services. IEEE Trans. Serv. Comput. 11(1), 34–48 (2018) 42. Lautenschlager, F., Philippsen, M., Kumlehn, A., Adersberger, J.: Chronix: Long term storage and retrieval technology for anomaly detection in operational data. In: FAST. pp. 229–242 (2017)

A Counterfactual Quantum Key Distribution Protocol Based on the Idea of Wheeler’s Delayed-Choice Experiment Nan Xiang

Abstract This paper elaborates the idea of Wheeler’s delayed-choice experiment, analyzes the process of bomb detection based on the idea, and introduces a counterfactual quantum distribution protocol. The protocol can detect the eavesdropping behavior accurately and timely and fundamentally eliminate the eavesdropper’s access to communication information. Keywords Wheeler’s delayed-choice experiment · Quantum key distribution

1 Introduction Quantum cryptography was born in 1969. It uses the quantum properties of microscopic particles to protect information. One of the most basic quantum attributes is the uncertainty principle, which shows that two conjugate physical quantities cannot be measured accurately at the same time. An important inference for the uncertainty principle is the quantum non-cloning theorem of the unknown quantum state [1]. Non-cloning principle and uncertainty principle provide security guarantee for quantum cryptography, which makes quantum cryptography scheme unconditional security and can be realized by physical means. Quantum cryptography, unlike traditional cryptosystems, relies on physics as the key to security rather than mathematics. Quantum cryptography is important and interesting from both cryptographic and physical points of view. Quantum key distribution is a method that allows two parties (Alice and Bob) to share a secret key, whose secrecy is protected by the laws of quantum mechanics, such as no-cloning and the indistinguishability of non-orthogonal states [2]. The research of quantum key distribution is one of the hotspots in quantum cryptography. N. Xiang (B) Institute of Computer Science, Beijing University of Posts and Telecommunications, 100876 Beijing, China e-mail: [email protected] Science and Technology on Information Assurance Laboratoty, 100072 Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_76

777

778

N. Xiang

Taking BB84 as an example [3], whether the error rate of the selected base sequence exceeds the error threshold can be used to verify whether someone is eavesdropping during transmission. Due to the fragility of photons and the interference of channel noise, this method of eavesdropping detection has limitations in application. This paper intends to analyze how to detect the potential eavesdropper on the channel using the idea of Wheeler’s delayed-choice experiment. This method can accurately and timely detect the eavesdropper’s eavesdropping behavior without any information loss and can fundamentally eliminate the eavesdropper’s access to communication information, which has strong military significance.

2 Wheeler’s Delayed-Choice Experiment In quantum mechanics, the quantum states of quantum systems can be described by wave functions. The Schrodinger equation sets how wave functions evolve over time. In the perspective of mathematics, Schrodinger’s equation is a kind of wave equation, so the wave function has the property of similar wave. Generally speaking, physical quantities cannot be measured without disturbing the time evolution of quantum systems, because measuring behavior itself disturbs the quantum system. According to the equation of motion, the time evolution of quantum system can be expressed by determinism, and however, because the instantaneous observation pulls them into our world, there will be a wonderful process of “wave function collapse.” It seems that quantum mechanics is considered to be unable to answer the question of whether physical quantities can be accurately measured in the course of time evolutionary process. Of course, there is no reason why we should only take the daily sense and classical mechanics as a constant basis. Quantum mechanics represents a world completely different from our intuitive feelings. It is a common sense. Only by first accepting this concept can we advance physics. The aforementioned problems may have been meaningless in quantum mechanics. In recent years, with the advent of weak quantum measurement by Y. Aharonov et al., the unsolvable state of this problem has changed. In the following chapters, we will explain the well-known idea of Wheeler’s delayed-choice experiment and take bomb detection as an example to further elaborate the counterfactual idea of quantum weak measurement. Delayed-choice experiment is an ideological experiment proposed by John A. Wheeler, an American theoretical physicist, which pushes the idea of Copenhagen School to the extreme. In 1979, at a symposium at Princeton University commemorating the 100th anniversary of Einstein’s birth, Wheeler formally put forward the idea of delayed-choice experiment. This dramatic thought experiment declares that we can “delay” the decision of electrons to choose whether to pass one or two slots after it has actually passed the double-slot screen. This statement shocked the academia at that time. The basic idea of the experiment is to replace the double slit with a half silver-coated reflector. A photon is half possibility to pass through a mirror and half possibility to be reflected. This is a quantum random process, essentially the same as whether it chooses a double slit or a single slit. Using two total reflectors M1M2,

A Counterfactual Quantum Key Distribution Based on the Idea … semi-lens BS1 incident photon

Transmit with half probability Path A

779

Faraday mirror M1

Reflect with half probability Path B Faraday mirror M2

DetectorX semi-lens BS2 DetectorY

Fig. 1 Schematic diagram of Wheeler’s delayed-choice experiment

the two separate branch roads can be reunited. As shown in Fig. 1, by observing the measurement results of two single-photon detectors at the end, we can determine which path the photons are coming along. However, if a semi-silver-plated semi-lens BS2 with an angle of 45 degrees is inserted at the end point, the self-interference of photons will occur. By carefully arranging the phase position, constructive interference can occur in the horizontal direction and photons can be received in detector X. In the vertical direction, the destructive interference occurs, the photons are reversed and cancel each other, and detector Y cannot receive photons. Thus, each time we get a definite result, just like the interference fringes in the double-slit interference experiment, according to the interpretation of quantum mechanics, because of interference, photons must come along two paths at the same time. In short, if we do not insert BS2 at the end, the photon will follow a certain path (or A or B), otherwise, it will pass through two paths at the same time and interfere with itself. Whether BS2 is inserted or not, we can decide when the photon has actually passed BS1, in other words, when the photon is near to the end point. This means that on the scale of a quantum, we can decide how something should happen (the photon is transmitted or reflected) after it happens. This leads to a strange conclusion: The behavior of the observer determines the history of photons. Since this experiment does not limit the scale of the laboratory, the two paths A and B can theoretically be infinite, the distance can be several meters, thousands of meters, even hundreds of millions of light years, which will not affect the final conclusion. The past determined by the observer’s current behavior may be very distant, even to the early days of the universe before mankind was born. In the history of nearly 200 years, from Young’s double-slit interference experiment to Wheeler’s delayed-choice experiment, every step had a great impact on the concept of reality in the circumstances. Wheeler quotes Bohr as saying that any fundamental quantum phenomenon is a phenomenon only after it has been recorded.

780

N. Xiang

3 Bomb Detection Using Mach–Zehnder Interferometer This experiment, which breaks the law of causality and determinism, has been studied to detect bombs without detonating them. Figure 2 shows a Mach–Zehnder interferometer, one of its optical paths contains a bomb that could explode when a photon touches it. BS1 and BS2 are two 50:50 beam splitters. When there are no obstacles on the two paths, the interference effect between the two paths can occur by adjusting the phase position of BS2. Because of the constructive interference in the horizontal direction, all the incident light is transmitted to detector X. Ideally, due to the destructive interference in the vertical direction, detector Y cannot detect any photons. When any obstacle (such as a bomb) appears on a certain optical path, the interference effect of photons will be destroyed, which makes detector Y detect photons with a certain probability. There are three possible situations when a photon enters the interferometer from the incident point. (a) None of detector X or detector Y detects photons. (b) Detector X detects a photon. (c) Detector Y detects a photon. If it is the first case, it means that the bomb is a good bomb, and the bomb is triggered and exploded by the photon. The probability is 50%. If it is the second case, there are two possibilities. One, the photon comes from the path A, without the light path of the bomb. Two, the photon comes from the path B, and the bomb is a dud. The probability is 25%. If it is the third case that detector Y detects photon, we can get two conclusions: 1. The photon did not trigger the bomb; 2. there must be a bomb in the path. In conclusion, if it is a dud, the photon will pass through two paths at the same time, the interference effect will occur, and the photon will be detected at detector X. If it is a good bomb, the wave function collapses and the photon can only choose one path to pass through. If the photon passes through the path B, the good bomb will be triggered and exploded. If the photon passes through path A, the bomb will not be exploded, and however, because the photon only passes through the path A above, there will be no interference effect before the end of the half silver-plated mirror. semi-lens BS1 incident photon

Faraday mirror M1 Path A

Path B Faraday mirror M2

DetectorX semi-lens BS2 DetectorY

Fig. 2 Bomb detection using the idea of delayed-choice experiment

A Counterfactual Quantum Key Distribution Based on the Idea …

781

Because if there is no bomb, interference will not be destroyed, and the photon will appear in detector X. Photons were detected at detector X or at y. It is impossible for detector X and Y to detect photons simultaneously. Therefore, it can be considered that if the photon is detected at detector Y, there must be a good bomb. In this way, 25% of the good bombs can be identified without explosions. With the Hosten [4–6] method, the efficiency can be increased to nearly 100%.

4 Quantum Key Distribution Protocol Based on Wheeler’s Delayed-Choice Experiment Idea Since the first quantum key distribution protocol appeared in 1984, quantum cryptography and quantum communication have formed a relatively mature theoretical system. In the past 30 years, various new quantum cryptography theories and implementation schemes have been published. Quantum key distribution (QKD), represented by BB84 protocol, enables both parties to share keys and to cooperate with the “one-time pad” cryptosystem to achieve unconditional secure communication. Unlike traditional cryptosystems, the security of quantum cryptosystems depends on physical principles rather than mathematics. However, because the ideal singlephoton source does not exist and the measuring instrument is imperfect, the absolute security of quantum key distribution cannot be guaranteed in reality. For this reason, in recent years, many strategies to improve security have been proposed, such as instrumentation-independent schemes [7] and decoy-state methods [8]. In 2009, Noh designed a counterfactual quantum key distribution protocol [9] using Elitzur and Vaidman’s original non-interaction measurement interferometer based on the idea of Wheeler’s delayed-choice experiment. The most significant difference between this protocol and former QKD is that the photon carrying key information is not actually sent to the receiver, but the possibility of sending this photon enables the two sides of the communication to share a bit key. The counterfactual quantum key distribution protocol based on Wheeler’s delayed-choice experiment can enable remote communication parties to safely share key information based on polarization coding by blocking rather than transmitting photons. This ensures that the potential eavesdropper cannot get the photon with the key information and thus ensures the security of the protocol [10]. The device is as follows (Fig. 3). S is a single-photon source. C is the optical circulator, which outputs the incoming light from one port to the next port clockwise. BS acts as a beam splitter. The incident light is reflected by the probability of R and transmitted by the probability of T. PBS is a polarization beam splitter, which makes specific polarized light pass through, blocking others. FM is a Faraday mirror and a total reflector. SW is high-speed optical switch. D1, D2, and D3 are single-photon detectors.

782

N. Xiang

Fig. 3 Counterfactual key distribution device

The steps of the protocol are as follows: 1. Single-photon source S emits a single photon. Alice determines whether a single photon emitted is a horizontally polarized state (bit 0) or a vertically polarized state (bit 1) randomly. After the photon passes through BS, the initial state of the quantum system will be one of the following two orthogonal states: √

√ T |0a |H b + i R|H a |0b √ √ |1  = T |0a |V b + i R|V a |0b

|0  =

2. Bob also selects one of the two polarization states to represent his bit value randomly. If the polarized state of the photon is the same as the polarization state selected by Bob (embody from PBS), then he blocks the path B (switch off SW). If it is different, he switches on the SW and makes the photon incident to FM2. If the bit values chosen by Alice and Bob are different, then the single photon must enter D2 due to the constructive interference. If Alice and Bob choose the same bit value, the interference effect is destroyed. There are three possibilities. 1. The single photon passes through the path B and is detected at D3 with probability T. 2. The single photon passes through the path A and is detected at D2 with probability R2 . 3. The single photon passes through the path A and is detected at D1 with probability RT. In conclusion, if Alice and Bob choose different bit values, the key establishment fails. The evidence of the failure is that D2 detects photons with probability 1. If Alice and Bob choose the same bit value, the interference effect is destroyed, and there are three possible results. When D2 detects photons, it is impossible to determine whether photons come from path A or from path B. D3 detects photons means that

A Counterfactual Quantum Key Distribution Based on the Idea …

783

the photon passes through the B path. D1 detects photons means that the interference effect does not occur, and the photon comes from path A. Since only the photons detected by D1 can share a bit key between the two sides, in the ideal case, the photons used to carry the key information do not enter the optical path B, thus do not pass through the channels of both sides of the communication. Otherwise, the photons which actually passing through the path B, that is, the communication channel between both sides, will not be used to establish the shared key.

5 Conclusion The counterintuitive characteristics of counterfactual quantum key distribution have attracted the attention of many researchers. Starting from the principle and thought of Wheeler’s delayed-choice experiment, this paper analyzes the bomb detection method based on this idea and introduces a counterfactual quantum key distribution protocol based on the same idea. The protocol has a wide application environment, low implementation complexity, less resource consumption, and good security.

References 1. Wootters, W.K., Zurek, W.H.: A single quantum cannot be cloned. Nature 299(5886), 802–803 (1982) 2. Einstein, A., Podolsky, B., Rosen, N.: Can quantum-mechanical description of physical reality be considered complete? Phys. Rev. 47(10), 777–780 (1935) 3. Bennett, C.H., Brassard, G.: Quantum cryptography: public key distribution and coin tossing. In: Proceedings of IEEE International Conference on Computers, System and Signal Processing, pp. 175–179. IEEE, New York (1984) 4. Kwiat, P., Weinfurter, H., Herzog, T., Zeilinger, A., Kasevich, M.A.: Interaction-free measurement. Phys. Rev. Lett. 74(24), 4763–4766 (1995) 5. Kwiat, P.G., White, A., Mitchell, J., Nairz, O., Weihs, G., et al.: High-efficiency quantum interrogation measurements via the quantum Zeno effect. Phys. Rev. Lett. 83(23), 4725–4728 (1999) 6. Hosten, O., Rakher, M.T., Barreiro, J.T., Peters, N.A., Kwiat, P.G.: Counterfactual quantum computation through quantum interrogation. Nature 439(7079), 949–952 (2006) 7. Lo, H.K., Curty, M., Qi, B.: Measurement-device-independent quantum key distribution. Phys. Rev. Lett. 108(13), 130503 (2012) 8. Lo, H.K., Ma, X., Chen, K.: Decoy state quantum key distribution. Phys. Rev. Lett. 94(23), 230504 (2005) 9. Noh, T.G.: Counterfactual quantum cryptography. Phys. Rev. Lett. 103(23), 0230501 (2009) 10. Yin, Z.Q., Li, H.W., Chen, W., Han, Z.F., Guo, G.C.: Security of counterfactual quantum cryptography. Phys. Rev. A 82(4), 042335 (2010)

A Non-intrusive Appliances Load Monitoring Method Based on Hourly Smart Meter Data Chunhe Song, Zhongfeng Wang, Shuji Liu, Libo Xu, Dapeng Zhou, and Peng Zeng

Abstract Peak load management is very important for the electric power system. This paper analyzes the impact of residential swimming pool pumps (RSPPs) on the peak load. First, this paper analyzes the challenges of non-intrusive energy consumption estimation for SPPs. Second, a novel reference-based change-point (RCP) model is proposed for non-intrusive SPPs energy consumption estimation. The advantages of the proposed RCP model are that it does not require high sampling rate data or prior information of the appliance. We show that during pool season, under the assumption that the ratio of base loads (defined as the power consumption which is independent of the outdoor temperature) of houses with and with PPs remains the same during no-pool season and pool season, 6.3% of the total energy is consumed by PPs, while under the assumption that for houses with and without PPs, the ratio of base loads is equal to the ratio of the temperature-dependent power consumption during pool season, 9.08% of the total energy is consumed by PPs. Furthermore, we show that by shifting PPs activity period, under the first assumption, at least 1.27% of peak demand can be reduced, while under the second assumption, at least 4.53% of peak demand can be reduced. Keywords Smart grid · Non-intrusive appliances load monitoring · Peak load

C. Song (B) · Z. Wang · P. Zeng Key Laboratory of Networked Control Systems, Shenyang Institute of Automation, Chinese Academy of Sciences, 110016 Shenyang, China e-mail: [email protected] Institutes for Robotics and Intelligent Manufacturing, Chinese Academy of Sciences, 110016 Shenyang, China S. Liu · L. Xu · D. Zhou State Grid Liaoning Electric Power Co., Ltd., 110000 Shenyang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_77

785

786

C. Song et al.

1 Introduction The load on an electric power system is time-variant, and to avoid issues such as brownouts, electricity producers have to provide power in response to immediate demand on the demand side. The maximum possible load is referred as peak load. A high peak load does not only increase the infrastructure cost and the power generation cost, but also increase carbon emission and the maintenance cost of transmission lines and equipment; therefore, peak load reduction is a very important issue. Peak load reduction can be achieved both on the supply side and the demand side. On the supply side, to reduce peak load, methods such as direct load control, emergency demand response, and real-time pricing are usually used. While on the demand side, to reduce peak load, methods such as renewable energy and electric energy storage have been widely studied. A major difficulty of peak load reduction is that, consumers may be unwilling to participate in some of these programs. For example, direct load control allows the power supplier to directly control the status of appliances, and customers will receive various payments as rewards. Direct load control is an effective method for peak load reduction; however, for example, in the Texas reliability entity region in the USA, only 0.11% of customers enrolled in direct load control [1–4]. The main reason may be that, from consumers’ psychology perspective, direct load control may disrupt their lifestyle and comfort. Meanwhile, for peak load reduction on the demand side, extra investment is an obstacle for renewable energy and electric energy storage. This paper estimates the energy consumption of residential swimming pool pumps (RSPPs) using hourly meter readings and quantifies how much the peak load can be reduced by shifting load of RSPPs, rather than turn them off. The reasons of studying the impact of RSPPs on peak load are that, first, residential swimming pools have been widely installed in central-Canadian middle-class homes, and residential swimming pools are the second largest electrical load of residents, right after air conditioners (ACs). Second, RSPPs are used for pool water circulation and purification and compared with direct load control or electric energy storage, controlling the activity periods of RSPPs would not reduce user comfort. Furthermore, it does not require any extra investment. Therefore, reducing peak load by controlling the activity periods of RSPPs is practical.

2 Related Works There are a few works of energy consumption analysis on pool pumps. In [5], Fischer compares energy consumption of typical pool homes and typical non-pool homes using energy consumption data from 2 million homes in a climate moderate part of the Western USA. A typical pool home appears to consume 49% more electricity over the year. The difference is higher in summer (about 50%) as compared to the other seasons (winter: 33%, spring: 42%, fall: 40%). Fischer explains that the difference

A Non-intrusive Appliances Load Monitoring Method …

787

is due to three key factors: The pool pump is responsible for a little over half, pool homes are bigger, and finally pool owners have a higher income and thus a different lifestyle. Average pool pumps electricity consumption has been estimated at 2000– 2500 kWh per home per year. In [6], Danny shows the impact of major appliances such as space heating, space cooling, pool pump, etc. on the total average annual electrical loads for 204 residences in Central Florida. Total average annual electrical load in that sample is equal to 17,130 kWh. It turns out that pool pump represents 7% of it, while AC represents 33%. A typical pool pump consumes 4200 kWh per year. During the 1 h peak period from 4 to 5 pm in average days of July, a typical pool pump consumed 0.94 kWh in average. During the same period, the average total load per home was about 3.8 kWh. Since 24% homes of the sample possess a pool, pool pumps were liable for 5.94% of the total power consumed during that peak time in that neighborhood. However, the pool season in Florida is the whole year while the pool season lasts only about three months in Ontario.

3 Problem Description In Ontario Canada, residential swimming pools are generally installed outdoor, and the swimming season is usually between May and October when the outdoor temperature is high enough. During the use of the swimming pools, the pool water inevitably contains pollutants, making it turbid and stink. Such water may cause diseases at eyes, ears, skin, and digestive organs; as a result, generally a swimming pool is equipped with a water circulation and purification system. In a typical residential swimming pool water circulation purification system, skimmers and filters are used to filter out impurities in water, the pump is used for water circulation, and the heater is used for water heating. Note that in Canada, heaters usually use gas rather than electricity. For a residential swimming pool, if the pool water is polluted seriously, the swimming pool water circulation and purification system is vulnerable to damage. Therefore, CRPSP would run for a long period every day, e.g., 10 h or even uninterrupted. Note that the energy consumption of circulating pumps of residential swimming pools is independent of the outdoor temperature. In this paper, hourly aggregated energy consumption readings of 1005 residents in a specific neighborhood in Ontario Canada have been collected, where 346 residents have swimming pools and the rest 659 residents do not have swimming pools, the location of the region of these residents is shown in Fig. 1. The period is from March 1, 2011, to October 31, 2012, the total number of days is 611, the total number of hours is 14,664, and the total number of samples is 14,737,320. Corresponding outdoor temperature data is obtained from Weather Canada (weather.gc.ca), and linear interpolation is carried out if outdoor temperature data is lost. Meanwhile, the non-swimming season  is defined from November 15, 2011, to February 29, 2012, during which all swimming pools are expected to be closed. The swimming season  is defined from July 1, 2011, to August 30, 2011, as well as from July 1, 2012, to August 30, 2012, during which all swimming pools are expected to be opened.

C. Song et al.

heating k

heating

Model 1

k2 (x c ,y c )

(x c ,y c ) temperature

temperature cooling

Model 3

k

Power

Power

cooling

(x c ,y c )

(x c ,y c )

k2

temperature

k2 (x c2,y c )

cooling

heating

Model 5 Power

Power

cooling

k1 (x c1,y c )

Model 4

k1 temperature

heating

Model 2

k1

Power

Power

788

k1 (x c1,y c1)

temperature

Model 6

k2 (x c2,y c2)

temperature

Fig. 1 Change-point models

Using the dataset, this paper is to quantify the impact of RSPPs on the peak load and how much the peak load can be reduced by shifting rather than reducing PPs activity period.

4 Definitions and Problem Formulation Energy consumption estimation of RSPPs can be considered as a non-intrusive appliance load monitoring (NIALM) issue. Meanwhile, it also can be considered as a building energy disaggregation issue. This section will analyze the challenges of non-intrusive energy consumption estimation for SPPs based on the aforementioned two types of methods. We use a sub-dataset of hourly readings from 1005 single homes with labels indicating whether they have PPs or not, from March 1, 2011, to October 15, 2012. The power consumption of house i at hour h of day d is denoted by Pi,(d,h) , where i = 1, . . . , 1005, d = 1, . . . , 595, h = 1, . . . , 24. These houses are partitioned in two subsets, K and J where K contains the houses with pools and J the other ones. The hourly power consumption of houses with and without PPs are denoted p n , respectively, where j = 1, . . . , 346 and k = 1, . . . , 649. by Pk,(d,h) and P j,(d,h) n p p n Furthermore, P(d,h) , P(d,h) and P(d,h) , and P (d,h) , P (d,h) and P (d,h) are the total (i.e.,

A Non-intrusive Appliances Load Monitoring Method …

789

aggregate) and average hourly power consumptions of all houses, houses without and with PPs, respectively. We now define: No-pool season 0 and pool season 1 : Suppose the whole period from March 1, 2011, to October 15, 2012 is denoted by . In Ontario, generally people use their pools from May to September. However, since it is difficult to know exactly when pools are being opened and closed, we define the no-pool season as a set of months for which there is no ambiguity, i.e., we define 0 to be from November 15, 2011, to February 29, 2012. Similarly, we define the pool season as a set of months, in which we expect all pools to be open, i.e., we define two periods as 1 , one is from July 1, 2011, to August 30, 2011 and the other is July 1, 2012, to August 30, 2012. Note that in other locations, the definitions of 0 and 1 would be probably different. PPs inactivity period T 0 and activity period T 1 : During pool season 1 , PPs are not always active, and the PP total inactivity period and activity period of house k ∈ K are denoted by Tk0 and Tk1 : Tk0 ∪ Tk1 = 1 Tk1 depends on how the homeowner has tuned up its PP rather than on the outdoor temperature, and hence, we assume that for  house  k ∈ K , the PP daily usage pattern during 1 is fixed and denoted by Uk = u k,h , where: p

Pk, d∈1 ,h ( p) = k × u k,h ( )

(1)

where the LHS is the PP power consumption of house k in hour h of day d ∈ 1 , u k,h is a binary variable, and u k,h = 1 means that, for each day during 1 , the PP is active at hour h, otherwise thePP is inactive   during this period. Therefore T 0 = h : u k,h = 0 d∈1 and T 1 = h : u k,h = 1 d∈1 . k is a constant which is the PP hourly consumption during T 1 . Base load: Generally for homes, base load refers to the power consumption for the basic daily tasks and is supposed to be continuous 24 h a day [7]. In this paper, we define base load to be the power consumption which is independent of the outdoor temperature. We assume that PP power consumption is independent of temperature p n and Pk,(d,h) can be expressed as: during the pool season, therefore, P j,(d,h) n n n P j,(d,h) = P j,(d,h) (b) + P j,(d,h) (t), ∀ j ∈ J p

p

p

Pk,(d,h) = Pk,(d,h) (B) + Pk,(d,h) (t), ∀k ∈ K

(2) (3)

where  p Pk,(d,h) (B)

=

p

p

Pk,(d,h) (b) + Pk,(d,h) ( p), (d, h) ∈ Tk1 p Pk,(d,h) (b), (d, h) ∈ Tk0 ∪ 0

(4)

790

C. Song et al.

where b and t in the brackets indicate base load (e.g., the power consumption for lighting and cooking) and the temperature-dependent consumption (e.g., the power consumption for ACs). We call the LHS in Eq. 4 the generalized base load, and p p p p during Tk1 , Pk,(d,h) (B) includes Pk,(d,h) (b) and Pk,(d,h) ( p), while Pk,(d,h) (B) is equal p to Pk,(d,h) (b) during Tk0 ∪ 0 . Peak hour H and Peak day D: H is the hour with the largest total power consumption, and D is the day containing the peak hour. P(D,H ) = max P(d,h) (d,h)

where P(D,H ) is the peak load. Peak period :  = [min , max ] is the time period satisfying: ∀h ∈ [min , max ], Ph ≥ η × PH Pmin −1 < η × PH Pmax +1 < η × PH where min and max are the maximum and minimum of hour IDs in , and η ∈ (0, 1] is a positive constant, and in this paper η = 0.95. Peak demand P : the power consumption of all houses during peak period : 

P =

P(d,h)

(d,h)∈

The residential daily power consumption profiles of weekdays are different from that of weekends. From the dataset, it can be seen that peak hour occurs on July 21, 2011, which is a Thursday. Therefore in the rest of paper, we only focus on weekdays. Our first objective is to quantify the impact of PPs on the peak demand, that is, to estimate the ratio r of the PPs power consumption to peak demand: p

P ( p) = r=  P

 (d,h)∈



p

P(d,h) ( p)

(d,h)∈

P(d,h)

=

Np



p

(d,h)∈

P (d,h) ( p)

(d,h)∈

P(d,h)



(5)

where N p = |K | is the number of homes with pools. The second objective is to quantify how much peak demand can be reduced by shifting activity period of PPs, rather than reducing it.

A Non-intrusive Appliances Load Monitoring Method …

791

5 PPs Consumption Estimation Based on the Reference-Based Change-Point Model 5.1 Change-Point Models Change-point models are widely used steady-state data-driven models to disaggregate the temperature-dependent and temperature-independent power consumptions by regressing (hourly) power consumptions against outdoor dry-bulb temperatures. Six typical change-point models are shown in Fig. 1, in which model 5 and model 6 are three-phase continuous piecewise linear functions, while others are two-phase continuous piecewise linear functions. Model 1, model 3, and model 5 can be considered as special cases of model 2, model 4, and model 6 that force one phase of these models to be horizontal. In these six models, gradients less than zero indicate the heating process, while gradients greater than zero indicate the cooling process. The minimums, such as yc in model 1, model 3, and model 5, can be considered as base load.

5.2 PPs Power Consumption Estimation Figure 2 gives the power consumption versus outdoor temperature for each hour, where blur points, red points, and green points indicate 0 , 1 and −0 −1 . From Fig. 2, it can be seen that the power consumption versus outdoor temperature during 0 can be approximated using model 1 and model 2, and the power consumption versus outdoor temperature during 1 can be approximated using model 3 and model 4. In this paper, we use Eqs. 6 and 7 for model 1 and model 3: y (x) = 1

y (x) = 3

  k 1 × x − xc1 + yc1 , x < xc1 yc1 , x ≥ xc1

(6)

x < xc3 yc3 ,   3 3 3 k × x − xc + yc , x ≥ xc3

(7)

    where xc1 , yc1 , k 1 , xc3 , yc3 and k 3 are change-points and gradients of model 1 and model 3. Furthermore, in Ontario during 0 most of people use gas for heating, and the power consumption during 0 can be considered as the based load; therefore k 1 can be considered to be 0, and Eq. 10 is rewritten as: y = yc1

(8)

Load(kWh)

Load(kWh)

Load(kWh)

0 -20

5

0 -20

5

0 -20

5

0 -20

o

20

20

20

Temperature(oC)

0

Hour:19

Temperature(oC)

0

Hour:13

0 20 Temperature(oC)

Hour:7

Temperature( C)

0

Hour:1

40

40

40

40

0 -20

5

0 -20

5

0 -20

5

0 -20

5

20

20

Temperature(oC)

0

Hour:20

Temperature(oC)

0

Hour:14

0 20 Temperature(oC)

Hour:8

o

20

Temperature( C)

0

Hour:2

40

40

40

40

0 -20

5

0 -20

5

0 -20

5

0 -20

5

20

20

40

40

40

40

Π.

Temperature(oC)

0

Hour:21

Temperature(oC)

0

Hour:15

0 20 Temperature(oC)

Hour:9

o

20

Temperature( C)

0

Hour:3

Fig. 2 Power consumption versus outdoor temperature of each hour during 

Load(kWh)

Load(kWh)

Load(kWh)

Load(kWh)

Load(kWh)

Load(kWh) Load(kWh) Load(kWh) Load(kWh)

Load(kWh) Load(kWh) Load(kWh) Load(kWh) 0 -20

5

0 -20

5

0 -20

5

0 -20

5

20

20

20 Temperature(oC)

0

Hour:22

Temperature(oC)

0

Hour:16

Temperature(oC)

0

Hour:10

o

20

Temperature( C)

0

Hour:4

40

40

40

40

Load(kWh) Load(kWh) Load(kWh) Load(kWh)

0 -20

5

0 -20

5

0 -20

5

0 -20

5

20

20

20 Temperature(oC)

0

Hour:23

Temperature(oC)

0

Hour:17

Temperature(oC)

0

Hour:11

o

20

Temperature( C)

0

Hour:5

40

40

40

40

Load(kWh) Load(kWh) Load(kWh) Load(kWh)

5

0 -20

5

0 -20

5

0 -20

5

0 -20

5

20

20

20

20 Temperature(oC)

0

Hour:24

Temperature(oC)

0

Hour:18

Temperature(oC)

0

Hour:12

Temperature(oC)

0

Hour:6

40

40

40

40

792 C. Song et al.

A Non-intrusive Appliances Load Monitoring Method …

793

Then based on Eqs. 7 and 8, the average PP hourly consumption at hour h in each day can be estimated by: p

c h P (d,n)∈1 ( p) = yc,h − yc,h

(9)

It is worth noting that in Eq. 7 for model 3, one of the two phases is forced to be horizontal, which is considered to be base load. However, the horizontal phase may be very short, or there may be actually even no such horizontal phase. In these situations, the estimation based on Eq. 7 should be unreliable or even meaningless. To deal with this issue, we use model 4 to approximate the power consumption versus outdoor temperature during 1 using Eq. 10: y = 4

  k14 × x − xc4  + yc4 , x < xc4 k24 × x − xc4 + yc4 , x ≥ xc4

(10)

Then we quantify the reliability of the estimation of change-points based on the center skewness defined as Eq. 11, as well as the ratio of difference of estimations defined as Eq. 12:

 1 1    



x , y , x , y1 x c c min min       

rs =  1 1  

+ x 1, y1 , x , y1 x

x , y , x , y1 x max max c c c c min min 3 y − y4 c c rd = ymax − ymin

(11) (12)

 1 1     



x , y , x , y1 x

is the Euclidean distance between x 1 , y 1 where c c c c min min   and xmin , y 1 xmin . For a two-phase continuous piecewise function, a reliable estimation of the change-point should make rs close to 0.5 and rd close to 0. In Eq. 8, yc1 can be obtained using linear least-squares regression, however, Eqs. 7 and 10 are continuous piecewise linear functions, generally it is needed to predefine the temperature (xc3 and xc4 ) of the change-points, carry out linear regression in each phase, and then connect the two linear regression function by searching a location in a local grid. In this paper, we use the real genetic algorithm (GA) [8] to find the optimized parameters. In GA, the number of genes is 100, the max generation is 1000, and we use the minimum variance error as the fitness. As GA is a random algorithm, we implement it 50 times and adapt the result with the minimum fitness. Results are shown in Fig. 3, where Fig. 3a, b are estimated x and y for each hour, and Fig. 3c, d are rs and rd for each hour. From Fig. 3d, it can be seen that 21 of 24 rd are less than 0.1, which indicates that most of estimated yc based model 3 and model 4 are close to each other. However, if suppose 0.2 as the threshold of the center skewness rs , which means that a rs less than 0.2 indicates a unreliable estimation, from Fig. 3c it can be seen that 10 of 24 rs of model 3 are less than the threshold, which indicates that the estimations at these hours would be unreliable. As a comparison, only 3 of 24 rs of model 4 are less

794

C. Song et al.

(b)

5

Model 3 Model 4 Min Temperature Max Temperature

Model 3 Model 4 Min Power Max Power

4 c

40 35 30 25 20 15 10 5

3

y

x

c

(a)

2 1 2

4

6

8

0

10 12 14 16 18 20 22 24

2

4

6

8

(c)

(d)

1 Model 3 Model 4

0.8

1 0.8 0.6

r

d

0.6

r

s

10 12 14 16 18 20 22 24

Hour

Hour

0.4

0.4

0.2

0.2

0

2

4

8

6

0

10 12 14 16 18 20 22 24

2

4

6

8

10 12 14 16 18 20 22 24

Hour

Hour

Fig. 3 Estimated change-points of each hours of model 3 and model 4 during 1

than 0.2, which indicate the estimations based on model 4 are more robust than those based on model 3. However, model 4 cannot be used to identify base load. Therefore, change-point models cannot obtain reliable estimations of base load during 1 .

5.3 The Reference-Based Change-Point Model As base load is independent on the outdoor temperature, we can make the assumption p n A3 that P (d,h) (b)/P (d,h) (b) of each hour remains the same during 0 and 1 . A3: p

p

P (d,h)∈1 (b) n

P (d,h)∈0 (b)

=

P (d,h)∈1 (b) n

P (d,h)∈0 (b)

= ch

(13)

Then according to Eq. 7, p

p

p

p

P (d,h)∈1 = P (d,h)∈1 (b) + P (d,h)∈1 ( p) + P (d,h)∈1 (t) n

p

p

= cd × P (d,h)∈1 (b) + P (d,h)∈1 ( p) + P (d,h)∈1 (t) n

n p p = cd × P (d,h)∈1 − P (d,h)∈1 (t) + P (d,h)∈1 ( p) + P (d,h)∈1 (t)

p n n p = cd × P (d,h)∈1 + P (d,h)∈1 (t) − cn × P (d,h)∈1 (t) + P (d,h)∈1 ( p) (14)

A Non-intrusive Appliances Load Monitoring Method …

795

p

Rewrite Eq. 14, we can obtain P(d,h)∈1 ( p) by: p

p p n n P (d,h)∈1 ( p) = P (d,h)∈1 − ch × P (d,h)∈1 + P (d,h)∈1 (t) − ch × P (d,h)∈1 (t) (15) p

n

In Eq. 15, the only difference between P (d,h)∈1 (t) and P (d,h)∈1 (t) is whether houses have PPs or not, therefore similar to Eq. 14, we assume p n P (d,h)∈1 (t)/P (d,h)∈1 (t) = ch1 , where ch1 is a constant, then Eq. 13 can be rewritten as:  p  p p n P (d,h)∈1 ( p) = P (d,h)∈1 − ch × P (d,h)∈1 + 1 − ch /ch1 P (d,h)∈1 (t)       weighted difference p

(16)

temperature-dependent p

From Eq. 16, to estimate P (d,h)∈1 ( p), we need to estimate P (d,h)∈1 (t) and ch1 . However, rewrite Eq. 16:  p  p n p P (d,h)∈1 − ch × P (d,h)∈1 = P (d,h)∈1 ( p) + ch /ch1 − 1 P (d,h)∈1 (t)       weighted difference

(17)

temperature-dependent p

p

which means that, to estimate P (d,h)∈1 ( p), we only need to base load of P (d,h)∈1 − n p ch × P (d,h)∈1 , rather than directly estimate P (d,h)∈1 (t) and ch1 . Figure 4 gives the weighted difference load (WDL) versus the outdoor temperature based on ch of each hour during 1 , from which it can be seen that, unlike in Fig. 2 the power consumption of houses with PPs versus the outdoor temperature which is multi-phase, the distribution of the weighted difference load versus the outdoor temperature is uniform and mainly in a horizontal area. We carry out linear least-squares regression based on Eq. 18, and the estimated K and D. y =k×x +d

(18)

18 of 24 absolute values of the estimated Ks are less than 0.01, all absolute value of the estimated Ks are less than 0.02, and therefore, the distribution can be approximated using a horizontal line: y = d1

(19)

We still use linear least-squares regression which can be considered as p p n P (d,h)∈1 ( p) under the assumption that P (d,h) (b)/P (d,h) (b) of each hour remains the same during 0 and 1 . If we abandon the assumption that for each hour p n P (d,h) (b)/P (d,h) (b) remains the same during 0 and 1 , and adopt the assumption A4 that:

WDL(kWh)

WDL(kWh)

WDL(kWh)

0

1

2

0

1

2

0

1

2

0

1

0

0

0

0

o

o

Temperature( C)

20

Hour:19

20 Temperature(oC)

Hour:13

Temperature( C)

20

Hour:7

Temperature(oC)

20

Hour:1

40

40

40

40

0

1

2

0

1

2

0

1

2

0

1

2

0

0

0

0

o

o

Temperature( C)

20

Hour:20

20 Temperature(oC)

Hour:14

Temperature( C)

20

Hour:8

Temperature(oC)

20

Hour:2

40

40

40

40

0

1

2

0

1

2

0

1

2

0

1

2

0

0

0

0

o

o

Temperature( C)

20

Hour:21

20 Temperature(oC)

Hour:15

Temperature( C)

20

Hour:9

Temperature(oC)

20

Hour:3

40

40

40

40

Fig. 4 Results of RCP model versus outdoor temperature for each hour during 1

WDL(kWh)

WDL(kWh)

WDL(kWh)

WDL(kWh)

WDL(kWh)

WDL(kWh) WDL(kWh) WDL(kWh) WDL(kWh)

WDL(kWh) WDL(kWh) WDL(kWh) WDL(kWh) 0

1

2

0

1

2

0

1

2

0

1

2

0

0

0

0

o

o

Temperature( C)

20

Hour:22

20 Temperature(oC)

Hour:16

Temperature( C)

20

Hour:10

Temperature(oC)

20

Hour:4

40

40

40

40

WDL(kWh) WDL(kWh) WDL(kWh) WDL(kWh)

0

1

2

0

1

2

0

1

2

0

1

2

0

0

0

0

o

o

Temperature( C)

20

Hour:23

20 Temperature(oC)

Hour:17

Temperature( C)

20

Hour:11

Temperature(oC)

20

Hour:5

40

40

40

40

WDL(kWh) WDL(kWh) WDL(kWh) WDL(kWh)

2

0

1

2

0

1

2

0

1

2

0

1

2

0

0

0

0

Temperature(oC)

20

Hour:24

20 Temperature(oC)

Hour:18

Temperature(oC)

20

Hour:12

Temperature(oC)

20

Hour:6

40

40

40

40

796 C. Song et al.

A Non-intrusive Appliances Load Monitoring Method …

797

A4: p

P (d,h)∈1 (b) n

P (d,h)∈0 (b) p

n

p

=

P (d,h)∈1 (t) n

P (d,h)∈0 (t)

p

(20)

n

where P (d,h) (b)/P (d,h) (b) = ch , and P (d,h) (t)/P (d,h) (t) = ch1 . A4 means that during 1 , the ratio of base load is equal to the ratio of the temperature-dependent power consumption of houses with PPs to houses without a PP, then we can obtain the estimations of ch only based on data during 1 , rather p n than use the value ch = P (d,h)∈0 (b)/P (d,h)∈0 (b). Suppose the estimation of ch under A4 is denoted by ch∗ , to estimate ch∗ , we take ch as the initial value, and use interior-point algorithm [9] search optimized cˆh in the range of [ch − 1, ch + 1] which p n makes K = 0 in Eq. 17 on P (d,h)∈1 − cˆh × P (d,h)∈1 versus the outdoor temperature.

6 The Impact of PPs on Peak Demand Based on the sub-dataset using in this paper, it is found that peak hour is at 19:00, July 21, 2011. Based on the definition in Sect. 3, peak period is from 17:00 to 21:00, totally 5 h. Then according to Eq. 5, the ratio of the PPs power consumption to the peak demand can be calculated as:  346 ∗ 21 h=17 Ph ( p) × 100% = 6.3% 21 D,h=17 Ph  ∗ 346 ∗ 21 h=17 Ph ( p) × 100% = 9.08% r∗ = 21 D,h=17 Ph

r=

where r is the estimation based on the assumption that the ratio of base load of houses with and without PPs remains the same during no-pool season and pool season, while r ∗ is the estimation based on the assumption that for houses with and without PPs, the ratio of base load is equal to the ratio of the temperature-dependent power consumption during pool season. Furthermore, peak demand can be reduced by shifting the 5 minimums of average PPs hourly power consumption into the peak period. However, these hours may be discontinuous and owners of PPs may do not want to turn on and off PPs too much times. Therefore, we only obtain a 5-h period with the minimum total power consumption: min = arg min

h=h 0 +4 

h 0 ∈[1,20] h=h 0

Ph ( p)

798

C. Song et al.

∗ min

h=h ∗0 +4

= arg min



h ∗0 ∈[1,20] h=h ∗ 0

Ph∗ ( p)

And we can obtain that h 0 = 5 and h ∗0 = 7. Then, we can obtain the impact of PPs on peak demand after shifting activity period: rmin ∗ rmin

 346 ∗ h∈min Ph ( p) = × 100% = 5.03% 21 D,h=17 Ph  346 ∗ h∈min Ph∗ ( p) ∗ = × 100% = 4.55% 21 D,h=17 Ph

And the corresponding reductions can be expressed as: r = r − rmin = 6.3% − 5.03% = 1.27% ∗ r ∗ = r − rmin = 9.08% − 4.55% = 4.53%

As the above result only consider shifting activity period of PPs aggregately, and ∗ also can be shifted, therefore some individual activity period during min and min ∗ r and r can be considered as the minimum reductions of peak demand under different assumptions.

7 Conclusion In this paper, the objective is to quantify the impact of PPs on peak demand and how much peak demand can be reduced by shifting rather than reducing PPs activity period. We first show that the straightforward change-point models are not suitable for estimating the hourly average PPs power consumption, and then we propose a weighted difference change-point model. We show that during pool season, under the assumption that the ratio of base load of houses with and with PPs remains the same during no-pool season and pool season, 6.3% of the total energy is consumed by PPs, while under the assumption that for houses with and without PPs, the ratio of base load is equal to the ratio of the temperature-dependent power consumption during pool season, 9.08% of the total energy is consumed by PPs. Furthermore, we show that by shifting PPs activity period, under the first assumption, at least 1.27% of peak demand can be reduced, while under the second assumption, at least 4.53% of peak demand can be reduced. Acknowledgements This work was supported by the State Grid Corporation Science and Technology Project (Contract No.: SGLNXT00YJJS1800110).

A Non-intrusive Appliances Load Monitoring Method …

799

References 1. Balijepalli, M., Pradhan, K.: Review of demand response under smart grid paradigm. In: IEEE PES Innovative Smart Grid Technologies (2011) 2. Chiu, W.Y., Sun, H.J., Poor, H.V.: Energy imbalance management using a robust pricing scheme. IEEE Trans. Smart Grid 4(2), 896–904 (2013) 3. Birt, B.J., Newsham, G.R., Beausoleil-Morrison, I.: Disaggregating categories of electrical energy end-use from whole-house hourly data. Energy Build. 50, 93–102 (2012) 4. ASHRAE Handbook: Fundamentals (2005) 5. Zhang, J., Chung, H., Lo, W.L.: Clustering-based adaptive crossover and mutation probabilities for genetic algorithms. IEEE Trans. Evol. Comput. 11(3), 326–335 (2007) 6. Ahmed, Z., et al.: Non-intrusive load monitoring approaches for disaggregated energy sensing: a survey. Sensors 12, 16838–16866 (2012) 7. Parker, S.D.: Research highlights from a large scale residential monitoring study in a hot climate. Energy Build. 35(9), 863–876 (2003) 8. Fischer, B.: Homes with pools use 49% more electricity per year, but it’s not just because of the pool. http://blog.opower.com/2012/07/homes-with-pools-use-49-more-electricity-but-itsnot-just-because-of-the-pool/ 9. Frédéric, B.J., Charles, J.G., Claude, L., et al.: Numerical Optimization: Theoretical and Practical Aspects, Universitext. Springer, Berlin (2006)

Design and Implementation of VxWorks System Vulnerability Mining Framework Based on Dynamic Symbol Execution Wei Zheng, Yu Zhou, and Boheng Wang

Abstract In recent years, with the popularity of VxWorks systems in various fields, VxWorks systems have been used in the underlying operating systems of industrial infrastructure in many countries. Therefore, in order to ensure the rights of the country and the people, the security requirements of the system are also increasing. This article introduces the technical details of the VxWorks system vulnerability mining framework based on dynamic symbolic execution, the overall framework flow, and the experimental results of the framework. The entire framework is mainly composed of the WDB RPC-based Trace module, the dynamic symbol execution module, and the fuzzing test module. During the testing phase, the framework successfully exploited the CVE-2015-7599 vulnerability and proved the effectiveness of the vulnerability mining framework designed in this paper. Keywords VxWorks system · Dynamic symbol execution · WDB RPC protocol

1 Introduction As an excellent real-time operating system, the VxWorks system has been in an upward trend worldwide in recent years. As of 2016, in the global statistics of the VxWorks 6.X system WDB RPC given by Chuangyu Company [1], 2155 devices exposed on the public network were scanned through the ZoomEye Engine [2]. Distributed to India: 667, Uganda: 266, United States: 228, Brazil: 156, Bhutan: 128, Canada: 73, Namibia: 60, Rwanda: 60, South Africa: 59, South Korea: 57 W. Zheng Information Technology Services, East China Normal University, North Zhong Shan Road 3663, Shanghai, China Y. Zhou (B) Ant-Financial Light-Year Security Lab, Hangzhou, China e-mail: [email protected] B. Wang School of Computer and Software, Nanjing University of Information Science & Technology, 210044 Nanjing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_78

801

802

W. Zheng et al.

(Note that the number of devices in China is 7). According to the global statistics of the WDB RPC of the VxWorks 5.X system given by Kimon [3], the wdbrpc-scan script is invoked via ZMap [4] to get the following result; the specific figures are China: 7861; USA: 5283; Brazil: 3056; Italy: 1025; Japan: 823; Russia: 647; Mexico: 505; Kazakhstan: 486; Australia: 481; India: 448. However, at the same time that VxWorks systems are widely used around the world, many manufacturers lack the security awareness and directly expose their VxWorks system to the Internet, which increases the possibility of direct attack on their system. In contrast, the VxWorks system has only exposed a few vulnerabilities in recent years, and Windows systems or Linux systems will burst into hundreds of security holes in one year. The reason for this is not because the security of the VxWorks system itself is higher than that of other systems, but because the barriers to the current research on the security of the VxWorks system are high and the environment is difficult to set up. The disclosed system vulnerability is shown in Table 1 [5]. Since August 2010 HD Moore has discovered serious vulnerabilities in multiple VxWorks systems [6]; issues concerning the security of VxWorks systems have begun to attract widespread attention. In February 2011, Aditya K. Sood introduced Table 1 Exposed vulnerabilities of VxWorks system in recent five years Name

Description

CVE-2015-7599

Integer overflow in the _authenticate function in svc_auth.c in Wind River VxWorks 5.5 through 6.9.4.1, when the RPC protocol is enabled, allows remote attackers to cause a denial of service (crash) or possibly execute arbitrary code via a username and password

CVE-2015-6592

Huawei UAP2105 before V300R012C00SPC160(BootRom) does not require authentication to the serial port or the VxWorks shell

CVE-2015-3963

Wind River VxWorks before 5.5.1, 6.5.x through 6.7.x before 6.7.1.1, 6.8.x before 6.8.3, 6.9.x before 6.9.4.4, and 7.x before 7 ipnet_coreip 1.2.2.0, as used on Schneider Electric SAGE RTU devices before J2 and other devices, does not properly generate TCP ISN values, which makes it easier for remote attackers to spoof TCP sessions by predicting an ISN value

CVE-2013-0711

IPSSH (aka the SSH server) in Wind River VxWorks 6.5 through 6.9 allows remote attackers to cause a denial of service (daemon outage) via a crafted authentication request

CVE-2013-0713

IPSSH (aka the SSH server) in Wind River VxWorks 6.5 through 6.9 allows remote authenticated users to cause a denial of service (daemon outage) via a crafted packet

CVE-2013-0714

IPSSH (aka the SSH server) in Wind River VxWorks 6.5 through 6.9 allows remote attackers to execute arbitrary code or cause a denial of service (daemon hang) via a crafted public-key authentication request

CVE-2013-0715

The WebCLI component in Wind River VxWorks 5.5 through 6.9 allows remote authenticated users to cause a denial of service (CLI session crash) via a crafted command string

CVE-2013-0716

The web server in Wind River VxWorks 5.5 through 6.9 allows remote attackers to cause a denial of service (daemon crash) via a crafted URI

Design and Implementation of VxWorks System Vulnerability …

803

the architecture and security mechanism of the entire VxWorks system [7]. In 2015, Yannick Formaggio studied the SUN RPC protocol of the VxWorks system in the loophole introduced by 44CON. The SUN RPC protocol was tested by the traditional black box fuzzing method. Finally, an integer overflow vulnerability was successfully discovered [8]. In our country, in April 2009, Wan Wei developed a new set of wireless secure transmission protocols based on the VxWorks system for the respective characteristics of mobile terminals and wireless network environments [9]. In December 2009, Tian Li designed a security architecture for real-time embedded systems’ VxWorks [10]. In April 2011, Tian Zhanling and others proposed an implementation scheme based on the network file transfer security considerations of the VxWorks operating system [11]. In March 2013, Li Yansong proposed an SSH protocol mechanism for real-time embedded system VxWorks network application layer security communication [12]. In June 2014, Bi Jiabin focused on the railway signal security communication protocol based on the VxWorks system [13]. The traditional black box mutation fuzzing test used in the past has adopted the static symbol execution technology. Only a small probability will mutate a sample satisfying the conditions [14]. The dynamic symbolic execution technology adopted here guides symbolic execution using information in the real execution of the program [15]. It can generate constraint expressions of all conditional statements according to the set symbol variables or symbol memory. By solving the constraint expressions, we can get samples of other new paths, which can improve the code coverage rate of the fuzzy test, thereby improving the vulnerability probability. Here, we introduce the technical details of the VxWorks vulnerability mining framework based on dynamic symbolic execution, the overall framework flow, and the experimental results of the framework. The entire framework is mainly composed of three modules: the Trace module, dynamic symbol execution module, and fuzzy test module. The Trace module is written based on the reversed WDB RPC protocol to obtain the information needed by the dynamic symbol execution module. The dynamic symbol execution module is written based on the Triton framework and the Capstone framework and implements the functions of dynamic symbol execution and conditional constraint solving. The fuzzy test module uses a multi-dimensional window sliding bit flipping algorithm to mutate the sample. The workflow of the framework is shown in Fig. 1. In the end, through this framework, Yannick successfully used the traditional black box testing method in 2015 to find the integer overflow hole numbered CVE2015-7599, which proved the correctness of the framework.

2 Trace Module Based on WDB RPC Protocol Since the testing technology adopted in this paper belongs to mutated fuzzing technology, this method does not need to know the structure of the protocol or file type to be tested and mutates based on the normal sample.

804

W. Zheng et al.

Fig. 1 Workflow of vulnerability mining system

In the VxWorks system, the WDB RPC protocol is a debugging interface based on the SUN RPC protocol. Using this protocol, you can perform some high-privilege operations on the VxWorks system, such as monitoring system status, debugging system programs, and restarting the system. The protocol is bound to UDP Layer 17185 port. The working mechanism of the WDB RPC protocol is shown in Fig. 2. The WDB RPC protocol has two versions, V1 and V2. Here, by reading assembly code and analyzing protocol packets, the WDB RPC V2 protocol of the VxWorks 6.X system is reversed, and the system is restarted—Reboot () and detected abnormally. Get Event(), Read Memory–Read Memory(), Write Memory-Write Memory(), Get Register Value-Get Regs(), Add Breakpoint-Add Eventpoint(), Step-Step-Context(), etc. The protocol format enables the implementation of dynamic symbol execution technology on VxWorks systems. The functional requirement of this module is to provide the dynamic execution module with the required information and to monitor the abnormal events in the Trace process. After the initial and final breakpoints are set, the instruction that triggered the system exception is recorded by Trace in all assembly instructions executed between the two breakpoints and all register information during execution. The specific implementation of the Trace module is shown below. (1) Send a Request Connect packet request to connect to the VxWorks system; (2) Send Target Mode packet settings to attach to VxWorks system in system mode;

Fig. 2 Working mechanism of WDB RPC protocol

Design and Implementation of VxWorks System Vulnerability …

805

(3) (4) (5) (6) (7)

Send Stop Context packet pending VxWorks system; Send Add Eventpoint packet to set the starting and ending breakpoints; Send Continue Context packet recovery to VxWorks system; Trigger system breakpoints; Send a Step Context packet to execute an assembly instruction to get all register information; (8) Send a Get Event packet to check if the VxWorks system is in an abnormal state; (9) Repeat Steps 7 and 8 until the end breakpoint is triggered or the VxWorks system is in an abnormal state.

3 Dynamic Symbol Execution Module Dynamic symbol execution technology can generate constraint expressions of all conditional statements according to set symbol variables or symbol memory. By solving constraint expressions, samples of other new paths can be obtained. This can improve the code coverage of fuzzy tests and improve probability of the vulnerability. The dynamic symbol execution module is based on the Triton framework and the Capstone framework. The Triton framework is used for dynamic symbolic execution calculations and model solving. The Capstone framework is used to speed up assembly instruction interpretation. Triton is a Dynamic Binary Analysis (DBA) framework that provides dynamic symbol execution engines, taint tracking engines, intermediate language representations for x86 and x86-64 instruction sets, semantic optimization, and constraint solving (Fig. 3).

Fig. 3 Triton frame structure

806

W. Zheng et al.

The Triton framework internally calls the interface of Z3 [16] to solve the constraint expression. After the symbolic execution process is completed, a constraint expression can be generated according to the set symbol variable or symbol memory, and the framework will try to solve the constraint expression. If there is a solution, the solution of the corresponding symbol variable is output. The use of the Triton framework makes it easy to generate constraint expressions for all jump statements, using the assembly code as shown in Fig. 4. The memory at the address at 0x1000 is set to symbolic memory. The symbol executes the three lines of code and obtains the constraint expression for the jump statement, as shown in Fig. 5. Solving the second constraint expression yields the solution SymVar_0 = 0xEF, which allows the program to go to another branch. Capstone is a lightweight, cross-platform, multi-architecture disassembly framework supporting Arm, Arm64 (Armv8), M68K, Mips, Power PC, Sparc, System Z, TMS320C64X and other frameworks. The framework itself is written in C language and supports it. Calls from languages such as Clojure, F#, Common Lisp,

Fig. 4 Example of assembly code

Fig. 5 Constraint expression for the jump statement

Design and Implementation of VxWorks System Vulnerability …

807

Visual Basic, PHP, PowerShell, Haskell, Perl, Python, Ruby, C#, Node JS, Java, GO, C++, OCaml, Lua, Rust, and Delphi are widely used in Binary analysis and reverse engineering. The method of parsing assembler instructions from a VxWorks system project file is used when parsing assembler instructions. Compared with the method of parsing based on network protocol packets, the efficiency of the system is obviously improved. This method can obtain the value of all registers in the current state through the GetRegs function in the Trace module. The value of the PC register represents the address of the current instruction. From the above analysis, we can know that the actual read address is shown in Formula 1. Address = PC − Load Address(0x00308000) + 0x60

(1)

In the Intel x86 instruction set, the length of the instruction is not fixed, and the maximum instruction length is 15 bytes, so each time 15 bytes are read from the corresponding position in the VxWorks system project file; Use the disasm function of the Capstone framework to parse these 15 bytes. Returns the bytes field of the first Cs Insn object. This field is the machine code of the current instruction. The concrete implementation process of dynamic symbol execution is as follows. (1) Add the initial sample to the queue; (2) Trace the system according to the set start and end breakpoints. If it encounters an assembly instruction that reads memory, it tells the Triton framework the value of the memory address read. At the same time it monitors the abnormal behavior of the entire process; (3) Calculate the register information obtained by the Trace module and the parsed instruction machine code. If the current instruction causes the VxWorks system to crash, record the sample file; (4) Get all generated conditional constraint expressions and try to solve all constraint expressions; (5) Add new samples that are not duplicated to the queue and repeat Steps 2, 3, and 4 above until the queue is empty.

4 Fuzzy Test Module The main function of the fuzzing module is to mutate sample files and detect whether the VxWorks system resolves these mutation sample files. The fuzzing module includes two parts; one part is the algorithm of sample variation, and the other part is VxWorks system crash detection. This part of VxWorks’s system crash detection can be accomplished by using the Get Event function in the Trace module. Here, the algorithm of sample mutation is highlighted.

808

W. Zheng et al.

Fig. 6 Binary representation of the sample

Fig. 7 Bit flip window

In the actual fuzzy test, for the unknown protocol or unknown file format, the sample is often mutated without destroying the overall structure of the sample. Here, a multi-dimensional window sliding bit flipping algorithm is designed to mutate the sample. Bit flipping, as the name suggests, is to flip bit 0 to 1 or bit 1 to invert to 0. For a sample, its binary representation is shown in Fig. 6. When performing bit flipping on the sample, set the size of a window. Take the window size as four as an example. As shown in Fig. 7, flip the bits in the window to generate a mutation sample, and then shift the window to the right to continue the repetition. Flip operations, and so on, until all variant samples are generated. In this paper, the multi-dimensional window sliding bit flipping algorithm is used to mutate the samples. The window sizes are 1, 2, 4, 8, 16, and 32. The details of the specific multi-dimensional bit flip algorithm are as follows. When the window size is 1: for i in range(len(data)*8): data[i/8] ˆ= (0x80  (i % 8)) testcase(data) data[i/8] ˆ= (0x80  (i % 8)) When the window size is 2: for i in range((len(data)*7)): data[i/7] ˆ= (0x C0  (i % 7)) testcase(data) data[i/7] ˆ= (0x C0  (i % 7)) When the window size is 4: for i in range((len(data)*5)): data[i/5] ˆ= (0x F0  (i % 5)) testcase(data) data[i/5] ˆ= (0x F0  (i % 5)) When the window size is 8:

Design and Implementation of VxWorks System Vulnerability …

809

for i in range((len(data))): data[i] ˆ= 0x FF testcase(data) data[i] ˆ= 0x FF When the window size is 16: for i in range(1, ((len(data)))): data[i] ˆ= 0x FF testcase(data) data[i-1] ˆ= 0x FF data[len(data)-1] ˆ= 0x FF When the window size is 32: data[0] ˆ= 0x FF data[1] ˆ= 0x FF data[2] ˆ= 0x FF for i in range(3, (len(data))): data[i] ˆ= 0x FF testcase(data) data[i-3] ˆ= 0x FF data[len(data)-1] ˆ= 0x FF data[len(data)-2] ˆ= 0x FF data[len(data)-3] ˆ= 0x FF The concrete implementation process of the fuzzing test module is as follows. (1) Add all the sample files generated by the dynamic symbol execution module to the queue; (2) Using the multi-dimension window sliding bit flip algorithm to mutate sample files; (3) The VxWorks system parses the generated mutation sample file; (4) Detect whether the VxWorks system has crashed, and if so, save the crashed sample file; (5) Repeat Steps 2, 3, 4 until the queue is empty; (6) Generate a bug report.

5 Test and Results In [9], Yannick tested the VxWorks system’s RPC protocol using the traditional black box fuzzing method and dug up an integer overflow vulnerability, CVE-2015-7599, but the method needs to be understood. The format of the RPC protocol. Here, a

810

W. Zheng et al.

Fig. 8 Sample file that can crash the system

Fig. 9 VxWorks system crashes

lot of reverse analysis is used to obtain the initial power off and end breakpoints of Trace. Without understanding the format of the RPC protocol, it is possible to automate the loophole mining of the RPC protocol of the VxWorks system, and the vulnerability mining program is without human intervention. After running for ten days, we successfully found several samples that could crash the VxWorks system. A sample file that can crash the VxWorks system is shown in Fig. 8. Sending this POC sample to the VxWorks system can cause the VxWorks system to crash, as shown in Fig. 9.

References 1. KNOWNSEC: VxWorks Fuzzing: VxWorks real-time operating system vulnerability mining debugging and utilizing secrets. http://www.freebuf.com/news/93201.2016 2. KNOWNSEC: https://www.zoomeye.org/ 3. Beacon Lab: http://plcscan.org/lab/census/vxworks/ 4. Zmap: ZMap Internet Scanner. https://github.com/zmap/zmap 5. http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=VxWorks

Design and Implementation of VxWorks System Vulnerability …

811

6. Moore, H.D.: Shiny Old VxWorks Vulnerabilities (2010). https://community.rapid7.com/ community/metasploit/blog/2010/08/02/shiny-old-vxworks-vulnerabilities 7. Sood, A.K.: Digging Inside the VxWorks OS and Firmware the Holistic Security. SecNiche Security Labs (2011) 8. Yannick Formaggio, Attacking VxWorks: from Stone Age to Interstellar (2015). https://44con. com/previous-speakers/yannick-formaggio 9. Wan, W.: Research of Wireless Security Transport Protocol in VxWorks Environment. Information Engineering University (2009) 10. Tian, L.: Research and Realization on Security Mechanism of Embedded RTOS VxWorks. Nanjing University of Aeronautics and Astronautics (2009) 11. Tian, Z.L., Liu, L.Q.: The study of security of network file transmission based on VxWorks. Inf. Technol. Informatization 4, 32–35 (2011) 12. Li, Y.S.: Research and Improvement of Application Layer SSH Security Protocol Based on VxWorks. Nanjing University of Aeronautics and Astronautics (2013) 13. Bi, J.B.: Research and Implementation of the Open Security Protocol Based on VxWorks. Lanzhou Jiaotong University (2014) 14. King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7), 385–394 (1976) 15. Gedefroid, P., Levin, M.Y., Molnar, D.: Sage: Whitebox fuzzing for security testing. Queue 10(1), 20–27 (2012) 16. Z3Prover: The Z3 Theorem Prove. https://github.com/Z3Prover/z3

Communication Analysis

Deep Web Selection Based on Entity Association Song Deng, Wen Luo, and Xueke Xu

Abstract Each subject has a vast amount of deep web resources nowadays. It becomes tremendously hard to retrieve the required integrated information from all the related deep web resources for a subject, which drives out the technology on how to select the suitable web resources. In the medical field, the associations among entities are very extensive, as it can improve our overall level of health when all the related association information can be integrated and used. To improve the entities and their associations integration efficiency, we provide a data resource selection method based on the entities and their associations. The entity and association abstract matrix used in the method is built on the weighted entity scores and their association information in the entity and association diagram. Also, based on the entity and association query intention, it provides a new way to calculate the data resource association. After a large amount of tests and experiments on the data sets in the medical field, the new method is shown to provide a better precision and recall, and it can greatly support the study of information integration in the medical field. Keywords Data resource selection · Abstract matrix · Medicine · Entity and association

1 Introduction Search engines can easily find linked web pages, but can only get dynamically generated pages by querying through the Application Programming Interface (API) provided. These web pages, which the traditional web crawler programs cannot get, are called deep web data. At present, most of the data on the Internet is based on deep web data resources, and it expands exponentially. It becomes more and more important to try and find the user required information from scattered and enormous deep web data resources. S. Deng (B) · W. Luo · X. Xu School of Software & Internet of Things Engineering, Jiangxi University of Finance and Economics, Nanchang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_79

815

816

S. Deng et al.

In order to serve the users with better information from deep web resources, it is necessary to build a deep web data integration system. However, there are millions and millions of data resources for any one specific subject; it is nearly impossible to integrate all the data resources for that one subject, so how to effectively select the related minimum data resources in that subject becomes the key issue in deep web integration data retrieval. More and more attention has been directed on how to find the best data resources. The entity information integration is the key focus in the deep web information integration, which is mainly on the entities and their associations information mining. The entity and association information data mining focuses on the rich association among entities to satisfy the user’s ever demanding request for accurate information. The current deep web data resource selection, which, based on key words and relationship in records, can no longer cope with said entity information integration requirement. This means that it is necessary to study the deep web data resource selection method based on the entity and their associations in non-cooperated environments like the Internet. The association information among entities can not only be taken directly from a document, but also from an associated entity information among multiple documents. For example, document 1 mentions the relationship between gastritis and halitosis, while document 2 discusses heart disease and halitosis. Then, by these two documents, it can induce that the gastritis and heart disease may cause the halitosis symptoms, which can be used as a valuable medical association relationship. Among the entities exists a large number of indirect associations and the present data resource selection method, which are based on word frequency and document structure, can no longer fully satisfy the data retrieval requirements. In order to realize the data resource selection based on the entities and their associations, it needs the building of the corresponding document abstract and the data resource evaluation methods. We study how to select non-structural deep web data resource based on the entities and their associations, and how to build a corresponding entity and association abstract matrix based on the indirect associations among entities, and provide the corresponding data source selection strategy based on the abstract matrix and the user’s search intention. This paper provides a new method for entity orientated information integration in deep web data resource selection. The research result can be applied into medicare, electronic businesses, etc. It improves services, and therefore providing the user with higher quality data information, giving it a better development prospect.

2 Related Researches The deep web data resources come into two types, text and structural and semistructural. For the text deep web data resource selection, the matured information retrieval technology can be applied. As to structural and semi-structural deep web

Deep Web Selection Based on Entity Association

817

data resource selection, it is to measure the association relationship for data resources by data mining the structural semantics information in the query.

2.1 Text Data Resource Selection Method The study on text data resources was researched earlier in strategic motions and achieved results in CORI [1], UUM [2], CRCS [3]. More related researches focused on how to optimize the parameter settings and the document sorting algorithm [4]. Because of the limitation of the sampling abstracts used on the above methods and related data resources in the subject tending to have similar abstracts, Ipeirotis [5] put forward a data resource selection method based on layer and classification. All the methods mentioned above did not consider the associations among data resources, and the possible incompleteness of sampled abstracts, however, Hong [6] provides a data resource selection method based on joint probability classification model. Many factors will affect the stability of the data resource selection method. Markov [7] uses a combined evaluation strategy to alleviate the uncertainty for the said deep web data resource selection methods. Since different users have different data retrieval requirement, Hong [8] provides a result in variety-based data resource selection strategy. Dong [9] balances on both expenses and quality, using a marginal idea theory to select the best data resources. Similarly, Rekatsinas [10] provides a conflictoptimized data resource selection method. As well as basing real-time content changing characteristic in the deep web data resource, Rekatsinas [11] provides a time-effectiveness data resource selection strategy. All the abovementioned text deep web data source selection methods treat the deep web as a big document set or a big word bag, using document sorting information and word frequency to select data resources with little consideration of the entities and their associations in those documentations.

2.2 Structural and Semi-structural Data Resource Selection Query interface property information from structural and semi-structural deep web data resources provide certain help. Wang [12] uses self-mapping structural data resource query table properties to get the best deep web resource selection. In some subjects, a single data resource cannot give the user a satisfactory answer and needs to query multiple data sources in a proper sequence, so Wang [13] provides a data resource strategy based on inter-dependence mapping for multiple data resource interfaces. Deep web data resource selection based on the interface selection and the user’s query has some limitations because the interface information cannot fully reflect its detailed content stored.

818

S. Deng et al.

Distinguished association semantics exits among key words in XML file tree; Nguyen [14] provides a data resource selection strategy based on an associate diagram called K-Graph. The core ideology is to use XML file tree’s structural semantics to measure the key word distance between two nodes. To effectively represent structural deep web semantic information, Wan [15] studies structural data resource selection for mixed typed key words and get better retrieval and precision. For the abovementioned XML, structural data resource selection methods, their precision and recall are higher, but both depend on the specific structural characteristics in the records. The key of entity information integration is to integrate the associations information among entities. To detail all kinds of associations among entities, it is necessary to consider the entities inside a document and the entity relationships among multiple documents. The current methods using word frequency, document sorting information and structural information to select data resources, can result in it being hard to discover indirect entity associations and measure of the association distances among entities. Because of this, we provide a data resource selection based on association abstract matrix representing associations and their association strength. Additionally, to improve effectiveness of data resource selection method, we consider the user query intention in key words to provide an entity and the association retrieval data resources selection strategy.

3 Build Association Abstract Matrix Steps to build the entity and association data resources abstract: • To get representative data in deep web by taking samples • To get entities and their associations information to build the entity and association diagram • To build the entity and association abstract matrix based on the entity and association diagram.

3.1 Deep Web Sampling For deep web data resource selection sampling, first, we need to take samples to get representative data to build data resource abstract for data resources. This paper uses the following deep web sampling method to get the related data: (1) Use 10 high frequent used Chinese character, 的(of), 在(at), 是(is) as the query key words and send to the query interface. (2) Keep returned records to set R L and build diagram model WG(V, E) based on R L , v is the vertex set, the vertex represents a piece of record. E is the indirect

Deep Web Selection Based on Entity Association

819

line, and if the two records are similar, then one line exists between vertexes [16]. (3) Keep repeating the data until it comes to a certain proportion. If it reaches the certain proportion, then it stops, otherwise proceed onto the next step. (4) Sort vertexes according to the continuous rate in WG(V, E) and generate sample query on the minimum vertex in turn.

3.2 Entity and Association Diagram As it is for the entity and association data source selection and so, before building the abstract, firstly we need to identify the related entities in the sample documents based on active learning or the self-learning Chinese entity naming method [17]. When used in the medical field, we can find four types of entities: disease, food, medicine, and bacteria. We can then label the associations among entities, finally convert the data resources into an entity and association diagram T, like what Fig. 1 shows. In the medical field, five entity associations have been defined as matching, healing, inducing, restriction, symptoms and so, the human identity combined clustering method is used to identify association types among entities [18]. Figure 1 shows the association relationship among entities in medical filed. It can be found in the direct entity relationship information like gastritis and halitosis, and it can also discover indirect entity association gastritis-halitosis-heart disease because both gastritis and heart disease can possibly cause halitosis and even detect Fig. 1 Entity and association diagram of data sources

(symptoms 13.3)

Gastritis (induce 8.7) (induce 3.7)

halitosis

Numb Spice soup

Helicobacter pylori

(induce 4) (symptoms 5) (restrict 3.7)

Heart disease

garlic

Heart medicine

cabbage (match 2)

(Heal 2.3)

pork

(restrict 8.3)

820

S. Deng et al.

indirect and implied association relationship between pork and gastritis (for people with gastritis, the helicobacter pylori can exist, and a suitable amount garlic would be beneficial, therefore, it is even better to eat garlic and pork together). T = (vr, er), where vr is the limited node set, representing entity member in Diagram T: Er is the association line set: and each association line (v1,v2) represents direct association relationship among neighboring entities. The tuple (type, doc_score) stores association type and total scores for associated document. The strategy to calculate the score for a document (doc) with two entities is like this: (1) (2) (3) (4)

If v1, v2 appears in the sentence in the document doc, score 1, exit. If v1, v2 in the same paragraph in the document doc1, score 2/3, exit. In other cases, score 1/3. If in data resources, multiple associated document with v1, v2 has same type of association information, accumulate the scores.

3.3 Entity and Association Abstract Matrix If it is only depending on the offline pre-build entity and association diagram to do the data source selection, it can cause delay of returning results, meaning that the association calculation will take some time. Based on this, we simplify the entity and association diagram and build an abstract matrix to record direct association information among each entity, like Fig. 2. Where d is the association score between two entities t and t’s, and when the association step length between two entities is bigger than w, the association strength is weak and can be ignored, the value is set to be unlimited ∞. And the self-association retrieval is not considered, so the entity self-association is also set to be unlimited ∞. To get the value for d, first calculate the scores for any association path between two entities in Fig. 1. Given two entities key words, k, k, based on the entity and association diagram, the next step is to calculate association scores for the two entities in the same path: Fig. 2 Entity and association abstract matrix for data source

D = (di, j )n×n =

t1

t2

.

.

.

tn

t1

d1,1



.

.

.



t2

0

d 2,2

.

.

.

d 2, n



.

.

.



.

.

.

.

.

.

tn

d n ,1

Deep Web Selection Based on Entity Association

821

    weight ki ↔ k j   Score_ relation ki ↔ k j = distance ki ↔ k j

(3.1)

where weight(ki ↔ k j ) are the weight score for key words ki , k j in the entity and association diagram, distance(ki ↔ k j ) is the distance between the two key words ki , k j in the entity and association diagram. Entity key words ki , k j can be a direct link or indirect association, use the following to calculate the weighted association scores weight(ki ↔ k j ) =

min



1≤ f ≤|U (k1 ,k2 )|

Av1 , . . . Avf . . . Av|U (k1 ,k2 )|



(3.2)

where A is the association lines corresponding tuple set between the path for the key words ki , k j ; a is the document score for the f th line in the path, u is the association step length. If key words ki , k j can be direct associated, then weight(ki ↔ k j ) is the document score for the corresponding tuple; otherwise, the weight is the smallest document score along the path in the association tuple. There may be many association paths with different step lengths between two entities, and it may also have many association paths with same step length. The association scores for step length rh , returned by data sources and corresponding to ki , k j related entity and association result, is defined as:   relat ki ←→ k j = rh



Score_ relation(ki ↔ k j )

(3.3)

step(ki ,k j )=rh

where ki , k j might have many association paths with step length rh , relat(ki ←→ k j ) rh

will calculate the associate scores for all association paths with step length rh for ki , kj. After getting association scores of all the different step lengths for the associations between data sources and key words based on Formula 3.4, we add the weighting of the total associate scores by data sources against the key words ki , k j . For it is entity and association retrieval for top-n data resource, to improve the data sources selection precision, take only those associations with step length less or equals to w to calculate scores.   ω    Ro Si , ki , k j = relat ki ←→ k j rh =1

rh

(3.4)

822

S. Deng et al.

4 Data Source Scoring We have designed an association algorithm for the key words association in the query base on Fig. 2 entity association matrix after analyzing the above association query intention. Algorithm 1 the key words association in the query Input: Abstract diagram matrix D, associated key words set U, all the key words set for a query V. Output: Association line set L (1) Directly get all the scores for the associations among the key words in V based on D (2) Select a pair of key words(g1,g2) with highest association score and put all selected key words into set U (3) If |V − U | > 0, calculate key word association scores between v-u and u, execute step 2; Otherwise, finish. After building the key words association, we accumulate the scores for the association among key words. The association scores of data sources Si to Q are SCORE(si , Q) =



  Ro si , ki , k j

(4.1)

(ki ,k j )∈L ,ki ∈Q,k j ∈Q

5 Test Result Analysis Since deep web data resources selection has no standard test data sets, we take data collected by special designed crawler from 30 business Web sites such as Medicine Home (http://www.med-home.net/), Lilac Yard medicine, Chief medicine (http:// www.9med.net/), Tencent Health as the test data resources, the amount of data is 66,34G. The data source selection precision and recall is used to measure data source selection effectiveness. Definition 1 Precision of data source   si ∈ Top (S)|SCORE(si , Q) > 0 K P(K ) = Top K (R)

(5.1)

where Top K (S) and Top K (R) are for K number of highest score data resources based on this paper’s method and true highest score ones.

Deep Web Selection Based on Entity Association

823

Definition 2 Recall of record R(K ) =

Gk H

(5.2)

where H is the quantity of associations which satisfied the query condition in data source set. G is the quantity of the association which satisfy the query in Top-k data sources taken by we’s method. We focus on two to four entities and association query tests, and so forty tests have been done for three types of different query lengths. The true retrieval results are labeled manually. The precision and recall will be averaged. The test result has been compared with corresponding method in [15] which is chosen because the data source selection method is suitable for this paper’s issues by replacing the key words to achieve the entity and association situation. Figures 3 and 4 show data source selection precision and recall. Figure 3 shows that the method provided in this paper has a better precision when selecting Top-k (1 ≤ k ≤ 10) data sources, and especially, the rate of precision becomes more than 82% when selecting the top 2 data sources. The recall for both methods decreases with the increasing of number of selected data sources, the reason lies in the fact that the higher the ranking the data source is, the more accurate the measurement on associations. The method provided by we has a better recall than

Fig. 3 Comparison of data source selection precision

Fig. 4 Comparison of data source selection recall

824

S. Deng et al.

the key words association method because the entity and association data sources abstract it builds can better represent the entity association. Figure 4 shows the recall is also better than that of the key word association method, although the key word association recall in top-k data source is not high, it still can find enough data sources which satisfying basic query condition.

6 Conclusion To solve the web data integration efficiency issue in the medical field, we provide a medicine-oriented entity and associated data source selection strategy that is designed based on entity and association query intention, which, in turn, based on data source entity association abstracts build from the weighted information and association paths. The comparison of the test results against the other methods shows that the method has a better data source selection precision and recall. This will greatly encourage the use of deep web data.

References 1. Callan, J.P., Lu, Z., Croft, W.B.: Searching distributed collections with inference networks. In: Proceedings of the 18th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR ’95), pp. 21–28. ACM, New York (1995) 2. Si, L., Callan, J.: Unified utility maximization framework for resource selection. In: Proceedings of the 13th ACM International Conference on Information and Knowledge Management (CIKM’04), pp. 32–41. ACM, New York (2004) 3. Shokouhi, M.: Central-rank-based collection selection in uncooperative distributed information retrieval. In: Proceedings of the 29th European Conference on IR Research, pp. 160–172. Springer, Heidelberg (2007) 4. Wan, C.X., Deng, S., Liu, X.P., Liao, G.Q., Liu, D.X., Jiang, T.J.: Web data source selection technologies. J. Softw. 24(4), 781–797 (2013). (in Chinese) 5. Ipeirotis, P.G., Gravano, L.: Classification-aware hidden-web text database selection. ACM Trans. Inf. Syst. (TOIS) 26(2), 1–66 (2008) 6. Hong, D., Si, L., Bracke, P., Witt, M., Juchcinski, T.: A joint probabilistic classification model for resource selection. In: Proceedings of the 33rd International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR’10), pp. 98–105. ACM, New York (2010) 7. Markov, I., Azzopardi, L., Crestani, F.: Reducing the uncertainty in resource selection. In: Proceedings of the 35th European Conference on IR Research (ECIR 2013), pp. 507–519. Springer, Heidelberg (2013) 8. Hong, D., Si, L.: Search result diversification in resource selection for federated search. In: Proceedings of the 36th International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR’13), pp. 613–622. ACM, New York (2013) 9. Dong, X.L., Saha, B.: Less is more: selecting sources wisely for integration. In: Proceedings of the 39th International Conference on Very Large Data Bases (VLDB 2013), pp. 37–48. Morgan Kaufmann Publishers, San Francisco (2013)

Deep Web Selection Based on Entity Association

825

10. Rekatsinas, T., Dong, X.L., Getoor, L., Srivastava, D.: Finding quality in quantity: the challenge of discovering valuable sources for integration. In: Proceedings of the 7th Biennial Conference on Innovative Data Systems Research (CIDR’15), pp. 1–7. ACM, New York (2015) 11. Rekatsinas, T., Dong, X.L., Srivastava, D.: Characterizing and selecting fresh data sources. In: Proceedings of the 2014 ACM SIGMOD International Conference on Management of Data (SIGMOD 2014), pp. 919–930. ACM, New York (2014) 12. Wang, Y., Zuo, W., He, F., Wang, X., Zhang, A.: Ontology-assisted deep Web source selection. In: Computer Science for Environmental Engineering and EcoInformatics, vol. 159, no. 2, pp. 66–71 (2011) 13. Wang, F., Agrawal, G., Jin, R.: A system for relational keyword search over deep Web data sources. OSU-CISRC-03/08-TR10. The Ohio State University, Columbus (2008) 14. Nguyen, K., Cao, J.: K-Graphs: selecting top-k data sources for XML keyword queries. In: Proceedings of the 22nd International Conference on Database and Expert Systems Applications (DEXA’11), pp. 425–439. Springer, Heidelberg (2011) 15. Wan, C.X., Deng, S., Liu, D.X., Jiang, T.J., Liu, X.P.: Non-cooperative structured deep web selection based on hybrid type keyword retrieval. Comput. Res. Dev. 51(4), 905–917 (2014). (in Chinese) 16. Liu, W., Meng, X.F., Ling, Y.Y.: A graph-based approach for Web database sampling. J. Softw. 19(2), 179–193 (2008). (in Chinese) 17. Zhong, Z.N., Liu, F.C., Wu, Y., Wu, J.J.: Chinese named entity recognition combined active learning with self-training. J. Natl. Univ. Defense Technol. 36(4), 82–88 (2014). (in Chinese) 18. Ren, X., El-Kishky, A., Wang, C., Tao, F., Voss, C.R., Han, J.: ClusType: effective entity recognition and typing by relation phrase-based clustering. In: Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 995–1005. ACM, New York (2015)

Bayesian-Based Efficient Fault Location Algorithm for Power Bottom-Guaranteed Communication Networks Xinzhan Liu, Weijian Li, Peng Liu, and Huiqing Li

Abstract In order to solve the problem of low fault location performance of power bottom-guaranteed communication network under uncertain environment, combined with the characteristics of fault location of power bottom-guaranteed communication network under uncertain environment, the two stages of fault detection and fault location are combined. This paper proposes a Bayesian-based efficient fault location algorithm for power bottom-guaranteed communication networks (BFLA). In the fault detection phase, the probe dependency matrix model is constructed, and a heuristic probe selection algorithm based on vector expansion theory is proposed. The detection result set is obtained by transmitting the probe. In the fault location stage, a Bayesian fault location model is constructed based on the set of detection results to solve the optimal suspected fault set. In the performance analysis part, compared with the existing algorithms, it is verified that the proposed algorithm effectively improves the accuracy of fault diagnosis and reduces the false positive rate. Keywords Power bottom-guaranteed communication network · Fault location · Bayesian

1 Introduction With the rapid expansion of the scale of power bottom-guaranteed communication network, the network management system plays an increasingly important role in the network operation. In particular, the fault management function in the network management system plays a key role in the normal operation of power bottom-guaranteed communication network [1]. Because the larger network scale is easily affected by X. Liu (B) · W. Li · P. Liu Electric Power Dispatching Control Center of Guangdong Power Grid Co., Ltd., Guangzhou, China e-mail: [email protected] H. Li Guangdong Xintong Communication Co., Ltd., Guangzhou, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_80

827

828

X. Liu et al.

the environment, the fault information and symptom information in the fault management system are inconsistent, which brings challenges to fault diagnosis. How to accurately locate faults in the case of inconsistent fault and symptom information has become an urgent problem to be solved [2]. In order to solve the problem of fault location under uncertain environment, relevant research institutions have conducted in-depth research. According to the different technologies used, it can be divided into the following three types. (1) Expert system based on case analysis [3]. The research results are mainly based on the data set of the long-term operation of the network management system, and the typical fault cases are sorted out, which is convenient for the maintenance of personnel to learn and use. The advantage of this method is high availability. However, the main disadvantages are that it is not convenient to deal with unknown faults, and it is not suitable for dealing with new network problems [4, 5]. (2) Intelligent systems based on machine learning [2]. The main feature of this research is the use of machine-learning algorithms such as Bayesian, neural network, and random forest for fault location. The advantage of this method is that it can learn, and can automatically mine the hidden relationship between faults and symptoms according to changes in the environment, effectively improving the efficiency and performance of fault location. For example, the literature [6] uses Bayesian theory to construct a two-point Bayesian fault propagation model, which effectively solves the problem of service fault location in the network virtualization environment. Based on the Bayesian theory, the literature [7, 8] constructs a probability model of faults and symptoms, which better solves the problem of IP network fault location under noisy uncertain environment. (3) Coding-based feature vector system [9]. The main feature of this research is to encode the alarm information and root cause of fault received by the network management system, and to establish a correlation matrix knowledge base of faults and symptoms. After receiving the alarm information, the network management system can automatically find the corresponding fault coding information from the association matrix knowledge base. The coded feature vector system is better in terms of fault location, speed, and accuracy. However, building a correlation matrix knowledge base requires a lot of human resources, is inefficient, and is not suitable for dynamic environments. This paper combines two stages of fault detection and fault location and proposes a Bayesian-based efficient fault location algorithm for power bottom-guaranteed communication networks. By comparing with the existing algorithms, the algorithm is validated to improve the performance of the fault diagnosis algorithm.

2 Problem Description In order to integrate the two stages of fault detection and fault location and improve the efficiency and performance of fault location, the key concepts used in this paper are given below.

Bayesian-Based Efficient Fault Location Algorithm …

829

Table 1 Schematic diagram of detection dependency matrix N1

N2

N3

N4

N5

P1

1

0

1

0

0

P2

1

0

1

0

0

P3

1

0

1

1

0

P4

1

1

1

0

1

(1) Detection: An end-to-end request or instruction from the source to the specified destination, which receives a return message from the destination to the source. (2) Detection site: The source network equipment needs to have certain hardware configuration and software functions, so as to better realize the sending of detection information and analyze the operation of the network equipment from the return information of the destination. (3) Detection dependency matrix: A matrix describing the relationship between detection and detection sites. The rows of the matrix represent the information of network devices and the return value of detection. The following three key concepts are illustrated by taking Table 1 as an example. Table 1 represents a simple detection dependency matrix, in which P1, P2, P3, and P4 represent four detections. N1, N2, N3, N4, and N5 represent five network devices, and N1 is selected as the detection site for four detections. The detection P1 and P2 pass through two network devices N1 and N3, and the detection P3 passes through three network devices N1, N3, and N4, and the detection P4 passes through four  network devices N1, N2, N3, and N5. The C Mp is used to represent the column vector of the detection dependency matrix Mp , and the R Mp is used to represent the row vector of the detection dependency matrix Mp . Because the detection adds additional communication pressure to the operation of bottom-guaranteed communication network, it is necessary to minimize the number of detections.

3 Bayesian-Based Efficient Fault Location Algorithm for Power Bottom-Guaranteed Communication Networks 3.1 Algorithm Flowchart The Bayesian-based efficient fault location algorithm for power bottom-guaranteed communication network proposed in this paper, as shown in Flowchart 1, includes the following five steps: (1) Analyze the dependence of the detection and system to construct a detection dependency matrix model, (2) A heuristic detection selection algorithm based on vector expansion theory is proposed, (3)Send the detection to get the set of detection results, (4) The Bayesian fault location model is constructed

830

X. Liu et al.

based on the detection result set, (5) solving the optimal suspect fault set based on the fault location mold. Wherein, steps (1) to (3) belong to the fault detection phase, and steps (4) to (5) belong to the fault location phase.

3.2 Fault Detection Phase 3.2.1

Analyze the Dependence of the Detection and System to Construct a Detection Dependency Matrix Model

In order to construct the detection dependency matrix model, the key concepts of the dependency matrix are given at first. (1) Alternative detection node set: A network device in power bottom-guaranteed communication network that meets the software and hardware requirements for the detection function. (2) Alternate detection set: A set of detection sent by each of the network devices of the set of alternate detection nodes as a source to all other network devices. (3) Minimum detection set: A minimum detection set that can cover the detection of all network devices of power bottom-guaranteed communication network. (4) Detection dependency matrix of alternative detection sets: Represents the detection dependency matrix corresponding to the alternate detection set. (5) The detection dependency matrix of the minimum detection set: Represents the detection dependency matrix corresponding to the minimum detection set. From the above definition, the optimal goal in the detection selection phase is to solve the minimum detection set. Since the minimum detection set is the smallest set of detection that can cover all network devices of power bottom-guaranteed communication network, the minimum detection set needs to have the following two characteristics: (1) the minimum detection set and the alternate detection set have the same network device, that is, the detection dependency matrix has the same number of columns. (2) There is no redundant detection in the minimum detection set, that is, the vectors obtained by any column or operation in the minimum detection set are different column vectors, and the column vector still belongs to the current dependency matrix [10]. The physical meaning of satisfying this condition is that the minimum detection set can locate a single network device for a fault occurring on the network device.

3.2.2

Heuristic Detection Based on Vector Expansion Theory

Based on the above characteristics of the detection dependency matrix, a heuristic detection selection algorithm based on the vector expansion theory is proposed. The algorithm repeats the process of selecting nodes and selecting detections from the alternative detection node set and the alternative detection set until all network devices

Bayesian-Based Efficient Fault Location Algorithm …

831

are passed by at least one detection. Therefore, the heuristic detection selection algorithm based on vector expansion theory proposed in this paper includes the following three steps: (1) Node selection phase: sums each column vector in the probe dependency matrix and arranges them in ascending order. (2) Detection selection phase: For all detection of the least-detected network device, solve the weighted values of the row vectors and arrange them in descending order. (3) Network device set update: Removes all network devices that the newly added detection passes through from the network device set.

3.2.3

Send a Detection to Obtain a Set of Detection Results

This paper establishes the normal network node set Npn , the suspected network node set Nsn , the normal detection state set Ppn , and the suspected detection state set Psn . The network device in the normal state is added to the set Npn , and the network device in the abnormal state is added to the set Nsn . A normal state detection is added to the set Ppn , and an abnormal state detection is added to the set Psn . Because there are uncertainties in the network, it is necessary to locate faults based on the elements in the above four sets and the implicit association between the elements.

3.3 Fault Location Phase 3.3.1

Bayesian Fault Location Model Based on Detection Result Set

Combined with the characteristics of the set of detection results in the uncertain environment, this paper establishes the association relationship between the sets of detection results based on the Bayesian network model. The Bayesian fault location model based on the set of detection results proposed in this paper is shown in Fig. 1. As can be seen from Fig. 1, the model includes the parent node P, the child node N, the connection between the parent node and the child node. The child node N includes Fig. 1 Bayesian fault location model based on detection result set

832

X. Liu et al.

the normal network node set Npn and a suspected network node set Nsn . The parent node P includes the normal detection state set Ppn and the suspect detection state set Psn . The connection   between the parent node and the child node is represented by r P j |Ni . r P j |Ni indicates the probability that the parent node  be abnormal  will when the child node fails in an uncertain environment. Use r P j to indicate the probability of abnormal detection,use r (Ni ) to indicate the probability that the node  on is abnormal, and the values of r P j , r (Ni ), r P j |Ni can be obtained based  the long-term operation record of the network management system. When r Ni |P j is used to indicate that the detection result is abnormal, the probability of network device failure is calculated by Formula (1). 

r Ni |P j

3.3.2



  r P j |Ni r (Ni )   = Ni ∈N P r P j |Ni r (Ni )

(1)

Solving Optimal Suspected Fault Set Based on Fault Location Model

The optimal suspected fault set is a subset of the suspected fault set Nsn . This paper defines the optimal suspected fault set to be solved as the ability arg max Nsn C(Nsn , P) to interpret the largest set of abnormal network devices for anomaly detection, which is calculated by Formula (2). Among them, pro(Ni ) indicates that the fault of the network device Ni causes atleast one probability of abnormal detection, which is calculated by Formula (3). Ni ∈Nsn pro(Ni ) indicates the probability that all net    work devices in the suspected fault set are faulty; Ni ∈Nsn 1 − r P j |Ni indicates that fault set will not cause detection failure;  in the suspected   devices  all network |N 1 − 1 − r P indicates the probability that each detection in j i P j ∈P Ni ∈Nsn the set of abnormal detection is due to a failure of at least one network device in the set of suspected faults. arg max C(Nsn , P) = Nsn





pro(Ni ) ×

Ni ∈Nsn

pro(Ni ) = 1 −

P j ∈P

 

⎞     ⎝1 − 1 − r P j |Ni ⎠ ⎛

(2)

Ni ∈Nsn

    1 − r Ni |P j r P j

(3)

P j ∈Psn

4 Performance Analysis In the experiment, the Inet3.0 tool was used to generate network topology information [11], and the Java language is used to realize the uncertain network environment and

Bayesian-Based Efficient Fault Location Algorithm …

833

fault location. In order to verify the performance of the proposed algorithm BFLA, it is compared with the algorithm SFDoIC from two aspects of accuracy and fault alarm rate of fault diagnosis. Among them, the formula for calculating the accuracy rate is Formula (4), and the formula for calculating the false alarm rate is Formula (5). Accuracy rate = Fault alarm rate =

|False fault set ∩ Actual fault set| False fault set

(4)

|False fault set in fault location set| . |False fault set|

(5)

In order to compare the fault diagnosis performance of the two algorithms under different network topologies, this paper uses the Inet3.0 tool to generate ten network topologies. The comparison results between the algorithm BFLA and the algorithm SFDoIC in terms of accuracy and false alarm rate are shown in Figs. 2 and 3. In terms of performance comparison between the two algorithms, the accuracy and false alarm Fig. 2 Comparison of algorithms accuracy

Fig. 3 Comparison of false alarm rates of algorithms

834

X. Liu et al.

rate of the BFLA algorithm in this paper are improved compared with the algorithm SFDoIC in ten network topologies. As the algorithm is affected by the network scale, with the increase of the network topology scale, the performance of the algorithm BFLA in terms of accuracy is improved, and the performance in the false alarm rate is relatively stable, indicating that the algorithm is suitable for solving large-scale power bottom-guaranteed communication network.

5 Conclusion In the operation of the large-scale power bottom-guaranteed communication network, the alarm information acquired by the network management system is easily affected by the external environment, which makes the dependency of the fault and the symptom becomes more complicated. In order to solve this problem, based on the existing research and analysis, combined with the fault location characteristics of power bottom-guaranteed communication network under uncertain environment, this paper integrates the two phases of fault detection and fault location and proposes an efficient fault location algorithm for bottom-guaranteed communication network based on Bayesian. By comparing with the existing algorithms, it is verified that the proposed algorithm effectively improves the accuracy of fault diagnosis and reduces the false alarm rate. In order to apply the algorithm of this paper to power bottom-guaranteed communication network, in the next step, we will study how the algorithm can interface and integrate with the existing system, so as to generate use value in practice. Acknowledgements This work is supported by the Project on Research and Demonstration of Application Technology of Intelligent Management and Dynamic Simulation Based on Bottom-guaranteed Power Grid Communication System. Under Grant No. GDKJXM20180249 (036000KK52180006).

References 1. Yinzhao, Z., Xing, C., Jiming, L.: Telecommunications for electric power system. 27(168), 58–61 (2006) 2. Steinder, M., Sethi, A.S.: Probabilistic fault diagnosis in communication systems through incremental hypothesis updating. Comput. Netw. 45(4), 537–562 (2004) 3. Bennacer, L., Amirat, Y., Chibani, A., et al.: Self-diagnosis technique for virtual private networks combining Bayesian networks and case-based reasoning. IEEE Trans. Autom. Sci. Eng. 12(1), 354–366 (2015) 4. Steinder, M., Sethi, A.S.: Increasing robustness of fault localization through analysis of lost, spurious, and positive symptoms. In: Proceedings of Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies, vol. 1, pp. 322–331. IEEE (2002) 5. Kompella, R.R., Yates, J., Greenberg, A., et al.: Fault localization via risk modeling. IEEE Trans. Dependable Secure Comput. 7(4), 396–409 (2010)

Bayesian-Based Efficient Fault Location Algorithm …

835

6. Zhang, S.L., Qiu, X.S., Meng, L.M.: Service fault diagnosis algorithm in network virtualization environment. J. Softw. 23(10), 2772–2782 (2012) 7. Dong, H.J.: Research and Implementation of Fault Localization Algorithm for IP-Based Networks Using Bayesian Networks. Beijing University of Posts and Telecommunications, Beijing (2009) 8. Narasimha, R., Dihidar, S., Ji, C., et al.: Scalable fault diagnosis in IP networks using graphical models: a variational inference approach. In: 2007 IEEE International Conference on Communications, pp. 147–152. IEEE (2007) 9. Lahouti, F., Khandani, A.K., Saleh, A.: Robust transmission of multistage vector quantized sources over noisy communication channels-applications to MELP speech codec. IEEE Trans. Veh. Technol. 55(6), 1805–1811 (2006) 10. Meng, L.M., Huang, T., Cheng, L., et al.: Probe station placement for multiple faults localization. J. Beijing Univ. Posts Telecommun. 32(5), 1–5 (2009) 11. Winick, J., Jamin, S.: Inet-3.0: Internet Topology Generator. University of Michigan, Ann Arbor, MI (2002)

Fault Diagnosis Algorithm for Power Bottom-Guaranteed Communication Network Based on Random Forest Zhan Shi, Ying Zeng, Zhengfeng Zhang, and Tingbiao Hu

Abstract In order to solve the problem of low performance of power bottomguaranteed communication network fault diagnosis algorithm, this paper proposes a fault diagnosis algorithm for power bottom-guaranteed communication network based on random forest. Firstly, combined with the characteristics of the network management data of power bottom-guaranteed communication network, it is demonstrated that the random forest algorithm has higher execution efficiency and better anti-noise ability by comparing the existing machine learning algorithms, when solving the fault diagnosis problem of power bottom-guaranteed communication network. Secondly, according to the characteristics of the random forest algorithm, the existing power communication equipment data sets are preprocessed to generate training sets and test sets, and the selection strategy is used to optimize the overfitting problem to generate decision tree data set for algorithm execution. Finally, the data set is gradually classified by iterative method, and the best classification of the data set is solved based on the classification result of decision tree. By comparing with the existing algorithms, it is verified that the proposed algorithm improves the performance of power bottom-guaranteed communication network fault diagnosis algorithm. Keywords Power bottom-guaranteed communication network · Fault diagnosis · Decision tree · Random forest algorithm

1 Introduction With the rapid development and application of new technologies such as big data and artificial intelligence, power bottom-guaranteed communication network has Z. Shi (B) · Y. Zeng · Z. Zhang Electric Power Dispatching Control Center of Guangdong Power Grid Co., Ltd., Guangzhou, China e-mail: [email protected] T. Hu Guangdong Xintong Communication Co., Ltd., Guangzhou, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_81

837

838

Z. Shi et al.

been rapidly developed [1]. More power communication equipment has been put into the production environment, providing abundant power resources for our lives. However, as the size of power bottom-guaranteed communication network increases, it also leads to an increase in the number of failure points. Therefore, the fault diagnosis of power bottom-guaranteed communication network is important to its stable operation. In order to solve the problem of fault diagnosis of power bottom-guarantee communication network, the literature [2] analyzed the related factors that are affecting fault diagnosis performance, and studied two key issues of improving fault diagnosis efficiency and performance. Literature [3] studied the efficient fault diagnosis algorithm under the background of big data from the perspective of rapid growth of data in power bottom-guaranteed communication network. Literature [4] uses neural network technology to propose a fault diagnosis method based on BP neural network, which realizes the automation and intelligence of fault diagnosis. In order to solve the problem of low efficiency of learning ability brought by neural network algorithm, the literature [5] proposed a heuristic diagnosis algorithm in large-scale environment. In recent years, with the maturity of deep learning technology, it has been applied to the research of fault diagnosis problems [6–8]. However, the diagnosis algorithm based on deep learning technology has a long training time, and it is not easy to apply to the fault diagnosis environment of power bottom-guaranteed communication network with high real-time requirements. In order to solve this problem, this paper firstly combines the characteristics of network management data of power bottom-guaranteed communication network to demonstrate that the random forest algorithm has higher execution efficiency and better anti-noise ability when solving the fault diagnosis problem of power bottomguaranteed communication network. Secondly, the training set and the test set are generated according to the characteristics of the random forest algorithm, and the selection strategy is used to generate the decision tree data set for the algorithm execution. Finally, the data set is gradually classified by iterative method, and the optimal classification of data in the data set is solved based on the classification result. The performance of the proposed algorithm is verified in comparison with existing algorithms.

2 Problem Description During the operation of power bottom-guaranteed communication system, when the device is in an abnormal state, an abnormal prompt message is sent through the network management system. To facilitate the description of the problem, three important concepts in fault diagnosis are given below. (1) Fault: It refers to the abnormal working state of the equipment in power bottomguaranteed communication network. It is represented by yi ∈ Y , a value of 1

Fault Diagnosis Algorithm for Power Bottom-Guaranteed …

839

indicates that the device has failed, and a value of 0 indicates that the device has not failed. (2) Symptom: It refers to the observable information obtained by the network management system using the detection, which is represented by xi ∈ X . When all devices passing through the detection are in normal working condition, the observed information is called positive symptom and takes a value of 0. When the device that has passed the detection contains a device that is in an abnormal working state, the observed information is called a negative symptom and takes a value of 1. (3) Fault propagation model: In order to infer the faulty device based on the observed symptom information, this paper uses the dependency matrix to model the fault and symptom, so as to realize the fault diagnosis through the analysis of the model. Taking the fault propagation model diagram of Table 1 as an example, the value of xi ∈ X indicates whether the symptom belongs to a positive symptom or a negative symptom. When xi = 1, it indicates that there is an abnormal device that is currently being detected. When xi = 0, it indicates that the devices that have passed the current detection are in a normal state. The value of yi ∈ Y indicates whether the detection for obtaining the current symptom passes through the device. When yi = 1, it indicates that the detection of the current symptom passes through the device; when yi = 0, it indicates that the detection of the current symptom does not pass through the device. With the enlargement of the scale of power bottom-guaranteed communication network, the symptom information collected by the network management system is rapidly increasing, and the fault propagation model will become very complicated, which brings great challenges to fault diagnosis. Next, by analyzing the data characteristics of the network management system of power bottom-guaranteed communication network, a fault diagnosis algorithm based on the random forest for power bottom-guaranteed communication network is proposed to solve this problem. Table 1 Fault propagation model y1

y2



x1 = 0

1

0

1

ym

x2 = 1

0

1

1

1



1

0

1

0

xn = 0

0

1

0

0

840

Z. Shi et al.

3 Algorithm Selection and Data Analysis 3.1 Algorithm Selection In order to solve the problem of low diagnostic performance of the fault diagnosis algorithm for power bottom-guaranteed communication network, this paper compares the machine learning algorithms such as naive Bayesian network algorithm, regression algorithm, random forest algorithm, and classification algorithm proposed in [7, 9]. Combined with the characteristics of the network management data of power bottom-guaranteed communication network, the following conclusions are finally drawn: if the random forest algorithm is used to solve the fault diagnosis problem of power bottom-guaranteed communication network, it has higher execution efficiency and better anti-noise ability. Therefore, this paper applies the random forest algorithm to the fault diagnosis problem. It has a positive significance for the stable operation of power bottom-guaranteed communication network.

3.2 Data Preparation and Optimization (1) Data preparation In the long-term operation process, the power company has accumulated a large amount of communication equipment operation data. Through the analysis of the basic random forest algorithm, it is known that the existing data collection of power bottom-guaranteed communication equipment needs to be preprocessed to generate a training set and a test set. In this paper, the training set is used to represent by Train = {(X 1 , y1 ), (X 2 , y2 ), . . . , (X m , ym )}, and the test set is used to represent by Test = {(X m+1 , ym+1 ), (X m+2 , ym+2 ), . . . , (X n , yn )}. In terms of each specific attribute in the training set and the test set, the elements of the node set are represented by X = {a1 , a2 , . . . , ad }, where d represents the number of nodes, ad represents the probability of node failure, and can be based on long-term network operation data of power bottom-guaranteed communication network. The calculation is obtained; the elements of the probe attribute set are represented by Y = {b1 , b2 }. (2) Optimize over-fitting problem based on selection strategy By analyzing the research results of the existing random forest algorithm, the overfitting problem is one common problem. This paper uses a method of selecting attributes to solve this problem. The selection attribute refers to randomly selecting a specified number of attributes as the data of the training set and the test set. By selecting attributes, the randomness of the constructed training set and test set can be improved, thereby effectively solving the over-fitting problem and effectively improving the performance of the fault diagnosis algorithm. In this article, W (0 < W < d) is used to represent the number of attribute sets selected from all nodes.

Fault Diagnosis Algorithm for Power Bottom-Guaranteed …

841

(3) Generate a data set for the decision tree From the analysis of random forest algorithm, it can be known that when the random forest algorithm is executed, k decision trees are needed to be used for fault diagnosis. Therefore, in the data preparation phase, it is necessary to construct a data set of k decision trees based on the training set. In order to improve the randomness of the decision tree, this paper adopts the data set construction method with the return, randomly selects the nodes from the training set, and constructs k data sets for the decision tree algorithm. This paper uses Train∗1 , Train∗2 , . . . , Train∗k to represent the data set of the generated k decision trees.

4 Fault Diagnosis Algorithm for Power Bottom-Guaranteed Communication Network Based on Random Forest The decision tree algorithm uses an iterative method to classify the data set stepby-step. When the iteration condition is met or the classification ends, the iteration ends. When implementing the decision tree algorithm, it includes two key processes: Formulating the iterative end condition of the algorithm and judging the node classification criteria. Among them, in the formulation of the iterative end condition of the algorithm, the data in the data set is all taken out or all data types are the same as the end condition. In terms of judging the criteria of node classification, this paper uses the method of calculating the information gain rate of node attributes. The calculation method of the information gain rate is shown in Formula (1), and its value can effectively prevent the problem of low data classification performance caused by information gain. Where Train represents a data set and a represents a node attribute. In Formula (1), InfG(Train, a) represents the formula for calculating the information gain. The specific calculation method is shown in Formula (2). IValue(a) indicates the value of each node attribute. The specific calculation method is shown in Formula (3). InfGR(Train, a) =

InfG(Train, a) IValue(a)

(1)

In the Formula (2) for calculating the information gain, |γ | represents the number of categories of data in the data set, and Ratio(Train) represents the proportion of various types of data in the total data set, and the calculation formula is shown in Formula (4). InfG(Train, a) = Ratio(Train) −

p  |Traini | i=1

IValue(a) = −

p  |Traini | i=1

|Train|

|Train| log2

  Ratio Traini

|Traini | |Train|

(2)

(3)

842

Z. Shi et al.

Ratio(Train) = −

|γ | 

pq log2 pq

(4)

q=1

Based on the results of k decision trees, the optimal classification of data in data sets is solved. After obtaining the classification results of k decision trees, how to make full use of these classification results is a very important step of the random forest algorithm and also a key factor affecting the advantages and disadvantages of the random forest algorithm. This article uses Formula (5) to solve this problem. Formula (5) adopts the method of taking high probability events as the final result, that is, for each node, the classification that appears the most in the results of the k decision trees is taken ∗ (X ) denotes a mark of as the classification of the node. In the formula (5), Traini,e ∗ the final category h e of the data set Traini (X ). k Best(X ) = h arg maxe i=1 ∗ Traini,e (X )

(5)

5 Performance Analysis In order to verify the performance of the fault diagnosis algorithm based on random forest of power bottom-guaranteed communication network, the existing BP neural network algorithm and support vector machine algorithm are compared with the proposed algorithm. The experiment uses the real data collected by power bottomguaranteed communication network management system of a provincial power company, which contains 6000 sample data, including 1000 fault data and 5000 normal data. Considering that MATLAB is more convenient for data processing and there are many function libraries available, MATLAB R2016b software is used for programming and analysis. Similar to the existing research and analysis, this paper selects two indicators of accuracy rate and false alarm rate commonly used in fault diagnosis of power bottom-guaranteed communication network for performance analysis. The accuracy rate describes the proportion of the correct fault data amount diagnosed by the fault diagnosis algorithm in the total data amount, and the false alarm rate describes the proportion of the fault data amount misclassified by the fault diagnosis algorithm in the total data amount. Considering that the large data gap between normal data and abnormal data will affect the performance of the fault diagnosis algorithm, this paper optimizes the traditional data acquisition method, performs less sampling on normal data, and performs more sampling on abnormal data. The data set constructed is given in Table 2. In order to stabilize the experimental results, when comparing the BP neural network algorithm and the support vector machine algorithm with the proposed algorithm, the three algorithms are executed ten times on the training set and the test

Fault Diagnosis Algorithm for Power Bottom-Guaranteed …

843

Table 2 Training set and test set Data

Training set Normal data

Test set Abnormal data

Normal data

Abnormal data

Data step 1

600

200

180

60

Data step 2

1000

400

260

100

Data step 3

1500

600

380

120

Data step 4

2000

800

500

180

set, and the average of ten results is taken as the final experimental result for each algorithm. The results of the accuracy comparison are shown in Fig. 1. The results of the false alarm rate comparison are shown in Fig. 2. From the experimental results, it can be seen that with the increase of the size of the data set, the accuracy rate and the false alarm rate of the three algorithms are improved. It shows that the operation effect of the three algorithms is related to the scale of the data volume. The larger the data volume, the better the execution of the Fig. 1 Comparison of the accuracy of the three algorithms

Fig. 2 Comparison of false alarm rates of the three algorithms

844

Z. Shi et al.

program. From the performance analysis of the three algorithms, the performance index of the proposed algorithm is better than the other two algorithms in both accuracy and false alarm rate. The performance index of BP neural network algorithm is better than support vector machine algorithm in both accuracy and false alarm rate. It shows that the proposed algorithm in this paper improves the performance of existing fault diagnosis algorithms.

6 Conclusion The increase of the scale of power bottom-guaranteed communication network has led to an increase in the number of fault points. The fault diagnosis of power bottomguaranteed communication network is of great significance for the stable operation of power bottom-guaranteed communication network. In order to solve the problem of low diagnostic performance of fault diagnosis algorithm, this paper applies the random forest algorithm with higher execution efficiency and better anti-noise ability to the fault diagnosis of power bottom-guaranteed communication network, and proposes a fault diagnosis algorithm of power bottom-guaranteed communication network based on random forest. By comparing with the existing algorithms, it is verified that the proposed algorithm improves the performance of the fault diagnosis algorithm of power bottom-guaranteed communication network. In the next step, the algorithm proposed in this paper will be optimized and implemented by MapReduce programming method, and then, the algorithm will be applied to the Hadoop architecture power bottom-guaranteed communication network fault management system to improve the time efficiency of the fault diagnosis algorithm. Acknowledgements This work is supported by the Project on Research and Demonstration of Application Technology of Intelligent Management and Dynamic Simulation Based on Bottom-guaranteed Power Grid Communication System, Under Grant No. GDKJXM20180249 (036000KK52180006).

References 1. Lin, Y.F., Zhong, J., Wu, F.L.: Discussion on smart grid supporting technologies. Power Syst. Technol. 33(12), 8–14 (2009) 2. Chen, L.: Research on Key Technologies of Network Fault Diagnosis. National University of Defense Technology (2005) 3. Way, K., Xiao, Z.: Relations and generalizations of importance measures in reliability. IEEE Trans. Reliab. 61(3), 659–674 (2012) 4. Zhang, X.J., Tan, J.B., Han, J.H.: Method of fault diagnosis based on bp neural network. Syst. Eng. Theory Pract. 22(6), 61–66 (2002) 5. Tan, Y.H., He, Y.G., Chen, H.Y., et al.: Neural network method for fault diagnosis of large-scale analogue circuits. J. Circuits Syst. 6(4), 25–28 (2001)

Fault Diagnosis Algorithm for Power Bottom-Guaranteed …

845

6. Zhang, S.L., Liu, J., Yan, L.C., Wang, Y., Zhang, N., et al.: Failure diagnosis and intelligent reconstruction method based on deep learning in electric backbone communication networks. Comput. Eng. Softw. 3, 194–198 (2018) 7. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001) 8. Huang, Y., Zha, W.X.: Comparison on classification performance between random forests and support vector machine. Software 33(6), 107–110 (2012) 9. Quinlan, J.R.: Induction of decision trees. Mach. Learn. 1(1), 81–106 (1986)

Design of a Real-Time Transmission System for TV- and Radar-Integrated Videos Yingdong Chu

Abstract For the transmission and record playback applications of large data volume TV and radar videos on ships, the system architecture, and universal video processing units of the video transmission system are designed. Videos are sliced for compression and pipeline transmission synchronously to reduce the transfer delay. Based on the multi-core DSP parallel processing, the TV and radar videos are compressed by improved H.264 and JPEG algorithm, respectively. The measured typical TV video equivalent transmission delay is 15.6 ms, and the typical radar video equivalent transmission delay is less than 17.88 ms. Keywords Real-time video transmission · Video compression · H.264 · JPEG

1 Introduction In ship application, the video transmission system (VTS) transmits various sensor videos to the ship control system. The videos include navigation radar video, search radar video, tracking radar video, photoelectric TV video, local surveillance video, etc. With the continuous development of radar technology, three-coordinate radar and multi-beam radar are widely used, the data volume of radar video is exploded, and the physical interface of VTS is also upgraded from the original coaxial cable to digital video interface. Fiber–optic interfaces based on FC-AV/ADBV protocols have been widely used in aviation systems [1, 2]. It has become a new trend to use fiber interfaces for large data volume video transmission in marine VTS, and videos can be processed centrally instead of original distributed VTS system. The application of new technologies promotes new design requirements for ship-integrated VTS.

Y. Chu (B) Jiangsu Automation Research Institute, 222000 Lianyungang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_82

847

848

Y. Chu

2 TV, Radar Video Transmission System The system block diagram of VTS is shown in Fig. 1. The videos of three-coordinate RADAR-1 and multi-beam RADAR-2 are transferred to the fiber processing unit by Aurora and FC-AE fiber protocols separately. The FC-3 module transfers the four CVBS/HDSDI videos of TV sensors by Rocket IO fiber protocol. Such design makes full use of the high reliability, high bandwidth, anti-electromagnetic interference, and low-delay characteristics of fiber communication. The data exchange unit of the VTS can adopt a fiber-based data exchange design or an Ethernet data exchange technology. Because only FC-AE protocol supports data exchange in the system [3], it is hard to develop special fiber witching matrices for different fiber protocols [4]. The ship recording and playback system need to store compressed video data, and Thr-Coordinate RADAR-1

Multi-Beam RADAR-2

TV-1

TV-2

TV-3 TV-4

RADAR-3

FC-4 CVBS/HDSDI TO FIBER

FIBER

FIBER FC-AE

Aurora

FIBER RocketIO

Fiber Processing Unit 2

2

ETHERNET 4 VP-9

VP-8

VP-7

VP-6

VP-5

FC-3

VP-4

VP-3

FC-2

VP-2

VP-1

FC-1

POWER

ETHERNET SWITCH

ETHERNET

USER-1

ETHERNET

USER-2

Fig. 1 Video transmission system framework

ETHERNET

USER-3

ETHERNET

USER-4

Design of a Real-Time Transmission System …

849

in this case, video compression becomes a necessary process. So, Ethernet switch is adopted for video data switching instead of fiber matrices, and the RADAR-3 videos are transferred to switch over Ethernet. The FC-1 to FC-3 modules accomplish the data reception and data distribution tasks of corresponding sensor, the VP-1, VP-2 modules compress the RADAR-1 videos, the VP-3, VP-4 modules compress the RADAR-2 videos, the VP-5 to VP-8 modules compress the 4 CVBS/HDSDI videos, and the VP-9 module compresses the RADAR-3 videos. All the compressed videos are transferred to Switch over Ethernet.

3 Universal Hardware Processing Design In order to simplify the system complexity and improve the system reliability, the universal module design method is adopted. The FC-1 to FC-4 modules have the same hardware design, and the VP-1 to VP-9 modules also adopt the same hardware design. Figure 2 shows the schematic framework design of FC-1 to FC-4 modules. The fiber communication of different protocols can be realized by the unified FPGA plus optical module framework. Different IP cores are called according to different fiber communication protocols, the Aurora, Rocket IO, and FC-AE IP cores are used in this case. The choice of single-mode and multi-mode optical module depends on the type of fiber used in the actual application. The video data are distributed using the 4-way Rocket IO high-speed serial interfaces, and the TV videos are sampled by controlling TVP5150 and TVP5154 video decoders with FPGA. Figure 3 shows the schematic framework of VP-1 to VP-9 video processing units. The same hardware architecture is used. The FPGA receives and preprocesses the videos of Rocket IO protocol distributed by the FC-1 to FC-3 modules, and the 4-way Serial Rapid IO (SRIO) channels transfer video data from FPGA to TMS320C6678 DSP for video compression and network transmission.

Fig. 2 Fiber channel module framework

850

Y. Chu

Fig. 3 Video processing module framework

4 TV Video Compression Algorithm The H.264 algorithm is used for TV video compression. The compression level of H.264 algorithm is divided into four types: BP, EP, MP, and HP [5]. The BP level only supports I/P frames and CAVLC coding. Not using B-frames eliminates the need to buffer subsequent frames, so BP level H.264 algorithm is more suitable for real-time video compression processing. A way to significantly reduce the video transmission delay is to compress and transmit videos synchronously in slices. Video can be processed while sampling to form a video processing pipeline, which makes full use of the video acquisition time to complete the video compression, transmission, and decompression tasks. The video processing flow and delay generation mechanism is shown in Fig. 4. The H.264 compression processor uses TI’s TMS320C6678. Its high-speed SRIO interface can perform high-speed serial data transmission with the FPGA processor. Parallel data processing modes for eight C6678 cores include master–slave mode

Fig. 4 Pipeline video processing flow

Design of a Real-Time Transmission System …

851

Table 1 Intra-frame coding time ratio Intra-prediction

(Inverse) Transform

(Inverse) Quantification

Entropy coding

Other

29%

15%

14%

11%

31%

Table 2 Inter-frame coding time ratio

(Inverse) Transform

Entropy coding

Motion estimation

Other

20%

16%

45%

19%

and data flow mode. The characteristic of data flow mode is to decompose tasks and assign them to different cores in a pipeline way. The key to this mode is to decompose tasks equally so as to reduce the waiting time of task cores. The time-consuming ratio of intra- and inter-frame coding flow in H.264 algorithm is shown in Tables 1 and 2 [6] separately. The time ratio is unevenly distributed and cannot be evenly distributed to the 8 cores of the DSP. Therefore, the master–slave mode is used to implement H. 264 algorithm in the design. The data processing flow is shown in Fig. 5. Core0 kernel is responsible for video data receiving and distributing, and Core1–Core7 kernels are responsible for H.264 encoding of individual slice unit. Since the separate C64X kernel cannot guarantee the data compression in the acquisition time of a slice block data, the encoding task of Core1–Core7 kernels is executed in a best effort mode, and Core0 manages Core1– Core7 in real time through inter-core communication. When data of a slice unit are sampled and transmitted to the DSP, the Core0 kernel first queries the available encoding kernel. When a spare kernel unit can be used to compress this slice of data, the Core0 kernel establishes an index table of frame number, slice number, and data processing core number for this video data block and the corresponding core completes video compression. In order to maximize the processing capacity of multiple kernel units, the slice blocks of two adjacent frames can be continuously compressed. The compression task of subsequent frame can begin when the previous frame compression does not finish. A video frame can be divided into slice blocks statically or dynamically. The dynamic partitioning mode requires calculating the computational complexity of all slice blocks in order to avoid the unbalanced distributing among multiple cores [7], Fig. 5 Data processing flow of master–slave mode

852

Y. Chu

but it also increases the computational workload and the complexity of memory data management. The Core0 kernel can allocate data to the idle kernel in time through task scheduling, which improves the overall computational efficiency of the algorithm. Therefore, the static partitioning mode can be adopted, and the saved computing capacity can be used for network sending of slice data. In this mode, each slice block contains fixed consecutive lines of data in a video frame. Taking 720 × 576 resolution video as an example, each slice block contains 36 consecutive lines of video data and a video frame is divided into 18 slice blocks. The number of lines per static slice block can be adjusted according to the video resolution and display effect. If the compressed video data in whole frame have to be synchronized before network transmission, the transmission delay will increase, so video compression and network transmission work should be implemented synchronously. After a slice block data compression, the Core0 kernel adds frame number and slice number information to the compressed data for network transmission. Because of the fixed data format of the RTP protocol, it is not suitable for the transmission of statically sliced H.264 data. The UDP protocol is used to directly transmit the compressed video. Taking PAL video with 720 × 576 resolution and 18 slices dividing as an example, the TV video transmission delay is tested as model in Fig. 6. The trigger signal1 is generated when a new frame is to be sampled, then data are transmitted through network, when the last slice of the video frame is decompressed, the trigger signal2 is generated. The oscilloscope is used to test the time difference between the two trigger signals for 30 times, and the average video transmission delay is 55.6 ms. Removing the 40 ms video acquisition time, the equivalent video transmission delay of is 15.6 ms. It can be compared with the transmission delay of universal VTS adopting whole frame H.264 compression: the delay of system based on DM8168DSP is more than 100 ms, and that based on FPGA parallel processing is between 30 and 50 ms.

Fig. 6 Test model of TV and radar video transmission delay

Design of a Real-Time Transmission System …

853

5 Radar Video Compression Algorithm Radar video is less standardized than TV video, and its resolution depends on radar trigger frequency, range resolution, rotation speed, and other factors. Different working modes of the same radar will use different working parameters, resulting in unfixed radar video resolution. Therefore, the inter-frame H.264 algorithm is not fit for radar video compression, and the intra-frame JPEG algorithm is more suitable [8]. The JPEG algorithm is based on discrete cosine transform and Huffman coding. It is simple to implement and has high compression speed based on the same hardware. To reduce the radar video transmission delay, the processing method of radar video is consistent with that of TV video. One radar frame is divided into several slices, the slice data are compressed while sampling and the compressed video data are transmitted synchronously. The basic macro-unit supported by JPEG algorithm is 8 × 8. Therefore, when the radar video is sliced, the video captured by eight consecutive triggers is compressed as a slice unit. Before the video compression, the video data of the 8 triggers needs to be complemented by 0 to ensure that the length of the 8 triggers video is consistent and the length is a multiple of 8. As shown in Fig. 4, the test signal1 is generated when the slice N radar video is to be sampled, then the data are transmitted through network, and when the slice N radar video is decompressed, the test signal2 is generated. The oscilloscope and radar simulator are used to test the radar trigger cycle and the time difference between the two test signals. Under different trigger cycles, the test data are shown in Table 3. The pipeline processing of radar video makes the processing delay of the whole frame equivalent to that of a single slice data. It can be seen from Table 3 that the equivalent delay of the VTS is directly northward with the amount of data captured by a single trigger. The equivalent transmission delay is 17.88 ms under 1640 us trigger period. For comparison, supposing 4000 triggers of 1640 us in one radar frame, the display delay adopting whole frame JPEG compression will be more than 6.56 s, which is an unacceptable parameter in most VTS. Table 3 Radar delay under different trigger cycles Trigger period (us)

Test delay (ms)

205

4

410 820 1640

31

Acquisition time per slice (ms)

Equivalent transmission delay (ms)

1.64

2.36

8.4

3.28

5.12

15.6

6.56

9.04

13.12

17.88

854

Y. Chu

6 Conclusion This paper designs a low-delay transmission system for TV- , radar-integrated videos on ships. The system transmits sensor videos by fiber and Ethernet, and video data are distributed through the video compression and network switching technology. The TV and radar videos are statically sliced for the pipeline processing, which makes full use of the video acquisition time to complete the video compression task. The equivalent transmission delay is reduced. Using the master–slave mode and the best effort parallel compression method, the C6678 DSP efficiently compresses the realtime videos. The TV videos are compressed adopting the BP level H.264 algorithm, and the radar videos are compressed using the JPEG algorithm. The measured results show that the transmission system has a low video transmission delay.

References 1. Yang, J.X., Peng, H.J., Jin, S.J.: Research on digital video bus in integrated navigation and electric system. Aeronaut. Comput. Tech. 44(3), 109–112 (2014) 2. Wang, S.K., Deng, F.J., Jiao, L.: Research and design of FC network node device in aircraft suspension system. Aeronaut. Sci. Technol. 28(2), 59–63 (2017) 3. Wu, C.G.: Design and Implementation of Simulation Test system based on FC-AE-ASM Protocol. Comput. Measur. Control 26(4), 35–38 (2018) 4. Wang, J.L., Zhang, Z.F., Chen, Z.: Design of aviation digital video switching matrix. Avionics Technol. 48(3), 41–45 (2017) 5. Song, Y., Zhang, X.Y.: Parallel acceleration research of H.264 coding based on multi-core chip. Comput. Era (4), 1–4 (2011) 6. Li, F., Qing, L.B., Teng, Q.Z.: Design and implementation of H.264 HD video encoder. Microcomput. Appl. 34(6), 42–44 (2015) 7. Li, S.J., Liao, S., Li, Q.: Parallel implementation of H264 video compression coding based on multi-core DSP. Electron. Des. Eng. 25(4), 126–129 (2017) 8. Peng, Y.Z., Huo, J.D., Xu, W.: An algorithm for JPEG encoding parallel implementation based on TMS320C6678. Command Control Simul. 34(1), 119–122 (2012)

Research on Automated Penetration Testing Framework for Power Web System Integrating Property Information and Expert Experience Zesheng Xi, Jie Cui and Bo Zhang

Abstract Faced with the heterogeneous, intelligent and interconnected massive power Web system environment, it is difficult to meet the needs of existing and incremental services in efficiency by mining and verifying vulnerabilities manually. Therefore, an automated penetration testing framework for power Web system is proposed. Integrating property information and expert experience, the framework guides vulnerability mining path and vulnerability exploiting method selection, and realizing automatic vulnerability verification and exploitation of Web system through autonomous decision module. The experimental results show that the framework can simulate real attack behavior and efficiently verify and exploit common Web system vulnerabilities. Keywords Vulnerability exploitation · Autonomous decision · Property information · Expert experience

1 Status Analysis With the promotion of the energy Internet strategy and the extensive application of advanced information communication technology and Internet + in the power grid, the power system has gradually broken the previous closeness and specificity. The construction and deployment of open, interactive, and widely interconnected power Web service system are becoming more and more extensive. Congenital vulnerabilities of power Web service system make it possible for network security risks to transmit to power system. More and more attention has been paid to the research on the back door and vulnerability of power business system at home and abroad. The Z. Xi (B) · B. Zhang Institute of Information and Communication, Global Energy Interconnection Research Institute, Nanjing, Jiangsu, China e-mail: [email protected] State Grid Key Laboratory of Information & Network Security, Nanjing, Jiangsu, China J. Cui State Grid Tianjin Electric Power Research Institute, Tianjin, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_83

855

856

Z. Xi et al.

security vulnerability information and attack codes of some power business system products are disseminated on the Internet. As a result, the threshold of network security attacks on power business system is gradually lowered, and the network security of power information system is gradually reduced. The situation is getting worse and worse.

2 Relevant Research 2.1 Research on Vulnerability Mining Domestic research on vulnerability mining technology started relatively late. Since the 11th Five-Year Plan in China, domestic researchers have gradually attached importance to vulnerability mining technology research and invested a lot of resources. Domestic universities, research institutions, and enterprises actively carry out research on vulnerability mining technology [1, 2]. The research results have been applied to the Internet, mobile terminals, industrial control networks, and other fields. Internationally, Yamaguchi and Rieck of the Institute of Systems Safety, Brenwick University of Technology, Germany, are in the forefront of the world in summarizing and exploiting artificial vulnerability mining formulas to discover new vulnerabilities [3–5]. From 2014 to 2016, Yamaguchi summarized the general vulnerability model based on stain propagation. He created the expression of code property graph based on the abstract grammar tree, program control flow graph and program dependency graph. By combined with machine learning technology, he found a large number of security vulnerabilities of similar patterns in many open source software [6, 7].

2.2 Web System Automated Penetration Testing Domestic security vendors such as NSFOCUS, 360, and Venustech first realized the security of Web applications and designed and developed their own Web application security products [8]. Major theoretical researchers are the University of Chinese Academy of Sciences, Wang Cong, and others who proposed the design and implementation of penetration testing platform based on Metasploit framework [9]; National Defense University of Science and Technology, Zhao Wenzhe proposed a technology to realize a comprehensive experimental platform for network penetration testing [10], and so on. At present, there are two organizations that study the security of Web applications in the world. They are Open Web Application Security Project (OWASP) and Web Application Security Consortium (WASC). They can help enterprises improve the

Research on Automated Penetration Testing Framework …

857

security awareness of Web applications and are the vane of the field of Web application security. In terms of penetration testing methodology, in order to meet the needs of safety assessment, safety researchers have developed the following four well-known methodologies: NIST SP800-115 (Technical Guide Information Security Testing), Information Systems Security Assessment Framework (ISSAF), the Open Source Security Testing Methodology Manual (OSSTMM), the Penetration Testing Execution Standard (PTES).

3 Design of Framework 3.1 Overall Framework The framework of Web System Automated Penetration Testing designed in this paper integrates modules such as property–vulnerability experience knowledge, information gathering, scanning detection, autonomous decision, and automated vulnerability verification and exploitation, as shown in Fig. 1. In Property–Vulnerability Experience Knowledge: It includes property category, property signature, vulnerability category and exploitation method. The main attributes of the property category are Web applications, servers, IDS, IPS, and so on. The property signature is used to distinguish different property individuals of the same type, such as the CMS version used by the Web site, the plug-in type used,

Property-Vulnerability Experience Knowledge

Information Gathering

Autonomous Decision

Vulnerability Exploitation Method

Automated Vulnerability Verification & Exploitation

Fig. 1 Overall framework of Web System Automated Penetration Testing

Scanning Detection

858

Z. Xi et al.

the type and version number of the server operating system, and patch information. The vulnerabilities are classified from three aspects: attack life cycle, threat type, and property type of power information network Web system. Exploitation method includes injection, exception requests, file inclusion, code execution, session hijacking, etc. In Information Gathering: It mainly includes the functions of WHOIS information acquisition, target Web site secondary domain name acquisition, mailbox address acquisition, user name explosion, password information collection and so on, as the preparatory stage of penetration testing. In Scanning Detection: It mainly includes Web signature identification, port scanning identification, Web path scanning, Web service scanning, database detection, sensitive path scanning, and other functions, as the first stage of penetration test execution. In Autonomous Decision: It is responsible for collecting and scanning the target information acquired by the detection, giving the appropriate penetration test path and selecting the corresponding penetration test method based on the knowledge base, such as setting the appropriate number of threads to prevent the impact on the system business, avoiding the use of denial of service, buffer overflow and other attacks, and prohibiting vulnerability testing. In the process of certification, the original configuration of the system is changed, such as changing account password, creating new users, and deleting users. In Automated Vulnerability Verification and Exploitation: It is responsible for the guidance given by the autonomous decision module, the automatic invocation of penetration test scripts and auxiliary function scripts, to achieve full-automatic vulnerability utilization and verification.

3.2 Property Information Fusion In this paper, the method of knowledge graph is used to realize the integration of property information. In essence, knowledge graph is a kind of semantic network. In the large data environment, the expansion of Web resources and the explosion of information have brought new challenges and opportunities to knowledge mapping. The semantic knowledge network is formed by integrating useful resources and processing them in the complex data environment, sorting out the relevance of resources. In order to make the fused property information available for subsequent penetration testing, we first need to construct a network security knowledge map including five dimensions: basic dimension, vulnerability dimension, threat dimension and alert event dimension and attack rule dimension. Specifically, it includes (1) collecting knowledge information from five dimensions, including CVE vulnerability knowledge, CAPEC attack classification knowledge, CWE host software knowledge, Snort alarm event knowledge, and expert knowledge of attack rules. (2) Extracting

Research on Automated Penetration Testing Framework …

859

Knowledge Graph of Network Security

Property

Vulnerability

Attack

Server

Application

Control Level

DDOS

Control Level

Example

Example

Example

Example

Example

Fig. 2 Framework of knowledge graph of network security

entity attribute information by writing XML processing program and regular expression. (3) Using graph database Neo4j as knowledge graph building tool. (4) The above knowledge information is inserted into the knowledge map by writing Cypher statements. The framework of knowledge graph of network security is shown as in Fig. 2.

3.3 Autonomous Decision Integrating Expert Experience In order to realize the automation and high efficiency of penetration testing of Web system, this paper studies the automatic exploitation of hidden dangers based on expert experience system. The construction of expert experience system is helpful to improve work efficiency and accuracy of vulnerability identification. This requires converting expert experience into rules for system identification. It is also an important component of autonomous decision module in the framework of automatic penetration test of power Web system that integrates property information and expert experience. In addition, expert experience also enables systems to learn association and transfer learning. For example, after detecting the presence of a login box on a Web page, penetration testing experts will first test whether there is post-type SQL injection, verify whether the system exposes additional error information, such as prompting “username does not exist” and “password error,” and then conduct targeted violent cracking to see if there is a weak password. In addition, if the Web application has the function of retrieving password, it will test whether there is any user password reset vulnerability. The systematization of expert experience requires sorting out the expert experience in penetration testing under different scenarios, classifying and summarizing

860

Z. Xi et al.

it, constructing expert knowledge base according to the different types of vulnerabilities, and then constructing a behavior rule base based on conditional selection statements. An autonomous decision-making module is designed and implemented to deal with the path selection problem and various emergencies in the penetration testing process. The architecture diagram of autonomous decision module is shown in Fig. 3. The input received by the decision-making module is the result of the operation and feedback in the current penetration test. For example, the database type may be leaked in the error information during the execution of the SQL injection test. When the operation and the return information are input, the decision-making system first searches the expert knowledge base and then carries out the results and the information returned by the penetration test: matching, extracting keywords, searching for corresponding strategies in the behavior rule base, deciding the next operation, and outputting the results to the penetration attack module. The module also needs to select the best attack path to output to the penetration attack module according to the attack feedback results, using a certain optimization algorithm, such as ant colony optimization algorithm, to realize the intellectualization of the system work. For example, after the system initiates a test request for the target, if the target does not respond to the expected response of the system within an effective time, the autonomous decision-making system will decide not to wait any longer and choose the next attack path. Fig. 3 Architecture diagram of autonomous decision module

Input

Expertise Database

Decision Making

Output

Behavior Rule

Research on Automated Penetration Testing Framework …

861

4 Implementation of Framework 4.1 Major Function In order to verify the effectiveness of the above framework, we built an automated penetration test platform for power Web system, which fused with property information and expert experience. The platform has the ability of information collection, scanning, and exploiting vulnerabilities, including executive module, auxiliary module, decision module, and support module (Fig. 4). In Frame of Vulnerability Exploitation, we integrated more than 1500 exploitation script. It is mainly divided into OWASP conventional vulnerabilities and general component vulnerabilities. In OWASP conventional vulnerabilities, it includes (1) Failure Authentication, (2) Sensitive Data Leakage, (3) Injection, (4) Inappropriate Security Configuration, (5) External Entity Exploitation of XML, (6) Access Control Failure. In general, component vulnerabilities include (1) Middleware, (2) Scripting language, (3) Operating System, (4) Deserialization.

4.2 Major Process Interpreter: Interpreter is a markup language developed for data structure peculiar to penetration expert experience. It has the characteristics of fast reading, simple structure, easy transplantation, and high retrieval efficiency. The main function of the interpreter is to parse the expert experience of the existing DPL format, initialize the experience tree and decision automata according to the experience content (Fig. 5).

Implementation Framework

Frame of Information Gathering WHOIS Information

Implementation Module

Frame of Vulnerability Exploitation

Port Detection

Language Script

Form Frame

CMS Vulnerability

Upload Vulnerability Arbitrary File Download Subsystem Connection

Domain Information

Web Feature Detection

Password Information

Web Path Detection

Middleware

Mail Information

Crawler Detection

Management Entry Vulnerability

Auxiliary Module

Coding & Decoding ToolKit

Decision Module

Attack Path Planning

Support Module

Frame of Scanning Detection

MD5 Investigate

Expert Experience Analysis Engine

Remote Control

Decision Tree Judgement

Data Process Engine

Database Detection Path Traversal Comprehensive Password Cracking

Webshell Management Decision Verification

Property & Vulnerability Database

Fig. 4 Architecture diagram of major function in automated penetration test platform

862

Z. Xi et al. Expertise Database

Target

Interpreter

Attack Experience Instantiated

Attack Path Planning

State Judgement

Result

Existing State Update Exploitation Method Matching

Temporary Result Bank

Exploitation Execution

Sandbox Environment

Exploitation Script Instantiated

Exploitation Method Database

Long-term Result Bank

Fig. 5 Main flowchart of automated penetration test platform

Attack Path Planning: Attack path planning is based on the content of experience tree and known information to plan the next attack path and find the most likely attack path to hit the vulnerable point of the target system in the current state. State Judgement: The state judge maintains the intermediate information of the current infiltration process, determines the state of the infiltration process, and decides whether to call the relevant attack instances according to the conditions of the infiltration steps in the experience tree. Sandbox Environment: Sandbox environment is the basis of attack instances. It can ensure that the access to the same local resource does not affect each other between two attack instances, and that the robustness of the whole system is guaranteed when some instances are executed abnormally. Results Bank: Results bank is divided into temporary results bank and long-term results bank. Temporary result bank stores only intermediate results of a single target penetration process, such as URLs, sensitive files, injection points, and shell addresses. The long-term result bank stores the intermediate result of any target, such as the common weak password obtained by blasting, the path obtained by blasting, the learning result of verification code recognition, etc., in order to gradually improve the penetration efficiency.

5 Experimental Results and Analysis To verify the effectiveness of the automated penetration testing framework, we simulated the real Web penetration environment and built a target machine environment with 10 groups of vulnerabilities. Each group of vulnerabilities is located on the Web host and Server host, respectively. An attacker needs to first exploit the vulnerabilities on the Web host, then connect to the Server host as a springboard, and finally exploit

Research on Automated Penetration Testing Framework …

863

the vulnerabilities on the Server host. Vulnerabilities and environment configuration information are shown in Table 1. Without specifying the types of the above 10 vulnerabilities in advance, the automated penetration testing framework has successfully exploited the vulnerabilities on all 10 Web hosts and 8 Server hosts. The time-consuming vulnerability exploitations are shown in Fig. 6. From the figure, we can see that the automated penetration testing framework can quickly exploit the Web system vulnerabilities. By comparing the time-consuming results of each step, we find that the scanning detection part takes the most time and can be used as the next optimization goal. Analyzing on the unused vulnerabilities of Server host, we found that the unreasonable parameter setting results in the failure of exploiting scripts when matching vulnerabilities. To solve this problem, the next step is to introduce a more flexible method of vulnerability exploiting script parameters setting by using artificial intelligence algorithm (such as A3C algorithm).

Table 1 Target machine environment with 10 groups of vulnerabilities No.

Target

Vulnerability

Service

1

Web

Wordpress weak password

wordpress5.0.3

Server

PhpMyadmin Vulnerability-Free File Writing

phpmyadmin

Web

Wordpress weak password

wordpress5.0.3

Server

MySQL weak password

mysql:5.7

Web

File Inclusion Vulnerabilities

wordpress5.0.3;

Server

Tomcat weak password

tomcat:tomcat

Web

File upload

wordpress4.5.3

Server

SSHKey file read

ssh key connection

Web

Git file leakage

wordpress5.1

Server

Phpmyadmin File Inclusion Vulnerabilities

phpmyadmin 4.8.1

2

3

4

5

No. 6

7

8

9

10

Target

Vulnerability

Service

Web

SVN leakage

wordpress5.1

Server

SambaCry RCE

samba4.3.8

Web

WordPress Plug-in Product Catalog 8 1.2.0-SQL injection

wordpress5.1

Server

Jboss deserialization

JBoss AS:4.0.5

Web

WordPress 4.5.1 rce

wordpress4.5.1

Server

PHP-FPM unauthorized access

fastcgi&&php-fpm

Web

wordpress SQL injection

wordpress4.5

Server

Exim rce

exim-4.89

Web

Command injection

wordpress5.0.3

Server

Shellshock

bash4.3

Environment: Linux 4.4.0-131-generic #157-Ubuntu SMP x86_64 GNU/Linux

864

Z. Xi et al.

Vulnerability Exploitation Time-consuming(Web) 500 400 300 200 100 0

web 1

web 2

web 3

web 4

Information Gathering

web 5

web 6

web 7

Scanning Detection

web 8

web 9

web 10

Exploitation

Vulnerability Exploitation Time-consuming(Server) 300 250 200 150 100 50 0

Server Server Server Server Server Server Server Server Server Server 1 2 3 4 5 6 7 8 9 10 Information Gathering

Scanning Detection

Exploitation

Fig. 6 Graph of vulnerability exploitation time-consuming in second

Acknowledgements This work was supported by the science and technology project of State Grid Corporation of China: “Research on Intelligent Detection and Verification Technology of Security Hidden Dangers in Power Information Network” (Contract Number: SGTJDK00DWJS1900105).

References 1. Jiang, J., Chen, X., Chen, L.: A vulnerability scanning framework based on monitoring agents for IaaS Platforms. J. Sichuan Univ. 46, 116–121 (2014) 2. Chen, T., Xiaoqi, L., Xiapu, L., et al.: System-level attacks against android by exploiting asynchronous programming. Softw. Qual. J. 26, 1037–1062 (2018). https://doi.org/10.1007/ s11219-017-9374-6 3. Gascon, H., Yamaguchi, F., Arp, D., et al.: Structural detection of android malware using embedded call graphs. In: Proceedings of the 2013 ACM Workshop on Artificial Intelligence and Security, pp. 45–54. ACM, New York (2013) 4. Shastry, B., Leutner, M., Fiebig, T., et al.: Static program analysis as a fuzzing aid. In: Research in Attacks, Intrusions, and Defenses, pp. 26–47. Springer, Cham (2017) 5. Wressnegger, C., Freeman, K., Yamaguchi, F., et al.: Automatically inferring malware signatures for anti-virus assisted attacks. In: Proceeding of the 2017 ACM on Asia Conference on Computer and Communications Security, pp. 587–598. ACM, New York (2017)

Research on Automated Penetration Testing Framework …

865

6. Yamaguchi, F., Golde, N., Arp, D., et al.: Modeling and discovering vulnerabilities with code property graphs. In: Proceeding of the 2014 IEEE Symposium on Security and Privacy, pp. 590– 604. IEEE, Piscataway (2014) 7. Yamaguchi, F., Maier, A., Gascon, H., et al.: Automatic inference of search patterns for taintstyle vulnerabilities. In: Proceeding of the 2015 IEEE Symposium on Security and Privacy, pp. 797–812. IEEE, Piscataway (2015) 8. Qi, S.: Research on Web Script Attack and Preventive Detection. Shanghai Jiao Tong University (2010) 9. Zhengqiang, X.: Research on Network Information Security Penetration Test Platform. Guangdong University of Technology (2009) 10. Wenzhe, Z.: Research and Implementation of Comprehensive Experimental Platform for Network Penetration Testing. National University of Defense Science and Technology (2014)

VNF Deployment Method Based on Multipath Transmission Zhan Shi, Ying Zeng, and Zanhong Wu

Abstract For the service chain mapping problem in the context of softwaredefined network and network function virtualization, the existing single-path mapping method is difficult to minimize the mapping cost and maintain load balancing. In this paper, a multi-objective optimization model of service chain mapping is established with the goal of minimizing delay and load balancing. Aiming at the solution of the optimization model, this paper proposes a service chain mapping and multipath transmission method based on particle swarm optimization. Simulation results show that compared with the two single-path mapping algorithms, the algorithm can improve the request acceptance rate while maintaining load balancing and reducing delay. Keywords Service chain · Load balancing · Delay

1 Introduction Software-defined network and network function virtualization (NFV) realize the sharing of the underlying physical network infrastructure and hardware and software decoupling. Multiple service chains can be deployed simultaneously on the general hardware of the underlying network to provide diverse service. In the service chain deployment mode, there are two directions: deploying in an optimal location in a single-path manner; or decentralizing service traffic through multipathing to reduce forwarding costs and better maintain load balancing. In this paper, the service chain mapping is realized by multipath, and the delay and load balancing are minimized. The multi-objective optimization model of service chain mapping is established. In order to efficiently determine the optimal number of paths and avoid excessive path which will increase the burden on the server, this paper uses the particle swarm algorithm to deploy on a path-by-path basis and limits the maximum number of paths. Z. Shi (B) · Y. Zeng · Z. Wu Guangdong Power Grid Co., Ltd., Electric Power Dispatch & Control Center, Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_84

867

868

Z. Shi et al.

2 Related Works Authors in [1] designed an optimization algorithm based on the resource constraints of the underlying physical network, but did not consider the delay caused by the extension of the service chain. Based on the size of the underlying physical network and the use of server resources, authors in [2] jointly optimize the service chain mapping, but it is also difficult to solve the problem of maintaining limited load balancing. In the study of VNF replicable mapping algorithms, authors in [3] used integer linear programming to determine the number of VNF instances and mapping schemes, through reasonable VNF replication to maintain load balancing or minimize network resource consumption. In reference [4], the joint optimization problem of traffic routing and VNF placement are studied and modeled as an integer linear programming problem. The above schemes are all single optimization schemes, which are difficult to guarantee the quality of service. In [5], the service delay is taken as the optimization objective, and a heuristic time slot decoupling algorithm is designed. Literature [6] and literature [7] take the dynamic deployment of VNF as the optimization goal, and design heuristic algorithms based on fluctuation goal and service delay, respectively. Authors in [8] take user experience as the optimization goal and discuss the horizontal and vertical expansion strategies of VNF after considering the limited cloud resources, throughput and service delay.

3 System Models and Constraints 3.1 Multi-objective Optimization Model s This paper uses three binary variables xni , f iuv j and R p to represent the corresponding VNF instance, the virtual link and the corresponding relationship between the service chain and the underlying physical network. This paper designs two factors for reacting to the underlying physical network load, including server load factor θn and link load factor θi j .

θn = α1 /1 − ρn ρn =

 s∈S i∈Fs

   γ1 · xni · CPUi volcpu γ2 · xni · MEMi volmem n /+ n

(1) (2)

s∈S i∈Fs

α1 is a parameter for adjusting the limit value of θn , and ρn is the server utilization rate of node n. θi j = α2 /1 − ρij

(3)

VNF Deployment Method Based on Multipath Transmission

869

α2 is a parameter for adjusting the limit value of θi j , and ρi j is the link utilization rate of link li j . ρi j =

 

 bw f iuv j · BWuv voli j

(4)

s∈S u,v∈Fs

Cost Model. The mapping cost model constructed in this paper is as follows: COST(s) =



xni · c1 · θn +

s∈S i∈Fs n∈N

  

  c2 · f iuv j · γ3 · θi j + γ4 · di j

s∈S u,v∈Fs i, j∈N

(5) Delay constraint. In the service chain mapping process, the end-to-end delay consists of node processing delay and link transmission delay. 

xni · di +

i∈ f n∈N

 

f iuv j di j ≤ d f

(6)

u,v∈ f i, j∈N

Underlying network constraints. bw C2 : f iuv j · BWi j ≤ voluv , ∀i, j ∈ F, ∀u, v ∈ N

(7)

As shown in Eq. (7), the service chain can only be deployed when the underlying physical link meets the bandwidth requirements of the virtual service chain.

C3 :

  u,v∈F i, j∈N

uv f iuv j − f ji

⎧ ⎨ 1, xiu = 1 = −1, xiv = 1 ⎩ 0, else

(8)

As shown in Eq. (8), according to the law of conservation of flow, the sum of the inflow and outflow flows of the other nodes is 0 except for the source node and the destination node. C4 : R sp1 + R sp2 + 2xiu ≤ 3, ∀s ∈ S, ∀ p1 , p2 ∈ P, ∀u ∈ Fs , ∀i ∈ p1 , p2

(9)

As shown in Eq. (9), in order to process the received data in the order of VNF, the VNF instance cannot be deployed on the shared node between different service paths.

870

Z. Shi et al.

4 Particle Swarm-Based Service Chain Mapping Algorithm 4.1 Particle Swarm Algorithm Fundamentals The particle swarm optimization algorithm solves the individual optimal solution and the group optimal solution by iteratively. The core formula of the particle swarm optimization algorithm is the particle position and velocity formula. The two formulas are as follows: Vi+1 = wVi + c1r1 (X pb − X i ) + c2 r2 (X gb − X i )

(10)

X i+1 = X i + Vi+1

(11)

4.2 Redefinition of PSO Related Parameters and Operations In this paper, the concept of traditional particle swarm optimization is supplemented as follows. Attributes of particles.

The position X i of the particle is represented by an n-tuple, X i = xi1 , xi2 , . . . , x in . The velocity Vi of the particle is represented by an n-tuple, Vi = vi1 , vi2 , . . . , vin . The addition operation is divided into two types: the particle velocity and the particle velocity are added, and the particle velocity is added to the particle position. The improved algorithm uses addition to solve the new mapping scheme and subtraction to solve the difference between different mapping schemes. According to the redefined operation, the basic formula of the particle swarm optimization algorithm for service chain mapping problem is as follows: Vi+1 = c1 Vi + c2 (X pb − X i ) + c3 (X gb − X i )

(12)

X i+1 = X i + Vi+1

(13)

4.3 Algorithm Description A detailed description of the PSO algorithm is shown in Table 1.

VNF Deployment Method Based on Multipath Transmission

871

Table 1 Particle swarm-based service chain mapping algorithm

Algorithm: Service Chain Mapping Initialization: Nodes and link attributes of the underlying physical network

(

Input: Service Chain Request Gs = F , E , R f , Rl

)

Output: Optimal Service Chain Mapping Schem while the system is running do for the mapping cost of the current scheme is smaller than the previous scheme do 3. Replace the optimal mapping scheme 4. for Currently deployed service path δ and βi > β, f i is defined as an identified faulty node. Once all of the identified faulty nodes are found, they can be removed from the fault propagation model, so that the large-scale fault propagation model is divided into multiple independent small fault propagation models. The range of δ and β is between 0 and 1, and the value is related to the size of the network noise. When the network noise increases, the value of δ decreases and the value of β increases, and vice versa.

3.3 Solving the Maximum Likelihood Hypothesis After obtaining a number of small-scale fault propagation models, this paper uses the maximum likelihood hypothesis to solve the optimal fault set of each fault propagation model. The maximum likelihood hypothesis refers to selecting a set with the least faulty nodes that can account for all negative symptoms. Let H ∗ = { f 1 , f 2 , . . . , f j } denote the maximum likelihood hypothesis, and it can be solved with Eq. (3). In Eq. (3), Ab(H, S) represents the ability of the set H with faulty  nodes f 1 , f 2 , . . . , f j to describe the observed negative symptom set S. In Eq. (4), f j ∈H P( f j ) indicates the probability thatall faulty nodes are covered by the faulty nodes f 1 , f 2 , . . . , f j in  set H. si ∈S (1 − f j ∈H (1 − P(si | f j ))) indicates the probability that all negative symptoms in the negative symptom set S are composed of at least one faulty node in set H. Ab(H ∗ ) = arg max Ab(H, S) H

Ab(H, S) =

 f j ∈H

P( f j ) ×

 si ∈S

⎞    ⎝1 − 1 − P(si | f j ) ⎠

(3)



(4)

f j ∈H

In all fault sets H composed of faulty nodes in the fault propagation model, the fault set H ∗ with the largest Ab(H, S) is called the maximum likelihood hypotheses set. By analyzing the long-term operational data of the DNQC, it can be seen that the number of simultaneous faulty nodes on the network is generally small. When two fault sets have the same negative symptom interpretation capability, the fault set with a smaller number of faulty nodes is adopted as the maximum likelihood hypotheses set.

898

K. Xie et al.

4 Performance Analysis 4.1 Performance Indicators In order to verify the performance of the proposed algorithm FDA-D, the algorithm is compared with the traditional fault diagnosis algorithm FDA. The comparative indicators include the accuracy of the fault diagnosis, the false positive rate, and the diagnosis time. The accuracy indicates the ratio between the detected faulty nodes and the number of faulty nodes occurring in the real environment. The false positive rate indicates the ratio between the number of faulty nodes that diagnose the fault wrongly and the total number of faulty nodes detected.

4.2 Experiment Results In the experimental environment, the network topology generation tool BRITE [13] is used to generate the network topology of the DNQC. The number of network device nodes is increased from 100 to 1000, and the step size is set to 100. To simulate network fault information, the LLRD1 model is used to inject faults into the network model [14]. When the fault is injected, 90% of the network nodes are randomly selected as the low-faulty node, and the range of the priori failure probability is (0, 0.3%). Then, 90% nodes are randomly selected as the medium-faulty nodes among the remaining 10% of the network nodes and the priori failure probability of the node belongs to (1, 3%). We use the remaining network nodes as the high-faulty nodes, and the range of the prior failure probability is (5, 10%). To simulate network noise, we set 5% of the symptoms caused by a faulty network node to positive symptom and set 0.5% of the positive symptom to negative symptom randomly. The experimental results are shown in Figs. 2, 3, and 4. It can be seen from Figs. 2 and 3 that the FDA-D algorithm and the FDA algorithm have relatively stable Fig. 2 Comparison of accuracy

Efficient Fault Location Algorithm Based on D-Segmentation …

899

Fig. 3 Comparison of false positive rates

Fig. 4 Comparison of diagnostic time

performance when the network scale is increased, indicating that both algorithms are suitable for fault diagnosis under large-scale network environment. From the performance analysis of the accuracy and false positive rate, the proposed FDA-D algorithm has little difference with FDA. The results show that the D-segmentation of the network has little impact on fault diagnosis performance. The comparison of diagnostic time is shown in Fig. 4. In the small-scale network environment, the diagnostic time of the FDA-D algorithm and the FDA algorithm is similar. However, when the number of network nodes grows to more than 500, the FDA’s diagnostic time increases faster, and the FDA-D’s diagnostic time increases slowly. Obviously, the proposed FDA-D algorithm is suitable for solving large-scale network fault location problems.

5 Summary The number of devices and DNQC link data are gradually increasing, resulting in longer time in fault location. In order to solve this problem, the paper performs

900

K. Xie et al.

Bayesian modeling on the DNQC. The fault propagation model is segmented based on the D-segmentation theory. Moreover, the fault set is inferred by the maximum likelihood hypothesis. Experiments show that the proposed algorithm effectively improves the efficiency of fault diagnosis. Acknowledgements This work is supported by science and technology project of State Grid Corporation headquarters (research on the key technology of quantum secure communication practicalization).

References 1. Lin, Y.F., Zhong, J., Wu, F.L.: Discussion on smart grid technology system. Power Syst. Technol. 33(12), 8–14 (2009) 2. Way, K., Xiao, Z.: Relations and generalizations of importance measures in reliability. IEEE Trans. Reliab. 61(3), 659–674 (2012) 3. Kandula, S., Katabi, D., Vasseur, J.P.: Shrink: a tool for failure diagnosis in IP networks. In: Proceedings of the 2005 ACM SIGCOMM Workshop on Mining Network Data, pp. 173–178. ACM, New York, NY, USA (2005) 4. Zhang, S., Qiu, X.S., Meng, L.M.: Service fault diagnosis algorithm in network virtualization environment. J. Softw. 23(10), 2772–2782 (2012) 5. Dong, H.J.: Research and Implementation of IP Network Fault Location Algorithm Based on Bayesian Network. Beijing University of Posts and Telecommunications (2009) 6. Narasimha, R., Dihidar, S., Ji, C., et al.: Scalable fault diagnosis in IP networks using graphical models: a variational inference approach. In: IEEE International Conference on Communications 2007, pp. 147–152. IEEE, USA (2007) 7. Steinder, M., Sethi, A.S.: Probabilistic fault diagnosis in communication systems through incremental hypothesis updating. Comput. Netw. 45, 537–562 (2004) 8. Tan, Y.H., He, Y.G., Chen, H.Y., et al.: Neural network method for large scale circuit fault diagnosis. J. Circuits Syst. 6(4), 25–28 (2001) 9. Kompella, R.R., Yates, J., Greenberg, A., et al.: Detection and localization of network black holes. In: IEEE INFOCOM 2007—26th IEEE International Conference on Computer Communications, pp. 2180–2188. IEEE, USA (2007) 10. Chen, L.: Research on Key Technologies of Network Fault Diagnosis. National University of Defense Technology (2005) 11. Zhang, X.J., Tan, J.B., Han, J.H.: Fault diagnosis method based on BP neural network. Syst. Eng. Theory Pract. 22(6), 61–66 (2002) 12. Pearl, J.: Fusion: propagation and structuring in belief networks. Artif. Intell. 29(3), 241–288 (1986) 13. Brite: http://www.cs.bu.edu/brite/. Last accessed 25 July 2019 14. Padmanabhan, V.N., Qiu, L., Wang, H.J.: Server-based inference of Internet link lossiness. In: IEEE INFOCOM 2003. Twenty-second Annual Joint Conference of the IEEE Computer and Communications Societies, pp. 145–155. IEEE, USA (2003)

Equipment Fault Prediction Method in Power Communication Network Based on Equipment Frequency Domain Characteristics Ruide Li, Zhirong Peng, Xi Yang, Tianyi Zhang, and Cheng Pan

Abstract There are a large number of communication operation and maintenance equipment in the power IoT scenario. It is difficult to find out when the equipment fails. The traditional method is mainly manual maintenance, but the efficiency is low. In this paper, a neural network-based equipment fault prediction method is proposed. By collecting the time series data of the equipment and transforming it into frequency domain features by using discrete Fourier transform, the neural network model is trained. The experiment shows that the proposed method avoids the complex timing characteristics of the equipment. The problem has improved the ability of equipment failure prediction. Keywords Fault prediction · Neural network · Fourier transform · Frequency domain feature

1 Introduction The fault prediction technology is a technology that senses the abnormal working state of the device in advance and discovers the signs of the fault in advance. It is a more advanced equipment maintenance guarantee mechanism than the fault diagnosis. The fault prediction technology collects the relevant state information of the equipment, uses computer technology, artificial intelligence, and other methods to determine the time when the equipment fault occurs, and what faults occur, so as to inform the maintenance management personnel to maintain the equipment in time to ensure the normal operation of the system.

R. Li (B) · Z. Peng · X. Yang · T. Zhang Jiangmen Power Supply Bureau of Guangdong Power Grid Co., Ltd., Jiangmen, Guangdong, China e-mail: [email protected] C. Pan Guangdong Electric Power Information and Communication Co., Ltd., Guangzhou, Guangdong, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_88

901

902

R. Li et al.

There are massive heterogeneous devices in the power scene, such as generators, transformers, and detection sensors. Due to the large number of devices, some equipment failures may occur every day. Manpower inspections will consume a lot of human resources and may leak. Problems such as inspection and misdetection cannot guarantee the reliability of the inspection, so once the equipment fails, it may cause huge losses. Therefore, it is urgent to use the fault prediction technology to detect the signs of equipment failure in advance and prevent it from happening. Aiming at the power scene, this paper proposes a neural network-based power equipment fault prediction method. Taking common routing equipment as an example, it collects time-domain feature data such as routing equipment temperature and transforms it into frequency domain features by Fourier transform. The data trains the neural network model to predict equipment failures. The main structure of this paper is as follows: Sect. 2 introduces the current research results of equipment failure prediction methods, Sect. 3 introduces neural network-based equipment failure prediction models, Sect. 4 introduces fault prediction methods, and Sect. 5 deals with this method. Simulation experiments were carried out and the results were analyzed. Section 6 summarizes the full text and presents a future outlook.

2 Related Work Equipment failure prediction methods are currently divided into three types, modelbased prediction techniques, artificial intelligence-based prediction techniques, and probabilistic-based prediction techniques. The artificial intelligence-based prediction method mainly collects device state information, extracts key features from the data cleaning cluster, and uses artificial intelligence algorithms to classify the device state, thereby obtaining whether the device is in working state. Commonly used artificial intelligence methods include neural networks, genetic algorithms, and expert systems. Probabilistic-based fault prediction methods include time series analysis, nonregression analysis, and the like [1]. By normalizing the historical time series data of the equipment nodes of the power equipment topology network structure, the time series decomposition algorithm is used to decompose the time series, extract the feature time, and adopt the method of association analysis to eliminate the equipment running trend and equipment working conditions. The implicit relationship between them achieves the purpose of effective prediction. In the nonlinear regression method [2], using the historical statistical data of the state of the grid equipment and its probability of failure, you and the grid equipment state and the probability of failure, the nonlinear regression wants to close the correction function for verification. Artificial intelligence-based fault prediction methods include expert prediction [3], neural network prediction, and support vector machine [4]. The neural network prediction method calculates the loss function value by inputting the sample by constructing the multi-layered neurons including the input layer, the output layer,

Equipment Fault Prediction Method in Power Communication …

903

the hidden layer, etc., and adjusts the connection weights and thresholds until the network adapts to the required mapping. Yang Ting et al. studied the equipment prediction and maintenance method of BP neural network, and further proposed the combination of chaos theory [5] and neural network for fault prediction. The expert system prediction method judges the state trend of power equipment by constructing a power equipment state knowledge base and using the reasoning and judgment to simulate the decision process of human experts. Model-based fault prediction methods include gray model [6], hidden Markov model [7], Kalman filter [8], and so on. The gray model [9] identifies the degree of difference between the development factors of the system factors, that is, conducts correlation analysis, and generates and processes the original data to find the law of system variation, generates a strong regular data series, and establishes a differential equation model, thereby predicting the future development trend of power equipment. The fault prediction method based on the hidden Markov model [10] calculates the state transition probability or a motion probability, so as to predict the occurrence of the fault step by step.

3 Equipment State Prediction Model Based on Neural Network During the running of the device, it usually contains three states, normal running state, potential fault state, and abnormal running state. As shown below, in normal operation, it is difficult to manually discover the abnormal characteristics of the device. When the device is in a potentially faulty state, some features of the device may change dramatically. The damage of a component can cause a series of chain reactions. Although the device can provide normal services, the internal state of the device has abnormal. When the device status reaches a certain damage threshold, the device is no longer able to provide normal services or even stop working (Fig. 1). Fig. 1 Equipment operating status trend

904

R. Li et al.

The neural network-based device state prediction proposed in this paper uses BP neural network to analyze the device and current state characteristics and predicts the potential fault state before the device function failure point occurs.

3.1 Equipment State Feature Model A time series refers to a set of observed or recorded data in chronological order. However, the traditional time series data analysis model usually use the time-base arrangement order as the main structure of the sample, but in fact the information structure of the time series data in the non-time dimension is very complicated and diverse, for example, including random noise, periodic sequence, fixed feature structure, etc., often this information is difficult to obtain directly. The time series data processing method based on Fourier transform converts the time series data into frequency domain data, and analyzes the data from the frequency domain, thereby avoiding the more complicated data features hidden in the time series data. It is the most basic method of signal analysis. The core of the Fourier transform is to transform from the time domain to the frequency domain and then study the spectral structure and variation of the signal. A Fourier transform can represent a continuous or discrete sequence as a trigonometric function or a linear combination of their integrals. Thereby the amplitude of the trigonometric function of different frequencies is obtained. The discrete Fourier calculation formula is as follows: X (k) =

N −1  i=0

    i i − j x(i) sin 2π k , k = 1, 2, . . . , N x(i) cos 2π N N

(1)

Each data unit in the time series is abstracted into a two-tuple , where t represents the time point, v represents the data variable at that time, and can reflect the state or action of the thing. A device can contain variables in multiple time dimensions to become multi-dimensional time. Sequence expressed as . Considering the large number of communication operation and maintenance equipment in the power scenario, a common and widely distributed router device is selected here. A router device generally contains a CPU, a memory chip, a memory, and the like. Features that normally reflect the normal operation of the router include CPU utilization, CPU temperature, memory temperature, and so on. Extract this timing feature. The mathematical characteristics of the device characteristics are as follows: (1) Take a feature of the device, the characteristics at time t are vt . (2) The tuple of the t ~ t + N time period in the time series is

E t,N =

Equipment Fault Prediction Method in Power Communication …

905

(3) After the Fourier transform, the frequency domain features are normalized:         aN   a2   a3      F = 1,  ,  , . . . ,   a1 a2 a1 The calculated value after the Fourier transform is used as the input data of the neural network, the model is trained, and the state of the device is output.

3.2 Hierarchical Model The state of the routing device at time t is F. The state of the device is graded by a manual experience and is classified into four levels 1–4, wherein the setting level 1–2 is a normal running state, and the level 3 is a potential fault. Status, level 5 is the equipment fault status. The higher the level, the worse the device state. The neural network prediction algorithm outputs the device frequency level of the time period by inputting the state frequency domain characteristics of the device for a period of time, thereby knowing the running state of the device, and maintaining the device in the potential fault state, thereby avoiding the device transitioning to the fault state.

4 Neural Network-Based Equipment Fault Prediction Method The neural network-based device fault prediction method preprocesses the device timing data by acquiring the device state data of the routing device history for a period of time, including missing values, abnormal value processing, data normalization, and finally transforming the time series data into frequency domain data by Fourier transform. It is used as a neural network input sample to calculate the device status level.

4.1 Feature Acquisition Obtain the timing state characteristics of the device. Each piece collects data for one day, usually N times a day, and the number of device features n takes 1. (1) Determining that the state characteristic of the device at t ~ t + N is E t,N indicating the device state of one day. (2) Through the experience of the operation and maintenance personnel, set the status level for the equipment at time t ~ t + N. (3) Perform discrete Fourier transform on the time series features and normalize them.

906

R. Li et al.

4.2 BP Neural Network Prediction As an intelligent information processing system, the core of the artificial neural network to achieve its function is the algorithm. BP neural network is a multi-layer feedforward network trained by error backpropagation (referred to as error backpropagation). Its algorithm is called BP algorithm. Its basic idea is gradient descent method, which uses gradient search technology to make the network. The error mean square error between the actual output value and the desired output value is minimal. The basic BP algorithm includes two processes of forward propagation of signals and backpropagation of errors. That is, the calculation of the error output is performed in the direction from the input to the output, and the adjustment weight and the threshold are performed from the output to the input. In the case of forward propagation, the input signal acts on the output node through the hidden layer and undergoes nonlinear transformation to generate an output signal. If the actual output does not match the expected output, the error propagates back into the error propagation process. Error backpropagation is to pass the output error back to the input layer through the hidden layer, and distribute the error to all the units in each layer, so as to adjust the error value of each unit as the basis for adjusting the weight of each unit. This paper uses a three-layer BP neural network model. The input sample is f, where the hidden layer neuron input is: Ii =

N 

wi j x j + θi , i = 1, 2, . . . , N

(2)

i=0

In the formula, wij is the connection weight of the hidden layer neuron i and the input layer neuron j, and θ i is the hidden layer neuron threshold. Substituting the output I i of the hidden layer neurons into the following Formula (3) to calculate the output Oi of each neuron in the hidden layer, and using Eq. (4) to calculate the output of a single neuron in the output layer. Oi = y=

1 1 + e−Ii

N 

Oi Vi

(3)

(4)

i=0

This paper proposes an AP load-balancing strategy based on service attribute in wireless network. The strategy determines the AP load status according to the service type and service running status of the STA. The AP is overloaded when the network condition does not meet the service requirements. The STAs with poor running status are switched to other most suitable APs according to the TOPSIS algorithm. The experiments show that the method achieves AP load balancing as a whole.

Equipment Fault Prediction Method in Power Communication …

907

In Eq. (4), V i is the connection weight of the output layer neurons and the hidden layer neurons. Equation (5) calculates the mean square error E(w) of the network and then calculates the error term of each neuron in the output layer and the hidden layer, and the correction value of each connection right adjusts the correction value of each connection right and adjusts each connection weight. 1 E(w) = (tk − yk )2 2 k∈ p L

(5)

where x is the expected output value, y is the actual output value of the network, and p is the number of samples. In this paper, the input layer node number 48 is set, the number of hidden layer nodes is 8, and the number of output layer nodes L is 4.

5 Experiment and Analyze 5.1 Experiment In this experiment, the chip temperature data is collected as the device status when the routing device is working. N takes 48 times, that is, the temperature data is taken every 30 min, and then the discrete Fourier transform is used as a sample number, and the level label is manually added. This time, 200 samples were produced, of which 140 were used as neural network training samples, and 60 were used as test samples. Among the 60 test samples, 15 were grade 1, rank 2, grade 3, and grade 4. An input sample data obtained after Fourier transform is as follows. It is observed that the features are mainly concentrated in the high-frequency and low-frequency bands (Fig. 2). Fig. 2 Frequency domain feature

908

R. Li et al.

Table 1 Forecast results Grade 1

Grade 2

Grade 1

80%

13.4%

Grade 2

0

Grade 3

0

Grade 4

0

Grade 3 (%)

Grade 4

6.6

0

93.4%

6.6

0

6.6%

93.4

0

0

13.3

86.7%

Table 2 Compare results

Accuracy (%) Method of this paper [11]

86 81

5.2 Experimental Results and Analysis The forecast results are as follows in Table 1. It can be seen from the experimental results that the recognition rates of level 2 and level 3 are relatively high, both being 93.4%, and the recognition rate of level 4 is 86.7%, and the recognition rate of level 1 is 80%. Level 1 is lower because the characteristics of Level 1 and Level 2 are similar and confusing. In addition, the experimental training data category is not balanced, and it also has a certain impact on the test results. The method of this paper is compared with the method of [11], and the prediction results have obvious advantages. The test results are as follows in Table 2. Acknowledgements This work is supported by the Science and Technology Project of Guangdong Power Grid Co., Ltd: Research on ubiquitous business communication technology and service mode in smart grid distribution and consumption network-Topic 4: Research on smart maintenance, management and control technology in smart grid distribution and consumption communication network (GDKJXM20172950).

References 1. Xi, W., Li, P., Guo, X.B., et al.: Application of multidimensional time series correlation analysis method in power equipment fault prediction. Power Syst. Clean Energy 12, 60–65 (2014) 2. Zhai, J.J., Wang, L.J., Li, H.F.: State-based nonlinear regression analysis of power system equipment failure probability. Distrib. Utilization 33(12), 24–28 (2016) 3. Zhou, M., Ren, J.W., Li, G.Y., et al.: Expert system for fault diagnosis of distributed power systems based on fuzzy inference. Autom. Electr. Power Syst. 25(24), 33–36 (2001) 4. Zhang, X.G.: On statistical learning theory and support vector machine. Acta Autom. Sin. 26(1), 32–402 (2000) 5. Tang, W., Chen, X.Y.: Chaos theory and its application. Autom. Electr. Power Syst. 24(7), 67–70 (2000)

Equipment Fault Prediction Method in Power Communication …

909

6. Luo, D., Liu, S.F., Dang, Y.G.: Grey model GM (1, 1) optimization. Chin. J. Eng. Sci. 5(8), 50–53 (2003) 7. Liu, Y.Z., Lin, Y.P., Chen, Z.P.: Text information extraction based on hidden Markov model. J. Syst. Simul. 16(3), 507–510 (2004) 8. Peng, D.C.: Basic principles and applications of Kalman filtering. Softw. J. 8(11), 32–34 (2009) 9. Yu, D.J., Yan, X.G., Liu, J., et al.: Prediction of equipment state based on grey theory. J. Hunan Univ. (Nat. Sci.) 34(11), 33–36 (2007) 10. Zhong, J.: Research on Fault Prediction Algorithm Based on Continuous Hidden Markov Model. North China University of Technology (2018) 11. Zhai, P.F., Zhang, C.S.: Artificial Neural Network and Simulated Evolutionary Computation. Tsinghua University Press Co., Ltd., Beijing (2005) 12. Zhang, L., Li, X.S., Yu, J.S., et al.: A fault prediction algorithm based on gaussian mixture model particle filter. Acta Aeronaut. Sin. 30(2), 319–324 (2009) 13. Yang, G.A., Zhong, B.L., Huang, R., et al.: Time domain feature extraction method for wavelet packet decomposition of mechanical fault signals. J. Vib. Shock 20(2), 25–28 (2001) 14. Liu, N.Z., Yang, J.Y.: Two-dimensional bar code recognition based on fourier transform. J. Image Graph. 8(8), 877–882 (2003) 15. Shi, C.Y., Huang, C.N.: Principle of Artificial Intelligence. Tsinghua University Press Co., Ltd., Beijing (1993) 16. Ma, Z.H.: Handbook of Modern Applied Mathematics/Probability Statistics and Stochastic Process Volume. Tsinghua University Press Co., Ltd., Beijing (2013)

VNF Placement and Routing Algorithm for Energy Saving and QoS Guarantee Ying Zeng, Zhan Shi, and Zanhong Wu

Abstract In the context of network function virtualization (NFV), the existing virtual network feature (VNF) placement algorithm is difficult to optimize network energy consumption and quality of service at the same time. This paper first constructs a network overhead. Optimize the problem model. Based on the model, this paper designs a VNF placement and routing algorithm combining genetic algorithm and simplex method. The algorithm combines the traditional genetic algorithm with the simplex method with strong local search ability, thus overcoming the problem that the traditional genetic algorithm is easy to fall into the local optimal solution. Simulation experiments show that compared with other deployment algorithms, the proposed algorithm can effectively optimize network delay and network energy consumption. Keywords Network function virtualization · Energy efficient · Quality of service · VNF deployment

1 Introduction NFV is a new concept promoted by the European Telecommunications Standards Association (ETSI), which can effectively overcome the rigid problems existing in the current network and deploy multiple VNFs on the same underlying network. The technology reduces the overhead of deploying dedicated hardware devices by using virtualization and cloud computing technologies and ensures the flexibility, reliability, and scalability of network services. For the optimization of energy consumption of NFV networks, Khosravi [1] also proposed a VNF deployment scheme with energy-aware functions. The scheme determines the deployment scheme that minimizes network energy consumption by studying parameters affecting footprint and energy costs. Tang [2] designed a hybrid genetic algorithm to solve the problem of VNF layout, which considers network link energy consumption and server energy consumption. However, both of them only Y. Zeng · Z. Shi (B) · Z. Wu Guangdong Power Grid Co., Ltd., Electric Power Dispatch & Control Center, Guangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_89

911

912

Y. Zeng et al.

consider the layout of the VNF for energy saving and do not consider the quality of service of the network. In response to the quality of service of NFV networks, Jiang [3] proposed a solution to the problem of routing and VNF layout. This scheme designed an offline algorithm to solve the static VNF layout problem and an online traffic routing solution. The author of the literature [4] proposed a VNF layout algorithm for energy saving, which can maximize the traffic received by mobile clients while reducing the energy consumption generated by the data center. The author of the literature [1] proposed a heuristic algorithm to solve the VNF link problem. In this scheme, when an SFC with multiple VNF nodes needs to be expanded, it needs to be performed in two steps. In Ref. [5], a method based on affinity is designed to minimize cloud traffic and service delay in multi-cloud application scenarios. The main work of this paper is summarized as follows: This paper first builds an overhead model for energy consumption and transmission delay. Aiming at the above model, a genetic and a simplex method are combined. The simulation results show that the algorithm can optimize the network energy consumption under the premise of guaranteeing service quality.

2 Optimization Problem Model This paper uses G(V, L) represents a network topology, V represents the node of the network, and L represents the connection in the topology. This paper uses the binary variable pr,n f to indicate whether the VNF instance f is placed on server n. chrn f mg , binary variable, when r data flows from g deployed on n to g deployed on m, the fg value is 1. When f is processed before g, the value of G r is 1 and vice versa.

2.1 Cost Model of Sever The energy consumed by the VNF instance is related to the number of servers deployed on the server n. The number of instances deployed on n can be expressed as:     n pr, f · br b f , ∀r ∈ R, ∀ f ∈ F nums = (1) r ∈R

The processing energy consumption of the VNF is directly proportional to the utilization of the CPU, so the processing energy consumption of the VNF can be expressed as: psw = pnt − ps /Cv · c f ·

 r R

pr,n f · br /b f , ∀n ∈ V, ∀ f ∈ F

(2)

VNF Placement and Routing Algorithm for Energy Saving …

913

In order to avoid double counting power consumption, the total energy consumption of the server can be expressed as: ⎧ ⎫ ⎨  ⎬  pn = ps · min 1, pr,n f + psw ⎩ ⎭ f ∈F r ∈R

(3)

f F

This document only considers the processing delay of user data on the server. The processing delay can be expressed as follows: ⎧ ⎨

Ts = ts · min 1, ⎩



pr,n f

f ∈F r ∈R

⎫ ⎬ (4)



The server’s energy consumption and processing delay are normalized, and the weighted sum is used to obtain the server’s deployment overhead. Cn = a · pn pmax + b · Ts Tmax

(5)

2.2 Cost Model of Link The transmission energy consumption of a physical link is proportional to the bandwidth utilization of a physical link, and the bandwidth utilization of a physical link can be expressed as: BUl =



chrn f mg · f lrnml · br Cl , ∀l ∈ L , ∀ f ∈ F

(6)

r ∈R

Similarly, the physical link energy consumption also includes the link power consumption and transmission energy consumption. The total energy consumption can be expressed as: ⎧ ⎨

pla = pl · min 1, ⎩



chrn f mg · wrnml

f ∈F r ∈R

⎫ ⎬ ⎭

+ ( plt − pl ) · BUl

(7)

The physical link transmission delay is related to whether the link transmits user traffic. The transmission delay of the link can be expressed as: ⎧ ⎨

Tl = tl · min 1, ⎩

 f ∈F r ∈R

chrn f mg · wrnml

⎫ ⎬ ⎭

(8)

914

Y. Zeng et al.

Therefore, the total cost of a physical link can be expressed as: Cl =a · pla pmax + b · Tl Tmax

(9)

The total cost of the network is composed of the physical node and the link cost. The overhead can be expressed as: Call =

 n∈V

Cn +



Cl

(10)

l∈L

3 Hybrid Genetic Algorithm The detailed steps of the algorithm designed are shown in Tables 1 and 2.

4 Simulation Result Analysis This paper chooses two random algorithms and hybrid genetic algorithms for comparison. The deployment principle of the node-link random mapping algorithm is to randomly select nodes and physical links with sufficient resources and processing capabilities for mapping. The principle of the link-node mapping algorithm is to calculate the shortest path from the source to the destination and then randomly deploy the VNF on the path. The network topology used in the test algorithm consists of 13 nodes and 21 links.

4.1 Performance Evaluation This paper uses four evaluation indicators to verify the validity of the article design algorithm. Figure 1 depicts the total cost of the NFV network for the three algorithms when deploying different SFCs. It can be seen that as the number of SFC requests increases, the cost of the NFV network increases gradually. However, when the number of SFCs with interest mapping is more than 20, the algorithm designed in this paper is obviously superior to the two random algorithms. Figure 2 depicts the network energy consumption of the three algorithms when mapping a different number of service function chains. When the number of SFCs requesting mapping is small, the link-node mapping algorithm has a great advantage, but with the increase in the number of SFCs, the advantage of hybrid genetic algorithm to optimize the energy consumption of NFV networks gradually emerges.

VNF Placement and Routing Algorithm for Energy Saving …

915

Table 1 Algorithm 1—Hybrid genetic algorithm

Figure 3 depicts the number of CPUs used by the three algorithms in a network when deploying a different number of service function chains. Compared with the other two algorithms, the algorithm designed in this paper can effectively reduce the number of CPUs. In this paper, the genetic algorithm is used to map VNF, which expands the feasible solution range of the mapping scheme. Therefore, the solution

916

Y. Zeng et al.

Table 2 Algorithm 2—Simplex algorithm

of the design algorithm of this paper makes the CPU utilization in the network higher, and the number of CPUs used is smaller. Figure 4 depicts the bandwidth consumption of the NFV network when the three algorithms map a different number of service function chains. The bandwidth consumption of the mapping scheme solved by the algorithm designed in this paper is between the node-link mapping algorithm and the link-node mapping algorithm. But the algorithm designed in this paper can also meet the service requirements.

VNF Placement and Routing Algorithm for Energy Saving …

917

Fig. 1 Network consumption

Fig. 2 Network energy consumption

5 Conclusion In order to solve the problem of simultaneous optimization of NFV network energy consumption and service quality, this paper first proposes an overhead model of NFV network. For this model, this paper proposes a VNF optimization deployment algorithm combining genetic algorithm and simplex method. Simulation results show that

918

Y. Zeng et al.

Fig. 3 Number of CPUs used by the network

Fig. 4 Network bandwidth consumption

compared with other deployment algorithms, the proposed algorithm can effectively reduce network delay and network energy consumption. Acknowledgements This work was supported by the science and technology project of Guangdong power grid (036000KK52160025).

VNF Placement and Routing Algorithm for Energy Saving …

919

References 1. Khosravi, A., Andrew, L.L.H., Buyya, R.: Dynamic VM placement method for minimizing energy and carbon cost in geographically distributed cloud data centers. IEEE Trans. Sustain. Comput. 2(2), 183–196 (2017) 2. Tang, M., Pan, S.: A hybrid genetic algorithm for the energy-efficient virtual machine placement problem in data centers. Neural Process. Lett. 41(2), 211–221 (2015) 3. Jiang, J.W., Lan, T., Ha, S., Chen, M., Chiang, M.: Joint VM placement and routing for data center traffic engineering. In: Proceeding of IEEE INFOCOM, pp. 2876–2880 (2012) 4. Ghaznavi, M., Shahriar, N., Kamali, S., Ahmed, R., Boutaba, R.: Distributed service function chaining. IEEE J. Sel. Areas Commun. 35(11), 2479–2489 (2017) 5. Bhamare, D., Samaka, M., Erbad, A., et al.: Optimal virtual network function placement in multi-cloud service function chaining architecture. Comput. Commun. 102, 1–16 (2017)

Research on IoT Architecture and Application Scheme for Smart Grid Dedong Sun, Wenjing Li, Xianjiong Yao, Hui Liu, Jinlong Chai, Kunyi Xie, Liang Zhu, and Lei Feng

Abstract According to the business characteristics and functional requirements of the smart grid ICT platform, a layered architecture of the Internet of things (IoT) for the transmission, transformation, distribution, and use of electricity in the smart grid was proposed, and it was developed with the traditional power communication network. Comparedto one of the most important components of the end of the Internet of things, wireless sensor networks play an important role in the application of IoT for the smart grid, and a sensor network application solution for the production of smart grids is proposed. At the same time, on the basis of the analysis of the interactive requirements of the smart grid, an IoT solution for smart electricity is proposed. Keywords Smart grid · IoT architecture · Sensor network

1 Introduction Over the last decade, we have witnessed an explosive growth of Internet users [1]. Although the degree of informatization of China’s power grid is constantly improving, it still faces some special problems, such as building a strong backbone of power grids, improving the ability of the power grid to withstand multiple failures, strengthening the backbone grid of regional power grids, increasing the stability of the power grid, and enhancing the operation of the power grid. Flexibility improves D. Sun · W. Li State Grid Information & Telecommunication Group, Ltd., Beijing, China X. Yao State Grid Shanghai Electric Power Company, Shanghai, China H. Liu Beijing Fibrlink Communications Co., Ltd., Beijing, China J. Chai · K. Xie (B) · L. Zhu · L. Feng State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_90

921

922

D. Sun et al.

the information-based construction of power-related companies, realizes information interaction with users, gives full play to the role of information technology in major decision-making and modern management [2]. Solving these problems is the key to the evolution of the existing grid to a reliable, self-healing, economical, compatible, integrated, and secure smart grid [3]. Building a new generation of smart grid information and communication technology (ICT) platform is the foundation of smart grid construction. At the same time, the Internet of things (IoT) is a new type of communication network that realizes intelligent identification, positioning, tracking, monitoring, and management. It has been applied in many fields such as logistics management, intelligent buildings, security services, and health care and has received good results. Effect on the Internet of things connects any item to the Internet through information-sensing devices such as radio frequency identification (RFID), wireless sensors, global positioning systems, and laser scanners, thereby enabling information exchange and communication between objects and people and things [4]. Wireless sensor networks and RFID technology are the most critical technologies at the end of the Internet of things. At present, the development of the smart grid and the Internet of things industry has been promoted to the strategic decision-making level of national economic development. How to combine the smart grid and the Internet of things organically is an important issue that needs to be addressed in the development of the power industry. The direct communication method between the two parties reduces the manual participation in the power grid production and improves the safety factor of the power grid. At the same time, we should also take advantage of the outstanding features of heterogeneous convergence, compatible openness, and self-organizing self-healing of the Internet of things and integrate closely with the Internet to realize the interconnection and intercommunication of multiple networks and realize mutual perception and interaction between the power grid and society. The application based on the Internet of things can greatly expand the business scope of the existing power communication network, improve the security of the power system and the ability to resist failures and disasters, and realize the information interaction with the users, ultimately achieving energy-saving emission reduction, compatible interaction of the smart grid, safe and reliable goals [5]. Based on the basic network architecture and business characteristics of the Internet of things, this paper proposes a layered architecture of the Internet of things (IoT) for the smart grid ICT platform by analyzing the business needs of the four aspects of the transmission, transformation, distribution, and power consumption of the smart grid and compares the performance of the Internet of things with existing power communication networks. On this basis, an application scheme based on wireless sensor networks is proposed for the production process of smart grids; for the interactive and interactive requirements of intelligent power links, the Internet of things solutions for smart power and interactive smart grids are specifically analyzed.

Research on IoT Architecture and Application Scheme …

923

2 Analysis of IOT Architecture for Smart Grid Over the years, although the domestic power industry has done a lot of work in communication technology, it has played a significant role in the improvement of the level of power grid automation. However, for the next-generation smart grid, the existing power information and communication platforms are still far from meeting their inherent needs. Therefore, it is imperative to attach great importance to the research and experimental work of the new information and communication network architecture from a strategic perspective and to build a safe, reliable, stable, applicable, and fast smart grid ICT platform [6]. From the overall goal, the ICT platform for smart grid should be a highly integrated open communication system [7]. It should cover the entire process of power supply, power grid, and users in the coverage and form a unified whole; it should cover all aspects of power grid construction, production scheduling, energy trading, and technology management in the business link; it should penetrate the power grid planning in management and control. The whole process of design, construction, operation and maintenance, technological transformation, and decommissioning; the data flow transmission should include information collection, information transmission, information integration, information display, and decision-making applications, and ultimately form the power flow, information flow, and service flow. It should be the high degree of integration [8]. In addition to providing comprehensive technical support for safe, stable, economical, high-quality, and efficient operation of the power grid, the smart grid ICT platform will also provide strong technical support for green energy conservation, environmental protection, optimal resource allocation, and disaster prevention and reduction [9].

2.1 IoT Application Framework for Smart Grid Aiming at many problems existing in the current power communication network, an application framework for the Internet of things oriented to the smart grid is built. The essence of the application is the use of a comprehensive, perceptual and panoramic real-time communication system built on the Internet of things to make the Internet of things aware of the environment, multi-services, and services. Network convergence is effectively integrated into the smart grid ICT platform to eliminate blind spots for data collection, eliminate isolated information islands, and realize real-time monitoring and two-way interactive smart grid communication platforms. From the specific content point of view, the application-oriented IoT for the smart grid integrates the application needs of the major areas of the power grid and establishes four application modules for intelligent power transmission, smart power transformation, intelligent power distribution, and intelligent power supply. The demand side of the large module sets up an integrated power information platform for the

924

D. Sun et al.

information processing and application of the upper layer. The information platform database serves as an effective carrier for information processing and closely integrates with the cloud computing technology to realize real-time processing and analysis of ubiquitous data [10]. The effective processing of information includes the real-time monitoring and troubleshooting of transmission lines, substation equipment, distribution lines, and distribution transformers, and the unified deployment of power resources to achieve two-way interaction with users’ information, thereby realizing high efficiency, economy, safety, and reliability. Interactive smart grid inherent requirements. For the lower level information collection and transmission, the smart grid-based IoT application framework realizes the grid in a stage of extended awareness and interaction, using large-area, high density, multilayered sensor nodes, RFID tags, and multiple identification technologies and short-distance communication means. In order to collect information comprehensively, aiming at the different characteristics and technical requirements of each link, four sensory networks are set up for power transmission, transformation, distribution, and use. At the same time, a variety of short-range communication technologies is combined to increase information through massive collection of data. Accuracy provides data security for smart grids’ high-efficiency energy-saving and supply–demand interactions. In the information transmission phase, the power communication network is used as an information transmission channel to transmit transmission line information, substation equipment status information, power distribution information, and residential power supply information using optical fiber or broadband wireless access methods to realize real-time monitoring of information on the entire network.

2.2 IoT Layered Network Architecture for Smart Grid The application framework of the IoT application for the smart grid proposes different application requirements according to the different characteristics of each major link. According to the differences in functions and supporting technologies completed at different stages, the three-tier network architecture of the perceived extension, network, and application layers of the object-oriented networking of the smart grid is combined with the basic network model of the IoT (Fig. 1). The IoT platform for smart grids has greater advantages in terms of environmental awareness, self-healing, interaction, and security compared to existing power communication networks. However, these advantages are undoubtedly the informatization of the existing power grids. It is the fundamental guarantee for the automation of automation and interactive smart grid.

Research on IoT Architecture and Application Scheme …

925

Fig. 1 Smart grid-oriented hierarchical architecture based on the internet of things

3 IOT Application Scheme for Smart Grid 3.1 Sensor Network Application Scheme for Smart Grid Production The purpose of the application of the Internet of things for smart grids is to first improve the degree of information and automation in the production of power systems. The implementation of this type of application is mainly based on the wireless sensor network at the end of the Internet of things. The application scenarios mainly include applications such as high-voltage transmission lines, online monitoring of primary, and secondary substation equipment, especially primary equipment and continuous sensing of the operating status of the line and equipment. Figure 2 is a schematic diagram of a sensor network system suitable for smart grid production. The bottom layer is the input and output entities such as sensors, intelligent terminals, and RFID tags that are deployed in the actual monitoring environment. They are, in turn, wireless sensor networks, gateway nodes, access networks, and core networks and are ultimately connected to the analysis and processing system of the smart grid ICT platform. The wireless sensor network uses the network node that senses and extends the terminal to collect the device status information, line status information, meteorological environment information, and power integration information in the power transmission, power transformation and distribution links, and collects the collected data to the gateway node. The node transmits the classified and preprocessed data information to the access network and then enters the power

926

D. Sun et al.

Fig. 2 System structure of sensor networks toward smart grid producing processes

communication core network. Sensing data is sent to the back-end data processing center through the power communication private network for unified classification, analysis, and processing of the information. After the data is analyzed and processed, relevant commands are issued by the ICT platform and reversely transmitted to the terminal network nodes in the same manner to realize the entire network: real-time monitoring and troubleshooting.

3.2 Internet of Things Solutions for Smart Electricity In addition to traditional users such as residential users and industrial and commercial users, users of smart grids will also include new users such as electric vehicle charging systems. The main connection object in the traditional user’s smart power Internet of things application is the user’s intelligent bidirectional electricity meter. Grid companies use different types of smart bidirectional electric meters according to the nature of electricity consumption and the occasions, to achieve various applications such as

Research on IoT Architecture and Application Scheme …

927

Table 1 Objects under supervision in the terminal of the intelligent electricity utilization Monitoring object Resident users Smart meter

Monitoring content

Equipment requirements

Time-sharing energy metering Stealing monitoring

Low cost Safe and reliable Easy to use Good scalability

Load management Time-sharing energy metering Large users

Stealing Power quality Inspection

energy metering, power quality monitoring, and electricity theft detection. Through the introduction of intelligent bidirectional meter terminals, the company collects customer power information in an omnidirectional manner and realizes comprehensive load monitoring and management from large users to ordinary residents. The smart meter passes the sensor network, power line carrier communication (PLC) or field bus, and then through the power access network and the transmission network, the meter data is uploaded to an application platform such as power consumption information collection (Table 1).

4 Conclusion Building a smooth, high-speed, safe, and reliable ICT platform is the fundamental guarantee and inevitable trend of the grid intelligence. This paper fully considers the characteristics of smart grids and proposes a solution for building a smart gridoriented IoT solution. This solution not only considers the integration of existing power communication networks, but also utilizes the advantages of the Internet of things to realize power grids at the sensing terminals. Building a smart grid-oriented IoT platform is a long-term project that requires the continuous improvement of the degree of informatization of the grid and the continuous advancement of the standardization of the Internet of things. Acknowledgements This work is supported by 2019 State Grid Science and Technology project “Analysis of Power Wireless Private Network Evolution and 4G/5G Technology Application.”

References 1. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007) 2. Xiao, S.J.: Consideration of technology for constructing Chinese smart grid. Autom. Electr. Power Syst. 33(9), 1–4 (2009)

928

D. Sun et al.

3. Li, X.Y., Wei, W., Wang, Y.H., et al.: Study on the development and technology of strong smart grid. Power Syst. Prot. Control 33(17), 1–7 (2009) 4. Kranz, M., Holleis, P., Schmidt, A.: Embedded interaction: interacting with the internet of things. IEEE Internet Comput. 14(2), 46–53 (2009) 5. Chen, S.Y., Song, S.F., Li, L.X., et al.: Survey on smart grid technology. Power Syst. Technol. 33(8), 1–6 (2009) 6. He, G.Y., Sun, Y.Y., Mei, S.W., et al.: Multi-indices self-approximate-optimal smart grid. Autom. Electric Power Syst. 33(17), 10–15 (2009) 7. Shi, J., Ai, Q.: Research on several key technical problems in realization of smart grid. Power Syst. Prot. Control 37(19), 1–5 (2009) 8. Zhang, W.L., Liu, Z.Z., Wang, M.J., et al.: Research status and development trend of smart grid. Power Syst. Technol. 33(13), 9–10 (2009) 9. Bai, X., Yu, H., Wang, G.Q., et al.: Coordination in intelligent grid environments. Proc. IEEE 93(3), 613–629 (2005) 10. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Future Gener. Comput. Syst. 96, 111–118 (2019). (Elsevier)

A Method of Dynamic Resource Adjustment for 5G Network Slice Qinghai Ou, Jigao Song, Yanru Wang, Zhiqiang Wang, Yang Yang, Diya Ran, and Lei Feng

Abstract 5G network supports multiple application scenarios with different performance requirements. In various application scenarios, the network needs to meet different delay, reliability, and speed requirements. Network slicing is the best solution to this problem. The traffic volume changes over time, which causes the resource utilization of network slices to change frequently. The static allocation of resources in the network slice may have insufficient resource utilization or resource overload. Therefore, it is necessary to dynamically adjust the resource amount of the network slice to optimize the utilization of network resources. Based on the above analysis and requirements, this paper proposes a dynamic resource adjustment scheme (DRAS) in the network slice of 5G local transmission network, in order to improve the utilization of network resources. Finally, the simulation results show that the scheme is superior to the non-dynamic resource allocation scheme (non-DRAS). Keywords 5G network · Network slicing · Resource allocation

1 Introduction There will be multiple application scenarios in the future 5G network. Three typical application scenarios are Enhanced Mobile Broadband (EMBB), Mainframe Communication (MMTC), and Key Machine Communication (CMTC). Because of several technologies, for example, mobile edge computing, 5G networks must be more flexible than previous generations to achieve low latency, high capacity, and high reliability requirements for full connectivity [1]. Under the above background, Q. Ou · J. Song · Y. Wang Beijing Fibrlink Communications Co., Ltd., Beijing, China Z. Wang State Grid Shanxi Electric Power Company, Xi’an, China Y. Yang (B) · D. Ran · L. Feng State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_91

929

930

Q. Ou et al.

the Next Generation Mobile Network Alliance proposed the concept of network slicing, which uses different technologies such as software-defined network (SDN) and network function virtualization (NFV) on the physical infrastructure to construct different network slices as needed [2]. Through network slicing technology, a single physical network can be divided into multiple virtual networks, allowing operators to provide optimal support for different types of services for different types of customer groups [3]. The end-to-end network slice includes radio network slice, core network slice, and transport network slices for both connections to take advantage of network slicing technology [4]. Traditional resource scheduling is based on base stations. In the new architecture, networklevel resource scheduling is possible due to virtualization and centralized processing [5]. The main advantage of network slicing technology is that it enables operators to deliver networks on a service-by-service basis, thereby increasing operational efficiency while reducing time-to-market for new services. Operators can recursively segment their own network slices according to their needs and assign appropriate resources to each slice [6]. When the actual traffic of a tenant slice increases and causes congestion, we need to increase the resources of the tenant slice to meet the tenant’s service experience. When the actual traffic is much smaller than the resources allocated to the tenant slice, the tenant slice needs to be reduced. To avoid wasting resources, we only consider bandwidth adjustments in this article. We collect the current traffic of the tenant network slice, obtain the allocated bandwidth, formulate a bandwidth adjustment mechanism, determine whether to adjust the bandwidth and determine the value of the bandwidth to be adjusted.

2 Related Work In recent years, the research of network slicing has become a hotspot in the academic and industrial circles. Network slicing uses virtualization technology to divide a physical network logic into multiple subnets to support different scenarios [7]. However, most of the research has focused on the construction of network slices, and there has been little research on the operation and maintenance after the completion of the construction. Most of the research on resource adjustment is concentrated in the Internet scene. NGMN describes the operator’s need for network slicing in the 5G White Paper [8], and they hope that network slicing technology will enable mobile telecommunications infrastructure operators to flexibly deploy multiple logically independent endpoints based on the same underlying infrastructure. The system concept of network slicing is given in [9]. From top to bottom, it can be divided into business instance layer, network slice instance layer, and resource layer, and each part is clearly defined. A network slice instance is a specific implementation of a network slice. A service instance is a service capability that a slice can provide. Document [10] proposes a Virtualized Service Access Interface (VASI) that can

A Method of Dynamic Resource Adjustment for 5G Network Slice

931

be used to programmatically change the access network capabilities and resources available to service providers. Literature [11] proposed a resource transaction model between network slices. The author defines the criticality of the network to evaluate the robustness of the network. Literature [12] proposes an efficient resource allocation scheme for Long-Term Evolution (LTE) network radio resource blocks to achieve service contracts with service provider subscriptions. It also allows flexible definition of the fairness requirements of different service providers. Most of the articles do not propose specific resource dynamic adjustment schemes, only provide concepts, propose API requirements, and propose imperfect methods. Combined with the scenario of 5G network slicing, this paper proposes a complete scheme for resource dynamic adjustment in 5G network slicing.

3 System Model In the future, mobile operators need to build at least three different types of network slices. As shown in Fig. 1, network slices 1, 2, and 3 belong to EMBB, CMTC, and MMTC, respectively, and mobile operators allocate wireless virtual resources for each network slice (slots, spectrum, signal processing, etc.). Network slices can be dynamically scaled and isolated from each other as needed. The same user can access multiple network slices at the same time and enjoy the different network services required.

3.1 The Bandwidth Resource Adjustment Trigger Conditions The traffic on each tenant network slice changes with time, so it is necessary to dynamically change the network resources allocated by each tenant network slice. However, it is inefficient to adjust the bandwidth of network slices because of a small

Fig. 1 Radio access network schematic diagram

932

Q. Ou et al.

increase or decrease in traffic. Therefore, we should determine the trigger conditions for bandwidth adjustment. H is the low bandwidth guaranteed by tenant network slices. B is the bandwidth allocated to the tenant network slices. R is the current traffic rate on the tenant network slices: β L , β H is the percentage of the current allocated bandwidth. When R is less than Bβ L , there is a waste of resources. When R is larger than Bβ L , there will be network congestion. L is the time R maintains. Whether the bandwidth of the tenant network slice needs to be adjusted is based on the value of R. If Bβ L ≤ R ≤ Bβ H , there is no need to adjust the bandwidth. If R ≤ Bβ L , it means that there is a waste of resources, bandwidth adjustment is needed to reduce the amount of resources allocated by tenant network slices. If R ≥ Bβ H , it means that there may be congestion in the tenant network slice, it is necessary to increase the amount of resources allocated by the tenant network slice so as not to affect the tenant experience.

3.2 The Bandwidth Resource Allocation Mechanism We consider two situations: a sudden increase in the number of users of network slices and a sudden decrease in the number of users of network slices. Let the total bandwidth allocated by the ith tenant network slice be Bi . The rental price of the unit bandwidth from the network infrastructure provider be ci , and the income of the unit bandwidth be gi . A. When the number of users of tenant network slice i suddenly increases and the actual traffic generated gradually approaches the allocated resource amount, the actual revenue of tenant network slice i is shown in Formula (1). Fi = Ui gi − Bi ci

(1)

where Ui is the actual traffic of tenant network slice i. Bi denotes the bandwidth value allocated by tenant network slice i. η is the resource utilization of tenant network slice i. And it satisfied: Ui = ηBi

(2)

In order not to cause network congestion and affect user experience, it is necessary to increase the bandwidth value allocated by tenant network slice i. The profit that increases bandwidth allocation is calculated as follows: Fix = Ui gi − Bix pi

(3)

Ui = ρ Bix

(4)

A Method of Dynamic Resource Adjustment for 5G Network Slice

933

where Bix is the bandwidth value allocated after adjusting for tenant network slice i. The profit D-value is expressed as follows: F =

Fix

  η − Fi = Bi ci 1 − ρ

(5)

Thus, the higher the utilization rate of resources, the higher the network revenue. B. When the number of users of tenant network slice i suddenly decreases and the actual traffic generated is much less than the allocated resources, it is necessary to adjust the allocated resources of tenant network slice i to a small extent. Equation (5) is also obtained. It is also concluded that the higher the utilization rate, the higher the revenue. Assuming that there are m tenant network slices, the total number of network slices is Bt . λi is the resource utilization ratio of tenant network slice i, which is calculated as follows: n j=1 b j (6) λi = Bix where b j is the actual traffic of the jth user on the tenant network slice i. There are n users in total. Bix is the resource allocated after adjusting the tenant network slice i. In order to ensure that the network cost is less than a specific threshold, the network resource utilization rate is the largest. The objective function is as follows: λ= y=

m 1  λi m i=1

m    yi  Bix − Bi  ≤ T

(7)

(8)

i=1

yi is the cost of bandwidth adjustment of tenant network slice i unit. T is a specific threshold. By solving the redistribution value of each tenant network slice, the objective function is maximized.

4 Simulation Results and Analysis This part implements the simulation and analysis of the above scheme. Set up the network slice monitoring module: Monitor the actual traffic in each tenant network slice. Set up the network slice monitoring module: Monitor the actual traffic in each tenant network slice. The network resource allocation module receives the data of the tenant network slice monitoring module and determines whether bandwidth

934

Q. Ou et al.

Table 1 Initialize parameters Group

βL

βH

y1

y2

y3

L

1

0.3

0.78

0.95

1.95

2.85

1

2

0.2

0.86

0.95

1.95

2.85

1

3

0.1

0.92

0.95

1.95

2.85

1

adjustment is needed; if bandwidth adjustment is needed, according to the data of the network slice monitoring module and the in-memory database, the network resource allocation module determines the amount of resources to be adjusted. For example, how much bandwidth is increased or decreased. Send the results to the network tile update module. Network Slice Update Module: Accepts the results of the Network Resource Allocation Module and generates a Slice Update Policy. We set up three network slices, and the three groups of experimental parameters are shown in Table 1. Wireless resource allocation technology is the key to effective resource utilization. In addition, it can be used to isolate network slices from each other. We envision two possible solutions to achieve wireless resource allocation between network slices: Firstly, dynamic resource allocation and secondly, non-dynamic resource allocation. Compare these two resource adjustment options. We take the first set of experimental parameters a = 1 for the experiment. The bandwidth utilization data is shown in Fig. 2. Compared with Fig. 3, it can be concluded that the DRAS solution can maintain the bandwidth resource utilization at 20 and 80%. Between and so that all the slice utilization is high; in the non-DRAS scheme, some slice bandwidth resource utilization exceeds 80%, close to 100%,

Fig. 2 Resource utilization of DRAS

A Method of Dynamic Resource Adjustment for 5G Network Slice

935

Fig. 3 Resource utilization of non-DRAS

which is likely to cause network congestion. Therefore, it can be proved that DRAS can improve the utilization of the entire network resources.

5 Conclusion Network slicing technology provides an effective guarantee for solving various problems that may arise in the future, such as network capacity, latency, reliability, and speed. In this paper, for the problem of insufficient resource utilization due to business fluctuations in 5G network slicing, a resource dynamic adjustment scheme on 5G local transmission network is proposed. This method formulates the bandwidth resource adjustment trigger condition and bandwidth resource allocation mechanism. Whether the decision is dynamically adjusted, the amount of resources that need to be adjusted through the model decision. Ensure that the network slice utilization is the highest when the network cost is less than a certain threshold and calculate the value of the network slice resource adjustment. Experimental simulations show that this scheme is feasible and can significantly improve resource utilization. Acknowledgements This work is supported by 2019 State Grid Science and Technology project “Analysis of Power Wireless Private Network Evolution and 4G/5G Technology Application”.

References 1. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Futur. Gener. Comput. Syst. 96, 111–118 (2019) 2. NGMN Alliance: Description of Network Slicing Concept. Version 1.0 (2016)

936

Q. Ou et al.

3. Foukas, X., Patounas, G., Elmokashfi, A., et al.: Network slicing in 5G: survey and challenges. IEEE Commun. Mag. 55(5), 94–100 (2017) 4. GPP Technical Report 23.799: Study on architecture for next generation system. Version 0.7.0 (2016) 5. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007) 6. Ordonez-Lucena, J., Ameigeiras, P., Lopez, D., et al.: Network slicing for 5G with SDN/NFV: concepts, architectures, and challenges. IEEE Commun. Mag. 55(5), 80–87 (2017) 7. Samdanis, K., Costa-Perez, X., Sciancalepore, V.: From network sharing to multi-tenancy: The 5G network slice broker. IEEE Commun. Mag. 54(7), 32–39 (2016) 8. NGMN Alliance 5G white paper. 2015-2-17. http://www.ngmn.org/uploads/media/NGMN 5G White Paper V10.pdf. (2016-1120) 9. Alliance, N.: 5G white paper. Next generation mobile networks, white paper (2015) 10. Davy, S., Famaey, J., Serrat-Fernandez, J., et al.: Challenges to support edge-as-a-service. Commun. Mag. IEEE 52(1), 132–139 (2014) 11. Fukuhara, S., Tachibana, T.: Robustness-based resource trading with optimization problem for network slicing. In: 2017 IEEE International Conference on Consumer Electronics-Taiwan (ICCE-TW), pp. 337–338. IEEE (2017) 12. Kamel, M.I., Long, B.L., Girard, A.: LTE wireless network virtualization: dynamic slicing via flexible scheduling. In: Vehicular Technology Conference, pp. 1–5. IEEE (2014)

Network Slice Access Selection Scheme for 5G Network Power Terminal Based on Grey Analytic Hierarchy Process Yake Zhang, Xiaobo Jiao, Xin Yang, Erpeng Yang, Jianpo Du, Yueqi Zi, Yang Yang, and Lei Feng

Abstract The rapid development of 5G network meets more demands of the application of the Internet of things. In order to further optimize the resource utilization and QoS of the network, the 5G network introduces the network slice to meet the different needs of different users. Under this background, it is particularly important to research the guaranteed low-cost 5G network slice access selection strategy. In this paper, an access selection algorithm: grey analytic hierarchy process (GAHP) for 5G power network is proposed. The algorithm is based on the analytic hierarchy process, combined with network performance and user experience two kinds of indicators to select QoS parameters, combined with grey correlation method to screen the QoS parameters, and select the candidate networks. Simulation result shows that the proposed algorithm GAHP can quickly and accurately select the optimal network with a low cost. And it can improve the satisfaction of the users. Keywords 5G · Network slice · GAHP · Access selection strategy

1 Introduction 2020 is the first year of 5G commercial operation. According to the definition of 3GPP, 5G not only has higher transmission rate but also has the characteristics of low delay, high reliability and low power consumption in transmission [1]. Based on this background, it is of great significance to solve the key technology and application mode of 5G network in advance under the ubiquitous IoT access of smart grid in the current stage. At the same time, in order to further optimize the resource utilization and quality of service of the network, how to select the optimal network in accordance with the good user preferences and network characteristics in Y. Zhang · X. Jiao · X. Yang · E. Yang · J. Du Xuchang Power Supply Company, State Grid Henan Electric Power Company, Xuchang, China Y. Zi · Y. Yang (B) · L. Feng State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_92

937

938

Y. Zhang et al.

the 5G converged network is a research focus in academia and industry. In order to meet the new requirements of emerging applications, two promising technologies are proposed today, that is, software-defined network (SDN) [2] and network function virtualization (NFV) [3]. Those two paradigms present complementary characteristics and they will together achieve new networks goals and ensure high flexible and extensible networks [4]. Network slicing is a new technology using SDN and NFV technology to adapt to new services with a wide range of different needs on the same physical network [5] because different users in 5G network have obvious access differentiation requirements. To meet this differentiated requirement, deploying some independent network infrastructure in the traditional way requires not only high equipment costs but also has extremely low energy efficiency. At the same time, the 5G slicing service is differentiated, and the type of power terminal service is also differentiated, so the research on the adaptability of power service and slicing service is of great significance to ensure the reliability of service and rationalize the rental cost of access network. The remainder of this paper is organized as follows. We give a review of related work in Sect. 2. Section 3 gives the introduction of implementation of GAHP algorithm. Section 4 shows the simulation results and analysis and Sect. 5 gives some conclusions.

2 Related Work At present, there are many solutions to the reliability access decision problem of 5G network. In [6], author uses the idea of Markov chain algorithm to select heterogeneous networks. In [7], authors propose a new algorithm, which takes into account the resource specification, packet processing requirements, bandwidth limitation and so on, in order to determine the optimal implementation of VM. A heterogeneous network access selection algorithm based on user experience is proposed in [8]. Combined with network state and user preference, the quality of user experience is maximized, but the user preference factor is subjective and unchanged which is unable to interact with the users. In paper [9], an access selection algorithm for WLAN/3G heterogeneous networks based on fuzzy logic is proposed, which selects the network by considering many dynamic factors, such as mobile speed and mobile direction of users. The resource allocation of each network is not taken into account, so it is easy to lead to the load imbalance of the whole network. In [10], the author proposes a heuristic algorithm for the admission control mechanism of user requests and the dynamic allocation of network resources to implemented slices. And in [11], the author proposes a novel downlink resource management framework for multiservice worldwide interoperability for microwave access (WiMAX ) networks. The algorithm only considers the maximization of user data rate in network resource allocation. However, in order to meet the requirements of new users, several additional parameters must be considered.

Network Slice Access Selection Scheme for 5G Network …

939

This paper designs an access selection algorithm for 5G network. This algorithm not only enhances the user experience but also solves the problems of high subjective factors and inaccurate selection of traditional analytic hierarchy process.

3 Implementation of GAHP Algorithm Network Slice Selection Scheme Based on Multiple Attribute Decision Making is an access selection algorithm, which is designed on the basis of analytic hierarchy process (AHP) for 5G networks. This algorithm is called grey analytic hierarchy process (GAHP). GAHP is to use the weight of each evaluation index calculated by AHP and use the grey relation analysis to determine the grey correlation coefficient of each evaluation index. Then by calculating the comprehensive correlation degree of various schemes, the comprehensive evaluation of different schemes is carried out.

3.1 Determining the Weight of Parameters by Analytic Hierarchy Process (1) Creating an evaluation model: The 5G power network pays more attention to network quality and users experience. Firstly, according to the preference of selecting network slices, users determine the parameters of QoS to evaluate the network. Suppose there are m network slices in the network environment, n parameters of QoS are selected by users. We use the 1–9 scale method commonly used in analytic hierarchy process to construct the multi-objective parameter matrix. The matrix A is as follows. ⎡

  A = ai j m×n

a11 a12 ⎢ a21 a22 ⎢ ⎢ = ⎢ a31 a32 ⎢ . . ⎣ .. .. am1 am2

a13 a23 a33 .. .

··· ··· ··· .. .

a1n a2n a3n .. .

⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

(1)

am3 · · · amn

where aij denotes the value of the jth parameter of QoS of the ith network slice. (2) We normalize the column vectors of the multi-objective parameter matrix A to get the matrix B. bij is the element in matrix B: ai j bi j = n i=1

ai j

,

j = 1, 2, . . . , n

(2)

940

Y. Zhang et al.

(3) By summing the rows of matrix B, the column vector W is obtained. wi is the element in the column vector W : wi =

n

bi j , i = 1, 2, . . . , n

(3)

j=1

(4) By normalizing column vector W , we get the eigenvector W. wi is the element in W which is the weight of the QoS parameter: wi wi = n i=1

wi

, i = 1, 2, . . . , n

(4)

Then W = [w1 , w2 , . . . , wn ]T

(5)

(5) We calculate the largest eigenvalue λmax of the matrix A. The calculation formula is as follows: λmax =

n 1 (Aw)i /wi n i=1

(6)

(6) Computing the consistency index CI of the matrix A: CI = (λmax − n)/(n − 1)

(7)

(7) In order to ensure the reliability of the matrix A, it is necessary to check the consistency of the matrix A. The random consistency ratio CR of the matrix A is calculated as follows: CR = CI/RI

(8)

where n is the order of matrix A and RI is the random consistency index. When CR is less than 0.1, it is considered that the matrix A satisfies the consistency requirement. Otherwise, the matrix must be adjusted and consistency is checked again until the matrix meets the requirements. The RI values are shown in Table 1, where n is the order of matrix. Table 1 Value of random consistency index RI n

1

2

3

4

5

6

7

8

9

RI

0.00

0.00

0.58

0.90

1.12

1.24

1.32

1.41

1.45

Network Slice Access Selection Scheme for 5G Network …

941

3.2 Determining the Weight of Parameters by Analytic Hierarchy Process Firstly, we need to determine the reference sequence and the comparison sequence. We use the sequence value that is composed of the optimal values of the QoS parameters of each network slice as the reference sequence. It is expressed as: X 0 = (X 0 (1), X 0 (2), …, X 0 (n)). Then we use grey ration analysis method between the reference sequence and the comparison sequence. The grey correlation coefficient is expressed as follows: mini mink |x0 (k) − xi (k)| + ξ maxi maxk |x0 (k) − xi (k)| |x0 (k) − xi (k)| + ξ maxi maxk |x0 (k) − xi (k)| i = 1, 2, . . . , m, k = 1, 2, .

vi (k) =

(9)

where ξ is the distinguishing coefficient and vi (k) denotes the correlation coefficient of the kth QoS parameter of the ith network slice. x i (k) denotes the value of the kth parameter of QoS of the ith network slice. The grey correlation coefficient vi (k) of each network slice is calculated by Formula (8). Matrix C consists of vi (k). We combine the index weight obtained by AHP with the correlation coefficient obtained by grey relation analysis, and get the comprehensive correlation coefficient V: V = WC

(10)

where W is the weight set of the QoS parameters, C is the grey correlation coefficient matrix and V is the comprehensive correlation coefficient. Finally, we judge which is the optimal network slice according to the comprehensive correlation coefficient of each network slice.

4 Simulation Results and Analysis We present simulation results of GAHP algorithm compared to Cost priority (CP) algorithm and Rate priority (RP) algorithm. According to user’s preferences, we select the various QoS parameters of network slices as shown in Table 2. Cost priority algorithm (CP): the choice of the target slice is based only on the cost. The slice that will be selected is the less cost of slice. Rate priority algorithm (RP): the choice of the target slice is based only on the rate of the slices. The slice that will be selected is the higher rate slice. We compare the three algorithms in terms of deployment cost, rate and users satisfaction. Three algorithms select the optimal slice from the four network slices in Table 2 to access. Firstly, we compare GAHP algorithm with other two algorithms

942

Y. Zhang et al.

Table 2 Value of random consistency index RI Network slice

Data rate (Mbit s−1 )

Delay (ms)

Cost (CNY)

Band (MB)

Slice 1

200

20

0.9

1000

Slice 2

200

20

0.8

700

Slice 3

210

20

0.9

800

Slice 4

170

20

0.9

900

in URLLC, eMBB and mMTC of 5G three users scenarios. The simulation results are shown in Figs. 1 and 2. Figure 1 shows the cost ratio of the slices selected by different algorithms. The simulation results show that the cost of the CP algorithm is the smallest in the process

Fig. 1 Cost of network deployment

Fig. 2 Transmission rate of the network

Network Slice Access Selection Scheme for 5G Network …

943

Fig. 3 Average users satisfaction of three algorithms

of network slicing deployment. GAHP is second. RP algorithm does not consider the cost of deployment when selecting target slices, so the cost is the highest. Figure 2 shows the network rate ratio of the slices selected by different algorithms. The simulation results show that RP algorithm has the highest slicing rate. CP algorithm considers the cost of development and does not consider rate when choosing target slice, so the network rate is the worst. GAHP algorithm can guarantee better network rate. As shown in Fig. 3, the CP algorithm gives priority to the cost of network deployment, ignores the needs of users when choosing network slices and leads to a lower level of users’ satisfaction. RP gives priority to guaranteeing the user’s transmission rate when receiving data, and guarantees the user’s interests. When the number of users is relatively small, the users’ satisfaction is higher. However, as the number of users increases, the imbalance of network load leads to the decline of network performance and users satisfaction. The GAHP algorithm can guarantee users to select the optimal network quickly and accurately under different business conditions. Therefore, the average satisfaction curve of users is relatively stable and ideal.

5 Conclusion In this paper, under the background of 5G power network, a GAHP access selection algorithm based on traditional AHP is proposed. The simulation results show that the algorithm takes into account two kinds of evaluation indexes which are network

944

Y. Zhang et al.

performance and user experience. It improves the network speed and performs betters in ensuring the satisfaction of users with low cost than the other two algorithms CP and RP. Acknowledgements This work is supported by 2019 State Grid Henan Province Science and Technology project “Research on the Key Technologies of QoS-guaranteed Power Terminal Trusted Access with 5G Coverage”.

References 1. Zhang, C., Zheng, Z.: Task Migration for mobile edge computing using deep reinforcement learning. Futur. Gener. Comput. Syst. 96, 111–118 (2019) 2. Kreutz, D., Ramos, F.M.V., Verssimo, P.E., Rothenberg, C.E., Azodolmolky, S., et al.: Softwaredefined networking: a comprehensive survey. Proc. IEEE 103(1), 14–76 (2015) 3. Mijumbi, R., Serrat, J., Gorricho, J., Bouten, N., De Turck, F.: Network function virtualization: state-of-the-art and research challenges. IEEE Commun. Surv. Tutor. 18(1), 236–262 (2016) 4. Kammoun, A., Tabbane, N., Diaz, G., Achir, N.: Admission control algorithm for network slicing management in SDN-NFV environment. In: 2018 6th International Conference on Multimedia Computing and Systems (ICMCS), pp. 1–6. Rabat (2018) 5. Zhang, H., Liu, N., Chu, X., Long, K., Aghvami, A., et al.: Network slicing based 5G and future mobile networks: mobility, resource management, and challenges. IEEE Commun. Mag. 55(8), 138–145 (2017) 6. MT-2020(5G) Promoting group 5G concept paperEB/OL. (2015-02-15) 2016-10-02. http:// 210.56.209.74/zh/documents/list/1.2015.2 7. Jakaria, A.H.M., Rahman, M.A.: A formal framework of resource management for VNFaaS in cloud. In: 2017 IEEE 10th International Conference on Cloud Computing (CLOUD), pp. 254– 261. Honolulu, CA (2017) 8. Ma, B., Deng, H., Xie, X.Z., et al.: An optimized vertical handoff algorithm based on Markov process in vehicle heterogeneous network. Commun. China 12(4), 106–116 (2015) 9. Singhova, A., Pakash, N.: Vertical handoff decision algorithm for improved quality of service in heterogeneous wireless networks. IET Commun. 6(2), 211–223 (2012) 10. Jiang, M., Condoluci, M., Mahmoodi, T.: Network slicing management and prioritization in 5G mobile systems. In: European Wireless 2016; 22th European Wireless Conference, Oulu, Finland, pp. 1–6 (2016) 11. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007)

Resource Allocation Mechanism in Electric Vehicle Charging Scenario for Ubiquitous Power-IoT Coverage Enhancement Yao Wang, Yun Liang, Wenfeng Tian, Xiaoyan Sun, Xiyang Yin, Liang Zhu, and Diya Ran Abstract For the coverage enhancement of the electric vehicles charging terminals at the edge of the NB-IoT cellular system, a D2D pairing strategy is proposed. The optimal cellular terminal for D2D pairing is determined by the corresponding transmission outage. The limited radio resource in the cellular system can be reused by the D2D links, which will increase the spectrum utilization but will also result in co-channel interference and system throughput loss. Therefore, a joint power control and channel assignment algorithm is adopted to improve the system capacity as much as possible. The optimal power strategy can be obtained by the geometric programming solution, and the subchannels can be assigned properly through the KM (Kuhn-Munkres) algorithm in the weighted bipartite graph matching problem. Finally, results showed that the proposed strategy can reduce edge terminals’ outage probability and improve throughput. Keywords Electric vehicle charging · NB-IoT · D2D · Coverage enhancement · Resource allocation

1 Introduction Electric vehicle is a typical application scenario in the Ubiquitous Power Internet of Things (UPIOT). How to ensure the efficiency and reliability of the data uploading communication process collected by the charging pile, which is a kind of IoT terminal carrier, is still an urgent problem to be solved in the current UPIOT [1].

Y. Wang · Y. Liang · W. Tian · X. Sun Global Energy Interconnection Research Institute, State Grid Corporation of China, Beijing, China X. Yin State Grid Tianjin Electric Power Company, Tianjin, China L. Zhu (B) · D. Ran State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_93

945

946

Y. Wang et al.

Uploading the data collected by electric vehicle charging piles to the cellular BS requires reliable and stable communication. NB-IoT can achieve wide and deep coverage and has advantages of low power consumption, large capacity, and low cost compared with traditional communications so it is suitable for this scenario [2]. For the charging piles at the edge of the NB-IoT cellular system, poor channel conditions and insufficient coverage lead to the significant improvement of outage probability, which greatly affects the information exchange success rate and experience. There are many literatures which mainly study the coverage enhancement in NBIoT system. A new method for enhancing the NB-IoT coverage based on ML algorithms is proposed [3]. The authors in [4] increase the power budget by introducing a non-orthogonal waveform instead of using the repetitive transmission mechanism. Low-Earth-Orbit satellite constellation is introduced [5], which extend the NB-IoT terrestrial coverage to worldwide. These researches are mainly about introducing new technology into the NB-IoT system to help the coverage enhancement but did not consider making full use of the limited radio resource in the system. D2D technology is regarded as an effective technique for communication quality enhancement of devices at the cell edge [6], because the spectrum utilization is enhanced by exploiting direct communication between nearby terminals and reusing the licensed spectrum resource of cellular terminals. In [7], the optimal mode selection with uplink transmission rate maximization for D2D-aided underlaying cellular networks is studied. A resource allocation method in two-hop D2D communication for 5G cellular networks is introduced in [8] in order to minimize the interference. The trade-off between spectrum efficiency and energy efficiency in a single cellular cell is explored [9]. Authors in [10] adopted an interference management method, where each terminal chooses its operation mode based on DL received power. In [11], the deep reinforcement learning is adopted while the authors in [12] introduced the adaptive power allocation. However, these papers do not focus on the radio resources allocation mechanism. Since the co-channel interference caused by the channel reuse of D2D terminals cannot be ignored and would affect the system performance including the transmission rate of cellular terminals with good channel condition and the system throughput. In this paper, considering that the terminals at the edge could be in insufficient coverage which result in a high probability of access interruption and difficulty to meet the service requirements. We consider the D2D to allow the terminals at the edge to access to the system, and the D2D terminals can reuse the channel resource of cellular terminals. To improve the throughput, a joint power control and channel assignment strategy is proposed. The contributions of this paper are concluded as follows: (1) Firstly, we added a D2D pairing communication mechanism to the original NBIoT system to multiplex the spectrum resource in the cellular system to achieve reliable access for terminals at the cell edge or outside the coverage of the BS; (2) Then, a joint resource allocation scheme is introduced to improve the throughput as much as possible. The geometric programming is adopted to obtain the

Resource Allocation Mechanism in Electric Vehicle Charging …

947

optimal power strategy set. Then the channel assignment can be regarded as a bipartite graph matching problem and the KM algorithm could be employed to achieve the optimal channel resource allocation. The rest of this paper is organized as follows. The single-cell NB-IoT uplink system model and the optimization problem are built in Sect. 2. Then, we proposed the joint resource allocation scheme in Sect. 3. In Sect. 4, the simulation results are discussed. We draw a conclusion in the last section.

2 System Model and Problem Formulation 2.1 System Model For a terminal at the cell edge or outside the cell, a D2D link can be built between it and a terminal within the cell. We assume that there are K 1 terminals inside the cell called the cellular terminal (CT) and K 2 terminals at the edge or outside the coverage called the DT (D2D terminal). K 2 < K 1 and the terminals’ location are all fixed. The channel resource scheduled to the cellular terminals is orthogonal so that the intra-cell interference is not considered. It is assumed that each D2D link can share at most one CT channel and  each CT uplink channel can be reused by at most one  D2D link, which means that i qi, j ≤ 1 and j qi, j ≤ 1.

2.2 D2D Pairing Model The D2D pairing helps the edge terminals to match and establish a D2D link with cellular terminals. Whether an edge terminal can build a D2D link with a specific CT depends on whether its outage probability difference can reach its default threshold. The shadow fading is denoted as ξ ∼ N (μ, σ 2 ). The signal power variation related to the shadow fading effect would be represented as a random variable of log-normal distribution with the following probability density function:   (ξ − μ)2 1 exp − f (ξ ) = √ 2σ 2 2π σ

(1)

For the edge terminal Di which establishes the D2D link successfully with the cellular terminal C j , the uplink SNR could be denoted as follows, γi, j =

G i, j Pi, j , (σ02 = N0 B) σ02

(2)

948

Y. Wang et al.

where G i, j = di,−αj ξ, ξ ∼ N (μ, σ 2 ) denotes the channel gain between these two terminals which contains the path loss and the shadow fading. And the Pi, j represents the uplink transmit power. The di, j means the physical distance and the road damage index can be represented as α. σ02 is the noise power. N0 and B represents the unilateral power spectral density and the channel bandwidth, respectively. Once the terminal’ SNR is lower than the default threshold γth , the transmission outage happens. The terminal’s outage probability is calculated by:  Po = P(γi, j < γth ) = P α γth ·σ02 ·di, j

Pi, j

=

√ 0

di,−αj · ξ · Pi, j σ02

 < γth

  (ξ − μ)2 dξ exp − 2σ 2 2π σ 1

(3)

Assuming that the edge terminal Di communicates with the BS directly, the outage probability can be denoted as Po (Di , BS) while it is Po (Di , C j ) when the edge terminal establishes a D2D link with the cellular terminal C j . Po (Di , C j ) is lower than the outage probability of communicating with BS directly. For the edge terminal Di , in order to determine the optimal cellular terminal which it could establish the D2D link with, we set a threshold  for each edge terminal. When the difference between the outage probability of communicating with the BS directly and that of communicating with the cellular terminal C j is larger than , the cellular terminal C j could be concluded into the potential D2D object set Ci . After cellular terminals set determined, the optimal to establish D2D link with needs to select.  arg max Po (Di , BS) − Po (Di , C j )

(4)

Cj

2.3 Problem Formulation When the D2D communication is built up, there exists co-channel interference. Assuming that the edge terminal Di establishes the D2D link with the cellular terminal C j and the D2D link reuses the subchannel resource of cellular terminal Ck . The uplink transmission rate of edge terminal Di and the cellular terminal Ck based on Shannon Capacity formula can be represented as follows, respectively:  R Di ,C j = B log2 (1 + γ Di ,C j ) = B log2 1 +

G Di ,C j · PDi ,C j G Ck ,C j · PCk ,B + σ02

 (5)

Resource Allocation Mechanism in Electric Vehicle Charging …

 RCk ,B = B log2 (1 + γCk ,B ) = B log2

G Ck ,B · PCk ,B 1+ G Di ,B · PDi ,C j + σ02

949

 (6)

where G Di ,C j , G Ck ,C j , G Ck ,B , G Di ,B denote the corresponding channel gain and PDi ,C j , PCk ,C j , PCk ,B , PDi ,B represent the uplink transmit power. B is the subchannel bandwidth. We have increased the access terminals number and improved the system coverage ability through establishing D2D communication link pairs for the edge terminals. To meet the requirements of the communication quality and reliability, the intent of this paper is maximizing the overall system throughput, i.e., the transmit rate sum of all the terminals. Then, the optimization problem is formulated as follows: max

K1

K2

rk,i (R Di ,C j + RCk ,B )

k=1 i=1 D C s.t. 0 ≤ PDi ,C j ≤ Pmax , 0 ≤ PCk ,B ≤ Pmax γ Di ,C j ≥ γth , γCk ,B ≥ γth K1 K2   rk,i ≤ 1, i ∈ {1, 2, . . . , K 2 }, rk,i ≤ 1, k ∈ {1, 2, . . . , K 1 } k=1

(7)

i=1

where the first two constraints are about the transmit power and SINR, respectively. The subchannel resource allocation index [rk,i ] K 1 ×K 2 denotes the subchannel reuse condition. rk,i = 1 denotes that the subchannel of the cellular terminal Ck is reused by the edge terminal Di , otherwise rk,i = 0.

3 Resource Allocation Algorithm For simplicity, the optimization problem is split into two sub-problems. At first, the power control algorithm is proposed in order to obtain the optimal uplink transmit power strategy set of the terminals sharing the subchannel resource.

3.1 Power Control Algorithm for Terminals Reusing the Subchannel We choose each channel reusing pair as the object. To achieve the intent of the overall throughput maximization, the sum rate of each channel reusing pair needs to be maximized. Therefore, the first sub-problem can be expressed as follows: P1 : max(R Di ,C j + RCk ,B )

950

Y. Wang et al. D C s.t. 0 ≤ PDi ,C j ≤ Pmax , 0 ≤ PCk ,B ≤ Pmax γ Di ,C j ≥ γth , γCk ,B ≥ γth

(8)

The co-channel interference needs to be mitigated through proper power control scheme for both the cellular terminals and the D2D terminals. For a certain channel reusing pair Ck and Di , their power strategy is constrained by the transmit power ability of the terminal and the SINR requirements to guarantee transmission reliability, according to inequalities above. The geometric programming method could be adopted. The optimal power set can be found in the feasible region, which is formed based on the calculation of the inequalities above and it will change due to different transmit power budgets and different channel conditions.

3.2 Optimal Channel Assignment Algorithm After the optimal power strategy set for each potential channel reusing pair determined, the optimal channel multiplexing assignment process can be conducted by formulating it into a bipartite graph matching problem. As shown in Fig. 1, the cellular terminals and the D2D terminals are the right and the left vertices in the bipartite graph, respectively. Each two vertices connected by an edge denote the channel reusing pair and the weight value of the edge represents the sum rate of these two terminals. The weight value is zero when the D2D terminal cannot multiplex the subchannel of the corresponding cellular terminal. Fig. 1 Bipartite graph matching model

Resource Allocation Mechanism in Electric Vehicle Charging …

951

The optimal channel assignment problem can be changed to a maximum weighted bipartite graph matching problem. The KM algorithm is adopted to obtain the optimal channel reuse matching solution efficiently and the specific steps are shown as follows: Step 1: The bipartite graph is denoted as G = (V, E). Map the edge terminal using D2D and the cellular terminal to the vertex sets X and Y, respectively. V = X ∪ Y (X ∩ Y = ∅). Then the edge set can be expressed by E ⊆ X × Y , where K2 K1 1 2 1 2 X = v1 , v1 , . . . , v1 , Y = v2 , v2 , . . . , v2 . Step 2: The label of vertex in X and Y is set as L 1,i (t) and L 2, j (t), respectively. The equation L 1,i (t) + L 2, j (t) = Wi, j (t) always satisfies. The initial vertex labels are set as: L 1,i (t) = max(Wi, j (t)) and L 2, j (t) = 0. Step 3: S ⊆ X and T ⊆ Y , which represents the candidate augmenting alternating path between the matching and the non-matching edges, respectively. Try to search a complete match with the Hungarian algorithm and obtain the optimal matching set, otherwise go to the Step 4. Step 4: Improve the labeling until find an augmenting path in the equality graph in order to add new edges to equality subgraph and expand the alternating tree. A slack array is defined to lower down the time complexity: To reduce the time complexity, a slack array is used: slack(y) = min {l(x) + l(y) − w(x, y)|x ∈ S}. Then delta  is calculated as the labeling increment:  = min{slack(y)|y ∈ Y \T }. Then the labeling of vertex r can be changed as follows: if r ∈ S, then l (r ) = l(r ) − ; if r ∈ T, then l (r ) = l(r ) + ; if r ∈ / S and r ∈ / T, then l (r ) = l(r ). Step 5: Repeat Steps 3 and 4 till the complete match of equality subgraph is found.

4 Simulation and Results The cell radius r is 500 m and the transmit power budget of the BS Pmax is 23 dBm. The unilateral power spectral density N0 is set to −174 dBm/Hz. The bandwidth of a subchannel is 3.75 kHz while the number of subchannels M is 5, 10, …, 25. The number of cellular terminals K 1 and D2D terminals K 2 are 100 and 50, respectively. The SNR threshold γth is 1, 2, …, 10 dB. The path loss is set to 128.1 + 37.6 log(d), d in Km. The coverage of D2D links is set to be 100 m several terminals at the edge of the cell will be activated randomly. System outage probability is shown in Fig. 2, which represent the coverage ability of NB-IoT cellular cell. Insufficient coverage of edge terminals causes a high probability of access interruption. The outage probability of our D2D paring mechanism is significantly less than the normal cellular network.

952

Y. Wang et al.

Fig. 2 System outage probability versus the SNR

The throughput of the system with varied number of channel resources is shown in Fig. 3. When the channel resources increase and more and more terminals can be available to access the system, throughput increases. Because of greater number of terminals in the system, when terminal number is 50, the throughput of the system is less than when terminal number is 100. Figure 4 shows that the throughput of D2D pairing terminals varies with system resources under different terminals. When terminal’s number is 100, the throughput is higher than when it is 50. When more terminals access to the system and the resource number is less than 10, the throughput of D2D pair terminal will increase.

Fig. 3 System throughput versus resource number

Resource Allocation Mechanism in Electric Vehicle Charging …

953

Fig. 4 D2D pair throughput versus resource number

5 Conclusion In this paper, an D2D-assisted coverage enhancement mechanism is proposed for NBIoT cellular system of electric vehicle charging. Firstly, the optimal cellular terminal for each edge terminal to establish D2D pair is determined based on transmission outage level. Secondly, a two-step resource allocation algorithm is introduced. The optimal power strategy set is obtained through the geometric programming and then the optimal subchannel allocation problem could be formulated into a weighted bipartite graph matching problem and the KM algorithm is adopted. Finally, numerical results show the benefits and performance of the proposed joint resource allocation algorithm. Acknowledgements This work is supported by 2018 State Grid Science and Technology project Research on multi-services and wide coverage-based NB-IoT technology for power applications.

References 1. Bedi, G., Venayagamoorthy, G.K., Singh, R., et al.: Review of internet of things (IoT) in electric power and energy systems. IEEE Internet Things J. 5(2), 847–870 (2018) 2. Li, Y., Cheng, X., Cao, Y., et al.: Smart choice for the smart grid: narrowband internet of things (NB-IoT). IEEE Internet Things J. 5(3), 1505–1515 (2017)

954

Y. Wang et al.

3. Chafii, M., Bader, F., Palicot, J.: Enhancing coverage in narrow band-IoT using machine learning. In: 2018 IEEE Wireless Communications and Networking Conference (WCNC), pp. 1–6. IEEE (2018) 4. Xu, T., Darwazeh, I.: Non-orthogonal waveform scheduling for next generation narrowband IoT. In: 2018 IEEE Globecom Workshops (GC Wkshps), pp. 1–6. IEEE (2018) 5. Cluzel, S., Franck, L., Radzik, J., et al.: 3GPP NB-IoT coverage extension using LEO satellites. In: 2018 IEEE 87th Vehicular Technology Conference (VTC Spring), pp. 1–5. IEEE (2018) 6. Lin, X., Andrews, J.G., Ghosh, A., et al.: An overview of 3GPP device-to-device proximity services. IEEE Commun. Mag. 52(4), 40–48 (2014) 7. Sun, J., Liu, T., Wang, X., et al.: Optimal mode selection with uplink data rate maximization for D2D-aided underlaying cellular networks. IEEE Access 4, 8844–8856 (2016) 8. Mishra, P.K., Kumar, A., Pandey, S.: Minimum interference based resource al-location method in two-hop D2D communication for 5G cellular net-works. In: 2017 International Conference on Intelligent Sustainable Systems (ICISS), pp. 1191–1196. IEEE (2017) 9. Bhardwaj, A., Agnihotri, S.: Energy-and spectral-efficiency trade-off for D2D-multicasts in underlay cellular networks. IEEE Wirel. Commun. Lett. 7(4), 546–549 (2018) 10. Yang, J., Ding, M., Mao, G., et al.: Analysis of underlaid D2D-enhanced cellular networks: interference management and proportional fair scheduler. IEEE Access (2019) 11. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Futur. Gener. Comput. Syst. 96, 111–118 (2019) 12. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007)

Computation Resource Allocation Based on Particle Swarm Optimization for LEO Satellite Networks Shan Lu, Fei Zheng, Wei Si, and Mengqi Liu

Abstract A distributed computing architecture for computation offloading and data processing in low earth orbit (LEO) satellite networks without transmitting data back to the ground station, so that the task execution time is minimized, is introduced in this paper. Current computational resource allocation schemes are not applicable to the LEO satellite networks and can be classified as an optimal solution problem with constraints. To obtain the optimal solution of this problem, the group intelligent optimization algorithm is utilized to approach the minimum task execution time and the influence of CPU frequency and transmission rate, and channel delay is considered synthetically. Besides, considering the task execution time is mainly determined by the processing power, the processing power of each satellite is evaluated and transformed into the weight to adjust the velocity of the particle in particle swarm optimization (PSO) algorithm. Numerical results demonstrate that the improved algorithm has faster convergent speed than the PSO algorithm and costs less time for task execution. Keywords LEO satellite networks · Computation offloading · Particle swarm optimization

1 Introduction Low earth orbit (LEO) satellite networks are generally composed of multiple low orbit satellites, ground stations and network operation control centers [1], which will play an important role in the evolving information infrastructure [2]. Due to S. Lu · F. Zheng (B) · W. Si The 54th Research Institute of China Electronics Technology Group Corporation, 050081 Shijiazhuang, China e-mail: [email protected] F. Zheng Guilin University of Electronic Technology, 541004 Guilin, China M. Liu Jilin University, 130012 Changchun, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_94

955

956

S. Lu et al.

the distributed architecture of satellite constellations, LEO satellite networks can be used as backbone networks to interconnect autonomous systems worldwide [3]. Satellite data are traditionally transmitted back to the ground station via satelliteto-ground links for further processing and analyzing. However, the task execution time of this architecture, which is based on the processing of satellite-to-ground links (CSGLs), is so long that it cannot effectively support the latency-sensitive applications such as disaster relief and combat attacks [4]. In order to reduce the task execution time and to avoid the transmission delay of satellite-to-ground links, it has become a trend that the computing performed at the ground stations is replaced by that at the satellites. Nevertheless, the computing power of onboard computers for each satellite is limited [5], and the task execution time for the computing on satellites is limited by the computing power. Therefore, device-to-device edge computing and networks (D2D-ECN) [6] are introduced into LEO satellite networks to enhance the computing power, where mobile devices are now LEO satellites. Those satellites can share computation resources with each other in collaborative manners by inter-satellite cross-links. Taking advantage of the lower latency and higher transmission rate via inter-satellite cross-links, the total computation ability of a group of LEO satellites can approach or even exceed the ground station because of the distributed D2D-ECN architecture. In LEO satellite networks, the inter-satellite cross-links can last at least a few minutes [7], which is longer than the task execution time. Thus, the relative position between LEO satellites is relatively stationary, and the topology of inter-satellite cross-links is fixed within the task execution time. According to the characteristics of this scenario mentioned above, an efficient computation resource allocation scheme to reduce task processing latency is proposed.

2 System Model In order to reduce the complexity of routing, satellites are generally designed to connect with adjacent satellites by inter-satellite links (ISLs), and communication relay is not supported. There are two types of ISLs: intra-plane ISLs connecting satellites with the same orbit and inter-plane ISLs connecting satellites with adjacent orbits [8]. The distributed computing architecture of D2D-ECN consists of a master LEO satellite (MLS) and a group of secondary LEO satellites (SLSs) in LEO satellite networks. The MLS can off-load its tasks to the connected SLSs according to their available resources and current channel state. The group of LEO satellites is indexed by i ∈ I , I = {0, 1, . . . , 4}, where i = 0 indicates the MLS with computation tasks, and i = {1, . . . , 4} is a set of SLSs with abundant computation resources. The total task execution time includes computation latency and communication latency [9, 10]. The computation latency depends on the scale of computation tasks and CPU frequency resource. Assume that Ci is the CPU frequency for LEO satellite i and pi is a ratio of the computation of tasks for LEO satellite i to the computation

Computation Resource Allocation Based on Particle Swarm …

957

of all tasks. Consequently, the computation latency for processing tasks D can be expressed as ticom ( pi ) =

pi ∗ D , i∈I Ci

(1)

The communication latency consists of two parts: the transmission delay and channel delay. The transmission delay can be calculated as pi ∗ D/R Si S j , where R Si S j is the transmission rate from the LEO satellite i to LEO satellite j. In addition, the channel delay between LEO satellite i and LEO satellite j is given as l Si S j . Hence, communication latency can be written as tid2d ( pi ) =

pi ∗ D + l Si S j , i ∈ I, j ∈ I R Si S j

(2)

Based on the distributed D2D-ECN architecture, the total task execution time depends on the longest task completion time of all assigned computation tasks at MLS or SLSs. As a result, the total task execution time be calculated as   p0 ∗ D p0 ∗ D p4 ∗ D p4 ∗ D (3) t (p) = max + + l S0 S0 , . . . , + + l S0 S4 C0 R S0 S0 C4 R S0 S4 We can obtain the optimal solution of computation resource allocation problem, which makes the task execution time minimum. In conclusion, the computation resource allocation problem is an optimal solution problem with constraints and the object function can be expressed as p = arg min{t (p)} s.t. pi ≥ 0,

4 

pi = 1

(4)

i=0

3 Optimal Solution to the Computation Resource Allocation Problem In order to solve the problem in Eq. (4), the group intelligent optimization algorithm is utilized to approach the minimum task execution time. According to Eq. (3), the task execution time of LEO satellite is mainly determined by the processing capacity, including CPU frequency and transmission rate. Hence, we can transform processing capacity into weight for the learning process of the group intelligent optimization algorithm [11], to achieve faster convergence speed. The weight is denoted as a vector W = w0 , w1 , . . . , w4 which is defined as

958

S. Lu et al.

W=

S S

(5)

where S = S0 , S1 , . . . , S4 is defined as processing capacity of LEO satellite, and it can be calculated as Si =

Ci ∗ R S0 Si , i∈I Ci + R S0 Si

(6)

Particle swarm optimization (PSO) [12] is a population-based global optimization technique inspired by the social behavior of bird flocks looking for corn. PSO is an evolutionary algorithm, and the optimum is approached by updating generations. In PSO, the potential solutions called particles are made of search space, position and velocity. An N-dimensional search space, position and velocity for the ith particle are represented by Xi = xi1 , xi2 , . . . , xi N and Vi = vi1 , vi2 , . . . , vi N . Assume that the best-known position of the ith particle is represented by Pi = pi1 , pi2 , . . . , pi N and the local best of the ith particle is represented by G = gi1 , gi2 , . . . , gi N . In 1999, Clerc introduced a constriction factor K that may be necessary to ensure convergence of PSO [13]. The velocity and position can be expressed as follows: Vi = K [Vi + ϕ1 rand ∗ (Pi − Xi ) + ϕ2 rand ∗ (Gi − Xi )]

(7)

2  , ϕ = ϕ1 + ϕ2 , ϕ > 4 K =    2 − ϕ − ϕ 2 − 4ϕ 

(8)

Xi = Xi + Vi

(9)

where K = 0.729 is used as normally given in the literature [14]. Through the definition of PSO, we can obtain the best position which is the optimal solution of object function for the computation resource allocation problem. Moreover, the best position is mainly determined by the processing power and adapted by the velocity of every agent during each generation. Therefore, adding the weight that is converted by processing capacity into the adjustment process of velocity can achieve faster convergence speed. Equation (7) can be expressed as follows: Vi = wK [Vi + ϕ1 rand ∗ (Pi − Xi ) + ϕ2 rand ∗ (Gi − Xi )]

(10)

where w is the weight of processing capacity. The detailed PSO with weight (PSOW) can be summarized as follows: Step 1: Initialize the parameters such as the number of particles, position and velocity. Step 2: Calculate the weight based on Eq. (5). Step 3: Update velocity of particles based on Eq. (10). Step 4: Update position of particles based on Eq. (9).

Computation Resource Allocation Based on Particle Swarm …

959

Step 5: Update the best-known position and the local best position of particles. Step 6: If the local best position attains the value as expected, then go to Step 7 or else go to Step 3. Step 7: Stop.

4 Performance Analysis and Evaluation The performance of our proposed distributed computing architecture of D2D-ECN for LEO satellite networks will be evaluated in this section. Also, we will compare the PSOW algorithm with PSO algorithm and ant colony optimization (ACO) algorithm. We set the CPU frequency of LEO satellites as C = [100, 120, 90, 95, 70] MHz. The transmission rate and channel delay between MLS and SLSs are, respectively, set to be R = [∞, 25, 25, 25, 25] Mbps and l = [0, 40, 40, 40, 40] ms. Besides, the task generation rate of MLS is set to range from 10 Mbit to 1 Gbit. Figure 1 compares CSGLs architecture and D2D-ECN architecture by evaluating the total task execution time while the CPU frequency of ground station, transmission rate and channel delay are set to be 10 GHz, 1.4 Mbps and 110 ms, respectively. We can observe that the task execution time required by D2D-ECN architecture is only 1/100 of that by CSGLs architecture. In LEO satellite networks, the total computation capacity between D2D-ECN architecture and CSGLs architecture is close. However,

Fig. 1 Execution time with different architecture of data processing

960

S. Lu et al.

Fig. 2 Execution time with different algorithm

the transmission rate, which is the main limitation for processing power, of CSGLs architecture is lower than that of D2D-ECN architecture. The comparison between PSOW algorithm, PSO algorithm and ACO algorithm is shown in Fig. 2. From Fig. 2, we can conclude that the total task execution time of the ACO algorithm is longer than that of PSOW algorithm and PSO algorithm. Thus, the PSOW algorithm and PSO algorithm are more suitable for the computation resource allocation scheme in LEO satellite networks. Besides, the curve of PSOW coincides with PSO, so that adding the weight does not affect the optimal solution. The impact of weight on the convergence speed of the PSO algorithm is shown in Fig. 3. This figure shows that the number of generations required by PSOW algorithm to obtain the optimum value is less than the PSO algorithm, which means the PSOW algorithm converges to the optimum value more quickly. Due to the proposed weight is able to correctly reflect the adaption trend of velocity in the learning process, it ensures a faster convergence rate of PSOW algorithm than PSO algorithm to obtain an optimal solution.

5 Conclusion In this paper, the D2D-ECN architecture is introduced to design an efficient computation resource allocation scheme to reduce task processing time. To propose the scheme, the total task execution time is formulated as an optimal solution problem

Computation Resource Allocation Based on Particle Swarm …

961

Fig. 3 Convergence speed with different algorithm

with constraints. Furthermore, we propose the PSOW algorithm based on PSO algorithm with the weight of velocity to obtain the optimal solution. Compared with the PSO algorithm and ACO algorithm, numerical results validate the effectiveness of our proposed schemes. Acknowledgements The work presented in this paper has been supported by the Special Program of Guangxi Science and Technology Base and Talents (2018AD19048) and Dean Project of Key Laboratory of Cognitive Radio and Information Processing, Ministry of Education (CRKL180104).

References 1. Zhang, N., Zhang, S., Yang, P., Alhussein, O., Zhuang, W., Shen, X.S.: Software defined space-air-ground integrated vehicular networks: challenges and solutions. IEEE Commun. Mag. 55(7), 101–109 (2017) 2. Akyildiz, I.F., Uzunalio˘glu, H., Bender, M.D.: Software defined space-air-ground integrated vehicular networks: challenges and solutions. Mob. Netw. Appl. 4(4), 301–310 (1999) 3. Papapetroua, E.P., Karapantazisb, S., Pavlidoub, F.N.: Distributed on-demand routing for LEO satellite systems. Comput. Netw. 51(15), 4356–4376 (2007) 4. Bi, M.G., Xu, W.L., Hou, R.H.: An on-demand transmission mechanism for LEO remote sensing satellite (2019). https://doi.org/10.13700/j.bh.1001-5965.2018.0609 5. George, A.D., Wilson, C.M.: Onboard processing with hybrid and reconfigurable computing on small satellites. Proc. IEEE 106(3), 458–470 (2018) 6. Qiao, G.H., Leng, S.P., Zhang, Y.: Online learning and optimization for computation offloading in D2D edge computing and networks. https://doi.org/10.1007/s11036-018-1176-y

962

S. Lu et al.

7. Keller, H., Salzwedel, H.: Link strategy for the mobile satellite system Iridium. Proc. Veh. Technol. Conf. 2, 1220–1224 (1996) 8. Liu, G., Gou, D.Y., Wu, S.Q.: A handover strategy in the LEO satellite-based constellation networks with ISLs. J. Electron. Sci. Technol. China 1(1), 22–28 (2003) 9. Ren, Z.Y., Hou, X.W., Gou, K., Zhang, H.L., Chen, C.: Distributed satellite cloud-fog network and strategy of latency. J. Zhejiang Univ. (Eng. Sci.) 52(8), 1475–1481 (2018) 10. Shen, J.F., Teng, X.Y., Li, W.M., Wang, B.: Computational unloading strategy based on improved auction model in mobile edge computing. Appl. Res. Comput. 37(6), 1–6 (2019) 11. Lhotska, L., Macas, M., Bursa, M.: PSO and ACO in optimization problems. In: Intelligent Data Engineering and Automated Learning, pp. 20–23 (2006) 12. Mauricio, Z.B., Maurice, C.: Standard particle swarm optimisation 2011 at CEC-2013: a baseline for future PSO improvements. In: 2013 IEEE Congress on Evolutionary Computation, pp. 2337–2344 (2013) 13. Naik, B.B., Raju, C.P., Rao, R.S.: A constriction factor based particle swarm optimization for congestion management in transmission systems. Int. J. Electr. Eng. Inform. 10(2), 232–240 (2018) 14. Salameh, M.S.A., Ababneh, M.M.: Selecting printed circuit board parameters using swarm intelligence to minimize crosstalk between adjacent tracks. Int. J. Numer. Model. Electron. Netw. Devices Fields 28(1), 21–32 (2015)

Security Analysis and Protection for Charging Protocol of Smart Charging Pile Jiangpei Xu, Xiao Yu, Li Tian, Jie Wang, and Xiaojun Liu

Abstract The charging protocol between electric vehicles and smart charging piles is venerable to security threats, such as eavesdropping, tampering, and DDoS attack due to lacking the security analysis and protection mechanism. In this paper, we analyze the structure of charging pile system, the message transmitted during charging, and the security threats of charging protocol. Aiming at the security threats of the charging protocol, we present a secure authentication mechanism based on cryptography to solve the security issues. Keywords Charging pile · Electric vehicle · Charging protocol · Security protection

1 Introduction Electric vehicle (EV) is rapidly promoted around the world due to its advantages of zero emission, low noise, and low operating cost. The number of electric vehicles is growing at an alarming rate. According to the 2019 statistics of the China association of automobile manufacturers, China sold 1.25 million electric vehicles in 2018, accounting for more than half of the world’s electric vehicle sales. Although the number of charging piles has exploded, the security issues of smart charging piles become increasingly serious and need to be resolved urgently [1]. In this paper, we firstly introduce the structure of charging pile and the message sent in charging stage. Then the principle and security threats of charging protocol between charging piles and electric vehicles are depicted and analyzed. We found attackers could impersonate a normal user and send false messages to a charging pile due to lacking the authentication of charging protocol, which can cause charging J. Xu (B) · X. Yu · L. Tian · J. Wang State Grid Hubei Electric Power Research Institute, 430077 Wuhan, China e-mail: [email protected] X. Liu Information and Communication Department of State Grid, Yichang Electric Power Supply Company, 443000 Yichang, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_95

963

964

J. Xu et al.

piles to shut down or stop working and result in the DDoS attacks to charging piles. Finally, aiming at the authentication issues on the charging protocol, the authentication mechanism for charging protocol is presented. It can effectively prevent the attacker from disguising as an electric car or send false information to the charging pile.

2 Related Work Recently, there is little research work about the security of smart vehicle charging protocol. The related work is mainly about CAN protocol security. Since charging protocol is based on CAN, the following work is introduced. Andreea-Ina Radu proposed a lightweight CAN authentication protocol LeiA [2] in 2015, which allows ECUs on cars to authenticate with each other, thus resisting multiple attacks. LibrACAN [3] and CAN Auth [4] are two lightweight authentication protocols for CAN. Both solutions use CAN + protocol, which was proposed by Ziermann [5] and others in 2009. CAN + protocol is based on the existing CAN bus structure and sent in the time gap when the CAN node on the bus is not in the listening state, which improving the efficiency of data transmission. Groza et al. [6] proposed a secure broadcast authentication protocol in CAN bus in 2013. Woo et al. [7] proposed a vehicle CAN security protocol in 2015. It uses the Advanced Encryption Standard (AES) algorithm [8] and message authentication code MAC to encrypt and authenticate CAN data frames. The existing work is mainly focused on the security of CAN protocol for cars instead of charging protocol between charging piles and electric vehicles. Instead of focusing on car CAN protocol, we discuss the security threats and protection scheme of the charging protocol. Our work is a practical and systematic research for the security analysis of electric vehicles charging protocol.

3 The Architecture of Charging Pile System and Messages Transmitted During Charging 3.1 System Architecture Figure 1 briefly introduces the internal structure diagram of DC charging pile, which is mainly composed of seven basic units. The following seven components are described in detail as follows: • Power unit: The charging module of the direct current (DC) charging pile and its function is to receive the input voltage and increase the voltage after output. The

Security Analysis and Protection for Charging Protocol …

965

Fig. 1 Structure diagram of charging pile

• • •







input of the DC charging pile is three-phase AC, the voltage requirement is 380 V, the frequency is 50 Hz, and the output is DC. The voltage range can be controlled. Card reader: It is installed on the front of the charging pile; the user can pay the electricity charge by swiping the card. Charging controller: Its main function is to control the charging. When the system detects that the battery of the electric car has been full, the charging controller will automatically power off and stop the charging process. Charging control unit: It is known as TCU and is the charging standard unit published by the state grid and used in charging piles. Its main function is to charge and connect with a display screen, electricity meter and the vehicles management platform. It provides the ability to interact with users, communicates with the background, and read the electricity meter. Charging gun: The specific function is to insert into the charging jack of the electric car, establish a physical connection with the car, and provide charging. The gun head of the DC charging pile is slightly different from that of an AC (alternating current) charging pile. The gun head of the former is a nine-line plug, while the gun head of the latter is a seven-line plug. Display screen: It is a human–computer interaction interface. The display screen is connected with the billing control unit. The whole screen is a touch screen. The user can interact with the charging pile through this unit, including starting charging, ending charging, settling charging charges, etc. Urgent stop button: If there is an accident or failure during charging, it is necessary to stop charging urgently. You can press the emergency stop button to stop the output current of the charging pile immediately. The charging process can be stopped by pressing and can be reset by rotating the button 180°.

966

J. Xu et al.

Fig. 2 Message transmitted during the charging stage

3.2 Message Transmitted During Charging When the charging pile communicates with battery management system (BMS) of the car, it passes through four stages, namely charging handshake stage, charging parameter configuration stage, charging stage, and charging end-stage. We found in the experiment that, among the four phases, the charging phase lasts the longest and sends the most messages, so the possibility of security problems and vulnerabilities in the charging phase is the greatest. In this section, a more detailed introduction will be made to the charging stage. The main function of the message sent in the charging phase: allow the charger to adjust the charging voltage and current according to the battery charging requirements, to ensure the normal charging process. If the charger does not receive the message within 1 s, that is, a timeout error occurs, and the charger immediately ends charging. The message sent in the charging phase is shown in Fig. 2.

4 Security Threats of Charging Protocol Between Charging Pile and the Electric Vehicle In the real world, charging piles may face the following security threats [9].

Security Analysis and Protection for Charging Protocol …

967

4.1 Privacy Disclosure In the communication protocol of charging pile, information of electricity charge measurement, equipment information of user’s vehicle, and voltage and current contained in communication message should be transmitted on the channel. Therefore, the primary security requirement is to adopt a modern encryption algorithm to protect this data and hide some sensitive information about vehicles and charging piles.

4.2 Message Tampering Since the charging protocol adopts the industrial bus-protocol, the data transmitted on it is at risk of being monitored and tampered with. If an attacker intercepts the charging data, tampers it, and sends forged packets to the channel, it will not only attack the charging pile system but also affect the data security of the management back-end of charging pile.

4.3 Message Replay Attack The charging protocol is a broadcast protocol. An attacker can eavesdrop on messages transmitted over the channel and then repeatedly send out the same messages to the channel. Sometimes, even if the transmitted message is correct, incorrect amount of data or incorrect transmission time can also cause fault of charging pile.

5 Security Detection and Protection Schemes for Charging Protocol 5.1 Conformance Testing and Interoperability Testing

Protocol conformance testing [10] Conformance testing is an important aspect of CAN protocol testing, which mainly determines whether the tested implementation is consistent with the standard. In the process of consistency test, the test tools include: CAN card, oscilloscope, power supply, and other equipment. Besides, we also use a CANDT consistency test system which integrates oscilloscope, power supply, and other necessary equipment. This system is based on the analysis capability of CANScope, which covers the standard of CAN bus consistency test of the charging pile. With this system, the CAN bus consistency test CAN be fully automated.

968

J. Xu et al.

Protocol conformance testing includes low-voltage auxiliary charging and charging handshake, charging parameter configuration, charging stage, and charging end. Before the CAN protocol of charging piles is tested for conformance, it is necessary to fill in the static document and prepare the test system. The implementation conformance declaration of the protocol shall be executed by the provider and tested. Protocol interoperability testing Interoperability testing is to determine whether the equipment tested by CAN protocol can fulfill the relevant requirements. The operability testing of charging piles includes self-inspection phase testing, insulation failure testing, charging preparation testing, charging phase testing and communication interruption testing, vehicle interface disconnection testing, another charging failure testing, normal charging junction testing.

5.2 Security Protection of CAN Protocol From the above analysis, we can find that the main reason for the above problems is that CAN protocol does not have the mechanism of identity authentication. Hence, we present an authentication mechanism for the smart charging protocol. The authentication scheme is designed according to the specification definition of multi-frame message transmission in SAE-J1939-21 standard protocol. The charging stage is the longest in the charging process. The charging pile needs to continuously output electricity to charge the battery until it is full or the user stops charging. In the charging phase, messages need to be continuously transmitted between the charging pile and BMS to ensure that the connection will not be interrupted. If the correct message sent by the other side is not received after 5 s, the charging pile system will judge the message transmission timeout. If a timeout occurs, the charging pile and the BMS will send an error message and then enter the error handling state. There are three extremely sensitive messages, BRM (BMS in charging handshake stage and vehicle identification message BRM), BCP (power battery charging parameter message in charging parameter configuration stage), and BCL (battery charging demand message in charging stage). If the message data does not meet the requirements, it will directly cause the charging pile to stop. Data errors of other messages have little impact on charging piles. Therefore, the authentication scheme of this section is mainly for these sensitive messages. Figure 3 shows the authentication process of charging process in the protection scheme. In this scheme, additional message verification codes need to be added to the charging pile and electric vehicle BMS to carry out identity authentication. Through the verification, the messages with authentication code are sent to the receiver, the charging pile can determine whether the received messages are real, rather than the forged messages by attackers. In this way, the charging pile communication protocol with the protection mechanism can resist replay attacks and man-in-the-middle attacks.

Security Analysis and Protection for Charging Protocol …

countB become a 0

BMS seed, countB

Charging pile seed, countA request

(A1) generate random number R (A2) put R in the response Response+R message and send it to BMS

(B1) send multi-frame request message (B2) receives random number R (B3)MacB=Hash(seed||R ||countB)

(A3)Calculate MacA=Hash(seed||R||countA)

(B4) put MacB into the last 32 bits of data field and send data frames one by one (B5) every frame sent is counterB++

No

969

Has the data frame been sent? Yes

data

MacB ...

Authentication failed Retransmission packet

No

(A4)Every time we receive a frame, Acount ++

MacA=MacB? Yes

(B6)new_seed= Hash(seed||countB)

End of reception?

No

Yes No

13...

countA

countA=countB? Yes

(A5)new_seed=Hash(seed|| countA) sends countA to BMS in the end reply message

Both sides update seed=new seed Fig. 3 Architecture of authentication mechanism for data frames

6 Conclusion In this paper, we depict and analyze the framework of the charging pile system and the messages transmitted between electric vehicles and charging piles. Then, the possible security threats of electric vehicles charging protocol are presented. Furthermore, we mention about how to ensure the foundation safety of charging piles through consistency testing and interoperability testing. Finally, the secure authentication mechanism based on cryptography is proposed to solve the potential security issues of the charging protocol.

970

J. Xu et al.

References 1. Xcar: China (Online). https://baijiahao.baidu.com/s?id=1634251014547771780. Accessed on 5 May 2019 2. Radu, A.I., Garcia, F.D.: LeiA: a lightweight authentication protocol for CAN. In: European Symposium on Research in Computer Security, pp. 283–300 (2016) 3. Groza, B., Pal-Stefan, M.: LiBrA-CAN: a lightweight broadcast authentication protocol for controller area networks. CANS (2012) 4. Van, H., Singelee, D., Verbauwhede, I.: CAN Auth-a simple, backward compatible broadcast authentication protocol for CAN bus. In: ECRYPT Workshop on Lightweight Cryptography (2011) 5. Ziermann, T., Wildermann, S., Teich, J.: CAN+: a new backward-compatible controller area network (CAN) protocol with up to 16× higher data rates. In: Automation & Test in Europe Conference & Exhibition, Nice, pp. 1088–1093 (2009) 6. Groza, B., Murvay, S.: Efficient protocols for secure broadcast in controller area networks. IEEE Trans. Ind. Inform. 2034–2042 (2013) 7. Woo, S., Jo, H.J., Lee, D.H.: A practical wireless attack on the connected car and security protocol for in-vehicle CAN. IEEE Trans. Intell. Transp. Syst. 993–1006 (2015) 8. Niels, F., John, K., Stefan, L., et al.: Improved Cryptanalysis of Rijndael. In: Fast Software Encryption, pp. 213–230 (2000) 9. Cai, N., Yeung, R.W.: Secure network coding. In: Proceedings IEEE International Symposium on Information Theory (2002) 10. Zheng, G., Jia, Y.L.: Field bus conformance test and interoperability test. Electron. Qual. 6, 12–16 (2002)

The Power Distribution Control Strategy of Fully Active Hybrid Energy Storage System Based on Sliding Mode Control Zhangyu Lu, Chongzhuo Tan, and Liang Zheng

Abstract In view of the problem of insufficient driving distance of electric vehicles, the supercapacitor (SC) and DC/DC converter are connected in parallel to form a fully active hybrid energy storage system (HESS), in which the battery is used as the main power source, and the SC is used as the auxiliary power source, and they are connected to the bus through a bidirectional DC/DC converter. A power distribution control strategy based on sliding mode control is proposed. The proposed control strategy includes a sliding mode controller to accurately track the reference values of battery and supercapacitor current, a voltage controller is used to maintain bus voltage stability, and the stability analysis is based on the Lyapunov method. The simulation results show that the proposed sliding mode control strategy can accurately track the reference value of the battery and SC current, and stabilize the bus voltage. The effectiveness of the proposed control strategy is fully proved. Keywords Electric vehicle · Hybrid energy storage system · Energy management · Power distribution · Slide mode control

1 Introduction With the increasing emphasis on the ecological environment, the most important development direction of the automotive industry is electric vehicles. However, one of the important reasons for the widespread popularity of electric vehicles is that electric vehicles have short driving distance. The battery has a high energy density, but cannot withstand the transient high current charge and discharge, and cannot meet the needs of automotive performance [1]. The SC has high power density and long cycle life, so the SC and the battery are complemented and combined with the bidirectional DC/DC converter to form a HESS, which can effectively recover the

Z. Lu (B) · C. Tan · L. Zheng Hunan Institute of Engineering, 411104 Xiangtan, Hunan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_96

971

972

Z. Lu et al.

regenerative braking energy and improve the driving distance of the electric vehicle. It has strong research significance and practical value [2]. According to the existing research on HESS, Jung et al. proposed an advanced energy storage topology for HESS, but the practicability and effectiveness of the structure need to be verified [3]. Ayad et al. used the fuel cell and the SC to form a HESS, but currently the fuel cell technology is not mature enough and the cost is too high [4]. Rotenberg et al. linearized the power requirement of automobile with the state of charge of the battery and the SC. The control rules are simple and easy to implement. However, HESS belongs to a nonlinear system, and the control stability of the nonlinear system is not strong by using linear control strategy [5]. Based on the above research on HESS, in order to achieve accurate tracking of load power changes and improve the driving distance of electric vehicles, this paper chooses fully active HESS topology as the energy storage device of electric vehicles. Aiming at the power allocation problem of electric vehicle during driving, a power distribution control strategy based on sliding mode control is proposed. The control strategy includes a sliding mode current controller that accurately tracks the reference values of battery and supercapacitor current, and a voltage controller is used to stabilize the bus voltage. The effectiveness of the proposed control strategy is verified by simulation.

2 Hybrid Energy Storage System (HESS) The topology of the fully active HESS is shown in Fig. 1. The battery is used as the main power source to connect to the bus through a bidirectional DC/DC converter to provide average power to the load. The SC is used as an auxiliary power source to connect to the bus through a bidirectional DC/DC converter to provide peak power to the load. In order to simplify the model, the internal resistance of battery and SC is neglected. V dc , V bat , and V sc are the voltage values of corresponding capacitors C 0 , C 1 , and C 2 . As Fig. 1 shows, the battery is equivalent to the DC voltage source E bat , the output current is ibat , the supercapacitor is equivalent to the ideal capacitor E sc , and the output current is isc . The bidirectional DC/DC converter consists of two insulated gate bipolar translators (IGBTs), one capacitance, and one inductor. Two IGBTs run synchronously. When S 1 is closed, S 2 opens, and S 3 and S 4 run in the same state as S 1 and S 2 . The duty cycle of IGBT varies from 0 to 1 and is expressed as Di (i equals 1, 2, 3, 4). The average global model in the switching period can be obtained as follows: R1 Vdc Vbat di bat = −(1 − D1 ) − i bat + dt L1 L1 L1

(1)

di sc R2 Vdc Vsc − i sc + = −(1 − D3 ) dt L2 L2 L2

(2)

The Power Distribution Control Strategy of Fully Active …

973

Bidirectional DC/DC converter 1

ibat

iload

Vbat

Vdc

DC/AC

Z

isc

Vsc

Bidirectional DC/DC converter 2

Fig. 1 Topology of fully active hybrid energy storage system

dVdc i bat i sc i load = (1 − D1 ) + (1 − D3 ) − dt C0 C0 C0

(3)

3 Design of Sliding Mode Control Strategy 3.1 Energy Management Strategy This paper chooses a rule-based control strategy, which has the characteristics of simple and easy to implement. The specific design is shown in Fig. 2. Where Pmin is the threshold power, Preq is the load demand power, V sc is the SC voltage value, SOCbat is the battery state of charge, V sc,min is 25% of the SC rated voltage, V sc,max is the SC rated voltage of 90%, SOCbat,min is 25% of the rated state of charge of the battery, SOCbat,max is 90% of the rated state of charge of the battery, and Pch is the charging power of the SC. It is noteworthy that the control strategy proposed in this paper can be used with any energy management strategy and has strong practicability.

974

Z. Lu et al. Preq>0

Preq

Pmin

VSC > VSC,max

SOCbat > SOCbat,min

SOCbat > SOCbat,min

SOCbat > SOCbat,min

Pbat=Pmin Pbat=0 Pbat=Preq+Pch PSC=Preq - Pmin PSC=Preq PSC=0

Pbat=Preq PSC=0

Pbat=0 PSC=0

VSC > VSC,min

Pbat=0 PSC=Preq

Pbat=0 PSC=0

VSC < VSC,max

Pbat=0 SOCbat>SOCbat,max PSC=Preq Pbat=0 PSC=0

Pbat=Preq PSC=0

Fig. 2 Flow chart of rule-based strategy

3.2 Design of Sliding Mode Controller In order to achieve the first control objective: accurately track the battery and supercapacitor current, a sliding surface can be introduced: S = [s1 , s2 ]T

(4)

s1 = i bat − i bat-ref

(5)

s2 = i sc − i sc-ref

(6)

The reference value of battery current ibat-ref obtained from energy management strategy: i bat-ref =

Pbat Vbat

(7)

The circuit loss is ignored, and the reference value of supercapacitor current isc-ref can be obtained from the principle of power conservation: i sc-ref =

Vdc i load − Vbat i bat Vsc

(8)

In order to achieve the second control goal: stabilizing bus voltage, bus voltage feedback control can be adopted, and error variables can be introduced: e = Vdc-ref − Vdc

(9)

The Power Distribution Control Strategy of Fully Active …

975

The V dc is the bus voltage value under actual working conditions, and V dc-ref is the bus voltage reference value, and the control law can be obtained:  u(t) = K p e + K I

edt

(10)

where K P is the proportional coefficient and K I is the integral coefficient. Combining (8) and (10), isc-ref can be chosen as:  Vdc (K P e + K I edt)+Vdc i load − Vbat i bat i sc-ref = (11) Vsc Since the values of s1 and s2 are smaller, the more accurate the battery, the more accurate the SC current tracking is. Derivation of s1 and s2 can be obtained: s˙1 = i˙bat − i˙bat-ref

(12)

s˙2 = i˙sc − i˙sc-ref

(13)

Combining (1) and (2), the following can be obtained: s˙1 = −(1 − D1 )

R1 Vdc Vbat − i bat + L1 L1 L1

(14)

R2 Vdc Vsc − i sc + L2 L2 L2

(15)

s˙2 = −(1 − D3 )

From the exponential reaching law of sliding mode variable structure, it can be concluded that: s˙1 = −k1 s1 − ε1 sgn(s1 )

(16)

s˙2 = −k2 s2 − ε2 sgn(s2 )

(17)

where k 1 , k 2 , ε1 , ε2 are constants greater than 0. Combining (14), (15), (16), (17), the following control laws can be obtained: D1 = 1 + i bat

R1 L1 L1 Vbat − − k1 (s1 ) − ε1 sgn(s1 ) V0 V0 V0 V0

(18)

D3 = 1 + i sc

R2 L2 L2 Vsc − − k2 (s2 ) − ε2 sgn(s2 ) V0 V0 V0 V0

(19)

In order to prove the stability of the system, the Lyapunov function is established for (4):

976

Z. Lu et al.

V =

1 T S S 2

(20)

The derivative is: V˙ = s1 (−k1 s1 − ε1 sgn(s1 )) + s2 (−k2 s2 − ε2 sgn(s2 ))

(21)

Since k 1 , k 2 , ε1 , ε2 are constants greater than 0, (21) can be rewritten as follows: V˙ = −k1 s12 − ε1 |s1 | − k2 s22 − ε2 |s2 |

(22)

It can be seen from (22) that V˙ ≤ 0 is invariable. According to Lyapunov’s second method, the system is globally asymptotically stable.

4 Simulation Results To verify the effectiveness of the power distribution control strategy for fully active hybrid energy storage system based on sliding mode control proposed in this paper, the fully active hybrid energy storage system model was built in MATLAB/Simulink. The load motor is replaced by the control current source. The bus voltage reference is set to 220 V. The initial SOC value of the battery is set to 90%, and the initial voltage is set to 180 V. The initial voltage of the SC is set to 150 V. The Pmin in the energy management strategy is set to 60 kW. The SC charging power Pch is set to 2 kW. The proportional coefficient K P is set to 3. The integral coefficient K I is set to 1. The remaining parameters are shown in Tables 1 and 2. Since the driving environment of electric vehicles is mainly urban roads, the cycle conditions of typical cities in China are selected for evaluation. The power requirements of typical urban conditions in China are shown in Fig. 3. The simulation results are shown in Fig. 4. It can be seen that when the load power changes, the reference value of battery and SC current can always be accurately tracked, the error Table 1 Parameter of controller

Parameter

Value

L 1 , Battery side inductance (µH)

260

L 2 , SC side inductance (µH)

180

R1 , Inductor series resistance ()

0.25

R2 , Inductor series resistance ()

0.16

C 0 , Load side capacitance (mF)

15

C 1 , Battery side filter capacitance (mF)

70

C 2 , SC side filter capacitance (µF)

70

Pulse width module frequency (kHz)

10

The Power Distribution Control Strategy of Fully Active …

power(w)

Table 2 Parameter of model

x 105 2 1.5 1 0.5 0 -0.5 -1 -1.5 0

200

977

Parameter

Value

k1 VL 10 k2 VL 20 ε1 VL 10 ε2 VL 20

5

400

50 0.3 3

600

800

1000

1200

1400

time(s)

B a tte ry c u rre n t(A )

Fig. 3 Power requirement 600 Real current Desired current

500 400 300 200 100 0 0

200

400

600

800

1000

1200

Real current Desired current

1000

S C c u rre n t(A )

1400

500 0 -500 -1000 0

200

400

600

800

1000

1200

1400

B u s v o lta g e (V )

230 Real voltage Desired voltage

225 220 215 210 0

200

400

600

800

time(s)

Fig. 4 Simulation results

1000

1200

1400

978

Z. Lu et al.

range is very small, and the bus voltage always be stabilized above or below the reference value 220 V. The two control objectives are perfectly realized, which fully verifies the effectiveness of the control strategy proposed in this paper.

5 Conclusion In this paper, a power distribution control strategy for fully active HESS based on sliding mode control is proposed, which includes a sliding mode current controller to track the reference values of battery and SC current, and a voltage controller to maintain bus voltage stability. Modeling and simulation are carried out based on vehicle cycle conditions. The simulation results show that the proposed sliding mode control strategy can accurately track the reference values of battery and SC current, and maintain bus voltage stability, which verifies the control strategy effectiveness. Acknowledgements This work was supported by the National Natural Science Foundation of China (61673164).

References 1. Khaligh, A., Li, Z.H.: Battery, ultracapacitor, fuel cell, and hybrid energy storage systems for electric, hybrid Electric, fuel cell, and plug-in hybrid electric vehicles: state of the art. IEEE Trans. Veh. Technol. 58(6), 2806–2814 (2010) 2. Hredzak, B., Agelidis, V.G., Jang, M.: A model predictive control system for a hybrid batteryultracapacitor power source. IEEE Trans. Power Electron. 29(3), 1469–1479 (2014) 3. Jung, H., Wang, H., Hu, T.: Control design for robust tracking and smooth transition in power systems with battery/Supercapacitor hybrid energy storage devices. Power Sources 267, 566–575 (2014) 4. Ayad, M.Y., Bechenif, M., Henni, A., Boubou, A.: Passivity based control applied to DC hybrid powersource using fuel cell and supercapacitors. Energy Convers. Manag. 51(7), 1468–1475 (2010) 5. Rotenberg, D., Vahidi, A., Kolmanovsky, I.: Ultracapacitor assisted powertrains: modeling, control, sizing, and the impact on fuel economy. IEEE Trans. Control Syst. Technol. 19(3), 576–589 (2011)

Secure Communication with Two-Stage Beamforming for Wireless Energy and Jamming Signal Based on Power Beacon Dandan Guo, Jigao Song, Xuanzhong Wang, Xin Wang, and Yanru Wang

Abstract In this paper, we consider a power beacon-assisted wireless powered communication network for securing a legitimate transmission with a two-stage beamforming including energy transfer and information transfer. In the first stage, the jammer and the source can harvest the energy from the multiple-antenna power beacon. In the second stage, the multiple-antenna jammer transmits interference signal to assist the information secure transmission. Depending on the channel state information of jammer-destination and jammer-eavesdropper, two schemes about jammer’s beamforming are proposed to transmit jamming signal. Then we evaluate the system performance in terms of secrecy outage probability under balancing the two-stage time ratio and beamforming vectors. Keywords Secrecy outage probability · Energy harvesting · Beamforming · Jamming

1 Introduction With the development of 5G technology, the security of wireless network is becoming more and more important. In the secure communication, jammer can transmit the interference signal to avoid the eavesdropper stealing the confidential messages, but more energy is needed to create interference signal to suppress eavesdropping [1]. In order to obtain the jammer’s help, the source or the destination first transmits energy signals to recharge the battery of jammer, and then the jammer utilizes the energy to transmit interference signal [2, 3]. However, the energy supply method introduced above is always constrained by the ability of communication node which is also inefficient in energy utilization.

D. Guo (B) · J. Song · X. Wang · X. Wang · Y. Wang Beijing Zhongdian Feihua Communications Co., Ltd., Communication Technology Center, 100071 Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_97

979

980

D. Guo et al.

Meanwhile, deployment of low-cost power beacon (PB) as a specified energy supplier has become an important way to supply energy for the energy-constrained node, which can transmit the radio frequency signals to recharge the energy-constrained jammer [4]. There are always two stages for the process, one is the energy transfer (ET) and another is the information transfer (IT), where the time ratio between ET and IT is important [5]. To enhance the energy transfer efficiency or the interference effect, the multi-antenna can also be equipped for the PB or the jammer to form energy beamforming and interference beamforming. But the impact of channel state information (CSI) on the beamforming scheme of jammer is one important challenge [6–8], which is always measured by the secrecy outage probability (SOP). To the best of authors’ knowledge, depending on optimal two-stage beamforming vector and time ratio, the minimum SOP in both multiple-antenna PB and jammer network is not conducted by any previous work. However, when the distance between PB and eavesdropper is far away in the literature [9], there is less energy of PB as interference energy and a decrease in secure performance. Different [9], we employ one jammer as relay to harvest PB’s energy and help transmitting interference signal, which can save the jamming energy. In this paper, we study the wireless secure communication with multi-antenna power beacon and multi-antenna jammer for the two-stage beamforming. We aim to highlight the physical layer security performance through the SOP when considering the CSI of jammer-eavesdropper and jammer-destination at the jammer for two stages. The simulation results show that much lower outage probabilities can be guaranteed when the system satisfies a certain throughput.

2 System Model We consider a wireless powered communication network model as shown in Fig. 1, which consists of one PB, one source S, one jammer J, one destination D and one eavesdropper E. Assume that PB is equipped with N p antennas and the jammer with N J + 1 antennas, while the destination and the eavesdropper with a single antenna each. Quasi-static Rayleigh fading with time block T is assumed, so that the channel conditions stay constant during each time block, which process form the PS node to the destination node. Assume that the source and the jammer only rely on energy harvesting from PB. We adapt a two-stage time division communication protocol. In the ET stage, the PB performs wireless power transfer to charge the source and the jammer. In the IT stage, the source transmits confidential information and the jammer interferes the eavesdropper by utilizing the harvested energy. In the considered network, during the ET phase, the N P × 1 transmitted signal vector at PB is given by

Secure Communication with Two-Stage Beamforming for Wireless …

981 Energy Information Interference

Jammer

Power Station

g H JD

Destination

hsd

f

H JE

hse

Source

Eavesdropper

Fig. 1 The system model of interest

 y = wp

 10 s 01

(1)

matrix of first stage used by source and jammer. f and g denote the energy transfer channel from PB to S and J, which are N P × 1 vector. The elements of f and g are zero-mean complex Gaussian random variables with variance λ1 and λ2 . s is the power signal of PB with E{|s|2 } = Pp . Hence, the total harvested energy of source and jammer at the end of the first phase is ε S = μ S PP f2 αT

(2)

ε J = μ J PP g2 αT

(3)

where μ S ∈ (0, 1), μ J ∈ (0, 1) represent the energy conversion efficiency of source and jammer, respectively. α ∈ (0, 1) is the time ratio of the block time in which part source and jammer harvest energy from the power station. We assume that all the harvested energy is used during the information transmission stage. Hence, the transmit power of the source and jammer is given, respectively, by α 1−α α PJ = μ J PP g2 1−α PS = μ S PP f2

(4) (5)

982

D. Guo et al.

3 Exact Secrecy Outage Probability with Two Jamming Schemes In this section, we consider two schemes for the second stage transmit beamforming vector at the jammer based on the CSI of J-E and J-D. The underlying principle is to transmit the jamming signal in a way, which degrades the signal to noise ratio (SNR) at eavesdropper and provides minimal interference to the destination. We utilize SOP to evaluate the secure performance of these schemes. A. Case 1: The CSI of J-E and J-D are known by jammer In this case, the CSI is perfect, so it is possible to realize maximizing interference at eavesdropper but zero interference at destination. According to [10], the optimal beamforming vector w J can be written as H J D HJ E wJ =  HTJ E H J D HJ E

(6)

where H J D = I N J − HJ D (HTJ D HJ D )−1 HTJ D , N J × 1 vector H J D denotes the channel between J and D, N J × 1 vector H J E denotes the channel between J and E. The elements of H J D and H J E are zero-mean complex Gaussian variables with variance λ3 and λ4 . Hence, the SNR at destination and eavesdropper can be expressed, respectively, as f2 b1

(7)

f2 2 a1 g |HJE wJ |2 + b2

(8)

SNR D = SNR E =

2

where a1 = μ J /(h 2S E μ S ), b1 = δ 2 /(h 2S D μ S PP (α/(1 − α))) and b2 = δ 2 /(h 2S E μ S PP (α/(1 − α))). h S D and h S E denote the legitimate channel and the eavesdropping channel, respectively, which are clearly known. Assuming the additive white Gaussian noise at S and D with variance δ 2 . Then we evaluate the SOP which is given by 

Pout

1 + SNR D = Pr ≤ β1 1 + SNR E

 (9)

where β1 = 2t1 /(2(1−α)T B) , t1 denotes the minimum throughput threshold and B is the channel bandwidth. By substituting Eqs. (7) and (8) into Eq. (9), the SOP can be expressed as

Secure Communication with Two-Stage Beamforming for Wireless …





β1 − 1

Pout = Pr x ≤

1 b1



=

β1 ν

983

β1 −1 β1 1 b1 − ν



1 λ1N P τ (N P )

x

0



+∞

x N P −1 − λ1

e



φ1 (x)

f V (v)dv

dx

(10)

b2



φ2 (x,v)

2 Let x = f2 and ν = a1 g2 |HJE wJ |2 + b2 . x obeys the exponent distribution, the function φ1 (x) in Eq. (10) can be calculated as β1 −1 β1 1 b1 − ν



− λx

x N P −1 e

φ1 (x) =

1

dx = (N P − 1)!(λ1 ) N P

0

−e

− λ1 × 1

β1 −1 β1 1 b1 − ν

N P −1 k=0

(N P − 1)! (λ1 ) N P −k k!



β1 − 1 1 b1



k (11)

β1 ν

The CDF of v is derived as Eq. (28) in Appendix. The function φ2 (x, v) in Eq. (11) can be expressed as ∞ φ2 (x, v) =

(N P − 1)!(λ1 ) N P f V (v)dv b2





φ3 (v)

∞ −

− λ1 ×

e

1

β1 −1 β1 1 b1 − ν

N P −1 k=0

b2



(N P − 1)! (λ1 ) N P −k k!



β1 − 1 1 b1



β1 ν

k f V (v)dv

φ4 (v)

(12)

where K n (•) is the Bessel function of [8]. The φ3 (v) and φ4 (v) can be obtained by Gradshteyn and Ryzhik [11]. ∞ φ3 (v) = (N p − 1)!(λ1 )  ×

NP

N P +N J −1

b2

v − b2 a1

 N P −N2 J +1

= (N p − 1)!(λ1 ) N P

2(v − b2 ) N J −2 a1N J −1 (λ2 λ4 ) 2 τ (N P )τ (N J − 1)    v − b2 × K N P −N J +1 2 dv a 1 λ2 λ4 (13)

984

D. Guo et al.

φ4 (v) =

2

 N P −1 k=0

(N P −1)! N P −k λ1 (β1 k!



− 1)k

− λ1 × 1

β1 −1 β1 1 b1 − ν

e N P +N J +1 a1N J −1 (λ2 λ4 ) 2 τ (N P )τ (N J − 1) b2  k      N P −N2 J +1 β1 − 1 v − b v − b2 2 N J −2 × 1 (v − b2 ) K N P −N J +1 2 dv a1 a 1 λ2 λ4 − βv1 b1 (14)

Finally, we substitute Eqs. (13) and (14) into Eq. (10) and obtain the SOP as follow Pout = 1 − ×

√ λ2 λ4 λ1N P τ 2 (N P )τ (N J − 1)

N P −1



k=0

⎣

(N P − 1)! N P −k λ1 (β1 − 1)k k!



1 k n=0

Ckn (−β1 )n n

1



(15)

r n−r r r =0 C n b2 (a1 λ2 λ4 ) τ (N P +r )τ (N J +r −1)

B. Case 2: The CSI of J-E and J-D is not known by jammer In this case, the CSI is not known. We obtain partial CSI of J-D with utilizing an error free channel [8]. In order to minimize the potential jamming interference at the destination, the second beamforming vector is given 2    wJ = hˆ opt = arg minh˜ T hˆ i 

(16)

HJ D and h i is the ith element of quantization codebook H, which where h˜ = H J D B consists of 2 N J -dimensional unit norm vectors. Hence, the SNR at destination and eavesdropper can be expressed, respectively, as

SNR D =

f2  2   a1 g2 minh˜ T hˆ i  H J D 2 + b1

(17)

f2  2  + b2 a2 g2 H H J E wJ

(18)

hˆ i ∈C

SNR E =

where a1 = μ J / h 2S D μs , b1 = δ 2 / h 2S D μ S PP (α/(1 − α)), a2 = μ J / h 2S E μ S and b2 = δ 2 / h 2S E μ S PP (α/(1 − α)). The SOP can be expressed as

Secure Communication with Two-Stage Beamforming for Wireless …

985



 x β2 x − ≤ β2 − 1 a1 ymp + b1 a2 yq + b2 ⎧ ⎫ ⎨ x b1 ⎬ +  = 1 − Pr m ≤ β2 x ⎩ a1 yp ⎭ a1 yp β2 − 1 + a2 yq+b 2

Pout = Pr



⎞(N J −1)2 B 

= ⎝1 −

x



a1 yp β2 − 1 +

β2 x a2 yq+b2

+

b1 ⎠ a1 yp

(19)

 2   where β2 = 2t2 /(2(1−α)T B) , x = f2 , y = g2 , m = minhˆ i ∈C h˜ T hˆ i  , p = H J D 2  2   and q = H H J E w J . t2 denotes the minimum throughput threshold. B is the number of feedback bits. According to the binomial theorem, Eq. (20) can be calculated as

Pout

  1 r − = FX Y Q a1 r =0 ⎛ ⎞ r ⎜ ⎟ +∞ ⎜ ⎟ x −r ⎜ ⎟ p −r f p ( p)d p ⎜ β − 1 + β2 x − b1 y ⎟ ⎝ 2 ⎠ a2 yq+b2



0

(N J −1)2 B

r C(N B J −1)2

ϕ1 (x,y,q)

(20)

ϕ2 ( p)

In function ϕ1 (x, y, q), the three variables are independent of each other. According to the binomial theorem, ϕ1 (x, y, q) in Eq. (20) can be expressed as ϕ1 (x, y, q) =



r 

Crk (−b1 )r −k

k=0

k 

Cki (β2 − 1)k−i β2i x k y −r

i=0

(

)

1

i m=0

Cim b2i−m a2m x i y −m q −m

(21)

According to Eq. (31), the function ϕ2 (q) in Eq. (20) can be expressed as +∞ ϕ2 (q) = 0

p −r

p N J −1 λ3N J τ (N J )

− λp

e

3

dp =

(N J − r − 1)!λ−r 3 τ (N J )

(22)

986

D. Guo et al.

4 Secure Performance Analysis A. High SNR Case 1: The CSI of J-E and J-Dare known by jammer The exact expression for the SOP in (16) relies on two special variables, i.e., b1 and b2 . We set SNR = PP /σ 2 . Owing to the relation b1 = δ 2 /(h 2S D μ S PP (α/(1 − α))) and b2 = δ 2 /(h 2S E μ S PP (α/(1 − α))), we have lim PP /σ 2 →∞ Pout = limb1 →0/b2 →0 Pout . We can obtain the asymptotic expression for the SOP at very low b1 and b2 as follows: √

λ2 λ4 τ (N P )τ (N J −1) N P −1 (N P − 1)! N P −k λ1 (β1 − 1)k × k! k=0 ( ) 1 k 1 n n n=0 C k (−β1 ) (a1 λ2 λ4 )n τ (N P +n)τ (N J +n−1)

Pout = 1 −

(23)

Case 2: The CSI of J-E and J-D is not known by jammer According to the above analysis, the asymptotic expression can be obtained as Pout = 1 −

(N J −1)2 B



r =0

×

  (N J − r − 1)!λ−r 1 r +1 3 r C(N − B −1)2 J a1 τ (N J )τ 2 (N P )τ (N J − 1)

k (r − k + N P − 1)!(k − r + N P − 1)!(N J + k − 2)!λr1−k λk−r 2 λ4   k r k r −k β2 k=0 Cr (β2 − 1) a2

(24)

B. Special cases of α (1) α → 0+ : In this case, we have b1 → ∞ and b2 → ∞. From (8), (9) and (18), (19), the instantaneous SNR D and SNR E approach 0. Finally, the expression of Pout can be expressed as + * lim+ Pout = P 1 < 2t/(2(T B) = 1

α→0

(25)

(2) α → 1− : In case 1, we rewrite SNR D = c1 /1 − α with c1 = f2 h 2S D μ S PP /σ 2 2 and rewrite SNR E = c2 with c2 = f2 /a1 g2 |HJE wJ |2 from Eqs. (8) and (9). Then the SOP in Eq. (16) becomes Pout =

  1 + c2 t1 t 1 2 2T B − =1 lim Pr c1 < c t c1/1−α c→+∞

(26)

Secure Communication with Two-Stage Beamforming for Wireless …

987

In case 2, Eq. (18) can be expressed as S N Rd = c3 with T 2 2 2 2 ˜ ˆ c3 = f /a1 g minhˆ i ∈C |h h i | H J D  and SNRe = c4 with c4 = 2 f2 /a2 g2 |H H J E w J | from Eqs. (18) and (19). Then the SOP in Eq. (24) becomes   t2 1 + c3 (27) < 2 2T B c = 1 Pout = lim Pr 1 + c4 c1/1−α c→+∞

5 Simulation Results In this section, we provide numerical examples of SOP and verify the analysis through the simulation. We set the source throughput as, t1 = t2 = 0.25 (bits/s/Hz), the energy conversion efficiency as, μ S = μ J = 0.85. The transmit power of PB to the noise is PP /σ 2 = 20 dB, while the channel variances are λ1 = λ2 = λ3 = λ4 = 1. Figure 2 implies that the asymptotic approximation provides accurate prediction of the SOP in the high SNR regime. Moreover, the SOP is reduced in case 1 when N P > N J and case 2 is the opposite. Figure 3 shows that setting α → 0+ or α = 1− is not beneficial to the secure performance. In Fig. 4, the performance of system 0

10

Secrecy Outage Probability

-1

10

Np=10,Nj=8

-2

10

Case 1

Case 2

Np=8,Nj=10

-3

10

-4

10

Analysis Simulation High SNR Approximation 0

5

10

15

20

25

30

35

40

SNR(dB)

Fig. 2 SOP versus SNR for the cases 1 and 2 with μ S = μ J = 0.85, λ1 = λ2 = λ3 = λ4 = 1, t1 = t2 = 0.25 (bits/s/Hz) and α = 0.35

988

D. Guo et al. 0

10

Ca

Secrecy Outage Probability

Case 1

-1

10

Ca

-2

10

Np=5, Nj=10 Case 2

Np=10, Nj=5

Analysis Simulation -3

10

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

α

Fig. 3 SOP versus τ0 for the case 1 and 2 with μ S = μ J = 0.85, λ1 = λ2 = λ3 = λ4 = 1, t1 = t2 = 0.25 (bits/s/Hz) and SNR = 20 dB 10

0

Secrecy Outage Probability

Analysis Simulation

10

-1

α=0.35 10

10

α=0.2

-2

-3

Case 2 Case 1

10

-4

2

4

6

8

10

12

14

16

NJ Fig. 4 SOP versus N J for the case 1 and 2 with μ S = μ J = 0.85, λ1 = λ2 = λ3 = λ4 = 1, t1 = t2 = 0.25 (bits/s/Hz), SNR = 20 dB, N P = 8 and α = 0.35

Secure Communication with Two-Stage Beamforming for Wireless …

989

increases with N J and it finally tends to balance. Choosing the right number of node antennas can improve system secure performance. According to Figs. 2, 3, and 4, we can see the case 1 secure performance is better than case 2. Because the transmitted interference signal of jammer has no effect on destination node. Besides, the SOP reaches the minimum when α is between 0.3 and 0.5.

6 Conclusions This paper has derived exact expressions for the SOP in a two-hop energy cooperative network utilizing energy harvesting and the two-stage beamforming. We have optimized the time ratio for ET AND IT as well as the multiple-antenna power station power transfer. Based on analytical and simulation results, we proved that the security of the proposed system can be further enhanced with the suitable time ratio τ0 and increasing the N J . Acknowledgements The work in this paper was supported by State Grid Science and Technology Project “Evolution of Power Wireless Private Network and Application Analysis of 4G and 5G Technology” (5700-201941235A-0-0-00).

Appendix  2  2 2 The CDF of v = a1 gH wp  HJE wJ  + b2 can be expressed as 

2(v − b2 ) N J −2

v − b2 f V (v) = N P +N J −1 N J −1 a1 a1 (λ2 λ4 ) 2 τ (N P )τ (N J − 1)    v − b2 × K N P −N J +1 2 a 1 λ2 λ4

 N P −N2 J +1

(28)

The CDF of y = |gH wP |2 can be expressed as f Y (y) =

1 − λy e 2 λ2

(29)

 2 The CDF of q =  H JHE w J  can be expressed as f Q (q) =

q N J −2 N J −1

λ4

τ (N J − 1)

e

− λq

4

(30)

990

D. Guo et al.

The CDF of p = H J D 2 can be expressed as f P ( p) =

p N J −1 λ3N J τ (N J )

− λp

e

3

(31)

References 1. Chen, X., Ng, D.W., Chen, H.H.: Secrecy wireless information and power transfer: challenges and opportunities. IEEE Wirel. Commun. 23(2), 54–61 (2016) 2. Liu, W.C., Zhou, X.Y., Durrani, S., Popovski, P.: Secure communication with a wirelesspowered friendly jammer. IEEE Trans. Wirel. Commun. 15(1) (2015) 3. Moon, J., Lee, H., Song, C., Lee, I.: Secrecy performance optimization for wireless powered communication networks with an energy harvesting jammer. IEEE Trans. Commun. 65(2), 764–774 (2017) 4. Hoang, T.M., Duong, T.Q., Vo, N.S., Kundu, C.: Physical layer security in cooperative energy harvesting networks with a friendly jammer. IEEE Wirel. Commun. Lett. (2017) 5. Bi, Y., Chen, H.: Accumulate and jam: towards secure communication via a wireless-powered full-duplex jammer. IEEE J. Sel. Top. Signal Proc. 10(8), 1538–1550 (2016) 6. Jiang, X., Zhong, C., Zhang, Z., Karagiannidis, G.K.: Power beacon assisted wiretap channels with jamming. IEEE Trans. Wirel. Commun. 15(12), 8353–8367 (2016) 7. Wu, W., Wang, B.Y., Deng, Z.X., Zhang, H.Y.: Secure beamforming for full-duplex wireless powered communication systems with self-energy recycling. IEEE Wirel. Commun. Lett. 6(2), 146149 (2017) 8. Chen, X.M., Chen, J., Zhang, H.Z., Zhang, Y., Yuen, C.: On secrecy performance of multiantenna-jammer-aided secure communications with imperfect CSI. IEEE Trans. Veh. Technol. 65(10), 8014–8024 (2016) 9. El Shafie, A., Niyato, D., Al-Dhahir, N.: Security of an ordered-based distributive jamming scheme. IEEE Commun. Lett. 21(1), 72–75 (2017) 10. Ding, Z., Leung, K.K., Goeckel, D.L., Towsley, D.: On the application of cooperative transmission to secrecy communications. IEEE J. Sel. Areas Commun. 30(2), 359–368 (2012) 11. Gradshteyn, I.S., Ryzhik, I.M.: Table of Integrals, Series, and Products. Academic Press, Cambridge (1980)

A Research of Short-Term Wind Power Prediction Based on Support Vector Regression Shixiong Bai and Feng Huang

Abstract The wind power prediction is a basis of dispatching automation system. But wind power is often unstable, and this is because wind power is restricted by the wind speed, climate, and other factors. The instability of wind power will influence the safety of the power grid, and the power grid scheduling needs an accurate prediction of wind power. In this paper, it realizes a short-term wind power prediction based on support vector regression. Firstly, it sets the initial clustering center based on historical fan data. Then, it establishes a model of wind power prediction. Lastly, it uses SVR algorithm to achieve the short-term wind power prediction. Keywords Power prediction · Clustering analysis · SVR

1 Introduction Nowadays, the fossil energy will soon run out, and the renewable wind energy has attracted people’s attention. Wind energy is one of the most valuable renewable energy in the near future. It is of great significance for environmental protection and social sustainable development. However, wind power is often unstable, and this is because it is restricted by the wind speed, climate, and other factors. The instability will influence the safety of the power grid. So, it is necessary to predict the wind power. In this paper, it uses cluster analysis and support vector regression algorithm to analyze the historical fan data. In end, it achieves the short-term prediction of wind power.

S. Bai (B) · F. Huang College of Electrical & Information Engineering, Hunan Institute of Engineering, 411104 Xiangtan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_98

991

992

S. Bai and F. Huang

2 Data Preprocessing The data normalization processing is a fundamental work of data mining. Usually, different evaluation indicators have different dimensions. The differences between the values may be large. Accordingly, non-processing may affect the results of data analysis. In order to eliminate the influence from the difference of dimensions and value ranges between indictors, it is indispensible to conduct standardization processing to scale the data in proportion to make it fall into a specific area for comprehensive analysis [1]. This paper adopts the minimum–maximum normalization to normalize the historical fan data. The normalized expression is as follows: x∗ =

x − x¯ max −min

(1)

Here, max is the maximum value of the data sample; min is the minimum value of the data sample; max–min is the range. The minimum–maximum normalization preserves the relationships that exist in the original data, which is the easiest approach to eliminate the influence of dimensions and the data’s value ranges.

3 Clustering Analysis There is a strong correlation between the power curve in the same season and the power curve in the same day. The power curves in different years also have high similarity. Therefore, it is considered to cluster the historical samples of the power curve, and then the formed sample is conducted a change characteristic mining. The results can be compared with the power curve to better reflect the law of its essential changes. In addition, wind power is volatile and intermittent. If the curves with similar characteristics are grouped, the disorganized curve clusters of the wind power not only become regular but also can eliminate the interference caused by unrelated curves [2]. In this way, it is necessary to cluster the historical data samples.

3.1 Algorithm Selection The k-means algorithm [3] is a commonly applied dynamic clustering algorithm. The first implementation process is to select the cluster center, classify the samples initially, and then judge whether the clusters are reasonable according to the clustering criteria. If it is unreasonable, it needs to do cluster again. In comparison with the classical unsupervised clustering algorithm, the k-means algorithm is simple, and the convergence speed is fast. The clustering criterion of k-means algorithm is as follows:

A Research of Short-Term Wind Power …

mi n J =

c  N 

993

 2 d j  x j − wi 

(2)

i=1 J=1

Here, wi is the clustering center, and j is the sample number; x j is the vector composed of the relevant factors to be clustered; N is the number of samples; c is the number of cluster centers determined initially; and d ji expresses whether the jth sample is the ith class.

3.2 Set Up the Clustering Center The k-means algorithm is a typical distance-based hierarchical clustering algorithm, whose purpose is to obtain the maximum or minimum value of the objective function through incomplete search of the complete data space. Due to the existence of local extreme points as well as the greed of the heuristic algorithm, the algorithm is sensitive to the cluster center. From different cluster centers, the clustering results are not necessarily the same, and the optimal solution is not necessarily obtained. Hence, how to obtain a better clustering result is very important. The solution is as follows: (1) The arithmetic mean of the whole is calculated; (2) The maximum distance and the minimum distance are obtained; (3) The maximum and minimum distances are equally divided into c equal parts, and c is the number of clusters. (4) The distance from each sample to the mean value falls into an interval and divides the sample into c classes. (5) The arithmetic mean of each class is applied as the initial clustering center.

4 SVR There are many algorithms for establishing regression prediction models. Among them, the support vector regression algorithm based on statistical learning theory and structural risk minimization criterion solves the practical problems, such as small sample, nonlinearity, and high-order digit, and overcomes the difficulties in determining the network structure in neural network and other learning methods [4]. Therefore, this paper selects SVR algorithm to establish regression prediction model. The support vector machine (SVM) is a machine learning algorithm, which is derived from statistical learning. It is a two-class model, whose basic model is the linear classifier that defines the largest interval in the feature space. Based on the structural risk minimization, the SVM maps the vector in the input space through the nonlinear transformation into the high-dimensional space. In this space, the linear

994

S. Bai and F. Huang

Fig. 1 Principle of support vector machine

discriminance or the linear regression is performed [5]. The principle is shown in Fig. 1. The basic idea of the support vector regression is as follows: set the sample data set to {(x1 , y1 )(x2 , y2 ), . . . (xm , ym )}, utilize a nonlinear mapping ϕ to map the x of the sample set to the high-dimensional space F, and conduct the linear regression in the special space. The detail is expressed in the following formula: f (x) =

m    ai − ai∗ k(x, xi ) + b

(3)

i=1

Here, k(x, xi ) = ϕ(x)∗ ϕ(xi ) is a kernel function. Different support vector regression models can be generated by selecting different kernel functions. In this paper, a radial basis function is applied to establish a vector regression model. Detail is as follows:   k(x − xi ) = exp −γ px − xi p 2

(4)

Let the training sample set be {(xi , yi ), i = 1, 2, . . . , N }, where N is the number of samples, x i is the input value, and yi is the expected output value. The support vector regression model is as follows: f (x) = wo(x) + b

(5)

Here, w and b are the weight vector and offset. Under the ε insensitive loss function, the penalty factor c and the relaxation parameter ξ(i = 1, 2, . . . , N ) are introduced. The solution system of the regression machine is transformed as follows:

A Research of Short-Term Wind Power …

minw,b 21 w2

995

+c

N 

ξi +

i=1

ξi∗

⎫ ⎪ ⎪ ⎬

s.t. yi − wϕ(xi ) − b ≤ ε + ξi ⎪ ⎪ ⎭ ξi , ξi∗ ≥ 0, (i = 1, 2, . . . , N )

(6)

Introducing the Lagrange multiplier, we obtain: ⎫ ⎪ ⎪ maxa,a ∗ ⎪ ⎪ ⎪ i=1 ⎪ ⎪ ⎪ N N ⎪ 1   (ai − ai∗ )(a j − a ∗j )ϕ(xi )ϕ(x j ) ⎬ −2 i=1 j=1 ⎪ ⎪ N  ⎪ ⎪ ⎪ s.t. ai − ai∗ = 0 ⎪ ⎪ ⎪ i=1 ⎪ ⎭ ∗ 0 ≤ ai , ai ≤ c, (i = 1, 2, . . . , N ) N    ai − ai∗ ε

(7)

To predict wind power, we need to conduct the support vector regression. The support vector regression is a regression form of the support vector machine. It can establish nonlinear mapping between multi-dimensional linear input and output and implement the principle of structural risk minimization to improve the generalization ability of the model. When a nonlinear function is introduced, this mapping can be represented as a potential fractional linear function and transform the input control into a high-latitude feature space. Figure 2 is a prediction image of wind power when the prediction length is 40 after clustering, which accomplishes the prediction of power for 10 h. In this figure, red is the prediction curve, and green is the actual power curve. It can be seen from the figure that the longer the prediction time is, the larger the error is, the larger the power fluctuation is, and the larger the error is. The above algorithm achieves the prediction of wind power. However, the accuracy of the prediction needs to be further improved.

5 Conclusions This paper firstly clusters the wind power historical data. Then, it establishes the wind power prediction model by the support vector regression method and predicts the wind power. It makes the wind power curve cluster regular to follow, eliminates the interference caused by the uncorrelated curve, and improves the prediction precision. The work is of great significance to wind power dispatching and grid-connected safety.

996

S. Bai and F. Huang

Fig. 2 Prediction image

Acknowledgements Authors gratefully acknowledge the projects supported by National Natural Science Foundation of Hunan Province of China (2018JJ4039) and the project supported by Scientific Research Fund of Hunan Provincial Education Department (17A048).

References 1. McMurdie, P.J.: Normalization of microbiome profiling data. Methods Mol. Biol. 1849, 143–168 (2018) 2. Filzmoser, P., Hron, K., Templ, M.: Cluster analysis. In: Applied Compositional Data Analysis, pp. 9–66 (2018) 3. Wang, S.W., Li, M.M., Hu, N., Zhu, E., Hu, J.T., et al.: K-Means clustering with incomplete data. IEEE Access 7, 69162–691710 (2019) 4. Kavitha, R., Kumar, P.C., Mukesh, F.: A comparison between MLP and SVR models in prediction of thermal properties of nano fluids. Appl. Fluid Mech. 11, 7–14 (2018) 5. Marek, S., Jacek, T., Przemyslaw, S.: SVM with a neutral class. Pattern Anal. Appl. 22(2), 573–582 (2019)

Droop Control Strategy of Microgrid Parallel Inverter Under Island Operation Xia Long, Qiuling Deng, Quansuo Xiang, Mengqing Ke, and Qun Zhang

Abstract The microgrid is developed rapidly with the growth of the global energy Internet. The operating characteristics of inverter directly influence the stability and reliability of the microgrid system. We will analyze the operating characteristics of the inverter droop control matched with the voltage, frequency, active power, and reactive power of the microgrid. And then, the droop control strategy of microgrid parallel inverter in island model is optimized. Through the mathematical modeling and simulation using MATLAB/Simulink, the dynamic characteristics of voltage and frequency with change in the microgrid load in island mode are analyzed particularly. The correctness and effectiveness of the droop control strategy optimization of the parallel inverter of the microgrid are verified by the simulation results. Keywords Microgrid · Parallel inverter · Droop control · Voltage and frequency dynamics · MATLAB/simulink simulation

1 Introduction With characteristics of micro, pureness, autonomous, and flexible, the microgrid [1] is acknowledged by the public thanks to the growth of the global energy Internet [2]. In the future, China will pay more attentions to develop the microgrid industry for its power strategy. Distributed power generation typically enters the AC microgrid system through an inverter. The operating characteristics of inverter directly influence the stability and reliability of the microgrid system. Therefore, the inverter control strategy has become the main factor in the microgrid. The control of the microgrid inverter generally adopts two control methods: one is master–slave control [3] and the other is peer-to-peer control [4]. Many experts have done deep research on master– slave control methods. Whereas as the flaws occurred by itself in the master–slave control, there are some limitations when being applied. Droop control could be expressed as peer control. Based on parallel inverters, microgrids have applied droop X. Long (B) · Q. Deng · Q. Xiang · M. Ke · Q. Zhang Hunan Institute of Engineering, 411104 Xiangtan, Hunan, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_99

997

998

X. Long et al.

control widely as which could reduce the relay on the reliable of communication. In Literature [5], it proposes a droop control method depending on the control of voltage and current and dual current. The simulation results verify the feasibility of the control strategy. The Literature [6] proposed a dual-loop control strategy to increase the voltage and current by introducing induced virtual impedance. The simulation results show that the introduction of the inductor virtual impedance can shorten the system cycle and eliminate the influence between the circulatory systems. However, drop of the parallel inverter output voltage caused by introducing the induced virtual impedance is not considered in the literature [7]. In Literature [8], a voltage and current double loop droop control method for low voltage microgrid with feedback inductance is proposed. The simulation results verify the validity and correctness of the control strategy. However, when the inverter output voltage drops, the introduction of the induced virtual impedance is not considered. Based on the Literature [8], this paper proposes a voltage–current dual-loop droop control strategy that depends on induced virtual impedance, furthermore, also verifies the effectiveness and stability of the control strategy through simulation.

2 Improvement of Droop Control To satisfy the needs of the droop control characteristics, reduce the impact of inverter output impedance, and improve the distribution accuracy of reactive systems, we introduce a larger value of induced virtual impedance. However, in the actual study, induced virtual impedance with a large value will lead to a large drop in the output voltage of the inverter. Figure 1, when the voltage and current double loop control

Ud

U dref*

V cq

U dref

Cf

PI

id

id 1 iq1

Zv iq * Uqref

U qref

PI Vcd

Uq

PI Lf

dp Inverter

Lf

abc

PI

Cf

Fig. 1 Voltage and current loop control strategy based on virtual impedance

U iabc

Droop Control Strategy of Microgrid Parallel Inverter … Fig. 2 Improved droop control

999

U

Q

n

Q0

Un U

P

m

2 Pi

IOabc

Lv

RMS

2

P0

f0

system does not increase the induced virtual impedance, the equation as follows: ∗ = Uref = U Uref

(4)

where U is the voltage corresponding to the Q-V droop control characteristic. When introducing induced virtual impedance in voltage–current dual-loop control the equation is as follows: ∗ − L v I 0 = U − L v I 0 = Un − n Q − L v I 0 Uref = Uref

(5)

The control scheme of the improved Q-V droop control is as shown in Fig. 2.

3 Simulation Results and Analysis An independent microgrid simulation model was constructed on the MATLAB/Simulink simulation platform for confirming the effectiveness and correctness of the suggested improved droop control strategy. The simulation platform consists of two distributed generators. The structural model is displayed in Fig. 3. The setting of the analog parameters is displayed in Table 1. The two distributed droop controls Fig. 3 Microgrid schematic

R1 jX 1

DG1

DG2

Lf

Cf

K4

R2 jX 2

Lf Cf

R3 jX 3

K1

0.4/10KV K2 K3

Power grid

1000

X. Long et al.

Table 1 System parameters

R1 = 0.06 , X 1 = 0.01 

R2 = 0.06 , X 2 = 0.01 

R3 = 0.347 , X 2 = 0.234

Load 1: 20 KW + 10 KVar

Load 2: 20 KW + 10 KVar

Load 3: 10 KW + 10 KVar

Udc = 800 V

L f = 0.6 mH

C f = 1.5 × 103 F

are the same as the inverter output impedance parameters. This paper analyzes and simulates the optimized droop control cases. Two DGs are divided into DG1 and DG2. k1, k2, and k3 are control switches. The operating mode of the system is controlled by the switch k4. When k4 is turned off, the microgrid is linked to the grid. When k4 is turned on, microgrid island operation. Case: At the very start, k1, k2, and k3 are all in the closed state, and k4 is in the off state. At 0.4 s, the switch k1 is disconnected. At this time, the microgrid system cuts off the distributed power supply DG1. At 0.6 s, k1 is closed, and the distributed power supply DG1 is connected to the microgrid system. At 0.8 s, k1 is disconnected again. The time of simulation is 1.2 s. The microgrid operating characteristics in the island state are shown in Fig. 4.

(a) Active power output from DG1 and DG2. (b) Reactive power output from DG1 and DG2.

(c) Active power output by DG1.

(d) Active power output by DG2.

Fig. 4 Variation of the output power of the DG1 and DG2 using traditional droop control

Droop Control Strategy of Microgrid Parallel Inverter …

(a) Reactive power output by DG1.

(c) DG2 output frequency.

1001

(b) Reactive power output by DG2.

(d) DG2 output line voltage.

Fig. 5 Operating characteristics of an independent microgrid system with DG1 on and off

Figure 4 shows the variation of the active power of the DG1 and DG2 outputs of the conventional droop control. Figure 4a, b shows the changes in the output power of the improved droop control DG1 and DG2. As shown in Figs. 4b and 5a, b, the improved droop is also shown by comparing the active power and reactive power of the DG1 and DG2 outputs in the conventional droop control and the improved droop control. The control strategy enables plug-andplay of distributed generation. From Fig. 5c, d, when the DG1 is cut and integrated into the microgrid system, the active power and no power of the independent microgrid system fluctuate, and the voltage and frequency of the microgrid system can still be maintained stable.

4 Conclusion In island mode, fluctuations in frequency and voltage will be caused by changes in the load, resulting in instability of the microgrid. If the fluctuations are too severe, there is no guarantee that the system will be able to supply power efficiently, and droop control with inductive virtual impedance is usually used to improve stability of the microgrid. Consider with the actual working conditions of the distributed power

1002

X. Long et al.

supply of the microgrid, this paper proposes an improved method suitable for the microgrid inverter parallel system by combining the induced virtual impedance with voltage and current double loop droop control strategy based on the traditional droop control. Compared with the traditional droop control, the improved droop control strategy makes the line voltage and frequency of the independent microgrid have better stability, and better equalization of power and reduces the power fluctuation of the grid. It also shows the effectiveness of the improved droop control strategy.

References 1. Thomas, H., Kroposki, B., Basso, T., Treanton, B.G.: Advancements in distributed generation issues: interconnection, modeling, and tariffs. In: IEEE General Meeting, pp. 1–5 (2007) 2. Barsali, S., Ceraolo, M., Pelacchi, P., Poli, D.: Control techniques of dispersed generators to improve the continuity of electricity supply. In: IEEE Winter Meeting, pp. 789–794 (2002) 3. Lopes, J.A.P., Moreira, C.L., Madureira, A.G.: Defining control strategies for microgrid island operation. IEEE Trans. Power Syst. 21(2), 916–924 (2006) 4. Wang, C.S., Gao, F., Li, P.: Control strategy research on low voltage microgrid. Proc. Chin. Soc. Electr. Eng. 32(25), 2–8 (2012) 5. Wang, Y.M., Liu, R., Chen, Z.: Control strategy of micro-grid operation based on dual loop control. Power Sources 31(10) (2012) 6. Zhang, Q.H., Peng, C.W., Chen, Y.D., Jin, G.B., Luo, A.: A control strategy for parallel operation of multi-inverters in microgrid. Proc. Chin. Soc. Electr. Eng. 32(25), 126–132 (2012) 7. Mohammad, A., Abusara, A., Suleiman, M., Sharkh, J., Guerrero, M.: Improved droop control strategy for microgrid-connected inverters. Sustain. Energy Grids Netw. 1, 10–19 (2015) 8. Yang, T., Zhao, X.Y., Wang, S.: Droop control strategy of micro-grid based on feedback im pedance. Power Syst. Clean Energy 31(10), 34–38 (2015)

ZigBee-Based Architecture Design of Imperceptible Smart Home System Juanli Kuang and Lang Li

Abstract The smart home has been an emerging industry which combines wireless sensor technology and computer technology. In order to meet the current requirements of ‘automation, comfortableness, energy saving, and safety’ in intelligent home life, we introduce the conception of imperceptibility into smart home system and design the architecture model based on ZigBee’s imperceptible smart home system which based on the ZigBee protocol and the basic architecture of ‘Sea-NetCloud.’ The ‘Sea’ means that it has a huge number of terminal applications and we design it by combining perception terminal and a mobile terminal in this paper. The ‘Net’ is a data transmission channel, and this paper focuses on imperceptible network scheme based on ZigBee. The ‘Cloud’ is for cloud data processing. Users’ data are processed through CBS algorithm of private cloud to gradually optimize the users’ habits model, and the system could adjust itself according to the users’ habits to provide service initiatively and make smart home finally smart. Keywords Smart home · ZigBee · Imperception · CBS algorithm

1 Introduction Smart should be human-driven, environment-driven and sensitive to the changes in people and environment, and it should automatically adjust itself according to the user’s habits [1]. In the current smart home system, the user sends commands through the mobile terminal to control the system. These systems are seemly to be ‘smart’ but always exhibit a ‘stiff’ situation which resulting in a poor experience. In the current market of smart household appliances, the best seller appliance is socket. There are a lot of products and brands of smart socket, such as Orvibo WiFi socket, Belkin switch, and MI smart socket. The principle is to remotely control the socket switch through connecting WiFi and making it able to remotely control J. Kuang (B) · L. Li College of Computer Science and Technology, Hengyang Normal University, 421002 Hengyang, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_100

1003

1004

J. Kuang and L. Li

every electrical product’s off-on switch [2]. But during the practical using, when confronting some product with soft switching, for example, some products like electric cooker, besides the connection with power supply, it needs to manually press the ‘cook’ button to function normally. But for those products which equipped with remote control such as TV and air conditioning, the applicable range is very limited so that there have less practical uses of smart socket. For example, Xiaomi air cleaner, users need to remotely control it through mobile application. Actually, the best way to use air cleaner is to automatically adjust itself and change the wind flow (on or off) according to current air quality. When running, it can tell whether the window is closed or not through the magnetic induction sensor, and then, the system automatically closes the window to start working it again in avoid of useless work [3]. All of the above can be implemented by imperception. This paper elaborates on three features of ZigBee-based imperceptible smart home system: Firstly, electrical device can change its mode by perceiving the environment (turn itself on or adjust itself); secondly, the working status of electrical device can be changed through the movement of people (e.g., at night with people moving in, the light turns itself on and with people leaving, the light is able to defer switching off); and finally, smart home can learn the users’ habits in order to automatically provide service with users and more accurately learn the users’ habits [4–6]. This paper will elaborate on the plan of smart home system architecture design on the above three features.

2 ZigBee-Based Overall Architecture of Imperceptible Smart Home System This paper improves the existing WeChat Smart Home System, using ZigBee imperceptible network scheme. Figure 1 is the overall architecture of imperceptible smart home system. On the left side is the existing WeChat smart home system work flow. On the right side is ZigBee imperceptible network scheme model which adopt the ZigBee2007 protocol and get developed based on ZStack protocol stack and get divided into three sections by function: data convergence section, data collection section, and data share section, respectively, corresponding to the coordinator node, router node and terminal node of ZigBee local area. As shown in Fig. 2, it is the detailed work flowchart of ZigBee-based imperceptible smart home system. The whole system is based on the architecture of ‘Sea-NetCloud.’ Sea port consists of WeChat mobile terminal and imperceptible controlling terminal. Imperceptible controlling terminal is an intangible practical terminal, which working mode is to get the original data, estimate condition change factors, and send (executive) command. Net port consists of ZigBee imperceptible network scheme. Cloud port consistently learns the users’ habits through deployment of CBS algorithm to ultimately construct the masses of users’ habits.

ZigBee-Based Architecture Design of Imperceptible …

1005

Phone, PC, etc., Wechat Controlling Terminal

PC Servers

RS 232 Communicaon Interface z

ZigBee Data Convergence Zone

ZigBee LAN

ZigBee Data Collecon Area

ZigBee Data Share Zone Household Appliances

Fig. 1 Overall architecture of imperceptible smart home system Begin

System Inializaon

N Succeed or Fail to Networking

Y Wechat Control

Search for Data (eg:securitymonitoring status) Go Back to Real Time Environment Data

Impercepble control Electrical Control

Terminal Node Receive Data

Send Command

Collect Data

The Working Status Changes

Processed by CBS Algorithm

Get Soluon

Whether Meet The Condion CHange Factors

Y Send Impercepble Controlling Command

Fig. 2 Work flow of imperceptible smart home system

N

1006

J. Kuang and L. Li

3 ZigBee-Based Imperceptible Network Scheme Plan Network scheme adopts CC2530 chip of TI company, employing ZigBee protocol stack to network scheme. It divides ZigBee node into coordinator, router and terminal equipment based on Fig. 1 network topology. One router node can connect multisensors through I/O port, such as DHT11 temperature and humidity sensor, MQ-2 smoke transducer, human infrared sensor PM-4, rain sensor and GY-2561 TSL2561 light intensity sensor. This paper adopts the multi-router node design. Terminal node adopts the frame design of the hardware in the system in which one node, respectively, corresponds to one household appliance. The biggest feature of ZigBee imperceptible network scheme is the achievement of data sharing, on the basis of function division which divides ZigBee network into three divisions: data convergence section (coordinator), data collection section (router), and data sharing section (terminal equipment). The network topological structure shows in Fig. 3. This plan separates sensing data from electrical appliances terminal to reconstruct a data collection section so that all of the terminal equipment can share sensing data. This network scheme centralizes sensors and makes them mobile and flexible, decreases the cost of smart terminal equipment, and realizes efficient and repetitive utilization of collected data. Besides, data sharing also includes sharing the working status of other electrical device terminals in order to make more electrical appliance cooperatively work. In Fig. 4, which shows the whole schematic diagram of ZigBee network scheme process, the coordinator equipment sets up network and waits for other router nodes and terminal nodes to join. After router joining the network, it will send the sensing data which is collected spontaneously to the coordinator equipment. After the terminal node joining, it will send the electrical working status data to the coordinator equipment. Coordinator equipment proceeds packing data after receiving environmental parameter and electrical working status index and distributes, respectively,

ZigBee Coordinator

(COnstruct ZigBee Wireless local Area Network ) .

Zigbee Router 1

Zigbee Router 2

Light Sensor,Smoke transducer

Zigbee Router 3 Human Infrared Sensor

Temperature and Humidity Sensor

ZigBee Terminal 1

ZigBee Terminal 2

Air Condioning Control Node

TV Control Node

ZigBee Terminal 3 Curtain Control Node

ZigBee Terminal 4 Wash Machine Control Node

Fig. 3 Topological structure of imperceptible network scheme

ZigBee Terminal5 Bedroom lamp Control Node

ZigBee-Based Architecture Design of Imperceptible …

1007

Begin

Inializaon

N

Coordinator equipment?

Router equipment? N

Y

Creat a New Network

Y

N Terminal equipment applies for joining in the network

Router applies for joining in the network

Success?

Success?

Open global interrupon

Start monitoring status

N

Y Send status informaon for electrical device

Send Sensing Data Informaon

N

Node applies for joining? Y Allocate network ID

N Start sleep mode

Receive the broadcast packets of coordinator equipment?

Y

Analyze the data and proceed relevant operaon

The informaon of terminal node?

N

Y Store sensing data to structural body

Store electrical status informaon to structural body

Merge and pack the data and send it to terminal node

Upload the serial data port to users’ private clouding server

Fig. 4 Schematic diagram of ZigBee network scheme process

to terminal equipment nodes by broadcasting. The relevant operation will be carried out when it receives data. Nowadays, the smart wearable devices such as Apple Watch and Xiaomi Band are wearable for 24 h without constantly charging, and this feature constructs a basis for realizing ‘status change with men move’ plan of imperceptible smart home, making all these wearable devices equipped with wireless module and connected with the whole smart home system to form the same network. Today, smart wearable devices such as apple watch and Xiaomi bracelet can be recharged 24 hours a day, which lays the foundation for the ‘change state with people’s movement’ plan. All these wearable devices are equipped with wireless modules and form a network with the whole smart home system [7–9]. In Fig. 5, the user is regarded as a movable mobile terminal node and from that node to other terminal devices, nodes starting two points measurement (d1, d2, d3), when the distance is less than d, it would be

1008

J. Kuang and L. Li

ZigBee Wireless Network Terminal Device

Terminal Device

TV

Light

d1

d2

Terminal Device Air Condioning

d3

Men (wearable Devices)

Fig. 5 Schematic diagram of ‘status change with men move change state with people’s movement’ plan

capable of predicating that the user probably need to turn on the electrical devices because of getting closer to some electrical appliance. And system send relevant commands to change the status of electrical devices by judgement, for example, at night (photosensitive sensor) user comes to the room, and the light will automatically turn itself on by detecting someone approaching (based on the distance of two points less than critical value); detecting someone leaving, it will automatically turn itself off after a short delayed time (based on the distance of two points bigger than the critical value).

4 The Construct of Masses of Users’ Habits of Imperceptible Smart Home System The household appliances have a regular repetition of using time as men’s life has strong regularity [10, 11]. The users’ data are processed through CBS algorithm to constantly optimize the user habits’ models. Figure 6 is CBS algorithm process diagram, which calculates the average running time of certain electrical devices, then estimates the validity of time similarity to prove the certain time valuable, through dividing time into sections. Through constructing the masses of users’ habits and constantly merging new valuable point to eventually get a model of habits, it can know the users’ habits better to initiatively provide personalized service with users. In order to get a result more approaching to real users’ habits, and to make result dynamically change as the users’ pace of life changes. It adopts correction mechanism as below. We adopt the following correction mechanism in order to get the results

ZigBee-Based Architecture Design of Imperceptible … Fig. 6 Schematic diagram of CBS algorithm

1009

Begin Start learning mode Day 1 2 3 4 5 6 7

7:30 7:10 6:50 7:15 7:25 7:50 8:00

Time 13:00 12:50 13:10 12:50 12:45 13:05 12:55

20:30 20:35 21:10 20:40 19:00 21:30 20:50

Sort all the me in descending order

Group those mes which have same hour but different minutes

Group those the me lag between last group and next group is less than A

Calculate the average me per group

Construct the masses of users’ habits

Get the new me node

Valuable node or not

N

Y

Update the masses of users’ habits

Abandon the me data

End

close to real users’ habits and make the results change dynamically with the change of users’ life rhythm. It estimates the starting time of node and the deviation from average time by the concept of time similarity. The absolute value of node starting time α and statistical mean time β are relative to the ratio of time constant ε and get subtracted by 1. The result is called time similarity of node ζ [12]. The formula is shown as below.

1010

J. Kuang and L. Li

ζ = 1 − |α − β|/δ

(1)

Let us take lamp as an example, in Formula (1), the α presents a starting time of lamp independent to statistics; the β presents pre-calculating the mean time of lamp starting; the ε is a time constant, usually 25 min. If the result of Formula (1) ζ is less than 0, it presents at this smart node this starting time is regarded valuable and the system would put α and β into the mean value formula to calculate a new mean time β; if the result ζ is bigger than 0, it presents at this smart node this starting time is unvalued and system would discard this value and does not handle with it. Then through the constantly using, the system would continually merge new valuable points to construct the model of users’ habits, making it closer to real users’ life habits and providing the most thoughtful service with users.

5 Conclusion The smart home has broad development prospections because it is at the early stages of industry development. In this paper, we design ZigBee-based imperceptible smart home system architecture on the basis of ZigBee protocol and the core of imperception. We also proposed a ZigBee network scheme based on data sharing and made great effort to bring about imperceptible smart home system. In order to be the ‘user centricity’ and provide service initiatively to realize the true meaning of smart, we introduced the CBS algorithm and elaborated on the feasibility of the algorithm with the lamp as an example. Acknowledgements This research is supported by the National Natural Science Foundation of China under Grant No. 61572174, Hunan Province Special Funds of Central Government for Guiding Local Science and Technology Development No. 2018CT5001, Hunan Provincial Natural Science Foundation of China with Grant No. 2019JJ60004, the Science and Technology Plan Project of Hunan Province No. 2016TP1020, and Subject Group Construction Project of Hengyang Normal University No. 18XKQ02.

References 1. Wang, H., Bo, Y.J., Cai, H.X.: Design and implementation of smart home control system of ground source heat pump. Comput. Technol. Dev. 25(2), 165–168 (2015) 2. Mao, B., Xu, K., Jin, Y.H., Wang, X.L.: DeepHome: a control model of smart home based on deep learning. Chin. J. Comput. 41(12), 55–67 (2018) 3. Fan, M.X., Li, P.J., Zhang, H.P.: The smart home system design based on ZigBee and GSM. Sci. Wealth 15(5), 211–213 (2015) 4. Wu, T.Z., Zhou, H.J., Li, B.: ZigBee-based system design of smart home. Acad. J. Hubei Univ. Technol. 25(1), 81–83 (2010) 5. Wu, C.K.: The key technology and challenge of internet of things. J. Cryptol. Res. 2(1), 40–53 (2015)

ZigBee-Based Architecture Design of Imperceptible …

1011

6. Yang, W.F.: The development of smart home in China. Intell. Build. 12(1), 52–53 (2004) 7. Wei, Z.C., Han, J.H., Zhang, J.J., Zhang, L.: The remote control system design of smart home. J. Hefei Univ. Technol. (Soc. Sci.) 11(07), 108–112 (2007) 8. Shen, T., Zhu, H., Hu, J., Song, T.C.: The design and realization of a smart home demo platform based on internet of things. J. Nanjing Norm. Univ. (Eng. Technol. Ed.) 13(1), 20–24 (2013) 9. Chen, Z.L., Yu, H.Q., Ni, T.F.: Design of ZigBee-based information application remote monitoring scheme. Mod. Comput. 27(11), 121–123 (2007) 10. Yuan, X.R.: CBS Algorithm Study of Smart Home Based on Internet of Things. Hunan University, Changsha (2012) 11. Barnaghi, P., Wang, W., Henson, C.: Semantics for the internet of things: early progress and back to the future. Int. J. Semant. Web Inf. Syst. 8(1), 1–21 (2012) 12. Vainio, A.M., Valtonen, M., Vanhala, J.: Proactive fuzzy control and adaptation methods for smart homes. IEEE Intell. Syst. 23(2), 42–49 (2008)

Data Collection of Power Internet of Things Sensing Layer Based on Path Optimization Strategy Xianjiong Yao, Dedong Sun, Qinghai Ou, Yilong Chen, Liang Zhu, Diya Ran, and Yueqi Zi

Abstract Aiming at the problems of limited energy, unbalanced energy consumption, and long delay in the data acquisition process in the power IoT sensing layer, we proposed a mathematical derivation and theory to prove that it is a typical multiobjective optimization problem. In this paper, the problem of minimizing energy consumption and maximizing reliability under target delay is optimized. The improved firefly algorithm is proposed to optimize the mobile sink path optimization mechanism of mobile wireless sensor networks. The algorithm makes full use of the storage space and computing power of mobile sink, to ensure network connectivity, and the improve network communication efficiency. Compared with the random movement method, ant colony algorithm, and particle swarm optimization algorithm, the energy balance of cluster head nodes is reduced and the reliability is improved. The proposed algorithm balances node energy consumption, satisfies network service quality, and improves network reliability. Keywords Power IoT · Reliability · Path optimization

1 Introduction In recent years, the 5G power Internet of things technology has received the attention and in-depth development of a wide range of researchers, in intelligent logistics, intelligent medical, and intelligent industry. Other fields related to 5G have been applied X. Yao · Y. Chen State Grid Shanghai Electric Power Company, Shanghai, China D. Sun State Grid Information & Telecommunication Group, Ltd., Beijing, China Q. Ou Beijing Fibrlink Communications Co., Ltd., Beijing, China L. Zhu · D. Ran (B) · Y. Zi State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_101

1013

1014

X. Yao et al.

quickly [1]. The Internet-sensing layer wireless sensor network data-aware collection technology is the key technology to realize the various functions of the power IoT and has been widely valued by experts and scholars [2, 3]. Due to random deployment, complex environment, and limited node resources, the single-path routing data transmission method is likely to cause uneven network energy consumption. Using mobile sink for data collection can greatly reduce multi-hop transmission of data and the transmission distance between mobile sink. It saves node energy consumption and improves network reliability. Sink node moving path optimization design not only considers the length of data transmission path but also considers energy saving and network energy balance, the trade-off between energy consumption, reliability, and delay [4]. Mobile wireless sensor network path optimization is a typical multi-objective optimization problem. In view of above problems, the problem of minimizing energy consumption and maximizing reliability under the limitation of time limit optimization is proposed, and the improvement of firefly calculation is proposed. In [5], the paper describes a method for task migration for mobile edge computing using deep reinforcement learning. In [6], the paper proposed a resource management method for multiservice WiMAX Networks. The paper aims to optimize the MWSN moving path to build a highly invulnerable network topology, reduce data transmission link length, balance energy consumption, and ensure mobility robustness, and availability of wireless sensor networks.

2 System Model and Problem Formulation 2.1 System Model In the power IoT sensing layer mobile wireless sensor network clustering data collection process, we consider a data collection scenario in the case of a mobile sink as shown in Fig. 1. In the clustering scenario, the detected regions are hierarchically divided into two layers: the bottom layer is mainly composed of common sensor nodes, the main work is to collect data; the upper layer is mainly composed of clustered cluster head nodes, the task of the cluster head is responsible for receipt collection and distribution tasks. The cluster head performs task assignment to the member nodes in the cluster. The member nodes in the cluster transmit the collected data to the cluster head. The cluster head first performs data fusion. When the mobile sink moves to the communication range of the cluster head, it is forwarded to the mobile sink [7].

Data Collection of Power Internet of Things Sensing …

1015

Fig. 1 Sink-based data collection clustering scenario

2.2 Path Optimization Problem Description Assume that the mobile sink performs data collection during each polling operation, the initial position of the mobile sink for data collection is C0, the moving speed of the mobile sink is V, and the total maximum delay of data collection is D, then the maximum of the mobile sink is the length of the moving path L = V × D. If it is assumed that J and Q = (qi ) are the cluster head node set and the corresponding number set, respectively, N represents the total set of nodes that need to be migrated. According to the scenario model described above, data collection for monitoring areas, the total energy consumption of mobile sinks is: E=

|N |    p p p 2E elec × Ti + E i (1) + E i (2) + · · · + E i (Ti )qi i=1

+ E elec

|J | 

qi − 2E elec

i=1

min

|N0 | 

qi

|N |    p p p 2E elec × Ti + E i (1) + E i (2) + · · · + E i (Ti )qi i=1

 

(1)

i=1

(2)

yl ≤ K

(3)

xik ≤ T |Vs |yk , k ∈ V f

(4)

l∈V f

l∈Vs

s.t. TSP(SV ) ≤ L

(5)

1016

X. Yao et al.

The parameters are defined as follows: Ti is the total number of hops when the sink node moves to the nearby cluster head node with minimum energy consumption and minimum distance, and Epi(s) represents the network energy consumption under the current s hop condition, where s ∈ [1, Ti ], N0 represents the set of mobile sinks that can be moved to the cluster head node. TSP(SV) represents the set of nodes to be accessed by the mobile sink node, and L is the total distance travelled by the mobile sink to collect all the cluster head nodes in the monitoring area. Equation (1) indicates the time it takes for the mobile sink to collect all the data in the monitored area. Equation (2) indicates that the energy consumption of all cluster head nodes in the data collection process is minimized, which plays a very important role in the total energy consumption of mobile sink data collection. Equation (3) represents the shortest distance that the mobile sink returns to the initial point after accessing the location of the cluster head node from the initial point. Constraints (4) ensure the maximum number of possible positions to find for a moving sink is K. The constraint (5) ensures that the mobile sink sends data within the communication range of the sensor node x i .

2.3 Glowworm Swarm Optimization X. S. Dr. Yang abstracted the phototaxis of fireflies and the intelligent behavior of finding foods. He established a firefly data model and proposed a new metaheuristic intelligent algorithm based on swarm intelligence optimization algorithm— glowworm swarm optimization (GSO) [8, 9]. The algorithm has special advantages in traveling salesman problem, intelligent optimization scheduling problem, complex combination optimization, etc. [10]. Assume that in the firefly algorithm, the ith firefly has an initial position of xi (k) and the current fluorescein value is li (k), and the current function target value is f (xi (k)). Initially, the firefly algorithm uses the target optimization function as the initial value of the decision range, after which the decision range is updated with the following calculation formula.    rdi (k + 1) = min rq , max 0, rdi (k) + β(m i − |Mi (k)|)

(6)

where rdi (k) represents the decision range corresponding to firefly i during the kth iteration, where 0 < rdi < rq ; parameter r q represents the maximum range of fluorescein that fireflies can perceive during food seeking; The control threshold corresponding to the population around the firefly; the parameter β indicates the rate of change of the number of individuals surrounding the current firefly; the parameter Mi (k) represents the firefly collection of all neighbors of the current firefly in the kth calculation. Mi (k) = { j : x j (k) − xi (k) < rdi ; li (k) < l j (k)}

(7)

Data Collection of Power Internet of Things Sensing …

1017

In the firefly algorithm, the firefly determines its direction of motion based on the surrounding fluorescein value l. During the kth iteration calculation, the probability that the firefly moves toward a higher fluorescence value is represented by pi j (k), and its calculation formula. As shown in equation: pi j (k) =

l j (k) − li (k) n⊂Mi (k) l n (k) − li (k)

(8)

After firefly i searches for a higher fluorescein value, the motion to the new position is calculated by equation:

xi (k + 1) = xi (k) + S

x j (k) − xi (k) xn (k) − xi (k)

(9)

When firefly i moves to a new location during food search, recalculate and update the current firefly’s fluorescence value according to equation: li (k) = (1 − λ)li (k − 1) + ω f (xi (k))

(10)

where the parameter li (k) represents the current corresponding fluorescein value of firefly i during the kth calculation iteration; where the parameter λ ∈ (0, 1), the volume represents the volatilization coefficient of fluorescein; the parameter ω represents the rate of renewal of fluorescein, which is a constant.

3 Algorithm Process Analysis The improved GSO proposed in this paper is mainly divided into four steps in the mobile sink data collection path planning application of mobile wireless sensor network. The detailed description is as follows: (1) For the sensor nodes in the monitoring area, they use the classical LEACH [11] hierarchical clustering algorithm to select the cluster head according to the communication ability and residual energy of the node. After the cluster head selection is completed, the cluster head only has its own area. (2) Divide the monitoring network area. After data exchange between cluster heads, each cluster head saves information about its neighboring cluster head nodes, then calculates the total cost of communication with surrounding cluster head nodes, and calculates communication distance and communication under the constraints of energy consumption and shortest moving path constraints. (3) The mobile sink determines the stop position in each monitoring area. Every time a mobile sink arrives in a monitoring interval, it broadcasts information to the surrounding area.

1018

X. Yao et al.

(4) Mobile sink’s mobile path optimization. The sink node determines its own stop point based on the cluster head data information collected before (the cluster head residual energy and position coordinate information), and then uses the improved firefly algorithm proposed in this paper to optimize the moving path, including initial value coding and fluorescence.

4 Simulation and Results In this paper, MATLAB simulation software is used to study the mobile sink path optimization of the mobile Internet sensor network in the power Internet of things. The parameters of the simulation environment are set as follows: The speed of the moving sink 5 m/s is linearly moved to all the cluster head nodes in the monitoring area to collect the sensing data. The proposed algorithm is compared with the network data transmission delay of the other three algorithms, as shown in Fig. 2. As the number of simulation rounds increases, the network transmission delays of the four algorithms increase, but the data transmission delays of the four algorithms vary greatly, and the random mobile transmission delay fluctuations range from 1 to 9.5 s. Figure 3 reflects the comparison of the number of sink received data packets of the four algorithms. The algorithm proposed in this paper receives the largest number of packets, and the number is 3. 8 × 103 or so, far more than the other three algorithms, increased by more than 60%. The network reliability comparison of the four algorithms is shown in Fig. 4. As the number of network polling increases, the network reliability of the four algorithms Fig. 2 Algorithms time delay compare

Data Collection of Power Internet of Things Sensing …

1019

Fig. 3 Sink received data packets compare

Fig. 4 System outage probability compare

decreases. This is mainly because the energy of the sensor nodes of the network is gradually exhausted, the data communication energy of the network decreases, and the packet loss rate of the network gradually increases. Network reliability is gradually declining.

5 Conclusion Power Internet of things sensing layer is a hot research field of the 5G and IoT research. In this paper, a new mobile wireless sensor network based on improved firefly algorithm is proposed to solve the problem of limited energy, uneven energy consumption, unreliability, and long delay in the data acquisition process of the

1020

X. Yao et al.

sensor network. Although the research in this paper improves the performance of the network, the computational complexity of the network is high, and the transmission delay of the network is still large. The next work is how to reduce the computational complexity of the network and reduce the transmission delay of the network. Acknowledgements This work is supported by 2019 State Grid Science and Technology project “Analysis of Power Wireless Private Network Evolution and 4G/5G Technology Application.”

References 1. Gubbi, J., Buyya, R., Marusic, S., et al.: Internet of things (IoT): a vision, architectural elements, and future directions. Futur. Gener. Comput. Syst. 29(7), 1645–1660 (2013) 2. Liang, X.X., Cao, L., Wei, C.G., et al.: Research on fault diagnosis of sensor node in IoT sensing layer. Comb. Mach. Tools Autom. Mach. Technol. 3, 62–66 (2015) 3. Miorandi, D., Sicari, S., De Pellegrini, F., et al.: Internet of things: vision, applications and research challenges. Ad Hoc Netw. 10(7), 1497–1516 (2012) 4. Yue, Y., Li, J., Fan, H., et al.: Optimization-based artificial bee colony algorithm for data collection in large-scale mobile wireless sensor networks. J. Sens. 4, 1–12 (2016) 5. Zhang, C., Zheng, Z.: Task migration for mobile edge computing using deep reinforcement learning. Futur. Gener. Comput. Syst. 96, 111–118 (2019) 6. Rong, B., Qian, Y., Lu, K.: Integrated downlink resource management for multiservice WiMAX networks. IEEE Trans. Mob. Comput. 6(6), 621–632 (2007) 7. Zhang, X.W., Dai, H.P., Xu, L.J., et al.: Mobile assistance data collection strategy in wireless sensor networks. J. Softw. 24(2), 198–214 (2013) 8. Krishnanand, K.N., Ghose, D.: Glowworm swarm optimization for simultaneous capture of multiple local optima of multimodalfunctions. Swarm Intell. 3(2), 87–124 (2009) 9. Liao, W.H., Kao, Y., Li, Y.S.: A sensor deployment approach using glowworm swarm optimization algorithm in wireless sensor networks. Expert Syst. Appl. 38(10), 12180–12188 (2011) 10. Chen, X.J., Wang, Z., Wu, J.: An improved WSN routing algorithm based on LEACH. J. Sens. Technol. 26(1), 116–121 (2013) 11. Zeng, B., Li, M.F., Zhang, Y.: Assembly sequence planning method based on improved firefly algorithm. Comput. Integr. Manuf. Syst. 20(4), 799–806 (2014)

STFRC: A Multimedia Stream Congestion Control Algorithm Based on TFRC Fuzhe Zhao and Yuqing Huang

Abstract To solve the stability of multimedia streaming in the network is of great significance to ease the congestion of multimedia streams. In this paper, an improved multimedia flow congestion control algorithm STFRC, which is based on TFRC algorithm and Smith principle, is developed. The STFRC applies the improved Smith principle to control the length of the bottleneck queue, meanwhile, combined with TFRC algorithm to control the sending rate. Theoretical analysis and simulation results demonstrate that the STFRC algorithm improves the throughput and the stability of the transmission of the multimedia stream compared with TFRC. Keywords TFRC algorithm · Multimedia stream · Smith principle · Network congestion · Bottleneck link queue

1 Introduction The transmission of real-time multimedia stream requires a stable network rate, so the multimedia stream can be played smoothly in the client, so as to achieve the users’ expectations. At present, the transmission of majority data on the Internet is based on TCP. However, some data suggest that the transmission of multimedia stream on TCP has some problems [1]. For instance, the congestion control algorithm on TCP makes the transfer rate change sharply that is not suitable for the stability of multimedia transmission. Since UDP is not a TCP-friendly protocol [2], UDP flows cannot provide an efficient congestion control mechanism, which may lead to the resources and bandwidth of TCP invaded and serious congestion of the system and even collapse. Although transmit multimedia stream can be based on its special protocol,

F. Zhao (B) School of Computer, Central China Normal University, Wuhan, China e-mail: [email protected] Y. Huang Jinhua Hospital of Zhejiang University, Jinhua, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_102

1021

1022

F. Zhao and Y. Huang

RTP, [3] that implements an end-to-end streaming multimedia synchronization control mechanism, RTP can only be used in ample bandwidth when congestion occurs which lose its ability to control the bandwidth. Both states are described in detail [4]: In the beginning, TFRC is under the slow start stage, and then, sender rate is doubled within each RTT; when the packets are lost or congestion flag is found, TFRC returned to slow start stage, and calculated the sending rate theoretically according to p in the feedback, and then went through the congestion avoidance stage. The rest of the paper is organized as follows. Related works are presented in Sect. 2. In Sect. 3, the congestion control scheme for multimedia streaming called STFRC is designed. In Sect. 4, the implementation and performance analysis of the algorithm are developed. Simulation results are presented in Sect. 5. This paper ends with Sect. 6, which concludes the paper.

2 Related Works 2.1 TFRC Algorithm The sending rate in TFRC algorithm is calculated by the sender, and the formula is shown in Formula (1) [5]. 

T = RTT

2P 3

S    + 3RTO b8P P 1 + 32P 2

(1)

where T is the sending rate of the sender, S is the size of the packet, RTT is the round-trip delay, RTO is a retransmit timeout. Generally, RTO is set to 4 * RTT. The parameter b takes 1. P is the event rate of packet loss. P and RTT play a decisive role in this formula. The calculation method of P is shown in Formula (2). P=

n  i=0

wi

n 

Ti wi

(2)

i=0

where wi is the relevant weight and T i is the latest i packet loss interval. Packet loss is the difference in the first packet number between two consecutive packet loss events which refer to the number of packets between two packet loss events. The parameter n denotes 8. The calculation method of wi is shown in Formula (3).  wi =

1 1−

i
RTT, a1 for bandwidth constant). value of reference signal ri (t) and the bottleneck queue rate The difference  xi j t − T f b with a delay is transferred to the controller G ci (s). The controller calculates the transmission rate u i (t). The transmission rate reaches the destination through the forward delay e−sT f w,i j , and the bottleneck queue information reaches the source end through the feedback delay e−sT f b,i j .

Fig. 1 Smith congestion control principle diagram

1024

F. Zhao and Y. Huang

Fig. 2 STFRC algorithm model TFRC data stream input rate

Fig. 3 Ideal input and output model

3 Congestion Control Scheme for Multimedia Streaming The STFRC algorithm control model shown in Fig. 2 mainly adds a control parameter a and TFRC input stream as a reference signal into the original Smith controller. G ci (s)e−sT f w,i j /s Let (s) be the transfer function, we have (s) = 1+G −sRTT /s , which is equal ci (s)e to the ideal control block diagram as shown in Fig. 3. Where e−sT f w,i j denotes outside of the closed-loop control and does not affect the stability of the system, only to put off the control effect with a time T f w,i j . The dynamic characteristics of the input and output of the control system are shown in Fig. 2, which is equal to the input and output characteristics of Fig. 3; that is, the system eliminates the effect of the delay on the control quality.

4 Algorithm Implementation and Performance Analysis Let xr (t) be the buffer occupancy of bottleneck link with interference signal d(t) = 0. xd (t) denotes buffer queue occupancy of the bottleneck link with input rate r(t) = 0. By the additive of transfer function, r(t) and d(t) are used to calculate the buffer queue occupancy of output x_r(t) and x_d(t), and x(t) is equal to x_r(t) + x_d(t) (s) of (omit subscript i, j). According to the Smith principle, the transfer function xrr(s) Fig. 2 is equal to that of Fig. 3. The equation is obtained as follows:

STFRC: A Multimedia Stream Congestion Control … G ci (s)e−s·T f w,i j s G ci (s)e−s·RTT 1+ s

1025

k s+a

e−s·T f w,i j

(6)

k·s   s + a + k 1 − e−s·RTT

(7)

=

1+

k s+a

Denote its solution by G ci (s) =

From Eq. (7), we can obtain that the x(t) is divided into two cases: A. If r(t) = 0, then 1/s xd (s) = d(s) 1 + G ci (s)e−sRTT /s

(8)

The interference signal d(t) = a1 · I (t − T1 ) is transformed through Laplace transform, d(s) = a1 ·

1 −s·T1 ·e s

(9)

Add Eqs. (7) and (9) into (8), then xd (s) = −a1 ·

1 1 −sT1 1 e−s(RTT+T1 ) ·e + k · a1 · · 2 s s s(s + a + k)

(10)

The inverse Laplace transform of Eq. (10) is conducted, xd (t) = −a1 (t − T1 )l(t − T1 ) ka1 + (t − RTT − T1 )l(t − RTT − T1 ) k+a   ka1 l(t − RTT − T1 ) 1 − e−(k+a)(t−RTT−T1 ) − 2 (k + a)

(11)

B. If d(t) = 0, then xr (s) G ci (s)e−sT f w,i j /s = r (s) 1 + G ci (s)e−sRTT /s

(12)

Add Eq. (7) into (12), then xr (s) k · e−sT f w = r (s) s+a+k   The Laplace transform of ri (t) = r 0 · l t − T f b can be obtained:

(13)

1026

F. Zhao and Y. Huang

r (s) = r 0 · e−sT f b ·

1 s

(14)

Add Eq. (14) into (13), the inverse Laplace transform of xr (s): k · r 0 · l(t − RTT) k+a r0 − · k · e−(k+a)(t−RTT) · l(t − RTT) k+a

xr (t) =

(15)

By the additive of transfer function, x(t) = xr (t) + xd (t) can be obtained: r0 k · r 0 · l(t − RTT) − · k · e−(k+a)(t−RTT) · l(t − RTT) k+a k+a ka1 − a1 (t − T1 )l(t − T1 ) + (t − RTT − T1 )l(t − RTT − T1 ) k+a   ka1 (16) l(t − RTT − T1 ) 1 − e−(k+a)(t−RTT−T1 ) − 2 (k + a)

x(t) =

The controlled rate u(t) can be obtained from Fig. 2, ⎧ ⎡ t ⎤⎫  t ⎨ ⎬   u(t) = k · r (t) − x t − T f b − ⎣ u(τ )dτ + a/k · u(τ )dτ ⎦ ⎩ ⎭ t−RTT

(17)

0

t t From Eq. (17), t−RTT u(τ )dτ + a/k · 0 u(τ )dτ is the number of data packets sent by the source node but not confirmed by the sink node. Performance analysis of Smith congestion control algorithm is as follows: According to lim e−(k+a)(t−RTT) = 0,

t→∞

lim l(t − RTT) = 1,

t→∞

lim e−(k+a)(t−RTT−T1 ) = 0,

t→∞

lim l(t − RTT − T1 ) = 1

t→∞

(18)

The output rate x 1 (t) can be obtained (when t → ∞), k ka1 · r 0 − a1 (t − T1 ) + (t − RTT − T1 ) k+a k+a ka1 , x1 (t) ≥ 0 − (k + a)2

x1 (t) =

(19)

From inequality (19), the minimum of r 0 can be obtained, r0 =

  k+a ka1 ka1 ka1 ka1 a1 t − a1 T1 − t+ RTT + T1 + k k+a k+a k+a (k + a)2

(20)

STFRC: A Multimedia Stream Congestion Control …

1027

From Eq. (20), we can obtain when a = 0, x1 (t) = r 1 − a1 RTT −

a1 ≥ 0 (r 1 instead of r 0 for distinguish) k

(21)

From (21), the minimum of r 1 can be obtained, r 1 = a1 RTT +

a1 k

(22)

Combining Eq. (19) with Eq. (22), we can obtain: r 0), i f A j is an outlier attribute 0, i f A j is not an outlier attribute

(5)

Algorithm Description Input. D = {x1 , x2 , . . . , xm }. Step 1. Traverse the dataset D = {x1 , x2 , . . . , xm }, and compute distk (xi ) for every object in D Step 2. Calculate the mean_distk , and set it as the threshold value. Step 3. Traverse the dataset again, for ∀xi ∈ D, if distk (xi ) < mean − distk is satisfied, add xi to the core object set Ω = Ω ∪ {xi } Step 4. Randomly select a core object o ∈ Ω, find all the points that is densityreachable from o, and then, a cluster can be generated. Step 5. Similar to the original DBSCAN, the algorithm will stop until all core objects are accessed. Output. Clustering result C = {C1 , C2 , . . . , Ct }, set of outliers not divided into any cluster Noutlier s−D B SC AN , and number of outliers n outlier s = |Noutlier s−D B SC AN |.

2.3 Improvements to the LOF Algorithm Local Outlier Factor (LOF) algorithm gives each object a degree of being an outlier, and the degree depends on how isolated the object is with respect to the surrounding neighborhood. The Local Outlier Factor of an object p is defined as:  LOFk ( p) =

lrdk (o) o∈Nk ( p) lrdk ( p)

|Nk ( p)|

 o∈Nk ( p)

=

lrdk (o)

|Nk ( p)|

/lrdk ( p)

(6)

Since the outliers account for a small proportion in the dataset, directly calculating the outliers of the data objects will increase the amount of calculation. Based on k-distance and k-distance neighborhood, this paper proposes a new definition, k-neighborhood density, which is expressed as follows: k densityk =

i=1

k

dist

(7)

Based on the output of the improved DBSCAN algorithm, we calculate densityk for each object in the dataset. Then, for each cluster, the k-neighborhood density of the objects in the cluster is arranged in ascending order. This is because the higher the

1102

Start

End

H. Zhang et al. Input k, and results of improved DBSCAN

Output the top n objects with the highest LOF score

calculate k-neighborhood density for each object

Calculate local outlier factor for each object in D'

For each cluster, select objects with small kneighborhood density according to a certain ratio.

Calculate local reachability density for each object in D'

Put selected objects and outliers set obtained by improved DBSCAN into D'

Calculate reachability distance for each object in D'

Fig. 2 Flowchart of improved LOF algorithm

k-neighbor density of an object, the denser the distribution of the region where the object located, the less likely the object is an outlier, so there is no need to calculate the LOF value of the object. Objects with lower k-neighborhood density are more likely to be distributed at the boundary of the cluster. Therefore, the uncertainty of whether these objects are outliers is relatively higher, and further calculation is needed by calculating the LOF value. At this point, the data objects that need our attention mainly include two parts: outliers obtained by the improved DBSCAN algorithm and objects that are classified into a cluster but have a small k-neighborhood density. Set a ratio ρ (0 < ρ < 1), let n i = ρ × |Ci |(1 ≤ i ≤ t, Ci ∈ C)

(8)

That is, only the first n i objects with lower density are selected in each cluster. Put selected objects from each cluster and outliers set Noutliers−DBSCAN into a new dataset, denoted as D , as the input for the improved LOF algorithm. The above can improve the execution efficiency of the LOF algorithm while ensuring the accuracy of the results and effectively reduce the amount of calculation. The flowchart of the algorithm is as follows (see Fig. 2).

3 Simulation In this section, we will analyze the simulation results of the KDBLOF algorithm. This paper uses NSL-KDD as the dataset [8] and adjusts it to simulate electric power data. In the outlier detection scenario for electric power data, the proportion of outliers is much lower than that of normal objects. Therefore, this paper only extracts some data in the dataset, so that the ratio of outliers to normal objects in the final experimental data meets the general requirements for outlier detection. Three-scale datasets which containing 1000, 5000, and 10,000 normal objects were prepared in the experiment, and 1.5 or 3% outliers were added to the datasets of each scale. The simulation preserves all attributes of the data object. In the preprocessing step, non-numeric attributes are vectorized, and the dimensionality reduction and normalization are processed. This paper chooses DBSCAN and LOF as the comparison algorithm and set ρ = 0.2.

An Outlier Detection Algorithm for Electric Power Data …

1103

3.1 Simulation Results In this paper, we use the following two indicators to show the effect of the proposed algorithm, which are accuracy and recall rate. From Fig. 3, we can see that the accuracy of KDBLOF proposed in this paper is higher than that of DBSCAN and LOF on all datasets. From Fig. 4, we can see that the recall rate of KDBLOF proposed in this paper is higher than that of DBSCAN and LOF on all datasets. Based on a combination of multiple evaluation indicators, the KDBLOF algorithm is significantly better than DBSCAN and LOF when performing outlier detection. With the increase of data size and the change of proportion of outliers in the normal range, the detection effect of the KDBLOF algorithm has no obvious change trend, indicating that the algorithm has better adaptability. 100 99

Accuracy(%)

98 97 96 DBSCAN LOF KDBLOF

95 94 93 92 91 90 1000normal+1.5%abnormal

5000normal+1.5%abnormal data size

10000normal+1.5%abnormal

100 99

DBSCAN LOF KDBLOF

Accuracy(%)

98 97 96 95 94 93 92 91 90 1000normal+3%abnormal

5000normal+3%abnormal data size

Fig. 3 Accuracy comparison between KDBLOF, DBSCAN, and LOF

10000normal+3%abnormal

1104

H. Zhang et al. 100 DBSCAN LOF KDBLOF

90 80

Recall(%)

70 60 50 40 30 20 10 0

1000normal+1.5%abnormal

5000normal+1.5%abnormal data size

10000normal+1.5%abnormal

100 DBSCAN LOF KDBLOF

90 80

Recall(%)

70 60 50 40 30 20 10 0 1000normal+3%abnormal

5000normal+3%abnormal data size

10000normal+3%abnormal

Fig. 4 Recall rate comparison between KDBLOF, DBSCAN, and LOF

As mentioned in the previous chapter, in the KDBLOF algorithm, we have improved the LOF algorithm, which can effectively reduce the amount of computation when executing the algorithm. To demonstrate this improvement, we compare the runtime of LOF with the improved LOF in KDBLOF. We set ρ = 0.2, which means only the LOF value of the objects of about 20% of the original dataset needs to be calculated. From Fig. 5, we can see that the runtime of improved LOF is always shorter than that of LOF. As the size of the data increases, the increase in the runtime of the improved LOF is slower than the increase in the runtime of the LOF. This not only proves that improved LOF can indeed reduce the amount of calculation but also proves that improved LOF has better adaptability on large-scale datasets.

An Outlier Detection Algorithm for Electric Power Data …

1105

12 LOF improverdLOF

Runtime(s)

10 8 6 4 2 0

1000normal+1.5%abnormal

5000normal+1.5%abnormal data size

10000normal+1.5%abnormal

5000normal+3%abnormal data size

10000normal+3%abnormal

12 LOF improverdLOF

Runtime(s)

10 8 6 4 2 0 1000normal+3%abnormal

Fig. 5 Runtime comparison between KDBLOF, DBSCAN, and LOF

4 Conclusion In order to clean up dirty data and mine important event information of the power grid, such as abnormal power consumption and metering device failure, this paper proposes an outlier detection method KDBLOF, which combines DBSCAN and LOF and improves the shortcomings of the original algorithm. Aiming at the problem of the large computational cost of the LOF algorithm, KDBLOF uses the improved DBSCAN to effectively reduce the dataset, and then we only need to focus on the object with lower density in a cluster or the object located at the cluster boundary. The experiments indicate that the proposed method has a better outlier detection effect than DBSCAN and LOF.

1106

H. Zhang et al.

References 1. Zamani-Dehkordi, P., Rakai, L., Zareipour, H.: A data-driven method to detect the abnormal instances in an electricity market. In: IEEE 14th International Conference on Machine Learning and Applications (ICMLA), Miami, FL, pp. 1050–1055 (2015) 2. Li, X., Zhang, Y., Zhang, Q.: Application scenario analysis of power grid marketing large data. In: IOP Conference Series Earth and Environmental Science, vol. 108, no. 5, p. 052035 (2018) 3. Liu, F.T., Ting, K.M., Zhou, Z.H.: Isolation-based anomaly detection. ACM Trans. Knowl. Discov. Data 6(1), 1–39 (2012) 4. Aggarwal, C.C., Yu, P.S.: An effective and efficient algorithm for high-dimensional outlier detection. VLDB J. 14(2), 211–221 (2005) 5. Zhang, Z.P., et al.: Outlier detection based on cluster outlier factor and mutual density. Commun. Comput. Inf. Sci. 986, 319–329 (2019) 6. Breunig, M.M., Kriegel, H.P., Ng, R.T., et al.: LOF: identifying density-based local outliers. In: ACM Sigmod International Conference on Management of Data, vol. 29, no. 2, pp. 93–104 (2000) 7. Ester, M., Kriegel, H.P., Sander, J., et al.: A density-based algorithm for discovering clusters in large spatial databases with noise. KDD 96(34), 226–231 (1996) 8. Tavallaee, M., Bagheri, E., Lu, W., Ghorbani, A.A.: A detailed analysis of the KDD CUP 99 data set. In: IEEE Symposium on Computational Intelligence for Security and Defense Applications, Ottawa, pp. 1–6 (2009)

Power Anomaly Data Detection Algorithm Based on User Tag and Random Forest JianXun Guo, Bo Liu, Hongyan Zhang, Qiang Li, Shaoyong Guo, and Yang Yang

Abstract In the context of the allocation of electricity big data, in order to solve the problem that the power consumption anomaly detection algorithm is less efficient due to the diverse sources, various types, and large data volume of the power consumption data, this paper proposes a power anomaly data detection algorithm based on user tag and random forest. By analyzing the power data, each data is marked with a power type, including a normal type, a less bur type, a large downward shift type, and a multi-burr type. Based on the tags, three types of user power data tags, such as basic information tags, environmental information tags, and power information tags, are constructed as attribute sets of user power data. Finally, a user data anomaly data analysis algorithm based on user tag and random forest is proposed. In the experimental part, the traditional the random forest algorithm is compared with the proposed algorithm, and the performance index of the algorithm in both accuracy and false alarm rate is better than the traditional random forest algorithm. Keywords Power distribution and consumption data · Big data · Anomaly detection · User tag · Random forest algorithm

1 Introduction With the advancement of science and technology, the demand for electric power for social development and progress is increasing. In order to effectively manage and utilize power resources, the construction of smart grid projects has gradually increased, and the application of information technology has become more and more. Taking J. Guo · B. Liu · H. Zhang State Grid Henan Electric Power Company, Zhengzhou, China Q. Li State Grid Henan Information and Telecommunication Company, Zhengzhou, China S. Guo · Y. Yang (B) State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_111

1107

1108

J. Guo et al.

the application of the Internet of Things technology as an example, by installing sensors on the power equipment, the power company has been able to obtain interrelated data, such as power, temperature, and geographic location. Moreover, with the gradual increase of information collection equipment, the number of power resource data has exploded, the relationship between data is more complicated, and redundant data is more and more [1, 2]. In order to make full use of the power data, some researchers have carried out relevant academic research. According to the different techniques and research ideas used in the research, the current research can be divided into three major categories: artificial intelligence analysis methods [3–5], economic theory-based analysis methods [6, 7], and based on data intrinsic correlation analysis methods [8, 9]. In the aspect of the artificial intelligence analysis method, the researchers use machine learning algorithms such as clustering and deep learning to select the characteristics of the user’s electricity consumption data, thereby reducing the complexity of the data and facilitating the mining of the hidden characteristics of the data. Based on the economic theory analysis method, the game theory and bidding mechanism are used to analyze the competition relationship between the demand side and the service side, and the resource production and consumption in the electricity market are studied with the goal of maximizing social benefits. Based on the intrinsic correlation analysis method of data, the researcher studies the intrinsic characteristics of electricity consumption based on years of work experience in the power field, realizes the dynamic adjustment of power resources, mobilizes the user’s enthusiasm for power consumption, and realizes the maximum consumption of power resources. According to the existing research and analysis, we can see that although the existing research has achieved good results. But in the context of the allocation of electricity big data, in order to solve the problem of low efficiency of the anomaly detection algorithm for user power consumption caused by the characteristics of various sources, diverse types, and large amounts of data of power consumption data, this paper first analyzes the power data analysis and tags each data with the type of electricity used. Secondly, based on the tag, a user power data tag is constructed as a set of attributes of the user’s power data. Finally, a user data anomaly data analysis algorithm based on user tag and the random forest is proposed. Compared with the existing algorithms, the proposed algorithm achieves good results in terms of accuracy and false alarm rate.

2 Power Data Analysis In the field of power big data, because the collected power data comes from a large number of sensors on the power side. The performance of these sensors is easily affected by their own power and environment, resulting in missing and false alarm data in the collected data, which affects the power company’s analysis of power big data. To reduce the impact of these anomaly data on power big data analysis, Ref. [10], the term glitch is introduced to describe the characteristics of anomaly data.

Power Anomaly Data Detection Algorithm …

1109

Among them, the glitch refers to the part of the abrupt curve existing in the electricity curve drawn based on the collected power big data. The curves of these mutations are generally divided into two types: short-time surge and cliff-down. Through the analysis of the data set, this paper divides the types of abnormal data into the following three categories: a less bur type, a large downward shift type, and a multi-burr type. Among them, the less bur type refers to the curve in which there is a small amount of short-term surge in the power curve. The large downward shift type refers to the curve with a cliff-down shift in the power curve. The multi-burr type refers to a curve in which there is more surge in the power curve for a short period of time.

3 User Power Data Tag Tag technology refers to mining the conclusive description which can represent the characteristics of things through the analysis of the attributes of things. Tag technology can visualize abstract, disorganized data as highly refined, easy-to-understand summary words [11–13]. At present, tag technology has been used in e-commerce, mobile Internet, and other fields and has achieved more results in user portraits, precision marketing, promotion, etc. [14, 15]. Based on this, this paper applies the tag technology to the field of power big data, to generate easy-to-understand power data tags, reduce the workload of data analysts of power companies, and improve the efficiency of data analysis. Based on the massive electricity customer electricity consumption data, the paper comprehensively considers the customer’s electricity consumption characteristics and influencing factors and analyzes and researches the customer’s electricity behavior tag library. Considering that this paper mainly studies user anomaly data analysis, it has established three types of tags: basic information tag, environmental information tag, and power information tag. Basic Information Tag. The basic information tag includes tags of two dimensions: user type and power type. Among them, the user type includes two attributes: individual user and enterprise user. The power type used to study the use of electricity for different types of use, including commercial electricity, residential electricity, agricultural production, and electricity. Environmental Information Tag. The information related to the electrical anomaly includes three dimensions: seasonal characteristics, temperature characteristics, and special date characteristics. Among them, the seasonal characteristics study the customer’s electricity characteristics in different seasons, including spring, summer, autumn, and winter. The temperature characteristics study the electricity consumption at different temperatures, including high temperature (above 22 degrees Celsius), suitable temperature (between 22 degrees Celsius and 10 degrees Celsius), and low temperature (below 10 degrees Celsius). The special date characteristics study the user’s power characteristics, including weekends, holidays, and working days, on special dates such as holidays and weekends.

1110

J. Guo et al.

Power Information Tag. The information related to the power consumption abnormality includes the total amount of electricity used and the variation of electricity used. The total electricity consumption tag is divided into high, medium, and low in months. The power variation range tag is counted in months, and the daily change amount is calculated and divided into high, medium, and low. Considering that the range of values of total electricity consumption and variation of electricity consumption varies greatly under different economic and social conditions, it is not convenient to uniformly specify the specific values. In order to improve the versatility of the model, according to the idea of fitting the normal distribution this paper divides the total electricity consumption and variation of electricity consumption tag according to the proportion. Among them, the type of “high” type data accounts for 20% of the total, the type of “medium” type accounts for 60% of the total, and the type of “low” type accounts for 20% of the total.

4 Power Anomaly Data Analysis Algorithm Based on User Tag and Random Forest 4.1 Algorithm Selection In order to identify and classify the user’s electricity anomaly data, this paper analyzes the common classification and regression algorithms [16, 17]. Through analysis of common classification and regression algorithms, the random forest algorithm has the following two advantages for solving the problem of user abnormal power data analysis in the field of power big data, which is very suitable for solving the problems in this paper. (1) Using the randomness mechanism reduces the impact of data noise on the performance of the algorithm and has the ability to resist over-fitting. This advantage effectively solves the problem of noise inclusion in power big data. (2) It can handle multi-dimensional data and multiple attribute characteristics, and it is more efficient to process data. This advantage is consistent with the above data attributes and user power data tags, which is very suitable for the solution of this paper.

4.2 User Power Anomaly Data Analysis Algorithm Based on User Portrait and Random Forest Based on the above analysis, the user anomaly data analysis algorithm based on user portrait and random forest proposed in this paper is shown as follows. The algorithm consists of four processes: (1) The generation of the input data set, including training set, test set, attribute set, and generation of power consumption category. (2) According to training set Tk∗ and attribute set A, use random forest algorithm to generate

Power Anomaly Data Detection Algorithm …

1111

k decision trees T r1∗ , T r2∗ , . . . , T rk∗ . (3) Using decision tree theory to classify data r1∗ (X ), T r2∗ (X ), . . . , T rk∗ (X ) in data sets. (4) Based on the classification results of the k decision trees, the best classification of the data in the data set is solved. Algorithm Description. training set T = {(X 1 , y1 ), (X 2 , y2 ), . . . , (X m , ym )}, test set C = {(X m+1 , ym+1 ), (X m+2 , ym+2 ), . . . , (X n , yn )}, attribute set A = {a1 , a2 , . . . , ad }, power consumption category L = {l1 , l2 , . . . , le }. Step 1 Using the sampling method with the return, the training set data is randomly sampled to generate k sets T1∗ , T2∗ , . . . , Tk∗ . Step 2 According to the training set Tk∗ and attribute set A, K decision trees T r1∗ , T r2∗ , . . . , T rk∗ are generated by the random forest algorithm

Input

Generating a node based on the data set, and judging the category of the data therein, if it is the same category, then end. If A = φ or X of Tk∗ is the same, the class with the largest number of categories in Tk∗ is set as the classification and leaf node of the node, and end. Sampling Formula (1), solve the gain rate of each attribute and select the maximum attribute ad . Analyze the value adv of ad , divide Tk∗ into T v subsets, and generate a branch for each adv . If T v is empty, set the maximum category in Tk∗ to the category of the current node, set it as the leaf node, and end; otherwise, set T v and A\{ad } as branch nodes to iterate. Performing decision tree classification on T r1∗ (X ), T r2∗ (X ), . . . , T rk∗ (X ) one by one. Step 4 The classification results of the k decision trees are substituted into Formula (5) to calculate the best classification of the data in the data set   ), (X m+2 , ym+2 ), . . . , (X n , yn )}. Output test set classification C = {(X m+1 , ym+1

Step 3

In the first step, based on the user tag theory, each data is tagged to get the tag data of power consumption data. After that, based on the actual data processing results, each data is marked with a power type, including a normal type, a less bur type, a large downward shift type, and a multiburr type. Training set T = {(X 1 , y1 ), (X 2 , y2 ), . . . , (X m , ym )}, test set C = {(X m+1 , ym+1 ), (X m+2 , ym+2 ), . . . , (X n , yn )}, attribute set A = {a1 , a2 , . . . , ad }, and power type L = {l1 , l2 , . . . , le }. In the second step, in order to prevent the algorithm from over-fitting, the attribute selection strategy is adopted to achieve accurate classification of non-leaf nodes. Where d is the number of tag attributes, D(0 < D < d) refers to the number of randomly selected attributes. Based on this, multiple attribute sets can be constructed to achieve random combination of attribute sets and improve the accuracy of the algorithm. In order to reduce the effect of attribute values on the information gain criterion, the information gain rate is calculated by Eq. (1). By selecting the attribute by the information gain rate, the influence of the number of attribute values on the optimal attribute selection algorithm can be avoided.

1112

J. Guo et al.

G(T, a) I V (a) p  i   T G(T, a) = En(T ) − En(T i ) |T | i=1 Gr(T, a) =

(1)

(2)

In Formula (1), G(T, a) represents the value of the information gain of the attribute a in the data set T in the data classification and is calculated by Formula (2). I V (a) represents the value that is available for each attribute a. When the value range p of the attribute a is larger, the value of the I V (a) of the attribute a is larger, and Formula (3) will be used for calculation. In Formula (2), En(T ) represents the proportion pq of the qth data type in the data set T, which is calculated using Formula (4), where |γ | represents the number of various categories in the data set T. I V (a) = −

p  i   T i=1

En(T ) = −

|T |

|γ | 

log2

 i T  |T |

pq log2 pq

(3)

(4)

q=1

In the fourth step, after obtaining the classification results of the k decision trees, the best classification of the data in the data set can be solved based on Formula (5). Equation (5) indicates that the best classification of the current data sample is the classification with a higher proportion of the classification results of k decision ∗ (X ) represents the output on the label T ri∗ (X ) of each classification trees, where T ri,e result. k H (X ) = larg maxe i=1 T r ∗ (X ) i,e

(5)

5 Performance Evaluation In order to verify the performance of the proposed algorithm, in this paper, the traditional random forest algorithm is compared with the proposed algorithm in the experiment. In the experiment, MATLAB R2015b was used for program implementation and data analysis. The evaluation index includes accuracy rate and false alarm rate. The calculation formula is as shown in Formulas (6) and (7). From the calculation formula, the higher the accuracy rate, the better the model effect. The smaller the false alarm rate, the better the model effect. Accuracy rate =

The amount of data for correct model classification Total amount of data

(6)

Power Anomaly Data Detection Algorithm … False Alarm rate =

1113

The amount of data in which anomaly data is classified incorrectly Total amount of anomaly data

(7)

This experiment experiments the real data in the user’s electricity information collection system of a provincial power company. In order to protect user privacy, sensitive fields such as user name and contact information are filtered before data analysis. A total of 30,000 pieces of user data (including 3000 anomaly data, 1600 less burr types, 700 large downward shift types, and 700 multi-burr types) were extracted. Considering that the size of the anomaly data set is small, in order to avoid the problem of inaccurate analysis results caused by data imbalance, this paper performs under sampling on normal data samples to reduce the number of normal data samples. The experimental data set is shown in Table 1. The traditional random forest algorithm is compared with the algorithm of this paper. The experimental results are the average values of the four data sets after running 20 times. The comparison results are shown in Figs. 1 and 2. The experimental results show that the performance index of the algorithm in both accuracy and false Table 1 Training set and test set Data

Training set Normal type

Less bur type

Test set Large downward shift type

Multi-burr type

Normal type

Less bur type

Large downward shift type

Multi-burr type

Data set 1

1200

500

100

100

120

60

20

20

Data set 2

1800

800

200

200

180

80

30

30

Data set 3

2400

1100

400

400

240

120

40

40

Data set 4

3000

1400

600

600

300

150

60

60

Fig. 1 Comparison of accuracy rate performance

1114

J. Guo et al.

Fig. 2 Comparison of false alarm rate performance

alarm rate is better than the traditional random forest algorithm. It shows that the algorithm can fully mine the internal characteristics of the data to better analyze the data and utilize the data resources.

6 Conclusion With the rapid development of technologies such as the Internet of Things and big data, the construction speed of smart grids has gradually accelerated. In this context, the complexity of the collection, analysis, and management of user power data is gradually increasing. The sources of power data are diverse, the types are diverse, and the amount of data is large, which makes the user’s power anomaly detection algorithm less efficient. In order to solve this problem, this paper first analyzes the power data analysis, classifies the user’s power consumption data, and tags the power type for each data. Secondly, in order to facilitate data analysis and mining, based on the tag theory, the attribute set of the user’s power consumption data is extracted. Finally, a user data anomaly data analysis algorithm based on user portrait and the random forest is proposed. Compared with the existing algorithms, it is proved that the proposed algorithm achieves good results in terms of accuracy rate and false alarm rate. Therefore, the algorithm proposed in this paper helps power data analysts to quickly analyze and mine power data.

References 1. Wang, J.Y., et al.: Intelligent allocation of big data demand analysis and application research. J. China Electr. Eng. 35(8), 1829–1836 (2015) 2. Wang, D.W., Sun, Z.W.: Power user side big data analysis and parallel load forecasting. J. China Electr. Eng. 35(3), 527–537 (2015)

Power Anomaly Data Detection Algorithm …

1115

3. Lu, J., et al.: Intelligent power user behavior analysis feature optimization strategy. Power Syst. Autom. 5, 58–63, 83 (2017) 4. Gong, G.J., et al.: Cluster optimization strategy for intelligent user behavior analysis. Power Syst. Autom. 58–63 (2018) 5. Wang, Y., et al.: Analysis of user power behavior based on regularized matrix decomposition. Comput. Appl. 8, 2405–2409 (2017) 6. Zhang, S.X., et al.: Study on the analysis model of residential electricity consumption based on cloud computing. Grid Technol. 6, 1542–1546 (2013) 7. Shi, B.S., et al.: Analysis of the behavior of single-phase power users in distribution networks based on dynamic games. Power Syst. Autom. 14, 93–97, 145 (2017) 8. Wang, B.X., et al.: Analysis of electricity usage behavior of power customers for peak-cutting valley filling. In: Power Industry Informationization Annual Meeting, pp. 164–170 (2016) 9. Wang, Q.X., et al.: Multi-energy collaborative energy system with integrated user behavior analysis and supply and demand bilateral optimization. Power Autom. Equipment 6, 164–170 (2017) 10. Shen, H.T., et al.: Audio data review and classification of power users’ electricity data. Power Energy 1, 17–22 (2016) 11. Zhang, W.: Implementation of mobile phone user portraits in big data platform. Inf. Commun. 2, 266–267 (2014) 12. Hao, S.Y., Chen, J.R.: User portraits in the era of big data help companies achieve precision marketing. China Collective Econ. 4, 61–62 (2016) 13. Du, W., et al.: Based on transformer big data portrait technology and application research. Power Big Data 8, 10–14 (2017) 14. Liu, H., et al.: Study on the precision marketing segmentation model based on the mining of user portraits. Silk 52(12), 37–42 (2015) 15. Zhang, S.J., et al.: Building and application research of customer stereo portrait based on power big data. Electr. Appl. 37(8), 18–25 (2018) 16. Quinlan, J.R.: Induction of decision trees. Mach. Learn. 1(1), 81–106 (1986) 17. Breiman, L.: Random forests. Mach. Learn. 45(1), 5–32 (2001)

Optimal Distribution in Wireless Mesh Network with Enhanced Connectivity and Coverage Hao Zhang, Siyuan Wu, Changjiang Zhang, and Sujatha Krishnamoorthy

Abstract This paper considers the optimal distribution of wireless mesh network with reference to connectivity and coverage. The very intensive problem of finding the optimal router node placement (RNP) problem addressed with firefly optimization algorithm. Though there are many contemporary works with the same optimization, the proposed algorithm concentrates on the optimization of the objective function in terms of client coverage and the network connectivity. The generation of the seeds randomly uses the gradient descent method. The obtained results demonstrate the effectiveness of our proposed approach when compared to the existing genetic algorithm. Keywords Connectivity · Coverage wireless mesh network · Firefly algorithm

1 Introduction The lifetime and the power consumption of the network purely depend on the design of the network which is a big challenge in wireless sensor networks (WSN). It is impossible to replace the sensor in the realistic field after we deploy in various realtime application. Maintaining the lifetime of the network by improving network coverage is a challenging issue [1]. Ensuring the coverage can improve the performance of the network in the crowd of WSN. All these components need increased robustness, self-configuration, low cost and easy deployment.

H. Zhang · S. Wu · C. Zhang · S. Krishnamoorthy (B) Department of Computer Science, College of Science and Technology, Wenzhou Kean University, Wenzhou, China e-mail: [email protected] H. Zhang e-mail: [email protected] S. Wu e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_112

1117

1118

H. Zhang et al.

Some of the major application in which the WSN plays a very big role is like military operations and emergency rescue operations. The wireless mess communication needs a cautious planning and optimization methods in order to have an efficient connectivity and coverage. Our goal is to increase the connectivity and the coverage of the network, while still the WMN is sharing the resources fairly among them. The wireless interface of mesh client with hardware and software platforms is simpler than the mesh router interface. WMNs depend on a mesh topology in which every node (representing a server) is connected to one or more nodes, thereby allowing information transmission in extra one path. Mesh topology does not require a central node comparing to other topologies. These attribute permits mesh networks to be self-healing. Consequently, these types of networks are powerful to possible server node failures and more reliable [2]. Some of the major application where the coverage and the connectivity are essentials are listed ahead like for metropolitan area networks; urban areas; local wireless mesh networks; corporate and enterprise networks; neighborhood, community and home networks; surveillance, transport and medical systems; building automation; and among others [3]. Many optimization problems have demonstrated their applicability to the effective design of WMNs. These problems relate to optimize user coverage, network connectivity and stability among other aspects. Their resolution is vital for optimizing network performance [4]. A WMN that is taken for the study has a set of self-organized and self-configures inter-connected via radio links. Therefore, a connected cover in the WSNs must satisfy the following three constraints: (1) the sensors form complete coverage to the target. (2) All the monitoring results obtained by the sensors are transmitted to the sinks, and (3) the sinks compose a connected wireless network. These three constraints interact with each other as the second constraint involves both sensors and sinks. Finding the maximum number of connected covers is thus more difficult than either the problem of maximizing the number of sensor subsets under the coverage constraint or the problem of maximizing the number of sink subsets under the connectivity constraint [5]. Hence, the router node placement optimization may give a better solution so that the coverage of the network and the connectivity can be improved. This paper focuses on the router node placement (RNP) consisting of determining the best router positions. Objective of the paper is to find the best position to the mesh routers by using the firefly algorithm optimization with suitable objective function which gets better network connectivity and client coverage. This paper is solved using the non-heuristic approach and metaheuristic approach [6]. The optimization algorithm used here is the firefly algorithm (FA), and the results are compared with the GA. It is a population-based metaheuristic inspired by the flashing pattern behavior of fireflies. A detailed description of this approach is given in section three. The contribution in the paper is • Designing the system model for formulating the router node placement algorithm though there are contemporary works is published with same firefly the new objective function of the proposed (PM)

Optimal Distribution in Wireless Mesh Network …

1119

• Implementing the bio-inspired firefly optimization method to solve the router node position problem • Simulation results analyze the connectivity and the coverage of our proposed method with existing algorithms like GA.

2 Related Work Most of the proposals that handle the network design problem do not have regard for all parameters that have an influence on the design. Moreover, they suppose the presence of a physical topology in which the attributes of nodes (e.g., number of radios, range, and number of channels) are fixed. A basic version of a global form for WMN design with an unfixed topology in which the attributes and placement of nodes are not predefined is proposed in [7]. The aim of that search is to assign a WMN configuration and topology with a least cost that satisfies the demands in terms of delay and throughput [2]. The problem of finding the maximum number of connected covers is difficult because each connected cover must fulfill sensing coverage and network connectivity simultaneously [8]. An optimization problem is discovering the best solution from all feasible solutions. Classical methods of optimization are generally not used for their impracticality an intricate real-life situation. They are generally deterministic in nature. Nature-inspired metaheuristic algorithms [9] such as particle swarm optimization (PSO), genetic algorithm (GA), ant colony optimization (ACO) and firefly algorithm (FFA) are most powerful algorithms for optimization. The goal is to develop more competent and better optimization techniques that might involve more and more sophistication of algorithm. There are different techniques proposed in the literature to address the RPN problem. Xhava et al. have proposed three algorithms to solve the RNP issue: genetic algorithm [10], Tabu search [11] and hill climbing [12]. All these algorithms consider the optimization of two parameters: client coverage and network connectivity. PSO algorithm is also one of the best algorithms which are used to find the best solution to the RPN. In case of this algorithm, since it is being centralized approach consisting of iteratively executing the network topology is recorded. Lin et al. [13] have proposed a solution to the problem of dynamic RPN placement router in the presence of gateways.

3 System Model and Methods In this paper, we have applied firefly metaheuristic to solve the RNP issue described in the next section. Since most of the issues in the RNP can be addressed comparing the mechanism of firefly algorithm which is used for optimization with RNP. In FA, a firefly is compared with the solution for the RNP issue. The objective function can

1120

H. Zhang et al.

be compared with the light of the fly in the FA algorithm. There is the best solution for the problem which is always the brightest firefly in the group of fireflies. And exploration can be compared with the attraction between the flies. This comparison is the motivation which attracted to apply this algorithm for the best solution. The following section explains the system model and the problem formulation. We have certain assumptions in the system model which are explained in the same. The setup is examined in network simulator, and the results are displayed the result section. As the firefly optimization algorithm is a well-known algorithm, only a small description of the firefly is mentioned and the details can be referred from the paper [14].

3.1 Problem Formulation In this paper, we have considered the wireless mesh network G(V, E) where the vertices or representing the nodes and E is the edges between the nodes. The mesh router (R) client (c) and the gateway are used to form the network. Thus, V = CUR, where • C is the mesh client C = {C1 , C2 , C3 , . . . Cn }, C i is the ith mesh client (1 ≤ i ≤ n) and |C| = n is the number of the clients in the network considered. • R is the set of mesh routers: R = {r1 , . . . , rm }, r i is the ith mesh router (1 ≤ i ≤ m) and |R| = m is the number of routers. The RNP problem can be formulated with the assumption that every mesh router is equipped with radio interfaces and has the same transmission range ·. The deployment area is considered to be a rectangle of W width size and height H. Let {(X c1 , Yc1 ), . . . , (X cn , Ycn )} be the position of the n mesh clients in this area where (X c1 , Yc1 ) are the coordinates of the ith client. The objective of solving the RNP issue is to determine the new position of the routers denoted by (X ri , Yri ) which is the coordinate of ith router. The coverage is defined by the variable εi j which is given by Eq. (1). Coverage variable εi j  εi j =

1 if mesh clent Ci is covered by mesh router r j 0 Otherwise

(1)

The parameters that need to be optimized are client coverage (G) and network connectivity (G). The client coverage can be defined as the number of mesh clients covered by at least one mesh router, and it is obtained according to Eq. (2) Coverage: (G) (G) =

n    Max j∈{1,...,m} εi j i=1

(2)

Optimal Distribution in Wireless Mesh Network …

1121

The network connectivity is the biggest subnetwork connected with the network with the maximum nodes in the network. Let G be the set of disjoint subnetwork, and hence, the connectivity (G) can be calculated as represented in Eq. (3) (G) = Maxi∈{1,...,k} |G i |

(3)

where G lies between (1 ≤ G ≤ k) is the ith subnet. The next section clearly explains our objective function and algorithm steps. As the firefly algorithm is used for the optimization, the same steps are very much suitable with our method, and further for the clear understanding, the firefly algorithm can be referred [15]. In the extended version of the paper, the FA will be explained.

4 Solution to RNP with Firefly Optimization Algorithm The main objective of this study is to maximize client coverage and the network connectivity of the network with mesh routers. The client coverage can be calculated by ratio between the number of mesh clients covered and the mesh router. But at least one router should be in the coverage. However, the network connectivity represents the number of nodes (clients and routers) forming the biggest subnetwork. These two metrics have been considered in the definition of the objective function as given in Eq. (4) O(G) = λ

(G) (G) + (1 − λ) n n+m

(4)

4.1 Pseudocode for the Proposed Algorithm The main objective of our proposed method (PM) is to find the best solution using the firefly optimization technique to get the network router placement position for more coverage and connectivity.   1: Objective function O(F) where F = X r1 , X r2 . . . X rm (each firefly contains m routers) 2: Generate initial population of N fireflies Fi 3: Define light intensity or attractiveness β Fi at Fi is determined by the objective function O (Fi ). 4: Fbest is the firefly which has the best attractiveness. 5: while (t < Max iteration) 6: for i = 1: N (all  N firefly) 7: if β Fi < β Fbest

1122

8: 9: 10: 11: 12: 13: 14: 15: 16: 17:

H. Zhang et al.

for i = 1: m (all m routers) Move router rm of firefly Fi toward Fbest end for i end if Calculate new solutions and new light intensity end for i Find out the new best firefly Fbest end while Post result end procedure

4.2 Proposed Algorithm In this section, the proposed method is explained with FA optimization algorithm in finding the solution to the RNP issue. • In the initial step as in FA, the population-based metaheuristic, the initial solutions (corresponding here to fireflies) are generated randomly that is a set of solutions which are created randomly by placing all the mesh routers randomly. In order to control the random generation of the routers, we use the gradient descent. The seed generation formula is listed Eq. (5). Initially, the weight is assigned to 800 with a set of boundary location mentioned in the parameter. Once we propose the convergence every time when the router moves away from the boundary, it will be redistributed randomly with descent gradient method. w is the least value of weight. wn+1 = wn − (wn − w)/100

(5)

• As the next step, the attractiveness of every artificial firefly solution F i with respect to the rest fly F j is calculated with the following Eq. (6), and the objective function is already mentioned in Eq. (4).

β Fi = O(G i )

(6)

The attractiveness of the firefly depends only on the objective function, and the distance does not influence their attractiveness, and hence, it is possible to find various solutions to obtain the best one. • In the third step, exploration of the search has to generate the new solutions and that has to be recorded. After the number of iterations, the new solution can be obtained by using Eq. (7)

Optimal Distribution in Wireless Mesh Network …

    1 X Fi = X Fi + β F j X F j − X Fi + wα rand − 2   only if β F j > βi ω can help to control the random moving

1123

(7)

• The efficiency can be obtained only by merging the behavior of different metaheuristic solutions. In the proposed method, the exploitation is by local search and to get the best solution. This is achieved by moving one mesh router at a time. The process is repeated for number of iterations, and the results are better than the same method used in the reference work of this research [14].

5 Results and Conclusion The section describes the evaluation process and the results. The performance is compared with GA and another FA method [14]. The basic assumption is similar to [14], and the parameter considered is also the same. The impact in the results varies in the proposed method in objective function for different weights when compared to the other methods. Table 1 gives the experimental results of comparing with the genetic algorithm and another firefly method with (PM) our proposed method. Table 2 values under different routers and Table 3 values are under different radius. The table shows that our proposed method gives a better result. The simulation results show that after multiple iterations, the best results are recorded with gradual increase of 50 clients every time. Table 1 clearly displays the results that as the number of the clients increased, the coverage is also increased efficiently in our proposed method. The objective function is displayed with respect to the various client, router and the radius, which constantly shows that they are better in performance and the values compared to the existing methods. From Table 2, the objective function will increase, while the number of routers increases. The same can be observed in case of radius in Table 3 (Fig. 1). From the graph 1, various iterations of the proposed method with the changes in the weight have been plotted. The weight ranges 50, 100, 200, 400, and the values are recorded for different iterations with the initial weight as mentioned in Sect. 4.2. The graph is plotted against to claim the novelty of work in exhibiting our proposed method for various clients and routers and with different radius in the boundary. As the weight is decreased, the increase in the objective function is clearly shown in the graph above. While looking into the results of the client at the weight of 100, the objective function shoots to the higher value of 0.748, but still as the weight is decreased to 50, there is a lesser value in objective function which can be ignored. Though the graph illustrates the difference in the values, the actual value is 0.746. In this paper, we have addressed the problem of router node placement in a wireless

76.4

109.8

135.8

173.8

193.4

#100

#150

#200

#250

#300

69

186

153

124

97.2

PM

230

182

161

125

85

45

211.7

193.8

153.8

129.8

92.4

58.8

FA [15]

GA

40

FA [15]

40

Connectivity

Coverage

#50

No. of clients

Table 1 Connectivity and coverage and objective under different client numbers GA

201

172

139

113

87

56.6

PM

188

175

136

118

82

59.5

0.65

0.71

0.69

0.75

0.77

0.82

FA

0.62

0.63

0.63

0.65

0.71

0.80

GA

Objective function PM

0.68

0.69

0.71

0.76

0.77

0.88

1124 H. Zhang et al.

45

62

74

83

92

#10

#15

#20

#25

#30

89

78

67

55

42

PM

94

93

85

80

61

45

122

106

94

64

49

28

FA [15]

GA

26

FA [15]

32

Connectivity

Coverage

#5

No. of routers

Table 2 Connectivity and coverage and objective function under different routers GA

119

103

84

62

48

29

PM

112

87

82

56

52

50

0.93

0.83

0.76

0.58

0.45

0.3

FA

0.90

0.79

0.69

0.54

0.42

0.27

GA

Objective function PM

0.88

0.79

0.77

0.62

0.54

0.46

Optimal Distribution in Wireless Mesh Network … 1125

21.2

32

52

74

91

99

99

100

150

200

250

300

350

400

100

99

97

88

71

51

34

18

100

100

98

93

85

66

60

24

120

119

119

111

88

62

30

7.6

FA [15]

100

Connectivity PM

FA [15]

GA

Coverage

50

Radius

120

119

117

108

88

48

23

8

GA

Table 3 Connectivity and coverage and objective function under different radius values

120

120

116

105

82

56

52

50

PM

1.00

1.00

1.00

0.92

0.74

0.52

0.29

0.14

FA

1.00

1.00

0.98

0.89

0.73

0.46

0.26

0.12

GA

Objective function

1.00

1.00

0.98

0.90

0.77

0.62

0.4

0.21

PM

1126 H. Zhang et al.

Optimal Distribution in Wireless Mesh Network …

1127

Fig. 1 Performance results objective function at various weight values under our proposed method

mesh network. Defining the positions of these mesh routers is a very important issue before deploying the network. To solve this issue, a firefly optimization algorithm (FA) has been applied and the reference paper [15] is compared with our proposed method. The performance of the proposed solution has the best coverage than the connectivity. As the coverage is improving for the larger size, the connectivity is reduced. In the future, our work will be extended to find the connectivity and the coverage equally with other bio-inspired algorithms.

References 1. Akyildiz, F., Ian, F., Su, W.L., Sankarasubramaniam, Y., Cayirci, E.: A survey on sensor networks. IEEE Commun. Mag. 40(8), 102–114 (2002) 2. Girgis, M.R., et al.: Solving the wireless mesh network design problem using genetic algorithm and simulated annealing optimization methods. Int. J. Comput. Appl. 96(11) (2014) 3. Amaldi, E., Antonio, C., Matteo, C., Ilario, F., Federico, M.: Optimization models and methods for planning wireless mesh networks. Comput. Netw. 52(11), 2159–2171 (2008) 4. Goldberg, D.E., John, H.H.: Genetic algorithms and machine learning. Mach. Learn. 3(2), 95–99 (1988)

1128

H. Zhang et al.

5. Geem, Z.W., Joong, H.K., Gobichettipalayam, V.L.: A new heuristic optimization algorithm: harmony search. Simulation 76(2), 60–68 (2001) 6. Lin, C.C., et al.: Social-aware dynamic router node placement in wireless mesh networks. Wireless Netw. 22(4), 1235–1250 (2016) 7. Beljadid, A., Hafid, A.S., Gendreau, M.: Optimal design of broadband wireless mesh networks. In: IEEE GLOBECOM 2007-IEEE Global Telecommunications Conference, pp. 4840–4845 (2007) 8. Wang, J., Ratan, K.G., Sajal, K.D.: A survey on sensor localization. J. Control Theor. Appl. 8(1), 2–11 (2011) 9. Benyamina, D., et al.: A hybrid nature-inspired optimizer for wireless mesh networks design. Comput. Commun. 35(10), 1231–1246 (2012) 10. Barolli, A., et al.: Node placement for wireless mesh networks: analysis of WMN-GA system simulation results for different parameters and distributions. J. Comput. Syst. Sci. 81(8), 1496– 1507 (2015) 11. Xhafa, F., et al.: Solving mesh router nodes placement problem in wireless mesh networks by Tabu Search algorithm. J. Comput. Syst. Sci. 81(8), 1417–1428 (2015) 12. Xhafa, F., Christian, S., Leonard, B.: Local search methods for efficient router nodes placement in wireless mesh networks. J. Intell. Manuf. 23(4), 1293–1303 (2012) 13. Lin, C.C.: Dynamic router node placement in wireless mesh networks: a PSO approach with constriction coefficient and its convergence analysis. Inf. Sci. 232, 294–308 (2013) 14. Yang, X.S.: Firefly algorithms for multimodal optimization. In; International Symposium on Stochastic Algorithms. Springer, Berlin, Heidelberg (2009) 15. Sayad, L., Djamil A., Bouallouche-Medjkoune, L.: Placement optimization of wireless mesh routers using firefly optimization algorithm. In: International Conference on Smart Communications in Network Technologies (SaCoNeT)

A Traffic Anomaly Detection Method Based on Gravity Theory and LOF Xiaoxiao Zeng, Yonghua Huo, Yang Yang, Liandong Chen, and Xilin Ji

Abstract In order to solve the problem that the traditional method cannot detect the anomaly well, we propose a new traffic anomaly detection method based on the theory of gravity and local outlier factor (LOF) in this paper. We improve the density peak clustering method based on the theory of gravity firstly. A new concept of potential energy is proposed, and a new potential energy–distance decision graph is used for clustering and anomaly detection. Considering the local characteristics of the sample points, we propose the concept of potential energy gradient with reference to LOF for further anomaly detection to improve the accuracy of detection. The simulation results show that the proposed method can detect more types of outliers and get more accurate results. The improved anomaly detection method has good anomaly detection performance. Keywords Density clustering · Theory of gravity · Network traffic · Anomaly detection · Local outlier factor

1 Introduction In the network, traffic data is one of the most important data reflecting the state of the network. Statistical analysis of network traffic data can make the management of networks more efficient [1]. The outlier of the traffic usually represents abnormal X. Zeng · Y. Yang (B) State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] Y. Huo The 54th Research Institute of CETC, Shijiazhuang, China L. Chen State Grid Hebei Electric Power Company Co., Ltd Information & Telecommunication Branch, Shijiazhuang, China X. Ji Institute of Chinese Electronic Equipment System Engineering Company, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_113

1129

1130

X. Zeng et al.

conditions in the network, including network attacks and equipment failures. These exceptions need to be processed as soon as possible, or the whole network will be infected. Although there is much research on Internet traffic anomaly detection, there are still some problems. Firstly, the detection performance does not fit the real network environment. Secondly, the speed of detection needs to be improved. Therefore, further improvement and optimization of the traffic anomaly detection method are needed. Clustering algorithms are commonly used methods for anomaly detection [2, 3]. It does not require labeled data, which fits the real traffic data collected. In this paper, we will propose a traffic anomaly detection method based on the clustering algorithm. The rest of the paper is organized as follows: Sect. 2 describes some related works about anomaly detection. Section 3 introduces the proposed improved anomaly detection algorithm. Section 4 demonstrates our algorithm’s efficiency and superiority by experiment. Section 5 concludes the paper.

2 Related Work Bhuyan et al. [4] provide a structured and comprehensive overview of various facets of network anomaly detection in its review. They categorize existing network anomaly detection methods and systems for researchers to quickly be familiar with recent research on network anomaly detection. Akoglu et al. [5] make a survey to provide a general, comprehensive, and structured overview of the state-of-the-art methods for anomaly detection in data represented as graphs. They give a general framework for the algorithms categorized and present several real-world applications of graph-based anomaly detection in diverse domains which include Internet traffic. Marnerides et al. [6] also make a survey to present a comprehensive investigation of the current state of the art within the network anomaly diagnosis domain, in particular for Internet backbone networks. Bhuyan et al. [7] present a multi-step outlier-based approach for the detection of anomalies in network-wide traffic. They first design a fast distributed feature extraction and data preparation framework to extract features from raw networkwide traffic. Then, they generate an outlier score function to rank network traffic in order to identify anomalies. To overcome the problem that the outlier scores produced are not sufficiently diverse to allow precise ranking of outliers, Ha et al. [8] develop a new measure called the observability factor (OF) involving an iterative random sampling procedure. For big network traffic data, Zhang et al. [9] propose an Adaptive Stream Projected Outlier deTector (A-SPOT) to detect anomalies from large datasets. A-SPOT is able to adopt dynamic subspaces to detect subspace anomalies. In their experiments, A-SPOT is very efficient and scalable to large and high-dimensional data streams.

A Traffic Anomaly Detection Method Based …

1131

Dromard et al. [10] present a new online and real-time unsupervised network anomaly detection algorithm (ORUNADA). They use a discrete-time sliding window to update continuously the feature space and an incremental grid clustering to detect rapidly the anomalies.

3 The Improved Traffic Anomaly Detection Method 3.1 The Improved Method Based on the Theory of Gravity In 2014, Rodriguez proposed a density peak clustering (DPC) [11] algorithm in science. It is performed by calculating the density and the distance of the sample points to generate the decision graph. Although the DPC algorithm has better effects than the distance-based clustering, the accuracy of the clustering result depends on the selection of the cutoff distance, which is hard to determine. It also does not consider the local characteristics of the data when calculating the density. Therefore, we propose a new local density calculation method based on the theory of gravity. We introduce Newton’s law of universal gravitation into the density peak clustering. For each sample point, we consider the mass to be equal and simplified to 1, and r is the distance between the two sample points. In order to simplify the calculation, we also take 1 for the gravitational constant G. Then, the gravity of each sample point i to sample point j can be expressed as: Fi j =

1 r2

(1)

where r di j represents the distance. It can be seen from Formula (1) that the gravitation between two sample points gradually approaches zero as the distance increases. For each sample point, we propose a new concept of potential energy to replace the original density. Definition 1 For sample point i, its potential energy represents the sum of the gravity of this point and other points. Its calculation formula is as follows: Qi =



e Fi j

(2)

j

where e represents the natural base. As the potential energy of a point will calculate the sum of all the points adjacent, a point with a higher local density can get higher potential energy. Points with lower local density and far away from other points will be difficult to obtain potential energy. Such points usually represent the anomalies to be detected. In order to prevent the calculation from being too complicated and pay more attention to the local characteristics of the sample point’s potential energy, we use

1132

X. Zeng et al.

the idea of KNN to calculate only the gravity of the K-nearest neighbor sample points and potential energy they provided. So, the potential energy of a sample point i is: 

Qi =

e Fi j

(3)

j∈KNN(i)

where e represents the K-nearest neighbors of point i. We replace the density in the DPC algorithm with the potential energy, and the distance definition is changed to the minimum distance from each point to a point whose potential energy is greater than it: δi = min di j j:Q j >Q i

(4)

3.2 Rules of Anomaly Detection After calculating Q i and δi of the sample, the corresponding potential energy–distance decision graphs can be drawn. According to the decision graph, points with small potential energy and large distance may be anomalies. This will give a preliminary outlier judgment. In order to get a more accurate result, we refer to the local outlier factor (LOF) for the identification of abnormal points and introduce a new concept of potential energy gradient. Definition 2 For sample point i, the potential energy gradient G i represents the difference between the potential energy of this point and its K-nearest neighbor sample points. The calculation formula is as follows:  Gi =

j∈KNN(i)

K ∗ Qi

Qj

(5)

where Ke represents the number of calculated neighbors. If the G i is closer to 1, which means that the potential energy of the sample point i is similar with its neighbor point’s potential energy, there is high probability that point i and its neighborhood belong to one cluster. But if the G i is smaller than 1, i has more probability to be a point with high density; if the G i is larger than 1, point i is more likely to be an abnormal point. In summary, the specific flow of the improved anomaly detection algorithm using the improved density peak clustering based on potential energy (PE-DPC) is as follows: 1. Calculate the distance from each point in the sample dataset to other points, and then sort by di j . 2. Calculate the potential energy of each point according to Formulas (2) and (3).

A Traffic Anomaly Detection Method Based …

1133

3. Calculate the distance of each point according to Formula (5). 4. Make (Q i , δi ) decision map, and select cluster centers and abnormal points according to the decision map. 5. For the abnormal point obtained in the fourth step, calculate the gradient potential energy of point i, and then choose the points that are larger than the threshold as abnormal points. In this article, we choose 80% of the maximum value as the threshold.

4 Experiments In order to verify the anomaly detection algorithm with PE-DPC proposed in this paper, we compare it with the original density peak clustering algorithm. In this experiment, we use the commonly used anomaly detection evaluation indicators: recall rate (Re), accuracy (Pr), F1 value, and correct rate (A). Their definition is as follows: Re =

TP TP + FN

(6)

Pr =

TP TP + FP

(7)

2 ∗ Pr ∗Re Pr +Re

(8)

TP + TN TP + TN + FP + FN

(9)

F1 = A=

where TP represents true positive points, FP means false positive points, FN represents false negative points, and TN represents true negative points. It is obvious that the larger these indicators, the better the results of the anomaly detection. Figures 1 and 2 show the results of two clustering methods on the flame dataset and the synthetic dataset, respectively. From the results of the clustering in Fig. 1, we can find that in the results of the DPC, the upper left two points are divided into cluster while the improved algorithm PE-DPC identifies these two anomalies. In the clustering results of the artificial dataset in Fig. 2, we can see that our improved algorithm can better identify the abnormal points in the center of the graph than the DPC. In addition, we experimented with two real traffic datasets, Traffic_Data_Euro [10] and Traffic_Data_UK [11]. The former is shown in Fig. 3, and the latter is shown in Fig. 4. In order to preserve the characteristics of the traffic and improve the calculation efficiency, we use 24 data points per day as a sample. After normalizing these two datasets, the data of the Traffic_Data_Euro is regular. So, we add 8 abnormal points.

1134

X. Zeng et al.

(a) The result of DPC

(b) The result of PE-DPC

Fig. 1 Clustering result on flame dataset

(a) The result of DPC

Fig. 2 Clustering result on a synthetic dataset

Fig. 3 Traffic_Data_Euro dataset

(b) The result of PE-DPC

A Traffic Anomaly Detection Method Based …

1135

Fig. 4 Traffic_Data_UK dataset

Table 1 Anomaly detection result on traffic datasets Traffic_Data_Euro

Traffic_Data_UK

DPC

PE-DPC

DPC

PE-DPC

Re

0.375

0.625

0.214

0.643

Pr

1

0.83

0.5

0.643

F1

0.54

0.71

0.30

0.64

Fig. 5 Comprehensive results

In the Traffic_Data_UK dataset, we can find that the most obvious anomalies are the 1st, 2nd, 3rd, 6th, 35th, 36th, 37th, 38th, 39th, 40th, 41st, 42nd, 43rd, 44th daily

1136

X. Zeng et al.

Fig. 6 Correct rate results

points, totally 14 anomalies. Table 1 and Fig. 5 show the results of anomaly detection on these two traffic datasets. It can be seen from Table 1 and Fig. 5 that the proposed PE-DPC has a higher anomaly detection rate than the DPC on both datasets. Although the accuracy of the anomaly detection based on PE-DPC is slightly reduced on Traffic_Data_Euro, the detection rate of the DPC is too low, and only three abnormal points are detected among all the eight abnormal points which make it to have lower possibility to make mistakes. Through the comparison of F1 values, we can find that the improved algorithm proposed in this paper has better comprehensive results. Figure 6 shows the correct rate of the two methods on all four datasets. It can be seen from the figure that the improved potential energy-based method on all these four datasets has higher correct rate than the DPC. In summary, the improved algorithm PE-DPC proposed by us has better anomaly detection performance than DPC.

5 Conclusion In this paper, a density peak outlier detection algorithm based on gravitational theory is proposed for traffic anomaly detection. Considering the local characteristics of the data, we use the theory of gravity to redefine the local density and distance and propose a definition of potential energy to replace the original density in DPC. Then, we propose a rule for judging outliers, in which the new definition of potential energy gradient is used. In the simulation experiments of common cluster datasets and traffic datasets, the feasibility of the proposed method is proved. Moreover, compared with the original density peak clustering, our proposed algorithm shows better performance in anomaly detection.

A Traffic Anomaly Detection Method Based …

1137

Acknowledgements This work was supported in part by Open Subject Funds of Science and Technology on Information Transmission and Dissemination in Communication Networks Laboratory (SKX182010049), Fundamental Research Funds for the Central Universities (2019PTB-019), the Industrial Internet Innovation and Development Project 2018 of China.

References 1. Liu, Z.G., Yin, X.C., Lee, H.J.: A new network flow grouping method for preventing periodic shrew DDoS attacks in cloud computing. In: International Conference on Advanced Communication Technology (2016) 2. Li, Y., Zhang, Y., Zhu, F.: The method of detecting AIS isolated information based on clustering and distance. In: IEEE International Conference on Computer and Communications (2017) 3. Gao, J.E., Liu, J.: An anomaly detection algorithm for time-series data flow oriented to trajectory information. In: Computer Engineering (2018) 4. Bhuyan, M.H., Bhattacharyya, D.K., Kalita, J.K.: Network anomaly detection: methods, systems and tools. IEEE Commun. Surv. Tutor. 16(1), 303–336 (2014) 5. Akoglu, L., Tong, H., Koutra, D.: Graph-based anomaly detection and description: a survey. Data Min. Knowl. Disc. 29(3), 626–688 (2014) 6. Marnerides, A.K., Filho, A.E.S., Mauthe, A.: Traffic anomaly diagnosis in Internet backbone networks: a survey. Comput. Netw. 73(C), 224–243 (2014) 7. Bhuyan, M.H., Bhattacharyya, D.K., Kalita, J.K.: A multi-step outlier-based anomaly detection approach to network-wide traffic. Inf. Sci. 348, 243–271 (2016) 8. Ha, J., Seok, S., Lee, J.S.: A precise ranking method for outlier detection. Inf. Sci. 324(C), 88–107 (2015) 9. Zhang, J., Li, H., Gao, Q., et al.: Detecting anomalies from big network traffic data using an adaptive detection approach. Inf. Sci. 318(C), 91–110 (2014) 10. Dromard, J., Roudière, G., Owezarski, P.: Online and scalable unsupervised network anomaly detection method. IEEE Trans. Netw. Serv. Manage. (99), 1 (2017) 11. Rodriguez, A., Laio, A.: Machine learning. Clustering by fast search and find of density peaks. Science 344(6191), 1492 (2014) 12. https://datamarket.com/data/set/232j/internet-traffic-data-in-bits-from-a-private-isp-withcentres-in-11-european-cities-the-data-corresponds-to-a-transatlantic-link-and-wascollected-from-0657-hours-on-7-june-to-1117-hours-on-31-july-2005-hourly-data#!ds= 232j&display=line 13. https://datamarket.com/data/set/232h/internet-traffic-data-in-bits-from-an-isp-aggregatedtraffic-in-the-united-kingdom-academic-network-backbone-it-was-collected-between-19november-2004-at-0930-hours-and-27-january-2005-at-1111-hours-hourly-data#!ds=232h& display=line

Construction of Management and Control Platform for Bus Parking and Maintenance Field Under Hybrid Cloud Computing Mode Ying-long Ge

Abstract The intelligent management of the bus parking and maintenance field can not only improve the control of the public transport commercial vehicle and eliminate potential safety risks, but also provide travelers with parking services. We illustrate the effort to forward a scheme of integrating hybrid cloud computing technology and Internet of things technology to construct the management and control platform of the bus parking and maintenance field. This paper proposes innovatively to use the framework of comprehensive Internet of Things achieves tracking and feedback of the vehicle in real time, the private cloud architecture solves the problem of data sharing among subsystems in the field and among the fields, and the public external service module adopts a public cloud architecture. Keywords Public transport commercial vehicle · Hybrid cloud · Internet of things

1 Introduction The realization of intelligent control of urban public transport is a sign of urban development entering a higher level. With the development of the intelligent public transportation, intelligent dispatching system, intelligent bus service system, intelligent assignment system and so on, which not only facilitate travelers, but also benefit public transport workers. In particular, these intelligent systems help managers to carry out the precision management and improve the control capability of the Public Transport Commercial Vehicle (PTCV). The management and control of the PTCV can be divided into internal-field management and external-field management. External-field management refers to the management and control with the activities of the PTCV outside the parking field. The bus dispatching management system, bus assignment management system, vehicle arrival service system and so on belong to these kinds of system. With the improvement of on-bus hardware and software technology, control technology Y. Ge (B) School of Information Engineering, Hangzhou Dianzi University, 310012 Hangzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_114

1139

1140

Y. Ge

and communication technology, the standardization of the PTCV dispatching, the capability for the PTCV of the external-field management and control system has been greatly improved. Internal-field management refers to the management and control of the activities of the PTCV in the bus parking and maintenance field and rendering parking services to the community vehicles (such as taxis, private cars). It involves: bus entry and exit, safety checking, paying management, bus repair, refueling or LNG filling, bus cleaning, parking, patrol, monitoring and access control management. It represents a life cycle for the PTCV in the bus parking and maintenance field, which is a closed-loop system. As a bus maintenance and integrated parking area, the improvement of management efficiency can greatly reduce the management cost of the field, which plays a significant role in raising the quality of public transport services. In view of this, this paper proposes innovatively a solution of “Internet of things plus hybrid cloud computing” to solve the PTCV management and control in the field. The intelligent management of the bus parking and maintenance field provide badly needed parking resources for the nearby community vehicles through the parking data sharing and the measures of tracking and management for all PTCV.

2 Current Situation and Requirement At present, there are many management processes in the field, but most of the business operations are still in the stage of manual management and simple data entry, which cannot track the PTCV in real time, let alone the supervision and control of the PTCV. An intelligent management and control platform are urgently needed for both the managers and employees in the field, and it will help them to control the people, bus and the environment on the field. The specific application requirements are reflected in the following aspects.

2.1 Real-Time Tracking of the PTCV For a long time, the data generated by the processes that include bus entry and exit, paying record, refueling, bus cleaning, security inspection has been recorded manually, so the staff has to enter each data obtained manually into the computer and proofread it. A lot of PTCV will enter or exit the field in the morning and evening rush hours, and the security checkers will make mistakes such as missing inspection and recording error. In particular, the PTCV in repair or abnormal exit the field, which brings about safety risk to the urban road traffic. However, video monitoring system is used to track the PTCV in real time at this stage, which can only be used as a supplementary tool to find out the underlying causes after the safety problem is occurred. It is passive rather than active to issue an early warning. Therefore, a

Construction of Management and Control Platform …

1141

platform for real-time automatic tracking of the PTCV and alerting in advance of abnormal PTCV is urgently needed by managers of the field.

2.2 Data Sharing About 800 PTCVs can be carried by large-scale bus parking and maintenance field. The number of the PTCV entering and leaving has reached 2000 times daily. A large amount of data will be generated by the processes of paying management, bus cleaning, refueling and parking which has correlation between them. This requires the data from each process to be shared, and even the data sharing among fields. The information of idle parking space in the field is urgently needed by travelers, whose sharing can solve the social disease of “parking difficulty.” So, data sharing is one of the necessary functions for bus parking and maintenance management and control platform.

2.3 The Cost of System Construction The construction of information systems for a large-scale bus parking and maintenance field needs to purchase database servers, middleware servers, expensive storage systems, etc., which are only the cost of hardware. In addition, equipment maintenance staff are required to maintain the equipment regularly to ensure the smooth operation of the equipment. The system construction cost and the later upgrade cost will make the budget overrun. Therefore, reducing the cost of system construction is also one of the most important requirements for managers of the field.

2.4 The Guarantee for Data Security Every record generated in the field will affect the actual benefits of various departments and mutual balance, especially the PTCV revenue data, directly related to the profits of the public transport enterprises, so the data security and tamper-resistant are particularly important. The fine-grained layout of user, role and rights is also very important for data protection. The information generated by the process in the field is private, it can only be provided to all departments of the field or other fields, and it must be isolated from the data providing to the traveler. All of the above requirements need to be considered in the implementation of bus parking and maintenance field management and control platform.

1142

Y. Ge

3 Applicability for the Hybrid Cloud Technology 3.1 Cloud Computing Concept Cloud computing is a style of computing in which dynamically scalable and often virtualized resources are provided as a service over the Internet. It is also the result of the combination of utility computing, virtualization, infrastructure-as-a-service (IaaS), software-as-a-service (SaaS), platform-as-a-service (PaaS), etc [1]. Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications and services) that can be rapidly provisioned and released with minimal management effort or service provider interaction [1, 2].

3.2 Hybrid Cloud There are three types in cloud computing: public cloud, private cloud and hybrid cloud. Private clouds are built for a single customer and provide the most effective control over data, security and quality of service. Public cloud means that customers store their applications on third-party virtual servers. So, servers, storage and networks have third-party responsibility for operation and maintenance, which can save customers more cost and give customers more flexible expansion [3]. The hybrid cloud is the combination of one or more public cloud providers (such as Amazon Web Services or Google Cloud Platform) with a private cloud platform— one that is designed for use by a single organization or private infrastructure [2]. The public cloud and private infrastructure, which operate independently of each other, communicate over an encrypted connection, using technology that allows for the portability of data and applications. The public and private clouds (or infrastructure) in a hybrid cloud arrangement are distinct and independent elements. This allows organizations to store protected or privileged data on a private cloud, while retaining the ability to leverage computational resources from the public cloud to run applications that rely on this data.

3.3 System Applicability The key to choose which type of cloud computing architecture is to meet user’s requirements. The management and control platform of the bus parking and maintenance field urgently need to solve the problems of data sharing within a single field and data sharing among different fields, which just conform to the characteristics of private cloud architecture. In addition to the data sharing in the field, the platform

Construction of Management and Control Platform …

1143

must also provide parking information and the PTCV dispatching information to the outside, so that social vehicles can share this information in time to solve the “parking difficulty” problem. The public data was published by the platform through the third-party hosting platform. Public cloud can meet these requirements which can greatly reduce the cost, so long as we design a security isolation system to prevent invasion [4, 5]. Therefore, the hybrid cloud model can be a good solution to data sharing, high cost, data security requirements.

4 The Construction of System Model The bus parking and maintenance field management and control platform are designed to provide data resources and system control services for all kinds of field, central station, parking lot and operation management organizations under the urban public transport group and to provide services for a large number of travelers to a certain extent. The platform is made up of fundamental layer, data resource layer, application layer and service layer. The fundamental layer is infrastructure of the platform. It is composed of basic network, supporting hardware facilities and system software. The basic network environment includes intranet, Internet and wireless sensor network (WSN). The supporting hardware facilities include virtualized central server, distributed storage system, sensor equipment and embedded system modules. The system software includes middleware, database and operating system. The fundamental layer provides a complete hardware and system software foundation for the platform after all (see Fig. 1). The data resource layer is responsible for data collection, which extracts business data from each process into data warehouse through design pattern–adapter, and provides data for upper module. The application layer is for the managers in the field. The managers can control the actions of the PTCV in each process of the field directly. The service layer offers services for the use of shared data both inside and outside the field. It adopts hybrid cloud architecture. Private cloud system shares cloud data for all departments in the field and among the field. Public cloud system provides parking space, the PTCV return and access control data for the travelers in order to use parking space reasonably and alleviate the problem of “parking difficulty.”

4.1 The Construction of Fundamental Layer Based on “Internet of Things Plus” The first-floor skeleton of the management platform is to solve the problem of realtime monitoring for the PTCV mentioned earlier. It has integrated comprehensive Internet of things (IoT) sensor-based technology into the fundamental layer.

1144

Y. Ge

Fig. 1 System architecture model

The license plate recognition system is used to identify the PTCV entering and exiting the field and upload the data to the data center. The wireless handheld device is used to check the safety of PTCV, which ensures the normal PTCV entering or exiting the field. It will upload the checking information to the data center after completing the process. When the PTCV arriving at the paying management department, the cashier will collect the PTCV’s ticket income and upload the data to the data center through the wireless handheld device. The wireless RFID devices will automatically obtain the information when the PTCV is refueling at the filling or gas station. After the PTCV completes refueling, the driver confirms the refueling process and the data will upload to the data center. When the PTCV enters the bus cleaning service place, the wireless RFID device automatically perceives the PTCV’s information and starts the cleaning equipment to wash it. The equipment will end the process of cleaning and upload the data to the data center after the PTCV leaves the place. After the PTCV enters the parking spot, the hybrid parking space sensation system

Construction of Management and Control Platform …

1145

Fig. 2 Framework diagram for the management and control platform of the bus parking and maintenance field based on IoT

which combined with flat and multistoried parking lot will automatically acquire the PTCV’s parking information and upload the data to data center (see Fig. 2). Finally, all the data is synchronized to the cloud through WSN and intranet. They can be shared with other fields to track the PTCV.

4.2 The “Private Cloud” of Data Sharing in the Field The private cloud computing platform is used for data exchange and data sharing among different fields. This platform is effective to reduce maintenance costs, simplify management, improve system’s high availability, make dynamic adjustment to resources and achieve load balancing between systems [6]. The platform is built on a computer cluster composed by a large number of servers and provides external infrastructure-as-a-service (IaaS), while the demand for resources distribution, system partitioning, dynamic load balancing and high availability is achieved by virtualization technology supported by VMware vSphere, as shown in Fig. 3. The design of private cloud computing platform takes three factors into account: the interaction of subsystems in the field, data sharing among different fields and high availability (HA) between base server and the private cloud computing platform. The Interaction of Subsystems on The Internal-field Management Data interaction is needed among the subsystems in the field. For example, paying management and bus cleaning require bus entry and exit data support, and entry and exit require bus repairing and bus checking data support. Message dispatching system will be applied in each subsystem. When the PTCV passes through each

1146

Y. Ge

Fig. 3 Private cloud service architecture based on data sharing

process, the data of each subsystem will be temporarily cached on the local basic virtual server and synchronized to the private cloud when the message dispatching system is scheduled. Then, other subsystems can get the information they needed in the cloud. The Implementation of HA Between Base Server and The Private Cloud Platform In the implementation of HA, the traditional solution has high cost and low resource utilization rate. HA implementations are not effectively addressed by mirroring alone and are limited by specific operating system and applications. Therefore, the platform adopts data synchronization technology based on log mining, which synchronizes the PTCV dispatching information and the data produced by every process in the field

Construction of Management and Control Platform …

1147

into private cloud in time, so as to facilitate other field and management departments to share the data. Data Sharing Among the Different Fields Each parking base also needs data sharing. For example, when parking vehicle in parking base A exits in parking base B, it needs to obtain the dispatch data of the PTCV, which is stored in parking base A. Therefore, the base servers of the two fields can share data through private clouds, which can be shared through data sharing directly, i.e., querying the view in the database through the authorized user. A more flexible way is to use Web API calls, which require shared data to be coded in JSON format and expose the interface through Web service, so that the data requirement side calls the data.

4.3 The Public Cloud for the Public Service Oriented The public-oriented system of this platform mainly considers the cost. The construction cost of private cloud is too high, and its scale is limited. Public cloud is low cost and easy to expand in contrast to the private cloud [5, 6]. Therefore, the public services such as frequent travel queries for data exchange and the queries for parking spaces in the field are suitable for public cloud construction, as shown in Fig. 4. As the most common cloud storage mode, the user’s data information may be stored in any corner of the public cloud server. Because it is semi-trusted, even if users protect their privacy through data encryption, there will still be security risks of sensitive information leakage. The platform uses a Sensitive User Authentication Mechanism (SUAM) to authorize data access to trusted users. The SUAM requires users who obtain data to apply for services to the public cloud platform first. According to the access white list and user registration information provided by users, the system issues an encrypted storage key (ESK) to users, and the user becomes a sensitive user of the platform [5]. The platform will send the list of related services and access mode to the sensitive users. When a user visits the cloud service, the system will authenticate the following processes: a. b. c. d. e. f. g. h.

The user sends a request to the public cloud service. Cloud services return the service identification token to users. Users communicate with the SUAM. The SUAM returns the verification result of the token and authenticates the user as a sensitive user. Cloud services obtain user identity notes (including ESK) based on service identification token. Cloud service sends user identity notes to the SUAM. The SUAM validates user identity notes and returns verification results. The users communicate directly with cloud services after authentication passes.

1148

Y. Ge

Fig. 4 Hybrid cloud service architecture

In this way, the trusted users can access the data of the public cloud in the platform. When travelers need to use the resources of parking space in the field, the platform can also sense and notify the monitoring and access control system to record the entering non-PTCV to improve the external service function of the field.

5 Conclusions and Future Work We have presented in this paper our efforts toward the hybrid cloud computing applied to the management and control platform of the bus parking and maintenance field. The system adopts the technology of Internet of things plus hybrid cloud computing, which solves the problems of the PTCV management confusion, data cannot be shared and waste of parking space resources in original field, and explores a set of feasible management and control scheme for the bus parking and maintenance field. The solution can reduce the workload and data errors of the staff in the field, and provide help for the management. In the development and implementation of the system, the following questions are worthy of attention. a. The users of the system are frontline workers and bus drivers, which determines that the system must present complex processes in a concise interface.

Construction of Management and Control Platform …

1149

Fig. 5 Data analysis chart after implementation of the management and control platform of a bus parking and maintenance field

b. The shortage of data read in the system hardware must be corrected by software method. c. We must consider both the real-time performance of data exchange and safety in the hybrid cloud system. The system has been implemented in a large bus parking and maintenance field in Hangzhou, China. The implementation effect chart is shown in Fig. 5. This chart is a daily data analysis chart after the implementation of the system. The managers can not only check the real-time PTCV entry and exit information of the field and the parking situation of the PTCV in the field, but also check the abnormal individuals of the statistical information in each process in the current day or in the past three days. In the future, we will further study the following two aspects: On the one hand, we will study more automated PTCV tracking mode, improve the current method of obtaining the PTCV information, reduce manual intervention and make the work process in the field faster and more convenient; on the other hand, we will research and improve the coordination mechanism of hybrid cloud to make private cloud data storage more convenient and public cloud data access safer. Acknowledgements This study is supported by the Public Projects of Zhejiang Province, China (No. 2017C33144).

1150

Y. Ge

References 1. Hayes, B.: Cloud computing. Commun. Acm 51(7), 9–11 (2008) 2. Yamaguchi, H., Ida, M.: SaaS virtualization method and its application. Inf. Process. Manage. 42(1), 56–73 (2016) 3. Armbrust, M., Fox, A., Griffith, R., et al.: A view of cloud computing. Commun. ACM 53, 50–58 (2010) 4. Chen, L.: Research on data security sharing technology for hybrid cloud environment. A Dissertation Submitted to PLA Strategic Support Force Information Engineering University: School of Cyberspace Security (2018) (In Chinese) 5. Xi, S.Z.: The mechanism of multi-user searchable encryption based on attribute access control in hybrid cloud. School of Computer and Communication Lanzhou University of Technology (2018) (In Chinese) 6. Zhu, J.T., Hu, Y., Huang, Z. H., Xu, Y.W.: The building of government website resource service platform based on hybrid cloud computing pattern-An example of Conghua City website upgrades project. J. Guangzhou Univ. (Natural Science Edition) 11(6), 83–90 (2012) (In Chinese)

A Data Clustering Method for Communication Network Based on Affinity Propagation Junli Mao, Lishui Chen, Xiaodan Shi, Chao Fang, Yang Yang, and Peng Yu

Abstract With the expansion of the network scale, the amount of data in the communication network is also increasing. Data mining technology can effectively analyze the data generated in the network. As one of the important technologies of data mining, clustering is also widely used in the field of communication. However, the general clustering algorithm has numerical oscillation or large computational complexity. This paper proposes an improved AP clustering algorithm and proposes the concepts of filtering data transfer objects and dynamic damping coefficients. Experiment results show that the algorithm proposed in this paper can effectively improve efficiency and adapt well to communication network data. Keywords Communication network · Clustering · Affinity propagation

1 Introduction With the popularity of communication technologies, more and more services are carried on the communication network. Based on the large amount of historical data accumulated in the database, the analysis of the data is simpler and more accurate. Among them, clustering, as an important means of data mining technology, has important theoretical research significance and engineering practice value of communication networks. Affinity propagation [1] is a new clustering algorithm proposed by Frey and Dueck on Science. Compared with the previous clustering method, the algorithm has the advantages of high stability and no need to preset the number of clusters. This paper J. Mao · L. Chen The 54th Research Institute of CETC, Shijiazhuang, Hebei, China X. Shi · Y. Yang (B) · P. Yu State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China e-mail: [email protected] C. Fang Beijing Smartchip Microelectronics Technology Company Limited, Beijing, China © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_115

1151

1152

J. Mao et al.

proposes a new improved method IMAP based on the original AP algorithm. The data exchange object in the AP algorithm is filtered and the way to dynamically adjust the damping coefficient in the data transmission process is proposed, so that it can eliminate the oscillation and keep the algorithm fast iterative. The remaining chapters of this paper are organized as follows: Sect. 2 introduces the related work, Sect. 3 introduces improved algorithms, Sect. 4 introduces simulation experiments, and Sect. 5 summarizes the paper.

2 Related Works Operation and maintenance data for communication network refers to the data generated during the operation and maintenance of the information system [2]. Common clustering methods are hierarchical-based clustering algorithms [3], partitionbased clustering algorithms [4], density-based clustering algorithms [5], grid-based clustering algorithms and model-based clustering algorithm [6]. AP clustering is a message-based clustering algorithm [1]. In order to meet different needs, some improved algorithms have also been proposed. Leone et al. relaxed the constraints of the standard AP algorithm and proposed a soft-constrained AP algorithm, which was applied to clustering of irregularly shaped data sets [7]. Wang et al. proposed a multi-class representative point AP algorithm for clustering problems of multisubclass data sets [8] and a single-view AP algorithm to multiple perspectives and proposed a new multi-view AP algorithm [9].

3 Improved Algorithm IMAP for Communication Network In this paper, an improved affinity propagation algorithm IMAP is proposed. According to the characteristics of operation and maintenance data in the communication network, the scope of message propagation in the original AP algorithm is improved and the concept of dynamic damping coefficient is introduced. The damping coefficient is dynamically adjusted during the data transmission process. It can eliminate both oscillating and fast iteration of the algorithm when the oscillation occurs. The specific process of the clustering algorithm IMAP for communication network proposed in this paper is shown in Algorithm 1.

A Data Clustering Method for Communication …

1153

3.1 Affinity Propagation Clustering Algorithm Affinity propagation clustering is a message-based clustering method. The main idea is to regard the data as a node in a two-dimensional space. By directly transmitting information in the data node, it continuously circulates and iteratively modifies the position of the cluster center point in the space and finally obtains some high-quality cluster center points. The method is as follows: Construct a similarity matrix to describe the similarity between sample data points, and then implement a kind of responsiveness information r (responsibility) and availability information a (availability) by means of the similarity matrix similar and the bias parameter preference. This algorithm is actually a clustering algorithm based on message passing mechanism. The affinity propagation clustering algorithm takes the similarity matrix between the data points, the bias parameter preferencei and the damping coefficient λ as input, uses these two kinds of information to update and iterate and finally obtains and outputs the clustering results. Among them, the similarity between data point i and data point j is defined as follows: similar(i, j) = −disi2j = −i − j2

(1)

The similarity matrix similar(i, j) represents the extent to which data point j can be a model point for data point i. The bias parameter preferencei is the value on the diagonal in the similarity matrix, preferencei = similar(i, i). It represents the initial ability of the data point i as the cluster center. The value of the preferencei will affect the number of clusters finally

1154

J. Mao et al.

obtained. Generally, a larger preferencei indicates that more points tend to be class representative points, so the more the number of classes. Initially, we assume all the bias parameters are the same, and it means that all points become the same as possible. Since the message passing process is determined by the similarity similar(i, j) and the preferencei simultaneously, the number of clusters is not strictly linear with the preferencei . Generally, set the preferencei as median of the similarity matrix. This will result in a moderate number of clusters. The two kinds of information that the algorithm iteratively updates are of practical significance. The responsivity r (i, j) is used to describe the appropriate degree of i to support point j as its clustering center after considering the information of other clustering center points. The availability a(i, j) is indicating the appropriate degree to which j indicates to the data point i that it is its clustering center after receiving its r information sent by its supporters other than i. Initially, both matrix r and matrix a are initialized to 0, indicating all data points are considered to be potential cluster center points. At any stage of the algorithm, the above two kinds of information determine which sample can be the model point and which data points can belong to the model point together. The iterative process of the algorithm is the process of alternating the two kinds of information. The iterative formulas of the responsiveness matrix and the availability matrix are as follows:      a i, j + similar i, j  r (i, j) = similar(i, j) − max  j = j

⎧ ⎧ ⎫ ⎪ ⎨ ⎬

⎪    ⎪ ⎪ ⎪ max 0, r i  , j (i = j) ⎨ min⎩0, r(j, j) + ⎭  ∈{i, i / j} a(i, j) = ⎪

   ⎪ ⎪ ⎪ max 0, r i  , j (i = j) ⎪ ⎩

(2)

(3)

i  = j

The author also introduces a damping coefficient λ(0 < λ < 1), the default λ = 0.5, to prevent data from oscillating during the iterative update process. The update formula of λ is as follows: r (i, j) = (1 − λ)rnew + λrold

(4)

a(i, j) = (1 − λ)anew + λaold

(5)

When the cluster remains unchanged after several iterations or the number of iterations exceeds a certain value, the delivery is terminated and the algorithm ends. The set K = {k|a(k, k) + r (k, k)0} is the set of candidate centers. For data point i, the point j at which a(i, j) + r (i, j) is the largest is selected as its cluster center. The affinity propagation algorithm has many advantages, and it is not necessary to specify the number of clusters in advance to better adapt to various uncertain situations. When the similarity matrix is unchanged, the same clustering result will be obtained no matter how many times the repeated calculation is performed. Since the

A Data Clustering Method for Communication …

1155

affinity propagation algorithm needs to iteratively calculate the values of the two matrices (responsibility matrix and availability matrix) during the execution process, when the data set scale is large, the algorithm complexity becomes high and the efficiency will decrease, which is followed by the situation that running time will become longer.

3.2 Optimization of Messaging Range The main idea of affinity propagation clustering algorithm is to continuously update the values of availability a and responsivity r to achieve a steady state finally. The original availability a(i, j) and the responsivity r (i, j) are to calculate the value between the node and all other nodes, which causes the calculation of the matrix to become very large, even square fold when the amount of data is large. However, since the data information is only transmitted in the neighbor nodes, the original update formula is improved as follows:      a i, j + similar i, j  j ∈ N (i) r (i, j) = similar(i, j) − max  j = j

  ⎧     ⎪ ⎪ ⎨ min 0, r(j, j) + max 0, r i  , j ( j ∈ N (i) − i) i  ∈{i, / j} a(i, j) =     ⎪ ⎪ max 0, r i  , j ( j = i) ⎩

(6)

(7)

i  = j

where N(i) represents the set of neighbor nodes of data point i.

3.3 Optimization of Damping Coefficient The damping coefficient is used to prevent oscillations during the iterative update of the data. In the original affinity propagation clustering algorithm, the damping coefficient is a predetermined fixed value. To a certain extent, the larger the damping coefficient is, the better the effect of eliminating oscillations is. However, since the magnitude of the damping coefficient is inversely proportional to the convergence speed, if the damping coefficient is too large, the convergence speed will be slow; if the damping coefficient is too small, it will not eliminate the oscillation. Therefore, this paper proposes a method to dynamically adjust the damping coefficient. The goal is to make the damping coefficient λ both to eliminate the oscillation and to keep the algorithm fast iteration when the oscillation occurs. The detection of oscillation is the key to dynamically adjust the damping coefficient. It can be seen from the iterative process of the affinity propagation algorithm that when the

1156

J. Mao et al.

iteration of the algorithm proceeds normally, the number of cluster centers will gradually change in the same direction at a relatively slow speed until the steady state is reached. Define the degree of oscillation di during the i iteration as follows: di =

|ci ∪ ci−1 |−|ci ∩ ci−1 | |ci−1 |

(8)

where ci is the cluster center point set in the i-th iteration, ci−1 is the cluster center point set in the (i − 1)-th iteration, and |ci | is the number of cluster centers i-th iteration process. If di is 0 or a small value close to 0 in multiple iterations, then the clustering result is considered to be in a stable state. When the value of di exhibits a consistent change in the same direction as the iteration of the algorithm, it is considered that the algorithm is in a normal iterative state. Otherwise, if the value of di is always at a very high value in multiple iterations, and the number of iterations increased and the number of iterations reduced are roughly equal, the iteration is considered to be oscillating. The damping coefficient λ needs to be adjusted in this situation. In summary, the adjustment strategy of the damping coefficient λ is as follows:  λi =

di < δ λi−1 , λi−1 + λ, di ≥ δ

(9)

where λ is the incremental value of damping coefficient, δ is an artificially defined threshold. When the degree of oscillation di is smaller than the threshold δ, it means that the degree of change of the cluster center is not large compared with the previous one; that is, the degree of oscillation is relatively small. The damping coefficient λi at this time does not have to be changed. On the contrary, when di is greater than or equal to the threshold δ, it means that the degree of change of the cluster centers is larger. The damping coefficient λi should be appropriately increased to eliminate the negative influences caused by the oscillation in this case.

4 Evaluation This chapter verifies the effectiveness of the algorithm IMAP proposed in this paper by experiments. Firstly, the data set used in the experiment is introduced. Then, the IMAP algorithm is compared with the traditional AP algorithm on different scales and forms of data sets.

A Data Clustering Method for Communication …

1157

4.1 Data Sets Communication network data usually has the characteristics of dynamic, timing and less regularity. Therefore, this paper uses various data sets of different scales and different dimensions to verify the effectiveness of the proposed algorithm IMAP. This paper selects the Iris data set, the breast cancer data set in the UCI standard data set and the NSL-KDD data set. Among them, each sample in the Iris data set has four attributes; each sample in the breast cancer data set has nine attributes; the NSLKDD data set is a network intrusion detection data set, which divides the objects into five categories [10]. In this experiment, 21 attributes were selected, 1500 and 3500 consecutive data of all five categories were randomly selected, and the non-numeric attributes were numerically processed.

4.2 Experimental Result The algorithm IMAP proposed in this paper is compared with the traditional AP algorithm on the data set described in Section A of this chapter. This paper uses runtime, precision, NMI and RI value as the evaluation criteria of the clustering results. The results are as follows. Runtime and Precision It can be seen from Fig. 1 that because the algorithm IMAP proposed in this paper effectively avoids the oscillation of the algorithm during the iterative operation by adjusting the damping coefficient, the algorithm is more efficient than the traditional AP algorithm. Moreover, since the IMAP algorithm reduces the scanning of unnecessary data points when scanning the neighbor nodes to transmit information, the data set is pruned. When the size of the data set is larger, Fig. 1 Runtime of AP and IMAP

1158

J. Mao et al.

Fig. 2 Precision of AP and IMAP

the efficiency of the algorithm is more obvious. When the data set size is 699, the running time is reduced by 20.9%; when the data set size is 1500, the running time is reduced by 23.8%; when the data set size is 3000, the running time is reduced by 32.7%. According to Fig. 2, the precision of the AP and IMAP algorithms is 88.71% and 95.2%, respectively, and the improvement of IMAP is 7.33%. On the breast cancer data set, the precision of the AP and IMAP algorithms is 87.15% and 93.12%, respectively, and the improvement of IMAP is 6.89%. On the NSLKDD data set with a size of 1500, the precision of the AP and IMAP algorithms is 74.94% and 89.9%, respectively, and the improvement of IMAP is 19.97%. And on the NSL-KDD data set with a size of 3000, the precision of the AP and IMAP algorithms is 77.12% and 92.1%, respectively, and the improvement of IMAP is 19.42%. In summary, the IMAP algorithm can effectively improve the precision of the algorithm, and the precision on the above four data sets is increased by an average of 13.4%. NMI and RI According to Figs. 3 and 4, on the Iris data set, the NMI of the AP and IMAP algorithms is 0.71 and 0.88, respectively. The RI of the AP and IMAP algorithms is 0.91 and 0.96, respectively. The improvement of NMI and RI of IMAP is 23.94% and 5.49%, respectively. On the breast cancer data set, the NMI of the AP and IMAP algorithms is 0.73 and 0.92, respectively. The RI of the AP and IMAP algorithms is 0.83 and 0.95, respectively. The improvement of NMI and RI of IMAP is 26.03% and 14.46%, respectively. On the NSL-KDD data set with a size of 1500, the NMI of the AP and IMAP algorithms is 0.59 and 0.83, respectively. The RI of the AP and IMAP algorithms is 0.54 and 0.71, respectively. The improvement of NMI and RI of IMAP is 40.68% and 31.4%, respectively. And on the NSL-KDD data set with a size of 3000, the NMI of the AP and IMAP algorithms is 0.58 and 0.79, respectively. The RI of the AP and IMAP algorithms is 0.62 and 0.82, respectively. The improvement of NMI and RI of IMAP is 36.21% and 32.26%, respectively. In summary, the IMAP algorithm can effectively improve the NMI and RI of the

A Data Clustering Method for Communication …

1159

Fig. 3 NMI of AP and IMAP

Fig. 4 RI of AP and IMAP

algorithm. The NMI on the above four data sets is increased by an average of 31.7%, and the RI on the above four data sets is increased by an average of 20.9%. It can be known from the above analysis that the IMAP algorithm can improve the runtime, precision, NMI and RI values.

5 Conclusion This paper proposes a clustering algorithm IMAP for communication network data. By filtering the data exchange objects in the traditional AP algorithm, the efficiency of data transmission is greatly increased. And the fixed damping coefficient in the traditional method is improved; the method of dynamically adjusting the damping

1160

J. Mao et al.

coefficient is proposed, which can eliminate the oscillation and keep the algorithm iteratively. Finally, we validate and evaluate the effectiveness of the proposed algorithm IMAP on UCI and KDD data sets of different scales. The results show that the algorithm proposed in this paper can improve the execution efficiency while improving the precision of the clustering results and has practical application value and significance for communication network.

References 1. Frey, B.J., Dueck, D.: Clustering by passing messages between data. Science 315, 972–976 (2007) 2. Shi, Z., Zeng, Y., Sun, L.Q.: Operation and maintenance analysis for power communication networks based on big data. In: China International Conference on Electricity Distribution, pp. 1–4 (2016) 3. Everitt, B.: Cluster Analysis. Wiley (2011) 4. Lu, Z.M., Feng, J.M., Fan, D.M., et al.: Novel partitional clustering algorithm for large data processing. Syst. Eng. Electron. 36(5), 1010–1015 (2014) 5. Jain, A.K., Dubes, R.C.: Algorithms for clustering data. Technometrics 32(2), 227–229 (1988) 6. Maimon, O., Rokach, L.: Data mining and knowledge discovery handbook. In: Weka-A machine learning workbench for data mining, vol. 4, pp. 1269–1277 (2010) 7. Sumedha, M.L., Weigt, M.: Unsupervised and semi-supervised clustering by message passing: soft-constraint affinity propagation. Phys. Condens. Matter 66(1), 125–135 (2008) 8. Wang, C.D., Lai, J.H., Suen, C.Y., et al.: Multi-exemplar affinity propagation. IEEE Trans. Pattern Anal. Mach. Intell. 35(9), 2223–2237 (2013) 9. Wang, C.D., Lai, J.H., Yu, P.S.: Multi-view clustering based on belief propagation. IEEE Trans. Knowl. Data Eng. 28(4), 1007–1021 (2016) 10. Tavallaee, M., Bagheri, E., Lu, W., Ghorbani, A.: A detailed analysis of the KDD CUP 99 data set. In: Second IEEE Symposium on Computational Intelligence for Security and Defense Applications, pp. 1–4 (2009)

Priority-Based Optimal Resource Reservation Mechanism in Wireless Sensor Networks for Smart Grid Hongfa Li, Jianfa Pu, Duanyun Chen, Yongtian Xie, Wenming Fang, and Shimulin Xie

Abstract In smart grid, wireless sensor networks (WSNs) are becoming the mainstream of the IoT applications where power terminals can sense scalar data (such as temperature and humidity) and multimedia (such as audio and video) data. In some critical electricity business, these data are very important and must be sent in real time. The traditional IP network which adopts a “best-effort” transmission strategy cannot guarantee the quality of critical power business. Under the consideration of the existence of multiple heterogeneous data in WSNs, we separate the critical data according to the criticality of the business so that critical business can be processed in time. Then we propose an optimal resource reservation mechanism that allocates sufficient resources for critical data to achieve optimal utilization of resources, thereby reducing the latency of the entire system and improving the performance of grid system. Keywords Wireless sensor networks (WSNs) · Resource reservation mechanism · Latency · Critical business

1 Introduction With the extensive development of various types of IoT businesses, smart grid is becoming more and more intelligent. The advent of IoT technology has made communication between resource-constrained embedded power terminals more efficient. These power terminals can sense and collect data from the surrounding environment, such as transformer substation and switch room. The wireless sensor network (WSN) is a restricted network in IoT that allows IoT to be extended. H. Li · D. Chen State Grid Fujian Electric Power Company Ltd., Fuzhou, China J. Pu · Y. Xie · W. Fang State Grid Quanzhou Power Supply Company, Quanzhou, China S. Xie (B) State Grid Information and Telecommunication Group Company Ltd., Fuzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_116

1161

1162

H. Li et al.

Wireless sensor network (WSN) in smart grid is a collection of power terminals. Since these are mostly embedded terminals, each terminals’ power, bandwidth, electricity, memory, and other resources are limited. Since the roles of these terminals in WSN are similar, they can be abstracted into sensor nodes. The resources of each node are limited. A large number of such nodes come together to be able to handle a particular business. Due to the resources of a single node are limited in WSN of smart grid, so there are some problems in WSN that need to be solved such as security and privacy. Since there are some critical businesses in smart grid, the critical data of these businesses often need to arrive at the base station timely and reliably. Therefore, it is necessary to design resource management and reservation mechanism to make optimal use of limited resources in WSN. The rest of this paper is organized as follows. In Sect. 2, we discuss some related works. In Sect. 3, the system architecture is described. We formulate the proposed priority-based optimal resource reservation problem and give our model in Sect. 4. The simulation results and discussions are provided in Sect. 5. In Sect. 6, we conclude the paper.

2 Related Work A service-oriented architecture is proposed in [1], and a good mechanism is provided to manage the external interaction in wireless sensor networks. A resource management protocol for an application having a restricted resource is proposed in [2] to improve efficiency by borrowing resources from a resource management server. In [3], the author uses context-awareness as a means of sharing information needed by the control network and provides differentiated QoS for nodes and their data transmission by utilizing spatial and temporal correlation. A learning paradigm of COIN is proposed in [4] to solve the problem of designing utility functions for each agent. In addition, the author also extends DIRL by combining DIRL with COINbased macro-learning paradigm to guide the system to achieve global optimization and improve performance with minimal communication overhead. [5] proposed a scheme to jointly optimize flow authentication and unequal error protection. The scheme can provide digital image authentication, image transmission quality optimization, and high energy efficiency for wireless multimedia sensor network. All these papers have not considered the mechanism of resource reservation in smart grid, which will be studied in this paper.

3 System Architecture The architecture of the hierarchical layered cluster network in the WSN considered in this paper is shown in Fig. 1. M different clusters and base stations are deployed

Priority-Based Optimal Resource Reservation …

1163

Fig. 1 Architecture of the hierarchical layered cluster network in the WSN

in an area. M clusters were distributed in different layers. When an event occurs in any of a cluster, the sensor node in the cluster will sense, collect data, and then send the data packet to the cluster head in layer 1 (H1) which is closest to it. H1 is next to the next layer, and it acts as a node that communicates directly with the next layer. After H1 gets rid of the redundant information in the data packet, it stores the data in its own memory. Then H1 uses the TDMA method to send the data packet to the cluster head in layer 2 (H2). At the same time, the critical information of the data is exchanged between H1 and H2. The critical information is used to determine the priority of each data packet. H2 may also pass some intermediate cluster head before arriving at the base station. After that, H2 assigns a priority to each packet based on the critical information of the data received from the upper cluster head. After assigning a priority to each packet, H2 allocates bandwidth for each packet based on the priority of each packet. Therefore, high-priority data packets will be allocated enough bandwidth to reach the base station with low latency and high reliability. After H2 allocated the priority and bandwidth to each data packet, the data packet should be transmitted to IoT gateway. Since different packets have different priorities, different packets need to be transmitted separately. Suppose we divide all packets into two priorities: 1 being high priority and 2 being low priority; so intermediate cluster head and base station have two queues (Q1 and Q2) and a classifier. The classifier first assigns the packets to the appropriate queue based on their priority and then allocates resources for the transmission of each packet.

1164

H. Li et al.

4 Problem Formulation and Solving Algorithm 4.1 Problem Formulation In this section, we give our model for the problem. Let us take the following assumptions before modeling. We assume that all sensor nodes are the same and all cluster heads are the same. There is only one cluster head in each cluster. Each sensor node in the cluster independently sends the packet to the head. Assume that the average rate at which the packet arrives at the cluster head follows the Poisson distribution and set to λk . The number of sensors in each cluster is random. Let there be K priority levels in the system, L is the number of layers passing from the sensor node to the base station, i is the number of the layer, and Hi denotes the cluster head of the ith layer. According to the M/M/1 queuing model, the data packets can be divided into K priority queues, i.e., k = 1, 2, . . . , K . Queue 1 has the highest priority, and Queue K has the lowest priority. ρk denotes the priority of queue k. Let Q k denotes the queue with priority k, Q H1 denotes the queue of the first layer, and λkHi denotes the average rate of the cluster head with the priority k reaching the ith layer; μkHi indicates the forwarding rate of the packet with priority k on the cluster head of the ith layer, and ρkHi indicates the utilization of the packet with the priority k on the cluster head of the ith layer; TkHi represents the time taken by the cluster head of the ith layer to forward the packet with the priority k. Therefore, the service rate of the data packet in Q k can be given by μkHi =

1

λkHi

Tk

μkHi

, ρkHi = Hi

(1)

Let dkHi denotes the delay generated by the cluster head of the ith layer when transmitting packets with priority k, so dkHi can be expressed as dkHi =

1 − ρkHi μkHi

(2)

When the cluster head of the ith layer Hi sends data packet with priority k to the H cluster head of the jth layer H j , Hi allocates bandwidth for the packet as bk , Hij . So, H

the bk Hij can be represented as   H bk Hij = μkHi 1 − ρkHi

(3)

Consider dividing all packets into two priorities, i.e., K = 2. Consider the packet with k = 1 firstly, and the delay generated on the Hi layer is

Priority-Based Optimal Resource Reservation …

d1Hi =

1165

1 − ρ1Hi

(4)

μ1Hi

The bandwidth allocated for transmission between Hi and H j is   H b1 Hij = μ1Hi 1 − ρ1Hi

(5)

Total delay and total bandwidth when transmit packets with priority 1 are D1B S =

L 

d1Hi ,

B1B S =

i=1

L 

H

b1 Hij

(6)

i=1

where d1Hi is the delay generated by the cluster head of the ith layer when transmitting H packets with priority 1, b1 Hij denotes the bandwidth Hi allocates for packets with priority 1 when Hi sends the packets to H j . Then, considering the data packet with priority k = 2, the delay generated on the Hi layer is d2Hi =

1 − ρ2Hi μ2Hi

+ d1Hi + d1Hi ∗

1 − ρ2Hi μ2Hi

(7)

The bandwidth allocated for transmission between Hi and H j is H

H

b2 Hij = 1 − b1 Hij

(8)

Total delay and total bandwidth when transmit packets with priority 2 are D2B S =

L  i=1

d2Hi ,

B2B S =

L 

H

b2 Hij

(9)

i=1

where d2Hi is the delay generated on Hi when Hi transmits the packets with priority H 2 and b2 Hij is the bandwidth Hi allocates for packets with priority 2 when Hi sends the packets to H j . So we can get our optimization goal: (1) Reduce the transmission delay of critical data, i.e., D1B S < D2B S . (2) Maximizing the bandwidth for critical data so that the system can get the most resource utilization.

1166

H. Li et al.

Table 1 Optimal resource management and reservation algorithm Algorithm 1: Optimal Resource Management and Reservation Algorithm 1: For N sensor nodes deployed in M clusters, they will detect the occurrence of an event. When sensor node n in cluster m detects the event, it will collect the data packet of the event and send it to queue the closest H1 . 2: For all data packets in queue Q 1 of H1 , H1 will check if the data packet is redundant. If the data packet is redundant, it will be discarded. After that, H1 allocates memory to all non-dropped data packets in Q 1 . 3: H1 transmits data packets to H2 using TDMA and handshaking the critical information of data (k) where k = 1 represents high priority; while k = 2 represents low priority. H

4: Set i = 2 initially. For layer i to layer L: Find the closest Hi+1 ; if k = 1, calculate bk Hi+1 and i H

and d2Hi . d1Hi ; if k = 2, calculate bk Hi+1 i L L L H d1Hi , B1B S = i=1 b1 Hij , D2B S = i=1 d2Hi , and 5: Thus, we can get D1B S = i=1

L H B2B S = i=1 b2 Hij . 6: The data packet arrives at the base station, transfers to the IoT gateway for further transmission, and reaches to the destination finally.

4.2 Solving Algorithm In order to solve the above problem, we propose an optimal resource management and reservation algorithm as shown in Table 1.

5 Simulation Results We assume that there is an IoT gateway, a base station, and five clusters in our scenario. Each cluster has 200 sensor nodes. Packets are sent from any sensor node to the base station through up to three layers. There are two priority queues between Hi and the base station: Q 1 represents the high-priority queue and Q 2 represents the low-priority queue. At the same time, we set the size of Q 1 to 100 and the size of Q 2 to 50, the value of data rate is 1 Mbps, the value of packet size is 64, the value H of radio ranger of sensor is 200 m, the value of b1 Hij is between 1.2 Mbps and 1.75 H

Mbps, the value of b2 Hij is between 0.75 Mbps and 1 Mbps, and the value of TkHi is 2 ms. From Fig. 2, we can see when using the resource reservation mechanism, the delay of the high-priority data is much lower than the delay of the low-priority data. That is because we have allocated enough resources for high-priority data, so our resource reservation mechanism can significantly improve the transmission efficiency of highpriority data and ensure the reliability of high-priority business. From Fig. 3, we can see that the delay of high-priority data is reduced and the bandwidth of it is increased.

Priority-Based Optimal Resource Reservation …

6

10

1167

-3

without mechanism with mechanism

Delay in seconds

5

4

3

2

1

0

High priority data

Low priority data

All data

Fig. 2 Comparison of using mechanism and not using mechanism when transmitting data in different priorities

Fig. 3 Result of delay and bandwidth in different arrival rates and forwarding rate of high-priority data

That is because when using the resource reservation mechanism, we allocate enough resources for the transmission of high-priority packets, thus ensuring that critical data packets can be reliably arrived at the destination and processed timely.

1168

H. Li et al.

6 Conclusion Processing data with different traffic types in the WSN of smart grid is an important issue, because the WSN is a resource-constrained network and some critical businesses require that its data must be timely and reliably delivered. In this paper, we propose a priority-based resource reservation mechanism in smart grid. When data arrives at the cluster head, the cluster head assigns a priority to each data packet based on the critical information carried in each data packet. Then the cluster head allocates bandwidth to each data packet according to the priority, so it can reduce the delay of the critical data in the transmission process and improve the resource utilization efficiency of the system.

References 1. Del Cid, P.J., Hughes, D., Michiels, S., Joosen, W.: DARMA: adaptable service and resource management for wireless sensor networks. In: Proceedings of ACM 4th International Workshop on Middleware Tools, Services and Run-time Support for Sensor Networks (MidSens), Champaign, IL, USA, pp. 1–6 (2009) 2. Cho, W.H., Kim, J., Song, O.: An efficient resource management protocol for handling small resource in wireless sensor networks. Int. J. Distrib. Sens. Netw. 9, 324632 (2013) 3. Misra, S., Das, S.N., Obaidat, M.S.: Context-aware quality of service in wireless sensor networks. IEEE Commun. Mag. 52(6), 16–23 (2014) 4. Shah, K., Kumar, M..: Resource management in wireless sensor networks using collective intelligence. In: Proceedings of 2008 International Conference on Intelligent Sensors, Sensor Networks and Information Processing, Sydney, NSW, pp. 423–428 (2008) 5. Wang, W., Peng, D., Wang, H., Sharif, H., Chen, H.: A multimedia quality-driven network resource management architecture for wireless sensor networks with stream authentication. IEEE Trans. Multimedia 12(5), 439–447 (2010)

Energy-Efficient Clustering and Multi-hop Routing Algorithm Based on GMM for Power IoT Network Yuanjiu Li, Junrong Zheng, Hongpo Zhang, Xinsheng Ye, Zufeng Liu, and Jincheng Li

Abstract Combining the Internet of Things (IoT) technology with the power industry is the development trend of the smart grid in the future. IoT devices are often used for environmental monitoring, collecting information, and transmitting it to cellular base station (BS). Since the access capability of the BS is limited, so the clustering is adopted. In addition, capacity efficiency is also a key issue for power IoT devices due to battery capacity constraints. We proposed a dynamic multi-hop routing algorithm to solve load balancing and energy-efficient problems. Finally, the simulation result shows that our strategy can effectively improve the network lifetime and throughput. Keywords Energy efficient · Clustering · Multi-hop routing · GMM · Power IoT network

1 Introduction In recent years, with the development of smart grid development strategy, various advanced measurement, control, decision-making, and equipment technologies are being gradually applied to power grid construction, trying to further meet the needs of users for power services, achieving safe, reliable, economic, and efficient power supply [1]. The combination of the Internet of Things (IoT) technology and the power industry is not only the need for national strategic development, but also meets the needs of power development. In the power IoT network, the number of devices often exceeds the access capability of the BS. The way of clustering and relaying may be a good way to solve this access problem. Y. Li · J. Zheng · X. Ye · Z. Liu State Grid Quanzhou Power Supply Company, Quanzhou, China H. Zhang State Grid Jinjiang Power Supply Company, Jinjiang, China J. Li (B) State Grid Information and Telecommunication Group Company Ltd., Fuzhou, China e-mail: [email protected] © Springer Nature Singapore Pte Ltd. 2021 Q. Liu et al. (eds.), Proceedings of the 9th International Conference on Computer Engineering and Networks, Advances in Intelligent Systems and Computing 1143, https://doi.org/10.1007/978-981-15-3753-0_117

1169

1170

Y. Li et al.

Because the spectrum resources are usually limited, and the number of IoT devices is far more than the available channel resources, it may cause serious network congestion and reduce the operating efficiency [2]. In addition, the energy efficiency of the devices is a crucial indicator for IoT devices. In order to help edge devices and low-energy devices access the network, we propose to use clustering and multi-hop routing to access the network and improve the energy efficiency of the devices [3, 4]. Different from the traditional way, the devices are divided into different clusters with cluster head (CH). Each CH can select a CH of another cluster as a relay to return data to the BS. The data from different devices is collected into the CH and uploaded to BS through multi-hop routing. First, Gaussian mixtures and the EM algorithm [5] (GMM) is proposed that does not rely on a priori condition to cluster nodes. Secondly, each cluster selects the CH according to the node distribution and battery condition to ensure the energy-efficient of the CH. Finally, the Dijkstra algorithm is used to select the appropriate routing path. The rest of this article is organized as follows. Section 2 introduces the system model, GMM clustering algorithm and routing algorithm. Section 3 evaluates the performance of our strategy through simulation. Finally, Sect. 4 summarizes this article.

2 System Model 2.1 Network Model The devices are randomly distributed in a network area of radius R. The network can be divided into k layers of width r. The CH receives the data from other nodes in the cluster, collects all the data, then transmits it to the CH of the inner layer. The innermost CH node directly transmits the data to the BS (Fig. 1).

2.2 GMM Clustering K There are n k nodes in the kth layer of the network and k=1 n k = N . In addition, the nodes in each layer are clustered by using the GMM algorithm. Unlike general clustering algorithms, the GMM algorithm does not need to obtain the number of clusters in advance. In particular, the GMM algorithm starts with a single cluster and adds clusters in an orderly manner until the number of clusters reaches a maximum.  If φ x; θ j is the distribution function and the parameter is θ j , assuming that the mixed distribution of the random vectors x having s components is

Energy-Efficient Clustering and Multi-hop Routing …

1171

Fig. 1 Network model

f s (x) =

s 

  π j φ x; θ j ,

(1)

j=1

where π j is a weight satisfying π1 + π2 + · · · + πs = 1 and π j ≥ 0. The multivariate Gaussian mixture weighting is given by Eq. (1), where the jth  component φ x; θ j is the d-dimensional Gaussian density. 



φ x; θ j = (2π)

   − 1 T −1   1 2  Sj exp − x − m j S j x − m j , 2

− d2 

(2)

where m j = E[x] and S j = Cov[x]. Suppose the set x1 , x2 , . . . , xn k is i.i.d.

nodes, so the problem is transformed into the estimation parameters π j , m j , S j to maximize. Ls =

nk 

log f s (xi ).

(3)

i=1

In order to prevent the log-like maximum from tending to infinity, we must set the lower bound for the covariance matrix. For each component j, the following iterative update equation can be used to perform log-likelihood maximization   π j φ xi ; θ j , p( j|xi ) = f s (xi )

(4)

1172

Y. Li et al.

πj =

nk 1 p( j|xi ), n i=1

nk  p( j|xi )xi , p( j|xi ) i=1  T  p( j|xi ) xi − m j xi − m j n k . i=1 p( j|x i )

mj = n k Sj =

i=1

(5)

(6)

(7)

The GMM algorithm continuously adds clusters to the mixture. Suppose a new component φ(x; θ ) is added to a mixture that already has s components to obtain a mixture f s+1 (x) = (1 − a) f s (x) + aφ(x; θ ),

(8)

where a ∈ (0, 1). For each s, given the value of f s (x), if a and θ are optimal, the new log-likelihood function L s+1 =

n 

log f s+1 (xi ) =

i=1

n 

log[(1 − a) f s (xi ) + aφ(xi ; θ )],

(9)

i=1

is also optimal. In a word, the learning can be divided into two parts of continuous learning, where the first part is the past f s (x) and the next is the φ(x; θ ). In addition, it is necessary to develop an appropriate search method to optimally compute π j , m j , S j that maximize L s+1 . Next, we will introduce an effective way to solve the above problems. Local Search For the above problem, we use the EM algorithm [6] to search for the parameters π j , m j , S j that maximize L s+1 . Furthermore, since the parameter f s (x) remains unchanged, the partial EM step can be used to update a, m, and S, i.e., p(s + 1|xi ) = a=

aφ(xi ; m, S) , (1 − a) f s (xi ) + aφ(xi ; m, S) n 1 p(s + 1|xi ), n i=1

n  p(s + 1|xi )xi , m= p(s + 1|xi ) i=1  T  n i=1 p(s + 1|x i ) x i − m j x i − m j n S= . i=1 p(s + 1|x i )

(10) (11)

(12)

(13)

Energy-Efficient Clustering and Multi-hop Routing …

1173

Global Search The local EM step requires initializing the parameters m, S, and a of the new component. To simplify, we can replace the function (9) with the Taylor approximation of a point a = a0 .

2 L s+1 (a0 ) . 2L s+1 (a0 )



L s+1 = L s+1 (a0 ) −

(14)

Further simplification can be obtained Lˆ s+1

2 n f s (xi ) + φ(xi ; θ ) 1 i=1 δ(x i , θ ) + n 2 , = log 2 2 i=1 δ (x i , θ ) i=1 n 

(15)

where (xi , θ ) = [ f s (x) − φ(x; θ )]/[ f s (x) + φ(x; θ )]. And, at this time, a is n δ(xi , θ ) 1 1 i=1 aˆ = − n 2 . 2 2 i=1 δ (xi , θ )

(16)

In the initialization phase, we can use the matrix H = h i j ,     xi − x j 2  d  2 −2 h i j = 2π σ exp − , 2σ 2 

4 σ =β (d + 2)n k

1  d+4

.

(17)

(18)

The GMM algorithm is as follows: Algorithm 1. GMM 1 Initialization: Initialize to m = E[x] and S = Cov(x) using a component. The σ in (18) is calculated by setting β to half of the maximum singular value of S. Calculate the matrix from (17). 2 Execute the EM step until, if the stop condition is met, terminate. 3 Search for candidate locations for new components on all x j . The pre-computed  kernel value h i j is used instead of φ x i ; x j , σ 2 I to maximize (15), where x j = m. 4 By introducing these estimates in (16), the local EM is initialized with the estimated value of m, S = σ 2 I . 5 Apply partial EM steps (10)–(13) until convergence as in Step 2. 6 If L s+1 < L s then terminates, otherwise assign a new component and go to 2.

1174

Y. Li et al.

2.3 Select Custer Head The nodes in each layer are divided into different clusters. For determining the CH, BS should select the position according to the physical distribution of the node, and CH node switches the CH according to its own energy. The number of clusters in k-layer is ck , so Jk =

nk ck  

ξ

qi j di2j ,

(19)

i=1 j=1

where ξ is constant. If node j belongs to the cluster i, qi j = 1. qi j =

1 2 m k  di j  ξ −1 l=1

.

(20)

dl j

Then, this paper uses an intelligent genetic algorithm to minimize the objective function (19). BS initially calculates the CH position of each cluster. If the current CH node cannot satisfy the following conditions, the new CH node in the cluster will be selected. E CH ≥ E th .

(21)

2.4 Cluster Head Routing In the above work, we can get the CH of each cluster. Next, we use the Dijkstra algorithm [7] to select routing paths between different CHs. The Dijkstra algorithm is the classic shortest path algorithm and is given directly below. Algorithm 2. Dijkstra 1 l(u 0 ) = 0, l(v) = ∞, ∀v = u 0 ; Γ0 = {u 0 }, t = 0. 2 At this time,  Γt = {u 0 , u 1, · · · , u t } has been obtained, and for each u j ∈ Γt , there is l u j = d u 0 , u j .l(v) ← min{l(v), l(u t ) + d(u t , v)}, ∀v ∈ Γt , then calculate min{l(v)}, set its minimum point u t+1 , let Γt+1 = Γt ∪ {u t+1 }. 3 If t = V − 1, stop; otherwise, let t ← t + 1 and return to 2. The Dijkstra algorithm includes step addition, V (V − 1) step  comparison and (V − 1)2 step selection, and the total time complexity is O V 2 .

Energy-Efficient Clustering and Multi-hop Routing …

1175

Fig. 2 Number of live nodes

3 Simulation In the simulation, we assume that the network is deployed in a radius of 200 m, the network contains 500 nodes, each node has an energy of 0.5 J. Figure 2 shows that our proposed strategy killed all nodes in the 721 rounds, while LEACH died in 361 rounds. In LEACH, CH nodes communicate directly with sink nodes and consider the residual energy to select relay nodes, so the performance is poor. However, GMM algorithm is based on the distribution of nodes to build clusters. Obviously, our proposed strategy has a longer network life cycle than other methods. Our proposed strategy redefines the CH node by dynamically measuring the residual energy of the CH node. LEACH does not take into account the residual energy of CH nodes. Hence, Fig. 3 shows the proposed routing algorithm can effectively save the energy of CH nodes to transmit more data.

4 Conclusion In smart grid, energy-efficient is an important problem in the IoT network. This paper proposes a clustering multi-hop routing strategy. Our strategy can execute clustering quickly and accurately without any preconditions. The routing algorithm can select the optimal CH and path under the premise of ensuring the energy efficiency of

1176

Y. Li et al.

Fig. 3 Successfully transmitted packets

nodes. The numerical results show that the proposed strategy performs better than LEACH in terms of network lifetime and throughput.

References 1. Li, J.Q., Lei, Y.Q., Hou, B.S.: An introduction to Ru Bee and its application in electric internet of things. Power Syst. Technol. 34(8), 199–204 (2010) 2. Xu, Z., Chen, L., Chen, C., Guan, X.: Joint clustering and routing design for reliable and efficient data collection in large-scale wireless sensor networks. IEEE Internet Things J. 3(4), 520–532 (2016) 3. Zhao, Z., Barijough, K.M., Gerstlauer, A.: Deep things: distributed adaptive deep learning inference on resource-constrained IoT Edge clusters. IEEE Trans. Comput. Aided Des. Integr. Circ. Syst. 37(11), 2348–2359 (2018) 4. Wang, Z., Qin, X., Liu, B.: An energy-efficient clustering routing algorithm for WSN-assisted IoT. In: Wireless Communications and Networking Conference (WCNC), pp. 1–6 (2018) 5. Vlassis, N., Likas, A.: A greedy EM algorithm for Gaussian mixture learning. Neural Process. Lett. 15(1), 77–87 (2002) 6. Tipping, M.E., Bishop, C.M.: Probabilistic principal component analysis. J. Roy. Stat. Soc. 61(3), 611–622 (1999) 7. Dijkstra, E.W.: A note on two problems in connexion with graphs. Numer. Math. 1(1), 269–271 (1959)