A method of chained recommendation for charging piles in internet of vehicles

With the popularization of new energy electric vehicles (EVs), the recommendation algorithm is widely used in the relatively new field of charge piles. At the same time, the construction of charging infrastructure is facing increasing demand and more severe challenges. With the ubiquity of Internet of vehicles (IoVs), inter-vehicle communication can share information about the charging experience and traffic condition to help achieving better charging recommendation and higher energy efficiency. The recommendation of charging piles is of great value. However, the existing methods related to such recommendation consider inadequate reference factors and most of them are generalized for all users, rather than personalized for specific populations. In this paper, we propose a recommendation method based on dynamic charging area mechanism, which recommends the appropriate initial charging area according to the user's warning level, and dynamically changes the charging area according to the real-time state of EVs and charging piles. The recommendation method based on a classification chain provides more personalized services for users according to different charging needs and improves the utilization ratio of charging piles. This satisfies users' multilevel charging demands and realizes a more effective charging planning, which is beneficial to overall balance. The chained recommendation method mainly consists of three modules: intention detection, warning levels classification, and chained recommendation. The dynamic charging area mechanism reduces the occurrence of recommendation conflict and provides more personalized service for users according to different charging needs. Simulations and computations validate the correctness and effectiveness of the proposed method.


Introduction
Recommendation for resources and services is a classic problem. Especially in the current era of big data and cloud computing, recommendation systems are widely used in a variety kinds of fields. Traditional recommendation algorithms are used in shopping, reading, catering, accommodation, and other fields, which brings our daily lives great convenience. With the increasing popularity of new energy vehicles, the demands of charging electric vehicles (EVs) are becoming increasingly obvious. However, as a relatively new application field, the development of algorithms on recommendation of charging piles is not addressed well enough to meet the increasing demands. Compared with the traditional gas pile, the charging pile has the characteristics of longer charging time, less stable price and limited service capacity. In addition, the charging pile and the vehicle are required to be matched on some parameters. From users' point of view, they usually find it difficult to make choices or they are simply too lazy to make such decisions. Thus, most of them tend to follow other people's decisions blindly and gather at the most popular charging piles, which may lead to the unbalanced utilization of charging resources. All of the above mentioned bring great challenges to the recommendation of charging piles [1].
The EV industry is growing rapidly, and the government is also vigorously promoting the construction of charging infrastructure. As of January 2019, the ratio of public charging piles to new energy vehicles in China is about 1:7.6. Owners of EVs can select the idle electric piles or make an appointment for charging through applications developed for recommendation. However, due to the lack of suitable dispatching method in existing charging pile platforms, owners need to choose idle charging piles independently [2]. On one hand, it leads to a poor user experience. Users have to make decisions to pick a charging pile independently to charge or reserve from a large number of charging piles that can meet their conditions. On the other hand, it generates lots of time fragmentation, which could reduce the utilization rate of charging piles [3].
Recently, both industrial and academic communities started to have great interest to EVs and charging pile deployment. The mainly studied issues are the siting of charging piles and the recommendation of EVs. For example, Tian et al. [4] provided a real-time charging pile recommendation system for EV taxis via large-scale GPS data mining. Jung et al. [5] used an activity-based model to analyze the queue delay of charge piles and offer decision support for choosing locations of undeployed charging piles. Besides, Gharbaoui et al. [6] also used activity-based models and found that in urban areas, public charging piles can be under-utilized and location selecting of charging piles should be considered to reduce EV owners' range anxiety [7,8].
Mobility, high density, sparse connectivity, and heterogeneity bring spatial challenges for the vehicular Internet of Things. For emerging vehicular IoT applications, distributed communication, data caching, and computing tasks are conducted to provide more reliable and efficient communications in various network environments [9,10]. Edge computing provides high-class intelligent services and computing capabilities at the edge of the networks, and the constrained shortest distance (CSD) querying can also be applied to recommendation algorithms [11,12]. Feng et al. [13] introduced a distributed vehicular edge computing solution named the autonomous vehicular edge (AVE), which can share neighboring vehicles' available resources via vehicle-to-vehicle (V2V) communications. Feng et al. [14] designed an ant colony optimization algorithm to schedule buffers based on information collected on an adjacent vehicle. While the rapid development of IoT devices is changing our daily lives, some particular issues hinder the massive deployment of IoT devices. The cloud-based malware detection can utilize the data sharing and powerful computational resources of secured servers to improve the detection performance. Such methods provide good technical supports for charging piles recommendation [15,16].
The state of charging piles and EVs are changing all the time. The recommendation method based on charging intention takes charging needs of surrounding users into account to make a more accurate recommendation list for the served user. However, this method is not applicable for users with urgent needs. To satisfy more users, it is vital to provide a personalized recommendation list. And different from books, movies, and other items, charging piles and EVs have strong regional characteristics. Users live or work in a certain area are used to choose charging piles nearby. The recommendation method based on preference can provide users with recommendation lists in line with their charging habits, but this method is not applicable to newly installed charging piles and new users.
The recommendation of charging piles is a research direction of great value. However, most of the existing researches related to such recommendation tend to have some shortcomings [17]. On one hand, the existing methods consider inadequate reference factors, which lead to the uncertainty and unavailability of the recommendation results, and affect the accuracy of recommendation. On the other hand, the existing recommendation methods are generalized for all users, rather than personalized for specific populations. People nowadays have partiality for personalized services, because those services can customize the most suitable solutions for users of different needs [18].
In this paper, we propose a chained recommendation method for charging piles, which can reduce the occurrence of recommendation conflict. We can understand that, based on his/her location data and charging history, whether a user has charging intentions or not. If the user has charging intentions, he/she is marked as "a user to be charged". Based on the user's profile, the endurance data of the EVs, and the charging piles distribution in the area, we divide the "users to be charged" into three warning levels, and screen the target charging areas for users based on their warning levels. Once an user enters the target charging area, the recommendation list of charging piles is generated and is sent to the user. This method can satisfy users' multilevel charging demands and improve the utilization ratio of charging piles. It can realize a more effective allocation of charging piles, which is beneficial to overall balance of resources utilization. The novelty of our method is mainly reflected in two aspects: On the one hand, it applies chained recommendation mechanism to make recommendations for users' with different charging needs. On the other hand, dynamic charging area mechanism is designed to detect and alleviate the recommendation conflict to a certain extent even eliminate entirely.
The organization of this paper is as follows. In Sect. 2, we describe the construction of the recommendation model according to different conditions. In particular, we introduce three sub-modules including intention detection module, warning levels classification module, and chained recommendation module in detail. In Sect. 3, we simulate and verify the feasibility of our method. In the last Sect. 4, we conclude the paper and suggest future work.

