Parking space distribution method and device based on polling algorithm, medium and product

By adopting a parking space allocation method based on polling algorithm in the parking lot, dynamically allocate parking spaces and using hardware equipment for real-time control, the problems of rigid distribution of parking spaces and low utilization rate in the existing technology are solved, and efficient utilization of parking spaces and improved traffic order are achieved.

CN120048145APending Publication Date: 2025-05-27SHANGHAI INTELLIGENT TRANSPORTATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411919488.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The existing parking lot parking space allocation methods have problems such as rigidity, low utilization rate and inability to adjust in real time. Especially when there are many parking spaces or high utilization rate, it cannot effectively solve the problem of flexibility and traffic order in parking space allocation.

Method used

The parking space allocation method based on the polling algorithm is adopted, and parking spaces and vehicle information are pre-collected, parking areas are designated and parking spaces are designated for vehicles. The parking spaces are dynamically allocated using the polling algorithm, and real-time control is performed through hardware equipment such as gates and cameras.

Benefits of technology

It realizes the flexibility and efficient use of parking spaces, improves the efficiency of parking spaces in the parking lots, alleviates the problem of mismatch between the number of parking spaces and demand, and improves the traffic order in the parking lots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120048145A_ABST
    Figure CN120048145A_ABST
Patent Text Reader

Abstract

The invention discloses a parking space distribution method and device based on a polling algorithm, a medium and a product, and relates to the field of parking space management.The method comprises the steps that parking space information of a parking lot, hardware equipment information of the parking lot, information of vehicles entering the parking lot and driver identity information are collected in advance and stored in a database; dividing parking zones, assigning parking spaces for the parking zones, and determining parking space zone information of the parking lot; assigning a corresponding parking space for the vehicle through a polling algorithm, and determining vehicle parking space information; the parking lot parking space partition information and the vehicle parking space information are issued to hardware equipment and stored in a database; and when the to-be-parked vehicle arrives at a designated position, the control unit obtains license plate information of the to-be-parked vehicle, queries a corresponding parking space matched with the database, and controls the hardware equipment to act. According to the parking space distribution method and device based on the polling algorithm, the medium and the product provided by the invention, the parking spaces can be flexibly distributed, and the parking space utilization efficiency of a parking lot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of parking space management, and in particular, to a parking space allocation method, device, medium and product based on a polling algorithm. Background Art

[0002] With the increasing demand for parking spaces in parking lots and the popularization of Internet-based parking management systems, the functions of the original parking management platform are relatively single, mainly focusing on vehicle charging management, vehicle status supervision, and parking lot monitoring. In terms of parking space allocation, for parking lots with a small number of parking spaces, a fixed allocation method is usually adopted, and the administrator manually allocates the parking spaces in the parking lot. This method can only solve the most basic parking space management problems in the parking lot. When the number of parking spaces increases or the utilization rate of parking spaces in the parking lot is relatively high, this method can only reallocate the parking spaces manually, resulting in problems such as inability to adjust at any time and rigid parking space allocation methods. There are also systems that use a computer networked parking management system to randomly allocate parking spaces, manually enter the parking space and use relationship databases to manage the allocated parking spaces in the computer networked parking management system. This method initially solves the problem of informatization of parking space allocation in the parking lot, enhances the flexibility of parking space allocation, but cannot alleviate the contradiction between the number of parking spaces in the parking lot and the parking demand, and there are problems of chaotic and disorderly traffic in the parking lot. Summary of the Invention

[0003] The purpose of the present application is to provide a parking space allocation method, device, medium and product based on a polling algorithm, which can flexibly allocate parking spaces and improve the utilization efficiency of parking spaces in the parking lot.

[0004] To achieve the above purpose, the present application provides the following solutions.

[0005] In a first aspect, the present application provides a parking space allocation method based on a polling algorithm, including:

[0006] Pre-collect parking lot parking space information, parking lot hardware device information, vehicle information entering the parking lot, and driver identity information, and store them in a database;

[0007] Define parking partitions and assign parking spaces to the parking partitions to determine the parking space partition information of the parking lot; among them, the types of parking partitions include: temporary vehicle parking partitions, fixed parking space vehicle parking partitions, and vehicle parking partitions subject to parking space allocation;

[0008] Specify corresponding parking spaces for vehicles through a polling algorithm to determine vehicle parking space information; among them, the types of vehicles include: temporary vehicles, fixed parking space vehicles, and vehicles subject to parking space allocation;

[0009] Send the parking space partition information and vehicle parking space information of the parking lot to the hardware device and store them in the database;

[0010] When the vehicle to be parked reaches the designated position, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to act.

[0011] Optionally, the parking lot space information and the parking lot hardware device information are pre-collected by the administrator entering them into the background management software; the vehicle information entering the parking lot and the driver identity information are pre-collected by the mobile application or the administrator entering them into the background management software.

