Secure and Intelligent Energy Data Management Scheme for Smart IoT Devices

The School of Computer and Software, Nanjing University of Information Science and Technology, Nanjing 210044, China Guizhou Provincial Key Laboratory of Public Big Data, Guizhou University, Guiyang 550025, China Cyberspace Security Research Center, Peng Cheng Laboratory, Shenzhen 518000, China The Network Information Center, Nanjing University of Information Science and Technology, Nanjing 210044, China


Introduction
With the development of human industrialization and the demand of all kinds of electronic intelligent products in our life, electric energy has become one of the essential resources for human beings. As a new field in power system, the smart grid provides more possibilities for power system monitoring, operation, and optimization [1].
The demand for electric energy in industry and life determines the need for a large amount of energy supply. However, today's world is experiencing an acute energy shortage. In order to make full use of the renewable energy, various smart Internet of Things (IoT) devices are deployed in a smart envi-ronment such as smart cities, smart healthcare, and smart grid. Therefore, how to deal with the problem of energy supply will be the key problem that affects the development of the smart grid. In this paper, we first point that renewable energy [2] can be used as a source of energy supply for smart IoT devices. Then, technologies of artificial intelligence (AI) [3] are introduced into our scheme to design an AI-based energy management scheme for smart IoT devices. Finally, the effectiveness and practicability of the proposed scheme are proved by simulation.
Employing the technology of AI, the proposed scheme realizes energy management at three dimensions, which is presented as follows.
(i) Interlayer control Energy collection base stations are classified according to its real-time output and its influencing factors (e.g., temperature, humidity, pressure, time, and season). In particular, it can be divided into three categories: energy sufficiency, energy shortage, and no energy supply. After that, the traffic load of the base station and the number of users to serve are determined by the classification.
(ii) Intralayer control Prediction of the energy arrival rate through the analysis of the historical data. After that, smart IoT devices can adjust in advance according to the forecast results, which can effectively save energy. Moreover, the congestion can be avoided and quality of service (QoS) [4] of smart IoT devices can be improved.
(iii) Caching and pushing Implementation of caching and push strategies can be achieved by analyzing user usage habits and history data of smart IoT devices. The recommendation algorithm realizes more accurate and effective caching and pushing. Then, their commendation data can be transmitted in advance when the energy is sufficient. It reduces the probability of congestion while saving energy and improves the user experience.
The objective of this paper is to match the demand of smart IoT devices and the energy supply of renewable energy. To this end, an AI-based energy management scheme for multidimension smart IoT devices is proposed, which leverages the technology in AI to realize a more intelligent energy-efficient smart environment.

Our Contributions.
Employing the technology of AI, the proposed scheme realizes energy management at three dimensions in a smart environment. The main contributions of this paper are listed as follows.
(i) The multidimension energy management is proposed. The energy management strategies of smart IoT devices are categorized into three dimensions. Each dimension has different classifications and control principles, thereby achieving efficient and finegrain energy management for smart environment (ii) AI technologies are introduced in the multidimension energy management. AI technologies are employed in each dimension of smart IoT devices to realize energy-saving and intelligent energy management. In particular, the three dimensions of smart IoT devices are interlayer control with logistic regression and clustering analysis, intralayer control with regression algorithm and caching, and pushing with recommendation algorithm The reminder of the article is organized as follows. An overview of energy-saving technologies in smart IoT devices is first introduced. Then, the status of renewable energy and technologies in AI are given. Next, the proposed scheme is presented in detail and followed by the discussions of future works. Finally, the paper is summarized in the conclusion.

Deployment and Energy-Saving
Technologies of Smart IoT Devices The smart IoT devices can provide more convenience and service for our life. Whereas, it also enlarges the network scale and introduces highly dynamic topology, which requires more efficient and intelligent management of smart IoT devices. In this section, the deployment of smart IoT devices in a renewable energy-based smart environment is presented, which includes existing and promising future applications of smart IoT devices. In addition, existing network management technologies from all aspects are also discussed.

