CN113838303B - Parking lot recommendation method and device, electronic equipment and storage medium - Google Patents

Parking lot recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113838303B
CN113838303B CN202111126992.9A CN202111126992A CN113838303B CN 113838303 B CN113838303 B CN 113838303B CN 202111126992 A CN202111126992 A CN 202111126992A CN 113838303 B CN113838303 B CN 113838303B
Authority
CN
China
Prior art keywords
parking lot
parking
prediction model
prediction
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111126992.9A
Other languages
Chinese (zh)
Other versions
CN113838303A (en
Inventor
袁钢
杜泽婷
夏曙东
金晟
代宇庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qianfang Jietong Technology Co ltd
Original Assignee
Qianfang Jietong Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qianfang Jietong Technology Co ltd filed Critical Qianfang Jietong Technology Co ltd
Priority to CN202111126992.9A priority Critical patent/CN113838303B/en
Publication of CN113838303A publication Critical patent/CN113838303A/en
Application granted granted Critical
Publication of CN113838303B publication Critical patent/CN113838303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/14Traffic control systems for road vehicles indicating individual free spaces in parking areas
    • G08G1/141Traffic control systems for road vehicles indicating individual free spaces in parking areas with means giving the indication of available parking spaces
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The application provides a parking lot recommendation method, a device, an electronic device and a computer readable storage medium. The method comprises the following steps: acquiring a recommended service request of a parking lot, wherein the recommended service request comprises a current position, a destination and a current time; determining at least one target parking lot from all parking lots around the destination; determining the estimated time when the vehicle arrives at each target parking lot; aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; and recommending the parking lots according to the number of the idle parking lots of each target parking lot. Compared with the prior art, the method and the device can predict the number of the idle parking spaces corresponding to different long and short time periods aiming at each parking lot, each time period corresponds to one prediction model, the time granularity corresponding to the prediction model is finer, and the prediction accuracy is improved.

Description

Parking lot recommendation method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of traffic, in particular to a parking lot recommendation method and device, electronic equipment and a computer readable storage medium.
Background
With the improvement of the living standard of people, the vehicle conservation rate is greatly increased, and traffic jam and difficult parking become very concerned problems of people. The parking lot information of the destination is mastered in time, and the method is very important for daily driving and traveling of people.
The parking lot recommendation function in the existing internet map service application, urban parking application and internet parking application mainly induces vehicle owners to park through berths, parking fee information, distance information and the like of the parking lots around the destination, and the existing method can still ensure that the parking lots still have idle parking spaces when users arrive at the parking lot, so that precious time of the users is wasted, and parking experience of the users is also influenced.
Disclosure of Invention
The application aims to provide a parking lot recommending method and device, electronic equipment and a computer readable storage medium.
The first aspect of the application provides a parking lot recommendation method, which comprises the following steps:
acquiring a parking lot recommended service request, wherein the parking lot recommended service request comprises a current position, a destination and a current time;
determining at least one target parking lot from all parking lots around the destination;
Determining the estimated time when the vehicle arrives at each target parking lot;
aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model;
and recommending the parking lots according to the number of the idle parking lots of each target parking lot.
In a possible implementation manner, in the above parking lot recommendation method provided by the embodiment of the present application, a process of establishing a prediction model of a parking lot is as follows:
acquiring parking lot related data, and preprocessing the parking lot related data;
training according to the preprocessed related data of the parking lots to obtain a prediction model according to preset time periods aiming at each parking lot, wherein each preset time period corresponds to one prediction model;
the preset time period is divided into a short period and a long period, the prediction target of the prediction model corresponding to the short period is the number of idle parking spaces of the parking lot per hour within 1 day in the future, and the prediction target of the prediction model corresponding to the long period is the number of idle parking spaces of the parking lot per day within 7 days in the future.
In a possible implementation manner, in the above parking lot recommendation method provided by the embodiment of the present application, the preprocessing the data related to the parking lot includes:
screening out the parking lot meeting the preset evaluation standard according to the related data of the parking lot;
carrying out parking lot position correction, parking lot type correction and parking lot total parking space correction on the screened parking lots;
and filling the missing value of the screened out-of-the-field time of the vehicle in the parking lot.
In a possible implementation manner, in the above parking lot recommendation method provided by the embodiment of the present application, for each parking lot, according to the preprocessed related data of the parking lot, training is performed according to a preset time period to obtain a prediction model, including:
dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
the average error value predicted by each machine learning model in the prediction period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
And testing the prediction accuracy of the optimal model according to the test set, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
In a possible implementation manner, the method for recommending a parking lot provided in the embodiment of the present application further includes:
for each parking lot, calculating the prediction accuracy of a prediction model of each preset time period corresponding to the parking lot at regular intervals;
when the prediction accuracy is smaller than a preset threshold, retraining a prediction model of the parking lot in the preset time period until the prediction accuracy is not smaller than the preset threshold;
the calculation formula of the prediction accuracy y is as follows:
y=1-|a-b|/c;
wherein a represents the actual space occupation number, b represents the predicted space occupation number obtained by calculating the predicted free space number output according to the prediction model, and c represents the total parking space number of the parking lot.
In a possible implementation manner, the method for recommending a parking lot provided in the embodiment of the present application further includes:
and when the number of the idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel.
In a possible implementation manner, in the method for recommending parking lots provided in the embodiment of the present application, the determining at least one target parking lot from all parking lots around the destination includes:
Acquiring all parking lots around the destination and the distance between each parking lot and the destination;
a parking lot within a first preset distance range from the destination is used as a target parking lot;
and when the parking lot does not exist in the first preset distance range, determining the parking lot which is in a second preset distance range from the destination as a target parking lot, wherein the second preset distance is larger than the first preset distance.
A second aspect of the present application provides a parking lot recommendation device, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a parking lot recommended service request, and the parking lot recommended service request comprises a current position, a destination and a current time;
a parking lot determining module for determining at least one target parking lot from among all parking lots around the destination;
the arrival time determining module is used for determining the expected time when the vehicle arrives at each target parking lot;
the prediction module is used for calling a prediction model of the target parking lot corresponding to the time period of the predicted moment aiming at each target parking lot, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model;
And the recommending module is used for recommending the parking lots according to the number of the idle parking lots of each target parking lot.
In a possible implementation manner, the parking lot recommendation device provided in the embodiment of the present application further includes:
the prediction model building module is used for:
acquiring parking lot related data, and preprocessing the parking lot related data;
training according to the preprocessed related data of the parking lots to obtain a prediction model according to preset time periods aiming at each parking lot, wherein each preset time period corresponds to one prediction model;
the preset time period is divided into a short period and a long period, the prediction target of the prediction model corresponding to the short period is the number of idle parking spaces of the parking lot per hour within 1 day in the future, and the prediction target of the prediction model corresponding to the long period is the number of idle parking spaces of the parking lot per day within 7 days in the future.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction model building module is specifically configured to:
screening out the parking lot meeting the preset evaluation standard according to the related data of the parking lot;
carrying out parking lot position correction, parking lot type correction and parking lot total parking space correction on the screened parking lots;
And filling the missing value of the screened out-of-the-field time of the vehicle in the parking lot.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction model building module is specifically configured to:
dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
the average error value predicted by each machine learning model in the prediction period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
and testing the prediction accuracy of the optimal model according to the test set, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction module is further configured to:
for each parking lot, calculating the prediction accuracy of a prediction model of each preset time period corresponding to the parking lot at regular intervals;
When the prediction accuracy is smaller than a preset threshold, retraining a prediction model of the parking lot in the preset time period until the prediction accuracy is not smaller than the preset threshold;
the calculation formula of the prediction accuracy y is as follows:
y=1-|a-b|/c;
wherein a represents the actual space occupation number, b represents the predicted space occupation number obtained by calculating the predicted free space number output according to the prediction model, and c represents the total parking space number of the parking lot.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction module is further configured to:
and when the number of the idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the parking lot determining module is specifically configured to:
determining all parking lots around the destination and the distance between each parking lot and the destination;
and determining at least one target parking lot from all parking lots around the destination according to the distance between each parking lot and the destination.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the parking lot determining module is further specifically configured to:
Determining a parking lot with a distance destination within a first preset distance range as a target parking lot;
and when the parking lot does not exist in the first preset distance range, determining the parking lot with the distance destination in the second preset distance range as a target parking lot, wherein the second preset distance is larger than the first preset distance.
A third aspect of the present application provides an electronic device, comprising: the parking lot recommendation method comprises a memory, a processor and a computer program, wherein the computer program is stored in the memory and can be run on the processor, and the processor executes to realize the parking lot recommendation method according to the first aspect of the application.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the parking lot recommendation method of the first aspect of the present application.
According to the parking lot recommendation method, the device, the electronic equipment and the storage medium, a parking lot recommendation service request is acquired, and at least one target parking lot is determined from all parking lots around a destination; determining the estimated time when the vehicle arrives at each target parking lot; aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; and recommending the parking lots according to the number of the idle parking lots of each target parking lot. Compared with the prior art, the method and the device can predict the number of the idle parking spaces corresponding to each moment point in a short period and a long period for each parking lot, each time period corresponds to a prediction model, the time granularity corresponding to the prediction model is finer, and the prediction accuracy is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the application. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 shows a flow chart of a parking lot recommendation method provided by the present application;
FIG. 2 is a schematic diagram of a parking lot recommendation provided herein;
FIG. 3 is a diagram showing a process of establishing a predictive model of a parking lot provided by the present application;
FIG. 4 is a schematic view of a parking lot recommendation device provided by the present application;
FIG. 5 shows a schematic diagram of an electronic device provided herein;
fig. 6 shows a schematic diagram of a computer-readable storage medium provided by the present application.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It is noted that unless otherwise indicated, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this application belongs.
In addition, the terms "first" and "second" etc. are used to distinguish different objects and are not used to describe a particular order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The embodiments of the present application provide a parking lot recommendation method and apparatus, an electronic device, and a computer readable storage medium, and the following description is made with reference to the accompanying drawings.
Fig. 1 shows a flowchart of a parking lot recommending method provided in an embodiment of the present application, as shown in fig. 1, specifically including the following steps S101 to S105:
s101, acquiring a parking lot recommended service request, wherein the parking lot recommended service request comprises a current position, a destination and a current time.
S102, determining at least one target parking lot from all parking lots around a destination;
in practical applications, there are many parking lots around the destination, and for convenience, a parking lot not far away from the destination is generally selected for parking, and in some embodiments of the present application, the step S102 may be specifically implemented as follows:
determining all parking lots around the destination and the distance between each parking lot and the destination;
at least one target parking lot is determined from all parking lots around the destination according to the distance between each parking lot and the destination.
Further, the step of determining at least one target parking lot from all parking lots around the destination according to the distance between each parking lot and the destination specifically includes:
determining a parking lot with a distance destination within a first preset distance range as a target parking lot;
and when the parking lot does not exist in the first preset distance range, determining the parking lot with the distance destination in the second preset distance range as a target parking lot, wherein the second preset distance is larger than the first preset distance.
For example, the first preset distance is set to 100 meters, the second preset distance is set to 200 meters, in this embodiment, a parking lot whose distance destination is within a range of 100 meters is first selected as a target parking lot, and when there is no parking lot within a range of 100 meters, a parking lot whose distance destination is within a range of 200 meters is selected as a target parking lot. If there is still no parking lot within 200 meters, a parking lot further from the destination may be recommended to the user, i.e., stepwise traversal according to the distance from the destination, which is not limited in this application.
In this embodiment, according to the distance between the parking lot and the destination, the parking lot around the destination is selected stepwise as the target parking lot, and the target parking lot is selected reasonably, so that the user experience is improved.
S103, determining the expected time when the vehicle arrives at each target parking lot;
in this step, the time when the vehicle arrives at each target parking lot may be predicted by a related method, for example, according to road conditions, average running speed of the vehicle, and the like.
S104, for each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted time belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted time by using the prediction model;
specifically, for each parking lot, according to the embodiment of the present disclosure, according to the historical data related to the parking lot, a prediction model corresponding to a plurality of time periods is obtained through pre-training, where the time periods are divided into a short period and a long period, and the short period is within 1 day in the future, for example, within 1 hour in the future, within 2 hours in the future, and within 23 hours in the future. Long period means more than 1 day in the future, for example, in the future 2 days, 3 days to 7 days in the future.
According to some embodiments of the present application, the short period may be a period of half an hour or one minute, and the long period may be a period of 1.5 days or 2 days, which is not limited in this application.
In the step, after determining the preset time when the vehicle arrives at the target parking lot, determining a corresponding prediction model according to a time period to which the preset time belongs, for example, the current time is 9 points, the preset time when the vehicle arrives at the target parking lot from the current position is 9 points and 38 points, and determining to call the corresponding prediction model in the future 1 hour to predict the number of idle parking spaces; if the preset time when the vehicle reaches the target parking lot from the current position is 10 points and 38 minutes, determining to call a prediction model corresponding to the 2 nd hour in the future to predict the number of idle parking spaces, and pushing the number of idle parking spaces.
It should be understood that, because the preset time when the vehicle arrives at different target parking lots is different, the prediction models corresponding to different target parking lots may be prediction models corresponding to different time periods, and the prediction models of different target parking lots are independent of each other and run in parallel, and the prediction models corresponding to the time periods are called according to the arrival time. For example, for a certain time period, training may be performed by using different machine learning models according to historical data of a parking lot, then testing the prediction accuracy of each model, and then screening a prediction model with high prediction accuracy as the time period.
S105, recommending the parking lots according to the number of the idle parking lots of each target parking lot.
In practical applications, the target parking lots may be further classified according to the predicted number of free parking spaces, the predicted arrival time, and the like of each target parking lot in step S105, and the parking lot information including the classification information may be transmitted to the parking lot recommendation requester.
Specific class labels are: the closest distance, least walking, the shortest time, etc., the parking lot information including the classification tag information is transmitted to the parking lot recommendation requester.
Therefore, according to some embodiments of the present application, parking lot recommendation may be performed based not only on the predicted number of free parking spaces, but also on dimensions such as closest distance, least walking, and least time, which are not limited in the present application. Fig. 2 shows a schematic diagram of a recommended result of a parking lot.
In the embodiment, the recommended parking lots are more in types, and the corresponding classification labels are added in the recommended parking lots, so that the selection of users is facilitated, the requirements of different users can be better met, and the user experience is improved.
In the above parking lot recommendation method provided in the embodiment of the present application, the method further includes the establishment of a prediction model of the number of free parking spaces in the parking lot, and fig. 3 shows a process of establishing the prediction model of the parking lot.
Specifically, as shown in fig. 3, the process of establishing the prediction model of the parking lot is as follows:
s201, acquiring parking lot related data, and preprocessing the parking lot related data;
s202, training to obtain a prediction model according to the preprocessed parking lot related data and a preset time period for each parking lot, wherein each preset time period corresponds to one prediction model;
the preset time period comprises at least one short period and at least one long period, the prediction target of the prediction model corresponding to the short period is the number of idle parking spaces of the parking lot within 1 day in the future, the prediction target of the prediction model corresponding to the long period is the number of idle parking spaces of the parking lot above 1 day in the future, and the short period refers to the number of idle parking spaces of the parking lot within 1 day in the future, for example, within 1 hour in the future, within 2 hours in the future and within 23 hours in the future. Long period means more than 1 day in the future, for example, in the future 2 days, 3 days to 7 days in the future. The parking lot related data in the above step S201 includes the following types of data:
parking lot attributes including the number of parking lot spaces, the parking lot capacity, the average number of spaces in the time period, whether or not it is located in a large business district, and the like.
Environmental factors, including weather conditions, temperature, holidays, or whether large activities are present, etc.
Other factors (e.g., hospital parking), including hospital outpatient, hospitalization, etc.
The preprocessing of the parking lot related data in the step S201 includes:
screening out the parking lot meeting the evaluation standard according to the related data of the parking lot; specifically, the parking lot meeting the evaluation standard can be screened out according to the time span, the loss rate, the delay condition, the stability of the data and the like of the related data of the parking lot.
And carrying out parking lot position correction, parking lot type correction and parking lot total parking space correction on the screened parking lots.
And filling the missing value of the screened out-of-the-field time of the vehicle in the parking lot. Specifically, the method comprises the following two cases: the first case is that the vehicle has arrived, and at this time, the average parking time length of the vehicle in the approach time period of the vehicle is calculated as the estimated parking time length of the vehicle, so as to obtain the departure time of the vehicle. The second case is that the vehicle is not out of the field, and the current time or a future time is filled in.
In the step S202, according to the preprocessed parking lot related data, a prediction model is obtained by training according to a preset time period, which specifically includes:
Dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
the average error value predicted by each machine learning model in the prediction period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
and testing the prediction accuracy of the optimal model according to the test set after the optimal model is obtained, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
Specifically, in the step S202, model training and optimization are performed on each parking lot according to the time period, and the training model may be further divided into a short-period prediction model and a long-period prediction model. For example, the short-period prediction model includes a model for predicting the future 1 to 23 hours, and the long-period prediction model includes a model for predicting the future 1 to 7 days. That is, at the end of each training, 30 prediction models (23 short-period prediction models+7 long-period prediction models) are obtained for each parking lot, the prediction period for each short period is one hour, and the prediction period for each long period is 1 day for predicting the number of idle vehicle positions at each time point (e.g., one time point every five minutes) within 7 days in the future. Thus, the parking spaces at each time in the future 23 hours can be predicted from the short-period prediction model, and the parking spaces at each time in the future 7 days can be predicted from the long-period prediction model. In practical application, the 30 prediction models continuously run in the background to calculate and output prediction data of 7 days in the future, and corresponding prediction data can be obtained after the time is determined. The idle parking space data output by the prediction model is in real-time rolling change.
The following model training method can be adopted:
for a specific parking lot, dividing a data set of the parking lot related data after the preprocessing of the parking lot into three parts according to time sequence: training set, test set and test set.
Each sample in the dataset includes: parking lot attributes, environmental factors, and other factors, etc.
In the training set, a series of classical machine learning models (including random forest, XGBoost, elastic network regression and mixed linear regression) and deep learning neural network related models (including integration and superposition of models) are used, and model parameters and dimensions are continuously adjusted, so that a stable and efficient prediction model is obtained through training. This model can be used to predict the number of free spaces at a given time in the future.
The method comprises the steps of automatically selecting an optimal model of each model, specifically, after training is completed, applying each model to a test set to obtain a corresponding predicted value of the number of idle parking spaces, subtracting the predicted value of the number of idle parking spaces from the total number of the idle parking spaces, and calculating an average error value (total error and peak segment error) in the time period, wherein the error value= |the actual number of occupied parking spaces-the predicted number of occupied parking spaces|. And carrying out parameter optimization on each model according to the error value to obtain an optimized model, and providing the optimized model for subsequent prediction.
The optimal model of each model selected automatically is utilized to predict on a test set, after corresponding prediction is obtained, the prediction accuracy is calculated, the prediction model with the highest prediction accuracy is screened and used as the prediction model corresponding to the preset time period, the prediction accuracy = 1- |actual parking space occupation number-predicted parking space occupation number/parking lot capacity (namely the total number of vehicles in a parking lot) is used for evaluating the application effect of the model, and the prediction accuracy of various models of a certain parking lot is shown in the following table 1.
Table 1: prediction accuracy of various models of certain parking lot
Figure BDA0003279200190000111
The closer the prediction accuracy is to 1, the closer the predicted value is to the true value. The index not only considers errors, but also takes the parking lot capacity into consideration, thereby normalizing the influence of parking lots with different sizes on the errors.
By adopting the model training method, the prediction model with the highest accuracy in each time period can be obtained, so that compared with the prior art, the prediction accuracy can be improved, and the recommended accuracy of a parking lot can be further improved.
In the above parking lot recommendation method provided by the embodiment of the application, in order to ensure the accuracy of the prediction of the idle parking spaces, the actual verification can be performed by using the actually accessed parking dynamic data. The mechanism for realizing periodical review of the prediction accuracy rate can be designed, the published prediction data are tracked by utilizing actual data regularly, and when the prediction accuracy rate data is lower than a certain threshold value, intervention can be performed in time, such as retraining of a prediction model of the parking lot, so that the prediction effect is improved. Therefore, according to some embodiments of the present application, the above parking lot recommendation method may further include the following steps:
For each parking lot, calculating the prediction accuracy of a prediction model of each preset time period corresponding to the parking lot at regular intervals;
when the prediction accuracy is smaller than a preset threshold, retraining a prediction model of the parking lot in the preset time period until the prediction accuracy is not smaller than the preset threshold;
the calculation formula of the prediction accuracy y is as follows:
y=1-|a-b|/c;
wherein a represents the actual space occupation number, b represents the predicted space occupation number obtained by calculating the predicted free space number output according to the prediction model, and c represents the total parking space number of the parking lot. The number of the predicted parking spaces is equal to the total number of the parking spaces minus the number of the predicted free parking spaces.
In order to accelerate the real-time performance of the prediction of the free parking space of the parking lot, the method for recommending the parking lot provided by the embodiment of the application may further include the following steps:
and when the number of the idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel.
In practical application, a traffic big data platform (ODPS) is generally adopted for idle parking space prediction, but the real-time data query efficiency is not high based on the data service environment of the big data platform, so that the real-time performance of parking space prediction of a parking lot is accelerated, and the following technical improvement can be adopted:
(1) Separating parking record data of a month from ODPS to rds (relational database service), and optimizing a data table; and because of too many parking lots processed simultaneously, the prediction service adopts a multi-process concurrent mode to read data.
The ODPS is mainly used for storing large amount of data, the data analysis processing efficiency is low, the rds relative efficiency is higher, and one month of data can be separated into rds which are directly used for model analysis and prediction so as to improve the processing efficiency. Data table optimization refers to: optimizing the table structure, deleting fields which are irrelevant to prediction, such as population numbers, vehicle types and the like, in the new table; and optimizing the data items, and deleting non-target parking lot data and invalid data in the new table, wherein the optimization aims at reducing the data items and improving the data reading efficiency.
(2) Since more than 100 parking lots of data are processed and calculated simultaneously, repeated calculation and tandem operation are reduced as much as possible in the actual operation process. In the process of calculating the parking space occupation number, as the vehicle entry and exit records are updated in real time, the records outside one week are not repeatedly calculated, and the records within one week can be continuously used for updating the parking space occupation number so as to ensure the accuracy of calculation. And simultaneously, a matrix form is used for replacing for circulation to accelerate the calculation of the parking space. In training the model and predicting the free parking space, models of different prediction periods (for example, predicting 1 hour in the future and predicting 7 days in the future) of different parking lots can run in parallel, and different prediction models of the same parking lot also run in parallel.
According to the parking lot recommendation method provided by the embodiment, a parking lot recommendation service request is acquired, and at least one target parking lot is determined from all parking lots around a destination; determining the estimated time when the vehicle arrives at each target parking lot; aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; and recommending the parking lots according to the number of the idle parking lots of each target parking lot. Compared with the prior art, the method and the device can predict the number of the idle parking spaces corresponding to different long and short time periods aiming at each parking lot, each time period corresponds to one prediction model, the time granularity corresponding to the prediction model is finer, and the prediction accuracy is improved. In the above embodiment, a parking lot recommending method is provided, and correspondingly, the application also provides a parking lot recommending device. The parking lot recommendation device provided by the embodiment of the application can implement the parking lot recommendation method, and the parking lot recommendation device can be realized by software, hardware or a combination of software and hardware. For example, the parking lot recommendation device may comprise integrated or separate functional modules or units to perform the corresponding steps in the methods described above. Referring to fig. 4, a schematic diagram of a parking lot recommendation device provided in an embodiment of the present application is shown. Since the apparatus embodiments are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
As shown in fig. 4, the parking lot recommendation device 10 may include:
an obtaining module 101, configured to obtain a parking lot recommended service request, where the parking lot recommended service request includes a current location, a destination, and a current time;
a parking lot determination module 102 for determining at least one target parking lot from among all parking lots around the destination;
an arrival time determination module 103, configured to determine an estimated time when the vehicle arrives at each of the target parking lots;
the prediction module 104 is configured to call, for each target parking lot, a prediction model of the target parking lot corresponding to a time period to which the predicted time belongs, and predict, using the prediction model, a number of free parking spaces of the target parking lot at the predicted time;
and the recommending module 105 is used for recommending the parking lots according to the number of the idle parking lots of each target parking lot.
In a possible implementation manner, the parking lot recommendation device provided in the embodiment of the present application further includes:
the prediction model building module is used for:
acquiring parking lot related data, and preprocessing the parking lot related data;
training according to the preprocessed related data of the parking lots to obtain a prediction model according to preset time periods aiming at each parking lot, wherein each preset time period corresponds to one prediction model;
The preset time period is divided into a short period and a long period, the prediction target of the prediction model corresponding to the short period is the number of idle parking spaces of the parking lot per hour within 1 day in the future, and the prediction target of the prediction model corresponding to the long period is the number of idle parking spaces of the parking lot per day within 7 days in the future.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction model building module is specifically configured to:
screening out the parking lot meeting the preset evaluation standard according to the related data of the parking lot;
carrying out parking lot position correction, parking lot type correction and parking lot total parking space correction on the screened parking lots;
and filling the missing value of the screened out-of-the-field time of the vehicle in the parking lot.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction model building module is specifically configured to:
dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
The average error value predicted by each machine learning model in the prediction period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
and testing the prediction accuracy of the optimal model according to the test set, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction module 103 is further configured to:
for each parking lot, calculating the prediction accuracy of a prediction model of each preset time period corresponding to the parking lot at regular intervals;
when the prediction accuracy is smaller than a preset threshold, retraining a prediction model of the parking lot in the preset time period until the prediction accuracy is not smaller than the preset threshold;
the calculation formula of the prediction accuracy y is as follows:
y=1-|a-b|/c;
wherein a represents the actual space occupation number, b represents the predicted space occupation number obtained by calculating the predicted free space number output according to the prediction model, and c represents the total parking space number of the parking lot.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the prediction module 103 is further configured to:
And when the number of the idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the parking lot determining module 102 is specifically configured to:
determining all parking lots around the destination and the distance between each parking lot and the destination;
and determining at least one target parking lot from all parking lots around the destination according to the distance between each parking lot and the destination.
In a possible implementation manner, in the above parking lot recommendation device provided in the embodiment of the present application, the parking lot determining module 102 is further specifically configured to:
determining a parking lot with a distance destination within a first preset distance range as a target parking lot;
and when the parking lot does not exist in the first preset distance range, determining the parking lot with the distance destination in the second preset distance range as a target parking lot, wherein the second preset distance is larger than the first preset distance.
According to the parking lot recommendation device provided by the embodiment of the application, a parking lot recommendation service request is acquired, and at least one target parking lot is determined from all parking lots around a destination; determining the estimated time when the vehicle arrives at each target parking lot; aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; and recommending the parking lots according to the number of the idle parking lots of each target parking lot. Compared with the prior art, the method and the device can predict the number of the idle parking spaces corresponding to different long and short time periods aiming at each parking lot, each time period corresponds to one prediction model, the time granularity corresponding to the prediction model is finer, and the prediction accuracy is improved.
The embodiment of the application also provides an electronic device corresponding to the parking lot recommendation method provided by the embodiment, wherein the electronic device can be a mobile phone, a notebook computer, a tablet computer, a desktop computer and the like so as to execute the parking lot recommendation method.
Referring to fig. 5, a schematic diagram of an electronic device according to some embodiments of the present application is shown. As shown in fig. 5, the electronic device 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, the processor 200, the communication interface 203 and the memory 201 being connected by the bus 202; the memory 201 stores a computer program that can be executed on the processor 200, and the processor 200 executes the parking lot recommendation method provided in any of the foregoing embodiments of the present application when executing the computer program.
The memory 201 may include a high-speed random access memory (RAM: random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 203 (which may be wired or wireless), the internet, a wide area network, a local network, a metropolitan area network, etc. may be used.
Bus 202 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. The memory 201 is configured to store a program, and the processor 200 executes the program after receiving an execution instruction, and the parking lot recommendation method disclosed in any of the foregoing embodiments of the present application may be applied to the processor 200 or implemented by the processor 200.
The processor 200 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 200 or by instructions in the form of software. The processor 200 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a Digital Signal Processor (DSP), application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201, and in combination with its hardware, performs the steps of the above method.
The electronic device provided by the embodiment of the application and the parking lot recommending method provided by the embodiment of the application are the same in the invention conception, and have the same beneficial effects as the method adopted, operated or realized by the electronic device.
The present embodiment also provides a computer readable storage medium corresponding to the parking lot recommendation method provided in the foregoing embodiment, referring to fig. 6, the computer readable storage medium is shown as an optical disc 30, and a computer program (i.e. a program product) is stored thereon, where the computer program, when executed by a processor, performs the parking lot recommendation method provided in any of the foregoing embodiments.
It should be noted that examples of the computer readable storage medium may also include, but are not limited to, a phase change memory (PRAM), a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a flash memory, or other optical or magnetic storage medium, which will not be described in detail herein.
The computer readable storage medium provided by the above embodiment of the present application has the same advantageous effects as the method adopted, operated or implemented by the application program stored therein, because of the same inventive concept as the parking lot recommendation method provided by the embodiment of the present application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the embodiments, and are intended to be included within the scope of the claims and description.

Claims (8)

1. A parking lot recommendation method, characterized by comprising:
acquiring a parking lot recommended service request, wherein the parking lot recommended service request comprises a current position, a destination and a current time;
determining at least one target parking lot from all parking lots around the destination;
determining the estimated time when the vehicle arrives at each target parking lot;
aiming at each target parking lot, calling a prediction model of the target parking lot corresponding to the time period to which the predicted moment belongs, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; when the number of idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel;
Recommending the parking lots according to the number of the idle parking lots of each target parking lot;
the construction process of the prediction model of the parking lot is as follows:
acquiring parking lot related data, and preprocessing the parking lot related data;
training according to the preprocessed related data of the parking lots to obtain a prediction model according to preset time periods aiming at each parking lot, wherein each preset time period corresponds to one prediction model;
the training process of the prediction model of the parking lot is as follows:
dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
the average error value predicted by each machine learning model in the preset time period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
and testing the prediction accuracy of the optimal model according to the test set, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
2. The method according to claim 1, wherein the preset time period is divided into a short period and a long period, the prediction target of the prediction model corresponding to the short period is the number of idle parking spaces per hour of the parking lot within 1 day in the future, and the prediction target of the prediction model corresponding to the long period is the number of idle parking spaces per day of the parking lot within 7 days in the future.
3. The method of claim 2, wherein the preprocessing the parking lot related data comprises:
screening out the parking lot meeting the preset evaluation standard according to the related data of the parking lot;
carrying out parking lot position correction, parking lot type correction and parking lot total parking space correction on the screened parking lots;
and filling the missing value of the screened out-of-the-field time of the vehicle in the parking lot.
4. The method according to claim 1, wherein the method further comprises:
for each parking lot, calculating the prediction accuracy of a prediction model of each preset time period corresponding to the parking lot at regular intervals;
when the prediction accuracy is smaller than a preset threshold, retraining a prediction model of the parking lot in the preset time period until the prediction accuracy is not smaller than the preset threshold;
the calculation formula of the prediction accuracy y is as follows:
y=1-|a-b|/c;
wherein a represents the actual space occupation number, b represents the predicted space occupation number obtained by calculating the predicted free space number output according to the prediction model, and c represents the total parking space number of the parking lot.
5. The method of claim 1, wherein said determining at least one target parking lot from all parking lots around the destination comprises:
Acquiring all parking lots around the destination and the distance between each parking lot and the destination;
determining a parking lot within a first preset distance range from the destination as a target parking lot;
when the parking lot does not exist in the first preset distance range, determining the parking lot which is in the second preset distance range from the destination as a target parking lot;
wherein the second preset distance is greater than the first preset distance.
6. A parking lot recommendation device, characterized by comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a parking lot recommended service request, and the parking lot recommended service request comprises a current position, a destination and a current time;
a parking lot determining module for determining at least one target parking lot from among all parking lots around the destination;
the arrival time determining module is used for determining the expected time when the vehicle arrives at each target parking lot;
the prediction module is used for calling a prediction model of the target parking lot corresponding to the time period of the predicted moment aiming at each target parking lot, and predicting the number of idle parking spaces of the target parking lot at the predicted moment by using the prediction model; when the number of idle parking spaces of each parking lot is predicted, each prediction model of each parking lot operates in parallel;
The recommending module is used for recommending the parking lots according to the number of the idle parking lots of each target parking lot;
the prediction model building module is used for:
acquiring parking lot related data, and preprocessing the parking lot related data;
training according to the preprocessed related data of the parking lots to obtain a prediction model according to preset time periods aiming at each parking lot, wherein each preset time period corresponds to one prediction model;
the training process of the prediction model of the parking lot is as follows:
dividing the preprocessed parking lot related data into a training set, a checking set and a testing set according to a preset time period for each parking lot;
training according to the training set to obtain a plurality of machine learning models aiming at each preset time period;
the average error value predicted by each machine learning model in the preset time period is checked by adopting the check set, and a model with the minimum average error value is used as an optimal model;
and testing the prediction accuracy of the optimal model according to the test set, and taking the optimal model as a prediction model of the preset time period when the prediction accuracy is greater than a certain threshold.
7. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor executes to implement the method according to any of claims 1 to 5 when the computer program is run.
8. A computer readable storage medium having stored thereon computer readable instructions executable by a processor to implement the method of any one of claims 1 to 5.
CN202111126992.9A 2021-09-26 2021-09-26 Parking lot recommendation method and device, electronic equipment and storage medium Active CN113838303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111126992.9A CN113838303B (en) 2021-09-26 2021-09-26 Parking lot recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111126992.9A CN113838303B (en) 2021-09-26 2021-09-26 Parking lot recommendation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113838303A CN113838303A (en) 2021-12-24
CN113838303B true CN113838303B (en) 2023-04-28

Family

ID=78970154

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111126992.9A Active CN113838303B (en) 2021-09-26 2021-09-26 Parking lot recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113838303B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115691206B (en) * 2022-10-19 2024-03-01 北京百度网讯科技有限公司 Parking stall recommendation method, device, equipment and storage medium
CN116089744B (en) * 2023-04-10 2023-06-16 松立控股集团股份有限公司 Hospital parking lot recommendation method based on transform dynamic time-space association

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2447927A1 (en) * 2010-10-26 2012-05-02 Bmob Sagl System and process for estimating the availability and/or occupied status of car parks located in a given urban area at a given time
CN107134170A (en) * 2017-07-04 2017-09-05 北京悦畅科技有限公司 A kind for the treatment of method and apparatus of parking position information of park
CN107146462A (en) * 2017-06-23 2017-09-08 武汉大学 A kind of idle parking stall number long-term prediction method in parking lot

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503840B (en) * 2016-10-17 2023-04-18 中国科学院深圳先进技术研究院 Available parking space prediction method and system for parking lot
TWI645388B (en) * 2016-11-30 2018-12-21 財團法人資訊工業策進會 Parking forecast and parking guidance planning system and method
CN110415546A (en) * 2018-04-26 2019-11-05 中移(苏州)软件技术有限公司 It parks abductive approach, device and medium
JP2020086945A (en) * 2018-11-26 2020-06-04 トヨタ自動車株式会社 Vehicle dispatch control device, vehicle dispatch control method, and computer program for vehicle dispatch control
CN111932037A (en) * 2020-09-23 2020-11-13 浙江创泰科技有限公司 Parking space state prediction method and system based on machine learning
CN112819226A (en) * 2021-02-02 2021-05-18 北京千方科技股份有限公司 Parking lot recommendation method and device, storage medium and terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2447927A1 (en) * 2010-10-26 2012-05-02 Bmob Sagl System and process for estimating the availability and/or occupied status of car parks located in a given urban area at a given time
CN107146462A (en) * 2017-06-23 2017-09-08 武汉大学 A kind of idle parking stall number long-term prediction method in parking lot
CN107134170A (en) * 2017-07-04 2017-09-05 北京悦畅科技有限公司 A kind for the treatment of method and apparatus of parking position information of park

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙敏 ; 彭磊 ; 李慧云 ; .基于长短期记忆神经网络的可用停车位预测.集成技术.2018,(06),全文. *

Also Published As

Publication number Publication date
CN113838303A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
Chae et al. PM10 and PM2. 5 real-time prediction models using an interpolated convolutional neural network
CN112700072B (en) Traffic condition prediction method, electronic device, and storage medium
Xu et al. Bus arrival time prediction with real-time and historic data
CN113838303B (en) Parking lot recommendation method and device, electronic equipment and storage medium
Wu et al. How transit scaling shapes cities
CN106504534B (en) A kind of method, apparatus and user equipment for predicting road conditions
US20230207135A1 (en) Methods and systems for detecting environment features in images to predict location-based health metrics
Li et al. Deep learning based parking prediction on cloud platform
CN111815098A (en) Traffic information processing method and device based on extreme weather, storage medium and electronic equipment
Chen et al. Short-term prediction of demand for ride-hailing services: A deep learning approach
CN115830848A (en) Shared parking space intelligent distribution system and method based on LSTM model
Zhou et al. An attention-based deep learning model for citywide traffic flow forecasting
CN111091215A (en) Vehicle identification method and device, computer equipment and storage medium
CN113592196A (en) Flow data prediction system, method, computer equipment and medium
CN111507541B (en) Goods quantity prediction model construction method, goods quantity measurement device and electronic equipment
CN111985731B (en) Method and system for predicting number of people at urban public transport station
Qi et al. Tracing road network bottleneck by data driven approach
WO2020254418A1 (en) System and method for populating a database with occupancy data of parking facilities
CN111861766A (en) ETC big data-based vehicle insurance risk assessment method and system
CN114626766B (en) Shared electric vehicle scheduling method, device, equipment and medium based on big data
CN110223514A (en) Urban transportation running state analysis method, apparatus and electronic equipment
CN115691165A (en) Traffic signal lamp scheduling method, device and equipment and readable storage medium
Ghandeharioun et al. Exploring Deep Learning Approaches for Short-Term Passenger Demand Prediction
CN109615187B (en) OD matrix evaluation method, bus load simulation method and device
Montero et al. Using GPS tracking data to validate route choice in OD trips within dense urban networks

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant