Parking lot recommendation method based on improved ant colony algorithm

By improving the path planning method of the ant colony algorithm, combining roulette wheel and random walk strategies, eliminating pheromone evaporation, and optimizing the pheromone matrix, the problem of insufficient consideration of multi-dimensional factors in parking lot recommendation by the ant colony algorithm is solved, and more efficient and accurate parking lot path recommendation is achieved.

CN121998216APending Publication Date: 2026-05-08WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI UNIV
Filing Date
2026-02-03
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing ant colony algorithms for parking lot recommendations suffer from problems such as limited heuristic information, susceptibility to local optima, and insufficient exploration capabilities. They cannot efficiently and comprehensively consider multi-dimensional parking factors, resulting in recommendations with limited practicality.

Method used

The improved ant colony algorithm optimizes the path planning process by setting the number of ants, the pheromone matrix, and the weights of the heuristic function, adopting a roulette wheel strategy and a random walk strategy, eliminating the pheromone evaporation mechanism, and combining a multi-factor heuristic function to update the pheromone matrix to output the globally optimal path.

Benefits of technology

The algorithm's robustness and convergence speed are improved, local optima are avoided, the accuracy and efficiency of path planning are enhanced, it adapts to complex traffic scenarios, the number of iterations is reduced, and the practicality of parking lot recommendations is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998216A_ABST
    Figure CN121998216A_ABST
Patent Text Reader

Abstract

The invention discloses a parking lot recommendation method based on an improved ant colony algorithm, and the method comprises the steps: S1, setting the number of ants and a pheromone matrix, and determining a weight parameter of a heuristic function; s2, in the current iteration, each ant starts from a starting point, a next node is selected by adopting a roulette strategy according to the pheromone concentration between the nodes and a heuristic function value until the next node reaches an end point, a complete path is formed, and in the path construction process, part of ants execute a random walking strategy to perform global exploration; s3, after all the ants complete path construction, a pheromone matrix is updated uniformly according to the path advantages and disadvantages of all the ants, and the updating process does not include a pheromone volatilization step; and S4, the steps S2 to S3 are executed repeatedly until the iteration termination condition is met, the global optimal path in all iterations is output as a recommendation result, and the recommendation result at least comprises the target parking lot, the distance and the passing time information. The method is suitable for parking lot recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of heuristic algorithms and path planning technology, and in particular to a parking lot recommendation method based on an improved ant colony algorithm. Background Technology

[0002] With the continuous growth of urban vehicle ownership, "parking difficulties" have become a common problem plaguing drivers. To improve parking efficiency, intelligent parking recommendation systems based on real-time information have emerged. The core of this type of system lies in its ability to dynamically plan driving routes to the optimal available parking lots for users.

[0003] Path planning is a classic combinatorial optimization problem. Ant colony optimization (ACO), a heuristic optimization algorithm that simulates the foraging behavior of ants in nature, is widely used in path planning due to its positive feedback, distributed computing, and heuristic search characteristics. Applying ACO to parking lot recommendation involves abstracting the urban road network as a graph structure and searching for the optimal path by simulating the movement of "ants" between urban nodes.

[0004] However, when traditional ant colony algorithms are directly applied to parking lot recommendation scenarios, the following obvious limitations still exist: Traditional algorithms often rely solely on path distance as the primary or sole heuristic. However, in real-world parking decisions, drivers must consider multiple factors, including travel distance, estimated travel time, and parking availability at the destination. A single distance metric cannot accurately reflect the comprehensive costs of real-world parking scenarios, resulting in recommendations with limited practicality.

[0005] The algorithm is prone to getting stuck in local optima while simultaneously hindering convergence speed. While the pheromone evaporation mechanism helps in exploring new paths, it also slows down convergence and increases computational cost in complex road networks. Increasing the pheromone influence weight to accelerate convergence can also cause the algorithm to get stuck in local optima prematurely, potentially missing globally better parking lots.

[0006] Insufficient exploration capability: The path selection strategy of traditional ant colony algorithm has limited global exploration capability when dealing with complex local congestion or instantaneous changes in parking spaces in urban road networks, and the robustness of the algorithm needs to be improved.

[0007] Therefore, there is a lack of parking route recommendation methods in the existing technology that can efficiently and comprehensively consider multi-dimensional parking factors and achieve a good balance between fast convergence and avoiding local optima. Summary of the Invention

[0008] To address the technical problems existing in the prior art, this invention proposes a parking lot recommendation method based on an improved ant colony algorithm to achieve better path planning results.

[0009] On the one hand, to achieve the above objectives, this invention provides a parking lot recommendation method based on an improved ant colony algorithm, comprising: S1. Set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; S2. In the current iteration, each ant starts from the starting point and selects the next node using a roulette wheel strategy based on the pheromone concentration between nodes and the heuristic function value, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. S3. After all ants have completed their path construction, the pheromone matrix is ​​updated uniformly based on the merits of each ant's path, and the update process does not include the pheromone evaporation step. S4. Repeat steps S2 to S3 until the iteration termination condition is met. Output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.

[0010] Preferably, the heuristic function is: ; In the formula, For heuristic functions, , , All are weighting coefficients. for i Node to j Distance between nodes for i Node to j The time of the node For nodes To the node The number of traffic lights.

[0011] Preferably, the weighting parameter is determined based on the recommendation mode selected by the user, wherein the recommendation mode includes distance priority mode, travel time priority mode, and comprehensive balance mode.

[0012] Preferably, the random walk strategy is: ; In the formula, X(t) is the set of steps taken by the ants during random walks, and cumssum is the cumulative sum. t The number of steps in the random walk. r This represents a random function.

[0013] Preferably, in the roulette strategy, the node is selected. i The probability of being the next node is calculated as follows: ; In the formula, Selecting a node i The probability, It is a node i fitness value, N It represents the total number of nodes.

[0014] Preferably, the pheromone matrix is ​​updated as follows: ; In the formula, It is the current moment. t node i To the node j pheromone concentration, Indicates the first Just an ant. It is the first k Only one ant on the path node i To the node j pheromone increment, m It's the number of ants. for Time Node i To the node j The concentration of pheromones.

[0015] Preferably, the method is applied to a simulated traffic network, wherein the node attributes in the traffic network include distance, travel time, number of traffic lights and parking space availability, and the node data is randomly generated through a normal distribution to construct a simulation test environment.

[0016] On the other hand, to achieve the above objectives, the present invention also provides a parking lot recommendation system based on an improved ant colony algorithm, comprising: Parameter initialization module: used to set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; The path iteration optimization module is used in the current iteration. Each ant starts from the starting point and selects the next node based on the pheromone concentration between nodes and the heuristic function value, using a roulette wheel strategy, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. After all ants have completed the path construction, the pheromone matrix is ​​updated uniformly according to the path quality of each ant, and the update process does not include the pheromone evaporation step. The result output module is used to output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.

[0017] Compared with the prior art, the present invention has the following advantages and technical effects: (1) By eliminating the pheromone evaporation mechanism and optimizing the heuristic function, the number of iterations required for the algorithm to converge is greatly reduced; and by reconstructing the multi-factor heuristic function, better path planning results are achieved. (2) This invention effectively avoids getting trapped in local optima and enhances the robustness of the algorithm. By introducing a random walk strategy and a roulette wheel selection strategy, the algorithm achieves a better balance between global exploration and local development. Attached Figure Description

[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings: Figure 1 This is a comparison chart of the algorithm path length attributes in embodiments of the present invention; Figure 2 This is a comparison chart showing the time required for the algorithm path in this embodiment of the invention; Figure 3 This is a data visualization diagram of an embodiment of the present invention; Figure 4 This is a flowchart of a parking lot recommendation method based on an improved ant colony algorithm according to an embodiment of the present invention. Detailed Implementation

[0019] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0020] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0021] This embodiment proposes a parking lot recommendation method based on an improved ant colony algorithm, such as... Figure 4 ,include: S1. Set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; S2. In the current iteration, each ant starts from the starting point and selects the next node using a roulette wheel strategy based on the pheromone concentration between nodes and the heuristic function value, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. S3. After all ants have completed their path construction, the pheromone matrix is ​​updated uniformly based on the merits of each ant's path, and the update process does not include the pheromone evaporation step. S4. Repeat steps S2 to S3 until the iteration termination condition is met. Output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.

[0022] Specifically, the entire method includes the following steps: 1. Initialization: Set the number of ants, pheromone matrix and parameters.

[0023] 2. Iterative path construction: Each ant selects a node based on pheromone concentration and a heuristic function.

[0024] 3. Path update: Apply the roulette wheel strategy to select the next node, and randomly walk the ants to explore the entire path.

[0025] 4. Pheromone update: After each iteration, the pheromone matrix is ​​updated uniformly (to avoid single-step interference).