Recommandation modeling
The recommendation model consists modules of intention detection, warning levels classification, and chained recommendation, as shown in Figs. 1 and 2.
The intention detection module mainly includes two sub-modules: data acquisition and state probability calculation, and is responsible for detecting user's charging intentions.
The warning levels classification module is based on the situation of EVs and charging piles, surrounding environment, users' profile, and so on. It is responsible for dividing the warning levels of users into three categories: high-class, mediumclass, and low-class warning levels. The warning levels classification module aims to prepare for the subsequent chained recommendation module. The chained recommendation module is mainly based on the dynamic charging area mechanism and the chained recommendation mechanism. According to different warning levels, it is divided into three sub-modules. By referring to a variety of factors, it provides users with different levels of recommendation services, and generates the final lists of recommended charging piles [19][20][21][22][23]. At the same time, according to the dynamic parameters of vehicles' battery status, driving information and charging demands, our system adjusts the chained recommendation process and the recommendation strategy, and gives the real-time recommendation results of charging piles, so as to optimize the charging efficiency and utilization.

Intention detection module
Based on the user's current GPS location information and charging history, the intention detection module is responsible for making detection about the user's current charging intention. There are three types of the charging intentions: on the way to charging pile ( S 1 ), has reached charging pile ( S 2 ), and has no charging intention ( S 3 ) [4].
• Data Acquisition: it is responsible for acquiring user's charging history, as well as user's current GPS location information. • State Probability Calculation: it is responsible for statistical analysis of data, and the specific approach is as follows. First, we divide one day into several periods, and then count the number of days that a user is in a certain state at a certain time based on the charging history. For example, by analyzing the charging history of the user in the past month (30 days), we can detect the charging intention of the user at T-time [24]. It can be found that in the past month, the number of days that the user is in state S 1 at T-time is 5 days (< T, S 1 > = 5), the number of days in state S 2 is 5 days (< T, S 2 > = 5), and the number of days in state S 3 is 20 days (< T, S 3 > = 20). This implies that the user has spent the most days in the state of S 3 in the past month, so it can be predicted that the user's charging intention may be in the state of S 3 at T-time, which means that the user has no charging intention at T-time. Probability calculation formula of intention detection is as follows: where N(S i ) denotes the total number of days that the EV is in the state of S i at T-time.
In addition, charging intention is detected on the basis of the following formula:

User's profile
It is necessary to judge whether the user belongs to VIP users or ordinary users. Under the pattern of pay-for-service model, users can become VIP users by paying a certain fee, which enhances their priority of recommendation services. For VIP users, it is considered that they have the privilege of obtaining priority recommendation. Their warning level is considered to be high-class, and we recommend high-quality and convenient piles to them first [25]. For ordinary users, the warning level is divided based on situations of vehicles, piles, and surrounding environment.

Surrounding environment
According to weather, air conditioning, congestion idling, climbing, and other scenario information, we make assumptions about the power consumption rate of batteries, and predict the time left on the remaining power.

Situation of piles and EVs
It is necessary to classify warning levels based on the remaining power, ratio of vehicles to piles, density, and other elements. It should be noted that, the less residual electricity that vehicles have, the more urgent the charging demand is, and the higher charging priority is. Besides, we pay more attention to areas with lower distribution density of charging piles. In such areas strengthened recommendations and reminders are necessary.

Dynamic charging area mechanism
When recommending charging piles, we may encounter situations where we recommend the same charging pile to two or more users [26,27]. Under some circumstances, it leads to recommendation conflict if the number of charging piles is insufficient. To mitigate recommendation conflict, the dynamic charging area mechanism is applied.
Under the dynamic charging area mechanism, we recommend the dynamic charging area firstly and the specific charging piles subsequently. First of all, an initial charging area is recommended for users. The recommendation system continuously refreshes the optimized recommendation list while the EV proceeds to the recommended charging pile. As the constraints changes continuously, the recommendation list changes accordingly [28,29]. That is to say, the chained recommendation mechanism described in the following section provides algorithmic support for the dynamic charging area mechanism.
When the user arrives at the recommended charging area, our system recommends a charging pile located in the recommended charging area for the user. Thus, even if the same charging pile is recommended to two or more users and the number of charging piles is insufficient, our system can re-recommend suitable charging piles that are in the same charging area and close to users.
The recommendation conflict detection is introduced into the dynamic charging area mechanism to detect whether there is a recommendation conflict at each time node or location node. It is responsible for detecting whether a charge pile in the recommendation list generated for users has been occupied in advance. In the case of the occurrence of recommendation conflict, the recommendation list is regenerated through chained recommendation mechanism [30][31][32][33][34].
The dynamic charging area mechanism shown in Algorithm 1 adopts the idea of retrospective recommendation. Even in the absence of recommendation conflict, it continuously detects if there is a more suitable charging pile based on the change of user's location and time, and it updates the recommendation list in real time. By adopting this mechanism, our recommendation method is responsible for the recommendation results, and the continuous tracking is also available

Chained recommendation mechanism
It is responsible for making hierarchical recommendation and providing integrated and fair services for users with different warning levels. By the fusion of multiple models, it can improve the accuracy of recommendation.

