Parking space distribution method, system and equipment for realizing parking lot visitor reservation based on wooden barrel principle, medium and product
By adopting a parking space allocation method based on the principle of wooden barrels in the parking lot management system and using the wooden barrel algorithm to process parking space allocation requests, the problems of low parking space allocation efficiency, waste of resources and confusion in the existing system are solved, and more efficient parking space allocation and more orderly on-site traffic are achieved.
Patent Information
- Application Number
- CN202411957580.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-27
AI Technical Summary
The existing parking lot management system has problems such as inefficient parking space allocation, inability to respond in real time to parking demand, waste of parking resources, and confusion in the site.
The parking space allocation method based on the wooden barrel principle is adopted. By obtaining the parking space allocation requests for the reservation vehicle, a blocked queue is created, and a wooden barrel algorithm is used to determine whether to allocate parking spaces based on the parking space allocation status and records to achieve efficient allocation of parking spaces.
It improves the efficiency of parking space reservation allocation in parking lots, solves the problems of untimely allocation of parking spaces and waste of resources, and improves traffic order in the site.
Smart Images

Figure CN120048146A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, device, medium and product for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle. Background Art
[0002] With the increase in the demand for parking spaces in parking lots, the popularization of Internet-based parking management systems, and the development of intelligent connected vehicles, the degree of intelligence in vehicle parking management has been greatly improved. However, in terms of parking space allocation in existing parking lot management systems, most still adopt management methods of fixed or random parking space allocation. It is necessary for administrators to manage parking spaces manually and allocate parking spaces in the parking lot manually, which has problems such as being unable to be adjusted at any time, time-consuming and laborious in the allocation process; and being unable to respond in real time to rapidly changing parking demands. In addition, there is currently a parking space management method of randomly allocating parking spaces by the system, but it cannot completely solve the problem of waste of parking resources in the parking lot; and there are currently problems such as chaotic and disorderly traffic in the parking lot and disorderly traffic organization during peak hours in the field.
[0003] Therefore, it is necessary to provide a parking space allocation method to solve the above problems. Summary of the Invention
[0004] The purpose of the present application is to provide a method, system, device, medium and product for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle, which improves the efficiency of the parking space reservation allocation process in the parking lot.
[0005] To achieve the above purpose, the present application provides the following solutions:
[0006] In the first aspect, the present application provides a method for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle. The method for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle includes:
[0007] Obtain parking space allocation requests of multiple reserved vehicles; the parking space allocation request includes: license plate number, reserved parking lot name, reserved parking area name, reserved start time period, driver information, and whether the reserved vehicle has been allocated a parking space;
[0008] Create a blocking queue based on the parking space allocation requests of multiple reserved vehicles;
[0009] Take any reserved vehicle in the blocking queue as the current reserved vehicle. For the current reserved vehicle:
[0010] Determine the parking lot parking space information corresponding to the current reserved vehicle based on the parking space allocation request of the current reserved vehicle; the parking lot parking space information includes: parking area name and parking space number;
[0011] Obtain the allocated parking space allocation requests for the reservation date, and determine the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation requests for the reservation date and the parking lot space information of the reservation parking lot; the parking space allocation status includes: allocated and unallocated; the reservation date is the date on which the reservation start time period is located.
[0012] Obtain the parking space allocation records of the reservation parking lot on the reservation date, and determine the hourly parking space allocation records of the reservation parking lot on the reservation date based on the parking space allocation records of the reservation parking lot on the reservation date; the parking space allocation records include: parking space allocation time period, license plate number, and parking lot space information.
[0013] Adopt the bucket algorithm, and based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the hourly parking space allocation records of the reservation parking lot on the reservation date, determine whether to allocate a parking space to the current reserved vehicle within the reservation start time period, and complete the parking space allocation of the current reserved vehicle.
[0014] Update the next vehicle in the blocking queue after the current reserved vehicle to the current reserved vehicle, and return to execute "determine the parking lot space information of the corresponding reservation parking lot based on the parking space allocation request of the current reserved vehicle" until the parking space allocation of all vehicles in the blocking queue is completed.
[0015] Optionally, determining the parking lot space information of the corresponding reservation parking lot based on the parking space allocation request of the current reserved vehicle specifically includes:
[0016] Based on the reservation parking lot name in the parking space allocation request of the current reserved vehicle, determine the parking lot that matches the reservation parking lot name, so as to determine the corresponding parking lot space information.
[0017] Optionally, determining the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation requests for the reservation date and the parking lot space information of the reservation parking lot specifically includes:
[0018] Based on the reservation parking lot name, reservation parking area name, and whether the reserved vehicle is allocated a parking space in the allocated parking space allocation requests for the reservation date, determine the parking space allocation status of each parking space in the reservation parking lot.
[0019] Optionally, adopting the bucket algorithm, and based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the hourly parking space allocation records of the reservation parking lot on the reservation date, determine whether to allocate a parking space to the current reserved vehicle within the reservation start time period specifically includes:
[0020] Based on the parking space allocation request of the current reserved vehicle, determine the reservation start time period of the current reserved vehicle.
[0021] Determine the unallocated parking spaces based on the parking space allocation status of each parking space in the reserved parking lot;
[0022] Determine the parking space allocation time period based on the parking space allocation records of each hour on the reservation day in the reserved parking lot;
[0023] Based on the barrel algorithm, determine whether to allocate the unallocated parking space to the current reserved vehicle during the reservation start time period.
[0024] Optionally, based on the barrel algorithm, determine whether to allocate the unallocated parking space to the current reserved vehicle during the reservation start time period, specifically including:
[0025] Based on the barrel algorithm, sort the time differences between the parking space allocation time period and the reservation start time period of the current reserved vehicle in descending order to obtain a descending order sorting result;
[0026] Search whether there are unallocated parking spaces in the parking space allocation time period corresponding to the time difference according to the descending order sorting result;
[0027] If so, allocate the unallocated parking space in the parking space allocation time period corresponding to the first time difference searched to the current reserved vehicle during the reservation start time period;
[0028] If not, do not allocate a parking space to the current reserved vehicle during the reservation start time period.
[0029] In a second aspect, the present application provides a parking space allocation system for realizing visitor reservation in a parking lot based on the barrel principle. The parking space allocation system for realizing visitor reservation in a parking lot based on the barrel principle is used to implement the parking space allocation method for realizing visitor reservation in a parking lot based on the barrel principle. The parking space allocation system for realizing visitor reservation in a parking lot based on the barrel principle includes:
[0030] A parking space allocation request acquisition unit, configured to acquire parking space allocation requests of multiple reserved vehicles; the parking space allocation request includes: license plate number, reserved parking lot name, reserved parking area name, reservation start time period, driver information, and whether the reserved vehicle is allocated a parking space;
[0031] A blocking queue creation unit, configured to create a blocking queue based on the parking space allocation requests of multiple reserved vehicles;
[0032] A current reserved vehicle determination unit, configured to use any reserved vehicle in the blocking queue as the current reserved vehicle, for the current reserved vehicle;
[0033] A parking lot parking space information determination unit of the reserved parking lot, configured to determine the parking lot parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle; the parking lot parking space information includes: parking area name and parking space number;
[0034] A parking space allocation status determination unit, configured to obtain the allocated parking space allocation requests on the reservation date, and determine the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation requests on the reservation date and the parking lot space information of the reservation parking lot; the parking space allocation status includes: allocated and unallocated; the reservation date is the date where the reservation start time period is located.
[0035] A determination unit for the hourly parking space allocation record of the reservation parking lot on the reservation date, configured to obtain the parking space allocation record of the reservation parking lot on the reservation date, and determine the hourly parking space allocation record of the reservation parking lot on the reservation date based on the parking space allocation record of the reservation parking lot on the reservation date; the parking space allocation record includes: parking space allocation time period, license plate number, and parking lot space information.
[0036] A parking space allocation unit, configured to use the bucket algorithm to determine whether to allocate a parking space to the current reservation vehicle within the reservation start time period based on the parking space allocation request of the current reservation vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the hourly parking space allocation record of the reservation parking lot on the reservation date, and complete the parking space allocation of the current reservation vehicle.
[0037] A current reservation vehicle update unit, configured to update the next vehicle of the current reservation vehicle in the blocking queue to the current reservation vehicle, and return to execute "determine the parking lot space information of the corresponding reservation parking lot based on the parking space allocation request of the current reservation vehicle", until the parking space allocation of all vehicles in the blocking queue is completed.
[0038] Optionally, the parking space allocation unit specifically includes:
[0039] A determination unit for the reservation start time period of the current reservation vehicle, configured to determine the reservation start time period of the current reservation vehicle based on the parking space allocation request of the current reservation vehicle.
[0040] An unallocated parking space determination unit, configured to determine the unallocated parking spaces based on the parking space allocation status of each parking space in the reservation parking lot.
[0041] A parking space allocation time period determination unit, configured to determine the parking space allocation time period based on the hourly parking space allocation record of the reservation parking lot on the reservation date.
[0042] A parking space allocation unit, configured to determine whether to allocate the unallocated parking space to the current reservation vehicle within the reservation start time period based on the bucket algorithm.
[0043] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the parking space allocation method for visitor reservation in a parking lot based on the bucket principle as described in any one of the above.
[0044] Fourthly, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle described in any one of the above is implemented.
[0045] Fifthly, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the method for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle described in any one of the above is implemented.
[0046] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0047] The present application discloses a method, system, device, medium and product for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle. The method includes obtaining parking space allocation requests of multiple reserved vehicles and creating a blocking queue; taking any reserved vehicle in the blocking queue as the current reserved vehicle, and determining the parking space information of the reservation parking lot based on the parking space allocation request of the current reserved vehicle; determining the parking space allocation status of each parking space in the reservation parking lot based on the already allocated parking space allocation requests and the parking space information on the reservation date; determining the hourly parking space allocation records of the reservation parking lot on the reservation date based on the parking space allocation records; and using the barrel algorithm to determine whether to allocate a parking space to the current reserved vehicle within the reservation start time period based on the parking space allocation request, the parking space allocation status and the hourly parking space allocation records of the current reserved vehicle, so as to complete the parking space allocation for the current reserved vehicle. The present application uses the barrel algorithm to improve the efficiency of allocating reserved parking spaces in a parking lot. Description of the Drawings
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 Schematic flowchart of the method for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle provided in an embodiment of the present application;
[0050] Figure 2 Schematic diagram of the functional modules of a system for allocating parking spaces for visitors' reservation in a parking lot based on the barrel principle provided in an embodiment of the present application;
[0051] Figure 3 Schematic diagram of the structure of a computer device provided in an embodiment of the present application.
[0052] Reference Signs:
[0053] Parking space allocation request acquisition unit - 1, blocking queue creation unit - 2, current reservation vehicle determination unit - 3, parking lot space information determination unit of the reservation parking lot - 4, parking space allocation status determination unit - 5, hourly parking space allocation record determination unit of the reservation parking lot on the reservation day - 6, parking space allocation unit - 7, current reservation vehicle update unit - 8. Detailed implementation manners
[0054] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0055] To make the above - mentioned objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the drawings and specific implementation manners.
[0056] In an exemplary embodiment, as Figure 1 shown, a parking space allocation method for realizing visitor reservation in a parking lot based on the barrel principle is provided, including the following steps S1 to S8. Among them:
[0057] Step S1, acquire parking space allocation requests of multiple reservation vehicles; the parking space allocation request includes: license plate number, reservation parking lot name, reservation parking area name, reservation start time period, driver information, and whether the reservation vehicle has been allocated a parking space.
[0058] Specifically, before being put into use, the parking lot space information, vehicle information entering the parking lot, and driver information are collected in advance. The parking lot space information includes: parking lot name, parking space number; the vehicle information entering the parking lot includes: license plate number, parking lot name, driver's name; the driver information includes: name, ID number, mobile phone number.
[0059] Designate a parking area:
[0060] The parking area information includes: parking area name, parking lot name.
[0061] Allocate parking spaces for the parking area: Perform a relationship match on the corresponding parking area information and the parking lot space information to obtain:
[0062] The parking lot space information includes: parking area name, parking space number.
[0063] For example, a certain parking lot has a name of "Parking Lot A", and the parking space numbers range from "000" to "100", among which "090" to "091". Then the recorded parking area information is:
[0064] Parking area information: The name of the parking area is "Parking Area B of Parking Lot A", and the name of the parking lot is "Parking Lot A".
[0065] The parking lot space information is as follows:
[0066] The name of the parking area is "Parking Area B of Parking Lot A" and the parking space number is "090".
[0067] The name of the parking area is "Parking Area C of Parking Lot A" and the parking space number is "091".
[0068] Step S2, create a blocking queue based on the parking space allocation requests of multiple reserved vehicles.
[0069] Step S3, take any reserved vehicle in the blocking queue as the current reserved vehicle, for the current reserved vehicle.
[0070] Step S4, based on the parking space allocation request of the current reserved vehicle, determine the parking lot space information of the corresponding reserved parking lot; the parking lot space information includes: the name of the parking area and the parking space number.
[0071] Among them, based on the name of the reserved parking lot in the parking space allocation request of the current reserved vehicle, determine the parking lot that matches the name of the reserved parking lot, so as to determine the corresponding parking lot space information.
[0072] Before step S5, it further includes:
[0073] 1) Determine whether the parking space allocation request of the current reserved vehicle has processing conditions:
[0074] If the name of the reserved parking lot in the parking space allocation request of the current reserved vehicle does not match the specified parking lot name, no parking space will be allocated.
[0075] 2) If the allowable parking start time or allowable parking end time of the parking space allocation request of the current reserved vehicle is not tomorrow, no parking space will be allocated.
[0076] 3) For the parking space allocation request of the current reserved vehicle that meets the aforementioned processing conditions:
[0077] a) Set the field of whether the parking space has been allocated to "no".
[0078] b) Remove it from the blocking queue.
[0079] c) Store it in the relational database.
[0080] Step S5: Obtain the allocated parking space allocation requests for the reservation date, and determine the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation requests for the reservation date and the parking lot parking space information of the reservation parking lot; the parking space allocation status includes: allocated and unallocated; the reservation date is the date on which the reservation start time period is located.
[0081] Among them, based on the reservation parking lot name, reservation parking area name, and whether the reservation vehicle is allocated a parking space in the allocated parking space allocation request for the reservation date, determine the parking space allocation status of each parking space in the reservation parking lot.
[0082] Specifically, obtain from the parking space allocation request information of the reservation parking lot all the parking space allocation request information whose parking area name is the same as the reservation parking area name, the allocation status is allocated, and the permitted parking start time and permitted parking end time (i.e., the reservation start time period) are both within 00:00 - 23:59:59 tomorrow (i.e., the reservation date), to obtain the allocated parking space allocation requests.
[0083] Step S6: Obtain the parking space allocation records of the reservation parking lot on the reservation date, and determine the hourly parking space allocation records of the reservation parking lot on the reservation date based on the parking space allocation records of the reservation parking lot on the reservation date; the parking space allocation records include: parking space allocation time period, license plate number, and parking lot parking space information.
[0084] Step S7: Use the barrel algorithm to determine whether to allocate a parking space to the current reservation vehicle within the reservation start time period based on the parking space allocation request of the current reservation vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the hourly parking space allocation records of the reservation parking lot on the reservation date, to complete the parking space allocation of the current reservation vehicle.
[0085] As an optional implementation manner, step S7 specifically includes:
[0086] Step S71: Determine the reservation start time period of the current reservation vehicle based on the parking space allocation request of the current reservation vehicle.
[0087] Step S72: Determine the unallocated parking spaces based on the parking space allocation status of each parking space in the reservation parking lot.
[0088] Step S73: Determine the parking space allocation time period based on the hourly parking space allocation records of the reservation parking lot on the reservation date. The purpose of this step is to reduce the time range of parking space allocation from the conventional day to hour, and allocate parking spaces according to the requirements of the parking space allocation request to be allocated, improving the flexibility of parking space allocation.
[0089] Step S74: Determine whether to allocate the unallocated parking space to the current reservation vehicle within the reservation start time period based on the barrel algorithm.
[0090] As an alternative implementation, step S74 specifically includes:
[0091] Step S741: Based on the bucket algorithm, sort the time differences between the current reservation vehicle's reservation start time period and the time periods of the parking space allocation in descending order to obtain a descending order result.
[0092] Step S742: Search whether there are unallocated parking spaces in the parking space allocation time period corresponding to the time difference according to the descending order result.
[0093] Step S743: If so, allocate the unallocated parking space in the parking space allocation time period corresponding to the first time difference searched to the current reservation vehicle at the reservation start time period.
[0094] Step S744: If not, do not allocate a parking space to the current reservation vehicle at the reservation start time period.
[0095] Specifically, take any parking space in the reservation parking lot as the currently inspected parking space.
[0096] Obtain the parking space allocation record of the currently inspected parking space in the parking space allocation record of the reservation parking lot on the reservation day, and use the bucket algorithm to calculate whether the currently inspected parking space allows the parking space allocation request (i.e., the current reservation vehicle) of the current reservation vehicle.
[0097] 1) Set the parking space allocation inspection time, that is, the time period 00:00 - 23:59:59 corresponding to the reservation day.
[0098] 2) Obtain the parking space allocation status of the currently inspected parking space at the parking space allocation inspection time.
[0099] 3) Obtain the hourly allocation requirement (i.e., the reservation start time period) of the parking space allocation request of the current reservation vehicle at the parking space allocation inspection time.
[0100] 4) Calculate whether the currently inspected parking space allows the parking space allocation request of the current reservation vehicle at the parking space allocation inspection time according to formula (1):
[0101] tvHdi = (Hc(i5) ^ Ha(i4,i5)) | (!Ha(i4,i5)) (1)
[0102] In the formula: Ha(i4,i5) is the parking space allocation status of the currently inspected parking space at the parking space allocation inspection time; Hc(i5) is the hourly allocation requirement of the parking space allocation request of the current reservation vehicle at the parking space allocation inspection time; ^ is the "exclusive OR" operator; | is the "OR" operator;! is the "NOT" operator, and tvHdi is the calculation result.
[0103] Then, 6) Judge whether the parking space allocation request of the current reservation vehicle is allowed to be allocated.
[0104] 7) If tvHdi = 0, allocation is not allowed and the next parking space needs to be checked.
[0105] 8) If tvHdi = 1, parking space allocation is allowed.
[0106] Finally, 9) Determine whether the process of allocating a parking space for the current reserved vehicle's parking space allocation request is completed.
[0107] 10) Obtain the parking space allocation check time.
[0108] 11) If the parking space allocation check time is not 23:00, the calculation is not completed, and it is necessary to save and set the parking space allocation check time to the next hour.
[0109] 12) If the parking space allocation check time is 23:00 and the calculation is completed, save the hourly parking space allocation record to the parking space allocation record.
[0110] Furthermore, using the bucket algorithm and the exclusive OR operation method, establish the connection between the current allocation status of the parking space and whether the parking space is allocated to the corresponding parking space allocation request. If the current parking space is occupied, it cannot be allocated; if it is not occupied, allocation is allowed.
[0111] 13) Set the allocation check time for unallocated parking spaces.
[0112] 14) Calculate whether the currently checked parking space to be allocated is allowed to be allocated to the current parking space allocation request for the unallocated parking space allocation check time.
[0113] 15) Obtain the allocation situation of the currently checked parking space to be allocated in the parking space allocation record for the unallocated parking space allocation check time.
[0114] 16) Obtain the hourly allocation requirement of the current parking space allocation request for the unallocated parking space allocation check time.
[0115] 17) Calculate whether allocation is allowed:
[0116] tvHdk = (Hd(i8) ^ Ha(i7,i8) | (!Ha(i7,i8))(2)
[0117] In the formula: tvHdk is the result, Ha(i7,i8) is the allocation situation of the currently checked parking space to be allocated in the parking space allocation record for the unallocated parking space allocation check time; Hd(i8) is the hourly allocation requirement of the current parking space allocation request for the unallocated parking space allocation check time, and tvHdk is the calculation result.
[0118] 18) Determine whether the current parking space allocation request meets the allocation requirements.
[0119] The purpose of this step is to attempt to request the allocation of the next parking space only when the currently allocated parking space cannot meet the requirements of the parking space allocation request for the to-be-allocated parking space. It realizes the on-demand allocation of parking spaces and ensures the orderly progress of the parking space allocation process.
[0120] a. If tvHdk = 0, the allocation condition is not met, and the next parking space needs to be checked.
[0121] b. If tvHdk = 1, the allocation condition is met.
[0122] In step S8, the next vehicle in the blocking queue after the current reserved vehicle is updated to the current reserved vehicle, and then return to execute "determine the parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle" until the parking space allocation for all vehicles in the blocking queue is completed.
[0123] Specifically, determine whether the parking space allocation is completed:
[0124] 1) If the current parking space allocation request is not the last allocated parking space allocation request, the calculation is not completed, and the next allocated parking space allocation request is taken.
[0125] 2) If the current parking space allocation request is the last allocated parking space allocation request, the parking space allocation calculation is completed, and the parking space allocation records for all allocated parking space allocation requests are obtained.
[0126] The beneficial effects of this application:
[0127] Compared with the fixed-allocation parking lot space allocation method, this application calculates whether the current parking space is allowed to be allocated by using the principle of the barrel algorithm, linking the status of the current parking space with the allocation situation of the parking space. It solves the problem that the previous fixed parking space allocation method cannot adjust the parking space allocation in a timely manner. By calculating the pre-allocated list, it realizes the matching of the required number of parking spaces and the actual number of allocated parking spaces; it solves the problem of the rough parking space allocation method of fixed allocation. Compared with the parking space distribution method of randomly allocating parking spaces, by setting up a blocking queue to process parking space allocation requests one by one and using the principle of the barrel algorithm to calculate whether the current parking space is allowed to be allocated, it solves the problem of disorderly traffic in the parking lot during peak hours and improves the utilization efficiency of the parking lot spaces.
[0128] Based on the same inventive concept, an embodiment of the present application further provides a system for allocating parking spaces for visitors' reservation in a parking lot based on the bucket principle, which is used to implement the method for allocating parking spaces for visitors' reservation in a parking lot based on the bucket principle as described above. The implementation solutions provided by this system to solve problems are similar to those described in the above method. Therefore, the specific limitations in one or more embodiments of the system for allocating parking spaces for visitors' reservation in a parking lot based on the bucket principle provided below can refer to the limitations on the method for allocating parking spaces for visitors' reservation in a parking lot based on the bucket principle in the above text, and will not be repeated here.
[0129] In an exemplary embodiment, as Figure 2 shown, a system for allocating parking spaces for visitors' reservation in a parking lot based on the bucket principle is provided, including:
[0130] A parking space allocation request acquisition unit 1, configured to acquire parking space allocation requests of multiple reserved vehicles; the parking space allocation requests include: license plate number, reserved parking lot name, reserved parking area name, reserved start time period, driver information, and whether the reserved vehicle has been allocated a parking space.
[0131] A blocking queue creation unit 2, configured to create a blocking queue based on the parking space allocation requests of multiple reserved vehicles.
[0132] A current reserved vehicle determination unit 3, configured to use any reserved vehicle in the blocking queue as the current reserved vehicle, for the current reserved vehicle.
[0133] A parking lot's parking space information determination unit 4 for the reserved parking lot, configured to determine the parking lot's parking space information corresponding to the current reserved vehicle's parking space allocation request based on the current reserved vehicle's parking space allocation request; the parking space information includes: parking area name and parking space number.
[0134] A parking space allocation status determination unit 5, configured to acquire the allocated parking space allocation requests on the reservation day, and determine the parking space allocation status of each parking space in the reserved parking lot based on the allocated parking space allocation requests on the reservation day and the parking lot's parking space information in the reserved parking lot; the parking space allocation status includes: already allocated and not allocated; the reservation day is the day where the reserved start time period is located.
[0135] A determination unit 6 for the hourly parking space allocation record of the reserved parking lot on the reservation day, configured to acquire the parking space allocation record of the reserved parking lot on the reservation day, and determine the hourly parking space allocation record of the reserved parking lot on the reservation day based on the parking space allocation record of the reserved parking lot on the reservation day; the parking space allocation record includes: parking space allocation time period, license plate number, and parking lot's parking space information.
[0136] A parking space allocation unit 7, which is used to adopt the wooden barrel algorithm and determine whether to allocate a parking space to the current reserved vehicle within the reserved start time period based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reserved parking lot, and the hourly parking space allocation record of the reserved parking lot on the reserved day, so as to complete the parking space allocation of the current reserved vehicle.
[0137] A current reserved vehicle update unit 8, which is used to update the next vehicle of the current reserved vehicle in the blocking queue to the current reserved vehicle and return to execute "determine the parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle", until the parking space allocation of all vehicles in the blocking queue is completed.
[0138] As an optional implementation manner, the parking space allocation unit 7 specifically includes:
[0139] A reserved start time period determination unit for the current reserved vehicle, which is used to determine the reserved start time period of the current reserved vehicle based on the parking space allocation request of the current reserved vehicle.
[0140] An unallocated parking space determination unit, which is used to determine the unallocated parking spaces based on the parking space allocation status of each parking space in the reserved parking lot.
[0141] A parking space allocation time period determination unit, which is used to determine the parking space allocation time period based on the hourly parking space allocation record of the reserved parking lot on the reserved day.
[0142] A parking space allocation unit, which is used to determine whether to allocate the unallocated parking spaces to the current reserved vehicle within the reserved start time period based on the wooden barrel algorithm.
[0143] In an exemplary embodiment, a computer device is provided, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement a parking space allocation method for visitor reservation in a parking lot based on the wooden barrel principle.
[0144] In an exemplary embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, it implements a parking space allocation method for visitor reservation in a parking lot based on the wooden barrel principle.
[0145] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, it implements a parking space allocation method for visitor reservation in a parking lot based on the wooden barrel principle.
[0146] In an exemplary embodiment, a computer device is provided, and the computer device can be a server or a terminal, and its internal structure diagram can be as Figure 3As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it realizes a method for allocating parking spaces for visitors' appointments in a parking lot based on the bucket principle.
[0147] Those skilled in the art can understand that Figure 3 the structure shown in the figure is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0148] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0149] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0150] In the embodiments provided in the present application, the databases involved can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. In the embodiments provided in the present application, the processors involved can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0151] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0152] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A parking space allocation method for parking lot visitor reservation based on the barrel principle, characterized in that: The parking space allocation method for realizing parking lot visitor reservation based on the barrel principle includes: Obtaining parking space allocation requests for multiple reserved vehicles; the parking space allocation requests include: license plate number, reserved parking lot name, reserved parking area name, reserved start time period, driver information, and whether the reserved vehicle is allocated a parking space; Creating a blocking queue based on parking allocation requests from multiple reserved vehicles; Take any reserved vehicle in the blocking queue as the current reserved vehicle; Based on the parking space allocation request of the currently reserved vehicle, determine the parking space information of the corresponding reserved parking lot; the parking space information includes: parking area name and parking space number; Obtaining an allocated parking space allocation request for the reservation date, and determining the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation request for the reservation date and the parking space information of the reservation parking lot; the parking space allocation status includes: allocated and unallocated; the reservation date is the date of the reservation start time period; Obtaining a parking space allocation record of the reserved parking lot on the reservation day, and determining a parking space allocation record for each hour of the reserved parking lot on the reservation day based on the parking space allocation record of the reserved parking lot on the reservation day; the parking space allocation record includes: a parking space allocation time period, a license plate number, and parking space information of the parking lot; The wooden barrel algorithm is used to determine whether a parking space is allocated to the current reserved vehicle within the reservation start time period based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the parking space allocation record of the reservation parking lot every hour on the reservation day, and complete the parking space allocation for the current reserved vehicle; Update the next vehicle in the blocking queue to the current reserved vehicle, and return to execute "determine the parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle" until the parking space allocation of all vehicles in the blocking queue is completed.
2. The parking space allocation method for realizing parking lot visitor reservation based on the barrel principle according to claim 1 is characterized in that: Based on the parking space allocation request of the current reserved vehicle, the parking space information of the corresponding reserved parking lot is determined, specifically including: Based on the reserved parking lot name in the parking space allocation request of the current reserved vehicle, a parking lot matching the reserved parking lot name is determined, thereby determining the corresponding parking lot parking space information.
3. The parking space allocation method for realizing parking lot visitor reservation based on the barrel principle according to claim 1 is characterized in that: Based on the allocated parking space allocation request on the reservation date and the parking space information of the reservation parking lot, the parking space allocation status of each parking space in the reservation parking lot is determined, specifically including: The parking space allocation status of each parking space in the reserved parking lot is determined based on the reserved parking lot name, the reserved parking area name and whether the reserved vehicle is allocated a parking space in the allocated parking space allocation request on the reserved day.
4. The parking space allocation method for realizing parking lot visitor reservation based on the barrel principle according to claim 1 is characterized in that: The wooden bucket algorithm is used to determine whether to allocate a parking space to the current reserved vehicle within the reservation start time period based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reservation parking lot, and the parking space allocation record of each hour of the reservation parking lot on the reservation day. Specifically, it includes: Determine the reservation start time period of the current reserved vehicle based on the parking space allocation request of the current reserved vehicle; Determine unallocated parking spaces based on the parking space allocation status of each parking space in the reserved parking lot; Determine the parking space allocation time period based on the parking space allocation record per hour on the reservation day at the reservation parking lot; Based on the wooden bucket algorithm, determine whether to allocate unallocated parking spaces to the currently reserved vehicle within the reservation start time period.
5. The parking space allocation method for realizing parking lot visitor reservation based on the barrel principle according to claim 4 is characterized in that: Based on the wooden bucket algorithm, determine whether to allocate unallocated parking spaces to the current reserved vehicle within the reservation start time period, including: Based on the wooden bucket algorithm, the time difference between the parking space allocation time period and the reservation start time period of the current reservation vehicle is sorted in descending order to obtain a descending sorting result; Search the results in descending order to see whether there is an unallocated parking space in the parking space allocation time period corresponding to the time difference; If yes, then allocate the unallocated parking space in the parking space allocation time period corresponding to the first time difference found in the reservation start time period to the currently reserved vehicle; If not, the parking space will not be allocated to the currently reserved vehicle during the reservation start time period.
6. A parking space allocation system for parking lot visitor reservation based on the barrel principle, characterized in that: The parking space allocation system for realizing parking lot visitor reservation based on the wooden barrel principle is used to implement the parking space allocation method for realizing parking lot visitor reservation based on the wooden barrel principle according to any one of claims 1 to 5, and the parking space allocation system for realizing parking lot visitor reservation based on the wooden barrel principle includes: A parking space allocation request acquisition unit, used to acquire parking space allocation requests of multiple reserved vehicles; the parking space allocation request includes: license plate number, reserved parking lot name, reserved parking area name, reserved start time period, driver information, and whether the reserved vehicle is allocated a parking space; A blocking queue creation unit, used to create a blocking queue based on parking space allocation requests of multiple reserved vehicles; A current reserved vehicle determining unit, used for taking any reserved vehicle in the blocking queue as the current reserved vehicle, for the current reserved vehicle; The parking lot parking space information determination unit of the reserved parking lot is used to determine the parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle; the parking space information of the parking lot includes: the parking area name and the parking space number; A parking space allocation status determination unit is used to obtain an allocated parking space allocation request on a reservation date, and determine the parking space allocation status of each parking space in the reservation parking lot based on the allocated parking space allocation request on the reservation date and the parking space information of the reservation parking lot; the parking space allocation status includes: allocated and unallocated; the reservation date is the date of the reservation start time period; The parking space allocation record determination unit of the reserved parking lot on the reservation day is used to obtain the parking space allocation record of the reserved parking lot on the reservation day, and determine the parking space allocation record of the reserved parking lot on the reservation day based on the parking space allocation record of the reserved parking lot on the reservation day; the parking space allocation record includes: parking space allocation time period, license plate number and parking space information of the parking lot; The parking space allocation unit is used to use a wooden bucket algorithm to determine whether to allocate a parking space to the current reserved vehicle within the reservation start time period based on the parking space allocation request of the current reserved vehicle, the parking space allocation status of each parking space in the reserved parking lot, and the parking space allocation record of the reserved parking lot every hour on the reservation day, and complete the parking space allocation for the current reserved vehicle; The current reserved vehicle updating unit is used to update the next vehicle in the blocking queue to the current reserved vehicle, and return to execute "determine the parking space information of the corresponding reserved parking lot based on the parking space allocation request of the current reserved vehicle" until the parking space allocation of all vehicles in the blocking queue is completed.
7. The parking space allocation system for realizing parking lot visitor reservation based on the barrel principle according to claim 6 is characterized in that: The parking space allocation unit specifically includes: A reservation start time period determination unit for a currently reserved vehicle, configured to determine a reservation start time period for the currently reserved vehicle based on a parking space allocation request for the currently reserved vehicle; An unallocated parking space determination unit, configured to determine unallocated parking spaces based on the parking space allocation status of each parking space in the reserved parking lot; A parking space allocation time period determination unit, used to determine the parking space allocation time period based on the parking space allocation records per hour on the reservation day of the reservation parking lot; The parking space allocation unit is used to determine whether to allocate an unallocated parking space to the currently reserved vehicle within the reservation start time period based on the wooden bucket algorithm.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the parking space allocation method for parking lot visitor reservation based on the wooden barrel principle as described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for allocating parking spaces for visitor reservation in a parking lot based on the wooden barrel principle as described in any one of claims 1 to 5 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for allocating parking spaces for visitor reservation in a parking lot based on the wooden barrel principle as described in any one of claims 1 to 5 is implemented.