Monitoring and prediction method for real-time vehicle flow in smart parking lots

By performing fitting curve analysis and clustering of traffic flow and weather data in smart parking lots within one year, the error problem caused by redundancy of input factors in the existing prediction methods is solved, and more accurate traffic prediction is achieved and improved Parking lot operation efficiency and intelligence level.

CN118629227BActive Publication Date: 2024-12-10HUIZHOU JIAOTOU DIGITAL INTELLIGENCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410784716.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-12-10
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The traffic forecasting method of existing smart parking lots is due to redundant input factors, which increases the complexity of data processing, large errors in prediction results, and poor operational efficiency.

Method used

By obtaining the traffic data and weather conditions data of the parking lot within one year, performing fit curve analysis, calculating the degree of fluctuation, correlation and similarity, using clustering methods to predict traffic data to reduce redundancy in input components.

Benefits of technology

It improves the accuracy of traffic forecasting, reduces labor costs, and improves parking lot operation efficiency and intelligent management level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629227B_ABST
    Figure CN118629227B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data prediction technology, and specifically to a monitoring and prediction method for real-time vehicle flow in an intelligent parking lot, including: obtaining a vehicle flow data sequence, an outgoing vehicle flow data, an incoming vehicle flow data, and a weather condition sequence; obtaining a final weather factor according to the weather condition sequence; fitting the daily vehicle flow data sequence to obtain the degree of fluctuation of the fitting curve; obtaining the correlation between the vehicle flow data and the final weather factor according to the degree of fluctuation and the final weather factor; obtaining the similarity of vehicle flow data changes; obtaining the dynamic stability of vehicle flow data changes according to the outgoing and incoming vehicle flow data; obtaining a distance metric according to the correlation, similarity and dynamic stability; clustering the vehicle flow data sequence according to the distance metric; and obtaining predicted vehicle flow data. The present invention effectively reduces the redundancy of input components in conventional prediction methods for predicting vehicle flow at future moments, and improves the accuracy of vehicle flow data prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data prediction, and in particular to a method for monitoring and predicting real-time vehicle flow in an intelligent parking lot. Background Art

[0002] Smart parking lot is a high-tech mechatronics product based on the automated management of modern parking lots and equipment. It monitors vehicle flow through a series of intelligent technology processing.

[0003] Smart parking lots can count the number of vehicles in the parking lot in real time through video surveillance systems or vehicle detectors, and analyze the collected vehicle data to monitor the traffic flow and discover the rules and trends of the traffic flow. When existing prediction methods predict the traffic flow at future moments based on the changes in traffic flow in historical records, redundant factors at the input end may increase the complexity of data processing, resulting in certain errors in the prediction results and poor efficiency of parking lot operations. Summary of the invention

[0004] To solve the above problems, the present invention provides a method for monitoring and predicting real-time vehicle flow in a smart parking lot.

[0005] The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot of the present invention adopts the following technical solutions:

[0006] An embodiment of the present invention provides a method for monitoring and predicting real-time vehicle flow in a smart parking lot, the method comprising the following steps:

[0007] Obtain a traffic flow data sequence, wherein the traffic flow data sequence includes traffic flow data of the parking lot every hour every day in the past year; obtain outgoing traffic flow data and incoming traffic flow data of the parking lot every hour every day in the past year; obtain a weather condition sequence for every day in the past year;

[0008] The final weather factor of each day in the most recent year is obtained based on the weather condition sequence of each day in the most recent year; the daily traffic flow data sequence is obtained based on the traffic flow data sequence, and the daily traffic flow data sequence is fitted to obtain a fitting curve, and the fluctuation degree of the fitting curve of the daily traffic flow data sequence is obtained based on the fitting traffic flow data in the fitting curve; the correlation between the change of the traffic flow data and the change of the final weather factor is obtained based on the fluctuation degree of the fitting curve and the final weather factor;

[0009] The weight of the traffic flow data at each moment of each day affected by the final weather factor is obtained based on the traffic flow data at the same moment of each day and the final weather factor; the similarity of the traffic flow data changes on any two days in the past year is obtained based on the weight of the traffic flow data affected by the final weather factor and the traffic flow data at the corresponding moment of any two days; the dynamic stability of the traffic flow data changes on each day in the past year is obtained based on the outgoing traffic flow data and the incoming traffic flow data every hour of each day in the past year; the distance measurement of any two days in the past year is obtained based on the correlation between the traffic flow data changes and the final weather factor changes, the similarity of the traffic flow data changes and the dynamic stability;

[0010] The traffic flow data sequence is clustered according to the distance measurement of any two days to obtain several clusters of the traffic flow data sequence; based on the clusters of the traffic flow data sequence, the traffic flow data sequence and the final weather factor, the predicted traffic flow data of the parking lot at the next moment is obtained.

[0011] Furthermore, the fluctuation degree of the fitting curve of the daily vehicle flow data sequence is obtained according to the fitting vehicle flow data in the fitting curve, and the specific steps include the following:

[0012] The fitting curve of the traffic flow data sequence of any day is recorded as the first curve;

[0013]

[0014] Where m is the number of fitted traffic flow data in the first curve, L n is the nth fitting traffic flow data in the first curve, is the mean of all fitted traffic flow data in the first curve, LP is the range of all fitted traffic flow data in the first curve, || represents the absolute value, and E is the fluctuation degree of the first curve.

[0015] Furthermore, the correlation between the change in vehicle flow data and the change in the final weather factor is obtained according to the fluctuation degree of the fitting curve and the final weather factor, and the specific steps include the following:

[0016] Arrange the fluctuation degree of the fitting curve of the daily traffic flow data sequence in chronological order to obtain a sequence, which is recorded as the fluctuation degree sequence. The absolute value of the difference between the rth fluctuation degree and the r-1th fluctuation degree in the fluctuation degree sequence is recorded as a fluctuation degree change value of the fluctuation degree sequence, r∈[2, R], R is the number of fluctuation degrees in the fluctuation degree sequence, and the set consisting of all fluctuation degree change values ​​of the fluctuation degree sequence is recorded as the first set; arrange the final weather factors of each day in the most recent year in chronological order to obtain a sequence, which is recorded as the final weather factor sequence. The absolute value of the difference between the wth final weather factor and the w-1th final weather factor in the final weather factor sequence is recorded as a final weather factor change value of the final weather factor sequence, w∈[2, W], W is the number of final weather factors in the final weather factor sequence, and the set consisting of all final weather factor change values ​​of the final weather factor sequence is recorded as the second set;

[0017]

[0018] In the formula, ΔE1 is the first set, For the second set, is the covariance of the first set and the second set, σ ΔE1 is the standard deviation of all volatility changes in the first set, is the standard deviation of all final weather factor change values ​​in the second set, α is a hyperparameter to prevent the denominator from being 0, and ρ is the correlation between the change in traffic flow data and the change in the final weather factor.

[0019] Furthermore, the weight of the traffic flow data at each time of each day affected by the final weather factor is obtained according to the traffic flow data at the same time of each day and the final weather factor, including the following specific steps:

[0020] Each hour of a day is recorded as a moment, and any moment is recorded as a target moment. The traffic flow data of the target moment of each day in the most recent year are obtained. All the traffic flow data of the target moment are arranged in the time sequence of the corresponding day to obtain a sequence, which is recorded as the second traffic flow data sequence. The second traffic flow data sequence is fitted to obtain a curve corresponding to the second traffic flow data sequence, which is recorded as the second curve. The final weather factors of each day in the most recent year are arranged in the time sequence to obtain a sequence, which is recorded as a factor sequence. The factor sequence is fitted to obtain a curve corresponding to the factor sequence, which is recorded as the third curve.

[0021] ω′=|σ2-σ3|×|h2-h3|

[0022] Wherein, σ2 is the variance of all fitted traffic flow data in the second curve, σ3 is the variance of all fitted final weather factors in the third curve, || is the absolute value, h2 is the range of all fitted traffic flow data in the second curve, h3 is the range of all fitted final weather factors in the third curve, and ω′ is the initial weight of the traffic flow data at the target time affected by the final weather factor;

[0023] The initial weights of the traffic flow data at all times affected by the final weather factors are obtained, and the initial weights of the traffic flow data at all times affected by the final weather factors are normalized by softmax to obtain the weights of the traffic flow data at the target time affected by the final weather factors.

[0024] Furthermore, the similarity of the changes in traffic flow data on any two days in the last year is obtained based on the weight of the traffic flow data affected by the final weather factor and the traffic flow data at corresponding moments on any two days, and the specific steps include the following:

[0025]

[0026] Where M is the number of time in a day, ω I is the weight of the traffic flow data at the first moment affected by the final weather factor, L a,I is the traffic flow data at the Ith moment on the ath day in the most recent year, L b, I is the traffic flow data at the Ith moment of the bth day in the most recent year, F a,b is the similarity of the traffic flow data changes between day a and day b in the most recent year.

[0027] Furthermore, the dynamic stability of the daily traffic flow data change in the recent year is obtained based on the outgoing traffic flow data and the incoming traffic flow data every hour every day in the recent year, and the specific steps include the following:

[0028] The ratio of the incoming traffic flow data to the outgoing traffic flow data on any day in the most recent year is taken as the dynamic stability of the traffic flow data change on that day in the most recent year.

[0029] Furthermore, the distance measurement of any two days in the last year is obtained according to the correlation between the change of traffic flow data and the change of the final weather factor, the similarity of the change of traffic flow data and the dynamic stability, and the specific steps include the following:

[0030]

[0031] Where ρ is the correlation between the change of traffic flow data and the change of final weather factors, F c,d is the similarity of the traffic flow data changes between the cth day and the dth day in the most recent year, ST cis the dynamic stability of the traffic flow data change on the cth day in the most recent year, ST d is the dynamic stability of the traffic flow data change on the dth day in the most recent year, D c,d is the distance measure between the cth day and the dth day.

[0032] Furthermore, clustering the traffic flow data sequence according to the distance metric of any two days to obtain several clusters of the traffic flow data sequence includes the following specific steps:

[0033] K-means clustering is performed on the traffic flow data in the traffic flow data sequence to obtain several clusters of the traffic flow data sequence. The distance measurement adopts the distance measurement between the days to which the traffic flow data belongs.