[0026] 5. Output recommendation: Recommend parking lots based on the globally optimal path, including information on distance, time, and number of traffic lights.

[0027] Furthermore, the heuristic function is: ; In the formula, For heuristic functions, , , All are weighting coefficients. for i Node to j Distance between nodes for i Node to j The time of the node For nodes To the node The number of traffic lights.

[0028] In theory, this significantly improves the robustness of the algorithm compared to the traditional ant colony algorithm, and is also more suitable for today's parking recommendation systems.

[0029] Furthermore, the weight parameters are determined based on the recommendation mode selected by the user, wherein the recommendation mode includes distance priority mode, travel time priority mode, and comprehensive balance mode.

[0030] Furthermore, in the ant colony algorithm, the evaporation rate refers to the rate at which pheromones evaporate in each iteration. The evaporation rate determines the persistence of the pheromone along the path; a higher evaporation rate leads to faster pheromone evaporation, while a lower evaporation rate results in a longer pheromone duration. However, in practical applications, the effect of evaporation rate is not ideal, and can even be a negative optimization to some extent. Removing evaporation rate improves stability.

[0031] Volatility determines the persistence of pheromones along a path. Eliminating volatility makes the pheromone distribution more stable, reducing algorithm volatility and improving its stability and reliability. Secondly, global search efficiency is improved. High volatility can cause pheromones to disappear quickly; removing volatility extends the time pheromones stay on the path, making it easier for ants to find and explore the global optimum, thus improving the algorithm's search efficiency.

[0032] Furthermore, eliminating volatility can accelerate the convergence speed of the algorithm. Moderately reducing volatility allows pheromones to gradually accumulate along the path, enhancing the path's attractiveness and thus accelerating convergence, leading to a more satisfactory solution faster. Finally, eliminating volatility better satisfies problem constraints. In some problems, path persistence is crucial for meeting constraints; eliminating volatility helps pheromones continuously accumulate along the path, helping ants better meet these constraints and improving the algorithm's practicality and applicability. Therefore, eliminating volatility is significant for improving the performance and practicality of the ant colony algorithm.

[0033] Furthermore, the random walk strategy is as follows: ; In the formula, X(t) is the set of steps taken by the ants during random walks, and cumssum is the cumulative sum. t The number of steps in the random walk. r This represents a random function.

[0034] A random walk strategy involves allowing several ants to move randomly in space, with each step's direction and distance being random. In optimization algorithms, its main purpose is to help the algorithm escape local optima, thus enabling it to better explore the entire solution space.

[0035] Furthermore, in the roulette strategy, the selection of nodes... i The probability of being the next node is calculated as follows: ; In the formula, Selecting a node i The probability, It is a node i fitness value,N It represents the total number of nodes.

[0036] The roulette wheel strategy, as the name suggests, simulates the action of roulette wheels to select a non-random path for the ants. By adding random walks and the roulette wheel strategy, the chances of getting stuck in local optima are greatly reduced, resulting in a significant improvement in the performance of the ant colony algorithm.

[0037] The formula above determines the probability of each path being selected based on the proportion of fitness values. Paths with higher fitness values ​​have a higher probability of being selected, while paths with lower fitness values ​​have a lower probability of being selected. In this way, paths with higher fitness values ​​are more likely to be selected in the population, thereby increasing their chances of being inherited in the next iteration and promoting the spread of excellent paths.

[0038] The key to the roulette wheel selection algorithm is to use the ratio of fitness values ​​to determine the selection probability, thereby achieving random selection of individuals, while ensuring that individuals with higher fitness have a greater selection probability, thus maintaining the diversity of the population and the directionality of evolution.

[0039] Furthermore, the pheromone matrix is ​​updated as follows: ; In the formula, It is the current moment. t node i To the node j pheromone concentration, Indicates the first Just an ant. It is the first k Only one ant on the path node i To the node j pheromone increment, m It's the number of ants. for Time Node i To the node j The concentration of pheromones.

[0040] This embodiment also provides a parking recommendation system based on an improved ant colony algorithm, including: Parameter initialization module: used to set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; The path iteration optimization module is used in the current iteration. Each ant starts from the starting point and selects the next node based on the pheromone concentration between nodes and the heuristic function value, using a roulette wheel strategy, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. After all ants have completed the path construction, the pheromone matrix is ​​updated uniformly according to the path quality of each ant, and the update process does not include the pheromone evaporation step. The result output module is used to output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.

