Traffic generation prediction method and system based on RBF neural network model
Through the traffic generation prediction method based on the RBF neural network model, combined with the C-mean and K-mean clustering analysis, the prediction problem caused by insufficient fusion interaction between factors in the existing technology is solved, and simple, fast and accurate traffic is achieved. Generate quantity predictions reduce model complexity.
Patent Information
- Application Number
- CN202110333100.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-29
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-03-29
AI Technical Summary
The existing traffic generation prediction model cannot fully consider the mutual integration and combination of various influencing factors, resulting in inaccurate prediction results and complex modeling process, making it difficult to operate in practice.
The traffic generation prediction method based on the RBF neural network model is adopted to obtain the coordinate data of the starting and ending points of residents' travel, divide the traffic cells, and build the prediction model using the RBF neural network, combining the C-mean and K-mean clustering analysis to simplify the Model construction process to improve prediction accuracy.
It realizes simple, fast and accurate traffic generation volume prediction, reduces the complexity of model calculation, improves prediction efficiency and accuracy, and can fully reflect the fusion interaction and combination effects between different elements.
Smart Images

Figure CN113011512B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent transportation technology, and in particular to a traffic generation prediction method and system based on an RBF (Radical Basis Function) neural network model. Background Art
[0002] Traffic generation forecasting is to establish a traffic demand forecasting model through comprehensive analysis of the socio-economic characteristics of urban areas, land use patterns, and individual and family attributes of residents, so as to predict traffic demand. The traffic generation forecasting model can accurately predict the future traffic generation of the target area, which can be conducive to correct macro-decision-making on transportation, formulation of transportation development strategies, preparation of transportation plans, and formulation of road feasibility studies. The accuracy of the traffic demand forecasting model directly determines the effect of future traffic generation forecasting. There are many factors that affect traffic generation, and the relationship between each factor is complex. How to fully explore the relationship between each influencing factor and establish a high-precision traffic demand forecasting model that can include multiple influencing factors is the key to realizing traffic generation forecasting, which is very necessary for transportation planning.
[0003] At present, the common models of traffic generation prediction modeling include, from simple to complex, generation rate model, category generation rate model, regression analysis model, and category regression analysis model. Different models are applicable to different scenarios. The specific model to be applied is usually selected based on the land use form and socio-economic characteristics of the target area. However, the above-mentioned traditional prediction models are all aggregate models formed based on a simple overall attribute of the region. The essential mechanism of community traffic generation is formed under the fusion, interaction and combination of multiple factors. The aggregate model formed by a simple overall attribute cannot reflect the fusion, interaction and combination of various factors. Therefore, the direct use of the above-mentioned traditional prediction models will lead to a large difference between the prediction results and the actual values, which cannot meet the needs of practical applications.
[0004] Although discrete models such as random effect models and mixed simulation models can solve the above-mentioned aggregate model prediction problems to a certain extent, this type of discrete model has high requirements for mathematical derivation and needs to be calculated through model assumptions and mathematical model derivation. In addition, there are multiple prediction values in the prediction, which makes the modeling process complicated. There are still problems such as unsatisfactory prediction result accuracy and inconvenience in actual operation.
[0005] In summary, in the existing technologies for traffic generation prediction, either only one type of influencing factors is considered one-sidedly, without comprehensively considering the mutual fusion and combination of various influencing factors, or the modeling process is complicated and the calculation requirements are too high, making it difficult to operate in practice. Therefore, it is urgent to provide a traffic generation prediction method that can consider the mutual fusion and combination of various influencing factors, solve the problems of traditional prediction aggregation models considering a single influencing factor and inaccurate prediction results, and at the same time reduce the complexity of model calculation, improve the model prediction accuracy and reduce the complexity of modeling. Summary of the invention
[0006] The technical problem to be solved by the present invention is: in view of the technical problems existing in the prior art, the present invention provides a traffic generation prediction method and system based on the RBF neural network model with simple implementation method, low complexity, high prediction efficiency and accuracy.
[0007] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0008] A traffic generation prediction method based on an RBF neural network model comprises the following steps:
[0009] Step S01. Data acquisition: obtaining the coordinate data of the starting and ending points of residents' trips within a specified time period in the area to be predicted;
[0010] Step S02. Traffic zone division: cluster analysis is performed on the location coordinate data of the starting and ending points of residents' travel obtained in step S01, and the area to be predicted is divided into traffic zones based on the clustering results;
[0011] Step S03. Prediction model construction: using RBF neural network to establish a traffic generation prediction model for predicting the traffic generation volume of the traffic zone;
[0012] Step S04. Prediction model training: obtaining the traffic generation influencing parameter data and traffic generation volume of each of the traffic zones, and using the obtained data as training samples to train the traffic generation prediction model to obtain a trained traffic generation prediction model;
[0013] Step S05. Traffic generation prediction: input the traffic generation influencing parameter data and traffic generation amount of the traffic zone to be predicted into the trained traffic generation prediction model to obtain the prediction result output of the traffic generation amount of the traffic zone to be predicted.
[0014] Furthermore, the steps of step S01 include:
[0015] Step S101. Traffic data acquisition: acquiring residents' traffic travel data within a specified time period in the area to be predicted, wherein the residents' traffic travel data includes vehicle location identification data and residents' public transportation entry and exit data;
[0016] Step S102. Coordinate data conversion: converting the acquired resident transportation travel data into the coordinate data of the starting and ending points of the resident travel.
[0017] Furthermore, the steps of step S02 include:
[0018] Step S201. Preliminary division: Perform preliminary division of the traffic cells based on the C mean value for the data obtained in step S01, and compare the corresponding division coefficients S when dividing different numbers of cells c, and obtain the number of divided cells c corresponding to the minimum division coefficient S and the center coordinates ci of each cell as initial parameters;
[0019] Step S202. Cluster analysis: Perform K-means cluster analysis on the data obtained in step S01 using the initial parameters, i.e., use the number of cells c and the cell center ci obtained by C-means clustering as the number of cells for K-means cluster analysis and the initialization center of the cell cluster, and cyclically update the center of each cell. When the difference between the cost function J calculated by two adjacent cycles is less than a given threshold e, the current cluster analysis is completed to obtain the final number of divided cells and the center of the cell;
[0020] Step S203. Boundary generation: Divide each traffic cell according to the number of cells and cell center points finally divided in step S202, and generate the boundary of each traffic cell accordingly.
[0021] Furthermore, the steps of step S201 include:
[0022] Step S211. Use the distance from the center of each traffic zone to each origin and destination sample to randomly generate an origin and destination membership matrix U, each origin and destination sample corresponds to an origin and destination position coordinate data, and the origin and destination membership matrix U includes the membership degree of each origin and destination sample belonging to the traffic zone;
[0023] Step S212. Calculate the center of each traffic zone according to the membership degree of each starting and ending point sample belonging to each traffic zone;
[0024] Step S213. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1) If the absolute value of the difference between the two values is less than the given threshold value e, go to step S215, otherwise go to step S214;
[0025] Step S214. Calculate the starting and ending point membership matrix U;
[0026] Step S215. Divide the traffic zone according to the currently calculated membership matrix U, wherein if the membership degree of the origin and destination sample i belonging to the traffic zone j reaches the maximum, the origin and destination sample i is divided into the traffic zone j, and the preliminary division of the traffic zone is completed;
[0027] Step S216. Calculate the division coefficient S, compare the size of the division coefficient S when taking different numbers of divided cells, and select the number of divided cells c corresponding to the smallest division coefficient S. c And the center coordinates c of each traffic zone i as the initial parameter.
[0028] Furthermore, the origin and destination point membership matrix U is generated specifically according to the following formula:
[0029] U=(u ij )c×n
[0030]
[0031] Among them, u ij represents the membership degree of the origin and destination sample j to the traffic zone i, c represents the number of the traffic zones, n represents the number of origin and destination samples, m is the fuzzy clustering index, represents the Euclidean distance from the center of traffic zone i to the origin and destination sample j;
[0032] In step S212, the center ci of the traffic zone i is calculated specifically according to the following formula:
[0033]
[0034] Among them, x j are the coordinates of the starting and ending points of sample j;
[0035] The calculation expression of the cost function J in step S213 is:
[0036]
[0037] The division coefficient calculation expression in step S216 is:
[0038]
[0039] Among them, d ij Indicates the distance from the starting and ending point sample i to the center of cell j, n j is the number of starting and ending points in the jth cell, R j represents the average radius of the jth cell, n is the number of all starting and ending points; p ij represents the distance between the center of cell i and the center of cell j, R outRepresents the sum of the distances between all cell centers, R in Indicates R j The community is weighted averaged by traffic volume.
[0040] Furthermore, the steps of step S202 include:
[0041] S221. According to the initial parameters, the number of traffic cells is set to c c The initial center of each traffic zone is c i , again performing K-means clustering on all n starting and ending point samples in the data obtained in step S01, each of the starting and ending point samples corresponds to a starting and ending point position coordinate data;
[0042] S222. According to each starting and ending point sample and the center c of each traffic zone i The distance between them is used to determine the traffic zone to which each origin and destination sample belongs;
[0043] S223. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1) The absolute value of the difference between the values is less than the given threshold e, and clustering is completed, and c is obtained. c The clustering result of the traffic zone is obtained, otherwise, go to step S224;
[0044] S224. Update traffic community center c i , return to execute step S222.
[0045] Furthermore, when the traffic generation prediction model is established in step S03, the connection weight w between each unit of the input layer and each unit of the hidden layer in the RBF neural network is specifically configured to be 1, and the connection weight w between each unit of the hidden layer is configured to be i And each unit L of the output layer j The connection weight vector W j , the radial function in the hidden layer adopts the Gaussian function T k (B), the output layer action function is a summation function; the traffic generation influencing parameter data is obtained and clustered after normalization, and the centers of the clustered M clusters are used as the data centers of the M hidden layer units.
[0046] Furthermore, when training the traffic generation prediction model in step S04, the connection weights of each unit of the hidden layer and the output layer are updated using LMS (Least mean square) learning rule.
[0047] Furthermore, step S04 includes:
[0048] Step S401. Select and input the traffic generation influencing parameter data and traffic generation volume of each traffic zone as training samples;
[0049] Step S402: Initialize the connection weights between the layers, the connection weights between the units of the input layer and the hidden layer to 1, and configure the connection weights between the units of the hidden layer and the units of the output layer to obtain the predicted value of traffic generation;
[0050] Step S403. Calculate the error between the predicted value of traffic generation and the actual predicted value. If the error is less than the specified target e, go to step S405; otherwise, go to step S404.
[0051] Step S404: Calculate the adjustment value ΔW of the weight vector using the LMS learning rule j , and update the connection weights of each unit in the hidden layer and each unit in the output layer as follows:
[0052] W j (n) = W j (n-1)+ΔW j
[0053] The adjustment amount of the weight vector can be expressed as:
[0054]
[0055] Among them, W j (n) is the updated connection weight, W j (n-1) is the connection weight before updating, n is the number of iterations, dj is the expected output, B is the input vector, and η is the learning constant;
[0056] After updating, go to step S403;
[0057] S405. Determine whether all training samples are currently trained completely. If the model training is completed, output all determined RBF neural network model weights to obtain the trained traffic generation prediction model.
[0058] A traffic generation prediction system based on an RBF neural network model comprises a processor and a memory, wherein the memory is used to store a computer program, the processor is used to execute the computer program, and the processor is used to execute the computer program to perform the above method.
[0059] Compared with the prior art, the advantages of the present invention are:
[0060] 1. The present invention performs cluster analysis by acquiring the coordinate data of the starting and ending points of residents' travel, and divides the communities by using the similarity of residents' travel characteristics. The data acquisition and processing as well as the community division are simple to implement, and can fully consider the characteristics of residents' travel to achieve reasonable community division, break through the restrictions of administrative divisions, and make the size and scope of community division more appropriate, thereby helping to improve the accuracy of traffic demand forecasting.
[0061] 2. The present invention considers the impact of the fusion interaction and combination of multiple factors such as regional factors and personal attribute characteristics on the traffic generation volume, and constructs a traffic generation prediction model by using an RBF neural network. The RBF neural network model can fully reflect the impact of the fusion interaction and combination of different factors. At the same time, in the process of constructing the prediction model based on the RBF neural network model, there is no need for complex mathematical derivation and prediction value assumptions. The RBF neural network using input and output data can be automatically established, which can effectively improve the efficiency of community traffic generation prediction and ensure the prediction accuracy.
[0062] 3. When the present invention constructs a traffic generation prediction model based on the RBF neural network, the LMS learning rule is used to calibrate the connection weights of each unit in the hidden layer and the output layer. There is no need to derive the activation function. Not only is the learning speed fast, but the accuracy is also high. It can take into account both the efficiency and accuracy of the prediction, thereby being able to achieve rapid and accurate prediction of the traffic generation in a community while considering multiple factors that interact and affect traffic generation.
[0063] 4. When dividing traffic zones, the present invention further uses a clustering analysis method that combines C-means with K-means. By first performing a rapid initial division based on the C-means, determining the initial parameters, and then performing clustering analysis using the K-means, the efficiency and accuracy of clustering can be taken into account. This allows the traffic zones to be divided quickly and reasonably, taking full account of the travel characteristics of residents, thereby further improving the accuracy of the prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a flow chart of the traffic generation prediction method based on the RBF neural network model in this embodiment.
[0065] Figure 2 It is a detailed flow chart of realizing traffic generation prediction in a specific application embodiment of the present invention.
[0066] Figure 3 It is a schematic diagram of the implementation process of implementing the traffic zone division in step S2 in this embodiment.
[0067] Figure 4 This is a flowchart for implementing RBF neural network model training and predicting community traffic volume in this embodiment. DETAILED DESCRIPTION
[0068] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0069] like Figure 1 As shown, the steps of the traffic generation prediction method based on the RBF neural network model in this embodiment include:
[0070] Step S01. Data acquisition: obtaining the starting and ending point location coordinate data of residents' travel within the specified time period in the area to be predicted, including the starting point location coordinate data and the ending point location coordinate data;
[0071] Step S02. Traffic zone division: cluster analysis is performed on the location coordinate data of the starting and ending points of residents' travel obtained in step S01, and the area to be predicted is divided into traffic zones based on the clustering results;
[0072] Step S03. Prediction model construction: using RBF neural network to establish a traffic generation prediction model for predicting the traffic generation volume of the traffic zone;
[0073] Step S04. Prediction model training: obtaining the traffic generation influencing parameter data and traffic generation volume of each traffic zone, and using the obtained data as training samples to train the traffic generation prediction model to obtain a trained traffic generation prediction model;
[0074] Step S05. Traffic generation prediction: input the traffic generation influencing parameter data and traffic generation amount of the traffic zone to be predicted into the trained traffic generation prediction model to obtain the prediction result output of the traffic generation amount of the traffic zone to be predicted.
[0075] Considering that residents' travel in the same area has the following characteristics: there are similarities between the starting and ending points of residents' travel, and some stations in urban rail transit are usually located at the edge or boundary of the community. This embodiment obtains the location coordinate data of the starting and ending points of residents' travel to perform cluster analysis, and divides the community using the similarity of residents' travel characteristics. Data acquisition and processing and community division are simple to implement, and can fully consider the characteristics of residents' travel to achieve reasonable community division, break through the restrictions of administrative divisions, and make the size and scope of community division more appropriate, thereby helping to improve the accuracy of traffic demand prediction.
[0076] RBF neural network can fully tap the mutual relationship between input data by using network structure, and the structure of RBF neural network is simple, consisting of three layers (input layer, output layer and hidden layer). The number of units in the hidden layer can be determined according to the characteristics of input data, without artificial definition, and the connection weight calibration between units is simple to implement, so the construction of RBF neural network model is relatively simple. This embodiment uses the above characteristics of RBF neural network. After dividing the traffic community, the fusion interaction and combination of multiple factors such as regional factors and personal attribute characteristics are considered to affect the traffic generation. By using RBF neural network to build a traffic generation prediction model, the RBF neural network model can fully reflect the influence of the fusion interaction and combination of different factors. At the same time, in the process of building the prediction model based on the RBF neural network model, there is no need for complex mathematical derivation and prediction value assumption. The RBF neural network using input and output data can be automatically established, which can effectively improve the efficiency of community traffic generation prediction and ensure the prediction accuracy.
[0077] In this embodiment, step S01 includes:
[0078] Step S101. Traffic data acquisition: Acquire the residents' traffic travel data within the specified time period in the area to be predicted, and the residents' traffic travel data includes vehicle location identification data and residents' public transportation entry and exit data;
[0079] Step S102. Coordinate data conversion: convert the acquired residents' transportation travel data into the coordinate data of the starting and ending points of the residents' travel.
[0080] In a specific application embodiment, Figure 2 As shown, the above vehicle location identification data specifically refers to vehicle license plate identification checkpoint data, i.e., vehicle license plate data identified at each checkpoint, and public transportation data specifically includes subway IC card data, bus IC card data, etc., and various types of data that can reflect the starting and ending points of residents' travel can be selected according to actual needs. After screening and preprocessing the vehicle location identification data, public transportation data, etc., they are converted into the coordinates of the starting and ending points of residents' travel for cluster analysis, so as to divide the communities by using the similarity of residents' travel characteristics.
[0081] In a specific application embodiment, the vehicle license plate recognition checkpoint data and subway IC card data within a specified time period are first collected as the original data of the coordinates of the starting and ending points of residents' travel, and after screening and pre-processing, they are converted into the coordinates of the starting and ending points of residents' travel. For example, for the vehicle license plate recognition checkpoint data, the time period for obtaining the vehicle license plate recognition checkpoint data every day is 6:00 am to 11:00 pm. In the obtained vehicle license plate recognition checkpoint data, the time, license plate number, and geographical coordinates of each vehicle passing through the vehicle recognition checkpoint are screened out; for the subway IC card data, the time period for obtaining the subway IC data every day is 7:00 am to 11:00 pm; in the obtained subway IC card data, the number of entry card swiping records at each subway entrance, the number of card swiping records at the exit, and the station ID number to which they belong are screened out.
[0082] In a specific application embodiment, when converting traffic data into resident starting and ending point coordinate data, for example, for vehicle license plate recognition checkpoint data, the geographic coordinates of the vehicle license plate recognition checkpoint that records the vehicle license plate at the earliest time can be used as a starting point coordinate, and the vehicle license plate recognition checkpoint that records the vehicle license plate for the last time can be used as an ending point coordinate, or the time interval from the vehicle to the next vehicle license plate recognition checkpoint exceeds the time required for the vehicle to go from the previous vehicle license plate recognition checkpoint to the next vehicle license plate recognition checkpoint plus a specified time (such as 2 hours), then the geographic coordinates of the previous vehicle license plate recognition checkpoint are considered to be an ending point coordinate of the vehicle. For subway IC data, each subway station corresponds to a geographic coordinate on the map. During the survey period, the number of all entry records for each subway station is n, so n starting point coordinates corresponding to the geographic coordinates of the subway station can be obtained, and the number of all exit records for each subway station is h, so h ending point coordinates corresponding to the geographic coordinates of the subway station can be obtained.
[0083] like Figure 3 As shown, the steps of step S02 in this embodiment include:
[0084] Step S201. Preliminary division: Perform preliminary division of traffic cells based on the C mean value for the data obtained in step S01, and compare the corresponding division coefficients S when dividing different numbers of cells c, and obtain the number of divided cells c corresponding to the minimum division coefficient S and the center coordinates ci of each cell as initial parameters;
[0085] Step S202. Cluster analysis: Perform K-means cluster analysis on the data obtained in step S01 using the initial parameters, i.e., use the number of cells c and the cell center ci obtained by C-means clustering as the number of cells for K-means cluster analysis and the initialization center of the cell cluster, and cyclically update the center of each cell. When the difference between the cost function J calculated in two adjacent cycles is less than a given threshold e, the current cluster analysis is completed to obtain the final number of divided cells and the center of the cell;
[0086] Step S203. Boundary generation: Divide each traffic zone according to the number of zones and the center points of the zones finally divided in step S202, and generate the boundary of each traffic zone accordingly.
[0087] This embodiment first performs a preliminary division of traffic cells based on the C-means, compares the sizes of the division coefficients S for different numbers of cells c, selects the number of cells corresponding to the smallest appropriate division coefficient S and the coordinates ci of the center of each cell as the initial parameters of the clustering analysis in the next stage; then performs a K-means clustering analysis, uses the number of cells c and the cell center ci obtained by C-means clustering as the number of cells for K-means clustering analysis and the initialization center point of the cell clustering, updates the center of each cell at each step, and stops clustering when the difference in the cost function J calculated by two adjacent cycles is less than a given threshold e, and obtains the final number of divided cells and the center point of the cell; then generates boundaries for the determined cells.
[0088] In the above-mentioned traffic zone division, the clustering analysis method combining C-means and K-means is used. By first performing a quick initial division based on the C-means, determining the initial parameters, and then using the K-means for clustering analysis, both the efficiency and accuracy of clustering can be taken into account, thereby being able to fully consider the travel characteristics of residents and quickly and reasonably divide the traffic zones, thereby further improving the accuracy of the prediction.
[0089] In a specific application embodiment, after clustering is completed, the step of generating the boundary in step S203 is as follows: firstly, all the starting and ending points obtained by clustering are positioned on the map through deviation correction, and each type of clustered starting and ending points are marked with different colors on the map, and the map is enlarged to the road level, and the dividing line segments of the starting and ending points of different colors are selected as the boundaries of the traffic zone, so as to ensure that the boundary lines of the divided zones are not separated, and the work of zone division is completed. Of course, the boundaries of the traffic zones can also be directly generated using Gis software.
[0090] In this embodiment, step S201 includes:
[0091] Step S211. Use the distance from each traffic zone center to each origin and destination sample to randomly generate an origin and destination membership matrix U, each origin and destination sample corresponds to an origin and destination position coordinate data, and the origin and destination membership matrix U includes the membership degree of each origin and destination sample belonging to the traffic zone;
[0092] Step S212. Calculate the center of each traffic zone according to the membership degree of each origin and destination point sample belonging to each traffic zone;
[0093] Step S213. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1)If the absolute value of the difference between the two values is less than the given threshold value e, go to step S215, otherwise go to step S214;
[0094] Step S214. Calculate the starting and ending point membership matrix U;
[0095] Step S215. Divide the traffic zone according to the currently calculated membership matrix U, wherein if the membership degree of the origin and destination sample i belonging to the traffic zone j reaches the maximum, the origin and destination sample i is divided into the traffic zone j, and the preliminary division of the traffic zone is completed;
[0096] Step S216. Calculate the division coefficient S, compare the size of the division coefficient S when taking different numbers of divided cells, and select the number of divided cells c corresponding to the smallest division coefficient S. c And the center coordinates c of each traffic zone i as initial parameters.
[0097] When the origin and destination point membership matrix U is randomly initially generated in the above step S211, all origin and destination point coordinate samples must satisfy:
[0098]
[0099] The specific expression for generating the origin and destination point membership matrix U in step S211 and step S214 is:
[0100] U = (u ij )c×n (2)
[0101]
[0102] Among them, u ij represents the membership degree of the origin and destination sample j to the traffic zone i, c represents the number of traffic zones, n represents the number of origin and destination samples, m is the fuzzy clustering index, represents the Euclidean distance from the center of traffic zone i to the origin and destination sample j;
[0103] In step S212, the center ci of the traffic zone i is calculated specifically according to the following formula:
[0104]
[0105] Among them, x j are the coordinates of the starting and ending points of sample j;
[0106] The calculation expression of the cost function J in step S213 is:
[0107]
[0108] The division coefficient calculation expression in step S216 is:
[0109]
[0110] Among them, d ij Indicates the distance from the starting and ending point sample i to the center of cell j, n j is the number of starting and ending points in the jth cell, R j represents the average radius of the jth cell, n is the number of all starting and ending points; p ij represents the distance between the center of cell i and the center of cell j, R out Represents the sum of the distances between all cell centers, R in Indicates R j The community is weighted averaged by traffic volume.
[0111] In this embodiment, the specific steps of step S202 include:
[0112] S221. According to the initial parameters, the number of traffic zones is set to c c The initial center of each traffic zone is c i , again performing K-means clustering on all n starting and ending point samples in the data obtained in step S01, each starting and ending point sample corresponds to a starting and ending point position coordinate data;
[0113] S222. According to each starting and ending point sample and the center c of each traffic zone i The distance between them is used to determine the traffic zone to which each origin and destination sample belongs;
[0114] S223. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1) The absolute value of the difference between the values is less than the given threshold e, and clustering is completed, and c is obtained. c The clustering result of the traffic zone is obtained, otherwise, go to step S224;
[0115] S224. Update traffic community center c i , return to execute step S222.
[0116] In the above step S222, the indicator r can be used specifically ij , determine the traffic zone to which each origin and destination sample belongs, where if origin and destination sample i belongs to traffic zone j, then r ij Take 1, otherwise take 0;
[0117]
[0118] In the above step S223, the expression for calculating the cost function J is specifically:
[0119] The number of units in the hidden layer of the RBF neural network is determined according to the characteristics of the input data, and does not need to be manually defined. The connection weights between the input layer and the hidden layer units can all be set to 1. It is only necessary to calibrate the connection weights of the hidden layer and the output layer units, so it is relatively simple to calibrate the weights of the RBF neural network. Therefore, when building a traffic generation prediction model based on the RBF neural network, there is no need for complex mathematical derivation. Under the condition that the error is allowed, after training the data samples, the traffic generation prediction model can be directly obtained.
[0120] This embodiment uses an RBF neural network to construct a traffic generation prediction model to predict the traffic generation volume of a community. When using the RBF neural network to build the model, the LMS learning rule is used to calibrate the connection weights of each unit in the hidden layer and the output layer. The LMS learning rule is to minimize the square difference between the actual output of the neuron and the expected output. There is no need to derive the activation function. Not only is the learning speed fast, but the accuracy is also high. It can take into account both the efficiency and accuracy of the prediction, so that it can achieve fast and accurate prediction of the traffic generation volume of the community while considering multiple factors that interact with each other and affect traffic generation.
[0121] In this embodiment, when the traffic generation prediction model is established in step S03, the connection weight w between each unit of the input layer and each unit of the hidden layer in the RBF neural network is configured to be 1, and the connection weight w between each unit of the hidden layer is configured to be i And each unit L of the output layer j The connection weight vector W j , the number of input units is 12, the number of output units is 2 (basic travel volume and non-basic travel volume); the radial function in the hidden layer adopts Gaussian function Tk(B):
[0122]
[0123] Where: B is the input vector; r k is the center of the hidden layer unit; ||B-r k || is the vector B-r k The norm of k is the kth perceived variable, d max is the maximum distance between the selected data centers, and M is the number of data centers.
[0124] The output layer action function is specifically a summation function:
[0125]
[0126] Among them, N represents the number of units in the output layer, and y represents the output value.
[0127] And obtain the traffic generation influencing parameter data and cluster them after normalization, and use the centers of the clustered M clusters as the data centers of the M hidden layer units.
[0128] The above normalization can be specifically expressed as follows:
[0129]
[0130] Among them, Bi represents the original value of factor i before normalization, Bmax and Bmin represent the maximum and minimum values of each factor respectively; represents the value of factor i after normalization.
[0131] In a specific application embodiment, K-means clustering is performed on the normalized influencing parameter data, a self-organizing selection is performed on the data center rk, and then the centers of the clustered M clusters are used as the data centers of the M hidden layer units.
[0132] The RBF neural network model constructed through the above steps is the traffic generation prediction model.
[0133] In this embodiment, the LMS learning rule is used to update the connection weights of each unit in the hidden layer and the output layer when training the traffic generation prediction model. Figure 4 As shown, the specific steps of step S04 in this embodiment include:
[0134] Step S401. Select and input the traffic generation influencing parameter data and traffic generation volume of each traffic zone as training samples;
[0135] Step S402: Initialize the connection weights between the layers, the connection weights between the units of the input layer and the hidden layer to 1, and configure the connection weights between the units of the hidden layer and the units of the output layer to obtain the predicted value of traffic generation;
[0136] Step S403. Calculate the error between the traffic generation prediction value and the actual prediction value. If the error is less than the specified target e, go to step S405, otherwise go to step S404;
[0137] Step S404: Calculate the adjustment value ΔW of the weight vector using the LMS learning rule j , and update the connection weights of each unit in the hidden layer and each unit in the output layer as follows:
[0138] W j (n) = W j (n-1)+ΔW j (16)
[0139] The adjustment amount of the weight vector can be expressed as:
[0140]
[0141] Among them, W j (n) is the updated connection weight, W j (n-1) is the connection weight before update, n is the number of iterations, d j represents the expected output, B represents the input vector, and η represents the learning constant;
[0142] After updating, go to step S403;
[0143] S405. Determine whether all training samples are currently trained completely. If the model training is completed, output the weights of all determined RBF neural network models to obtain a trained traffic generation prediction model.
[0144] In the above step S401, the connection weights between each unit of the hidden layer and each unit of the output layer may be any value in the interval [0.00001, 0.99999], which may be configured according to actual needs.
[0145] The error value in the above step S403 may specifically be the absolute mean error MAPE, and the calculation expression may specifically be:
[0146]
[0147] Among them, X i The predicted value of traffic generation, Y i Represents the actual predicted value of traffic generation.
[0148] After completing the above model training, the traffic impact parameter data of the community to be predicted is input into the trained RBF neural network model for calculation, and the predicted result of the traffic generation in the area can be obtained.
[0149] When the present invention realizes traffic generation prediction in a specific application embodiment, Figure 2As shown in the figure, firstly, the vehicle license plate recognition checkpoint data, subway IC card data and other data within the specified time are collected, screened and preprocessed, and converted into the coordinates of the residents' travel starting and ending points; the cluster analysis method combining K-means and C-means clustering is used to cluster all the starting and ending points to determine the number of traffic subdivisions and the subdivision boundaries; the influencing factors of subdistrict traffic generation are determined, and after preprocessing the data required for traffic generation, the RBF neural network model for predicting traffic generation is established to form a traffic generation prediction model, and the traffic generation influencing parameter data and traffic generation of each subdistrict are input as training samples, and the weight calibration of the RBF neural network model is completed using the LMS learning rule, and the traffic generation influencing parameter data and traffic generation of the subdistrict to be predicted are input into the trained RBF neural network model, and the prediction results of the traffic generation in the area can be obtained. The above prediction process can comprehensively consider the influence of the fusion interaction and combination of multiple factors, and does not require mathematical derivation and prediction value assumptions, which can improve the accuracy and efficiency of future subdistrict traffic generation prediction.
[0150] In another embodiment, the present invention also includes a traffic generation prediction system based on an RBF neural network model, including a processor and a memory, the memory being used to store a computer program, the processor being used to execute the computer program, and the processor being used to execute the computer program to execute the above-mentioned traffic generation prediction method based on the RBF neural network model.
[0151] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A traffic generation prediction method based on RBF neural network model, characterized in that the steps include: Step S01. Data acquisition: obtaining the coordinate data of the starting and ending points of residents' trips within a specified time period in the area to be predicted; Step S02. Traffic zone division: cluster analysis is performed on the location coordinate data of the starting and ending points of residents' travel obtained in step S01, and the area to be predicted is divided into traffic zones based on the clustering results; Step S03. Prediction model construction: using RBF neural network to establish a traffic generation prediction model for predicting the traffic generation volume of the traffic zone; Step S04. Prediction model training: obtaining the traffic generation influencing parameter data and traffic generation amount of each of the traffic zones, and using the obtained data as training samples to train the traffic generation prediction model to obtain a trained traffic generation prediction model, wherein the traffic generation influencing parameter data includes the population of the traffic zone and the number of personal motor vehicles owned; Step S05. Traffic generation prediction: input the traffic generation influencing parameter data and traffic generation amount of the traffic zone to be predicted into the trained traffic generation prediction model to obtain the prediction result output of the traffic generation amount of the traffic zone to be predicted; The steps of step S02 include: Step S201. Preliminary division: Perform preliminary division of the traffic cells based on the C mean value for the data obtained in step S01, and compare the corresponding division coefficients S when dividing different numbers of cells c, and obtain the number of divided cells c corresponding to the minimum division coefficient S and the center coordinates ci of each cell as initial parameters; Step S202. Cluster analysis: Perform K-means cluster analysis on the data obtained in step S01 using the initial parameters, i.e., use the number of cells c and the cell center ci obtained by C-means clustering as the number of cells for K-means cluster analysis and the initialization center of the cell cluster, and cyclically update the center of each cell. When the difference between the cost function J calculated by two adjacent cycles is less than a given threshold e, the current cluster analysis is completed to obtain the final number of divided cells and the center of the cell; Step S203. Boundary generation: dividing each traffic cell according to the number of cells and cell center points finally divided in step S202, and generating the boundary of each traffic cell accordingly; The steps of step S201 include: Step S211. Use the distance from the center of each traffic zone to each origin and destination sample to randomly generate an origin and destination membership matrix U, each origin and destination sample corresponds to an origin and destination position coordinate data, and the origin and destination membership matrix U includes the membership degree of each origin and destination sample belonging to the traffic zone; Step S212. Calculate the center of each traffic zone according to the membership degree of each starting and ending point sample belonging to each traffic zone; Step S213. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1) If the absolute value of the difference between the two values is less than the given threshold value e, go to step S215, otherwise go to step S214; Step S214. Calculate the starting and ending point membership matrix U; Step S215. Divide the traffic zone according to the currently calculated membership matrix U, wherein if the membership degree of the origin and destination sample i belonging to the traffic zone j reaches the maximum, the origin and destination sample i is divided into the traffic zone j, and the preliminary division of the traffic zone is completed; Step S216. Calculate the division coefficient S, compare the size of the division coefficient S when taking different numbers of division cells, and select the number of division cells c corresponding to the smallest division coefficient S. c And the center coordinates c of each traffic zone i as the initial parameter; The steps of step S04 include: Step S401. Select and input the traffic generation influencing parameter data and traffic generation volume of each traffic zone as training samples; Step S402: Initialize the connection weights between the layers, the connection weights between the units of the input layer and the hidden layer to 1, and configure the connection weights between the units of the hidden layer and the units of the output layer to obtain the predicted value of traffic generation; Step S403. Calculate the error between the predicted value of traffic generation and the actual predicted value. If the error is less than the specified target e, go to step S405; otherwise, go to step S404. Step S404: Calculate the adjustment value ΔW of the weight vector using the LMS learning rule j , and update the connection weights of each unit in the hidden layer and each unit in the output layer as follows: IN j (n)=In j (n-1)+ΔW j The adjustment amount of the weight vector can be expressed as: Among them, W j (n) is the updated connection weight, W j (n-1) is the connection weight before update, n is the number of iterations, d j represents the expected output, B represents the input vector, and η represents the learning constant; After updating, go to step S403; S405. Determine whether all training samples are currently trained completely. If the model training is completed, output all determined RBF neural network model weights to obtain the trained traffic generation prediction model.
2. The traffic generation prediction method based on the RBF neural network model according to claim 1 is characterized in that: The steps of step S01 include: Step S101. Traffic data acquisition: acquiring residents' traffic travel data within a specified time period in the area to be predicted, wherein the residents' traffic travel data includes vehicle location identification data and residents' public transportation entry and exit data; Step S102. Coordinate data conversion: converting the acquired resident transportation travel data into the coordinate data of the starting and ending points of the resident travel.
3. The traffic generation prediction method based on the RBF neural network model according to claim 1 is characterized in that: Specifically, the origin and destination point membership matrix U is generated according to the following formula: U=(u ij )c×n Among them, u ij represents the membership degree of the origin and destination sample j to the traffic zone i, c represents the number of the traffic zones, n represents the number of origin and destination samples, m is the fuzzy clustering index, represents the Euclidean distance from the center of traffic zone i to the origin and destination sample j; In step S212, the center ci of the traffic zone i is calculated specifically according to the following formula: Among them, x j are the coordinates of the starting and ending points of sample j; The calculation expression of the cost function J in step S213 is: The division coefficient calculation expression in step S216 is: Among them, d ij Indicates the distance from the starting and ending point sample i to the center of cell j, n j is the number of starting and ending points in the jth cell, R j represents the average radius of the jth cell, n is the number of all starting and ending points; p ij represents the distance between the center of cell i and the center of cell j, R out Represents the sum of the distances between all cell centers, R in Indicates R j The community is weighted averaged by traffic volume.
4. The traffic generation prediction method based on the RBF neural network model according to any one of claims 1 to 3, characterized in that: The steps of step S202 include: S221. According to the initial parameters, the number of traffic cells is set to c c The initial center of each traffic zone is c i , again performing K-means clustering on all n starting and ending point samples in the data obtained in step S01, each of the starting and ending point samples corresponds to a starting and ending point position coordinate data; S222. According to each starting and ending point sample and the center c of each traffic zone i The distance between them is used to determine the traffic zone to which each origin and destination sample belongs; S223. Calculate the cost function J. If the cost function J calculated for the kth time (k) And the cost function J calculated for the k+1th time (K+1) The absolute value of the difference between the values is less than the given threshold e, and clustering is completed, and c is obtained. c The clustering result of the traffic zone is obtained, otherwise, go to step S224; S224. Update traffic community center c i , return to execute step S222.
5. The traffic generation prediction method based on the RBF neural network model according to any one of claims 1 to 3, characterized in that: When the traffic generation prediction model is established in step S03, the connection weight w between each unit of the input layer and each unit of the hidden layer in the RBF neural network is configured to be 1, and the connection weight w between each unit of the hidden layer is configured to be i And each unit L of the output layer j The connection weight vector W j , the radial function in the hidden layer adopts the Gaussian function T k (B), the output layer action function is a summation function; the traffic generation influencing parameter data is obtained and clustered after normalization, and the centers of the clustered M clusters are used as the data centers of the M hidden layer units.
6. The traffic generation prediction method based on the RBF neural network model according to any one of claims 1 to 3, characterized in that: When training the traffic generation prediction model in step S04, the connection weights of each unit of the hidden layer and the output layer are updated using the LMS learning rule.
7. A traffic generation prediction system based on an RBF neural network model, comprising a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program, characterized in that: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 6.