Level-one filtering
For users at high-class warning levels, their charging needs are more urgent. We give these users the highest priority and recommend charging piles for them in a most efficient way. In the level-one filtering, the most convenient recommendation for users is just based on some basic elements such as users' current location information, EVs' profile, the occupancy status of charging piles, and the parking space of charging piles, etc.

Level-two filtering
For users at medium-class warning levels, the level-two filtering is applied to recommend charging piles for them. After the level-one filtering, an initial set of charging piles is prepared. The charging piles in this set should meet some requirements, such as appropriate distance (Too close or too far is not appropriate [35]), appropriate charging rate, and matching parameters between charging piles and EVs. Afterwards, we introduce the improved collaborative filtering algorithm in the level-two filtering. It integrates users' preferences, waiting time, price, and other factors to make personalized, socialized, and economical recommendation results for users.
• Calculating users' preference for different charging piles: By analyzing users' historical charging behavior and combining the current distance between users and charging piles, we can calculate users' preference for different charging piles, and the calculation formula is as follows: where: p i ∈ ⟨p 1 , p 2 , … , p i ⟩ represents the current position of the i-th EV; sta j ∈ ⟨ sta 1 , sta 2 , … , sta j ⟩ represents the j-th charging pile in the initial set of charging piles; c ij ∈ ⟨ c 11 , … , c 1j , c 21 , … , c ij ⟩ represents the total number of charging times that the i-th EV has spent at the j-th charging pile; dist p i , sta j represents the real-time distance between the i-th EV with the j-th charging pile at the current moment.
In addition, recommendation based on preference is measured on the basis of the following formula: where: T i represents the total waiting time for the i-th EV; T l represents the queuing time (the remaining charging time of the previous user); T o represents the time spent on the way to different charging piles, and it's equal to the ratio of distance to EV's speed; T c represents the time spent on charging. In the following formula, E o means the rated electricity of EV; E p means the remaining electricity of an EV; p means the rated power of a charging pile.
• Calculating the price that the user choose different charging piles: According to the pricing standard of each charging pile and the parking lot, we calculate the required price. The criterion for recommendation based on price is to select charging pile with the lowest price.

Level-three filtering
For users at low-class warning levels, the level-three filtering is applied. After the level-one and the level-two filtering, we take traffic load and equilibrium utilization rate of charging piles into consideration to make a more holistic and fair recommendation. It is necessary to take traffic load and equilibrium utilization rate of charging piles into account in the recommendation model for the following two reasons: • If we only consider the demand of users, people will pile up at the most convenient charging piles nearby, where the traffic flow is usually relatively high. However, such practice leads heavier traffic congestion. We expect that reasonable charging guidance can help to alleviate the pressure of urban traffic [36]. In addition, we can get inspiration from the traffic flow thermodynamic diagram. By processing the traffic data and grading the traffic load, we can use the factor of traffic load to represent the traffic conditions of different traffic routes. • Equilibrium utilization rate of charging piles means to make full use of all the charging resources. For example, if one charging pile provides charging service for so many EVs in a day, some vehicles have to queue up for charging. Meanwhile, other charging piles served no EV or much fewer. The situation mentioned above shows that the utilization of different charging piles is unbalanced. To avoid such situation and reduce the waste of public resources, equilibrium utilization rate of charging piles is necessary.

Evaluation indexes
The evaluation indexes shown in Fig. 3 can be used to evaluate the recommended algorithm of charging pile. Point demand means that the sum of distances between all EVs and the recommended charging piles is the smallest in a day. Flow demand refers to the total number of EVs served by all charging piles or the total number of (6) vehicles passing by each charging pile in a day, and the larger result is better. Cost constraints refer to the total cost of charging all EVs, and a lower cost is better [37,38]. Equilibrium utilization means making full use of all the charging resources. We should avoid the occurrence of unbalanced utilization as far as possible. And finally, we should consider the impact that the recommendation algorithm caused on the overall traffic situation. Traffic jams should be avoided, and we should also analyze whether the algorithm can play a role in traffic evacuation.