[0041] To more clearly illustrate the technical solution of the present invention, specific embodiments are provided below for description: Step 1: Initialize parameters: Number of ants: Set the number of ants, which is usually determined based on the problem size and computing resources. For example, for small to medium-sized problems, the number of ants can be set to 50-100.

[0042] Pheromones parameter: Initialize the pheromone matrix. Set the initial pheromone value for all paths to a small positive number, indicating that each path has the same probability of being selected initially.

[0043] Heuristic function parameters: Based on the user-selected pattern (such as shortest path first, shortest time first, etc.), set the weight parameters in the heuristic function. w 1, w 2, w 3.

[0044] For example, in the shortest path priority mode, you can set... w 1 = 0.5 w 2 = 0.3, w 3=0.2; In the shortest time priority mode, it can be set to 0.2. w 1 = 0.3, w 2 = 0.5 w 3 = 0.2.

[0045] Other parameters: Set other parameters of the algorithm, such as the maximum number of iterations (e.g., 100 times) and pheromone volatility (volatility is excluded in this optimization strategy).

[0046] Step 2, Iterative Process: Initialize the path: Each ant starts from the starting point and begins to build the path.

[0047] Path selection: Each ant selects the next node based on the pheromone concentration of the current node and heuristic information.

[0048] The specific selection method is as follows: 1. Calculate the weighted sum of pheromone concentration and heuristic information for each optional node.

[0049] 2. Use the roulette wheel method to select the next node, that is, randomly select a node according to the probability distribution of the weighted sum.

[0050] Path construction: Repeat the path selection steps until each ant has constructed a complete path (from the starting point to the ending point).

[0051] Step 3, Pheromones Update: Path evaluation: Calculate the length and time of the path constructed by each ant, and evaluate the quality of the path.

[0052] Pheromone Update: Update the pheromone matrix based on the path evaluation results.

[0053] The specific update method is as follows: 1. For each path, calculate the pheromone increment based on the path length and time.

[0054] 2. Add the pheromone increment to the pheromone concentration between each node on the path.

[0055] 3. The pheromone update formula is: ; in, It is the current t Time Node i To the node j pheromone concentration, It is the first k Only one ant on the path node i To the node j pheromone increment, m It refers to the number of ants.

[0056] Step 4: Results Return and Recommendation Results returned: After each iteration, the current optimal path and its corresponding parking lot are recorded.

[0057] Recommended parking: Based on the globally optimal path, recommend the corresponding parking lot.

[0058] The recommended results include information such as the location, distance, time, and number of traffic lights of the parking lot.

[0059] Step 5, Iteration Termination Condition: Number of iterations: The algorithm terminates when the number of iterations reaches the preset maximum number of iterations.

[0060] Convergence condition: The algorithm terminates prematurely when the optimal path no longer improves significantly in a number of consecutive iterations.

[0061] Step 6: Start over: Restart: If the iteration termination condition is not met, the algorithm restarts from Step 2 and continues iterating until the termination condition is met.

[0062] After Step 6, the process restarts from Step 2, and a global variable is used to determine the optimal parking lot recommendation. It's also worth noting that the pheromone concentration is updated only after each iteration, rather than updating it as each ant completes its task.

[0063] This embodiment uses a simulated traffic road condition for path planning in the ant colony algorithm. The traffic conditions are simulated, such as the time required for the user to reach the destination, the total distance of the path, and the traffic congestion (quantified here by the number of traffic lights).

[0064] Each intersection was simulated as a node, with 10,000 nodes randomly created and distributed across a 3000×3000 canvas. The attributes of each node (such as the number of remaining parking spaces and the required time) were also simulated using normally distributed random numbers. The green areas represent the origin and destination, as shown below. Figure 3 .

[0065] The experimental data, validated by experiments, specifically quantifies the improvement effect: Convergence speed: The improved algorithm requires only 40 iterations (the traditional algorithm requires 70 iterations), improving efficiency by 43%.

[0066] Route optimization: average route length reduced by 18%, travel time shortened by 22%.

[0067] Anti-local optimum: The probability of local optima is reduced by 40%.

[0068] Robustness: Adaptable to complex scenarios such as peak hours and parking shortages.

