Research on Intelligent Guidance Optimal Path of Shared Car Charging in the IOT Environment

In recent years, with the improvement of Internet of Things (IOT) technology, a “shared” service concept has appeared in people’s life. In the limited available resources, it is of great value to study the optimal path of charging pile selection for shared cars. With the help of Internet of Things technology and through analyzing the collected data, this paper introduces three path optimization methods, the Dijkstra algorithm, heuristic algorithm A∗, and improved particle swarm optimization (PSO) algorithm; establishes relevant convergence conditions; and takes the actual path cost as the criterion to judge the optimal path. In addition, this paper studies the optimal path from the shared car to the charging pile. Through the simulation experiment, the results show that compared with the traditional optimal path algorithm, the improved particle swarm optimization algorithm has strong parallelism and better search effect for optimal path selection in the case of large number of traffic path nodes and complex paths, which fully reflects the performance advantage of the algorithm.


Introduction
As a long-term problem, air pollution has not been fully improved, and automobile exhaust is an important cause of air pollution. Based on this, with the support of IOT technology, it is of great significance to study the optimal path from shared cars to charging piles.
In order to distribute traffic network reasonably and improve traffic operation efficiency, the United States began to study the Intelligent Transportation IOT in the 1960s. In 1991, the United States Congress passed the Integrated Land Transportation Efficiency Act (ISTEA) [1]. The simulation results showed that once the ISTRA scheme was adopted, the capacity of the US road network would be increased by 20%~30% [2]. The intelligent transportation system (ITS) was first used in the parking lot vehicle guidance system. The earliest foreign parking guidance system appeared in Aachen, Germany, in 1971. Then it was first widely used in Britain and other European countries, Japan, and other developed countries [3,4]. In China, Beijing [5,6], Shanghai, Guangzhou [7], and other cities take the lead in introducing the parking guidance system, effectively alleviating traffic congestion. More and more cities have begun to use the parking guidance system [8]. More and more cities are applying parking guidance systems. The rise of domestic shared electric vehicles, combined with the development of domestic and international urban parking guidance systems, has pointed out the development goals and directions for the study of the optimal path from shared electric cars to charging piles.
The core of DRGS is the path guidance algorithm, but the current path guidance is mostly based on static information. In order to obtain the shortest path in the former N trips and reduce the complexity to the polynomial order, Wei et al. [10] proposed the generalized shortest path by using the improved Dijkstra algorithm. Xiaolei [11] combined the Dijkstra algorithm with genetic algorithm and studied the method of obtaining the optimal path quickly without the restriction of the network condition. In 2009, in order to avoid a single algorithm falling into the local optimal defect and improving the optimization efficiency, van der Zijpp and Catalano [12] proposed a shortest path optimization algorithm based on simulated annealing algorithm and genetic algorithm. The traditional path guidance method was only limited to the optimal path for one individual to find the starting point and the end point, which could not take into account the overall road impact factors and realize the path dynamic induction [13]. Therefore, it was necessary to design an optimal path in the sharing of electric car charging, so as to improve the utilization ratio of the shared car and alleviate the traffic pressure of traffic congestion [14]. Dynamic route guidance system (DRGS) was first studied in the United States, the United Kingdom, Japan, and other developed countries. Other path guidance systems based on DRGS have achieved some results [9]. The core of DRGS is path guidance algorithm, but the current path guidance is mostly based on static information. Wei et al. [10] proposed the generalized shortest path, using the improved Dijkstra algorithm to find the shortest path in the front N routes and reduce the complexity to a polynomial order. Xiaolei [11] used the method of combining the Dijkstra algorithm with genetic algorithm to find the optimal path without the restriction of road network conditions. van der Zijpp and Catalano [12] proposed a shortest path optimization algorithm based on simulated annealing algorithm and genetic algorithm in 2009, which avoided the defect that a single algorithm was easy to fall into local optimum and improved the optimization efficiency. The traditional route guidance method was limited to an individual to find the optimal path of the starting point and the end point and could not take into account the overall impact of road factors to achieve dynamic route guidance [13]. Therefore, it is necessary to design an optimal path when sharing electric car needs to charge, which can not only improve the utilization rate of the shared car but also alleviate traffic congestion and other traffic pressures [14].
The above researches on parking guidance system and urban route guidance based on IOT have certain limitations, and there are few researches on the path planning of guiding shared cars to charging piles at home and abroad, because of the complexity of urban traffic network, the uncertain situation of vehicles in road network, the real time of vehicles, and roads situation. When we use real-time updated traffic data to search the path, higher requirements are put forward for the optimal path selection.