[0012] The parking lot space information includes: the name of the parking lot and the parking space number.

[0013] The parking lot hardware device information includes: the name of the parking lot, the set of parking space numbers it manages, whether it is a camera device, whether it is a barrier device, whether to display alarm information, normal parking prompt information, the set of alarm information, and the network address of the hardware device.

[0014] The vehicle information entering the parking lot includes: license plate number, vehicle type, name of the parking lot, and driver's name.

[0015] The driver identity information includes: driver's name, ID number, driver's mobile phone number, and the login password of the mobile application.

[0016] Optionally, the parking lot space partition information includes: parking partition information and parking partition space information.

[0017] The parking partition information includes: the name of the parking partition, the name of the affiliated parking lot, and the type of the parking partition.

[0018] The parking partition space information includes: the name of the parking partition and the parking space number.

[0019] The vehicle parking space information includes: license plate number, name of the parking partition, type of the parking partition, parking space number, whether the parking time is restricted, the allowed start time of parking, and the allowed end time of parking.

[0020] Optionally, a corresponding parking space is assigned to the vehicle through a polling algorithm to determine the vehicle parking space information, including:

[0021] For temporary vehicles, no parking space is assigned according to the preemption principle.

[0022] For vehicles with fixed parking spaces, the corresponding parking space is assigned according to the first-come-first-served and first-allocate-then-use principles.

[0023] For vehicles subject to parking space allocation, a rotation data structure and rotation data structure operations are defined, and the corresponding parking spaces are specified through the configuration of partition rotation; among them, after the rotation data is configured, the initial rotation operation is triggered; at 0:00 every day after the rotation data is configured, the automatic insertion operation is triggered; every time a rotation cycle passes after the rotation data is configured, the automatic rotation operation is triggered; after each rotation ends, the vehicle parking space information is calculated.

[0024] The rotation data structure includes: the nodes being rotated, the nodes for the next rotation, and the nodes for pre-arranged rotation; the nodes being rotated include all the data nodes being rotated; the nodes for the next rotation include all the data nodes for the next rotation; the nodes for pre-arranged rotation include all the data nodes for pre-arranged rotation except those being rotated and those for the next rotation; each data node includes: license plate number, parking lot name, parking partition name, rotation start time, and rotation end time.

[0025] The rotation data structure operations include: node full, node empty, add, delete, and find; node full in the rotation data structure operation means that the length of the rotation data list is the same as the number of parking spaces participating in the rotation; node empty in the rotation data structure operation means that the length of the rotation data list is 0; add in the rotation data structure operation means inserting the specified rotation data into the last non-empty element of the list and increasing the length of the rotation data list by 1; delete in the rotation data structure operation means moving all non-empty elements after the specified rotation data to the previous position and decreasing the list length by 1; find in the rotation data structure operation means sequentially querying the rotation data of the nodes being rotated, the nodes for the next rotation, and the nodes for pre-arranged rotation according to the license plate number, and returning the first data node that matches the license plate number.

[0026] Optionally, every time a rotation cycle passes after the rotation data is configured, the automatic rotation operation is triggered, including:

[0027] Defining a temporary data structure and temporary data structure operations; the temporary data structure includes: the list of upcoming rotations and the list of previous rotations; the list of upcoming rotations is used to temporarily store the rotation data for the next period of the rotation data structure; the list of previous rotations is used to temporarily store the rotation data being rotated in the rotation data structure; the temporary data structure operations include: add, delete, find, and copy; add in the temporary data structure operation means inserting the specified rotation data into the last non-empty element of the list and increasing the list length by 1; delete in the temporary data structure operation means moving all non-empty elements after the specified rotation data to the previous position and decreasing the list length by 1; find in the temporary data structure operation means sequentially querying all the rotation data in this list according to the license plate number and returning the first data node that matches the license plate number; copy in the temporary data structure operation means sequentially finding the rotation data that meets the conditions from the specified rotation node, adding it to the specified rotation list, and deleting the rotation data from the specified rotation node.

[0028] Copy all rotation data in the next rotation node to the upcoming rotation list and then delete all of them;

[0029] Copy all rotation data in the rotating node to the previous rotation list and then delete all of them;

[0030] If the rotating node is not full, delete the rotation data in the upcoming rotation list one by one and insert them into the rotating node;

[0031] If the upcoming rotation list is not empty, delete the rotation data in the upcoming rotation list one by one and insert them into the next rotation node;

[0032] For all rotation data in the pre-arranged rotation nodes: If the next rotation node is not full and the pre-arranged rotation node is not empty, find the first data node for pre-arranged rotation, delete this data node from the pre-arranged rotation, and add this data node to the next rotation;

[0033] If the previous rotation list is not empty, delete the rotation data in the previous rotation list one by one and insert them into the pre-arranged rotation node.

[0034] Optionally, send the parking lot space partition information and vehicle parking space information to the hardware device and store them in the database, including:

[0035] At 0:00 every day, use the network address of the hardware device as the address parameter and the parking lot space partition information as the request body parameter to call the application programming interface, send the parking lot space partition information to the hardware device, and store it in the database;

[0036] Every time a corresponding parking space is assigned to a vehicle through the polling algorithm, after determining the vehicle parking space information, use the network address of the hardware device as the address parameter and the vehicle parking space information as the request body parameter to call the application programming interface, send the vehicle parking space information to the hardware device, and store it in the database.

[0037] Optionally, the hardware device includes: a camera device, a barrier gate device, a display screen, and a speaker; the barrier gate device is provided with a geomagnetic sensing device; the geomagnetic sensing device is used to detect the vehicle position; when the vehicle to be parked reaches the designated position, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to perform actions, including:

[0038] When the vehicle to be parked reaches the designated position, the geomagnetic sensing device sends a positive arrival signal to the control unit;

[0039] The control unit sends a capture signal to the camera device, captures the license plate photo of the vehicle to be parked through the camera device, and transmits it back to the control unit;

[0040] The control unit analyzes the license plate photo of the vehicle to be parked, obtains the license plate information of the vehicle to be parked, and queries the database to match the corresponding parking space; if the match is successful, a forward rotation instruction is sent to the motor of the barrier device to open the barrier; if the match fails, a prompt information instruction is sent to the display screen and the speaker to display and broadcast the prompt information;

[0041] When the vehicle to be parked leaves the designated position, the geomagnetic sensing device sends a forward departure signal to the control unit;

[0042] The control unit sends a reverse rotation instruction to the motor of the barrier device to close the barrier.

[0043] In a second 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 above-mentioned parking space allocation method based on the polling algorithm.

[0044] In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned parking space allocation method based on the polling algorithm is implemented.

[0045] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned parking space allocation method based on the polling algorithm is implemented.

[0046] According to the specific embodiments provided by the present application, the following technical effects are disclosed in the present application:

[0047] The present application provides a parking space allocation method, device, medium, and product based on the polling algorithm. The parking space information of the parking lot, the hardware device information of the parking lot, the vehicle information entering the parking lot, and the driver identity information are collected in advance. The parking area is delimited and parking spaces are designated for the parking area. The corresponding parking space is designated for the vehicle through the polling algorithm. The parking space partition information of the parking lot and the vehicle parking space information are sent to the hardware device. When the vehicle to be parked arrives at the designated position, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to perform actions. Compared with the fixed allocation method of parking spaces in the parking lot, the present application can solve the problems of rigid parking space allocation method, low utilization rate of parking spaces, and inability to adjust fixed parking spaces. Compared with the method of randomly allocating parking spaces using a computer networked parking lot management system and using a relational database to manage the allocated parking spaces, the present application can alleviate the contradiction between the number of parking spaces in the parking lot and the parking demand, and improve the problem of chaotic and disorderly traffic in the parking lot through the partition control of parking space allocation. Therefore, the present application achieves the purpose of flexibly allocating parking spaces based on the polling algorithm and improving the utilization efficiency of parking spaces in the parking lot. Description of the Drawings

[0048] To more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0049] Figure 1 This is a flowchart of the parking space allocation method based on the polling algorithm provided by the present application. Specific implementation manners

[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.

[0051] To make the above objects, features, and advantages of the present application more obvious and understandable, the following will further describe the present application in detail with reference to the accompanying drawings and specific implementation manners.

[0052] In an exemplary embodiment, the present application provides a parking space allocation method based on the polling algorithm. In the embodiments of the present application, as Figure 1 shown, the method includes the following steps S1 to S5.

[0053] Step S1: Pre-collect parking lot space information, parking lot hardware device information, vehicle information entering the parking lot, and driver identity information, and store them in the database.

[0054] Before the system is put into use, pre-collect parking lot space information, parking lot hardware device information, vehicle information entering the parking lot, and driver identity information.

[0055] The following data is pre-collected by the administrator entering it into the background management software.

[0056] Parking lot space information, including: parking lot name and parking space number.

[0057] Parking lot hardware device information, including: parking lot name, set of parking space numbers under management, whether it is a camera device, whether it is a gate device, whether to display alarm information, normal parking reminder information, set of alarm information, and network address of the hardware device.

[0058] The following data is pre-collected by the mobile application and the administrator entering it into the background management software.

[0059] Driver identity information, including: driver's name, ID number, driver's mobile phone number, and mobile application login password.

[0060] Vehicle information entering the parking lot, including: license plate number, vehicle type (one of temporary vehicle, vehicle subject to parking space allocation, and vehicle with a fixed parking space), parking lot name, and driver's name.

[0061] Among them, the vehicle information entering the parking lot entered through the mobile application can only be a temporary vehicle or a vehicle subject to parking space allocation. Vehicles with fixed parking spaces are pre-collected by the administrator entering them into the background management software. And when entering vehicles subject to parking space allocation and vehicles with fixed parking spaces, the name of the parking lot for long-term parking needs to be specified.

[0062] Step S2: Delimit parking zones and assign parking spaces to the parking zones to determine the parking lot parking zone information. Among them, the types of parking zones include: temporary vehicle parking zone, vehicle with fixed parking space parking zone, and vehicle subject to parking space allocation parking zone.

[0063] The parking zone information is entered by the administrator operating the background management software.

[0064] The parking zone information includes: parking zone name, name of the affiliated parking lot, and parking zone type (one of temporary vehicle parking zone, vehicle subject to parking space allocation parking zone, and vehicle with fixed parking space parking zone).

[0065] Among them: one temporary vehicle parking zone, one vehicle with fixed parking space parking zone, and one vehicle subject to parking space allocation parking zone must be created each before proceeding to the next step.

[0066] Temporary vehicle parking zone: Used to provide parking positions for temporarily parked (not exceeding 1 day) vehicles.

[0067] Vehicle with fixed parking space parking zone: Used to provide parking positions for fixedly parked vehicles (once the parking space is allocated in step S3, the parking space used by this vehicle will not change until the parking space allocation is deleted).

[0068] Vehicle subject to parking space allocation parking zone: Used to provide parking positions for vehicles participating in rotation.

[0069] The purpose of setting up the vehicle subject to parking space allocation parking zone is to enable the same parking space to be used by different vehicles at different times through rotation, improve the utilization rate of parking spaces, take into account the parking allocation of fixed parking spaces and temporary vehicles, and increase the flexibility of parking space allocation.

[0070] Assign parking spaces to the parking zones: The administrator operates the background management software and enters the name of the parking lot. The background management software displays the corresponding parking zone information and parking space information of this parking lot on the interface. The administrator can perform the following operations.

[0071] The administrator selects a specified parking space: Select the parking zone information and the specified parking space information.

[0072] The parking zone parking space information includes: the name of the parking zone and the parking space number.

[0073] The administrator cancels the specified parking space: Cancel the selection of the parking zone information and the parking space information, and the background management software automatically deletes the above-entered information.

[0074] Among them, for the same parking space, only one of the parking zones can specify it. For the parking spaces already allocated in the parking zones of the fixed-parking-space vehicles, the operation of canceling the specified parking space cannot be performed.

[0075] Step S3: Specify the corresponding parking space for the vehicle through the polling algorithm to determine the vehicle parking space information. Among them, the vehicle types include: temporary vehicles, fixed-parking-space vehicles, and vehicles subject to parking space allocation.

[0076] The polling algorithm is a common and efficient task scheduling algorithm, which is widely used in fields such as load balancing and operating system process scheduling. Its core idea is to arrange all tasks in order and allocate them to each task for execution in turn according to a fixed time slice. The basic principle of the polling algorithm is to arrange the tasks in order into a circular linked list, take out a task from the linked list for execution each time, and move the pointer to the next task after the execution is completed. If the execution time of a task exceeds the time slice, then it will be interrupted and wait for the next scheduling. In this application, the polling algorithm is applied to parking space allocation, which can flexibly allocate parking spaces and improve the utilization efficiency of parking spaces.

[0077] The vehicle parking space information includes: license plate number, parking zone name, parking zone type, parking space number, whether the parking time is restricted, the permitted start time of parking, and the permitted end time of parking.

[0078] The purpose of setting the vehicles subject to parking space allocation is to enable the same parking space to be used by different vehicles at different times through rotation, improve the utilization rate of parking spaces, take into account the parking allocation of fixed-parking-space and temporary vehicles, and increase the flexibility of parking space allocation.

[0079] I. For temporary vehicles, follow the preemption principle and do not specify a parking space.

[0080] The vehicle can choose any unused parking space in the temporary vehicle parking zone for parking, so there is no need to specify the vehicle parking space information in advance.

[0081] II. For fixed-parking-space vehicles: Follow the first-come-first-served and first-allocate-then-use principles to specify the corresponding parking space.

[0082] The driver designates the name of the parking lot and sends a request for designated parking space information containing the designated parking lot name and the vehicle license plate through the mobile application. After receiving the request for designated parking space information, the background management program places the request information into the blocking queue.

[0083] 1) When there is a request for designated parking space information in the blocking queue, take the head of the blocking queue.

[0084] 2) The background management program queries the entered parking partition information, where the designated parking lot name matches the request for designated parking space information, and the parking partition type is the parking partition for fixed - space vehicle parking.

[0085] 3) The background management program queries the parking space information of the parking partition, temporarily stores all the parking space numbers of the parking partition whose name matches that in 2) in memory, and removes the duplicate values.

[0086] 4) For each parking space number in 3), the background management program queries the vehicle parking space information to obtain the vehicle parking space information where the designated parking lot name matches the request for designated parking space information, the parking space number matches the above - mentioned parking space number, and the parking time limit is not restricted. If at least one vehicle parking space information meeting the above conditions can be obtained for a parking space number, then remove the parking space number from 3) until each parking space number in 3) has been processed.

[0087] 5) If the set of parking space numbers after 4) processing is empty, the mobile application prompts the text information "Fixed parking space allocation failed. All parking space allocations in the fixed parking space allocation area have been completed. Please contact the administrator to delete the unused fixed parking space allocations. Then designate the parking space information again."

[0088] 6) If the set of parking space numbers after 4) processing is not empty, randomly select a parking space number from the set of parking space numbers after 4) processing, and designate the parking space information of the parking lot, where the parking lot name, license plate number match the request for designated parking space information, the deletion status is not, and the parking time limit is not restricted.

[0089] 7) The background management system saves the vehicle parking space information.

[0090] 8) Delete the head of the blocking queue.

[0091] 9) The mobile application prompts the text information "Fixed parking space allocation successful".

[0092] III. For the vehicles that obey the parking space allocation, perform the following operations to designate the corresponding parking space.

[0093] Configure partition rotation: The administrator operates the background management software and enters the name of the parking lot. The background management software displays the parking partition information and parking space information corresponding to the parking lot on the interface. The administrator modifies the partition rotation configuration information. The purpose of configuring partition rotation is to determine whether a partition participates in rotation, the number of parking spaces participating in rotation, the rotation cycle, determine the sizes of the nodes being rotated and the next rotation node according to the number of parking spaces participating in rotation, and trigger an automatic rotation operation every time a rotation cycle passes.

[0094] The partition rotation configuration information includes: the name of the parking lot, the name of the parking partition (only the name of the parking partition that obeys the parking space allocation for vehicles can be entered), the number of parking spaces participating in rotation, the rotation cycle (only one of reservation, weekly, monthly, and annual), the start time of rotation and the end time of rotation.

[0095] Among them, the rotation data structure includes: the node being rotated, the next rotation node, and the pre-arranged rotation node.

[0096] Rotation data: license plate number, parking lot name, parking partition name, start time of rotation, and end time of rotation.

[0097] Rotation node: a list of rotation data and the length of the rotation data list.

[0098] The node being rotated includes all the data nodes being rotated.

[0099] The next rotation node includes all the data nodes for the next round of rotation.

[0100] The pre-arranged rotation node includes all the data nodes for pre-arranged rotation except those being rotated and for the next round of rotation.

[0101] Define the operation of the rotation data structure as follows:

[0102] Node full: The length of the rotation data list is the same as the number of parking spaces participating in rotation, and there is no such operation for the pre-arranged rotation node.

[0103] Node empty: The length of the rotation data list is 0.

[0104] Add: Insert the specified rotation data after the last non-empty element in the list and increment the list length by 1.

[0105] Delete: Move all non-empty elements after the specified rotation data to the previous position and decrement the list length by 1.

[0106] Search: According to the license plate number, sequentially query the rotation data of the node being rotated, the next rotation node, and the pre-arranged rotation node, and return the first data node that matches the license plate number.

[0107] After the rotation data is configured, the initial rotation operation is triggered: The administrator operates the background management software to read all vehicle information requests that match the specified parking lot name and specified parking space information and whose deletion status is "no".

[0108] 1) Arrange the vehicle license plates in a vehicle license plate list in lexicographical order.

[0109] 2) For the vehicle license plate list, determine whether the currently rotating node and the next rotating node are full.

[0110] 3) If the currently rotating node is not full, perform an add operation on the currently rotating node.

[0111] 4) If the currently rotating node is full and the next rotating node is not full, perform an add operation on the next rotating node.

[0112] 5) If the currently rotating node is full and the next rotating node is full, perform an add operation on the pre-arranged rotating node.

[0113] 6) Until all data in the vehicle license plate list is processed.

[0114] At 0:00 every day after the rotation data is configured, the automatic insertion operation is triggered: The administrator operates the background management software to read all vehicle information requests that match the specified parking lot name and specified parking space information and whose deletion status is "no".

[0115] 1) For the vehicle license plate list: If there is data, do not perform any operation. If there is no data, determine whether the currently rotating node is full.

[0116] 2) If the currently rotating node is not full, perform an add operation on the currently rotating node.

[0117] 3) If the currently rotating node is full and the next rotating node is not full, perform an add operation on the next rotating node.

[0118] 3) If the currently rotating node is full and the next rotating node is full, perform an add operation on the pre-arranged rotating node.

[0119] The administrator can manually delete the rotation: After the rotation data is configured, the administrator operates the background management software to read all rotation data of the currently rotating node, the next rotating node, and the pre-arranged rotating node. The administrator presses the delete button, and the corresponding rotating node performs a delete operation.

[0120] After the rotation data is configured, every time a rotation period passes, the automatic rotation operation is triggered.

[0121] Define temporary data structures: the upcoming rotation list, the previous rotation list.

[0122] Upcoming rotation list: A rotation list used to temporarily store the rotation data for the next period of the rotation data structure.

[0123] Previous rotation list: A rotation list used to temporarily store the data being rotated in the rotation data structure.

[0124] The above temporary data structure has the following operations:

[0125] Add: Insert the specified rotation data after the last non-empty element in the list and increment the list length by 1.

[0126] Delete: Move all non-empty elements after the specified rotation data to the previous position and decrement the list length by 1.

[0127] Find: Sequentially query all the rotation data in this list according to the license plate number and return the first data node that matches the license plate number.

[0128] Copy: Sequentially find the rotation data that meets the conditions from the specified rotation node, add it to the specified rotation list, and delete the rotation data from the specified rotation node.

[0129] The purpose of defining the above temporary data structure is to temporarily store the data of the next rotation node and the data being rotated in the original rotation data structure before operating on the rotation data structure; it is convenient to change the positions of these data in the rotation data structure.

[0130] 1) Copy all the rotation data in the next rotation node to the upcoming rotation list and delete them all.

[0131] 2) Copy all the rotation data in the data being rotated node to the previous rotation list and delete them all.

[0132] 3) If the data being rotated node is not full, delete the rotation data in the upcoming rotation list one by one and insert them into the data being rotated node.

[0133] 4) If the upcoming rotation list is not empty, delete the rotation data in the upcoming rotation list one by one and insert them into the next rotation node.

[0134] 5) For all the rotation data in the pre-arranged rotation nodes: If the next rotation node is not full and the pre-arranged rotation node is not empty, find the first data node of the pre-arranged rotation, perform a delete operation on this data node for the pre-arranged rotation, and perform an add operation on this data node for the next rotation.

[0135] 6) If the previous rotation list is not empty, delete the rotation data in the previous rotation list one by one and insert them into the pre-arranged rotation node.

[0136] Calculate the rotation data. For the rotation information of the node being rotated: the license plate number is the vehicle license plate number, the parking lot name is the corresponding parking lot name for rotation, the parking zone name is the corresponding parking zone name for rotation, the rotation start time is the current time, and the rotation end time is the time after adding a rotation period to the current time.

[0137] Calculate the license plate - parking space information data to be sent. The license plate number of the parking space is the license plate number in the rotation information, the parking zone name is the parking zone name in the rotation information, the parking space number is the parking space number in the rotation information, whether the parking time is restricted is yes, the allowed parking start time is the rotation start time, the allowed parking end time is the rotation end time, and whether to delete is no.

[0138] Step S4: Send the parking lot parking - zone information and vehicle - parking - space information to the hardware device and store them in the database.

[0139] The parking lot parking - zone information is sent, trigger condition: at 0:00 every day, triggered regularly.

[0140] 1) The background management program queries the database to obtain all parking - zone information.

[0141] 2) The background management program queries the database to obtain all parking - lot hardware device information.

[0142] 3) For all parking - lot hardware device information: match according to the same parking lot name to obtain the corresponding parking - zone information. According to the network address of the parking - lot hardware device, call the "parking - zone sending" application program interface. When calling, the network address of the hardware device is used as the address parameter, and the parking - lot parking - zone information in step S2 is used as the request body parameter.

[0143] 4) After the parking - lot hardware device receives the data, store the parking - zone data in the database.

[0144] 5) When the operation is successful, the parking - lot hardware device returns a success message to the background management program through the application program interface status code parameter; when the operation fails, the parking - lot hardware device returns a failure message to the background management program through the application program interface status code parameter.

[0145] 6) When the background management program receives the returned success message through the application program interface status code parameter, end the above process; when the background management program receives the returned failure message through the application program interface status code parameter, repeat the above process until the number of failures exceeds 3 times.

[0146] The vehicle - parking - space information is sent, trigger condition: after each execution of step S3.

[0147] 1) The background management program queries the database to obtain all vehicle - parking - space information.

[0148] 2) The background management program queries the database to obtain all the information of the parking lot hardware devices.

[0149] 3) For all the information of the parking lot hardware devices: match them according to the same parking lot name to obtain the corresponding vehicle parking space information. According to the network address of the parking lot hardware device, call the application program interface of "vehicle parking space information distribution". When calling, the network address of the hardware device is used as the address parameter, and the vehicle parking space information in step S3 is used as the request body parameter.

[0150] 4) After the parking lot hardware device receives the data, it stores the parking space partition data in the database.

[0151] 5) When the operation is successful, the parking lot hardware device returns a success message to the background management program through the application program interface status code parameter; when the operation fails, the parking lot hardware device returns a failure message to the background management program through the application program interface status code parameter.

[0152] 6) When the background management program receives the returned success message through the application program interface status code parameter, the above process ends; when the background management program receives the returned failure message through the application program interface status code parameter, repeat the above process until the number of failures exceeds 3 times.

