Parking order sharing method and system based on blockchain
Through the blockchain-based method, the free parking spaces in the parking lot are screened and detected, which solves the problem of low accuracy of parking order sharing, improves the accuracy and data security of parking spaces, and simplifies users' parking operations.
Patent Information
- Application Number
- CN202410086771.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-01-22
AI Technical Summary
The existing parking order sharing process has low accuracy, mainly because the number of free parking spaces is easily reduced by parked vehicles, making it difficult for users to find available parking spaces.
Using a blockchain-based method, by obtaining the location and number of free parking spaces in the parking lot, qualified parking spaces are screened, image collection is performed to detect the presence of moving vehicles, and the admission time difference is calculated. If it is less than the threshold, the parking space is deleted. , set and prioritize parking spaces, generate parking orders and upload them to the blockchain for sharing.
It improves the accuracy of parking orders, prevents users from driving to parking spaces for parked vehicles, ensures the reliability of parking orders and the security of data, facilitates users to understand information about waiting parking spaces, and simplifies parking operations.
Smart Images

Figure CN118097852B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a parking order sharing method and system based on blockchain. Background Art
[0002] Parking difficulties have always been a social problem in cities, especially in the central areas of large cities, where the problem is more prominent due to insufficient parking facilities. The main reasons include the following aspects: (1) With the continuous expansion of urban planning, the number of cars has increased rapidly, but the growth rate of the number of cars has far exceeded the growth rate of the number of parking spaces, resulting in a continuous expansion of the parking space gap; (2) The spatial layout and functions of urban planning are unbalanced; the supporting facilities standards in urban planning and construction are low; in the case of insufficient overall parking resources in large cities, the existing parking resources are not fully utilized, which aggravates the parking difficulties. Therefore, the issue of parking order sharing has received more and more attention.
[0003] In the existing parking order sharing process, a parking order is generally generated based on the location of the current vacant parking spaces in the parking lot. When a user drives a vehicle to an vacant parking space, the vacant parking space is likely to be occupied by a vehicle, thereby reducing the accuracy of parking order sharing. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a parking order sharing method and system based on blockchain, aiming to solve the problem of low accuracy of existing parking order sharing.
[0005] The embodiment of the present invention is implemented as follows: a parking order sharing method based on blockchain, the method comprising:
[0006] Obtain the parking space locations and the number of free parking spaces in the target parking lot;
[0007] If the number of available parking spaces is less than the number threshold, each available parking space is screened according to the parking space location;
[0008] Generate an idle detection area according to the parking space position of each idle parking space after position screening, and collect images of each idle detection area to obtain an idle detection image;
[0009] Performing vehicle detection on each idle detection image, wherein the vehicle detection is used to detect whether there is a moving vehicle in the idle detection image;
[0010] If the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time;
[0011] If the time difference is less than the time threshold, deleting the vacant parking space corresponding to the vacant detection image;
[0012] The remaining vacant parking spaces are set as waiting parking spaces, and the parking priority is determined according to the parking space positions of the waiting parking spaces;
[0013] Sorting the parking spaces to be parked according to the parking priority to obtain a list of parking spaces to be parked, and generating a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked;
[0014] The parking order is uploaded to the blockchain, and the parking order in the blockchain is broadcast and shared.
[0015] Preferably, performing vehicle detection on each idle detection image includes:
[0016] Obtaining the device identification of the image acquisition device corresponding to each vacancy detection image respectively, and determining the parking space area according to the device identification;
[0017] Performing image screening on corresponding vacancy detection images according to the parking space area, and performing license plate recognition on each vacancy detection image after the image screening;
[0018] If a vehicle license plate is recognized in any of the idle detection images, image acquisition is performed on the idle detection area corresponding to the idle detection image to obtain an idle update image;
[0019] If the vehicle license plate is not recognized in the idle update image, determining that the moving vehicle does not exist in the idle detection image;
[0020] If the vehicle license plate is recognized in the idle update image, respectively obtaining the position of the vehicle license plate in the idle detection image and the idle update image to obtain a first license plate position and a second license plate position;
[0021] If the position distance between the first license plate position and the second license plate position is greater than a distance threshold, it is determined that the moving vehicle exists in the idle detection image, and the vehicle corresponding to the vehicle license plate is determined to be the moving vehicle.
[0022] Preferably, the parking priority is determined according to the parking space position of each parking space to be parked, including:
[0023] Respectively obtain the entrance and exit positions of each parking entrance in the target parking lot;
[0024] For each parking space to be parked, the parking distances to each parking entrance are calculated according to the entrance positions, and the parking entrance corresponding to the minimum parking distance is set as the target entrance of the parking space to be parked;
[0025] Respectively obtain the elevator position of each parking lot elevator in the target parking lot;
[0026] For each parking space to be parked, the walking distance between each parking entrance is calculated according to the elevator position, and the parking lot elevator corresponding to the minimum walking distance is set as the target elevator of the parking space to be parked;
[0027] For each parking space to be parked, the parking distance from the target entrance is determined as the first priority value, and the walking distance from the target elevator is determined as the second priority value;
[0028] The number of vehicles entering and exiting each parking entrance is obtained respectively, and a weight coefficient of the target entrance is determined according to the number of vehicles entering and exiting to obtain a first weight coefficient;
[0029] The number of people going up the elevators of each parking lot is obtained respectively, and a weight coefficient of the target elevator is determined according to the number of people going up the elevators to obtain a second weight coefficient;
[0030] For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient to obtain the parking priority.
[0031] Preferably, after sorting the parking spaces to be parked according to the parking priorities to obtain a list of parking spaces to be parked, the method further includes:
[0032] If a parking signal for any of the parking spaces to be parked is received, the parking space to be parked is deleted from the parking space list.
[0033] Another object of an embodiment of the present invention is to provide a parking order sharing system based on blockchain, the system comprising:
[0034] A location acquisition module is used to acquire the location and number of free parking spaces in a target parking lot;
[0035] A position screening module, configured to screen the positions of the free parking spaces according to the positions of the parking spaces if the number of free parking spaces is less than a number threshold;
[0036] An image acquisition module is used to generate an idle detection area according to the parking space position of each idle parking space after position screening, and to acquire an image of each idle detection area to obtain an idle detection image;
[0037] A vehicle detection module, used to perform vehicle detection on each idle detection image, wherein the vehicle detection is used to detect whether there is a moving vehicle in the idle detection image;
[0038] If the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time;
[0039] If the time difference is less than the time threshold, deleting the vacant parking space corresponding to the vacant detection image;
[0040] The priority determination module is used to set each remaining free parking space as a parking space to be parked, and determine the parking priority according to the parking space position of each parking space to be parked;
[0041] An order sharing module is used to sort the parking spaces to be parked according to the parking priority, obtain a list of parking spaces to be parked, and generate a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked;
[0042] The parking order is uploaded to the blockchain, and the parking order in the blockchain is broadcast and shared.
[0043] Another object of an embodiment of the present invention is to provide a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0044] Another object of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0045] In the embodiment of the present invention, each free parking space is positionally screened by the parking space position, thereby improving the accuracy of the free parking spaces; based on the parking space position of each free parking space after the position screening, a free detection area can be automatically generated; by performing vehicle detection on each free detection image, it can be effectively detected whether there are moving vehicles around the free parking space corresponding to each free detection image; by comparing the time difference with the time threshold, it can be effectively determined whether the moving vehicle is a vehicle that has just entered the parking lot and needs to be parked; if the time difference is less than the time threshold, it is determined that the moving vehicle is a vehicle that has just entered the parking lot and needs to be parked; by deleting the free parking space corresponding to the free detection image, it is prevented that a vehicle has been parked in the free parking space when the user drives the vehicle to the free parking space, thereby improving the accuracy of parking order sharing; by uploading the parking order to the blockchain, tampering of data in the parking order is prevented; by broadcasting and sharing the parking order in the blockchain, it is convenient for users to understand the information of the parking spaces to be parked in the target parking lot, thereby facilitating the parking operation of the users. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1is a flowchart of a parking order sharing method based on blockchain provided by the first embodiment of the present invention;
[0047] Figure 2 is a schematic diagram of the structure of a parking order sharing system based on blockchain provided by the second embodiment of the present invention;
[0048] Figure 3 It is a schematic diagram of the structure of a terminal device provided in the third embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0050] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.
[0051] Embodiment 1
[0052] See also Figure 1 , is a flowchart of a parking order sharing method based on blockchain provided by a first embodiment of the present invention. The parking order sharing method based on blockchain can be applied to any terminal device or system. The parking order sharing method based on blockchain includes the following steps:
[0053] Step S10, obtaining the parking space positions and the number of free parking spaces in the target parking lot;
[0054] Among them, each parking space in the target parking lot is provided with a detection device, which can be a distance sensor or an image acquisition unit. The detection device is used to detect whether there is a parked vehicle in the corresponding parking space. If it is detected that there is no vehicle parked in the parking space, the parking space is set as an idle parking space, and the parking space position of each idle parking space is obtained respectively, and the number of idle parking spaces is determined based on the number of parking space positions obtained.
[0055] In this step, the obtained number of vacant parking spaces is compared with a quantity threshold, which can be set according to demand or a preset ratio value. For example, the quantity threshold can be set to 40, 50, or 10%, 20%, etc. of the total number of parking spaces in the target parking lot.
[0056] Step S20: if the number of available parking spaces is less than the number threshold, then screening the available parking spaces according to their positions;
[0057] Among them, if the number of vacant parking spaces is less than the quantity threshold, it is determined that there are fewer parking spaces remaining in the user's area of interest in the target parking lot, resulting in a smaller number of vacant parking spaces in the target parking lot. The user's area of interest can be set according to user needs. For example, the user's area of interest can be set to the area around the parking entrance and the area around the parking lot elevator.
[0058] In this step, the parking space positions of each vacant parking space are matched with the user's area of interest, and the vacant parking spaces in the user's area of interest are deleted according to the position matching result, so as to achieve the position screening effect of each vacant parking space.
[0059] Optionally, in this step, if the number of vacant parking spaces is greater than or equal to the quantity threshold, it is determined that there are many remaining parking spaces in the user's area of interest in the target parking lot. There is no need to perform position screening on each vacant parking space, and a vacant detection area can be directly generated based on the parking space position of each vacant parking space.
[0060] Step S30, generating an idle detection area according to the parking space position of each idle parking space after position screening, and performing image acquisition on each idle detection area to obtain an idle detection image;
[0061] Among them, the parking space positions of each vacant parking space after position screening are matched with the pre-stored area query table to obtain the vacant detection area. The area query table stores the correspondence between different parking space positions and corresponding vacant detection areas. The parking space position can be a parking space coordinate or a parking space code. Image acquisition is performed on each vacant detection area to obtain the vacant detection image.
[0062] Step S40, performing vehicle detection on each idle detection image;
[0063] The vehicle detection is used to detect whether there is a moving vehicle in the idle detection image. If there is a moving vehicle in the idle detection image, it is determined that there is a vehicle that needs to be parked around the idle parking space corresponding to the idle detection image, and the probability that the idle parking space is parked is relatively high.
[0064] If there is no moving vehicle in the vacancy detection image, it is determined that there is no vehicle that needs to park around the vacancy detection image corresponding to the vacancy detection image, and the probability that the vacancy detection image is parked is low.
[0065] Optionally, in this step, performing vehicle detection on each idle detection image includes:
[0066] Obtaining the device identification of the image acquisition device corresponding to each vacancy detection image respectively, and determining the parking space area according to the device identification;
[0067] The device identification is matched with the area query table to obtain the parking space area, and the area query table stores the corresponding relationship between different device identifications and corresponding parking space areas.
[0068] Performing image screening on corresponding vacancy detection images according to the parking space area, and performing license plate recognition on each vacancy detection image after the image screening;
[0069] Among them, in the idle detection image, the image corresponding to the determined parking space area is deleted to achieve the image screening effect of the idle detection image, and the license plate recognition is performed on each idle detection image after the image screening to determine whether there is a vehicle license plate in each idle detection image after the screening.
[0070] If a vehicle license plate is recognized in any of the idle detection images, image acquisition is performed on the idle detection area corresponding to the idle detection image to obtain an idle update image;
[0071] Among them, if a vehicle license plate is recognized in any idle detection image, an idle update image is obtained by performing image acquisition on the idle detection area corresponding to the idle detection image, and license plate recognition is performed on the idle update image to determine whether there is a vehicle license plate in the idle update image.
[0072] If the vehicle license plate is not recognized in the idle update image, determining that the moving vehicle does not exist in the idle detection image;
[0073] If no vehicle license plate is recognized in the idle update image, it is determined that there is no moving vehicle in the idle detection image, and the vehicle corresponding to the vehicle license plate detected in the idle detection image has left the area corresponding to the idle detection image.
[0074] If the vehicle license plate is recognized in the idle update image, respectively obtaining the position of the vehicle license plate in the idle detection image and the idle update image to obtain a first license plate position and a second license plate position;
[0075] If the same vehicle license plate is recognized in the idle update image and the idle detection image, the position of the vehicle license plate in the idle detection image and the idle update image is obtained respectively.
[0076] If the position distance between the first license plate position and the second license plate position is greater than a distance threshold, it is determined that the moving vehicle exists in the idle detection image, and the vehicle corresponding to the vehicle license plate is determined to be the moving vehicle;
[0077] The distance threshold can be set according to demand. If the position distance between the first license plate position and the second license plate position is greater than the distance threshold, it is determined that there is a vehicle that needs to be parked in the idle detection image, that is, there is a moving vehicle.
[0078] Optionally, in this embodiment, if the position distance between the first license plate position and the second license plate position is less than or equal to a distance threshold, it is determined that the vehicle corresponding to the license plate is not a moving vehicle, thereby preventing the wrong judgment caused by a parked vehicle that is not parked in a parking space, and improving the accuracy of the determination of moving vehicles.
[0079] Step S50, if the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time;
[0080] The entry time is acquired based on the license plate of each moving vehicle, and the time difference between the current time and each entry time is calculated respectively.
[0081] Step S60, if the time difference is less than the time threshold, deleting the vacant parking space corresponding to the vacant detection image;
[0082] Among them, if the time difference is less than or equal to the time threshold, it is determined that the moving vehicle corresponding to the time difference is a vehicle that has just entered the parking lot, that is, the moving vehicle is a vehicle that needs to be parked, and the idle parking space corresponding to the idle detection image is at a greater risk of being parked. Therefore, by deleting the idle parking space corresponding to the idle detection image, it is prevented that the idle parking space is parked in a short period of time after the parking order is shared, thereby improving the accuracy of the idle parking spaces.
[0083] In this embodiment, if the time difference is greater than the time threshold, it is determined that the mobile vehicle entry time corresponding to the time difference is longer, that is, the current driving demand of the mobile vehicle is an exit demand, and the idle parking space corresponding to the idle detection image is not currently parked at risk. The time threshold can be set according to demand, for example, the time threshold can be set to 5 minutes, 10 minutes or 15 minutes, etc.
[0084] Step S70, setting each remaining free parking space as a parking space to be parked, and determining a parking priority according to the parking space position of each parking space to be parked;
[0085] Optionally, in this step, determining the parking priority according to the parking space position of each parking space to be parked includes:
[0086] Respectively obtain the entrance and exit positions of each parking entrance in the target parking lot;
[0087] For each parking space to be parked, the parking distances to each parking entrance are calculated according to the entrance positions, and the parking entrance corresponding to the minimum parking distance is set as the target entrance of the parking space to be parked;
[0088] Respectively obtain the elevator position of each parking lot elevator in the target parking lot;
[0089] For each parking space to be parked, the walking distance between each parking entrance is calculated according to the elevator position, and the parking lot elevator corresponding to the minimum walking distance is set as the target elevator of the parking space to be parked;
[0090] For each parking space to be parked, the parking distance from the target entrance is determined as the first priority value, and the walking distance from the target elevator is determined as the second priority value;
[0091] The number of vehicles entering and exiting each parking entrance is obtained respectively, and a weight coefficient of the target entrance is determined according to the number of vehicles entering and exiting to obtain a first weight coefficient;
[0092] The number of people going up the elevators of each parking lot is obtained respectively, and a weight coefficient of the target elevator is determined according to the number of people going up the elevators to obtain a second weight coefficient;
[0093] For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient to obtain the parking priority;
[0094] Among them, the parking distance is the path distance. The first weight coefficient is obtained by calculating the quotient between the number of vehicles entering and exiting the target entrance and the total number of vehicles entering and exiting the parking entrance. The second weight coefficient is obtained by calculating the quotient between the number of people going up the target elevator and the total number of people going up the parking lot elevators.
[0095] In this step, the formula used for calculating the priority weight according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient includes:
[0096] First weight coefficient x (Q1 ÷ first priority value) + second weight coefficient x (Q2 ÷ second priority value) = parking priority;
[0097] Among them, Q1 and Q2 are preset values.
[0098] In this embodiment, if the parking distance between the parking space to be parked and the target entrance is smaller, the priority of the parking space to be parked is determined to be higher; if the walking distance between the parking space to be parked and the target elevator is smaller, the priority of the parking space to be parked is determined to be higher; if the number of vehicles entering and exiting the target entrance is larger, the priority of the parking space to be parked corresponding to the target entrance is determined to be higher; if the number of people going up the target elevator is larger, the priority of the parking space to be parked corresponding to the target entrance is determined to be higher.
[0099] Furthermore, in this embodiment, after determining the weight coefficient of the target elevator according to the number of people going up the elevator and obtaining the second weight coefficient, the method further includes:
[0100] For each parking space to be parked, the shortest path to the target parking entrance is obtained, the number of path forks of the shortest path is obtained, and the number of path forks is determined as the third priority value;
[0101] For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, second priority value, first weight coefficient, second weight coefficient and third priority value to obtain a parking priority;
[0102] The formula used for calculating the priority weight according to the corresponding first priority value, second priority value, first weight coefficient, second weight coefficient and third priority value includes:
[0103] First weight coefficient x (Q1 ÷ first priority value) + second weight coefficient x (Q2 ÷ second priority value) + third priority value ÷ Q3 = parking priority;
[0104] Among them, Q3 is a preset value. In this step, if the number of path forks is smaller, the priority of the parking space to be parked is determined to be higher.
[0105] Step S80, sorting the parking spaces to be parked according to the parking priority to obtain a list of parking spaces to be parked, and generating a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked;
[0106] Among them, the parking spaces to be parked are sorted by parking priority to obtain a list of parking spaces to be parked. Based on the list of parking spaces to be parked, it is convenient for users to view parking spaces to be parked with higher priorities. In this step, the parking order stores the parking space location of each parking space to be parked, which effectively facilitates users to query each parking space to be parked.
[0107] Optionally, in this step, after the parking spaces to be parked are sorted according to the parking priorities to obtain a list of parking spaces to be parked, the step further includes: if a parking signal is received for any of the parking spaces to be parked, deleting the parking space to be parked from the list of parking spaces to be parked.
[0108] Step S90, uploading the parking order to the blockchain, and broadcasting and sharing the parking order in the blockchain;
[0109] Among them, if a parking reservation instruction for a parking order is received, the target parking space in the parking order is determined according to the parking reservation instruction, the target parking space is deleted in the parking order, the parking order in the blockchain is updated with the deleted parking order, and the updated parking order is broadcast and shared.
[0110] Optionally, in this step, the location information of the user terminal device corresponding to the parking reservation instruction is obtained, path planning is performed according to the parking space location of the target parking space and the location information of the terminal device, the parking path is obtained, and the parking path is sent to the user terminal device, thereby facilitating the user's parking operation.
[0111] In this embodiment, each free parking space is positionally screened by the parking space position, thereby improving the accuracy of the free parking spaces; based on the parking space position of each free parking space after position screening, a free detection area can be automatically generated; by performing vehicle detection on each free detection image, it can be effectively detected whether there are moving vehicles around the free parking space corresponding to each free detection image; by comparing the time difference with the time threshold, it can be effectively determined whether the moving vehicle is a vehicle that has just entered the parking lot and needs to park; if the time difference is less than the time threshold, it is determined that the moving vehicle is a vehicle that has just entered the parking lot and needs to park; by deleting the free parking space corresponding to the free detection image, it is prevented that when the user drives the vehicle to the free parking space, there is already a parked vehicle in the free parking space, thereby improving the accuracy of parking order sharing; by uploading the parking order to the blockchain, tampering of data in the parking order is prevented; by broadcasting and sharing the parking order in the blockchain, it is convenient for users to understand the information of the parking spaces to be parked in the target parking lot, and to facilitate the parking operations of users.
[0112] Embodiment 2
[0113] See also Figure 2 , is a schematic diagram of the structure of a parking order sharing system 100 based on blockchain provided by the second embodiment of the present invention, comprising: a location acquisition module 10, a location screening module 11, an image acquisition module 12, a vehicle detection module 13, a priority determination module 14 and an order sharing module 15, wherein:
[0114] The location acquisition module 10 is used to obtain the location and number of free parking spaces in the target parking lot.
[0115] The position screening module 11 is used to screen the positions of the free parking spaces according to the positions of the parking spaces if the number of the free parking spaces is less than a number threshold.
[0116] The image acquisition module 12 is used to generate an idle detection area according to the parking space position of each idle parking space after position screening, and to respectively acquire an image of each idle detection area to obtain an idle detection image.
[0117] A vehicle detection module 13, used for performing vehicle detection on each idle detection image, wherein the vehicle detection is used for detecting whether there is a moving vehicle in the idle detection image;
[0118] If the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time;
[0119] If the time difference is less than the time threshold, the idle parking space corresponding to the idle detection image is deleted.
[0120] The priority determination module 14 is used to set the remaining vacant parking spaces as parking spaces to be parked, and determine the parking priority according to the parking space position of each parking space to be parked.
[0121] An order sharing module 15 is used to sort the parking spaces to be parked according to the parking priority, obtain a list of parking spaces to be parked, and generate a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked;
[0122] The parking order is uploaded to the blockchain, and the parking order in the blockchain is broadcast and shared.
[0123] The vehicle detection module 13 is also used to: respectively obtain the device identification of the image acquisition device corresponding to each idle detection image, and determine the parking space area according to the device identification;
[0124] Performing image screening on corresponding vacancy detection images according to the parking space area, and performing license plate recognition on each vacancy detection image after the image screening;
[0125] If a vehicle license plate is recognized in any of the idle detection images, image acquisition is performed on the idle detection area corresponding to the idle detection image to obtain an idle update image;
[0126] If the vehicle license plate is not recognized in the idle update image, determining that the moving vehicle does not exist in the idle detection image;
[0127] If the vehicle license plate is recognized in the idle update image, respectively obtaining the position of the vehicle license plate in the idle detection image and the idle update image to obtain a first license plate position and a second license plate position;
[0128] If the position distance between the first license plate position and the second license plate position is greater than a distance threshold, it is determined that the moving vehicle exists in the idle detection image, and the vehicle corresponding to the vehicle license plate is determined to be the moving vehicle.
[0129] The priority determination module 14 is also used to: respectively obtain the entrance and exit positions of each parking entrance in the target parking lot;
[0130] For each parking space to be parked, the parking distances to each parking entrance are calculated according to the entrance positions, and the parking entrance corresponding to the minimum parking distance is set as the target entrance of the parking space to be parked;
[0131] Respectively obtain the elevator position of each parking lot elevator in the target parking lot;
[0132] For each parking space to be parked, the walking distance between each parking entrance is calculated according to the elevator position, and the parking lot elevator corresponding to the minimum walking distance is set as the target elevator of the parking space to be parked;
[0133] For each parking space to be parked, the parking distance from the target entrance is determined as the first priority value, and the walking distance from the target elevator is determined as the second priority value;
[0134] The number of vehicles entering and exiting each parking entrance is obtained respectively, and a weight coefficient of the target entrance is determined according to the number of vehicles entering and exiting to obtain a first weight coefficient;
[0135] The number of people going up the elevators of each parking lot is obtained respectively, and a weight coefficient of the target elevator is determined according to the number of people going up the elevators to obtain a second weight coefficient;
[0136] For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient to obtain the parking priority.
[0137] The order sharing module 15 is further configured to: if a parking signal is received for any of the parking spaces to be parked, delete the parking space to be parked from the parking space list.
[0138] In this embodiment, each free parking space is positionally screened by the parking space position, thereby improving the accuracy of the free parking spaces; based on the parking space position of each free parking space after the position screening, a free detection area can be automatically generated; by performing vehicle detection on each free detection image, it can be effectively detected whether there are moving vehicles around the free parking space corresponding to each free detection image; by comparing the time difference with the time threshold, it can be effectively determined whether the moving vehicle is a vehicle that has just entered the parking lot and needs to park; if the time difference is less than the time threshold, it is determined that the moving vehicle is a vehicle that has just entered the parking lot and needs to park; by deleting the free parking space corresponding to the free detection image, it is prevented that when the user drives the vehicle to the free parking space, there is already a parked vehicle in the free parking space, thereby improving the accuracy of parking order sharing; by uploading the parking order to the blockchain, tampering of data in the parking order is prevented; by broadcasting and sharing the parking order in the blockchain, it is convenient for users to understand the information of the parking spaces to be parked in the target parking lot, and it is convenient for users to park.
[0139] Embodiment 3
[0140] Figure 3 2 is a block diagram of a terminal device 2 provided in the third embodiment of the present application. Figure 3 As shown, the terminal device 2 of this embodiment includes: a processor 20, a memory 21, and a computer program 22 stored in the memory 21 and executable on the processor 20, such as a program of a parking order sharing method based on blockchain. When the processor 20 executes the computer program 22, the steps in each embodiment of the above-mentioned parking order sharing method based on blockchain are implemented.
[0141] Exemplarily, the computer program 22 may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 20 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 22 in the terminal device 2. The terminal device may include, but is not limited to, a processor 20 and a memory 21.
[0142] The processor 20 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0143] The memory 21 may be an internal storage unit of the terminal device 2, such as a hard disk or memory of the terminal device 2. The memory 21 may also be an external storage device of the terminal device 2, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 2. Further, the memory 21 may also include both an internal storage unit and an external storage device of the terminal device 2. The memory 21 is used to store the computer program and other programs and data required by the terminal device. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0144] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional unit.
[0145] If the integrated module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium can be non-volatile or volatile. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in computer-readable storage media can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0146] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A parking order sharing method based on blockchain, It is characterized in that The method comprises: Obtain the parking space locations and the number of free parking spaces in the target parking lot; If the number of available parking spaces is less than the number threshold, each available parking space is screened according to the parking space location; Generate an idle detection area according to the parking space position of each idle parking space after position screening, and collect images of each idle detection area to obtain an idle detection image; Performing vehicle detection on each idle detection image, wherein the vehicle detection is used to detect whether there is a moving vehicle in the idle detection image; If the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time; If the time difference is less than the time threshold, deleting the vacant parking space corresponding to the vacant detection image; The remaining vacant parking spaces are set as waiting parking spaces, and the parking priority is determined according to the parking space positions of the waiting parking spaces; Sorting the parking spaces to be parked according to the parking priority to obtain a list of parking spaces to be parked, and generating a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked; The parking order is uploaded to the blockchain, and the parking order in the blockchain is broadcast and shared.
2. The parking order sharing method based on blockchain as claimed in claim 1, It is characterized in that Perform vehicle detection on each idle detection image, including: Obtaining the device identification of the image acquisition device corresponding to each vacancy detection image respectively, and determining the parking space area according to the device identification; Performing image screening on corresponding vacancy detection images according to the parking space area, and performing license plate recognition on each vacancy detection image after the image screening; If a vehicle license plate is recognized in any of the idle detection images, image acquisition is performed on the idle detection area corresponding to the idle detection image to obtain an idle update image; If the vehicle license plate is not recognized in the idle update image, determining that the moving vehicle does not exist in the idle detection image; If the vehicle license plate is recognized in the idle update image, respectively obtaining the position of the vehicle license plate in the idle detection image and the idle update image to obtain a first license plate position and a second license plate position; If the position distance between the first license plate position and the second license plate position is greater than a distance threshold, it is determined that the moving vehicle exists in the idle detection image, and the vehicle corresponding to the vehicle license plate is determined to be the moving vehicle.
3. The parking order sharing method based on blockchain as claimed in claim 1, It is characterized in that The parking priority is determined according to the location of each parking space to be parked, including: Respectively obtain the entrance and exit positions of each parking entrance in the target parking lot; For each parking space to be parked, the parking distances to each parking entrance are calculated according to the entrance positions, and the parking entrance corresponding to the minimum parking distance is set as the target entrance of the parking space to be parked; Respectively obtain the elevator position of each parking lot elevator in the target parking lot; For each parking space to be parked, the walking distance between each parking entrance is calculated according to the elevator position, and the parking lot elevator corresponding to the minimum walking distance is set as the target elevator of the parking space to be parked; For each parking space to be parked, the parking distance from the target entrance is determined as the first priority value, and the walking distance from the target elevator is determined as the second priority value; The number of vehicles entering and exiting each parking entrance is obtained respectively, and a weight coefficient of the target entrance is determined according to the number of vehicles entering and exiting to obtain a first weight coefficient; The number of people going up the elevators of each parking lot is obtained respectively, and a weight coefficient of the target elevator is determined according to the number of people going up the elevators to obtain a second weight coefficient; For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient to obtain the parking priority.
4. The parking order sharing method based on blockchain as claimed in claim 1, It is characterized in that After sorting the parking spaces to be parked according to the parking priorities to obtain a list of parking spaces to be parked, the method further includes: If a parking signal for any of the parking spaces to be parked is received, the parking space to be parked is deleted from the parking space list.
5. A parking order sharing system based on blockchain, It is characterized in that The system comprises: A location acquisition module is used to acquire the location and number of free parking spaces in a target parking lot; A position screening module, configured to screen the positions of the free parking spaces according to the positions of the parking spaces if the number of free parking spaces is less than a number threshold; An image acquisition module is used to generate an idle detection area according to the parking space position of each idle parking space after position screening, and to acquire an image of each idle detection area to obtain an idle detection image; A vehicle detection module, used to perform vehicle detection on each idle detection image, wherein the vehicle detection is used to detect whether there is a moving vehicle in the idle detection image; If the moving vehicle exists in any of the idle detection images, obtaining the entry time of the moving vehicle, and calculating the time difference between the current time and the entry time; If the time difference is less than the time threshold, deleting the vacant parking space corresponding to the vacant detection image; The priority determination module is used to set each remaining free parking space as a parking space to be parked, and determine the parking priority according to the parking space position of each parking space to be parked; An order sharing module is used to sort the parking spaces to be parked according to the parking priority, obtain a list of parking spaces to be parked, and generate a parking order according to the parking space position of each parking space to be parked and the list of parking spaces to be parked; The parking order is uploaded to the blockchain, and the parking order in the blockchain is broadcast and shared.
6. The parking order sharing system based on blockchain as claimed in claim 5, It is characterized in that The vehicle detection module is further used for: Obtaining the device identification of the image acquisition device corresponding to each vacancy detection image respectively, and determining the parking space area according to the device identification; Performing image screening on corresponding vacancy detection images according to the parking space area, and performing license plate recognition on each vacancy detection image after the image screening; If a vehicle license plate is recognized in any of the idle detection images, image acquisition is performed on the idle detection area corresponding to the idle detection image to obtain an idle update image; If the vehicle license plate is not recognized in the idle update image, determining that the moving vehicle does not exist in the idle detection image; If the vehicle license plate is recognized in the idle update image, respectively obtaining the position of the vehicle license plate in the idle detection image and the idle update image to obtain a first license plate position and a second license plate position; If the position distance between the first license plate position and the second license plate position is greater than a distance threshold, it is determined that the moving vehicle exists in the idle detection image, and the vehicle corresponding to the vehicle license plate is determined to be the moving vehicle.
7. The parking order sharing system based on blockchain as claimed in claim 5, It is characterized in that The priority determination module is also used for: Respectively obtain the entrance and exit positions of each parking entrance in the target parking lot; For each parking space to be parked, the parking distances to each parking entrance are calculated according to the entrance positions, and the parking entrance corresponding to the minimum parking distance is set as the target entrance of the parking space to be parked; Respectively obtain the elevator position of each parking lot elevator in the target parking lot; For each parking space to be parked, the walking distance between each parking entrance is calculated according to the elevator position, and the parking lot elevator corresponding to the minimum walking distance is set as the target elevator of the parking space to be parked; For each parking space to be parked, the parking distance from the target entrance is determined as the first priority value, and the walking distance from the target elevator is determined as the second priority value; The number of vehicles entering and exiting each parking entrance is obtained respectively, and a weight coefficient of the target entrance is determined according to the number of vehicles entering and exiting to obtain a first weight coefficient; The number of people going up the elevators of each parking lot is obtained respectively, and a weight coefficient of the target elevator is determined according to the number of people going up the elevators to obtain a second weight coefficient; For each parking space to be parked, priority weight calculation is performed according to the corresponding first priority value, the second priority value, the first weight coefficient and the second weight coefficient to obtain the parking priority.
8. The parking order sharing system based on blockchain as claimed in claim 5, It is characterized in that The order sharing module is also used for: If a parking signal for any of the parking spaces to be parked is received, the parking space to be parked is deleted from the parking space list.