IOT Technology
IOT is an important part of the new generation of information technology, which is called the third wave of development of the world information industry after the computer and the Internet. The early IOT was put forward based on the background of a logistics system, and the radio frequency identification (RFID) technology was used as the substitute of bar code identification to realize the intelligent management of the logistics system. The concept of "Internet of Things" was formally proposed at the 2005 ITU World Summit on the Information Society in Tunis. The report noted that the IOT was a new dimension of communication in the world of information and communication technology (shown in Figure 1), which extended any time, any place, and connection any person to connect any object. The connection of all things forms the IOT [15].
The introduction of the ITU report makes the IOT more and more important in the world. Workers in all related fields have studied the IOT from different aspects. However, different workers have different points of view on the IOT, and the description of the IOT is different. Therefore, the concept of IOT is not reaching a consensus.
Here, we only introduce a concept, which is widely recognized. The definition of "Internet of Things Technology" is [16] a network technology through the RFID, infrared sensors, the global positioning system (GPS), laser scanners, and other information-sensing equipment. In order to achieve intelligent identification, positioning, tracking, monitoring, and management, any items connected with the Internet for information exchange and communication can     [17] according to the agreement. Its core and foundation is still "Internet technology"; it is a kind of network technology that extends and expands on the basis of Internet technology. The clients expand and extend to any goods and objects, exchange information, and communicate with each other [18]. For a clearer description of the key links in the IOT, according to the perspective of information science, the information function model of the IOT is abstracted around the flow process of information, as shown in Figure 2. 2.1. Three Key Technologies in IOT Applications. There are four levels of general IOT architecture: the perceptive layer, the network layer, the data intelligent processing layer, and the application layer. The perceptive layer is like the human skin and the senses, which is used to identify objects and collect information. The network layer is like a human neural network that transmits information to the brain for processing. The data intelligent processing layer is the core technology, which is realized data-centric. The application layer includes the application support layer and various specific object-networking applications. The IOT includes three key technologies in the application, and its technical architecture is shown in Figure 3.
(1) Sensor technology: the collected signal is analog signal, which can be processed by computer only if the analog signals are converted into digital signal (2) RFID tag technology: the integration of radio frequency identification and embedded technology, which has a broad application prospects in automatic identification, goods logistics management (3) Embedded system technology: a composite technologies, which integrates computer hardware and software technology, sensor technology, integrated circuit technology, electronic application technology 2.2. Features of the IOT. The IOT is based on the Internet, which not only has many characteristics of the Internet but also extends its own more prominent features. The basic characteristics of the network of things are perception, reliability, and intelligence, which are mainly reflected in the following three aspects:   Perception. This is mainly embodied in the identification and communication of the IOT. In the entire IOT, there is a large number of sensors. Each sensor is a source of information. The sensor receives the information and identifies the information through a specific protocol. Today, with the rapid development of our science and technology information, information data is constantly being updated, so that the sensors must constantly perceive the data and update the information.

Reliability.
Reliability is mainly reflected in the reliability of information transmission, through the Cloud computing; fuzzy recognition technology, corresponding to the change of various things; reliable transmission; and sending of instructions in time.