[0034] Furthermore, the predicted traffic flow data of the parking lot at the next moment is obtained according to the cluster of the traffic flow data sequence, the traffic flow data sequence and the final weather factor, and the specific steps include the following:

[0035] The final weather factor of each day to which each traffic flow data in each cluster belongs is counted to obtain the final weather factor corresponding to each traffic flow data in each cluster; the final weather factor corresponding to any traffic flow data in any cluster is recorded as the target final weather factor, the number of traffic flow data corresponding to the target final weather factor in the cluster is obtained, recorded as the first number, the number of traffic flow data corresponding to the target final weather factor in all clusters is obtained, recorded as the second number, and the ratio of the first number to the second number is recorded as an initial membership of the cluster; according to the final weather factor corresponding to each traffic flow data in the cluster, several initial memberships of the cluster are obtained, and the final weather factor corresponding to the maximum value of all initial memberships in the cluster is taken as the weather factor of the cluster;

[0036] The traffic flow data of the cluster on the same day are arranged in chronological order to obtain several sequences, and each sequence is fitted to obtain several fitting curves of the cluster; the mean of the fitted traffic flow data of the corresponding order in all the fitting curves of the cluster is obtained to obtain the mean fitting curve of all the fitting curves of the cluster, which is recorded as the traffic flow data change curve of the cluster; the prediction model of the traffic flow data change curve of the cluster is obtained according to the nonlinear regression model; the cluster where the traffic flow data at the last moment in the traffic flow data sequence is located is obtained, which is recorded as the target cluster, and the last moment in the traffic flow data sequence is recorded as the current moment, and the weather factor of the target cluster is input into the prediction model of the traffic flow data change curve of the target cluster, and the predicted traffic flow data of the parking lot at the next moment of the current moment is output.

[0037] Furthermore, the method of obtaining the final weather factor for each day in the most recent year according to the weather condition sequence for each day in the most recent year includes the following specific steps:

[0038] The weather condition sequence of each day in the past year is used as the daily weather condition vector. The classification network model is used for training based on the weather condition vector. The daily weather condition vector is input into the trained classification network model, and the final weather factor of each day is output.

[0039] The beneficial effect of the technical solution of the present invention is that after collecting the parking lot's traffic flow data sequence, the parking lot's outgoing traffic flow data and incoming traffic flow data every hour every day in the past year, and the daily weather condition sequence, the present invention obtains the final weather factor of each day in the past year by training the weather condition sequence, which is used to reflect the daily weather conditions, so that the subsequent prediction of the parking lot's traffic flow data is more accurate, and then analyzes the correlation between the change in traffic flow data and the change in the final weather factor, and through the fluctuation degree of the fitting curve of the daily traffic flow data sequence, the similarity of the change in traffic flow data on different days, and the dynamic stability of the change in traffic flow data The prediction model is obtained based on the daily traffic flow data sequence. Similar data can be better classified through clustering, which makes the constructed prediction model more accurate. The predicted traffic flow data of the parking lot at the next moment is more consistent with the actual traffic flow data. The prediction of traffic flow at future moments effectively reduces the redundancy of input components in conventional prediction methods. More accurate prediction of traffic flow data can improve the overall efficiency of parking lot operations, reduce labor costs, improve service quality, and enhance the intelligent level of parking lot management. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of the steps of a method for monitoring and predicting real-time vehicle flow in an intelligent parking lot provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the monitoring and prediction method for real-time vehicle flow in a smart parking lot proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0043] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0044] The specific scheme of the method for monitoring and predicting real-time vehicle flow in an intelligent parking lot provided by the present invention is described in detail below with reference to the accompanying drawings.

[0045] See also Figure 1 , which shows a flowchart of a method for monitoring and predicting real-time vehicle flow in a smart parking lot provided by an embodiment of the present invention, the method comprising the following steps:

[0046] Step S001, obtain a traffic flow data sequence, obtain the outgoing traffic flow data and the incoming traffic flow data of the parking lot every hour every day in the past year, and obtain the weather condition sequence of every day in the past year.

[0047] It should be noted that the purpose of this embodiment is to analyze the changes in parking lot traffic flow and user behavior habits based on historical records to monitor and predict traffic flow, thereby improving the operational efficiency and intelligence level of the smart parking lot. Before starting the analysis, data must be collected first.

[0048] Specifically, obtain the traffic flow data sequence, obtain the outgoing traffic flow data and the incoming traffic flow data of the parking lot every hour every day in the past year, and obtain the weather condition sequence every day in the past year, as follows:

[0049] The traffic flow data of each hour of each day in the past year is obtained through the data management system of the parking lot, and all the traffic flow data are arranged in chronological order to obtain a sequence, which is recorded as the traffic flow data sequence; it should be noted that the traffic flow data of each hour of each day in the past year is specifically the total number of vehicles entering and leaving the parking lot in each hour. For example, if 5 vehicles enter and 5 vehicles leave in a certain hour, the traffic flow data for that hour is 10.

[0050] The outgoing vehicle flow data for each hour of each day in the past year is obtained; it should be noted that the outgoing vehicle flow data is specifically the total number of vehicles leaving the parking lot each hour. For example, if 5 vehicles leave the parking lot within an hour, the outgoing vehicle flow data for that hour is 5. In this embodiment, one moment is one hour; the incoming vehicle flow data for each hour of each day in the past year is obtained.

[0051] The temperature value, humidity value, rainfall value and wind speed value of each day in the past year are obtained, and the temperature value, humidity value, rainfall value and wind speed value of any day in the past year are arranged in the order described to obtain a sequence, which is recorded as the weather condition sequence of that day in the past year; it should be noted that obtaining the temperature value, humidity value, rainfall value and wind speed value of any day in the past year is an existing method and will not be repeated in this embodiment.

[0052] At this point, the vehicle flow data sequence, the parking lot's outgoing vehicle flow data for each hour of each day in the past year, and the weather condition sequence for each day in the past year are obtained.

[0053] Step S002: obtain a final weather factor based on the weather condition sequence of each day in the past year; fit the daily vehicle flow data sequence to obtain a fitting curve, and obtain the fluctuation degree of the fitting curve based on the fitting curve; obtain the correlation between the change of vehicle flow data and the change of the final weather factor based on the fluctuation degree and the final weather factor.

[0054] It should be noted that the changes in traffic flow in different time periods in smart parking lots are affected by many factors. Generally, different weather conditions will cause changes in traffic flow, but there will also be some special situations caused by user habits, which will cause drastic changes in traffic flow under the same weather conditions. Therefore, when predicting traffic flow, the impact of weather conditions is mainly considered, and the user's parking habits are considered as a reference condition for prediction, so that the prediction results are more accurate.

[0055] Specifically, the final weather factors for each day in the most recent year are obtained based on the weather condition sequence for each day in the most recent year, as follows:

[0056] The weather condition sequence of each day in the past year is used as the weather condition vector of each day to obtain a number of weather condition vectors. In this embodiment, the weather condition vectors of each day in the past three years are obtained to form a training data set. The weather condition vectors of each day are manually labeled to divide the weather condition vectors into two categories: good weather conditions and bad weather conditions. The weather condition vectors in the category of good weather conditions are labeled as 1, and the weather condition vectors in the category of bad weather conditions are labeled as 0. The specific good and bad weather conditions are set manually and will not be repeated in this embodiment. At the same time, this embodiment uses four weather-related elements in the weather condition sequence to form a weather condition vector. In other embodiments, the implementer may add other weather-related elements to construct a weather condition vector.

[0057] Input each weather condition vector in the training data set into the classification network model. The classification network model is specifically a five-layer fully connected neural network model, and the loss function is the cross entropy function. The output is the probability that each weather condition vector belongs to the category of good weather conditions, and the probability that it belongs to the category of bad weather conditions, and the trained classification network model is obtained; input the weather condition vector of each day in the past year into the trained classification network model, and the output is the probability that the weather condition vector of each day belongs to the category of good weather conditions, and the probability that it belongs to the category of bad weather conditions, and the probability that the weather condition vector of each day belongs to the category of bad weather conditions is recorded as the final weather factor of each day.

[0058] Furthermore, a daily traffic flow data sequence is obtained based on the traffic flow data sequence, and a fitting curve is obtained by fitting the daily traffic flow data sequence. The fluctuation degree of the fitting curve of the daily traffic flow data sequence is obtained based on the fitting traffic flow data in the fitting curve, as follows:

[0059] The traffic flow data sequence of any day is obtained according to the traffic flow data sequence, which is recorded as the first traffic flow data sequence; it should be noted that the traffic flow data sequence of each day is arranged in chronological order, that is, it is the same as the corresponding part in the traffic flow data sequence; the first traffic flow data sequence is fitted to obtain a fitting curve of the traffic flow data sequence of that day, which is recorded as the first curve; it should be noted that in this embodiment, the least squares method is used to fit the first traffic flow data sequence into a quintic polynomial curve to obtain the first curve, and the first curve contains a number of fitted traffic flow data, and the number of the fitted traffic flow data is the same as the number of the traffic flow data in the traffic flow data sequence of any day. The specific fitting is an existing method and will not be repeated in this embodiment.

[0060]

[0061] Where m is the number of fitted traffic flow data in the first curve, L n is the nth fitting traffic flow data in the first curve, is the mean of all fitted traffic flow data in the first curve, LP is the range of all fitted traffic flow data in the first curve, || represents the absolute value, and E is the fluctuation degree of the first curve.

[0062] It should be noted that It represents the average value of the difference between the traffic volume on any day in the traffic volume fitting curve and the overall average traffic volume. The larger the average value, the more drastic the change in traffic volume in the fitting curve. It indicates the fluctuation degree of the traffic flow data sequence of any day, that is, the fluctuation degree of the first traffic flow data sequence, and provides data support for the subsequent prediction of traffic flow data.

[0063] Furthermore, the correlation between the change in traffic flow data and the change in the final weather factor is obtained according to the fluctuation degree of the fitting curve and the final weather factor, as follows:

[0064] The fluctuation degree of the fitting curve of the daily traffic flow data sequence is arranged in chronological order to obtain a sequence, which is recorded as the fluctuation degree sequence. The absolute value of the difference between the rth fluctuation degree and the r-1th fluctuation degree in the fluctuation degree sequence is recorded as a fluctuation degree change value of the fluctuation degree sequence, r∈[2, R], R is the number of fluctuation degrees in the fluctuation degree sequence, and the set consisting of all fluctuation degree change values ​​of the fluctuation degree sequence is recorded as the first set; the final weather factors of each day in the most recent year are arranged in chronological order to obtain a sequence, which is recorded as the final weather factor sequence. The absolute value of the difference between the wth final weather factor and the w-1th final weather factor in the final weather factor sequence is recorded as a final weather factor change value of the final weather factor sequence, w∈[2, W], W is the number of final weather factors in the final weather factor sequence, and the set consisting of all final weather factor change values ​​of the final weather factor sequence is recorded as the second set.

[0065]

[0066] In the formula, ΔE1 is the first set, For the second set, is the covariance of the first set and the second set, σ ΔE1 is the standard deviation of all volatility changes in the first set, is the standard deviation of all final weather factor change values ​​in the second set, α is a hyperparameter to prevent the denominator from being 0, and this embodiment is described as α=0.1, and ρ is the correlation between the change in vehicle flow data and the change in the final weather factor. It should be noted that the larger the value of the correlation, the greater the degree to which the change in vehicle flow data is affected by the weather.

[0067] At this point, the correlation between the changes in traffic flow data and the changes in final weather factors is obtained.

[0068] Step S003, obtaining the similarity of the changes in traffic flow data for any two days; obtaining the dynamic stability of the changes in traffic flow data based on the outgoing traffic flow data and the incoming traffic flow data; obtaining the distance metric based on the correlation between the changes in traffic flow data and the changes in the final weather factors, the similarity of the changes in traffic flow data, and the dynamic stability.

[0069] It should be noted that different weather factors have a certain impact on the traffic flow in the parking lot, but the traffic flow in the parking lot is affected by different factors at different times. The weather factors also have different degrees of impact on the traffic flow at different times. For situations where the traffic flow change trends are similar at different times, clustering the traffic flow in this situation is more conducive to reducing the complexity of the prediction operation.

[0070] Specifically, the weight of the traffic flow data at each time of the day affected by the final weather factor is obtained based on the traffic flow data at the same time of the day and the final weather factor, as follows:

[0071] Record each hour of a day as a moment, record any moment as a target moment, obtain the traffic flow data of the target moment of each day in the most recent year, arrange all the traffic flow data of the target moment in the chronological order of the corresponding day to obtain a sequence, which is recorded as the second traffic flow data sequence, and fit the second traffic flow data sequence to obtain a curve corresponding to the second traffic flow data sequence, which is recorded as the second curve; it should be noted that, in order to facilitate the understanding of the traffic flow data of the target moment of each day in the most recent year, an example is given here, for example, if the target moment is the 12th hour, then the traffic flow data of the target moment of each day in the most recent year is specifically the traffic flow data of the 12th hour of each day in the most recent year; arrange the final weather factors of each day in the most recent year in the chronological order to obtain a sequence, which is recorded as the factor sequence, and fit the factor sequence to obtain the curve corresponding to the factor sequence, which is recorded as the third curve.

[0072] It should be noted that, in this embodiment, the least squares method is used to fit the second vehicle flow data sequence and the factor sequence respectively, wherein the fitted curves are all quintic polynomial curves, the second curve contains several fitted vehicle flow data, and the third curve contains several fitted final weather factors. The specific fitting is an existing method and will not be repeated in this embodiment.

[0073] ω′=|σ2-σ3|×|h2-h3|

[0074] Wherein, σ2 is the variance of all fitted traffic flow data in the second curve, σ3 is the variance of all fitted final weather factors in the third curve, || is the absolute value, h2 is the range of all fitted traffic flow data in the second curve, h3 is the range of all fitted final weather factors in the third curve, and ω′ is the initial weight of the traffic flow data at the target moment affected by the final weather factor; the initial weight of the traffic flow data at all moments affected by the final weather factor is obtained, and the initial weight of the traffic flow data at all moments affected by the final weather factor is softmax normalized to obtain the weight of the traffic flow data at the target moment affected by the final weather factor.

[0075] It should be noted that |σ2-σ3| represents the difference in fluctuation between the weather factor fitting curve and the vehicle flow data fitting curve at the same time. The smaller the difference, the greater the impact of the weather on that time. |h2-h3| represents the difference in the range of the two fitting curves. The smaller the difference, the more consistent the degree of change of the two fitting curves. That is, the larger the value of |σ2-σ3|×|h2-h3|, the higher the weight of the vehicle flow data at that time being affected by the weather.

[0076] Furthermore, according to the weight of the traffic flow data affected by the final weather factor and the traffic flow data at the corresponding time on any two days, the similarity of the traffic flow data changes on any two days in the past year is obtained, as follows:

[0077]

[0078] Where M is the number of time in a day, ω I is the weight of the traffic flow data at the first moment affected by the final weather factor, L a,I is the traffic flow data at the Ith moment on the ath day in the most recent year, L b,I is the traffic flow data at the Ith moment of the bth day in the most recent year. The ath day is different from the bth day. a,b is the similarity of the traffic flow data changes between day a and day b in the most recent year.