Deployment of Smart IoT
Devices. Smart IoT devices serve various applications in every aspect of our lives and industrial manufacturing. Generally speaking, the deployment of smart IoT devices in renewable energy-based smart environment is illustrated in Figure 1. The smart environment is composed of many parts, which can be divided into smart substation, smart distribution network, smart meter, smart terminal, and new energy storage system. The intelligent substation uses advanced intelligent equipment to automatically complete the basic functions of information collection, measurement, control, protection, and monitoring. The function of intelligent electric energy meter is the two-way metering function under the two-way interactive power supply mode. The smart terminal is the key equipment of the smart grid, which monitors and manages the electric equipment, guides the users to use the electricity reasonably, adjusts the peak and valley load of the power grid, and realizes the intelligent interaction between the power grid and the users. In addition, the following services can be supported by a smart environment.
(i) Smart home A smart home is a kind of system, which is designed to control equipment in home. For example, audio, refrigerator, electric cooker, air conditioner, sweeping robot, and other household equipment can be remotely controlled through a network connection. The smart grid provides energy supply for devices in the smart home.
(ii) Smart cities The concept of a smart environment was proposed in 1999 [5]. However, it has not been rapidly developed until recent years. Nowadays, the concept of smart cities [6] has been put forward. In the deployment of smart cities, technologies, and energy from all aspects, especially the energy from smart grid should be integrated in order to support smart cities.
(iii) Vehicle-to-grid (V2G) network V2G is the relationship between electric vehicles and power grid [7]. That is, the on-board battery supplies power 2 Wireless Communications and Mobile Computing to the grid system when the vehicle is free. In contrast, the current flows from the grid to the vehicle when the onboard battery needs to be charged. It is obvious that the energy management of the smart grid forms the important guarantee of the V2G network.
(iv) Intelligent transportation system The intelligent transportation system is a comprehensive transportation management system. It works an omnidirectional role across the region with real-time, accuracy, and efficiency. Unsurprisingly, the advancement of the smart grid, especially the energy management strategies of smart gird can further promote the development of an intelligent transportation system.

Related Works.
Energy and cost efficiencies are ultimately important for a smart environment, which needs precise control and provides services for devices in various scenarios. However, the smart environment that integrates various renewable sources and technologies in information science will definitely become more complex [8]. Moreover, the high penetration from the renewable energy may bring adverse effects on the smart environment. Therefore, many methods and solutions have been put forward to reasonably use renewable energy in a smart environment [9][10][11][12][13]. The wide-area protection and control (WAPAC) [14][15][16] and the wide-area monitoring system (WAMS) [17][18][19] are two advanced concepts in the smart grid. The phasor measurement unit (PMU) [20][21][22] is an important component for WAPAC, which can be deployed in the smart grid to monitor various parameters of the smart grid. In order to obtain the accurate and real-time measurements, WAMS not only employs sensors nodes in the smart but also uses a global positioning system (GPS) [23,24]. In addition to the above structural and physical technologies, the information and communication technology (ICT) [25][26][27][28] also plays an essential role in the smart grid. The data from both suppliers and consumers are collected and analyzed by the ICT. In addition, according to the analyzed results, intelligent and efficient solutions will be proposed. Moreover, AI as an emerging technique plays an increasingly important role in various research fields. The smart grid can also apply techniques in AI to optimize the energy efficiency [29][30][31][32].
Generally, a smart environment brings all possibilities for our future life. However, various obstacles (e.g., energy consumption, security issues [28,33], high-speed data, and high-mobility) hinge the development of it. Many technologies have been proposed to solve these difficulties, especially energy-saving technologies have been widely used in smart IoT devices. In this paper, we achieve an energy management scheme for smart IoT devices. It is worth noting that by employing the advanced technologies in AI, the proposed scheme is a novelty and performs well than existing energy saving schemes.

Key Issues for AI-Based Energy-Efficient Networks
The increasing scale and highly dynamic topology of smart IoT devices require energy-efficient and intelligent management. In the proposed scheme, we focus on energy-saving smart IoT devices supported by renewable energy. In addition, AI technologies are employed to achieve efficient and intelligent energy management. Therefore, in this section, the characteristics of renewable energy and technologies in AI are summarized.  3 Wireless Communications and Mobile Computing 3.1. Renewable Energy. Renewable energy, including sunlight, wind, rain, tides, waves, and geothermal heat, is theoretically inexhaustible and will become progressively more important as time goes on. Today, renewable energy has become an energy source in the fields of electricity, air and water heating/cooling, transportation, and rural (off-grid) energy services [34]. In 2015, more than US$286 billion was invested in renewable technologies about wind, hydro, solar, and biofuels. In the same year, according to statistics, renewable energy contributed 23.7% to humans' generation of electricity. By 2015, more than half of the world's new power capacity installation is renewable.
Elia [35], a Belgium's transmission system operator, can generate power either in "traditional" ways (e.g., in nuclear power stations, combined-cycle gas turbine facilities, or combined heat and power plants) or in units using renewable energy sources (like wind or solar farms and thermal or hydroelectric power stations). Then, the created power is injected into the (high-voltage) transmission system. Finally, it is delivered to the end user.
Specifically, according to the measured data of Elia, the energy generated by wind and solar in the first week of February 2018 is illustrated in Figure 2. In Figure 2, megawatts, usually abbreviated as MW, is a unit of power. It refers to the electricity generated by generators in the unit time under rated conditions. It can be observed from Figure 2 that the wind power reaches a maximum of about 1800 MW on the early morning of February 1 and then drops down. After a period of fluctuation, it hits the bottom on the 4th of February. In the following days, the wind power goes through volatility increase and decrease, eventually, reaches trough again at dusk on the 7th of February. By contrast, solar power is much more regular, which can be seen in Figure 2. With sunrise and sunset, the output of solar energy changes regularly. In particular, during the day, the solar power begins to climb up from the morning and reach the highest point around mid-day. Then, it begins to fall and finally shuts down at evening. Although the wind energy supply is not very regular and there is no supply of solar energy at night, they can also contribute a considerable energy supply to the power grid. Therefore, the development and utilization of renewable energy will be a promising application field, especially for the smart grid, which requires more energy consumption. In summary, it is indicated in Figure 2 that on the one hand, renewable energy provides considerable power for the smart grid. On the other hand, it implicates the mismatch between the grid load demand and renewable energy supply. Due to the mismatch between the grid load and the supply of the renewable energy, many researchers have been devoted to the improvement of the renewable energy utilization. In the following, technologies in AI are introduced. These technologies can be employed in smart IoT devices to improve the utilization of the renewable energy. Artificial intelligence, a new science simulates cognitive functions of humans, was founded as an academic discipline in 1956. The intelligent automation of electrical distribution networks has driven the future power system development, which will bring change in both network design and network operation. In the future, AI will bring change in both network design and network operation. As shown in Figure 3, artificial intelligence mainly includes the branches of machine learning, computer vision, pattern recognition, expert system, and natural language learning. In this paper, we mainly employ technologies of machine learning in the proposed AI-based energy management scheme, which are displayed in Figure 3. In the following, technologies of machine learning that will be used in this paper are introduced.

Regression Algorithm.
In the energy management of smart IoT devices, the regression algorithm can be employed to derive the mathematical model of the energy. Thus, achieving more efficient energy management in smart environment. The regression algorithms include linear regression [36][37][38] and logistic regression [39]. Linear regression models the relationship between a dependent variable and one or more independent variables. Linear regression can be fitted using the least-squares approach which has many practical uses like prediction. By contrast, logistic regression is a regression model where the dependent variable is categorical, which has been widely used on the field like machine learning, medical, and social sciences. In general, the basic formulas of the regression algorithm are and the sigmoid function Even though the regression algorithm can be understood and implemented easily, neural network can deal with more complicated and nonlinear cases than the regression algorithm. In some complicated cases of smart IoT devices, neural network can perform well. In the following, the basis of the neural network is presented.

Neural Networks.
Artificial neural network (ANN) [40] is a nonlinear and adaptive information processing system

Wireless Communications and Mobile Computing
consisting of a large number of interconnected processing units. Without any prior knowledge, ANN is able to evolve a set of relevant knowledge system from the learning material that it processed. ANN has been widely applied to various fields such as machine translation, computer vision, speech recognition, and medical diagnosis. In general, the basic formulas of the neural networks are The scores of each layer in the neural network are calculated as In particular, the formula of the gradient descent method in a neural network is as follows.
Then, the partial derivative result of output layer is calculated as Finally, the optimization can be achieved based on the following formula For some data, a linear decision boundary cannot be found. In this case, SVM can be used to achieve classification. In particular, in the concept of SVM, the third dimension is introduced into the two-dimensional plane to achieve the classification of nonlinear cases.