[0069] The following section will demonstrate a comparison between the optimized ant colony algorithm and the traditional ant colony algorithm, primarily focusing on the comparison of path length and the time it takes for the user to reach their destination. Figure 1 , Figure 2This is also the attribute that navigation users care about most. The corresponding α and β values ​​were also updated. Since it's applied to a navigation scenario, it's desirable to have a larger heuristic factor to better explore new routes. The traditional 0.3 was found to often lead to getting stuck in local optima during testing. Therefore, 0.3 was adjusted to 0.4. The corresponding β was also lowered, meaning the probability of the ant colony taking paths with high pheromone concentrations is reduced. Conversely, this means greater randomness. Adding random walks and roulette wheel strategies greatly reduces the possibility of entering local optima. The weights remained unchanged during testing, without any particular emphasis, thus ensuring greater fairness and reliability. Compared to the traditional ant colony algorithm, the optimized ant colony algorithm is not only faster in convergence but also more accurate, and the roulette wheel strategy and random walk method are also incorporated into the new improved algorithm. There has been a comprehensive improvement from parameter size to the overall model.

[0070] pass Figure 1 , Figure 2 Clearly, the improved ant colony algorithm far surpasses the traditional one in convergence speed, requiring only about 40 iterations to find a solution in a dataset of 10,000 data points, while the traditional ant colony algorithm requires approximately 70 iterations. Figure 2 You might wonder why the traditional ant colony algorithm outperforms the improved one initially. This is due to the roulette wheel strategy and random walks, which may lead it to choose a longer path instead of the shorter one. This step is actually the core of the improved algorithm, helping to avoid getting trapped in local optima. Compared to the traditional ant colony algorithm, the improved version achieves approximately 40% better performance. It boasts faster convergence and a faster runtime.

[0071] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A parking lot recommendation method based on an improved ant colony algorithm, characterized in that, include: S1. Set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; S2. In the current iteration, each ant starts from the starting point and selects the next node using a roulette wheel strategy based on the pheromone concentration between nodes and the heuristic function value, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. S3. After all ants have completed their path construction, the pheromone matrix is ​​updated uniformly based on the merits of each ant's path, and the update process does not include the pheromone evaporation step. S4. Repeat steps S2 to S3 until the iteration termination condition is met. Output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.

2. The parking lot recommendation method based on the improved ant colony algorithm according to claim 1, characterized in that, The heuristic function is: ; In the formula, For heuristic functions, , , All are weighting coefficients. for i Node to j Distance between nodes for i Node to j The time of the node For nodes To the node The number of traffic lights.

3. The parking lot recommendation method based on the improved ant colony algorithm according to claim 2, characterized in that, The weight parameters are determined based on the recommendation mode selected by the user, wherein the recommendation mode includes distance priority mode, travel time priority mode and comprehensive balance mode.

4. The parking lot recommendation method based on the improved ant colony algorithm according to claim 1, characterized in that, The random walk strategy is as follows: ; In the formula, X(t) is the set of steps taken by the ants during random walks, and cumssum is the cumulative sum. t The number of steps in the random walk. r This represents a random function.

5. The parking lot recommendation method based on the improved ant colony algorithm according to claim 1, characterized in that, In the roulette strategy, the node is selected. i The probability of being the next node is calculated as follows: ; In the formula, Selecting a node i The probability, It is a node i fitness value, N It represents the total number of nodes.

6. The parking lot recommendation method based on the improved ant colony algorithm according to claim 1, characterized in that, The pheromone matrix is ​​updated as follows: ; In the formula, It is the current moment. t node i To the node j pheromone concentration, Indicates the first Just an ant. It is the first k Only one ant on the path node i To the node j pheromone increment, m It's the number of ants. for Time Node i To the node j The concentration of pheromones.

7. The parking lot recommendation method based on the improved ant colony algorithm according to claim 1, characterized in that, The method is applied to simulate a traffic network, in which the node attributes include distance, travel time, number of traffic lights, and parking space availability. The node data is randomly generated through a normal distribution to construct the simulation test environment.

8. A parking recommendation system based on an improved ant colony algorithm, applied to the parking recommendation method based on an improved ant colony algorithm as described in any one of claims 1-7, characterized in that, include: Parameter initialization module: used to set the number of ants, the pheromone matrix, and determine the weight parameters of the heuristic function; The path iteration optimization module is used in the current iteration. Each ant starts from the starting point and selects the next node based on the pheromone concentration between nodes and the heuristic function value, using a roulette wheel strategy, until it reaches the destination and forms a complete path. During the path construction process, some ants execute a random walking strategy to explore the world. After all ants have completed the path construction, the pheromone matrix is ​​updated uniformly according to the path quality of each ant, and the update process does not include the pheromone evaporation step. The result output module is used to output the globally optimal path in all iterations as the recommendation result, wherein the recommendation result includes at least the target parking lot, distance and travel time information.