A parking lot space optimization method and device
By classifying and shifting underground parking lot location data using machine learning and clustering methods, the problem of data drift in underground parking lots was solved, and high-precision parking lot maps were created.
Patent Information
- Application Number
- CN202211743680.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2042-12-30
AI Technical Summary
In underground parking lots, due to poor GPS signals, multiple data collections resulted in parking space drift and ground marking drift, making it impossible to directly create high-precision parking lot maps.
Multiple storage locations are classified using machine learning models, and clustering and translation methods are used to optimize the storage location dataset, resulting in the final storage location map.
It achieves correction, alignment, and global optimization of data collected multiple times, forming an accurate parking lot location map and solving the problem of data drift.
Smart Images

Figure CN116152392B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of high-precision map making, and particularly relates to a parking lot position optimization method and device. BACKGROUND
[0002] In the field of automatic parking, it is usually necessary to draw a high-precision parking lot map. In an underground parking lot, when collecting data by a collection vehicle, due to poor GPS signals in the garage, the data collected multiple times usually has the situation of position drift and ground marking drift. Without data processing, it is impossible to draw a map by pure manual work. Therefore, based on the data collected multiple times, after coordinate system conversion, the fusion and optimization of positions are completed, and available position information is provided for subsequent manual drawing, which is a problem worth studying.
[0003] On the other hand, the multiple collection data collected by an underground parking lot and transmitted to the cloud has the situation of position drift and ground marking drift after coordinate system conversion due to poor GPS signals in the garage, and cannot be directly used for a map drawing staff. SUMMARY
[0004] To provide an accurate underground parking lot position map for an automatic parking process and improve the reuse and expansibility of the position map, in a first aspect of the application, a parking lot position optimization method is provided, which comprises: acquiring position data of multiple positions of a target parking lot, the position data comprising endpoint coordinates, center point coordinates and position identification of each position; classifying the multiple positions by a machine learning model based on an included angle between the endpoint coordinates of each position and a preset direction; adjusting the direction of each position according to the classification result, and constructing a position data set according to the adjusted position data; obtaining multiple position clusters by a first clustering method based on the center point coordinates of each position in the position data set; cleaning the position data set according to the position identification of one or more positions corresponding to each position cluster; optimizing the center point coordinates of each position cluster by a second clustering method and a constraint condition of a preset position cluster according to the endpoint coordinates and the center point coordinates of one or more positions corresponding to each position cluster in each position cluster; and performing translation adjustment on each position according to the center point coordinates of the multiple position clusters after optimization to obtain a final position map of the target parking lot.
[0005] In some embodiments of the application, the classification of the multiple position data by the machine learning model based on the included angle between each position data and a preset direction comprises: calculating a main direction a of each position n , wherein a n is an included angle between the position map x-axis positive direction and the main direction a of each position, and D and A are any two adjacent endpoints of each position. The multiple position data are classified into two direction clusters by the machine learning model.
[0006] In some embodiments of the present application, the direction adjustment of each storage location according to the classification result comprises: constructing mutually perpendicular direction vectors a a and a b ; corresponding the direction vectors a a and a b to the first direction cluster and the second direction cluster respectively, and optimizing the direction vectors a a and a b with the constraint condition that each direction vector has the minimum standard deviation of the storage location data in its corresponding direction cluster; and adjusting the storage location data in the direction cluster corresponding to the optimized a a and a b .
[0007] In some embodiments of the present application, the cleaning of the storage location data set according to the storage location identification of one or more storage locations corresponding to each storage location cluster comprises: counting the storage location ID corresponding to each storage location cluster; and cleaning the storage location data set according to the distribution and repeatability of the storage location ID.
[0008] In some embodiments of the present application, the translation adjustment of each storage location according to the center point coordinates of the optimized plurality of storage location clusters to obtain the final storage location map of the target parking lot comprises: calculating a translation vector according to the center point coordinates of the plurality of storage location clusters before and after optimization; and translating each storage location in each storage location cluster based on the translation vector of each storage location cluster to obtain the final storage location map of the target parking lot.
[0009] In the above embodiments, the second clustering method is DBSCAN.
[0010] In a second aspect, the present application provides a parking lot optimization device, comprising: an acquisition module configured to acquire storage location data of a plurality of storage locations of a target parking lot, the storage location data comprising endpoint coordinates, center point coordinates and storage location identification of each storage location; an adjustment module configured to classify the plurality of storage locations based on the angle between the endpoint coordinates of each storage location and a preset direction through a machine learning model; adjust the direction of each storage location according to the classification result, and construct a storage location data set according to the adjusted storage location data; a cleaning module configured to obtain a plurality of storage location clusters through a first clustering method based on the center point coordinates of each storage location in the storage location data set; and clean the storage location data set according to the storage location identification of one or more storage locations corresponding to each storage location cluster; an optimization module configured to optimize the center point coordinates of each storage location cluster according to the endpoint coordinates and the center point coordinates of one or more storage locations corresponding to each storage location cluster through a second clustering method and a constraint condition of a preset storage location cluster; and a translation module configured to translate each storage location according to the center point coordinates of the optimized plurality of storage location clusters to obtain a final storage location map of the target parking lot.
[0011] In a third aspect, the present application provides an electronic device, comprising: one or more processors; a memory device storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for optimizing parking lot storage provided in the first aspect of the present application.
[0012] In a fourth aspect, the present application provides a computer readable medium, which stores a computer program, when the computer program is executed by a processor, the method for optimizing parking lot storage provided in the first aspect of the present application is implemented.
[0013] The present application has the following beneficial effects:
[0014] The present application relates to a method and device for optimizing parking lot storage, the method comprising: obtaining storage data of a plurality of storages of a target parking lot, the storage data comprising endpoint coordinates, center point coordinates and storage identification of each storage; based on the included angle between the endpoint coordinates of each storage and a preset direction, classifying the plurality of storages by a machine learning model and constructing a storage data set; based on the center point coordinates of each storage in the storage data set, obtaining a plurality of storage clusters by a first clustering method and cleaning the storage data set; optimizing the center point coordinates of each storage cluster by a second clustering method and a constraint condition of a preset storage cluster; and performing translational adjustment on each storage according to the center point coordinates of the plurality of optimized storage clusters to obtain a final storage map of the target parking lot. It can be seen that the present application realizes the method of correcting and aligning multiple collected data and globally optimizing the aligned position to form a layer of storage geometry. The present application solves the problem that the multiple collected data collected by the underground parking lot and transmitted to the cloud are usually subject to storage drift and ground marking drift due to poor GPS signal of the underground garage after coordinate system conversion, and cannot be directly used by the staff drawing the map. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 A flowchart of the method for parking lot storage in some embodiments of the present application;
[0016] Figure 2 A storage data diagram in some embodiments of the present application;
[0017] Figure 3 A storage map of a certain parking lot after optimization in some embodiments of the present application;
[0018] Figure 4 A structural diagram of the parking lot storage optimization device in some embodiments of the present application;
[0019] Figure 5 A structural diagram of the electronic device in some embodiments of the present application. DETAILED DESCRIPTION
[0020] The principles and features of the present application are described below in conjunction with the accompanying drawings, in which the examples are used to explain the present application and are not intended to limit the scope of the present application.
[0021] Reference Figure 1 In a first aspect of the present application, a parking lot optimization method is provided, characterized by comprising: S100. obtaining parking lot data of a plurality of parking lots of a target parking lot, the parking lot data including end point coordinates, center point coordinates and parking lot identification of each parking lot; S200. classifying the plurality of parking lots based on the angle between the end point coordinates of each parking lot and a preset direction through a machine learning model; adjusting the direction of each parking lot according to the classification result, and constructing a parking lot data set according to the adjusted parking lot data; S300. obtaining a plurality of parking lot clusters through a first clustering method based on the center point coordinates of each parking lot in the parking lot data set; cleaning the parking lot data set according to the parking lot identification of one or more parking lots corresponding to each parking lot cluster; S400. optimizing the center point coordinates of each parking lot cluster through a second clustering method and a preset parking lot cluster constraint condition according to the end point coordinates and center point coordinates of one or more parking lots corresponding to each parking lot cluster in each parking lot cluster; S500. translating and adjusting each parking lot according to the center point coordinates of the plurality of optimized parking lot clusters to obtain a final parking lot map of the target parking lot.
[0022] Reference Figure 2 In step S200 of some embodiments of the present application, the classification of the plurality of parking lot data through a machine learning model based on the angle between each parking lot data and a preset direction includes: calculating the main direction a n wherein a n is the angle with the positive direction of the x-axis of the parking lot map, D and A are any two adjacent end points of each parking lot; the plurality of parking lot data is classified into two direction clusters through a machine learning model.
[0023] Specifically, it includes:
[0024] S201. Each parking lot data is composed of five points A, B, C, D and P, wherein the four points A, B, C and D form a rectangle representing a parking lot, A and B are the end points of the side where the entrance and exit of the parking lot are located, C and D are the end points of the other side, P is the midpoint of AB, the parking lot data set is Ω={(A_1, B_1, C_1, D_1, P_1), (A_2, B_2, C_2, D_2, P_2)……(A-n, B_n, C_n, D_n, P_n)}, and each parking lot has a parking lot number ID;
[0025] S202. Calculate the main direction an α n for The angle with the positive x-axis;
[0026] S203. Perform binary classification on the main direction dataset of all storage locations to obtain class a direction cluster and class b direction cluster. The classification method can be any of the current mainstream machine learning, neural network and other classification methods.
[0027] In step S200 of some embodiments of the present invention, adjusting the orientation of each storage location according to the classification result includes:
[0028] S204. Construct mutually perpendicular direction vectors α a and α b ;
[0029] S205. Adjust the direction vector α a and α b Corresponding to the first and second direction clusters respectively, and taking the minimum standard deviation of each direction vector and the storage location data in its corresponding direction cluster as the constraint condition, for direction vector α a and α b Optimize; establish a constrained optimal solution problem with constraint α. a ⊥α b Solve for α a The standard deviation of all directional clusters of class a plus α b The sum of the standard deviations of all directional clusters of class b is minimized, thus yielding α. a α b ;
[0030] S206. Based on the optimized α a and α b Adjust the storage location data in the corresponding direction cluster. Specifically, rotate all storage location rectangles of type a along point P to the sides BC and α. a Parallel, similarly, for category b storage location BC edge and α b Parallel processing yields the updated dataset Ω for all storage locations;
[0031] In step S300 of some embodiments of the present invention, the step of cleaning the storage location dataset according to the storage location identifier of one or more storage locations corresponding to each storage location cluster includes: counting the storage location ID corresponding to each storage location cluster; and cleaning the storage location dataset according to the distribution and repetition of the storage location ID.
[0032] Specifically, including:
[0033] S301. Based on the x, y, and z coordinates of all storage location data points P, use DBSCAN clustering, set certain Eps neighborhood values and lower limits for the number of data in each category, and obtain each storage location cluster;
[0034] S302. Count the ID of each storage location cluster. If there is only one ID, no change is made; if there is more than one ID, count the proportion of each ID, take the ID with the largest proportion and exceeding a certain threshold, and change the ID of other storage locations to the above ID; if all proportions do not exceed the threshold, the data is abnormal and needs to be removed;
[0035] S303. Check the ID number of all storage location clusters. If there is no repetition, no processing is needed; if there is repetition, there is a drifting storage location, find its two adjacent storage location clusters (the adjacent storage location of the first and last storage location of each row and column is only one), respectively calculate the sum of the projection overlapping areas of the rectangles of the two repeated ID storage location clusters and their adjacent storage location clusters, take the storage location cluster with the smallest sum of overlapping areas and less than a certain threshold, remove the other cluster, if the sum of overlapping areas has no storage location cluster less than a certain threshold, the data is abnormal and needs to be checked manually.
[0036] In step S400 of some embodiments of the present application, according to the end point coordinates and center point coordinates of one or more storage locations in each parking space cluster, the center point coordinates of each storage location cluster are optimized by a second clustering method and a preset constraint condition of the storage location cluster.
[0037] Specifically, the average value of the A, P, B, C, D point coordinate set of each storage location cluster is obtained to obtain the fusion A'P'B'C'D' coordinates of the storage location cluster; collinear storage locations are found, based on the x, y, z coordinates of all P' points, DBSCAN clustering is used, a certain Eps neighborhood value and a lower limit value of the number of category data are set, all P'' coordinates in each row or each column of the storage location cluster need to be on a straight line, and the straight line needs to be parallel to a a or a b , the sum of the standard deviations of the subtraction of all P'' and P' coordinates corresponding to the same storage location is solved to obtain the P'' set.
[0038] Reference Figure 3 In step S of some embodiments of the present application, the translation adjustment of each storage location according to the center point coordinates of the optimized plurality of storage location clusters to obtain the final storage location map of the target parking lot includes: calculating a translation vector according to the center point coordinates of the plurality of storage location clusters before and after optimization; based on the translation vector of each storage location cluster, translating each storage location in each storage location cluster to obtain the final storage location map of the target parking lot. Specifically, each A'P'B'C'D' rectangle in step S400 is centered at P', and the translation amount between P' and its corresponding P'' is used as the reference to translate to P'', and the corresponding storage location ID is synchronized to the adjusted storage location, thereby obtaining the optimized and adjusted storage location map.
[0039] In the above embodiments, the first clustering method and the second clustering method are both DBSCAN. Alternative clustering methods also include KNN, PCA, etc.
[0040] Embodiment 2
[0041] Reference Figure 4 In a second aspect, the present application provides a parking lot optimization device, 1, comprising: an acquisition module 11 configured to acquire lot data of a plurality of lots in a target parking lot, the lot data comprising endpoint coordinates, center point coordinates and lot identification of each lot; an adjustment module 12 configured to classify the plurality of lots based on the angle between the endpoint coordinates of each lot and a preset direction through a machine learning model; adjust the direction of each lot according to the classification result, and construct a lot data set according to the adjusted lot data; a cleaning module 13 configured to obtain a plurality of lot clusters through a first clustering method based on the center point coordinates of each lot in the lot data set; clean the lot data set according to the lot identification of one or more lots corresponding to each lot cluster; an optimization module 14 configured to optimize the center point coordinates of each lot cluster according to the endpoint coordinates and center point coordinates of one or more lots corresponding to each lot cluster in the cluster through a second clustering method and a preset lot cluster constraint condition; a translation module 15 configured to translate and adjust each lot according to the center point coordinates of the plurality of optimized lot clusters to obtain a final lot map of the target parking lot.
[0042] Further, the cleaning module 13 comprises: a statistical unit configured to count the lot number ID corresponding to each lot cluster; and a cleaning unit configured to clean the lot data set according to the distribution and repeatability of the lot number ID.
[0043] Embodiment 3
[0044] Reference Figure 5 In a third aspect, the present application provides an electronic device, comprising: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of the first aspect of the present application.
[0045] The electronic device 500 can include a processing device (such as a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or programs loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0046] Generally, the following devices can be connected to the I / O interface 505: input devices 506, including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507, including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508, including, for example, a hard disk, etc.; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or via a wire with other devices to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it is understood that all of the shown devices are not required to be implemented or present. More or fewer devices can alternatively be implemented or present. Figure 5 Each block shown in the middle can represent one device or, as desired, multiple devices.
[0047] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of embodiments of the present disclosure are executed. It should be noted that the computer readable medium described in embodiments of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In embodiments of the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus or device. In embodiments of the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as part of a carrier wave, in which the computer readable program code is carried. Such a propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination of the above. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, cable, RF (radio frequency), or the like, or any suitable combination of the above.
[0048] The computer readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and be not assembled in the electronic device. The computer readable medium described above carries one or more computer programs, which, when executed by the electronic device, cause the electronic device to:
[0049] Computer program code for carrying out operations of embodiments of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++, Python, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0050] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0051] The foregoing is merely illustrative of the principles of the application, and the application should not be limited to such detail. Rather, the spirit and scope of the application are limited solely by the claims.
Claims
1. A parking lot space optimization method, characterized in that, include: Obtain the storage location data of multiple storage locations in the target parking lot. The storage location data includes the endpoint coordinates, center point coordinates, and storage location identifier of each storage location. Based on the angle between the endpoint coordinates of each storage location and a preset direction, a machine learning model is used to classify the multiple storage locations; the direction of each storage location is adjusted according to the classification results, and a storage location dataset is constructed based on the adjusted storage location data; the direction adjustment of each storage location according to the classification results includes constructing mutually perpendicular direction vectors. and ; the direction vector and Corresponding to the first and second direction clusters respectively, and using the minimum standard deviation of each direction vector and the storage location data in its corresponding direction cluster as a constraint, the direction vectors are... and Optimize; based on the optimized and Adjust the storage location data in its corresponding directional cluster; Based on the center point coordinates of each storage location in the storage location dataset, multiple storage location clusters are obtained through the first clustering method; the storage location dataset is then cleaned according to the storage location identifiers of one or more storage locations corresponding to each storage location cluster. Based on the endpoint coordinates and center point coordinates of one or more parking spaces in each parking space cluster, the center point coordinates of each parking space cluster are optimized using the second clustering method and the preset constraints of the parking space clusters. Based on the optimized center point coordinates of multiple parking space clusters, each parking space is translated and adjusted to obtain the final parking space map of the target parking lot.
2. The parking space optimization method according to claim 1, characterized in that, The classification of the multiple storage location data using a machine learning model, based on the angle between the endpoint coordinates of each storage location and a preset direction, includes: Calculate the main direction for each storage location ,in for The angle between the location and the positive x-axis of the storage location map, where D and A are any two adjacent endpoints of each storage location; The multiple storage locations are divided into two directional clusters using a machine learning model.
3. The parking space optimization method according to claim 1, characterized in that, The step of cleaning the storage location dataset based on the storage location identifiers of one or more storage locations corresponding to each storage location cluster includes: Calculate the storage location ID corresponding to each storage location cluster; The database location dataset is cleaned based on the distribution and repetition of the location IDs.
4. The parking space optimization method according to claim 1, characterized in that, The step of translating and adjusting each parking space based on the center point coordinates of the optimized multiple parking space clusters to obtain the final parking space map of the target parking lot includes: Calculate the translation vector based on the center point coordinates of multiple storage clusters before and after optimization; Based on the translation vector of each parking space cluster, each parking space in each parking space cluster is translated to obtain the final parking space map of the target parking lot.
5. The parking space optimization method according to any one of claims 1 to 4, characterized in that, The second clustering method is DBSCAN.
6. A parking lot space optimization device, characterized in that, include: The acquisition module is used to acquire the storage location data of multiple storage locations in the target parking lot. The storage location data includes the endpoint coordinates, center point coordinates, and storage location identifier of each storage location. The adjustment module is used to classify the multiple storage locations based on the angle between the endpoint coordinates of each storage location and a preset direction using a machine learning model; adjust the direction of each storage location according to the classification results, and construct a storage location dataset based on the adjusted storage location data; the direction adjustment of each storage location according to the classification results includes constructing mutually perpendicular direction vectors. and ; the direction vector and Corresponding to the first and second direction clusters respectively, and using the minimum standard deviation of each direction vector and the storage location data in its corresponding direction cluster as a constraint, the direction vectors are... and Optimize; based on the optimized and Adjust the storage location data in its corresponding directional cluster; The cleaning module is used to obtain multiple storage location clusters based on the center point coordinates of each storage location in the storage location dataset using a first clustering method; and to clean the storage location dataset according to the storage location identifiers of one or more storage locations corresponding to each storage location cluster. The optimization module is used to optimize the center point coordinates of each parking space cluster based on the endpoint coordinates and center point coordinates of one or more corresponding parking spaces in each parking space cluster, using a second clustering method and the constraints of preset parking space clusters. The translation module is used to translate and adjust each parking space according to the center point coordinates of multiple optimized parking space clusters to obtain the final parking space map of the target parking lot.
7. The parking space optimization device according to claim 6, characterized in that, The cleaning module includes: The statistical unit is used to count the storage location ID corresponding to each storage location cluster; The cleaning unit is used to clean the storage location dataset according to the distribution and repetition of the storage location IDs.
8. An electronic device, comprising: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the parking space optimization method as described in any one of claims 1 to 5.
9. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by the processor, it implements the parking space optimization method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for correcting angular point of parking space and related device
CN115339436A
Open parking lot berth position determination method and system based on deep learning vehicle detection algorithm
CN115457491A