Support Vector Machine (SVM).
In machine learning, support vector machines (SVM) [41] are supervised learning models with associated learning algorithms which are mainly used to solve the problem of data classification in pattern recognition. Given a set of training examples, an SVM training algorithm builds a model that can classify new examples. Note that SVM can not only perform linear classification, it can also efficiently perform a nonlinear classification by employing a kernel trick, which maps the inputs into highdimensional feature spaces to achieve a nonlinear classification. Various real-world problems including text and hypertext categorization, classification of images, and biological can resort to SVM. In general, the basic formulas of the SVM are The above formula is equivalent to 3.2.4. Clustering Analysis. Clustering is a kind of unsupervised learning [42], and the purpose is to classify a set of data points. Clustering analysis is distinguished from the supervised classification analysis, where no training data are available. Specifically, the clustering algorithm is a method of automatically dividing a pile of unlabeled data into several classes, which ensures similar features of the same class of data, in which the data of the same class have similar features. Clustering analysis plays an important role in pattern recognition, data compression, computer graphics, etc. Generally speaking, clustering learning algorithms include K-means, Agglomerative, and DBSCAN. The key part of the clustering algorithm is the calculation of the distance. For example, in K-means algorithm, the distance is usually calculated as 3.2.5. Recommendation Algorithm. The recommendation algorithm [43] is an information filtering algorithm that seeks to predict the preference of users. It mainly includes demographic-based recommendation, content-based recommendation, and collaborative filtering. In general, the basic formulas of the recommendation algorithm are The above formula is the Pearson correlation coefficient, which is equivalent to Also, two commonly used distance formulas are Euclidean distance and cosine distance, which are shown as follows. 6 Wireless Communications and Mobile Computing

AI-Based Energy Management Scheme for the Multidimension Smart IoT Devices
The proposed AI-based energy management scheme can be categorized into three dimensions. In this section, each dimension of the scheme combined with AI technologies is presented in detail.

Interlayer with Logistic Regression and Clustering
Analysis. The main goal of interlayer control is to classify the energy collection base stations so that they can match the demand of smart IoT devices. Specifically, the classification can be achieved by employing logistic regression and clustering analysis.

Interlayer with Logistic Regression.
Using logistic regression analysis in the interlayer, the energy collection base station can be divided into available and unavailable. In fact, logistic regression is constructed by embedding the sigmoid function [44] into linear regression, which converts the numerical results to a probability between 0 and 1. After that, predictions and classifications can be derived based on this probability and the threshold set in advance. Figures 4 and 5 demonstrate the classification in the interlayer, which is realized with the help of the logistic regression. Figure 4 shows the relation between the influence factors of renewable energy and energy output, which are the original training data. Based on the original training data, a logistic regression model can be trained.

Inter layer with Clustering
Analysis. In addition to logistic regression, clustering analysis can also be applied in interlayer energy management for smart IoT devices. Compared with logistic regression, clustering analysis is unsupervised learning, which is able to classify unlabeled data automatically. In the proposed scheme, the energy collection base stations are classified according to the time and meteorological data. Figures 6 and 7 depict the clustering analysis of the energy collection base stations classification, which can be used for guiding the smart IoT device control. It is worth noting that no training data are available in clustering analysis. Figure 6 shows the original data based on time and meteorological data. Then, the original data can be automatically divided into four classes by the clustering algorithm, which is shown in Figure 7. Specifically, the purple, red, green, and blue points in Figure 7 represent four kinds of the energy collection base stations, which are sufficient, barely enough, low, and no energy supply, respectively. After that, the load of smart IoT devices can be assigned according to the classification.
From the above discussion, it is not difficult to observe that the interlayer control of the proposed scheme can be achieved with the help of the regression and the clustering algorithms.

Intralayer
Control with Regression Algorithm. The main purpose of intralevel is to determine the distribution of demands and the number of users served by predicting the supply of energy. Therefore, this requires a more accurate prediction of the supply of energy. Generally speaking, the linear function fitting has already been realized by the least square method. However, from the analysis of Section 3, we can know that the supply of renewable energy is nonlinear. Fortunately, neural networks and SVM can fit nonlinear data. In general, a cost function needs to be constructed first. Then, gradient descent algorithm is applied to approach the lowest point (i.e., the minimum point of the cost function). Finally, the optimal solution of the weight is obtained, which is also the optimal solution of fitting.
In particular, a visualized example of the cost function is illustrated in Figure 8, which shows the cost function with two parameters. In Figure 8, the X and Y-axis represent parameters θ1 and θ2, respectively. Namely, the factors that determine the output of renewable energy. Accordingly, the Z-axis is the cost J(θ1,θ2), namely, the deviation between the fitting results and the practical data. Therefore, the minimum point of the cost function is the smallest error and is also the optimal solution of the fitting. Moreover, finding the minimum point of the cost function can be achieved by the widely-used gradient descent algorithm.
It can be seen that the output of renewable energy can be predicted by regression analysis. It is helpful for the energyefficient smart IoT devices.

Caching and Pushing with Recommendation Algorithm.
Caching and pushing in the energy-efficient smart IoT devices aims at taking advantage of the superfluous resource. In the energy-efficient smart IoT devices with renewable energy, the mismatch between the demand and energy supply is an obstacle to making full use of renewable resources. For example, solar energy reaches the maximum at noon and is unable to provide energy at night. However, the smart IoT devices generally have a large demand for power in the evening. Thus, the supply of renewable energy in a direct way will cause a waste of energy. The problem of mismatch between energy supply and demand is alleviated on time scale by caching technology. Essentially, the demand that is needed in the evening can be cached in advance when the resource is sufficient. Moreover, in order to accurate and effective caching, a recommendation algorithm could be added. By analyzing users' information, using habits, and historical data, the recommended algorithms can implement more efficient caching and pushing for smart IoT devices.
In the proposed scheme, two kinds of collaborative filtering algorithms: user-based collaborative filtering and itembased collaborative filtering are employed. Note that the base idea of user-based collaborative filtering and item-based collaborative filtering has been changed in accordance with the context.

Future Research Directions
There are many challenges to be solved in the energy-efficient smart IoT devices, which are briefly discussed in the following.

(i) Computation overhead and storage overhead
For one thing, the introduction of AI technology will lead to greater computing overhead. For another, the caching strategy will also provide a higher requirement for storage resources. Therefore, in order to diminish the computing overhead and storage overhead, new technologies need to be considered. For example, cloud computing and cloud storage [45].

(ii) Reliability
In the network, it is required to provide services at any time. However, the supply of renewable energy is discontinuous and fluctuant. The smooth transition from energy    Wireless Communications and Mobile Computing supply to smart IoT devices still requires more researches and works to be devoted.
(iii) Quality of Service (QoS) User-friendly and environmentally-friendly guarantee the sustainable development of the energy-efficient smart IoT devices. Therefore, QoS should be considered in the design of an AI-based energy management scheme.
(iv) Security Nowadays, with the development of information technology, all kinds of security threats are also flooded with various fields touched by the network. The smart IoT devices are no exception. For example, the user of smart IoT devices may be performed by an attacker. In order to ensure the normal running of smart IoT devices, the security mechanism needs to be added to the energy management of smart IoT devices.

Conclusion
In this paper, we concentrate on improving the energy efficiency of smart IoT devices. The existing schemes that improve the efficiency of energy use in smart IoT devices are analyzed. Moreover, the characteristics and current status of renewable energy and technologies in AI were studied and introduced. After that, the energy management scheme of three dimensions was proposed. Remarkably, in order to obtain a satisfactory result, technologies in AI were embedded in the three dimensions. Namely, interlayer control with logistic regression and clustering analysis, intralayer control with regression algorithm, and caching and pushing with recommendation algorithm. The analysis shows that the energy management scheme combined with AI technologies can greatly improve the utilization of renewable energy in a fine-grain scale. Finally, some open issues are discussed in the future works.

Data Availability
The related data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare that they have no conflicts of interest.