Simulation and discussion
To validate the feasibility and effectiveness of the proposed chained recommendation model, we set up a simulation scenario of a 3 km × 6 km campus area in Guangdong province as the background with 500 digital twin EV nodes scatted randomly and 280 plugs of digital twin charging pile deployed. In this paper, we simulated some experimental data randomly, and generated the recommendation result based on the distance between EVs and charging piles and users' preference for charging piles [39,40]. Afterwards, we analyzed the simulation results and compared the different recommendation results generated from two recommendation methods. In order to evaluate the performance of different recommendation methods, we set two  Figure 4 shows a simulated distribution of EVs and charging piles. In such a simulation scenario, we provided 10 charging piles and 100 EVs located randomly in the map, and set several corresponding parameters for each charging pile and EV. These parameters include the location of each charging pile and EV, the distance between the charging piles and EVs, the total historical charging times of each EV in each charging pile, and the traffic load of each path, etc. Figure 5 shows the distance between each EV and charging pile and Fig. 6 tells the minimum distance. According to the result shows in Fig. 6, we can easily obtain the recommendation result based on the distance. The charging pile with the shortest distance is recommended for the user.
For another recommendation method, we took the distance and the total historical charging times into consideration. We can get users' preference for each charging pile through formula (3).  The minimum distance Figure 7 shows the preference that each EV has for each charging pile and Fig. 8 tells the maximum preference. According to Fig. 8, we can easily obtain the recommendation result based on the preference. And the charging pile with the largest preference is recommended for the user.
Inspired by the urban traffic thermodynamic map, we grade and quantify the traffic condition of each path. We design the parameter L to represent the traffic load, and the larger L means the worse traffic condition. Figure 9 shows the traffic load of each path and Fig. 10 tells the minimum traffic load. And the charging pile with the maximum traffic load will be recommended for users.
In order to get better recommendation result, we normalized the preference and the reciprocal of the traffic load, and integrated them through some mathematical  processing. We design the parameter I to represent this integrated factor. We can get a comprehensive quantitative index through the following formula: Among them, score ′ ij represents the normalized result of preference; L ij ∕1 � represents the normalized result of the reciprocal of traffic load. Figure 11 shows the curve of the integrated factor and Fig. 12 Fig. 13, the total distance obtained from the method based on distance is the shortest, while the method based on preference has the longest distance. When we consider factors of preference and traffic load, the total distance is much shorter than the longest distance. Combining our experimental data shown in Fig. 13, our Fig. 9 Traffic load  method can reduce the total distance by 28.73% in the average. So we can draw the conclusion that the method based on integrated factor can reduce total distance to a certain degree. Figures 14, 15, 16 and 17 shows the total number of EVs that are recommended to each charging piles. From the following figures we can see that the utilization of charging piles showed in Fig. 16 is much balanced than that showed in Figs. 14, 15, which means the method based on integrated factor is beneficial to the balance of utilization.

Conclusion
At present, most charging piles (charging gun interface) are physical contact charging. The same pile interface can only provide charging for one EV at a time, so charging pile is a mutually exclusive critical resource [41]. Guiding charging behavior of users correctly and reasonably plays an important role in efficiently utilizing charging resources, relieving traffic pressure, and improving user experience. In this paper, we propose a chained recommendation method for charging piles. It can realize a more effective allocation of charging piles, which is beneficial to overall balance of resources utilization. By integrating the time-varying constraints such as intention, preference, time, energy, cost, and traffic load, the proposed method divides the users' demands, and delimits the priority levels according to the objective charging urgency and the strength of the supervisor's demands [42,43]. It divides the users' demands precisely to reduce the repetitive crossover of recommendation. And under the mechanisms of chained recommendation and dynamic charging area, the recommendation conflict can be alleviated to a certain extent even eliminated entirely.
Our simulations validate that our method can improve the equilibrium utilization rate of charging piles to a certain extent. In the future work, the chained recommendation algorithm could be improved and we will address more on the energy consumption, the charging capacity, and the impact of recommendation on traffic [44,45].