Method, device and equipment for calculating number of parked vehicles based on departure missing correction
By using traffic flow data from road checkpoints to correct missing departure records in parking lots, calculating the incremental number of vehicles currently parked in the parking lot, and combining this with historical data, the problem of error accumulation in calculating the number of vehicles currently parked in the parking lot was solved, thus achieving accurate acquisition of the number of vehicles currently parked in the parking lot.
Patent Information
- Application Number
- CN202511408127.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-27
AI Technical Summary
In existing technologies, the calculation of the number of parked vehicles in parking lots is difficult to accurately obtain in real time due to the accumulation of errors caused by data loss.
By acquiring parking lot vehicle record data and road checkpoint flow data, exit correction and record completion are performed to calculate the increase in the number of parked vehicles in the parking lot within a preset time period. The sum of the historical number of parked vehicles and the increase is used as the actual number of parked vehicles at the target time.
It effectively corrects the cumulative error in the number of parked vehicles caused by missing data, accurately obtains the actual number of parked vehicles in the parking lot at any time, and improves the accuracy of the calculation.
Smart Images

Figure CN121583124A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of parking management and data processing, and particularly relates to a method and device for calculating the number of parked vehicles based on off-site missing correction. BACKGROUND
[0002] With the rapid development of economy, the popularity of private cars has increased significantly. In order to solve the problem of "parking difficulty", some parking lots implement intelligent management to master the real-time number of parked vehicles, and then reasonably induce parking demand.
[0003] However, due to various factors such as missing parking data, the accuracy of the current parking number statistical scheme depends on the completeness of the vehicle entry and exit records. Once the record data cannot be ensured to be 100% complete, even if there is only a slight data missing rate, the error will continue to accumulate, resulting in a larger deviation in the number of parked vehicles, which is difficult to accurately calculate. SUMMARY
[0004] The main purpose of the present application is to provide a method and device for calculating the number of parked vehicles based on off-site missing correction, aiming to solve the technical problem of inaccurate calculation of the number of parked vehicles in the prior art.
[0005] The first aspect of the present application provides a method for calculating the number of parked vehicles based on off-site missing correction of vehicles, which comprises: acquiring parking lot vehicle record data in a preset time period before a target time, wherein the parking lot vehicle record data comprises the unique identification of the entering and exiting vehicles, the unique identification of the parking lot, the unique identification of the parking record, the entering and exiting time and the parking state, the entering and exiting time comprises the entering time and the exiting time, and the parking state is entering or exiting; acquiring road portal flow data corresponding to the parking lot vehicle record data in the preset time period, wherein the road portal flow data comprises the unique identification of the road portal passing vehicles, the unique identification of the road portal, and the road portal detection time of the road portal passing vehicles passing through the road portal; based on the road portal flow data, correcting the off-site of the entering and exiting vehicles in the parking lot vehicle record data and completing the off-site record; based on the corrected parking lot vehicle record data, calculating the number of parked vehicle increments of the parking lot in the preset time period; calculating the sum of the historical number of parked vehicles and the number of parked vehicle increments to obtain the actual number of parked vehicles of the parking lot at the target time, wherein the historical number of parked vehicles is the number of parked vehicles before the preset time period.
[0006] The application also provides a vehicle off-site missing correction-based in-parking vehicle number calculation device, which comprises: a first data acquisition module, configured to acquire parking lot vehicle record data in a preset time period before a target time, wherein the parking lot vehicle record data comprises unique identification of an in-out vehicle, unique identification of a parking lot, unique identification of a parking record, in-out time and parking state, the in-out time comprises in-time and off-time, and the parking state is in or off; a second data acquisition module, configured to acquire road portal flow data corresponding to the parking lot vehicle record data in the preset time period, wherein the road portal flow data comprises unique identification of a road portal passing vehicle, unique identification of a road portal, and road portal detection time of the road portal passing vehicle passing the road portal; a correction module, configured to correct in-out vehicles in the parking lot vehicle record data based on the road portal flow data and complete off-site records; a first calculation module, configured to calculate an in-parking vehicle increment number of a parking lot in the preset time period based on the corrected parking lot vehicle record data; a second calculation module, configured to calculate a sum of a historical in-parking vehicle number and the in-parking vehicle increment number, to obtain an actual in-parking vehicle number of the parking lot at the target time, wherein the historical in-parking vehicle number is an in-parking vehicle number before the preset time period.
[0007] The third aspect of the application provides a computer device, comprising a memory and at least one processor, the memory has instructions stored therein; the at least one processor invokes the instructions in the memory, so that the computer device executes the vehicle off-site missing correction-based in-parking vehicle number calculation method.
[0008] The fourth aspect of the application provides a computer readable storage medium, the computer readable storage medium has instructions stored therein, when the instructions are run on a computer, the computer executes the vehicle off-site missing correction-based in-parking vehicle number calculation method.
[0009] The application provides a vehicle off-site missing correction-based in-parking vehicle number calculation method, based on road portal flow data, vehicles actually having off-site but missing off-site data in parking lot vehicle record data can be corrected and off-site records can be completed, and based on the corrected parking lot vehicle record data, an increment number and an actual in-parking vehicle number of a parking lot can be accurately calculated. The application can effectively correct cumulative errors of in-parking vehicle numbers caused by data missing, and accurately acquire actual in-parking vehicle numbers of a parking lot at any time. BRIEF DESCRIPTION OF DRAWINGS
[0010] Figure 1 The first embodiment flowchart of the method for calculating the number of parked vehicles based on vehicle departure missing correction in the embodiments of the present application is shown in the figure; Figure 2 The comparison diagram of the number of parked vehicles before and after correction in the parking lot is shown in the figure; Figure 3 The functional module diagram of one embodiment of the calculating device for the number of parked vehicles based on vehicle departure missing correction in the embodiments of the present application is shown in the figure; Figure 4 The diagram of one embodiment of the computer device in the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0011] The terms "first", "second", "third", "fourth" and the like in the description, claims, and drawings of the present application (if any) are used for distinguishing between similar objects, not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of the terms so termed is interchangeable under appropriate circumstances such that the embodiments of the description are, for example, capable of proper
[0012] In recent years, with the rapid economic development, the private car penetration rate has increased significantly, and the problem of "parking difficulty" has become increasingly prominent. On the one hand, the early city planning did not fully consider the parking demand, on the other hand, the traditional parking lot lacks intelligent management, and the car owner is difficult to quickly find an empty parking space, leading to the phenomenon of "rounding for position" is common.
[0013] The premise of implementing intelligent management of parking lots is to be able to accurately grasp the real-time number of parked vehicles in the parking lot, and then reasonably induce the parking demand. However, the number of parked vehicles in the parking lot is often difficult to accurately calculate. Mainly because the parking flow data is affected by various factors in the detection, transmission, reception, storage, and application of each link, and inevitably there will be data loss, resulting in inaccurate calculation of the number of parked vehicles. For example, if the vehicle departure record in the parking lot is lost, it will cause the subsequent calculation of the number of parked vehicles to always incorrectly include the vehicle. Even a slight data loss, under the continuous influence of day after day, will produce serious errors in the calculation of the number of parked vehicles, and then completely wrong guidance to the demand management of the parking lot. Therefore, before analyzing and applying the parking lot data, an effective method is needed to correct the cumulative error of the number of parked vehicles.
[0014] ReferenceFigure 1 The application provides a vehicle off-site missing correction-based calculation method of the number of parked vehicles, which comprises the following steps: S100: acquiring vehicle record data of a parking lot in a preset time period before a target time point, wherein the vehicle record data of the parking lot comprises a unique identifier of an in-and-out vehicle, a unique identifier of the parking lot, a parking record unique identifier, in-and-out time, and a parking state, the in-and-out time comprises in-time and off-time, and the parking state is in or off.
[0015] Specifically, the target time point can be a current time point or a certain historical time point.
[0016] The preset time period is a time period of a preset length of time counted backward from the target time point. For example, a preset time period of one week counted backward from the current time point 2025-8-8 15:18 is a time period from 2025-8-1 15:18 to 2025-8-8 15:18.
[0017] When a vehicle enters or leaves a parking lot, it generally passes through a barrier system of the parking lot, and the barrier system is provided with a parking lot management system. The parking lot management system records in-time data of in-vehicles and off-time data of out-vehicles. Based on this, the parking lot management system can manage in-and-out data of various vehicles, thereby generating vehicle record data of the parking lot.
[0018] The vehicle record data of the parking lot comprises a unique identifier (for example, a license plate number) of each in-and-out vehicle of the parking lot, a unique identifier (for example, a parking lot number or a parking lot name) of a parking lot where the vehicle is parked, a parking record unique identifier (for example, a parking record number), in-and-out time, and a parking state. The in-and-out time comprises in-time and off-time, and the parking state is in or off.
[0019] The vehicle record data of the parking lot can further comprise license plate color information of the in-and-out vehicle, and the license plate color information comprises, for example, blue, green, yellow, white, and black. In combination with the unique identifier (for example, the license plate number) of the in-and-out vehicle, the same vehicle can be more accurately determined, and the situation that different vehicles with different license plate colors but the same unique identifier are misjudged as the same vehicle can be avoided.
[0020] If the parking state of a certain in-and-out vehicle is in, the off-time in the corresponding in-and-out time is empty or missing, and the in-time is non-empty. If the parking state of a certain in-and-out vehicle is off, the in-time and the off-time in the corresponding in-and-out time are both non-empty.
[0021] In addition, if a device failure or network failure occurs, there may be a case of data loss. For example, a vehicle has left the parking lot, but the parking lot management system has not recorded the leaving data of the vehicle, so that the leaving time is empty, the parking state is not updated in time, and is still the entry, thereby causing the entry and exit data of the vehicle to be missing and inaccurate.
[0022] Generally, vehicles have entries and exits, and the entry time and the exit time may be several hours, several days, ten days, or dozens of days apart. If the same vehicle enters and exits multiple times within a preset time period, the entry time and the exit time of the same parking round need to be associated. Generally, the time difference between the entry time of a parking round and the corresponding exit time is the smallest or shortest compared to the time difference between the entry time and other exit times.
[0023] For example, a vehicle enters a parking lot at 1:00 on August 5, 2024, 20:00 on August 5, 2024, and 18:00 on August 6, 2024, and leaves the parking lot at 9:00 on August 5, 2024, 8:00 on August 6, 2024, and 9:00 on August 7, 2024, respectively. The entry time 1:00 on August 5, 2024, and the exit time 9:00 on August 5, 2024, of the vehicle belong to the same parking round; the entry time 20:00 on August 5, 2024, and the exit time 8:00 on August 6, 2024, belong to the same parking round; and the entry time 18:00 on August 6, 2024, and the exit time 9:00 on August 7, 2024, belong to the same parking round.
[0024] In one specific embodiment, the parking lot vehicle record data can be as shown in Table 1 below: Table 1
[0025] As can be seen from Table 1, the same vehicle (license plate number: *****582) has two different time period entry and exit records in the same parking lot (parking lot number: P1001), i.e., there are two parking rounds, one of which has no leaving time, and the other of which has an entry time and a corresponding leaving time.
[0026] S200: Obtain road junction flow data corresponding to the parking lot vehicle record data within the preset time period, wherein the road junction flow data includes a unique identifier of a road junction passing vehicle, a unique identifier of a road junction, and a road junction detection time of the road junction passing vehicle passing through the road junction.
[0027] Specifically, the road portal flow data can be obtained according to the data recorded when the monitoring device arranged at the road portal detects the passing of the vehicle. In addition, when the vehicle leaves the parking lot and passes through the road portal, the direction of the vehicle passing through the road portal can be used to determine whether the vehicle is leaving the parking lot or entering the parking lot.
[0028] There can be multiple road portals around the parking lot, and the same vehicle can pass through multiple road portals in sequence and be detected by the monitoring devices of the multiple road portals.
[0029] The road portal flow data can include the unique identification (for example, license plate number) of the vehicle passing through the road portal, the unique identification (for example, portal number or portal name) of the road portal through which the vehicle passing through the road portal passes, and the road portal detection time of the vehicle passing through the road portal.
[0030] In addition, the road portal flow data can also include the color of the license plate, such as green, blue, yellow, etc.
[0031] In one specific embodiment, the road portal flow data can be as shown in Table 2 below: Table 2
[0032] As can be seen from Table 2, the same vehicle (license plate number: *****582) passed through two road portals K2103 and K2106 in sequence.
[0033] S300: Based on the road portal flow data, the off-site correction and off-site record completion of the in-and-out vehicles in the parking lot vehicle record data are performed.
[0034] Specifically, if the device or network is not faulty, the parking lot management system can accurately record the information such as the entry time and exit time of each vehicle entering and leaving the parking lot. However, it is inevitable that due to problems such as device or network, the parking lot management system cannot accurately record the entry and exit data of the passing vehicles at all times, which further leads to inaccurate statistics of the number of vehicles in the parking lot, and the error can become larger and larger over time.
[0035] The road portal flow data records the detection time of the vehicle passing through the road portal. If the vehicle leaves the parking lot, it will inevitably pass through one or more road portals and be detected by the monitoring device of the road portal and record the road portal detection time and other data.
[0036] Therefore, even if the off-site data of the parking lot management system is missing, the road portal flow data can be used to correct and complete the off-site record of the in-and-out vehicles that have left the parking lot but have missing off-site records in the parking lot vehicle record data, and obtain the corrected parking lot vehicle record data.
[0037] More specifically, based on the road portal flow data, it can be determined which vehicles in the parking lot vehicle record data are missing off-site records of vehicles that have left, and the off-site time of the vehicles determined to have left can be confirmed.
[0038] S400: Based on the corrected parking lot vehicle record data, calculate the in-parking vehicle increment number of the parking lot in the preset time period.
[0039] Specifically, the corrected parking lot vehicle record data accurately records which vehicles enter and leave the parking lot in the preset time period.
[0040] The in-parking vehicle increment number in the preset time period is the difference between the total number of in-parking vehicles and the total number of off-site vehicles in the preset time period, and the in-parking vehicle increment number can be positive, negative, or zero.
[0041] S500: Calculate the sum of the historical in-parking vehicle number and the in-parking vehicle increment number to obtain the actual in-parking vehicle number of the parking lot at the target time, wherein the historical in-parking vehicle number is the in-parking vehicle number before the preset time period.
[0042] Specifically, for example, the target time is the current time, and the preset time period of one week from the current time 2025-8-8 15:18 is the time period from 2025-8-1 15:18 to 2025-8-8 15:18, and the historical in-parking vehicle number is the in-parking vehicle number of the parking lot before 2025-8-1 15:18.
[0043] The in-parking vehicle increment number is the difference between the total number of in-parking vehicles and the total number of off-site vehicles during the period from 2025-8-1 15:18 to 2025-8-8 15:18.
[0044] The sum of the historical in-parking vehicle number of the parking lot before 2025-8-1 15:18 and the in-parking vehicle increment number during the period from 2025-8-1 15:18 to 2025-8-815:18 is the actual in-parking vehicle number of the parking lot at the current time 2025-8-8 15:18.
[0045] It should be noted that the historical number of parked vehicles can also be calculated by steps S100-S500. For example, it is known that the number of parked vehicles in the parking lot is 0 at 2025-1-1 00:00, and 2025-1-1 00:00 is taken as the initial time of the parking lot. The parking lot vehicle record data and the corresponding road portal flow data of the parking lot during 2025-1-1 00:00 to 2025-8-1 15:18 are obtained, and based on the above steps S100-S500, the off-site correction and off-site record completion of the parking lot vehicle record data during this period are performed by using the road portal flow data during this period, and finally the difference between the total number of in-site vehicles and the total number of off-site vehicles during this period is obtained. The number of parked vehicles at 2025-8-1 15:18 is obtained.
[0046] Of course, if the historical number of parked vehicles in the parking lot at a certain historical time is known, the number of parked vehicles during the target time to the historical time can be calculated based on steps S100-S500, and finally the number of parked vehicles at the historical time and the number of parked vehicles during the target time can be calculated. The actual number of parked vehicles in the parking lot at the target time can be obtained.
[0047] The current calculation method of the number of parked vehicles is mainly based on the difference between the number of in-site vehicles and the number of off-site vehicles. This method has great limitations, and its accuracy depends on the completeness of the in-site and off-site records. Once it is impossible to ensure 100% completeness of the off-site data, the error will continue to accumulate even if there is only a slight data loss rate. The vehicles whose off-site records are missing will always be calculated in the number of parked vehicles, and the deviation of the number of parked vehicles will become larger and larger.
[0048] The embodiment can break through the limitations of the prior art on the counting of parked vehicles, and does not require the completeness of the parking lot vehicle flow record. The data loss rate can be applied regardless of its level. The embodiment can effectively correct the accumulated error of the number of parked vehicles caused by data loss, and make the calculation result of the number of parked vehicles more accurate.
[0049] The embodiment based on the road portal flow data can correct and complete the off-site records of the vehicles that have actually left but whose off-site data is missing in the parking lot vehicle record data. Based on the corrected parking lot vehicle record data, the number of parked vehicles and the actual number of parked vehicles in the parking lot can be accurately calculated. The embodiment can effectively correct the accumulated error of the number of parked vehicles caused by data loss, and accurately obtain the actual number of parked vehicles in the parking lot at any time.
[0050] In one embodiment, the off-site correction and off-site record completion of the in-out vehicles in the parking lot vehicle record data based on the road portal flow data in step S300 comprises: If the entry time of the suspicious vehicle is earlier than the corresponding road portal detection time, it is determined that the suspicious vehicle is an exited vehicle, and the parking state of the suspicious vehicle in the parking lot vehicle record data is changed from entry to exit. The first road portal detection time after the exited vehicle enters the parking lot is taken as the exit time, and is supplemented to the parking lot vehicle record data.
[0051] Specifically, if a vehicle in the parking lot vehicle record data only has an entry time but no corresponding exit time, the parking state of the vehicle in the parking round is entry; if the vehicle has both an entry time and a corresponding exit time, the parking state of the vehicle in the parking round is exit.
[0052] The exit record of a vehicle with an exit parking state is generally complete and true, while the exit record of a vehicle with an entry parking state may be incomplete. Based on this, the embodiment corrects the exit of the vehicle with an entry parking state and supplements the exit record.
[0053] The vehicle with an entry parking state is a suspected vehicle that may have incomplete exit data. If the entry time of the suspected vehicle is earlier than the road portal detection time of the suspected vehicle passing through the road portal, it indicates that the suspected vehicle left the parking lot at a certain time after entering the parking lot, so the suspected vehicle can be detected by the road portal. Therefore, it can be determined that the suspected vehicle has actually left the parking lot and is an exited vehicle.
[0054] In addition, the actual exit time of the suspected vehicle from the parking lot has been lost after being determined as an exited vehicle, but the time of passing through the road portal after leaving the parking lot is after the exit, so the road portal detection time can be roughly taken as the exit time of the exited suspected vehicle leaving the parking lot.
[0055] After the determination is completed, the parking state of the exited suspected vehicle in the parking lot vehicle record data is changed from entry to exit, the first road portal detection time after the exited vehicle enters the parking lot is taken as the exit time, and is supplemented to the parking lot vehicle record data to obtain the corrected parking lot vehicle record data.
[0056] It should be noted that the embodiment corrects the exit of the vehicle in each parking round. That is, if the same vehicle has n parking rounds, and the parking state of m parking rounds is entry, the exit of the vehicle in each parking round with an entry state is corrected, that is, the vehicle is corrected m times.
[0057] In one embodiment, the parking lot vehicle record data includes: entry and exit records of each vehicle entering and exiting; the road checkpoint flow data includes: passage records of each vehicle passing through each road checkpoint. Step S300, which involves correcting the departure of vehicles entering and exiting the parking lot based on the road checkpoint flow data, further includes: Based on the entry time and unique identifier of the suspected vehicle, as well as the road checkpoint detection time and unique identifier of the vehicle passing through the road checkpoint, the entry and exit records and passage records of the same suspected vehicle are correlated. or, Based on the entry time and unique identifier of the suspected vehicle, as well as the road checkpoint detection time and unique identifier of the vehicle passing through the road checkpoint, the entry and exit records of the same suspected vehicle without a departure time are associated with the corresponding passage records.
[0058] Specifically, the parking lot vehicle record data includes the entry and exit records of each vehicle, and the same vehicle can have multiple entry and exit records. Each entry and exit record must include at least the unique identifier of the vehicle, the unique identifier of the parking lot, the unique identifier of the parking record, the entry and exit time, and the parking status. The entry and exit time includes the entry time and the exit time, and the parking status is either entry or exit.
[0059] If the parking status is "entering", then the corresponding departure time is empty.
[0060] As shown in Table 1 above, each row represents one entry / exit record.
[0061] The road checkpoint flow data includes: the passage records of vehicles passing through each road checkpoint, as shown in Table 2 above. Each row is a passage record, and each passage record includes at least the unique identifier of the vehicle passing through the road checkpoint (e.g., license plate number), the unique identifier of the road checkpoint (e.g., checkpoint number), and the road checkpoint detection time when the vehicle passed through the road checkpoint.
[0062] Parking lot vehicle record data may contain numerous entry and exit records, and the same vehicle may have multiple entry and exit records; similarly, road checkpoint flow data may contain numerous passage records, and the same vehicle may also have multiple passage records. The times for the same vehicle to enter the parking lot, leave the parking lot, and pass through the road checkpoint after leaving the parking lot during the same parking cycle need to correspond.
[0063] Based on this, this embodiment will associate the entry and exit records and passage records of the same vehicle during the same parking cycle.
[0064] More specifically, according to the unique identification of the access vehicle in the access record and the unique identification of the passing vehicle in the passing record, all access records and passing records of the same vehicle can be found.
[0065] In the same parking session, the access time, the departure time and the road portal detection time after leaving the parking lot are the closest. Based on this, which access record and which passing record of the same vehicle are associated, i.e., belong to the same parking session, can be determined according to the access time and the road portal detection time.
[0066] For example, Table 3 below is all access records of the access vehicle with license plate number *****582, and Table 4 is all passing records of the access vehicle: Table 3
[0067] Table 4
[0068] As can be seen from Table 3 and Table 4, the departure time of the access record of the vehicle on 2025-3-18 is empty, but the vehicle is monitored at two time points, 2025-03-18 08:01:57 and 2025-03-18 08:09:18, by road portals K2103 and K2106 respectively. This shows that the vehicle has missing departure data, and actually the vehicle has left the parking lot. Therefore, the first access record in Table 3 is associated with the first passing record and the second passing record in Table 4.
[0069] In addition, the first passing record in Table 4 is the first passing record of the vehicle after entering the parking lot at 2025-03-18 01:12:06, and the road portal detection time is the first road portal detection time of the vehicle after entering the parking lot at 2025-03-18 01:12:06, which can be used as the departure time of the parking session and filled into the parking lot vehicle record data.
[0070] Similarly, the access time of the second access record in Table 3 is earlier than the road portal detection time of the third passing record in Table 4, and the two time points are the closest, so the second access record in Table 3 is associated with the third passing record in Table 4.
[0071] The access time of the third access record in Table 3 is earlier than the road portal detection time of the fourth passing record in Table 4, and the two time points are the closest, so the third access record in Table 3 is associated with the fourth passing record in Table 4.
[0072] In another embodiment, the first entry and exit record in Table 3 has no departure time, so only the pass record associated with the first entry and exit record is searched. That is, the first entry and exit record in Table 3 is associated with the first pass record and the second pass record in Table 4. The second entry and exit record and the third entry and exit record in Table 3 both have departure times, and the two parking rounds have clear departure records, so no departure correction and departure record completion are needed. Therefore, in order to reduce the amount of calculation and improve the correction efficiency, the association and matching of the pass records of the entry and exit records with the departure times can be omitted.
[0073] For the entry and exit records of the vehicles with the parking state of "entry" in the parking lot vehicle record data, based on the license plate number and the license plate color, the corresponding pass records in the road portal flow data are associated, and the association result is as shown in the following table:
[0074] Correcting the departure time of the vehicle in the parking lot: From the association data, the data with the "entry time" earlier than the "road portal detection time" is selected. These vehicles have no departure record, but have been detected by the road portal, so these vehicles have actually left, which belongs to the case of missing departure record. The first road portal detection time after entry is corrected as the departure time of the vehicle. The result is as shown in the following table:
[0075] In this embodiment, by associating the entry and exit records of the vehicles that have not left with the pass records, the data record relationship of the vehicles entering and exiting the parking lot and passing through the road portal can be clarified, which facilitates the subsequent accurate departure correction.
[0076] In one embodiment, the parking lot vehicle record data obtained in step S100 includes: The parking lot vehicle flow data obtained before the target time includes entry data and departure data. The entry data includes the unique identifier of the entry vehicle, the unique identifier of the parking lot where the vehicle enters, the first parking record unique identifier, the entry time, and the first parking state, and the first parking state is entry. The departure data includes the unique identifier of the departure vehicle, the unique identifier of the parking lot where the vehicle departs, the second parking record unique identifier, the departure time, and the second parking state, and the second parking state is departure. The entry data and the departure data in the parking lot vehicle flow data are subjected to data deduplication and merging processing to obtain the parking lot vehicle record data.
[0077] Specifically, the parking lot vehicle flow data includes: parking data of each access vehicle, if a vehicle has access and no exit in the same parking round, the parking data includes access data; if a vehicle has access and exit, the parking data includes access data and exit data. The access data and the exit data are recorded separately.
[0078] The embodiment can associate, de-duplicate and data merge the access data and the exit data of the same parking round according to the unique identifier of the access vehicle, the access time and the exit time, obtain the access record of each parking round, and the access record of all parking rounds of all access vehicles constitutes the parking lot vehicle record data.
[0079] The first parking record unique identifier and the second parking record unique identifier of the same vehicle in the same parking round are the same. That is, the access and the corresponding exit share the same parking record unique identifier. The access and the exit of the same vehicle in the same parking round are the same.
[0080] The embodiment can reduce the calculation amount of data processing such as data lookup matching and improve the efficiency of parking vehicle calculation by de-duplicating and merging the access data and the exit data of the same parking round.
[0081] In one embodiment, the parking lot vehicle flow data includes: parking data of each access vehicle, the parking data includes access data, or the parking data includes access data and exit data; The access data and the exit data in the same parking data share the same parking record unique identifier, and the parking lot of the access and the parking lot of the exit are the same parking lot. The data de-duplication and merging processing of the access data and the exit data in the parking lot vehicle flow data to obtain the parking lot vehicle record data includes: If the parking data includes access data and exit data, the access data and the exit data are merged, and the parking state is determined as exit.
[0082] Specifically, in order to ensure the association of the access time and the exit time of the same vehicle in the same parking round, the access data and the exit data of the same parking round in the embodiment share the same parking record unique identifier.
[0083] For example, the parking lot has multiple entrances and exits, and the same vehicle can enter from entrance A-1 and exit from exit B-2. The parking lot has multiple exits and entrances, but does not affect the same vehicle using the same parking record unique identifier in the same parking round.
[0084] If a set of parking data only includes access data, it means that the vehicle has not left the parking lot.
[0085] If a set of parking data contains both entry data and exit data, it means that the vehicle has left the parking lot in this parking round.
[0086] In the method, the entry data and the exit data of the same parking round are associated by a common parking record unique identifier.
[0087] If the entry time is contained in the exit data, the entry data is directly deleted and the exit data is reserved; if the entry time is not contained in the exit data, the exit data is reserved, an entry time field is added in the exit data, and the entry time in the entry data is filled in the exit data as the field value of the added entry time field.
[0088] The following examples are given: Obtain parking lot vehicle flow data for several days, the parking lot vehicle flow data including entry data and exit data. The data content includes: parking lot number, license plate number, license plate color, parking record number, parking state, entry time, exit time. The entry and exit of the same vehicle in the same parking round are two independent records, and share a "parking record number", and the "parking state" is "entry" and "exit" respectively. The data example is shown in Table 5 as follows: Table 5
[0089] Parking lot vehicle flow data filtering: if the "parking state" of the same "parking record number" exists "entry" and "exit" records at the same time, the "entry" data is removed and only the "exit" data is reserved; the completely repeated data is removed and only 1 record is reserved. The parking lot vehicle record data obtained after filtering is shown in Table 6 as follows: Table 6
[0090] In one embodiment, the method for calculating the number of vehicles in parking based on vehicle exit missing correction further comprises: Based on the corrected parking lot vehicle record data, the number of vehicles in parking of the target time window of the parking lot in the preset time period is calculated.
[0091] Specifically, the preset time period contains a plurality of non-overlapping and continuous time windows, and the target window is any one of the time windows in the preset time period.
[0092] For example, the preset time period is one week, and each time window is 1 hour, so the preset time period contains 168 time windows.
[0093] The historical number of vehicles in parking is the number of vehicles in parking before the preset time period, and is also the number of vehicles in parking before the first time window.
[0094] Based on the corrected parking lot vehicle record data, the difference between the total number of entry vehicles and the total number of exit vehicles in the first time window can be calculated, which is the number of parked vehicle increments in the first time window.
[0095] The number of parked vehicle increments in the first time window and the sum of the historical number of parked vehicles are calculated to obtain the number of parked vehicles in the first time window.
[0096] Similarly, based on the corrected parking lot vehicle record data, the difference between the total number of entry vehicles and the total number of exit vehicles in the second time window can be calculated, which is the number of parked vehicle increments in the second time window.
[0097] The number of parked vehicle increments in the second time window and the number of parked vehicles in the first time window are calculated to obtain the number of parked vehicles in the second time window.
[0098] Based on the corrected parking lot vehicle record data, the difference between the total number of entry vehicles and the total number of exit vehicles in the third time window can be calculated, which is the number of parked vehicle increments in the third time window.
[0099] The number of parked vehicle increments in the third time window and the number of parked vehicles in the second time window are calculated to obtain the number of parked vehicles in the third time window.
[0100] Similarly, the number of parked vehicles in any target time window in the preset time period can be calculated.
[0101] In one embodiment, based on the corrected parking lot vehicle record data, the number of parked vehicles in the target time window of the parking lot in the preset time period is calculated, including: Based on the corrected parking lot vehicle record data, the difference between the total number of entry vehicles and the total number of exit vehicles in the target time window is calculated; The sum of the total number of parked vehicles in the previous time window of the target time window and the difference is obtained to obtain the total number of parked vehicles in the target time window.
[0102] Specifically, the number of parked vehicles in any time window t of the parking lot is calculated by the following formula 1 , wherein, is the number of parked vehicles in the previous time window, is the total number of entry vehicles in the current time window (i.e. the total number of vehicles whose entry time falls in the current time window), is the total number of exit vehicles in the current time window (i.e. the total number of vehicles whose exit time or corrected exit time falls in the current time window). The number of parked vehicles in the initial time window The in-parking vehicle number can be obtained by manually counting the vehicles, or by calculating the difference between the total in-parking number and the total out-parking number after correcting the off-time based on the total historical data.
[0103] Formula 1 Figure 2 FIG. 1 is a schematic diagram of a comparison between the in-parking vehicle number before and after correction of a parking lot; and Figure 2 As can be seen, there is a large difference between the in-parking vehicle number before correction (indicated by a blue dashed line) and the in-parking vehicle number after correction (indicated by an orange solid line), and the in-parking vehicle number after correction can more accurately reflect the actual in-parking vehicle number of the parking lot. Moreover, the actual in-parking vehicle number of the parking lot at any time window can be accurately calculated by the scheme of the present application.
[0104] With reference to Figure 3 The present application also provides a device for calculating the in-parking vehicle number based on off-vehicle missing correction, which comprises: A first data acquisition module 100 is configured to acquire parking lot vehicle record data in a preset time period before a target time, wherein the parking lot vehicle record data comprises a unique identifier of an in-out vehicle, a unique identifier of a parking lot, a unique identifier of a parking record, an in-out time and a parking state, the in-out time comprises an in-time and an off-time, and the parking state is in or out; A second data acquisition module 200 is configured to acquire road portal flow data corresponding to the parking lot vehicle record data in the preset time period, wherein the road portal flow data comprises a unique identifier of a road portal passing vehicle, a unique identifier of a road portal, and a road portal detection time of the road portal passing vehicle passing through the road portal; A correction module 300 is configured to correct the in-out vehicle in the parking lot vehicle record data based on the road portal flow data, and complete the off-vehicle record; A first calculation module 400 is configured to calculate the in-parking vehicle increment number of the parking lot in the preset time period based on the corrected parking lot vehicle record data; A second calculation module 500 is configured to calculate the sum of a historical in-parking vehicle number and the in-parking vehicle increment number, to obtain the actual in-parking vehicle number of the parking lot at the target time, wherein the historical in-parking vehicle number is the in-parking vehicle number before the preset time period.
[0105] In one embodiment, the correction module 300 comprises: The off-site judgment module is configured to determine that the suspicious vehicle is an off-site vehicle if the entry time of the suspicious vehicle is earlier than the corresponding road portal detection time, and change the parking state of the suspicious vehicle from entry to off-site in the parking lot vehicle record data, wherein the suspicious vehicle is an in-out vehicle with an entry state in the parking lot vehicle record data. The off-site time determination module is configured to determine the first road portal detection time after the off-site vehicle enters the parking lot as the off-site time, and complete the parking lot vehicle record data.
[0106] In an embodiment, the parking lot vehicle record data includes in-out records of each in-out vehicle, The road portal flow data includes through records of each road portal through vehicle, The correction module 300 further includes: The association module is configured to associate the in-out record and the through record of the same suspicious vehicle based on the entry time of the suspicious vehicle and the unique identifier of the suspicious vehicle, and the road portal detection time of the road portal through vehicle and the unique identifier of the road portal through vehicle. Alternatively, The correction module 300 further includes: The association module is configured to associate the corresponding through record for the in-out record of the same suspicious vehicle without off-site time based on the entry time of the suspicious vehicle and the unique identifier of the suspicious vehicle, and the road portal detection time of the road portal through vehicle and the unique identifier of the road portal through vehicle.
[0107] In an embodiment, the first data acquisition module 100 includes: The parking lot flow data acquisition module is configured to acquire parking lot vehicle flow data within a preset time period before a target time, wherein the parking lot vehicle flow data includes entry data and off-site data. The entry data includes a unique identifier of an entry vehicle, a unique identifier of a parking lot to be parked, a first parking record unique identifier, an entry time, and a first parking state, and the first parking state is entry. The off-site data includes a unique identifier of an off-site vehicle, a unique identifier of a parking lot to be left, a second parking record unique identifier, an off-site time, and a second parking state, and the second parking state is off-site. The data deduplication and merging processing module is configured to perform data deduplication and merging processing on the entry data and the off-site data in the parking lot vehicle flow data to obtain parking lot vehicle record data.
[0108] In an embodiment, the parking lot vehicle flow data includes parking data of each in-out vehicle, and the parking data includes entry data, or the parking data includes entry data and off-site data. The entry data and the exit data in the same parking data share the same parking record unique identifier, and the parking lot where the vehicle enters and the parking lot where the vehicle exits are the same parking lot. The data deduplication and merging processing module is specifically configured to: if the parking data includes the entry data and the exit data, merging the entry data and the exit data, and determining the parking state as the exit.
[0109] In an embodiment, the parking vehicle number calculation device based on the vehicle exit missing correction further includes: The time window parking number calculation module is configured to calculate the number of parked vehicles in a target time window of the parking lot in the preset time period based on the corrected parking lot vehicle record data.
[0110] In an embodiment, the time window parking number calculation module is specifically configured to: Calculate the difference between the total number of entry vehicles and the total number of exit vehicles in the target time window based on the corrected parking lot vehicle record data. Obtain the total number of parked vehicles in the target time window based on the sum of the total number of parked vehicles in the previous time window of the target time window and the difference.
[0111] Figure 4 is a structural schematic diagram of a computer device provided by an embodiment of the present application. The computer device 7000 can have great differences due to different configurations or performances, and can include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. The memory 720 and the storage medium 730 can be temporary storage or persistent storage. The programs stored in the storage medium 730 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the computer device 7000. Further, the processor 710 can be configured to communicate with the storage medium 730 to execute a series of instruction operations in the storage medium 730 on the computer device 7000.
[0112] The computer device 7000 can further include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art can understand that the computer device 7000 can further include other components, and the components are not limited to the above-mentioned components. Figure 4The illustrated computer device architecture is not meant to imply architectural limitations with respect to the computer device, as one of ordinary skill in the art will appreciate that the computer device can include more or fewer components than shown, or a different arrangement of the components, and still function in accordance with the techniques for which this disclosure provides.
[0113] The present application also provides a computer device comprising a memory and a processor, the memory storing computer readable instructions, the computer readable instructions being executed by the processor to cause the processor to perform the steps of the method for calculating the number of parked vehicles based on missing vehicle departure correction according to any of the above embodiments. The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium, the computer readable storage medium storing instructions, the instructions being executed on a computer to cause the computer to perform the steps of the method for calculating the number of parked vehicles based on missing vehicle departure correction.
[0114] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be described here.
[0115] The integrated unit, if realized in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0116] The above-described and above-embodied examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for calculating the number of parked vehicles based on vehicle departure loss correction, characterized in that, The method for calculating the number of parked vehicles based on vehicle departure loss correction includes: Acquire parking lot vehicle record data within a preset time period before the target time. The parking lot vehicle record data includes the unique identifier of the vehicle entering and exiting, the unique identifier of the parking lot, the unique identifier of the parking record, the entry and exit time, and the parking status. The entry and exit time includes the entry time and the exit time, and the parking status is either entry or exit. Obtain road checkpoint flow data corresponding to the parking lot vehicle record data within the preset time period, wherein the road checkpoint flow data includes the unique identifier of the vehicle passing through the road checkpoint, the unique identifier of the road checkpoint, and the road checkpoint detection time of the vehicle passing through the road checkpoint; Based on the traffic flow data at the road checkpoints, the exit and exit records of vehicles in the parking lot vehicle record data are corrected and completed. Based on the corrected parking lot vehicle record data, calculate the increase in the number of parked vehicles in the parking lot during the preset time period; The sum of the historical number of parked vehicles and the incremental number of parked vehicles is calculated to obtain the actual number of parked vehicles in the parking lot at the target time, wherein the historical number of parked vehicles is the number of parked vehicles before the preset time period.
2. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to claim 1, characterized in that, The step of correcting and completing the departure records of vehicles entering and exiting the parking lot based on the road checkpoint flow data includes: If the entry time of a suspected vehicle is earlier than the corresponding road checkpoint detection time, the suspected vehicle is determined to be a vehicle that has left the parking lot, and the parking status of the suspected vehicle is changed from entry to exit. The suspected vehicle is a vehicle whose parking status is entry in the parking lot vehicle record data. The departure time is determined by the first road checkpoint detection time after the vehicle enters the parking lot, and this time is added to the parking lot vehicle record data.
3. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to claim 2, characterized in that, The parking lot vehicle record data includes: entry and exit records of each vehicle. The road checkpoint flow data includes: records of vehicles passing through each road checkpoint. The step of correcting and completing the exit records of vehicles entering and exiting the parking lot based on the road checkpoint flow data also includes: Based on the entry time and unique identifier of the suspected vehicle, as well as the road checkpoint detection time and unique identifier of the vehicle passing through the road checkpoint, the entry and exit records and passage records of the same suspected vehicle are correlated. or, Based on the entry time and unique identifier of the suspected vehicle, as well as the road checkpoint detection time and unique identifier of the vehicle passing through the road checkpoint, the entry and exit records of the same suspected vehicle without a departure time are associated with the corresponding passage records.
4. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to any one of claims 1-3, characterized in that, The acquisition of parking lot vehicle record data within a preset time period prior to the target time includes: Acquire parking lot vehicle flow data within a preset time period prior to the target time, wherein the parking lot vehicle flow data includes: entry data and exit data; The entry data includes the unique identifier of the entering vehicle, the unique identifier of the parking lot it occupies, the unique identifier of the first parking record, the entry time, and the first parking status, where the first parking status is "entry". The departure data includes the unique identifier of the departing vehicle, the unique identifier of the parking lot it left, the unique identifier of the second parking record, the departure time, and the second parking status, where the second parking status is "departure". The entry and exit data in the parking lot vehicle flow data are deduplicated and merged to obtain the parking lot vehicle record data.
5. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to claim 4, characterized in that, The parking lot vehicle flow data includes: parking data of each vehicle entering and exiting, wherein the parking data includes entry data, or the parking data includes both entry data and exit data; Among them, the entry data and exit data in the same parking data share the same unique parking record identifier, and the parking lot for entry and the parking lot for exit are the same parking lot; The process of deduplicating and merging the entry and exit data in the parking lot vehicle flow data to obtain parking lot vehicle record data includes: If the parking data includes both entry and exit data, then the entry and exit data will be merged, and the parking status will be determined as exit.
6. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to any one of claims 1-3 and 5, characterized in that, The method for calculating the number of parked vehicles based on vehicle departure loss correction also includes: Based on the corrected parking lot vehicle record data, the number of vehicles parked in the parking lot within the target time window during the preset time period is calculated.
7. The method for calculating the number of parked vehicles based on vehicle departure loss correction according to claim 6, characterized in that, The calculation of the number of parked vehicles in the parking lot within the target time window within the preset time period, based on the corrected parking lot vehicle record data, includes: Based on the corrected parking lot vehicle record data, calculate the difference between the total number of vehicles entering and the total number of vehicles leaving within the target time window; The total number of vehicles parked in the target time window is obtained by summing the total number of vehicles parked in the previous time window and the difference.
8. A calculation device for the number of parked vehicles based on vehicle departure loss correction, characterized in that, The device for calculating the number of parked vehicles based on vehicle departure loss correction includes: The first data acquisition module is used to acquire parking lot vehicle record data within a preset time period before the target time. The parking lot vehicle record data includes the unique identifier of the vehicle entering and exiting, the unique identifier of the parking lot, the unique identifier of the parking record, the entry and exit time, and the parking status. The entry and exit time includes the entry time and the exit time, and the parking status is either entry or exit. The second data acquisition module is used to acquire road checkpoint flow data corresponding to the parking lot vehicle record data within the preset time period. The road checkpoint flow data includes the unique identifier of the vehicle passing through the road checkpoint, the unique identifier of the road checkpoint, and the road checkpoint detection time when the vehicle passes through the road checkpoint. The correction module is used to perform departure correction and departure record completion on the vehicle entry and exit data of the parking lot based on the traffic flow data of the road checkpoint. The first calculation module is used to calculate the increase in the number of parked vehicles in the parking lot during the preset time period based on the corrected parking lot vehicle record data. The second calculation module is used to calculate the sum of the historical number of parked vehicles and the incremental number of parked vehicles to obtain the actual number of parked vehicles in the parking lot at the target time, wherein the historical number of parked vehicles is the number of parked vehicles before the preset time period.
9. A computer device, characterized in that, The computer device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the computer device to execute the method for calculating the number of parked vehicles based on vehicle departure loss correction as described in any one of claims 1-7.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the method for calculating the number of parked vehicles based on vehicle departure loss correction as described in any one of claims 1-7.