[0079] It should be noted that (L a,I -L b,I ) 2 It represents the difference in traffic flow data at the corresponding time on any two days in the past year, combined with the weight of the traffic flow data at the corresponding time affected by the final weather factor, that is, ω I After taking the average, we can get the similarity of the traffic flow changes on any two days in the past year. The greater the similarity of the traffic flow changes on any two days in the past year, the more similar the traffic flow changes at each moment in these two days are, and they should be clustered into one cluster in the subsequent clustering process.

[0080] It should be noted that if the prediction is only based on the traffic flow entering the parking lot, special circumstances may occur: if the frequency of vehicles entering and leaving the parking lot remains stable, it actually does not have a big impact on the stability of the parking lot. Users may not stay for too long and drive out of the parking lot quickly after entering. Therefore, when predicting the traffic flow in the future, the stability of the parking lot should be considered to make the prediction results more representative.

[0081] Specifically, based on the outgoing traffic flow data and the incoming traffic flow data every hour every day in the past year, the dynamic stability of the daily traffic flow data changes in the past year is obtained, as follows:

[0082] The ratio of the incoming vehicle flow data to the outgoing vehicle flow data on any day in the most recent year is taken as the dynamic stability of the change in the vehicle flow data on that day in the most recent year. It is particularly noted that in order to avoid the denominator being 0, which affects the acquisition of dynamic stability, this embodiment adds 1 to both the numerator and the denominator to obtain the ratio during the dynamic stability acquisition process.

[0083] It should be noted that the larger the ratio of the incoming vehicle flow data to the outgoing vehicle flow data, the more vehicles entering the parking lot are relative to the number of vehicles exiting the parking lot, that is, more vehicles enter the parking lot and stay longer; the closer the ratio is to 1, the more stable the frequency of vehicles entering and exiting the parking lot is, that is, the dynamic stability of the parking lot is better.

[0084] Furthermore, based on the correlation between the changes in traffic flow data and the changes in the final weather factors, the similarity of the changes in traffic flow data, and the dynamic stability, the distance measurement for any two days in the last year is obtained, as follows:

[0085]

[0086] Where ρ is the correlation between the change of traffic flow data and the change of final weather factors, F c,d is the similarity of the traffic flow data changes between the cth day and the dth day in the most recent year, ST c is the dynamic stability of the traffic flow data change on the cth day in the most recent year, ST d is the dynamic stability of the traffic flow data change on the dth day in the most recent year, where the cth day is different from the dth day, D c,d is the distance measure between the cth day and the dth day.

[0087] It should be noted that The Euclidean norm representing the similarity of traffic flow data changes on any two days and the dynamic stability in the parking lot is used to obtain the distance measure for any two days in the last year by combining the correlation between traffic flow data changes and final weather factor changes for subsequent clustering.

[0088] At this point, the distance measurement for any two days in the last year is obtained.

[0089] Step S004: clustering the traffic flow data sequence according to the distance metric; obtaining the predicted traffic flow data of the parking lot at the next moment according to the clusters of the traffic flow data sequence and the final weather factor.

[0090] It should be noted that the above method obtains the distance measurement of any two days in the past year, clusters the traffic flow data series according to the distance measurement, and then obtains the prediction model of each cluster, and then predicts the traffic flow data in the parking lot at the next moment according to the final weather factor.

[0091] Specifically, the traffic flow data sequence is clustered according to the distance measurement of any two days to obtain several clusters of the traffic flow data sequence, as follows:

[0092] K-means clustering is performed on the traffic flow data in the traffic flow data sequence to obtain several clusters of the traffic flow data sequence, and the distance measurement adopts the distance measurement between the days to which the traffic flow data belongs. It should be noted that performing K-means clustering on the traffic flow data in the traffic flow data sequence to obtain several clusters of the traffic flow data sequence is an existing method. In this embodiment, the K value of K-means clustering is obtained by the elbow method to obtain the optimal K value. Using the elbow method to obtain the optimal K value is an existing method and will not be repeated in this embodiment.

[0093] Furthermore, according to the cluster of the traffic flow data sequence, the traffic flow data sequence and the final weather factor, the predicted traffic flow data of the parking lot at the next moment is obtained, as follows:

[0094] Count the final weather factors of the day to which each traffic flow data in each cluster belongs, and obtain the final weather factors corresponding to each traffic flow data in each cluster; record the final weather factor corresponding to any traffic flow data in any cluster as the target final weather factor, obtain the number of traffic flow data corresponding to the target final weather factor in the cluster, record it as the first number, obtain the number of traffic flow data corresponding to the target final weather factor in all clusters, record it as the second number, and record the ratio of the first number to the second number as an initial membership of the cluster; according to the final weather factor corresponding to each traffic flow data in the cluster, obtain several initial memberships of the cluster, and use the final weather factor corresponding to the maximum value of all initial memberships in the cluster as the weather factor of the cluster.