Intelligence.
The IOT is the communication between things and things, without the interference of human beings. In other words, this is not through the authorization of the human, but the person is only a kind of consciousness control. The IOT can transmit, analyze, and process information through various technologies. Finally, intelligent decisions can be made through intelligent control.
Thus, comprehensive perception, reliable transmission, and intelligent processing are the three important features of the IOT. In the "smart planet," the importance of the IOT has been involved, which embodies the profound perception, comprehensive interconnection, and the powerful intelligence of the IOT.

The System
Architecture of the IOT. Here, we introduce one of the architectures of the IOT, which includes the underlying network distribution, converged gateway access, Internet convergence, and terminal-user application. The structure is showed in Figure 4.
In Figure 4, a large number of the underlying network systems are selectively distributed in the physical space, according to their respective characteristics, which forms the network distribution. The underlying network collects the exchange information of barter and transfers it to intelligent converged gateway via RFID, WSNs, WLAN, and so on [19]. Through the intelligent convergence gateway, the network is connected to the network fusion system. Finally, the network approach, which includes radio and television network, Internet, and telecommunication network, is used to reach the terminal user application system. At the same time, the terminal user can influence the underlying network to different applications through subjective behavior, so as to realize material association information interaction between human and things, things to things, and things to human. The underlying network distribution including heterogeneous networks, such as WSNs, RFID system, and WLAN, allows the system to identify the properties of the objects and collects and captures the information, through the information interaction of heterogeneous network, which can realize the object's perception of the external physical environment. From the view of network function, the underlying network should have the dual functions of information acquisition and routing, while the underlying heterogeneous networks need to collaborate with each other to accomplish specific tasks.
Converged gateway access mainly completes the information collected from the underlying network smoothly access to the transmission network. The access technology includes the wired access methods and the wireless access methods. The intelligent convergence gateway usually has the powerful storage, processing, and the communication capabilities. The key is combined with the underlying network and smoothly access to the integrated network upward. The optimized network system includes the radio  Wireless Communications and Mobile Computing and television, Internet, and telecommunication network, which mainly completes the long-distance transmission of the information [20]. The terminal user application system mainly completes the information related service discovery and the application function.

Question-Making and Analysis
3.1. Propose the Problem of Optimizing Guide Path. With the development of urbanization and industrialization, the problem of urban traffic congestion is becoming more and more serious. The role of shared cars in relieving traffic congestion pressure is more and more obvious. But as the scope of the application of shared cars increases, how to guide it to find the optimal charging pile routing problem has plagued the managers of electric vehicle charging. With the development of the IOT, the traffic monitoring and control equipment in the city can do the illegal snapping, the flow control, and so on. The Traffic Management Center can use the sensor or monitor the video processing technology, so that the realtime monitoring of each vehicle. The path guidance becomes possible. The real-time traffic data of the city is updated rapidly, and in front of the dynamic traffic flow information, a higher requirement is put forward on how to find the optimal route of charging pile quickly.

Analysis of Path Influencing Factors.
The optimal path problem in real-time traffic is not equal to the shortest path research in theory. Combined with traffic laws and regulations, one-way road traffic, turn restrictions, and so on, we guide the optimal path of the electric vehicle to charge pile by taking the shortest driving distance of electric vehicle to the charging pile, the least driving time and the lowest power consumption and other optimization criteria as the goal. The related influence factors mainly come from several aspects.
(1) Real-time traffic conditions In real traffic, if multiple electric cars choose the same optimal path, exceeding the traffic capacity of the road, it will definitely result in the worst-case scenario. Therefore, when choosing the optimal path, according to the traffic flow on the channel, driving speed and other factors on the road congestion degree quantification, which can be expressed as unimpeded, general congestion, congestion, and serious congestion, the real-time traffic information collected through the vehicle traveling recorder, the intersection electronic surveillance, and so on can be used to analyze and quantify the traffic conditions.
(2) Intersection delay time In the theoretical research, the delay time between nodes are ignored when the optimization algorithm is used to study the optimal path, and the delay time of the subjective judgment section has no effect on the time optimization. In actual traffic, traffic signal (traffic light) is the most obvious time delay for intersection and has great influence on optimization time.
(3) The impact of road one-way street In the actual road, the traffic management department will set up a one-way street on some specific roads, while the traditional path optimization methods are both two-way alley at the default node. This optimization mode does not conform to the actual traffic path.
3.3. The Intelligent Transportation System Model of IOT. According to the system structure of the IOT and the functional requirements of the intelligent transportation system, the model of intelligent traffic system based on IOT is proposed. The intelligent traffic system is layered to realize the analysis and description of the function and properties of the model. In the perceptual layer, the application of intelligent traffic based on the IOT is built on vehicles, personnel, environment, and other related infrastructure. The information collection is completed by the beacon, the roadmap sensor, and other basic sensing tools. In the network layer, the intelligent traffic system based on IOT emphasizes the sharing and utilization of information, through satellite, computer network, wireless mobile communication, and other related technologies to complete the transmission of traffic information in the network layer. In addition, the storage and processing of information can be provided different information according to different service. The application layer, which can realize the service of adjusting signal lights according to traffic flow and providing traffic information in real time, and carry out different traffic management and control according to different service fields, feedbacks the realization in time and constantly expands more intelligent service functions.
In a word, the intelligent traffic system based on the IOT is a network system that realizes the collection, transmission, control, and application of traffic information. With the development of the technology of IOT, the service level of the intelligent transportation system will continue to expand and serve the traveler better.

Research Scheme of Optimal Path in Urban Network
The urban traffic route map is abstracted as a direction graph. The electric car parking point is compared to the starting point, and the destination is compared to the endpoint. According to the conditions such as path length, traffic signal, and two-way traffic and other conditions, the starting point, the end point, and the intersection are defined as the nodes in the traffic network, and the road between the two nodes is defined as the path between two points. Give weight to these information to determine the degree of traffic congestion, then we find the best path to guide the electric vehicle to the charging pile. The traditional optimal path selection can be divided into the following kinds of problems according to the node, the path characteristic, and the weight value assigned by the path, as shown in Figure 5. [21]. The Dijkstra algorithm is an algorithm that solves the weights of all paths in network graph greater than zero. At present, the research of this algorithm is more mature, and its biggest disadvantage is that it ignores the characteristic of the independent individuals in the network topology model, so that the algorithm runs for a long time. There is a certain effect on the selection of the optimal path of local small samples; however, its high time complexity has great limitation in the selection of the optimal path in a large scale.

The Dijkstra Algorithm
Basic implementation steps: The Dijkstra algorithm is an algorithm that solves the weights of all paths greater than zero in network graph and calculates the optimal path in the network which is the shortest path. Taking Figure 6 as an example, we briefly introduce the steps to solve the shortest path. Figure 7 is a tree structure of the network structure.
The implementation process of the algorithm is as shown in Table 1: 4.2. Heuristic AlgorithmΑ * . The shortest path problem has many meanings. In the heuristic algorithm, the optimal path selection refers to the function hðnÞ defined on the node of a search tree, which is used to evaluate the optimal selection of the path from this node to the target node. Heuristic is a searching algorithms with the most abundant resource data. Α * is a classical heuristic search algorithm, which can effectively find the optimal path in the static road network. The formula (1) is the basis for selecting the lowest cost node: where f ðnÞ is the objective function of the optimal path from the starting node to the current node, hðnÞ is the price within acceptable estimates, and gðnÞ represents the actual path of the initial node to node n.

The Floyd
Algorithm. The Floyd algorithm is an algorithm [22] to solve the shortest path between any two points, which can correctly deal with the shortest path problem of the directed graph or negative power (but not the negative power loop), and is also used to compute the transitive closure of the directed graph.     (1) Set V: store the optimal path node not found; set S: store the shortest path node found; i represents the node in the set V which is the shortest distance from the set S; d i represents the distance of the shortest path.

