Parking space guiding method, apparatus, device, and storage medium
By dynamically determining parking lot paths through real-time image recognition and the A-Star pathfinding algorithm, the problem of parking lot congestion caused by dynamic obstacles is solved, achieving more efficient parking lot management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- FOSHAN POLYTECHNIC
- Filing Date
- 2023-02-16
- Publication Date
- 2026-05-29
AI Technical Summary
Existing parking guidance systems are unable to effectively determine the path when faced with dynamic obstacles, leading to severe congestion in parking lots and affecting parking efficiency.
By acquiring parking lot images in real time, the system uses a parking vacancy detection model to identify the coordinates of vacant aisles and parking spaces. Combined with the A* pathfinding algorithm, the system dynamically determines the path and selects the Euclidean distance or the shortest path to calculate the guide route to the target parking space, avoiding blocked routes as obstacles.
It improved parking efficiency, reduced further congestion caused by dynamic obstacles, and optimized parking lot management.
Smart Images

Figure CN116740977B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parking management, and more particularly to a parking space guidance method, device, equipment, and storage medium. Background Technology
[0002] To improve parking efficiency, various parking guidance systems exist, primarily combining wireless sensor network technology and shortest path algorithms. The most typical approach involves sensors identifying available parking spaces. The system then uses the vehicle's position upon entering the parking lot as the starting node, expanding to all available spaces until all nodes are reached. The shortest path is then calculated to obtain the target node and its shortest route, thus completing parking guidance. While this method works well under static traffic conditions, it has limitations when encountering temporary obstacles along the route from the starting node to the target node. These limitations include congestion during peak hours due to heavy traffic entering or exiting parking lanes, or temporary obstacles installed for underground parking lot construction. In such cases, the method cannot detect dynamic obstacles along the path. Summary of the Invention
[0003] This invention provides a parking guidance method, device, equipment, and storage medium for dynamically identifying driving routes, selecting different methods to calculate target guidance routes based on the conditions of parking lot aisles, reducing the possibility of routes causing further severe congestion, and improving parking efficiency.
[0004] The first aspect of this invention provides a parking space guidance method, which includes: acquiring a real-time parking lot image when a vehicle enters the parking lot entrance; inputting the acquired real-time parking lot image into a parking vacancy status detection model, and outputting the coordinates of vacant aisles and vacant parking spaces in the parking lot; analyzing the vacant aisle situation in the parking lot; if all aisles in the parking lot are vacant, calculating the Euclidean distance from the parking lot entrance to each vacant parking space, and taking the vacant parking space with the shortest Euclidean distance as the target parking space, and using the A* pathfinding algorithm to calculate the guidance route from the parking lot entrance to the target parking space, thus obtaining the target guidance route; if some aisles in the parking lot are blocked, using the A* pathfinding algorithm to calculate the shortest path from the parking lot entrance to each vacant parking space, and taking the shortest path with the smallest value as the target guidance route.
[0005] Optionally, in a first implementation of the first aspect of the present invention, the method for constructing the parking vacancy state detection model includes: acquiring images of the parking lot at different times to obtain multiple acquired images; preprocessing the multiple acquired images to obtain multiple sample images; labeling the vacant aisles and vacant parking spaces in the multiple sample images to obtain a training set; and inputting the training set into the CSPDarknet network for training using the YOLO method to obtain the parking vacancy state detection model.
[0006] Optionally, in a second implementation of the first aspect of the present invention, the preprocessing of the multiple acquired images includes brightening the darker images among the multiple acquired images.
[0007] Optionally, in a third implementation of the first aspect of the present invention, the step of labeling the vacant aisles and vacant parking spaces in multiple sample images includes: calling the labelimg tool to label the vacant aisles and vacant parking spaces in multiple sample images.
[0008] Optionally, in the fourth implementation of the first aspect of the present invention, the analysis of the vacant passageways of the parking lot includes: acquiring an original image of the parking lot, in which there are no blocked passageways; inputting the original image of the parking lot into a parking vacancy detection model to obtain the coordinates of the passageways and parking spaces; comparing the coordinates of the vacant passageways with the coordinates of the parking lot's passageways; if the coordinates of the vacant passageways are consistent with the coordinates of the parking lot's passageways, it indicates that all the passageways of the parking lot are vacant; if the coordinates of the vacant passageways are inconsistent with the coordinates of the parking lot's passageways, it indicates that some of the passageways of the parking lot are blocked.
[0009] Optionally, in a fifth implementation of the first aspect of the present invention, the target guidance route is obtained through an evaluation function, which is expressed as:
[0010] f(n) = g(n) + h(n)
[0011] h(n) = x1 - x2 + y1 - y2
[0012] In the formula, f(n) represents the evaluation function of the target guidance route, g(n) represents the actual cost from the initial node to node n in the state space, h(n) is the heuristic function, and h(n) represents the estimated cost of the optimal path from node n to the target coordinates.
[0013] Optionally, in a sixth implementation of the first aspect of the present invention, h(n) is calculated using Manhattan distance, and the relational expression for h(n) is:
[0014] h(n) = x1 - x2 + y1 - y2
[0015] In the formula, x1 and y1 represent the starting coordinates (x1, y1), and x2 and y2 represent the target parking space coordinates (x2, y2).
[0016] A second aspect of the present invention provides a parking guidance device, including an image acquisition module for acquiring real-time parking lot images when a vehicle enters the parking lot entrance;
[0017] The system comprises the following modules: a detection module, which inputs real-time parking lot images into a parking vacancy detection model and outputs the coordinates of vacant aisles and vacant parking spaces; an analysis module, which analyzes the vacancy status of parking lot aisles; a first calculation module, which, after determining that all aisles are vacant, calculates the Euclidean distance from the parking lot entrance to each vacant parking space, selects the vacant parking space with the shortest Euclidean distance as the target parking space, and uses the A* pathfinding algorithm to calculate the guiding route from the parking lot entrance to the target parking space; and a second calculation module, which, after determining that some aisles are congested, uses the A* pathfinding algorithm to calculate the shortest path from the parking lot entrance to each vacant parking space, and selects the shortest path with the smallest value as the target guiding route.
[0018] A third aspect of the present invention provides a parking guidance device, comprising: a memory and at least one processor, wherein the memory stores computer-readable instructions, and the memory and the at least one processor are interconnected via a circuit; the at least one processor invokes the computer-readable instructions in the memory to cause the parking guidance device to perform the various steps of the parking guidance method described above.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium storing computer-readable instructions that, when executed on a computer, cause the computer to perform the steps of the parking guidance method described above.
[0020] The technical solution provided by this invention dynamically identifies driving routes and selects different methods to calculate target guidance routes based on the conditions of the parking lot aisles. If all parking lot aisles are vacant, the Euclidean distance from the parking lot entrance to each vacant parking space is calculated, and the vacant parking space with the shortest Euclidean distance is selected as the target parking space. The A* pathfinding algorithm is then used to calculate the guidance route from the parking lot entrance to the target parking space, thus obtaining the target guidance route. If some parking lot aisles are blocked, the blocked driving routes are also considered as obstacles, and the A* pathfinding algorithm is used to calculate the shortest path from the parking lot entrance to each vacant parking space. The shortest path with the smallest value is selected as the target guidance route, reducing the possibility of the route causing further severe congestion and thereby improving parking efficiency. Attached Figure Description
[0021] Figure 1 This is a first flowchart of a parking guidance method provided in an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of the parking guidance device provided in an embodiment of the present invention;
[0023] Figure 3This is a schematic diagram of the parking guidance device provided in an embodiment of the present invention;
[0024] Figure 4 This is a route map showing how to drive to your target parking space when all aisles in the parking lot are empty.
[0025] Figure 5 This is a guide route map for parking lots where passageways are blocked. Detailed Implementation
[0026] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 An embodiment of a parking space guidance method according to the present invention includes:
[0028] S101. Acquire real-time parking lot images when a vehicle enters the parking lot entrance.
[0029] It is understood that the executing entity of this invention can be a parking guidance device, a terminal, or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0030] In this embodiment, the acquired parking lot image can be enhanced to improve the useful information in the image. This process can be a distortion process, but its purpose is to improve the visual effect of the image for the given application scenario.
[0031] Image enhancement can purposefully emphasize the overall or local characteristics of an image, making an originally unclear image clearer or emphasizing certain features of interest, amplifying the differences between features of different objects in the image, suppressing features of no interest, thereby improving image quality, enriching information, and enhancing image interpretation and recognition.
[0032] In this embodiment, the image enhancement process mainly involves brightening some darker images.
[0033] S102. Input the acquired real-time parking lot image into the parking vacancy status detection model, and output the coordinates of the vacant aisle and vacant parking space in the parking lot.
[0034] In this embodiment, the construction of the parking vacancy detection model includes: acquiring images of the parking lot at different times using a camera to obtain multiple acquired images; preprocessing the multiple acquired images to obtain multiple sample images; labeling the vacant aisles and vacant parking spaces in the multiple sample images to obtain a training set; and inputting the training set into the CSPDarknet network to train it using the YOLO method to obtain the parking vacancy detection model.
[0035] Optionally, preprocessing multiple acquired images involves brightening the darker images among the acquired images.
[0036] Optionally, when labeling vacant aisles and vacant parking spaces in multiple sample images, the labelimg tool can be used for labeling.
[0037] An empty passageway is a passageway that is open to traffic and not blocked, while an empty parking space is a parking space that is not occupied.
[0038] It's worth noting that Labelimg is a visual image labeling tool. It's written in Python and uses Qt for its graphical interface. Annotations are saved as XML files in PASCAL VOC format (the format used by ImageNet). Furthermore, it supports YOLO format. Datasets required by object detection networks such as Faster R-CNN, YOLO, and SSD all require this tool to label objects in images.
[0039] It should be noted that the YOLO method treats object detection as a regression problem. It is a one-stage neural network structure that directly inputs the entire image for prediction. It does not require a complex process and can achieve end-to-end training and real-time speed while maintaining high average accuracy.
[0040] YOLO takes a global view of the image during prediction. Unlike sliding window and region extraction techniques, YOLO observes the entire image during training and testing and explicitly records background information about classes and their appearance.
[0041] It should be noted that the backbone feature extraction network used by YoloX is CSPDarknet, which has five important characteristics.
[0042] First, it utilizes a residual network, CSPDarknet. The residual convolutions in CSPDarknet can be divided into two parts: the backbone consists of a 1x1 convolution and a 3x3 convolution; the residual edges are not processed and directly combine the input and output of the backbone. The entire backbone of YOLOv is composed of residual convolutions. Residual networks are characterized by their ease of optimization and the ability to improve accuracy by significantly increasing depth. The internal residual blocks use skip connections to mitigate the vanishing gradient problem that arises when increasing depth in deep neural networks.
[0043] Secondly, the CSPnet network structure is used. The CSPnet structure is not very complex; it simply splits the original stack of residual blocks into two parts: the backbone continues the stacking of the original residual blocks; the other part, like a residual edge, is directly connected to the end after minimal processing. Therefore, it can be considered that there is a large residual edge in CSP.
[0044] Third, the Focus network structure was used. This network structure is quite interesting in YOLOv5. Specifically, it takes a value for every single pixel in an image, resulting in four independent feature layers. These four independent feature layers are then stacked. This concentrates the width and height information into channel information, expanding the input channels fourfold. The stacked feature layer becomes twelve channels instead of the original three.
[0045] Fourth, the SiLU activation function was used. SiLU is an improved version of Sigmoid and ReLU. SiLU has the characteristics of being unbounded at the upper limit but bounded at the lower limit, smooth, and non-monotonic. SiLU performs better than ReLU in deep models. It can be regarded as a smooth ReLU activation function.
[0046] Fifth, the SPP structure is used, which extracts features through max pooling with different kernel sizes, thereby increasing the network's receptive field. In YOLOv4, SPP is used in FPN, while in YOLOX, the SPP module is used in the backbone feature extraction network.
[0047] In this embodiment, specifically, the parking vacancy detection model uses the bounding boxes of aisles and parking spaces as dividing lines to divide the acquired real-time parking lot image into vacant aisles, vacant parking spaces, and obstacles, including blocked aisles and occupied parking spaces.
[0048] Specifically, the parking vacancy detection model outputs the coordinates of vacant aisles and vacant parking spaces in the parking lot.
[0049] In this embodiment, the trained parking vacancy detection model can process real-time images and videos with high detection accuracy.
[0050] S103. Analyze the availability of vacant passageways in the parking lot.
[0051] In this embodiment, analyzing the availability of parking aisles includes: acquiring the original image of the parking lot, in which there are no blocked aisles; inputting the original image into the parking vacancy detection model to obtain the coordinates of the aisles and parking spaces; comparing the coordinates of the available aisles with the parking lot's aisle coordinates; if the coordinates of the available aisles match the parking lot's aisle coordinates, it indicates that all aisles in the parking lot are vacant; if the coordinates of the available aisles do not match the parking lot's aisle coordinates, it indicates that some aisles in the parking lot are blocked, i.e., the available aisles do not cover all aisles. Analyzing the availability of parking aisles is to select different methods to calculate the target guidance route based on the parking lot's aisle situation.
[0052] S104. If all aisles in the parking lot are vacant, calculate the Euclidean distance from the parking lot entrance to each vacant parking space, and take the vacant parking space with the shortest Euclidean distance as the target parking space. Then, use the A* pathfinding algorithm to calculate the guidance route from the parking lot entrance to the target parking space, and obtain the target guidance route.
[0053] In this embodiment, the target guidance route is obtained through an evaluation function, which is expressed as:
[0054] f(n)=g(n)+h(n) (1)
[0055] In the formula, f(n) represents the cost function of the target guidance route, that is, the cost function of the route from the initial node to the target coordinates via node n; g(n) represents the actual cost from the initial node to node n in the state space, where diagonal movement is defined as 1.4 times that of straight-line movement; and h(n) is the heuristic function, representing the estimated cost of the optimal path from node n to the target coordinates. h(n) is calculated using Manhattan distance, and its formula is as follows:
[0056] h(n)=x1-x2+y1-y2 (2)
[0057] In the formula, x1 and y1 represent the starting coordinates (x1, y1), and x2 and y2 represent the target parking space coordinates (x2, y2).
[0058] As an example, a first real-time parking lot image is acquired. In this image, the available aisles cover all aisles. The acquired image is then input into a parking vacancy detection model, which outputs the coordinates of the available aisles and available parking spaces. The Euclidean distance from the parking lot entrance to each available parking space is calculated, and the available parking space with the shortest Euclidean distance is selected as the target parking space. The A* pathfinding algorithm is then used to calculate the guidance route from parking lot entrance C to the target parking space, resulting in the target guidance route. Specifically, as follows... Figure 4 As shown, A represents an available parking space, B represents an obstacle (including occupied parking spaces), C represents the parking lot entrance, D represents the target parking space, and blank spaces represent available aisles.
[0059] It should be noted that other obstacles are not described in this embodiment.
[0060] S105. If some passageways in the parking lot are blocked, the shortest path from the parking lot entrance to each available parking space is calculated using the A* pathfinding algorithm, and the shortest path with the smallest value is used as the target guidance route.
[0061] Understandably, the method for calculating the shortest path from the parking lot entrance to each available parking space using the A* pathfinding algorithm is the same as the method for calculating the guide route from the parking lot entrance to the target parking space using the A* pathfinding algorithm in step S104, and will not be repeated here.
[0062] As an example, a second real-time parking lot image is acquired. If the available aisles in this image do not cover all aisles (i.e., there are blocked aisles), the acquired image is input into a parking vacancy detection model. The model outputs the coordinates of available aisles and available parking spaces. The A* pathfinding algorithm is then used to calculate the shortest path from the parking lot entrance to each available parking space, and the shortest path with the smallest value is used as the target guidance route. Specifically, as follows... Figure 5 As shown, A represents an available parking space, B represents an obstacle (including occupied parking spaces and blocked passageways), C represents the parking lot entrance, and blank spaces represent available passageways.
[0063] The parking guidance method in this embodiment dynamically determines the driving route and selects different methods to calculate the target guidance route based on the condition of the parking lot aisles. If all the parking lot aisles are vacant, the Euclidean distance from the parking lot entrance to each vacant parking space is calculated, and the vacant parking space with the shortest Euclidean distance is selected as the target parking space. The A* pathfinding algorithm is then used to calculate the guidance route from the parking lot entrance to the target parking space, thus obtaining the target guidance route. If some aisles in the parking lot are blocked, the blocked driving routes are also considered as obstacles, and the A* pathfinding algorithm is used to calculate the shortest path from the parking lot entrance to each vacant parking space. The shortest path with the smallest value is selected as the target guidance route, reducing the possibility of the route causing further severe congestion and thus improving parking efficiency.
[0064] The parking guidance method in the embodiments of the present invention has been described above. The device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 2 The implementation methods of the parking guidance device in this invention include:
[0065] The image acquisition module 201 is used to acquire real-time parking lot images when a vehicle enters the parking lot entrance;
[0066] The detection module 202 is used to input the acquired real-time parking lot image into the parking vacancy status detection model and output the coordinates of the vacant aisle and vacant parking space in the parking lot.
[0067] Analysis module 203 is used to analyze the availability of parking aisles;
[0068] The first calculation module 204 is used to determine that all the aisles of the parking lot are vacant, calculate the Euclidean distance from the parking lot entrance to each vacant parking space, take the vacant parking space with the shortest Euclidean distance as the target parking space, and use the A* pathfinding algorithm to calculate the guidance route from the parking lot entrance to the target parking space to obtain the target guidance route.
[0069] The second calculation module 205 is used to determine that some passageways in the parking lot are blocked, and then use the A* pathfinding algorithm to calculate the shortest path from the parking lot entrance to each available parking space, and take the shortest path with the smallest value as the target guidance route.
[0070] In this embodiment, the driving route is dynamically determined. Different methods are selected to calculate the target guidance route based on the condition of the parking lot aisles. If all the parking lot aisles are vacant, the Euclidean distance from the parking lot entrance to each vacant parking space is calculated, and the vacant parking space with the shortest Euclidean distance is selected as the target parking space. The A* pathfinding algorithm is then used to calculate the guidance route from the parking lot entrance to the target parking space, thus obtaining the target guidance route. If some of the parking lot aisles are blocked, the blocked driving routes are also considered as obstacles. The A* pathfinding algorithm is then used to calculate the shortest path from the parking lot entrance to each vacant parking space, and the shortest path with the smallest value is selected as the target guidance route. This reduces the possibility of the route causing further severe congestion, thereby improving parking efficiency.
[0071] above Figure 2 The parking guidance device in the embodiments of the present invention will be described in detail from the perspective of modular functional entities. The parking guidance device in the embodiments of the present invention will be described in detail from the perspective of hardware processing.
[0072] Figure 3 This is a schematic diagram of a parking guidance device provided in an embodiment of the present invention. The device 300 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown), each module including a series of instruction operations on the device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media on the device 300.
[0073] Device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
[0074] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of the parking space guidance method.
[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0076] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0077] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A parking space guidance method, characterized in that, The parking guidance method includes: Acquire real-time parking lot images when vehicles enter the parking lot entrance; The acquired real-time parking lot images are input into the parking vacancy status detection model, which outputs the coordinates of the vacant aisles and vacant parking spaces. Analyze the availability of empty passageways in the parking lot; If all aisles in the parking lot are vacant, calculate the Euclidean distance from the parking lot entrance to each vacant parking space, and take the vacant parking space with the shortest Euclidean distance as the target parking space. Then, use the A* pathfinding algorithm to calculate the guidance route from the parking lot entrance to the target parking space, and obtain the target guidance route. If some aisles in the parking lot are blocked, the shortest path from the parking lot entrance to each available parking space is calculated using the A* pathfinding algorithm, and the shortest path with the smallest value is used as the target guidance route. The method for constructing the parking vacancy detection model includes: acquiring images of the parking lot at different times to obtain multiple acquired images; preprocessing the multiple acquired images to obtain multiple sample images; labeling the vacant aisles and vacant parking spaces in the multiple sample images to obtain a training set; inputting the training set into the CSPDarknet network and training it using the YOLO method to obtain the parking vacancy detection model; the parking vacancy detection model uses the bounding boxes of aisles and parking spaces as boundaries to divide the acquired real-time parking lot images into vacant aisles, vacant parking spaces, and obstacles, and outputs the coordinates of the vacant aisles and vacant parking spaces in the parking lot. Obstacles include blocked aisles and occupied parking spaces.
2. The parking guidance method according to claim 1, characterized in that, The preprocessing of multiple acquired images includes brightening the darker images among the acquired images.
3. The parking guidance method according to claim 1, characterized in that, The step of labeling the vacant aisles and vacant parking spaces in multiple sample images includes: calling the labelimg tool to label the vacant aisles and vacant parking spaces in multiple sample images.
4. The parking guidance method according to claim 1, characterized in that, The analysis of the vacant aisles in the parking lot includes: The original images of the parking lot were captured, showing no blocked passageways. The original image of the parking lot is input into the parking vacancy detection model to obtain the coordinates of the parking lot aisle and parking space. Compare the coordinates of the available aisles in the parking lot with the coordinates of the aisles in the parking lot; If the coordinates of the available aisles in the parking lot are the same as the coordinates of the aisles in the parking lot, it means that all the aisles in the parking lot are in an available state. If the coordinates of the available aisles in the parking lot do not match the coordinates of the aisles in the parking lot, it means that some aisles in the parking lot are blocked.
5. The parking guidance method according to claim 1, characterized in that, The target guidance route is obtained through an evaluation function, which is expressed as follows: In the formula, f(n) represents the evaluation function of the target guidance route, g(n) represents the actual cost from the initial node to node n in the state space, h(n) is the heuristic function, and h(n) represents the estimated cost of the optimal path from node n to the target coordinates.
6. The parking guidance method according to claim 5, characterized in that, h(n) is calculated using Manhattan distance, and the relationship of h(n) is expressed as: In the formula, x1 and y1 represent the starting coordinates (x1, y1), and x2 and y2 represent the target parking space coordinates (x2, y2).
7. A parking space guiding device, characterized in that, include: The image acquisition module is used to acquire real-time parking lot images when a vehicle enters the parking lot entrance; The detection module is used to input the acquired real-time parking lot images into the parking vacancy detection model and output the coordinates of the vacant aisles and vacant parking spaces. The construction method of the parking vacancy detection model includes: acquiring images of the parking lot at different times to obtain multiple acquired images; preprocessing the multiple acquired images to obtain multiple sample images; labeling the vacant aisles and vacant parking spaces in the multiple sample images to obtain a training set; inputting the training set into the CSPDarknet network and training it using the YOLO method to obtain the parking vacancy detection model; the parking vacancy detection model uses the bounding boxes of aisles and parking spaces as boundaries to divide the acquired real-time parking lot images into vacant aisles, vacant parking spaces, and obstacles, and outputs the coordinates of the vacant aisles and vacant parking spaces. Obstacles include blocked aisles and occupied parking spaces. The analysis module is used to analyze the availability of parking aisles; The first calculation module is used to determine that all aisles in the parking lot are vacant, calculate the Euclidean distance from the parking lot entrance to each vacant parking space, and take the vacant parking space with the shortest Euclidean distance as the target parking space. The A* pathfinding algorithm is used to calculate the guidance route from the parking lot entrance to the target parking space, and the target guidance route is obtained. The second calculation module is used to determine that some passageways in the parking lot are blocked, and then use the A* pathfinding algorithm to calculate the shortest path from the parking lot entrance to each available parking space, and take the shortest path with the smallest value as the target guidance route.
8. A parking space guidance device, characterized in that, It includes a memory and at least one processor, wherein the memory stores computer-readable instructions; The at least one processor invokes the computer-readable instructions in the memory to perform the steps of the parking guidance method as described in any one of claims 1-6.
9. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by a processor, they implement the steps of the parking guidance method as described in any one of claims 1-6.