[0095] The traffic flow data of the cluster on the same day are arranged in chronological order to obtain several sequences, and each sequence is fitted to obtain several fitting curves of the cluster; it should be noted that in this embodiment, the least squares method is used to fit several sequences to obtain several fitting curves of the cluster. The specific fitting is an existing method and will not be repeated in this embodiment; the mean of the fitted traffic flow data of the corresponding order in all the fitting curves of the cluster is obtained to obtain the mean fitting curve of all the fitting curves of the cluster, which is recorded as the traffic flow data change curve of the cluster; it should be noted that if the fitted traffic flow data of the corresponding order in all the fitting curves does not have corresponding fitted traffic flow data in some of the fitting curves, then the fitted traffic flow data of the order is 0, for example, the corresponding order in all the fitting curves If the fitting traffic flow data is 5, but a fitting curve does not have the 5th fitting traffic flow data, 0 is used to replace the fitting traffic flow data at this time; a prediction model of the traffic flow data change curve of the cluster is obtained according to the nonlinear regression model; it should be noted that the prediction model of the traffic flow data change curve of the cluster is obtained according to the nonlinear regression model. It is an existing method and will not be repeated in this embodiment; the cluster where the traffic flow data at the last moment in the traffic flow data sequence is located is obtained, recorded as the target cluster, the last moment in the traffic flow data sequence is recorded as the current moment, the weather factor of the target cluster is input into the prediction model of the traffic flow data change curve of the target cluster, and the predicted traffic flow data of the parking lot at the next moment after the current moment is output, that is, the traffic flow data at the future moment.

[0096] At this point, the real-time traffic flow in the parking lot is monitored and predicted by obtaining the prediction model.

[0097] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for monitoring and predicting real-time vehicle flow in an intelligent parking lot, characterized in that: The method comprises the following steps: Obtain a traffic flow data sequence, wherein the traffic flow data sequence includes traffic flow data of the parking lot every hour every day in the past year; obtain outgoing traffic flow data and incoming traffic flow data of the parking lot every hour every day in the past year; obtain a weather condition sequence for every day in the past year; The final weather factor of each day in the most recent year is obtained based on the weather condition sequence of each day in the most recent year; the daily traffic flow data sequence is obtained based on the traffic flow data sequence, and the daily traffic flow data sequence is fitted to obtain a fitting curve, and the fluctuation degree of the fitting curve of the daily traffic flow data sequence is obtained based on the fitting traffic flow data in the fitting curve; the correlation between the change of the traffic flow data and the change of the final weather factor is obtained based on the fluctuation degree of the fitting curve and the final weather factor; The specific steps of obtaining the correlation between the change of the traffic flow data and the change of the final weather factor according to the fluctuation degree of the fitting curve and the final weather factor are as follows: Arrange the fluctuation degree of the fitting curve of the daily traffic flow data sequence in chronological order to obtain a sequence, recorded as the fluctuation degree sequence, and record the absolute value of the difference between the rth fluctuation degree and the r-1th fluctuation degree in the fluctuation degree sequence as a fluctuation degree change value of the fluctuation degree sequence, r∈[2,R], R is the number of fluctuation degrees in the fluctuation degree sequence, and the set consisting of all fluctuation degree change values ​​of the fluctuation degree sequence is recorded as the first set; arrange the final weather factors of each day in the most recent year in chronological order to obtain a sequence, recorded as the final weather factor sequence, and record the absolute value of the difference between the wth final weather factor and the w-1th final weather factor in the final weather factor sequence as a final weather factor change value of the final weather factor sequence, w∈[2,W], W is the number of final weather factors in the final weather factor sequence, and the set consisting of all final weather factor change values ​​of the final weather factor sequence is recorded as the second set; In the formula, ΔE1 is the first set, For the second set, is the covariance of the first set and the second set, σ ΔE1 is the standard deviation of all volatility changes in the first set, is the standard deviation of all final weather factor change values ​​in the second set, α is a hyperparameter to prevent the denominator from being 0, and ρ is the correlation between the change in traffic flow data and the change in the final weather factor; According to the traffic flow data at the same time of every day and the final weather factor, the weight of the traffic flow data at each time of every day affected by the final weather factor is obtained; according to the weight of the traffic flow data affected by the final weather factor and the traffic flow data at the corresponding time of any two days, the similarity of the traffic flow data changes on any two days in the past year is obtained; The method of obtaining the similarity of changes in traffic flow data on any two days in the past year based on the weight of the traffic flow data affected by the final weather factor and the traffic flow data at corresponding moments on any two days includes the following specific steps: Where M is the number of time in a day, ω I is the weight of the traffic flow data at the first moment affected by the final weather factor, L a,I is the traffic flow data at the Ith moment on the ath day in the most recent year, L b,I is the traffic flow data at the Ith moment on the bth day in the most recent year, F a,b is the similarity of the traffic flow data changes between day a and day b in the most recent year; Based on the outgoing and incoming traffic data every hour of the day in the past year, the dynamic stability of the daily traffic flow data changes in the past year is obtained; based on the correlation between the traffic flow data changes and the final weather factor changes, the similarity of the traffic flow data changes and the dynamic stability, the distance measurement between any two days in the past year is obtained; The method of obtaining the distance measurement of any two days in the last year based on the correlation between the change of traffic flow data and the change of the final weather factor, the similarity of the change of traffic flow data and the dynamic stability includes the following specific steps: Where ρ is the correlation between the change of traffic flow data and the change of final weather factors, F c,d is the similarity of the traffic flow data changes between the cth day and the dth day in the most recent year, ST c is the dynamic stability of the traffic flow data change on the cth day in the most recent year, ST d is the dynamic stability of the traffic flow data change on the dth day in the most recent year, D c,d is the distance measure between the cth day and the dth day; Cluster the traffic flow data sequence according to the distance measurement of any two days to obtain several clusters of the traffic flow data sequence; obtain the predicted traffic flow data of the parking lot at the next moment according to the clusters of the traffic flow data sequence, the traffic flow data sequence and the final weather factor; The method of obtaining the predicted traffic flow data of the parking lot at the next moment according to the cluster of the traffic flow data sequence, the traffic flow data sequence and the final weather factor includes the following specific steps: The final weather factor of each day to which each traffic flow data in each cluster belongs is counted to obtain the final weather factor corresponding to each traffic flow data in each cluster; the final weather factor corresponding to any traffic flow data in any cluster is recorded as the target final weather factor, the number of traffic flow data corresponding to the target final weather factor in the cluster is obtained, recorded as the first number, the number of traffic flow data corresponding to the target final weather factor in all clusters is obtained, recorded as the second number, and the ratio of the first number to the second number is recorded as an initial membership of the cluster; according to the final weather factor corresponding to each traffic flow data in the cluster, several initial memberships of the cluster are obtained, and the final weather factor corresponding to the maximum value of all initial memberships in the cluster is taken as the weather factor of the cluster; The traffic flow data of the cluster on the same day are arranged in chronological order to obtain several sequences, and each sequence is fitted to obtain several fitting curves of the cluster; the mean of the fitted traffic flow data of the corresponding order in all the fitting curves of the cluster is obtained to obtain the mean fitting curve of all the fitting curves of the cluster, which is recorded as the traffic flow data change curve of the cluster; the prediction model of the traffic flow data change curve of the cluster is obtained according to the nonlinear regression model; the cluster where the traffic flow data at the last moment in the traffic flow data sequence is located is obtained, which is recorded as the target cluster, and the last moment in the traffic flow data sequence is recorded as the current moment, and the weather factor of the target cluster is input into the prediction model of the traffic flow data change curve of the target cluster, and the predicted traffic flow data of the parking lot at the next moment of the current moment is output.

