1 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.

2 Recommandation modeling

The recommendation model consists modules of intention detection, warning levels classification, and chained recommendation, as shown in Figs. 1 and 2.

Fig. 1
figure 1

Modules of the recommendation model

Fig. 2
figure 2

Recommendation model

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, medium-class, 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.

2.1 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 S1 at T-time is 5 days (< T, S1 >  = 5), the number of days in state S2 is 5 days (< T, S2 >  = 5), and the number of days in state S3 is 20 days (< T, S3 >  = 20). This implies that the user has spent the most days in the state of S3 in the past month, so it can be predicted that the user's charging intention may be in the state of S3 at T-time, which means that the user has no charging intention at T-time. Probability calculation formula of intention detection is as follows:

    $$ P\left( {S_{i} } \right) = \frac{{N\left( {S_{i} } \right)}}{{N\left( {S_{1} } \right) + { }N\left( {S_{2} } \right) + N\left( {S_{3} } \right)}},N\left( {S_{i} } \right) > 0 $$
    (1)

    where N(Si) denotes the total number of days that the EV is in the state of Si at T-time.

    In addition, charging intention is detected on the basis of the following formula:

    $$ {\text{Maximum}}[P\left( {S_{i} } \right)] $$
    (2)

2.2 Warning levels classification module

2.2.1 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.

2.2.2 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.

2.2.3 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.

2.3 Chained recommendation module

2.3.1 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

figure a

.

2.3.2 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.

2.3.2.1 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.

2.3.2.2 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:

    $$ score_{ij} = \frac{{c_{ij} }}{{dist\left( {p_{i} ,sta_{j} } \right)}},c_{ij} > 0 $$
    (3)

    where:

    \(p_{i} \in \left\langle {p_{1} ,p_{2} ,{ } \ldots { },p_{i} } \right\rangle\) represents the current position of the i-th EV;

    \(sta_{j} \in \left\langle {sta_{1} ,sta_{2} , \ldots ,sta_{{\text{j}}} } \right\rangle\) represents the j-th charging pile in the initial set of charging piles;

    \(c_{ij} \in \left\langle {c_{11} , \ldots ,c_{{1{\text{j}}}} ,c_{21} ,{ } \ldots { },c_{ij} } \right\rangle\) represents the total number of charging times that the i-th EV has spent at the j-th charging pile;

    \(dist\left( {p_{i} { },sta_{j} } \right)\) 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:

    $$ {\text{Maximum}}[score_{ij} ] $$
    (4)
  • Calculating the waiting time that the user choose different charging piles: In general, the waiting time is equal to the sum of time spent on the way to different charging piles and time spent on charging. If other users arrive at the designated charging pile first and all charging piles are occupied, in this case, the waiting time is equal to the sum of time spent on the way to different charging piles, time spent on charging, and the queuing time (the remaining charging time of the previous user). The criterion for recommendation based on waiting time is to select charging pile with the shortest waiting time. The calculating formula is as follows:

    $$ T_{i} = T_{c} + T_{o} + T_{l} $$
    (5)

    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);

    To 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_{o} = d_{i} /v $$
    (6)

    \(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.

    $$ T_{c} = \frac{{E_{o} - E_{p} }}{p} $$
    (7)
  • 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.

2.3.2.3 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.

2.4 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 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.

Fig. 3
figure 3

Evaluation indexes

3 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 factors (the total distance and the utilization rate of charging piles) to analyze the efficiency of the recommendation.

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.

Fig. 4
figure 4

Simulation scenario of network of EVs

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.

Fig. 5
figure 5

Distance between EVs and charging piles

Fig. 6
figure 6

The minimum distance

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).

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.

Fig. 7
figure 7

Preference between EVs and charging piles

Fig. 8
figure 8

The maximum preference

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.

Fig. 9
figure 9

Traffic load

Fig. 10
figure 10

The minimum traffic load

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:

$$ I = score_{ij}^{{\prime}} + \left( {L_{ij} /1} \right)^{{\prime}} $$
(8)

Among them, \(score_{ij}^{{\prime}}\) represents the normalized result of preference; \(\left( {L_{ij} /1} \right)^{{\prime}}\) represents the normalized result of the reciprocal of traffic load. Figure 11 shows the curve of the integrated factor and Fig. 12 tells the maximum result. And the charging pile with the maximum result is recommended for the user.

Fig. 11
figure 11

Integrated factor

Fig. 12
figure 12

The maximum result

The comparison of the simulation results is shown in Figs. 13, 14, 15, 16, 17. As is shown in 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 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.

Fig. 13
figure 13

Total distance comparison result

Fig. 14
figure 14

Utilization based on distance

Fig. 15
figure 15

Utilization based on preference

Fig. 16
figure 16

Utilization based on traffic

Fig. 17
figure 17

Utilization based on integrated factor

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.

4 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].