[0153] Step S5: When the vehicle to be parked arrives at the specified position, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to make actions. Among them, the hardware device (specifically the parking lot hardware device of the gate type) includes: a camera device (i.e., a camera), a gate device (i.e., a gate), a display screen and a speaker; the gate device is provided with a geomagnetic sensing device; the geomagnetic sensing device is used to detect the vehicle position.

[0154] 1) For the parking lot hardware device of the gate type, detect the vehicle position through the geomagnetic sensing device.

[0155] 2) When the vehicle arrives at the specified position in the preset direction, the geomagnetic sensing device sends a forward arrival signal to the control unit.

[0156] 3) The control unit sends a capture signal to the camera and receives the license plate photo information transmitted back by the camera.

[0157] 4) The control unit analyzes the received license plate photo to obtain the license plate information.

[0158] 5) According to the preset information of the parking lot hardware device, license plate information, and current time, query the database to obtain all the vehicle parking space information.

[0159] 6) Match according to the same license plate information, the same parking lot name as the preset parking lot hardware device information, and the current time between the start time and the end time.

[0160] 7) For the vehicle with matching parking space information, send a forward rotation command to the gate motor to open the gate.

[0161] 8) For the vehicle without matching parking space information, send a prompt message command of "Please contact the parking lot administrator" to the display screen and the speaker.

[0162] 9) When the vehicle leaves the specified position in the preset direction, the geomagnetic sensing device sends a forward departure signal to the control unit.

[0163] 10) The control unit sends a reverse rotation command to the gate motor to close the gate.

[0164] In an exemplary embodiment, the present application further provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0165] In an exemplary embodiment, the present application further provides a computer-readable storage medium, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0166] In an exemplary embodiment, the present application further provides a computer program product, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.

[0167] In the present application, all actions of obtaining signals, information or data are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where it is located and obtaining the authorization given by the corresponding device owner. 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 the present 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 laws and regulations.

[0168] 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 memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, 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.

[0169] The databases involved in the embodiments provided in the present application 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. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.

[0170] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of 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.

[0171] In this text, specific examples are used to illustrate the principle and implementation manner 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 manner and application scope. 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 based on polling algorithm, characterized in that: include: Collect parking space information, parking hardware equipment information, parking lot vehicle information and driver identity information in advance, and store them in the database; Delineate parking zones and designate parking spaces for the parking zones, and determine parking space zone information for the parking lot; wherein the types of parking zones include: temporary vehicle parking zones, fixed parking space vehicle parking zones, and parking zones for vehicles subject to parking space allocation; The corresponding parking space is assigned to the vehicle through a polling algorithm to determine the parking space information of the vehicle; wherein the vehicle types include: temporary vehicles, fixed parking space vehicles and vehicles subject to parking space allocation; Send parking lot zoning information and vehicle parking space information to hardware devices and store them in the database; When the vehicle to be parked arrives at the designated location, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to take action.

2. The parking space allocation method based on polling algorithm according to claim 1 is characterized in that: The parking lot information and the parking lot hardware equipment information are collected in advance by an administrator entering the information into the background management software; the parking lot vehicle information and the driver identity information are collected in advance by a mobile application or by an administrator entering the information into the background management software; The parking lot parking space information includes: parking lot name and parking space number; The parking lot hardware equipment information includes: parking lot name, managed parking space number set, whether it is a camera device, whether it is a gate device, whether to display alarm information, normal parking prompt information, alarm information set and hardware equipment network address; The vehicle information entering the parking lot includes: license plate number, vehicle type, parking lot name and driver name; The driver identity information includes: driver's name, ID number, driver's mobile phone number and mobile application login password.

3. The parking space allocation method based on polling algorithm according to claim 1 is characterized in that: The parking lot parking space partition information includes: parking partition information and parking partition parking space information; The parking partition information includes: the parking partition name, the parking lot name and the parking partition type; The parking partition and parking space information includes: parking partition name and parking space number; The vehicle parking space information includes: license plate number, parking zone name, parking zone type, parking space number, whether parking time is restricted, allowed parking start time and allowed parking end time.