2. The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot according to claim 1 is characterized in that: The step of obtaining the fluctuation degree of the fitting curve of the daily vehicle flow data sequence according to the fitting vehicle flow data in the fitting curve includes the following specific steps: The fitting curve of the traffic flow data sequence of any day is recorded as the first curve; Where m is the number of fitted traffic flow data in the first curve, L n is the nth fitting traffic flow data in the first curve, is the mean of all fitted traffic flow data in the first curve, LP is the range of all fitted traffic flow data in the first curve, | | represents the absolute value, and E is the fluctuation degree of the first curve.

3. The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot according to claim 1 is characterized in that: The specific steps of obtaining the weight of the traffic flow data at each moment of each day affected by the final weather factor according to the traffic flow data at the same moment of each day and the final weather factor are as follows: Each hour of a day is recorded as a moment, and any moment is recorded as a target moment. The traffic flow data of the target moment of each day in the most recent year are obtained. All the traffic flow data of the target moment are arranged in the time sequence of the corresponding day to obtain a sequence, which is recorded as the second traffic flow data sequence. The second traffic flow data sequence is fitted to obtain a curve corresponding to the second traffic flow data sequence, which is recorded as the second curve. The final weather factors of each day in the most recent year are arranged in the time sequence to obtain a sequence, which is recorded as a factor sequence. The factor sequence is fitted to obtain a curve corresponding to the factor sequence, which is recorded as the third curve. ω'=|σ2-σ3|×|h2-h3| Wherein, σ2 is the variance of all fitted traffic flow data in the second curve, σ3 is the variance of all fitted final weather factors in the third curve, || is the absolute value, h2 is the range of all fitted traffic flow data in the second curve, h3 is the range of all fitted final weather factors in the third curve, and ω′ is the initial weight of the traffic flow data at the target time affected by the final weather factor; The initial weights of the traffic flow data at all times affected by the final weather factors are obtained, and the initial weights of the traffic flow data at all times affected by the final weather factors are normalized by softmax to obtain the weights of the traffic flow data at the target time affected by the final weather factors.

4. The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot according to claim 1 is characterized in that: The method of obtaining the dynamic stability of the daily traffic flow data changes in the recent year based on the outgoing traffic flow data and the incoming traffic flow data every hour every day in the recent year includes the following specific steps: The ratio of the incoming traffic flow data to the outgoing traffic flow data on any day in the most recent year is taken as the dynamic stability of the traffic flow data change on that day in the most recent year.

5. The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot according to claim 1 is characterized in that: The specific steps of clustering the traffic flow data sequence according to the distance measurement of any two days to obtain several clusters of the traffic flow data sequence are as follows: K-means clustering is performed on the traffic flow data in the traffic flow data sequence to obtain several clusters of the traffic flow data sequence. The distance measurement adopts the distance measurement between the days to which the traffic flow data belongs.

6. The method for monitoring and predicting real-time vehicle flow in an intelligent parking lot according to claim 1 is characterized in that: The method of obtaining the final weather factor for each day in the most recent year according to the weather condition sequence for each day in the most recent year includes the following specific steps: The weather condition sequence of each day in the past year is used as the daily weather condition vector. The classification network model is used for training based on the weather condition vector. The daily weather condition vector is input into the trained classification network model, and the final weather factor of each day is output.