Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention utilizes the combination of ant colony algorithm and Geohash coding method, and designs an optimal path planning method for automatic driving (unmanned vehicles) with minimum transmission and calculation time cost and real-time congestion avoidance according to short-time vehicle information of edge service nodes, and meanwhile, the vehicles complete real-time obstacle avoidance function by means of the rapid calculation capability of the edge micro service nodes, and finally complete automatic driving vehicles to reach destinations through edge micro service cooperation with minimum time cost.
The technical aim of the invention is achieved by the following technical scheme:
in order to achieve the above object, the present invention provides a real-time path planning method based on edge micro-service collaboration, which includes:
s1, dividing edge micro-service nodes of a city area, and coding according to longitude and latitude addresses;
s2, judging the real-time path condition according to the pheromone recorded in the edge base station server, and making real-time path planning based on an improved ant colony algorithm, wherein the path planning refers to determining the direction of an area edge service node of the next hop;
s3, detecting a regional target when encountering an obstacle, and performing time analysis;
s4, finding the path direction of the edge micro server node which makes a decision most quickly through edge micro service time analysis feedback; and carrying out region continuing, returning to the first step of iterative computation, and finally reaching a destination to complete real-time path planning.
The invention further improves that: in the step S1, the edge micro-service nodes are subjected to region coding by using a Geohash coding method, candidate region edge micro-service nodes which are close to a vehicle are selected, longitude and latitude are used for coding, and the same edge micro-service is marked.
The invention further improves that: in step S2, the situation of the pheromone at the moment is analyzed through the vehicle information of the base station micro-service, and the vehicle running direction is obtained primarily according to the situation of the pheromone.
The invention further improves that: and when an obstacle is encountered during running in the step S3, detecting a target object through technologies such as opencv and yolo, uploading information such as an object image and a position to an edge micro server, processing the information by the edge micro server, and feeding back the size, the shape, whether the obstacle is coming or not and the obstacle avoiding direction to the vehicle.
The invention further improves that: and step S4, according to the edge micro-service feedback result calculated by the minimum cost, the direction of the edge micro-service node which firstly carries out feedback is the optimal path direction, and the optimal path with the strongest instantaneity and the minimum short-time vehicle congestion degree is obtained.
The beneficial technical effects of the invention are as follows: the method finds the optimal running path of the automatic driving vehicle by using the improved ant colony algorithm under the edge computing environment, so that the running time of the vehicle is reduced, occupied edge computing resources can be reduced to the minimum, the problem of low instantaneity and high transmission bandwidth consumption caused by the fact that information resources are transmitted to a remote cloud end at present is better solved by the edge micro-service processing method, and the path planning method under the edge computing environment is the minimum in cost.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict.
The method realizes automatic driving (unmanned vehicle driving) real-time path planning through micro-service cooperation on the edge nodes. Wherein the micro-service is deployed at the edge base station node for real-time searching and calculating the optimal path. The real-time path planning method based on edge micro-service collaboration comprises the following steps:
s1, dividing edge micro-service nodes of a city area, and coding according to longitude and latitude addresses;
s2, judging the real-time path condition according to the pheromone recorded in the edge base station server, and making real-time path planning based on an improved ant colony algorithm, wherein the path planning refers to determining the direction of an area edge service node of the next hop;
s3, detecting a regional target when encountering an obstacle, and performing time analysis;
s4, finding the path direction of the edge micro server node which makes a decision most quickly through edge micro service time analysis feedback; and carrying out region continuing, returning to the first step of iterative computation, and finally reaching a destination to complete real-time path planning.
Specifically, as shown in fig. 1, in step S1, the edge micro-service nodes are area-coded by using a Geohash coding method, candidate area edge micro-service nodes close to the vehicle are selected, longitude and latitude are used for coding, and the same edge micro-service is marked.
Specifically, as shown in fig. 2, 3 and 4, in step S2, the situation of the pheromone at this time is analyzed by the vehicle information of the base station micro service, and the direction of the vehicle is initially obtained according to the situation of the pheromone.
Specifically, as shown in fig. 5, when an obstacle is encountered during the driving in step S3, the target object is detected by using technologies such as opencv and yolo, information such as an object image and a position is uploaded to the edge micro server, the edge micro server performs information processing, and the size, the shape, whether the obstacle is coming or not, and the obstacle avoidance direction are fed back to the vehicle.
Specifically, as shown in fig. 6, in step S4, according to the edge micro-service feedback result calculated according to the minimum cost, the direction of the edge micro-service node that first makes feedback is the optimal path direction, that is, the optimal path with the strongest real-time performance and the minimum short-time vehicle congestion degree is obtained.
In order to enable the automatic driving vehicle path planning method to have diversity and real-time performance, an edge micro-service cooperation method is used. The technical scheme adopts an ant colony improvement algorithm and a Geohash method, and performs real-time adjustment and data information processing in the vehicle running process. The automatic driving vehicle performs path planning and selection in real time in the moving process, so that the path decision is quicker and more accurate. The Geohash algorithm converts a geoposition code into a short string of letters and numbers. The algorithm principle is to perform halving coding on longitude and latitude respectively, perform continuous coding according to the region to which the longitude and latitude belong, mix two groups of codes to perform Base32 coding, and finally generate the needed Geohash coding. The specific flow is as follows: (1) And respectively encoding the longitude and the latitude to obtain a digital string (2), and recombining longitude codes placed in even number bits and latitude codes placed in odd number bits from the 0 th bit to obtain a new digital string. (3) The regions are encoded in the form of letters plus numbers. When in coding, a symbol (such as an ordinate A, B, C, D, an abscissa 1, 2, 3 and 4) is added in front of the edge node of the same area, and firstly, a path of the edge micro-service cooperation direction with high pheromone is found in the edge node of the same area, because the edge node is not needed to be crossed, a certain delay of the edge node is reduced; if the pheromone of the edge nodes of the same area is low, the edge micro-service node with the nearest distance and high pheromone is found in the cross-coding area. The invention mainly considers the situation that the decision of the vehicle running path in the same area is optimal, when the vehicle needs to run across areas, the path connection is carried out between different areas, and the algorithm is used for carrying out the loop iteration calculation until the vehicle reaches the destination. The following formula (1) is a calculation formula of the ant colony improvement algorithm, in which heuristic information calculation of time cost is added.
Wherein:
τxy (t+1)=(1-p)*τxy (t)+Δτxy (t);
wherein τx,y (t) is the pheromone concentration of the en-route (x, y) node, x is the current edge microservice, y is the next edge microservice, ηxy Heuristic information, which is time, is the inverse of the minimum time. a, beta are respectively τx,y (t),ηxy Weight parameters of (c). A new selection update is then made and the process is repeated until the endpoint. p is the number of pheromone volatilizes.The pheromone increment at the (x, y) node for the kth ant. Q represents the absolute quantity of information released by ants at one time, Lk The total path length of one turn for the kth ant. Δτx,y And (t) represents the pheromone amount of m ants at the node (x, y).
For edge micro-server collaboration transfer time, where w is the micro-server's task, bn Is the bandwidth of the nth micro server. />The method is used for uplink and downlink transmission time of the vehicle and the edge micro-service, wherein S is transmission power of the vehicle, W is channel bandwidth, N is noise power, and T is a task of whole information transmission. />Calculating time for the task of the edge base station micro service node x, wherein R represents the task quantity of the server node, and V is the task processing rate. And taking the maximum value of the earliest completion time of each resource as the time of the current scheduling as the minimum-cost edge computing micro-service cooperation method.
The ant colony algorithm adopted by the invention is to abstract the problem through ants in nature, and the micro-service deployed on the edge node is regarded as an ant colony consisting of ant individuals. The vehicle data information stored on each edge micro server is a pheromone. The vehicle runs in the direction of the edge micro-service with high nearest coded pheromone so as to avoid congestion and obstacle avoidance in real time. The optimal path has the least starting nodes, so that the characteristics of real-time quick response, less resource occupation, less energy consumption, good user experience and the like of the edge micro-service nodes are achieved. The information processed before is processed in a centralized way in a remote cloud, so that the application requirement of the smart city with strong real-time performance at present is difficult to meet, the information uploaded by the vehicle is processed by adopting the edge base station micro-service, feedback is timely made, the time cost is minimum, and therefore, the real-time performance of the path planning of the automatic driving vehicle is high, and meanwhile, the path decision is optimal. Most of the existing research on micro-service dispatch collaboration only involves a relatively fixed wireless network and service requests sent to the remote central cloud, rarely considering dynamically changing availability resources and service requests to edge computing nodes due to vehicle movement. However, the method selects candidate micro-service nodes in a vehicle moving area, then makes a decision while driving, dynamically plans an optimal path with minimum congestion, can perform obstacle avoidance reaction in real time if an emergency such as an obstacle is met, and performs iterative computation through micro-service loops in different areas until the vehicle reaches a final destination.
The method finds the optimal running path of the automatic driving vehicle by using the improved ant colony algorithm under the edge computing environment, so that the running time of the vehicle is reduced, occupied edge computing resources can be reduced to the minimum, the problem of low instantaneity and high transmission bandwidth consumption caused by the fact that information resources are transmitted to a remote cloud end at present is better solved by the edge micro-service processing method, and the path planning method under the edge computing environment is the minimum in cost.
The above embodiments are merely illustrative of the principles of the present invention and its effectiveness, and are not intended to limit the invention. Modifications and variations may be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the invention. Accordingly, it is intended that all equivalent modifications and variations of the invention be covered by the claims, which are within the ordinary skill of the art, be within the spirit and scope of the present disclosure.