A method and system for predicting pedestrian flow on urban roads
By calculating the supporting maturity, directional flow factor and flow factor of urban roads, and combining multiple subclassifiers to determine the optimal predicted input characteristics, the nonlinear interference problem caused by direct input of multidimensional features in the prior art is solved, and urban roads are improved Accuracy and practicality of traffic forecasts.
Patent Information
- Application Number
- CN202411114628.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The existing urban road traffic prediction model is susceptible to nonlinear interference when inputting multidimensional features directly, affecting the accuracy and practicality of the prediction results, especially when there is a significant difference in the changing characteristics of the target flow and the passing flow.
By acquiring and monitoring road data, the neural network is trained to calculate the supporting maturity, directional flow factor and resident functionality, combined with the flow of people on the neighboring road, the optimal prediction input feature is determined using the loss function and multiple subclassifiers, and generated Random forest regressors perform people flow prediction.
It significantly reduces the characteristics chaos and prediction randomness caused by not only the flow components of people, improves the accuracy and practicality of the prediction tasks, and can predict traffic trends more accurately.
Smart Images

Figure CN118627701B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data prediction, and in particular to a method and system for predicting pedestrian flow on urban roads. Background Art
[0002] In the modern urban commercial environment, the prediction of pedestrian flow on urban roads is of core importance for the formulation of business strategies for shops along the street. In-depth analysis of pedestrian flow data can provide shop operators with a unique market perspective and optimize their business decisions, including store site selection, marketing plan formulation, human resource allocation and inventory management, thereby improving overall operating efficiency. By deploying smart cameras and sensors on both sides of urban roads to capture pedestrian flow data in real time, or using location data from mobile applications and social media, it is possible to deeply analyze user behavior patterns to predict pedestrian flow trends in specific time periods or geographic locations.
[0003] However, for shops along urban roads, when the prediction task focuses on the flow of target groups, there are significant differences in the factors affecting the changing characteristics of target flow and passerby flow; therefore, when multi-dimensional features are directly input into the traditional prediction model, it will face greater nonlinear interference, which can easily have an adverse impact on the accuracy and practicality of the prediction results. Summary of the invention
[0004] In order to solve the technical problem that the existing prediction of shops along urban roads has nonlinear interference, which affects the accuracy and practicality of the prediction results, the purpose of the present invention is to provide a method for predicting the flow of pedestrians on urban roads. The technical scheme adopted is as follows:
[0005] Obtain several roads to be selected, and monitor the data information of each road to be selected in real time;
[0006] According to the data information, the neural network is trained to obtain the supporting maturity of each candidate road, and the diversion ratio of each candidate road is evaluated based on the data information. The directional flow factor and permanent functionality of each candidate road are calculated in combination with the supporting maturity, and the balance flow factor of the candidate road is obtained through the directional flow factor and permanent functionality;
[0007] Obtain several neighboring roads of each road to be selected, obtain the passenger flow on the neighboring roads, and calculate the flow factor of the road to be selected based on the passenger flow;
[0008] The loss function is calculated based on each candidate road and neighboring roads, and a set of feature input groups corresponding to the minimum loss function is obtained to obtain the optimal prediction input features;
[0009] Based on the optimal prediction input features, the passenger flow on the selected road is predicted.
[0010] Furthermore, the data information of each road to be selected is monitored in real time, including:
[0011] The pedestrian flow on each road to be selected is monitored in real time through road cameras and / or sensors, and the POI data is used to obtain the number and type of all shops on each road to be selected. Based on big data, the pedestrian flow data and traffic flow data of each road to be selected within a year in history are obtained.
[0012] Furthermore, the neural network is trained based on the data information to obtain the supporting maturity of each road to be selected, including:
[0013] Selecting the characteristics of each road to be selected based on the data information, the characteristics including but not limited to the traffic conditions, infrastructure, number of shops, type of shops and flow of people of each road to be selected;
[0014] All the roads to be selected are recorded as sample roads, and each sample road is scored based on its characteristics. The corresponding level of supporting maturity is obtained according to the different types of scores;
[0015] Obtain the classification network structure and the cross entropy function, divide the sample roads with the obtained scores into training set samples and validation set samples in proportion, input the training set samples into the classification network structure for training until the cross entropy function converges, and complete the training of the classification network structure;
[0016] Each sample road is input into the trained classification network structure and the supporting maturity is output.
[0017] Furthermore, the diversion ratio of each candidate road is evaluated based on the data information, and the directional flow factor of each candidate road is calculated in combination with the supporting maturity, including:
[0018] Count all the traffic between 8:00 a.m. and 10:00 p.m. every day on all the candidate roads in a year, and the number of transactions generated by shops on each candidate road every day, calculate the actual transaction conversion ratio of each candidate road on that day based on the traffic and transaction number, and obtain the actual transaction conversion ratio curve of each candidate road on all days in a year;
[0019] The mean square error is calculated based on the actual transaction conversion ratio curves of any two candidate roads within one year and used as the clustering metric of the two candidate roads. K-means clustering is performed on all candidate roads to obtain several clusters.
[0020] The mean and standard deviation of the supporting maturity of all candidate roads in different clusters are calculated to obtain the directional flow factor of each candidate road.
[0021] Furthermore, the resident functionality of each candidate road is calculated, including:
[0022] Obtain the starting point and destination of all vehicles that pass through each candidate road in a year, the number of driving records on the same candidate road, and the number of all driving records with the same starting point and destination but not passing through the candidate road, and / or the starting point and destination on the same candidate road in a year;
[0023] The functionality of the candidate road for the same type of driving records is obtained by dividing the number of driving records on the same candidate road by the number of all driving records with the same starting point and destination. The functionality of all types of driving records passing through the same candidate road but with different starting points and destinations is summed up to obtain the permanent functionality of each candidate road.
[0024] Furthermore, the balance flow factor of the selected road is obtained through the directional flow factor and the permanent functionality, and the corresponding calculation formula is:
[0025] ;
[0026] in, Indicates The trade-off factor of the selected road; Indicates Roads to choose from; Indicates Directional flow factors of the selected roads; Indicates The permanent functionality of the selected road.
[0027] Furthermore, a number of neighboring roads of each road to be selected are obtained, the flow of people on the neighboring roads is obtained, and the flow factor of the road to be selected is calculated according to the flow of people, including:
[0028] Obtain the hourly passenger flow on the selected road and its neighboring roads from 8 a.m. to 10 p.m. every day, calculate the average daily flow rate per unit time, and the maximum passenger flow per hour per day. The corresponding calculation formula is:
[0029] ;
[0030] in, Indicates The flow factor of the selected roads; Indicates Roads to choose from; Indicates The number of neighboring roads around the road to be selected; Indicates adjacent roads; Indicates The maximum passenger flow of the selected roads in a single hour per day; Indicates The daily flow of people per unit time on the selected roads; Indicates The maximum daily hourly flow of people on the adjacent roads; Indicates The daily flow of people per unit time on the neighboring roads.
[0031] Furthermore, the loss function is calculated based on each candidate road and its neighboring roads, and a set of feature numbers corresponding to the minimum loss function is obtained and grouped to obtain the optimal prediction input features, including:
[0032] The Euclidean norm is calculated based on the difference between the balance factor and the flow factor of any two candidate roads, and k-means clustering is performed on all candidate roads to obtain k clusters, and a reference classification result is obtained based on the balance factor and the flow factor;
[0033] Obtain a prediction model, obtain several sub-classifiers based on a neural network to distinguish k different road clusters, define the roads to be selected, obtain T multi-dimensional features, set the prediction model to have E feature inputs, and , randomly combine T multidimensional features into several E feature input groups;
[0034] Through several sub-classifiers and different feature input groups, the classification results corresponding to each feature input group are obtained. Each classification result is k different road clusters, which are compared with the reference classification results. The feature input group corresponding to the minimum loss is the optimal prediction input feature.
[0035] Furthermore, based on the optimal prediction input features, the passenger flow on the selected road is predicted, including:
[0036] A random forest regressor is generated based on the optimal prediction input features, and the training set samples are used to train the random forest regressor. The validation set samples are used to evaluate the performance of the random forest regressor. The optimal prediction input features of the candidate road on the prediction date are input into the trained random forest regressor to obtain the passenger flow prediction result of the candidate road on the prediction date.
[0037] In order to solve the above technical problems, the present invention provides another technical solution as follows: a system for predicting pedestrian flow on urban roads, comprising the following modules:
[0038] The acquisition module is used to obtain a number of roads to be selected and monitor the data information of each road to be selected in real time;
[0039] The analysis module is used to: train a neural network according to data information to obtain the supporting maturity of each road to be selected, evaluate the diversion ratio of each road to be selected based on the data information, calculate the directional flow factor and permanent functionality of each road to be selected in combination with the supporting maturity, and obtain the balance flow factor of the road to be selected through the directional flow factor and the permanent functionality;
[0040] The auxiliary module is used to obtain a number of neighboring roads of each road to be selected, obtain the flow of people on the neighboring roads, and calculate the flow factor of the road to be selected based on the flow of people;
[0041] A processing module is used to: calculate a loss function based on each road to be selected and the neighboring roads, obtain a set of feature numbers corresponding to the minimum point of the loss function, and obtain the optimal prediction input feature;
[0042] The prediction module is used to predict the passenger flow on the selected road based on the optimal prediction input features.
[0043] The present invention has the following beneficial effects: based on the data information obtained from the candidate road, the supporting maturity of the candidate road is generated through a neural network, and the directional flow factor and the permanent functionality of the candidate road are calculated based on this, and then the balance flow factor of the candidate road is obtained based on the proportional relationship between the two; based on the candidate road, the neighboring road information is obtained, and then the flow factor of the candidate road is calculated; according to the balance flow factor and the flow factor, the candidate roads with the same pedestrian flow differentiation structure and independent characteristic influence can be clustered, and recorded as reference classification results; then, multiple sub-classifiers are used to iteratively input prediction feature combinations to generate different classification results, and these results are compared with the reference classification results to determine the optimal prediction input features. This method can significantly reduce the feature confusion and prediction randomness caused by the non-single pedestrian flow component, thereby greatly improving the accuracy and practicality of the prediction task. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are 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.
[0045] Figure 1 A flowchart of a method for predicting pedestrian flow on urban roads provided by one embodiment of the present invention;
[0046] Figure 2 A flowchart of an implementation method for predicting pedestrian flow on urban roads provided by one embodiment of the present invention;
[0047] Figure 3 A schematic diagram of the structure of a system for predicting pedestrian flow on urban roads provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0048] 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 a method and system for predicting the flow of pedestrians on urban roads proposed by the present invention, its specific implementation, 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.
[0049] 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.
[0050] The specific scheme of a method and system for predicting pedestrian flow on urban roads provided by the present invention is described in detail below with reference to the accompanying drawings.
[0051] The existing prediction model has a large nonlinear interference in predicting the mixed multi-dimensional features, and cannot obtain the trend of pedestrian flow in the current time period or the current specific geographical location, which affects the accuracy and availability of the prediction results, thereby affecting business decisions and leading to a decrease in operating efficiency; an embodiment of the present invention provides a method for predicting urban road pedestrian flow, which aims to determine the optimal prediction input features through a variety of calculation methods such as neural networks and k-means clustering in a scenario of differentiated pedestrian flow, so as to solve the problem of nonlinear interference to the prediction results caused by direct input of mixed features into the prediction model; in order to realize the method for predicting urban road pedestrian flow, a system for predicting urban road pedestrian flow is provided, which is essentially a software system, which is composed of modules that realize corresponding functions, and the specific steps in the method are now introduced in detail.
[0052] Please combine Figure 1 and Figure 2 , which respectively show a step flow chart and an implementation flow chart of a method for predicting pedestrian flow on urban roads provided by an embodiment of the present invention, the method comprising:
[0053] Step S1: obtaining a number of roads to be selected, and monitoring the data information of each road to be selected in real time;
[0054] Step S2: training a neural network according to the data information to obtain the supporting maturity of each road to be selected, and evaluating the diversion ratio of each road to be selected based on the data information, calculating the directional flow factor and permanent functionality of each road to be selected in combination with the supporting maturity, and obtaining the balance flow factor of the road to be selected through the directional flow factor and the permanent functionality;
[0055] Step S3: obtaining a number of neighboring roads of each road to be selected, obtaining the passenger flow on the neighboring roads, and calculating the flow factor of the road to be selected based on the passenger flow;
[0056] Step S4: Calculate the loss function based on each road to be selected and the neighboring roads, obtain a set of feature numbers corresponding to the minimum loss function, and obtain the optimal prediction input features;
[0057] Step S5: Based on the optimal prediction input features, predict the passenger flow on the selected road.
[0058] To better illustrate, in the current rapidly developing urban commercial environment, accurate prediction of pedestrian flow on urban streets has become an important factor in determining the survival and development of shops along the street. Usually, shop operators make decisions based on market insights and accurate market information by deeply mining and analyzing pedestrian flow data. These decisions include but are not limited to the best location for shops, effective marketing strategy formulation, reasonable human resource allocation, and efficient inventory management, so as to improve operating efficiency and profitability in all aspects. That is, through accurate prediction of pedestrian flow on urban streets, shop operators can respond to market changes more flexibly and effectively and maintain competitive advantage.
[0059] However, in the process of predicting the pedestrian flow on the street, there are differences in the key characteristic factors of the target pedestrian flow and the change of the passerby crowd. In this situation, directly mixing the multi-dimensional feature information into the traditional prediction model to predict the pedestrian flow will be subject to more significant nonlinear interference, affecting the accuracy and practicality of the prediction results. Therefore, a method for predicting the pedestrian flow on urban roads is proposed in the present invention.
[0060] To explain, traffic flow, that is, population flow, refers to the number of people passing through a certain place within a certain period of time.
[0061] Preferably, in step S1, real-time monitoring of data information of each road to be selected includes:
[0062] The pedestrian flow on each road to be selected is monitored in real time through road cameras and / or sensors, and the POI data is used to obtain the number and type of all shops on each road to be selected. Based on big data, the pedestrian flow data and traffic flow data of each road to be selected within a year in history are obtained.
[0063] It can be explained that the embodiment of the present invention takes the site selection of a shop as an example, so a number of roads to be selected are prepared according to the site selection intention.
[0064] To clarify, POI (Point Of Interest) data refers to data that identifies and locates specific locations on a map. These locations usually have specific interests or practical values for users. For example, in a city, POI data may include restaurants, parks, financial institutions, landmark buildings, etc.; for better explanation, a complete POI dataset usually contains detailed information about a specific place, such as name, address, latitude and longitude, telephone number, type (catering, accommodation, entertainment, etc.) and user ratings, etc. With this information, users can quickly and accurately find their destination, or related service information in a certain area.
[0065] Big data refers to a collection of data that is huge in scale, complex in types, and needs to be accessed and processed at high speeds. It has a massive storage capacity and can cover various types of data, including text, images, audio, video, etc. At the same time, the processing speed of big data is very fast and can meet application scenarios with high real-time requirements.
[0066] Understandably, by widely deploying road cameras and / or sensors on major traffic arteries to track and monitor road conditions in real time, the flow of people on each candidate road can be accurately recorded and analyzed, which facilitates a detailed grasp of its usage; by mining POI data, the number and types of shops on each candidate road can be obtained, which is conducive to understanding the commercial activity, consumption level and economic development status of the area; combined with big data analysis technology, the flow of people and traffic flow data on each candidate road in the past year are mined to reveal the usage trends of these candidate roads over a period of time, which is convenient for subsequent data prediction.
[0067] Preferably, in step S2, training a neural network according to the data information to obtain the supporting maturity of each road to be selected includes:
[0068] Step S211: selecting the characteristics of each road to be selected according to the data information, wherein the characteristics include but are not limited to the traffic conditions, infrastructure, number of shops, type of shops and flow of people of each road to be selected;
[0069] Step S212: All roads to be selected are recorded as sample roads, and each sample road is scored based on the characteristics, and the corresponding level of supporting maturity is obtained according to different score types;
[0070] Step S213: obtaining a classification network structure and a cross entropy function, dividing the sample roads of the obtained score types into training set samples and validation set samples in proportion, inputting the training set samples into the classification network structure for training until the cross entropy function converges, and completing the training of the classification network structure;
[0071] Step S214: Input each sample road into the trained classification network structure and output the supporting maturity.
[0072] To better illustrate, in cities, whether it is population distribution, economic strength or the allocation of commercial resources, there are certain limitations, which leads to scarcity and imbalance of resources available for transportation roads in cities; and each road in the city, due to its different stages of development, will show different degrees of characteristics and differences in road hardware facilities, commercial vitality, brand influence, and the number and quality of surrounding permanent residents. Therefore, in order to understand and evaluate the actual situation of each road more accurately and scientifically, the supporting maturity of each road to be selected can be obtained.
[0073] To clarify, a neural network refers to a method that simulates the connection between neurons in the human brain and can make decisions by learning patterns and rules in data. Specifically, a neural network is composed of a large number of nodes (or neurons), which are interconnected in a multi-level manner. Each layer of nodes receives input from the previous layer, and after a certain amount of calculation and processing, it passes the results to the next layer. In this way, the neural network can identify complex relationships in the data and make decisions or predictions based on them.
[0074] The supporting maturity is an indicator used to describe the development level of a specific road or region, which usually covers the construction status of infrastructure, the degree of perfection of the surrounding environment, the configuration of service facilities, and the maturity of transportation, commerce, residence, etc. It can be explained that in this embodiment, the supporting maturity only refers to the explicit performance of the visual data of the selected road, and cannot reflect the contribution of the actual flow of people on the selected road to the operation of shops along the street.
[0075] It can be explained that, in this embodiment, the scoring range is [0, 1], the sampling interval is 0.1, there are 10 score types in total, and the score type 0 is not included, so there are 10 levels of supporting maturity.
[0076] Optionally, the classification network structure is a 5-layer fully connected neural network, that is, a 5-level fully connected neural network, which means that information is transmitted and processed between neurons in a fully connected manner through weights. In this structure, each neuron in each layer is connected to each neuron in the previous layer, and information is transmitted through corresponding weights. This structure can not only learn and simulate complex nonlinear relationships, but also effectively perform feature extraction, pattern recognition and classification on input data by adjusting and optimizing the weights in the network.
[0077] The cross entropy function is used to calculate the difference between the actual output and the predicted output, and quantify these differences. When the cross entropy value is small, it means that the prediction result of the model is closer to the actual category distribution, and the model fitting effect is better; conversely, when the cross entropy value is large, there is a large deviation between the prediction result of the model and the actual category distribution, and the model fitting effect is poor.
[0078] Specifically, firstly, features are selected, including traffic conditions, infrastructure, number and type of shops, and passenger flow of each road to be selected; all roads to be selected in the city are recorded as sample roads, and each road to be selected, that is, each sample road is scored by manual scoring in combination with the above selected features, and the scoring values are 0.1, 0.2, 0.3...1, a total of 10 score types, corresponding to 10 levels of supporting maturity, and the scoring result is the supporting maturity; then the sample roads with the obtained score types are divided into training set samples and validation set samples in a ratio of 7:3, and the training set samples are input into a 5-layer fully connected neural network for training, and the gradient descent method is used for training until the cross entropy function converges and the training of the complete neural network is completed; finally, for any road to be selected, it is input into the trained neural network, and the supporting maturity is output, so that the most appropriate decision can be made according to the supporting maturity in the future.
[0079] To explain, the gradient descent method is an optimization algorithm used to solve parameter optimization problems in the fields of machine learning and artificial intelligence. It continuously adjusts the parameter values in an iterative manner to minimize the model's loss function. The gradient refers to a vector whose direction points to the direction in which the loss function grows fastest, and its size indicates the rate of growth. By calculating the gradient, it is possible to determine in which direction the loss function decreases fastest.
[0080] Preferably, in step S2, the diversion ratio of each road to be selected is evaluated based on the data information, and the directional flow factor of each road to be selected is calculated in combination with the supporting maturity, including:
[0081] Step S221: Counting all the pedestrian traffic between 8:00 a.m. and 10:00 p.m. every day in a year on all the candidate roads, and the number of transactions generated by the shops on each candidate road every day, and calculating the actual transaction conversion ratio of each candidate road on that day based on the pedestrian traffic and the number of transactions, to obtain the actual transaction conversion ratio curve of each candidate road on all days in a year;
[0082] Step S222: Calculate the mean square error based on the actual transaction conversion ratio curves of any two candidate roads within one year and use it as the clustering metric of the two candidate roads. Perform k-means clustering on all candidate roads to obtain a number of clusters.
[0083] Step S223: Calculate the average and standard deviation of the supporting maturity of all candidate roads in different clusters to obtain the directional flow factor of each candidate road.
[0084] It should be explained that on urban roads, pedestrian flow is divided into two types: passers-by and target pedestrian flow. Passers-by refer to pedestrians strolling in the streets and alleys without any shopping plans or purchasing needs; target pedestrian flow refers specifically to pedestrians who have clear consumption purposes and intend to consume in shops. Due to the significant differences in the nature and purpose of their flow, their flow status on the streets will inevitably be affected by various external factors. Therefore, from the perspective of shop site selection, it is necessary to evaluate the diversion ratio of each road to be selected based on data information, and clarify the impact of different types of pedestrian flow on shops.
[0085] The directional flow factor refers to an indicator that quantifies the traffic attractiveness of each candidate road, taking into account the diversion ratio and supporting maturity of the candidate roads during the diversion process.
[0086] K-means clustering is a clustering analysis method that divides a data set into k clusters in an iterative manner so that the distance between data points within each cluster is minimized, while the distance between data points in different clusters is maximized. In the k-means clustering algorithm, you first need to specify the number of clusters k, then randomly select k data points as the initial cluster centers, and then assign each data point to the cluster with the closest cluster center. A new cluster center is calculated based on the data points in each cluster. In this process, the cluster center is continuously updated until the stopping condition is met, such as the number of cluster center updates reaches the set value, or the cluster center update value is less than a certain threshold, that is, the algorithm is run multiple times to obtain the optimal result.
[0087] Specifically, we first count all the pedestrian traffic on all the candidate roads between 8 a.m. and 10 p.m. every day in a year, and the number of transactions generated by shops on each candidate road every day, and then calculate the actual transaction conversion ratio of each candidate road on that day based on the pedestrian traffic and the number of transactions, that is, divide the daily transaction number by the pedestrian traffic on the same day to get the actual transaction conversion ratio; then collect these data to form a curve of the actual transaction conversion ratio of the candidate road every day in a year, which reflects how the transaction popularity of the candidate road is affected by holidays, weather and other factors.
[0088] Then, the mean square error is calculated based on the actual transaction conversion ratio curves of any two candidate roads within one year, and this value is used as the clustering measure of the two candidate roads. K-means clustering is performed on all candidate roads to obtain several clusters. A cluster refers to some roads with similar transaction heat trends. Then, the mean and standard deviation of the supporting maturity of all candidate roads in different clusters are calculated. The ratio of the mean to the standard deviation can reflect the influence of explicit supporting facilities on the actual transaction conversion ratio. After normalizing the deviation of the ratio, the quantitative flow factor is obtained, which is denoted as Q.
[0089] Understandably, the ratio of the mean to the standard deviation is smaller, indicating that the impact of obvious supporting facilities on transaction conversion is small, that is, no matter what the obvious supporting facilities of the road are, the transaction heat is not affected; at this time, on the candidate roads in such clusters, the number of transactions generated by fixed consumption is greater than the number of transactions converted by passers-by; conversely, the ratio of the mean to the standard deviation is larger, indicating that the impact of obvious supporting facilities on transaction conversion is large, and the number of transactions generated by fixed consumption on the candidate roads in such clusters is less than the number of transactions converted by passers-by; the directional flow factor indicates whether there is a stable target flow of people on the candidate roads in different clusters. The larger the value, the more stable the target flow of people on the candidate roads in the corresponding cluster.
[0090] Preferably, in step S2, calculating the resident functionality of each road to be selected includes:
[0091] Step S231: Obtain the starting point and destination of all vehicles passing through each road to be selected within one year, the number of driving records on the same road to be selected, and the number of all driving records with the same starting point and destination but not passing through the road to be selected, and / or the starting point and destination on the same road to be selected within one year;
[0092] Step S232: Divide the number of driving records on the same road to be selected by the number of all driving records with the same starting point and destination to obtain the functionality of the road to be selected for the same type of driving records. Add up and average the functionality of all types of driving records that pass through the same road to be selected but have different starting points and destinations to obtain the resident functionality of each road to be selected.
[0093] It should be noted that in order to evaluate the attractiveness of a candidate road in commercial activities and its actual role in daily traffic, it is necessary to track the flow of people. However, the continuous tracking and monitoring of the flow of people within a year requires a large amount of data and the difficulty of monitoring. Therefore, it is necessary to evaluate the function of each candidate road in daily life and traffic.
[0094] Permanent functionality refers to the stability and continuity of the functional properties of the selected road within a certain time frame. For roads, permanent functionality may include the influence of traffic flow, service type, functional stability and other factors to obtain the continuous and stable service characteristics of the road during use.
[0095] Specifically, the driving routes of passing vehicles on each road to be selected are tracked using license plate recognition tracking or navigation software to obtain the starting points and destinations of all vehicles passing each road to be selected within a year, the number of driving records on the same road to be selected, and the number of all driving records with the same starting point and destination but not passing the road to be selected, and / or different starting points and destinations but passing the road to be selected within a year; then the number of driving records on the same road to be selected is divided by the number of all driving records with the same starting point and destination to obtain the functionality of the road to be selected for the same type of driving records, that is, vehicles with the same starting point and destination almost all pass through the same road to be selected, indicating that the functionality of the road to be selected is high; the functionality of all types of driving records passing through the same road to be selected but with different starting points and destinations is summed and averaged, and the deviation is normalized to obtain the resident functionality of the road to be selected, denoted as H.
[0096] It can be explained that the greater the permanent functionality, the more important the road is for permanent traffic and the link between important areas of the city. It indirectly reflects the permanent influence of the road on the flow of people and is an area where people travel more frequently.
[0097] Preferably, in step S2, the flow factor of the selected road is obtained by the directional flow factor and the permanent functionality, and the corresponding calculation formula is:
[0098] ;
[0099] in, Indicates The trade-off factor of the selected road; Indicates Roads to choose from; Indicates Directional flow factors of the selected roads; Indicates The permanent functionality of the selected road.
[0100] To explain, the directional flow factor represents the stability of the fixed target flow of people in the candidate road, that is, the ability of the candidate road to attract the target population; the permanent functionality represents the irresistible choice of the candidate road for certain travel routes, that is, the estimation of the passerby flow; the ratio of the two can be obtained to obtain the balance flow factor of each candidate road, which represents the diversion ratio of the two types of people in different candidate roads. The larger the value, the greater the proportion of the actual target flow of the candidate road, which is more beneficial to the location of shops and can attract more target people to bring higher commercial value;
[0101] It can be explained that the traditional method is to directly analyze the flow of people and related influencing factors to predict the number of pedestrians on the road. It cannot fully consider the complex nature of pedestrian flow and has many nonlinear components. Different influencing factors may have different degrees of influence on the target flow of people. Some factors may affect the number of pedestrians, while others may mainly affect the number of passers-by. When these factors are mixed for prediction, the uncertainty increases, and the uncertainty of the prediction results will also increase accordingly. By predicting the selected roads in batches through the flow factor, the nonlinear component can be minimized, that is, the roads with the same flow factor are most consistently affected by external factors.
[0102] Preferably, step S3 includes:
[0103] Obtain the hourly passenger flow on the selected road and its neighboring roads from 8 a.m. to 10 p.m. every day, calculate the average daily flow rate per unit time, and the maximum passenger flow per hour per day. The corresponding calculation formula is:
[0104] ;
[0105] in, Indicates The flow factor of the selected roads; Indicates Roads to choose from; Indicates The number of neighboring roads around the road to be selected; Indicates adjacent roads; Indicates The maximum passenger flow of the selected roads in a single hour per day; Indicates The daily flow of people per unit time on the selected roads; Indicates The maximum daily hourly flow of people on the adjacent roads; Indicates The daily flow of people per unit time on the neighboring roads.
[0106] It is explained that when predicting the passenger flow on the selected road based on the flow factor, it may be affected by the passenger flow on other adjacent roads, that is, the passenger flow on the selected road will be diverted or the passenger flow on the adjacent roads will flow into the selected road, affecting the accuracy of the prediction results. Therefore, the flow factor of each candidate road is calculated, where the flow factor is used to measure the impact of neighboring roads on the passenger flow on the candidate road.
[0107] It can be explained that Indicates The difference between the maximum passenger flow per hour of each day and the flow passenger flow per unit time of the candidate road and its The ratio of the maximum passenger flow of the neighboring roads in a single hour every day to the difference between the flow passenger flow per unit time. The larger the ratio, the greater the passenger flow fluctuation of the selected road is. The passenger flow fluctuations of the neighboring roads are calculated; all the neighboring roads are averaged and the deviations are normalized to obtain the flow factor of the road to be selected; the larger the flow factor, the less the passenger flow on the road to be selected is affected by the neighboring roads, the more independent the influencing characteristics of its passenger flow changes are, the less likely the change characteristics are to be disturbed by the neighboring roads, and the fewer nonlinear factors are, that is, the larger the flow factor, the more stable the passenger flow distribution on the road to be selected, and the less interference from external factors.
[0108] Preferably, step S4 comprises:
[0109] Step S41: Calculate the Euclidean norm based on the difference between the balance factor and the flow factor of any two roads to be selected, perform k-means clustering on all the roads to be selected to obtain k clusters, and obtain a reference classification result based on the balance factor and the flow factor;
[0110] Step S42: Obtain a prediction model, obtain several sub-classifiers based on a neural network, and use them to distinguish k different road clusters, define the roads to be selected, obtain T multi-dimensional features, and set the prediction model to have E feature inputs, and , randomly combine T multidimensional features into several E feature input groups;
[0111] Step S43: The classification result corresponding to each feature input group is obtained through several sub-classifiers and different feature input groups. Each classification result is k different road clusters, which are compared with the reference classification results. The feature input group corresponding to the minimum loss is the optimal prediction input feature.
[0112] It is explained that the Euclidean norm is calculated based on the difference between the balance flow factors and the flow factors of any two candidate roads. The difference can be used to evaluate the role and efficiency of the two candidate roads in the transmission of passenger flow, and the Euclidean norm is used for quantitative analysis, which can measure the distance from a point to the origin in the vector space. It is used here to represent the difference in influence of the two roads in the city. The larger the distance, the more obvious the difference in the role of the two candidate roads, and the road selection and planning can be obtained more accurately to achieve the optimal traffic flow effect.
[0113] Specifically, the daily average passenger flow of each candidate road is first obtained, and the maximum value normalization is performed to reflect the actual passenger flow of the candidate road. The maximum value normalization is to eliminate the impact of the difference in data magnitude, so that the daily average passenger flow data can be compared at the same scale, that is, the data value of the daily average passenger flow is compressed between [0,1]; the Euclidean norm is calculated based on the difference between the balance factor and the flow factor of any two candidate roads to obtain the degree of difference between the candidate roads, in preparation for subsequent clustering analysis; k-means clustering is performed on all candidate roads to obtain k clusters, and the classification of clusters is based on the balance factor and the flow factor to obtain the reference classification results, among which the clusters are combined into a total of Ideally, the classification network consists of C sub-classifiers, which can distinguish k different road clusters. That is, the road classification result with the least nonlinear interference is the reference classification result.
[0114] Define the candidate roads to obtain T multi-dimensional features, such as date and time, weather conditions, which refer to temperature, rainfall, wind speed, etc., holidays or special events, which refer to sports events, concerts, etc., store activities, road conditions, which refer to infrastructure, road maintenance and other dimensions. Since it is impossible to accurately determine which specific multi-dimensional features have a greater impact on the attractiveness of road traffic and can improve the accuracy of the prediction results, training is performed based on the prediction model; it is set in advance that the prediction model has E feature inputs, , and randomly combine T multidimensional features into several E feature input groups, so as to find the best combination for subsequent road crowd flow prediction tasks; through the feature combination method, not only can the influence of different feature combinations on the prediction results be explored, but also the generalization ability of the model can be improved, so that it can still maintain a high prediction accuracy when facing complex and changeable road crowd flow conditions;
[0115] Then, C sub-classifiers are used to perform classification training on all the roads to be selected with different feature input groups as the classification logic. Each feature input group obtains the classification result corresponding to the feature input group after training, and each classification result is a different k-class road cluster. When all sub-classifiers obtain different classification results based on different feature input groups, and the loss compared with the reference classification results is the smallest, it can represent the current feature input group, which is a set of feature inputs with the weakest nonlinear interference and the best prediction results.
[0116] It can be explained that k-means clustering is specifically as follows:
[0117] The k clusters of the classification results obtained from each feature input group are paired with the k clusters of the reference classification results, that is, the two clusters with the largest data intersection within the clusters are a pair, and k matching groups are obtained; it can be understood that the several clusters of the classification results obtained from each feature input group are recorded as class a clusters, and the reference classification results obtained are recorded as class b clusters. All class a clusters are sorted from large to small according to the amount of data within the cluster. After the sorting is completed, each class a cluster in the sequence is matched in the class b cluster, that is, the two clusters with the largest data intersection within the clusters are a pair, and the paired class a and class b clusters do not participate in the subsequent matching of other clusters, then k non-overlapping matching groups can be obtained, which refers to the number of non-overlapping roads to be selected, which is the loss amount of each matching group.
[0118] It is explained that the loss function is the mean square error function of the loss amount of k matching groups between the classification results obtained for each feature input group and the reference classification results. It is an indicator used to evaluate the difference between the predicted results and the actual results of the model, and is used to guide the optimization process of the model so that the model can minimize the difference between the predicted results and the actual results in future training.
[0119] Preferably, step S5 comprises:
[0120] A random forest regressor is generated based on the optimal prediction input features, and the training set samples are used to train the random forest regressor. The validation set samples are used to evaluate the performance of the random forest regressor. The optimal prediction input features of the candidate road on the prediction date are input into the trained random forest regressor to obtain the passenger flow prediction result of the candidate road on the prediction date.
[0121] To explain, the random forest regressor is an ensemble learning method based on decision trees. It has excellent accuracy, the ability to process high-dimensional data, and robustness to outliers in the training data set when solving regression problems. Its core idea is to construct multiple decision trees and merge their prediction results to obtain the final regression output.
[0122] Specifically, a random forest regressor is generated based on the optimal prediction input features. It improves the prediction accuracy by constructing multiple decision trees and voting, and can also handle nonlinear relationships and noise data well. Similarly, the sample roads are divided into training set samples and validation set samples in a ratio of 7:3. The training set samples are used to train the random forest regressor, and the validation set samples are used to evaluate the performance of the model. This proportional division can ensure that the model not only considers most of the data during the training process, but also verifies the true performance of the model through the validation set samples. Commonly used evaluation indicators include mean square error (MSE), root mean square error (RMSE) and mean absolute error (MAE). Several optimal prediction input features of the candidate road on the date to be predicted are transmitted to the trained random forest regressor, and the pedestrian flow prediction result of the candidate road on that date can be output. Store location selection is carried out based on the predicted results of pedestrian flow, that is, locations with large pedestrian flow and many potential customers are selected to create more economic revenue.
[0123] It can be explained that the obtained optimal prediction input features can avoid to the greatest extent the problem of nonlinear components and large influence of prediction randomness caused by feature confusion when the components of pedestrian flow are not single, and greatly improve the accuracy and practicality of the prediction task. This prediction method can not only be used for store site selection, but also has important reference value for urban planning, traffic management and the arrangement of commercial activities.
[0124] It can be understood that, according to the data information obtained from the candidate road, the supporting maturity of the candidate road is generated through a neural network, and the directional flow factor and permanent functionality of the candidate road are calculated accordingly, and then the balance flow factor of the candidate road is obtained based on the proportional relationship between the two; the neighboring road information is obtained based on the candidate road, and then the flow factor of the candidate road is calculated; according to the balance flow factor and the flow factor, the candidate roads with the same pedestrian flow differentiation structure and independent characteristic influence can be clustered and recorded as reference classification results; then multiple sub-classifiers are used to iteratively input prediction feature combinations to generate different classification results, and these results are compared with the reference classification results to determine the optimal prediction input features. This method can significantly reduce the feature confusion and prediction randomness caused by the non-single pedestrian flow component, thereby greatly improving the accuracy and practicality of the prediction task.
[0125] Please combine Figure 1 and Figure 3 , which respectively show a step flow chart of a method for predicting pedestrian flow on urban roads provided by an embodiment of the present invention and a structural schematic diagram of a system for predicting pedestrian flow on urban roads provided by an embodiment of the present invention, including the following modules:
[0126] The acquisition module is used to obtain a number of roads to be selected and monitor the data information of each road to be selected in real time;
[0127] The analysis module is used to: train a neural network according to data information to obtain the supporting maturity of each road to be selected, evaluate the diversion ratio of each road to be selected based on the data information, calculate the directional flow factor and permanent functionality of each road to be selected in combination with the supporting maturity, and obtain the balance flow factor of the road to be selected through the directional flow factor and the permanent functionality;
[0128] The auxiliary module is used to obtain a number of neighboring roads of each road to be selected, obtain the flow of people on the neighboring roads, and calculate the flow factor of the road to be selected based on the flow of people;
[0129] A processing module is used to: calculate a loss function based on each road to be selected and the neighboring roads, obtain a set of feature numbers corresponding to the minimum point of the loss function, and obtain the optimal prediction input feature;
[0130] The prediction module is used to predict the passenger flow on the selected road based on the optimal prediction input features.
[0131] It can be understood that when the modules of the urban road pedestrian flow prediction system are in operation, it is necessary to utilize an urban road pedestrian flow prediction method provided in the first embodiment. Therefore, whether the acquisition module, analysis module, auxiliary module, processing module and prediction module are integrated or different hardware is configured to produce functions similar to the effects achieved by the present invention, they all fall within the scope of protection of the present invention.
[0132] Specifically, the acquisition module is first used to collect information on the candidate roads, and the detailed data of these candidate roads are tracked in real time; the data provided by the acquisition module is input into the analysis module, and the maturity of each candidate road is evaluated by training the neural network, and the diversion capacity of each candidate road is evaluated, and the directional flow factor and permanent functionality of each road are calculated in combination with the supporting maturity and diversion ratio of the candidate roads, and the balance flow factor is determined; the flow factor of the candidate road is then obtained through the auxiliary module; the loss function is then calculated through the processing module to find the optimal prediction input feature; finally, the passenger flow of the candidate road is predicted through the prediction module to avoid the problem that when the passenger flow component is not single, the feature confusion leads to nonlinear components and the prediction randomness has a greater impact, thereby greatly improving the accuracy and practicality of the prediction task.
[0133] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0134] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for predicting pedestrian flow on urban roads, characterized in that: The method comprises: Obtain several roads to be selected, and monitor the data information of each road to be selected in real time; According to the data information, the neural network is trained to obtain the supporting maturity of each candidate road, and the diversion ratio of each candidate road is evaluated based on the data information. The directional flow factor and permanent functionality of each candidate road are calculated in combination with the supporting maturity, and the balance flow factor of the candidate road is obtained through the directional flow factor and permanent functionality; Obtain several neighboring roads of each road to be selected, obtain the passenger flow on the neighboring roads, and calculate the flow factor of the road to be selected based on the passenger flow; The loss function is calculated based on each candidate road and neighboring roads, and a set of feature input groups corresponding to the minimum loss function is obtained to obtain the optimal prediction input features; Based on the optimal prediction input features, the passenger flow of the selected road is predicted; The neural network is trained based on the data information to obtain the supporting maturity of each road to be selected, including: Selecting the characteristics of each road to be selected according to the data information, wherein the characteristics include the traffic conditions, infrastructure, number of shops, type of shops and flow of people of each road to be selected; All the roads to be selected are recorded as sample roads, and each sample road is scored based on its characteristics. The corresponding level of supporting maturity is obtained according to the different types of scores; Obtain the classification network structure and the cross entropy function, divide the sample roads with the obtained scores into training set samples and validation set samples in proportion, input the training set samples into the classification network structure for training until the cross entropy function converges, and complete the training of the classification network structure; Input each sample road into the trained classification network structure and output the supporting maturity; Based on the data information, the diversion ratio of each candidate road is evaluated, and the directional flow factor of each candidate road is calculated in combination with the supporting maturity, including: Count all the traffic between 8:00 a.m. and 10:00 p.m. every day on all the candidate roads in a year, and the number of transactions generated by shops on each candidate road every day, calculate the actual transaction conversion ratio of each candidate road on that day based on the traffic and transaction number, and obtain the actual transaction conversion ratio curve of each candidate road on all days in a year; The mean square error is calculated based on the actual transaction conversion ratio curves of any two candidate roads within one year and used as the clustering metric of the two candidate roads. K-means clustering is performed on all candidate roads to obtain several clusters. The average value and standard deviation of the supporting maturity of all candidate roads in different clusters are calculated to obtain the directional flow factor of each candidate road; the ratio of the average value to the standard deviation can reflect the influence of the explicit supporting facilities on the actual transaction conversion ratio, and the quantitative flow factor of each candidate road is obtained after normalizing the deviation of the ratio; Calculate the resident functionality of each candidate road, including: Obtain the starting point and destination of all vehicles that pass through each candidate road in a year, the number of driving records on the same candidate road, and the number of all driving records with the same starting point and destination but not passing through the candidate road, and / or the starting point and destination on the same candidate road in a year; The functionality of the candidate road for the same type of driving records is obtained by dividing the number of driving records on the same candidate road by the number of all driving records with the same starting point and destination. The functionality of all types of driving records passing through the same candidate road but with different starting points and destinations is summed up to obtain the permanent functionality of each candidate road. The balance flow factor of the selected road is obtained by the directional flow factor and the permanent functionality. The corresponding calculation formula is: ; in, Indicates The trade-off factor of the selected road; Indicates Roads to choose from; Indicates Directional flow factors of the selected roads; Indicates The permanent functionality of the selected road; Obtain several neighboring roads of each road to be selected, obtain the pedestrian flow on the neighboring roads, and calculate the flow factor of the road to be selected based on the pedestrian flow, including: Obtain the hourly passenger flow on the selected road and its neighboring roads from 8 a.m. to 10 p.m. every day, calculate the average daily flow rate per unit time, and the maximum passenger flow per hour per day. The corresponding calculation formula is: ; in, Indicates The flow factor of the selected roads; Indicates Roads to choose from; Indicates The number of neighboring roads around the road to be selected; Indicates adjacent roads; Indicates The maximum passenger flow of the selected roads in a single hour per day; Indicates The daily flow of people per unit time on the selected roads; Indicates The maximum daily hourly flow of people on the adjacent roads; Indicates The daily flow of people per unit time on the adjacent roads; The loss function is calculated based on each candidate road and its neighboring roads, and a set of feature numbers corresponding to the minimum loss function is obtained and grouped to obtain the optimal prediction input features, including: The Euclidean norm is calculated based on the difference between the balance factor and the flow factor of any two candidate roads, and k-means clustering is performed on all candidate roads to obtain k clusters, and a reference classification result is obtained based on the balance factor and the flow factor; Obtain a prediction model, obtain several sub-classifiers based on a neural network to distinguish k different road clusters, define the roads to be selected, obtain T multi-dimensional features, set the prediction model to have E feature inputs, and , randomly combine T multidimensional features into several E feature input groups; Through several sub-classifiers and different feature input groups, the classification results corresponding to each feature input group are obtained. Each classification result is k different road clusters, which are compared with the reference classification results. The feature input group corresponding to the minimum loss is the optimal prediction input feature.
2. The method for predicting the flow of people on urban roads according to claim 1, characterized in that: Real-time monitoring of data information for each road to be selected, including: The pedestrian flow on each road to be selected is monitored in real time through road cameras and / or sensors, and the POI data is used to obtain the number and type of all shops on each road to be selected. Based on big data, the pedestrian flow data and traffic flow data of each road to be selected within a year in history are obtained.
3. The method for predicting the flow of pedestrians on urban roads according to claim 1, characterized in that: Based on the optimal prediction input features, the passenger flow of the selected road is predicted, including: A random forest regressor is generated based on the optimal prediction input features, and the training set samples are used to train the random forest regressor. The validation set samples are used to evaluate the performance of the random forest regressor. The optimal prediction input features of the candidate road on the prediction date are input into the trained random forest regressor to obtain the passenger flow prediction result of the candidate road on the prediction date.
4. A system for predicting pedestrian flow on urban roads, characterized in that: The steps for implementing the urban road pedestrian flow prediction method according to any one of claims 1 to 3 specifically include the following modules: The acquisition module is used to obtain a number of roads to be selected and monitor the data information of each road to be selected in real time; The analysis module is used to: train a neural network according to data information to obtain the supporting maturity of each road to be selected, evaluate the diversion ratio of each road to be selected based on the data information, calculate the directional flow factor and permanent functionality of each road to be selected in combination with the supporting maturity, and obtain the balance flow factor of the road to be selected through the directional flow factor and the permanent functionality; The auxiliary module is used to obtain a number of neighboring roads of each road to be selected, obtain the flow of people on the neighboring roads, and calculate the flow factor of the road to be selected based on the flow of people; A processing module is used to: calculate a loss function based on each road to be selected and the neighboring roads, obtain a set of feature numbers corresponding to the minimum point of the loss function, and obtain the optimal prediction input feature; The prediction module is used to predict the passenger flow on the selected road based on the optimal prediction input features.