Wireless Communications and Mobile Computing
When calculating the shortest path of each vertex in graph G = ðV, EÞ by the Floyd algorithm, two matrices need to be introduced. The element a½i, j in matrix S represents the distance from vertex i (i − th vertex) to vertex j (j − th vertex). The element b½ij in the matrix p represents the vertices of the vertex i to the vertex j after the value recorded by b½i, j.
Assuming that the number of vertices in graph G is N, then the matrix D and the matrix p need to be updated N times. At first, the distance of vertex a in matrix D is the weight of vertex i to vertex j, and if i and j are not adjacent, then a½i , j = 0, the value of the matrix p is the value of j of vertex b½i , j. The next step is the N times update of the matrix D. In the first update, if the "the distance of a½i, j" is greater than "a½i, 0 + a½0, j, which represents the distance through the first vertex between i and j," update a½i, j to "a½i, 0 + a½0, j " and update b½i, j to b½i, 0. Similarly, when the k -th update, if "the distance of a½i, j" is greater than "a½i, k − 1 + a½k − 1, j," then update a½i, j to "a½i, k − 1 + a½k − 1, j" and update b½i, j to b½i, k − 1. Iterative operation N times and the program ends.
The Floyd algorithm is a kind of exhaustive algorithm. When calculating the shortest path between any two points, the Floyd algorithm needs to calculate the point with connectivity on the way. However, there are many nodes in the urban traffic road network, so the time complexity is high and it is not suitable for this algorithm.

Optimal Path Calculation Process.
When the electric vehicle charging administrator starts the car, the destination information is entered into the vehicle terminal device. The technology of IOT can perceive traffic congestion degree, traffic management information, and other real-time traffic information. The transmission layer transmission network is sent to the data processing center, and the received information is processed and analyzed through the network layer. The most reasonable selection scheme of charging pile and the optimal induction path are calculated, and then the real-time traffic information and system decision scheme are sent to the administrator through the transmission layer to achieve the goal of the optimal induction path. The overall traffic guidance process is shown in Figure 8.

The Calculation of the Optimal Path.
According to the purpose of the profit of the shared car managers and the storage of electric vehicles after using, the main content of this research is to use the particle swarm optimization algorithm to select the optimal path from the parking point to the charging pile for the shared car need to be charged.

The Basic
Idea of PSO Algorithm. The particle swarm algorithm was proposed by Eberhart, an expert in computational intelligence research in the United States, and Dr. Kennedy, a psychologist research specialist in 1995 [23][24][25]. The algorithm is a random search algorithm based on the regularity of bird activity and the swarm intelligence. In this algorithm, the bird is regarded as a particle and only retains the bird's flight function and the group behavior. Therefore, the particles in the algorithm are abstracted into the birds flying at a certain speed and dynamically adjusts according to the flight experience. The position of the particle can be used to represent the solution of the optimization problem, the direction and distance of particle movement can be controlled by velocity, and the pros and cons of each particle can be evaluated by a fitness function.
In solving the optimization problem, the particle swarm algorithm assumed that the size of the particle swarm is M and extends to the N-dimensional space, where the particle i is represented as a vector X i = ðx 1 , x 2 ,⋯,x N Þ in the Ndimensional space, and the flight velocity is V i = ðv 1 , v 2 ,⋯, v N Þ. Each particle has a fitness value determined by the objective function and knows the best position (pbest) and the present position of X i that it has found so far. This can be seen as the particle's own flight experience. In addition, each particle also knows the best location (gbest) of all particles found in this group so far (gbest is the optimal value in pbest). This can be seen as the experience of the peer group. Particles determine the next movement through their experience and the best experience of their peers. After finding (pbest, gbest) the two optimal values, the particle uses the following formula to update its speed and position.
Among them, ω is called the inertia weight, which is the ability to search for new search space of particles, t is the In each dimension, the particle has a maximum limiting speed V max , and if one dimension speed exceeds V max , the velocity of this dimension is limited to V max. The motion principle of the particles is shown in Figure 9.
Its algorithm flow is shown in Figure 10.

Optimal Path Selection Based on Ant Colony Algorithm.
The problem of optimal path selection is similar to the law of birds foraging. The shared car docking point is set as the starting point. The destination is that the charging pile is regarded as a food source for birds to find. The shared car need to pass through a section, node from the starting point to the location of the charging pile. In the path selection process, the shared car will choose the desired path according to its own judgment. The whole network is a directed graph, the vehicle is an artificial birds with intelligent behavior, and the artificial birds just find the path from the starting point to the point of termination and does not return to the original start point. Through the abstraction of the traffic process, the actual cost of traffic is taken as the heuristic information, so that an artificial bird swarm system with optimal path selection can be established.
In the actual traffic, we should not only consider the length of the path, but also take into account the real-time traffic, the delay time of intersection, and the influence of one-way street. Here we set up the comprehensive cost as the best reference standard. The formula is as follows:

Wireless Communications and Mobile Computing
Where λ represents the cost parameters of the road section and φ indicates the reliability coefficient of the road section.
Through experimental simulation, the data of path label R, marking of starting and ending points, length between starting and ending points (m) are arranged as shown in Table 2. The Dijkstra algorithm, heuristic algorithm A * , and particle swarm optimization method are used to calculate the optimal path, respectively, in which the cost parameter and the reliability coefficient among the section are calculated according to the actual situation. Assuming that there are 26 nodes in a city and numbered with the number of Arabia digital 1-26, and the distribution of nodes is shown in Figure 11; we should calculate the comprehensive cost of each path, respectively. Here, we use the Dijkstra algorithm, heuristic algorithm, and particle swarm algorithm to obtain the optimal path from node 7 (shared car initial point) to node 22 (shared car charging pile). Their shortest routes are 7⟶8⟶6⟶18⟶19⟶21→22, 7⟶8⟶6⟶18 ⟶19⟶21⟶22, and 7⟶6⟶18⟶19⟶21⟶22. The details are shown in dashed lines in Figure 12, Figure 13, and Figure 14. The remaining any two nodes can use the same method to solve the optimal path.
According to the data of Table 3, compared with the heuristic algorithm A * and the Dijkstra algorithm, the actual path cost of particle swarm optimization algorithm is the lowest, and there is no deviation from the theoretical path cost. However, the actual path cost of heuristic algorithm A * , and the Dijkstra algorithm is deviated from the theoretical value, indicating that these two algorithms are prone to fall into local optimization in the process of finding the optimal path. At the same time, because the network constructed by simulation is not large enough, it takes longer to adopt particle swarm optimization algorithm than heuristic algorithm A * and Dijkstra.
The principle of the Dijkstra algorithm is to traverse the whole network, which has obvious advantages when the network size is small. Particle swarm optimization is a heuristic algorithm with simple principle. Particles can conduct current search based on previous search information, which greatly reduces the possibility of blind search. Therefore, with the increase of network construction, the advantage of particle swarm optimization algorithm will become more obvious.
Particle swarm optimization is a bionic optimization algorithm based on multiple agents. Therefore, the application of particle swarm optimization algorithm to the optimal path selection process can fully reflect the advantages of the algorithm, and the algorithm itself has great development prospects and research value. By selecting different starting and ending points, this paper uses particle swarm optimization algorithm to find the shortest path and calculates credi-bility, cost coefficient, and comprehensive cost. The sorting results are shown in Table 2.

Data Availability
The data sets analyzed in this study can be obtained from the corresponding author upon reasonable request.

Conflicts of Interest
The authors declare that there are no conflicts of interest regarding the publication of this paper.