4. The parking space allocation method based on polling algorithm according to claim 1 is characterized in that: The corresponding parking space is assigned to the vehicle through the polling algorithm to determine the vehicle parking space information, including: For temporary vehicles, no parking spaces are designated according to the principle of preemption; For vehicles with fixed parking spaces, the corresponding parking spaces will be assigned based on the principle of first come first served and first allocated before use; For vehicles subject to parking space allocation, define rotation data structure and rotation data structure operation, and specify corresponding parking spaces by configuring partition rotation; after the rotation data is configured, the initial rotation operation is triggered; after the rotation data is configured, the automatic insertion operation is triggered at 0:00 every day; after the rotation data is configured, the automatic rotation operation is triggered every time a rotation cycle passes; after each rotation, the vehicle parking space information is calculated; The rotation data structure includes: rotating nodes, next rotating nodes and pre-scheduled rotation nodes; rotating nodes include all data nodes rotating; next rotating nodes include all data nodes of the next round of rotation; pre-scheduled rotation nodes include all data nodes pre-scheduled for rotation except the rotating nodes and the next round of rotation; each data node includes: license plate number, parking lot name, parking partition name, rotation start time and rotation end time; The rotation data structure operations include: node full, node empty, adding, deleting and searching; node full in the rotation data structure operation means that the length of the rotation data list is the same as the number of parking spaces participating in the rotation; node empty in the rotation data structure operation means that the length of the rotation data list is 0; adding in the rotation data structure operation means inserting the specified rotation data into the last non-empty element of the list, and increasing the length of the rotation data list by 1; deleting in the rotation data structure operation means moving all non-empty elements after the specified rotation data to the previous position, and decreasing the length of the list by 1; searching in the rotation data structure operation means querying the rotation data of the rotating node, the next rotating node and the pre-arranged rotating node in turn according to the license plate number, and returning the first data node that matches the license plate number.

5. The parking space allocation method based on polling algorithm according to claim 4 is characterized in that: After the rotation data is configured, every time a rotation cycle passes, the automatic rotation operation is triggered, including: Define temporary data structure and temporary data structure operation; the temporary data structure includes: a list to be rotated and a previous rotation list; the list to be rotated is used to temporarily store the next rotation data of the rotation data structure; the previous rotation list is used to temporarily store the data currently being rotated in the rotation data structure; the temporary data structure operation includes: adding, deleting, searching and copying; adding in the temporary data structure operation means inserting the specified rotation data into the last non-empty element of the list, and making the list length +1; deleting in the temporary data structure operation means moving all non-empty elements after the specified rotation data to the previous position, and making the list length -1; searching in the temporary data structure operation means querying all the rotation data in this list in turn according to the license plate number, and returning the first data node that matches the license plate number; copying in the temporary data structure operation means searching for qualified rotation data from the specified rotation node in turn, adding it to the specified rotation list, and deleting the rotation data from the specified rotation node; Copy all rotation data of the next rotation node to the list to be rotated, and delete them all; Copy all rotation data of the rotating node to the previous rotation list and delete them all; If the node being rotated is not full, delete the rotation data in the list to be rotated one by one and insert them into the node being rotated; If the list to be rotated is not empty, delete the rotation data in the list to be rotated one by one and insert them into the next rotation node; For the rotation data in all pre-scheduled rotation nodes: if the next rotation node is not full and the pre-scheduled rotation node is not empty, find the first data node of the pre-scheduled rotation, delete the data node in the pre-scheduled rotation, and add the data node in the next rotation; If the previous rotation list is not empty, delete the rotation data in the previous rotation list one by one and insert them into the pre-scheduled rotation node.

6. The parking space allocation method based on polling algorithm according to claim 1 is characterized in that: The parking lot partition information and vehicle parking space information are sent to the hardware device and stored in the database, including: At 0:00 every day, the network address of the hardware device is used as the address parameter, and the parking lot partition information is used as the request body parameter. The application program interface is called to send the parking lot partition information to the hardware device and store it in the database. Each time, a polling algorithm is used to assign a corresponding parking space to a vehicle. After the vehicle parking space information is determined, the network address of the hardware device is used as the address parameter, and the vehicle parking space information is used as the request body parameter. The application program interface is called to send the vehicle parking space information to the hardware device and store it in the database.

7. The parking space allocation method based on polling algorithm according to claim 1 is characterized in that: The hardware device includes: a camera device, a gate device, a display screen and a speaker; the gate device is provided with a geomagnetic sensor device; the geomagnetic sensor device is used to detect the position of the vehicle; when the vehicle to be parked arrives at the designated position, the control unit obtains the license plate information of the vehicle to be parked and queries the database to match the corresponding parking space, and controls the hardware device to perform actions, including: When the vehicle to be parked reaches the designated position, the geomagnetic sensor device sends a positive arrival signal to the control unit; The control unit sends a capture signal to the camera device, and the camera device captures the license plate photo of the vehicle to be parked and transmits it back to the control unit; The control unit analyzes the license plate photo, obtains the license plate information of the vehicle to be parked, and queries the database to match the corresponding parking space; if the match is successful, it sends a forward command to the motor of the barrier device to open the barrier; if the match fails, it sends a prompt information command to the display screen and speaker to display and broadcast the prompt information; When the vehicle to be parked leaves the designated position, the geomagnetic sensor device sends a positive departure signal to the control unit; The control unit sends a reverse command to the motor of the barrier device to close the barrier.

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 based on the polling algorithm as described in any one of claims 1 to 7.

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 parking space allocation method based on the polling algorithm described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the parking space allocation method based on the polling algorithm described in any one of claims 1 to 7 is implemented.