A method for predicting road node traffic flow based on big data
By setting up a flow monitoring circle on urban roads and building a vehicle driving topology diagram, combined with a logistic regression model, first- and double predictions are realized, which solves the problem of inaccurate traffic prediction in the existing technology and improves the accuracy of prediction.
Patent Information
- Application Number
- CN202410345276.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2044-03-25
AI Technical Summary
In the prior art, the vehicle flow prediction method is single, resulting in inaccurate prediction results, lack of subsequent destination prediction methods based on the vehicle's driving trajectory, and cannot meet the needs of daily use.
By constructing a GIS view of urban roads, setting up a flow monitoring circle, real-time and historical vehicle flow are obtained, and the logistic regression model is used to build a vehicle flow prediction model, and combining the vehicle driving topology diagram, first and second predictions are performed, and the accuracy of vehicle flow is comprehensively judged to obtain a comprehensive predicted vehicle flow.
The accuracy of traffic forecasting at road nodes can be improved, and the daily use needs can be better met. Through the combination of multiple prediction methods, the accuracy of the prediction results can be improved.
Smart Images

Figure CN118522142B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of road prediction, and specifically, to a method for predicting road node traffic flow based on big data. Background Art
[0002] Traffic flow prediction is a method that uses historical traffic data and other relevant information to predict the vehicle flow at a specific intersection or section during a certain future time period. These methods can help relevant personnel understand and predict traffic conditions, thereby improving road utilization efficiency and reducing congestion; with the development of information technology, traffic flow prediction methods will become more accurate and practical;
[0003] In the prior art, most traffic flow predictions are based on historical data, that is, a single prediction method. This method will lead to inaccurate prediction results. Moreover, in the prior art, there is a lack of a prediction method for the subsequent destinations of vehicles based on their driving trajectories. If multiple prediction methods can be provided simultaneously and the prediction results of the two methods can be integrated, the accuracy of traffic flow prediction can be significantly improved, better meeting the needs of daily use. Therefore, the present invention provides a method for predicting road node traffic flow based on big data. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for predicting road node traffic flow based on big data.
[0005] The purpose of the present invention can be achieved through the following technical solutions: A method for predicting road node traffic flow based on big data, comprising the following steps:
[0006] Step S1: Collect the distribution information of urban roads, and construct a GIS viewable map of urban roads according to the collected distribution information;
[0007] Step S2: Set a traffic monitoring circle for each road node, and obtain the real-time traffic flow and historical traffic flow of the road node through the traffic monitoring circle;
[0008] Step S3: Obtain the traffic flow coefficient of the road node at different time periods according to the historical traffic flow, construct a traffic flow prediction model of the road node according to the traffic flow coefficient, and obtain the first predicted traffic flow of the road node in the current time period according to the constructed traffic flow prediction model;
[0009] Step S4: Obtain the driving data of all vehicles within the traffic monitoring circle, construct a driving topology map of the vehicles according to the driving data, predict the driving node and arrival time of the vehicles according to the constructed driving topology map, and further obtain the second predicted traffic flow of the road node;
[0010] Step S5: Determine the accuracy of the first predicted traffic flow and the second predicted traffic flow based on the real-time traffic flow, and obtain the comprehensive predicted traffic flow of the road node according to the accuracy of the two.
[0011] Further, the process of collecting the distribution information of urban roads and constructing the GIS viewable map of urban roads based on the collected distribution information includes:
[0012] Divide urban roads into road lines and road nodes. The road line refers to the section composed of one-way or two-way roads, with its two ends being the corresponding road nodes. The road node refers to the intersection where different road lines meet, and a road node belongs to at least two road lines;
[0013] The distribution information of the urban roads includes two parts, namely the line information of the road lines and the node information of the road nodes. Use GIS technology to construct the GIS viewable maps of the road lines and road nodes respectively based on the collected line information and node information, and then obtain the GIS viewable map of the urban roads. Relevant personnel can view the line information and node information of the urban roads through the constructed GIS viewable map of the urban roads.
[0014] Further, the process of setting up a traffic monitoring circle for each road node and obtaining the real-time traffic flow and historical traffic flow of the road node through the traffic monitoring circle includes:
[0015] In the constructed GIS viewable map, draw a circle with the geographical coordinates of the road node as the center and a preset distance R as the radius, and mark the obtained circular area as the traffic monitoring circle of the road node. Mark all the road lines included in the traffic monitoring circle as traffic monitoring sections. The traffic monitoring section only refers to the part included in the traffic monitoring circle and does not include the whole road line;
[0016] At least two traffic monitoring sections are included in one traffic monitoring circle. Collect the number of vehicles on each traffic monitoring section and mark the collected number of vehicles as the real-time traffic flow of the road node. Upload the obtained real-time traffic flow to the GIS viewable map for display. When a new real-time traffic flow appears, mark the original real-time traffic flow as the historical traffic flow, and record the corresponding collection time while obtaining the real-time traffic flow.
[0017] Further, the process of obtaining the traffic flow coefficient of the road node at different time periods based on the historical traffic flow includes:
[0018] Divide a day into several time periods with the same time interval for each period. Statistically analyze the historical traffic flow obtained on the same day for any time period, and use the mean value of the obtained historical traffic flow as the average traffic flow of the time period on the same day;
[0019] Statistically analyze the average traffic volume per day during this time period, evaluate the change in the obtained average traffic volume to obtain its corresponding degree of change, set a change threshold, compare the obtained degree of change with the set change threshold, mark the obtained average traffic volume as normal and abnormal according to the comparison result, and use the average value of all the average traffic volumes marked as normal as the traffic volume coefficient of this road node during this time period.
[0020] Furthermore, the process of constructing a traffic volume prediction model for a road node based on the traffic volume coefficient and obtaining the first predicted traffic volume of the road node in the current time period according to the constructed traffic volume prediction model includes:
[0021] Adopt the same method to obtain the traffic volume coefficients of the road node in each time period, and use the traffic volume coefficient and its corresponding time period as the traffic volume data of this road node;
[0022] Select the logistic regression model as the initial traffic volume prediction model, divide the traffic volume data into a training set and a test set, use the training set to train the initial traffic volume prediction model, use the test set to evaluate the trained traffic volume prediction model, and use the most recently obtained traffic volume prediction model as the current traffic volume prediction model;
[0023] Input the time period to be predicted into the constructed traffic volume prediction model, predict the traffic volume of the road node in the current time period through the traffic volume prediction model, and output the corresponding first predicted traffic volume.
[0024] Furthermore, the process of obtaining the driving data of all vehicles within the traffic monitoring circle and constructing a driving topology map of the vehicles based on the driving data includes:
[0025] Mark the vehicles currently within the traffic monitoring circle and label them as the monitored vehicles of the traffic monitoring circle, collect the driving data of the labeled monitored vehicles, and the driving data includes but is not limited to the driving trajectory, driving speed, driving duration, etc. of the vehicle;
[0026] Define the road nodes passed by the driving trajectory of the vehicle as the points in the driving topology map, define the road lines passed by the driving trajectory of the vehicle as the edges in the driving topology map, and construct the time sequence connection between each point by analyzing the driving duration of the vehicle to obtain the driving topology map of this vehicle.
[0027] Furthermore, the process of predicting the destination node and arrival time of the vehicle based on the constructed driving topology map and then obtaining the second predicted traffic volume of the road node includes:
[0028] In the driving topology map of a vehicle, corresponding characteristic information is obtained according to the topology structure. A logistic regression model is selected as the initial driving prediction model, and the initial driving prediction model is trained and evaluated using the characteristic information to obtain the current driving prediction model;
[0029] The characteristic information of the current vehicle is input into the constructed driving prediction model. The subsequent driving trajectory of the vehicle is predicted through the driving prediction model to output the corresponding predicted trajectory. The next road node in the predicted trajectory is marked as the driving node of the vehicle. The driving speed of the vehicle and the driving distance to the driving node are obtained. Furthermore, the time when the vehicle arrives at the driving node is predicted to obtain the corresponding arrival time. The number of vehicles that mark any road node as the driving node and are about to arrive in the corresponding time period is obtained, and it is marked as the second predicted traffic flow of the road node in the corresponding time period.
[0030] Furthermore, the process of judging the accuracy of the first predicted traffic flow and the second predicted traffic flow according to the real-time traffic flow and obtaining the comprehensive predicted traffic flow of the road node includes:
[0031] According to the real-time traffic flow, the first predicted traffic flow, and the second predicted traffic flow of the road node in the previous time period, the first accuracy of the first predicted traffic flow and the second accuracy of the second predicted traffic flow are obtained. The comprehensive predicted traffic flow of the road node is obtained according to the first accuracy and the second accuracy.
[0032] Compared with the prior art, the beneficial effects of the present invention are:
[0033] 1. By setting a traffic monitoring circle at the road node, the traffic flow in the subsequent corresponding time period of the road node is predicted based on the daily traffic flow of the road node to obtain the corresponding first predicted traffic flow. The first prediction of the present invention can be realized according to the past data. By obtaining the driving data of the vehicles in the traffic monitoring circle and constructing the driving topology map of the vehicles, the subsequent driving trajectories of the vehicles are predicted according to the constructed driving topology map. Based on this, the second predicted traffic flow of each road node is obtained, and the second prediction of the present invention can be realized according to the topological structure of the driving trajectory;
[0034] 2. The accuracy of the first predicted traffic flow and the second predicted traffic flow is judged through the real-time traffic flow of the road node, and then the predicted traffic flow is adjusted according to the obtained accuracy to obtain the corresponding comprehensive predicted traffic flow. Different from the previous single prediction method, the present invention predicts the traffic flow through two different methods, and then obtains the comprehensive predicted traffic flow according to the accuracy of the two, which can significantly improve the accuracy of the traffic flow prediction of the road node and is beneficial to better meet the daily use requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is the flowchart of the present invention. Specific embodiments
[0036] As Figure 1 shown, a method for predicting road node traffic based on big data includes the following steps:
[0037] Step S1: Collect the distribution information of urban roads and construct a GIS viewable map of urban roads based on the collected distribution information;
[0038] Step S2: Set traffic monitoring circles for each road node and obtain the real-time traffic volume and historical traffic volume of the road node through the traffic monitoring circles;
[0039] Step S3: Obtain the traffic volume coefficients of the road node at different time periods based on the historical traffic volume, construct a traffic volume prediction model for the road node according to the traffic volume coefficients, and obtain the first predicted traffic volume of the road node in the current time period according to the constructed traffic volume prediction model;
[0040] Step S4: Obtain the driving data of all vehicles within the traffic monitoring circle, construct a driving topology map of the vehicles according to the driving data, predict the driving node and arrival time of the vehicles according to the constructed driving topology map, and then obtain the second predicted traffic volume of the road node;
[0041] Step S5: Judge the accuracy of the first predicted traffic volume and the second predicted traffic volume according to the real-time traffic volume, and obtain the comprehensive predicted traffic volume of the road node according to the accuracy of the two.
[0042] It should be further noted that in the specific implementation process, the process of collecting the distribution information of urban roads and constructing a GIS viewable map of urban roads based on the collected distribution information includes:
[0043] In the embodiments of the present invention, urban roads are divided into road lines and road nodes. The road line refers to a section composed of one-way or two-way roads, and its two ends are its corresponding road nodes. The road node refers to the intersection where different road lines meet, and a road node belongs to at least two road lines;
[0044] The distribution information of the urban roads includes two parts, namely the line information of the road lines and the node information of the road nodes. The line information includes but is not limited to the location and layout of each section, section width, section type, section name, road surface material, etc. The node information includes but is not limited to the geographical coordinates of each road node, intersection width, intersection type, etc.;
[0045] Using GIS technology, construct the GIS visible views of road lines and road nodes respectively according to the collected line information and node information, and then obtain the GIS visible view of the urban road. Relevant personnel can view the line information and node information of the urban road through the constructed GIS visible view of the urban road.
[0046] It should be further noted that in the specific implementation process, setting up a traffic monitoring circle for each road node, and the process of obtaining the real-time traffic volume and historical traffic volume of the road node through the traffic monitoring circle includes:
[0047] Taking any road node as an example, in the constructed GIS visible view, draw a circle with the geographical coordinates of the road node as the center and a preset distance R as the radius, mark the obtained circular area as the traffic monitoring circle of the road node, and mark all the road lines included in the traffic monitoring circle as traffic monitoring sections. The traffic monitoring section specifically refers only to the part included in the traffic monitoring circle and does not include the whole road line;
[0048] At least two traffic monitoring sections are included in a traffic monitoring circle. Collect the number of vehicles on each traffic monitoring section, and mark the collected number of vehicles as the real-time traffic volume of the road node. Upload the obtained real-time traffic volume to the GIS visible view for display. When a new real-time traffic volume appears, mark the original real-time traffic volume as historical traffic volume, and record the corresponding collection time while obtaining the real-time traffic volume.
[0049] It should be further noted that in the specific implementation process, the process of obtaining the traffic volume coefficient of the road node at different time periods according to the historical traffic volume includes:
[0050] Divide a day into several time periods with the same time interval for each. Taking any time period as an example, count the historical traffic volume obtained on that day for this time period, and take the average value of the obtained historical traffic volume as the average traffic volume of this time period on that day;
[0051] Count the average traffic volume of this time period for each day and mark it as C i , where i = 1, 2,..., n. Evaluate the change of the obtained average traffic volume and obtain its corresponding degree of change, denoted as G i ;
[0052]
[0053] Set a change threshold G0, compare the obtained degree of change with the set change threshold, and mark the obtained average traffic volume as normal state and abnormal state according to the comparison result. If G i ≤G0, then mark it as the normal state. If Gi If it is greater than G0, it is marked as an abnormal state, and the mean value of the average traffic flow marked as the normal state is used as the traffic flow coefficient of the road node during this time period.
[0054] It should be further noted that in the specific implementation process, the process of constructing a traffic flow prediction model for road nodes based on the traffic flow coefficient and obtaining the first predicted traffic flow of the road node in the current time period by using the constructed traffic flow prediction model includes:
[0055] Taking any road node as an example, the traffic flow coefficients of the road node in each time period are obtained in the same way, and the obtained traffic flow coefficients and their corresponding time periods are used as the traffic flow data of the road node.
[0056] Select the logistic regression model as the initial traffic flow prediction model, divide the traffic flow data into a training set and a test set, use the training set to train the initial traffic flow prediction model, obtain the trained traffic flow prediction model by learning the corresponding relationships in the traffic flow data, use the test set to evaluate the trained traffic flow prediction model, optimize the trained traffic flow prediction model according to the evaluation results to obtain the optimized traffic flow prediction model, and use the most recently optimized traffic flow prediction model as the current traffic flow prediction model.
[0057] Input the time period to be predicted (taking the current time period as an example) into the constructed traffic flow prediction model, predict the traffic flow of the road node in the current time period through the traffic flow prediction model, and output the corresponding first predicted traffic flow.
[0058] It should be further noted that in the specific implementation process, the process of obtaining the driving data of all vehicles in the traffic flow monitoring circle and constructing the driving topology graph of the vehicles according to the driving data includes:
[0059] Taking any traffic flow monitoring circle as an example, the vehicles currently in the traffic flow monitoring circle are marked and marked as the monitored vehicles of the traffic flow monitoring circle, and the driving data of the marked monitored vehicles are collected. The driving data includes but is not limited to the driving trajectory, driving speed, driving duration, etc. of the vehicle.
[0060] Taking any vehicle as an example, the driving data of the vehicle is preprocessed. The preprocessing includes removing noise or inaccurate points, performing GIS view matching on the original trajectory points, using the HMM statistical model to determine the specific road on which the vehicle is driving, defining the road nodes passed by the driving trajectory of the vehicle as the "points" in the driving topology graph, defining the road lines passed by the driving trajectory of the vehicle as the "edges" in the driving topology graph, and constructing the time sequence connection between each "point" by analyzing the driving duration of the vehicle, so as to obtain the driving topology graph of the vehicle.
[0061] It should be further explained that, in a specific implementation process, the process of predicting the vehicle's approach node and arrival time according to the constructed driving topology graph, and then obtaining the second predicted traffic flow of the road node includes:
[0062] In the vehicle driving topology map, corresponding characteristic information is obtained according to the topological structure, wherein the characteristic information includes but is not limited to the driving distance of the vehicle, the road network structure during the driving period, the number of road nodes passed, the number of turns, and the stay time, etc.;
[0063] A logistic regression model is selected as the initial driving prediction model, feature information is divided into a training set and a test set, the initial driving prediction model is trained using the training set, a trained driving prediction model is obtained by learning the corresponding relationship in the feature information, the trained driving prediction model is evaluated using the test set, the trained driving prediction model is tuned according to the evaluation result to obtain a tuned driving prediction model, and the most recently tuned driving prediction model is used as the current driving prediction model;
[0064] Input the characteristic information of the current vehicle into the constructed driving prediction model, predict its subsequent driving trajectory through the driving prediction model, and output the corresponding predicted trajectory, mark the next road node in the predicted trajectory as the vehicle's driving node, obtain the vehicle's driving speed and the driving distance between the vehicle and the driving node, and then predict the time when the vehicle arrives at the driving node to obtain the corresponding arrival time;
[0065] Taking any road node in any time period as an example, obtain the number of vehicles that mark the road node as a driving node and are about to arrive in the time period, and mark the obtained number of vehicles as the second predicted traffic flow of the road node in the time period.
[0066] It should be further explained that, in the specific implementation process, the accuracy of the first predicted traffic flow and the second predicted traffic flow is determined according to the real-time traffic flow, and the process of obtaining the comprehensive predicted traffic flow of the road node according to the accuracy of the two includes:
[0067] Taking any road node as an example, the real-time traffic flow, the first predicted traffic flow, and the second predicted traffic flow of the road node in the previous time period are obtained, and the three are marked as L 实 , L1, L2, obtain a first accuracy of the first predicted vehicle flow and a second accuracy of the second predicted vehicle flow, denoted as R1 and R2 respectively;
[0068]
[0069] The comprehensive predicted traffic flow of the road node is obtained according to the first accuracy and the second accuracy, and the obtained comprehensive predicted traffic flow is marked as Y预 ;
[0070]
[0071] Among them, Y1 represents the first predicted traffic flow of the road node in the next time period, and Y2 represents the second predicted traffic flow of the road node in the next time period.
[0072] The above embodiments are only used to illustrate the technical method of the present invention and not to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical method of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A method for predicting road node traffic flow based on big data, characterized in that, Including the following steps: Step S1: Collect the distribution information of urban roads, and construct a GIS viewable map of urban roads based on the collected distribution information; Step S2: Set flow monitoring circles for each road node, and obtain the real-time traffic flow and historical traffic flow of the road node through the flow monitoring circles; Step S3: Obtain the traffic flow coefficient of the road node at different time periods according to the historical traffic flow: Divide a day into several time periods with the same time interval for each period. For any time period, count the historical traffic flow obtained on that day for this period, and take the average value of the obtained historical traffic flow as the average traffic flow of this period on that day; Statistically analyze the average daily traffic volume during this time period and label it as C i , where i = 1, 2, ……, n, evaluate the change of the obtained average traffic volume, and obtain its corresponding degree of change, denoted as G i ; ; Set a change threshold G0, compare the obtained degree of change with the set change threshold, and mark the obtained average traffic flow as normal and abnormal according to the comparison result. If G i ≤ G0, mark it as the normal state. If G i > G0, mark it as the abnormal state, and take the mean value of all the average traffic flows marked as the normal state as the traffic flow coefficient of the road node during this time period; Construct a traffic flow prediction model for the road node according to the traffic flow coefficient, and obtain the first predicted traffic flow of the road node in the current time period according to the constructed traffic flow prediction model; Step S4: Obtain the driving data of all vehicles within the flow monitoring circle, and construct a driving topology map of the vehicles according to the driving data: Mark the vehicles currently within the flow monitoring circle as the monitored vehicles of this flow monitoring circle, and collect the driving data of the marked monitored vehicles. The driving data includes the driving trajectory, driving speed, and driving duration of the vehicle; Define the road nodes passed by the driving trajectory of the vehicle as the points in the driving topology map, and define the road lines passed by the driving trajectory of the vehicle as the edges in the driving topology map. Analyze the driving duration of the vehicle to construct the time sequence connection between each point to obtain the driving topology map of the vehicle; Predict the destination node and arrival time of the vehicle according to the constructed driving topology map, and further obtain the second predicted traffic flow of the road node: In the driving topology map of the vehicle, obtain its corresponding characteristic information according to the topological structure, select the logistic regression model as the initial driving prediction model, and use the characteristic information to train and evaluate the initial driving prediction model to obtain the current driving prediction model; Input the characteristic information of the current vehicle into the driving prediction model, predict its subsequent driving trajectory to output the corresponding predicted trajectory, obtain the destination node of the vehicle according to the predicted trajectory, and obtain the arrival time of the vehicle at the destination node according to the driving speed of the vehicle; Obtain the number of vehicles that mark any road node as the destination node and are about to arrive in the corresponding time period, and mark it as the second predicted traffic flow of this road node in the corresponding time period; Step S5: Judge the accuracy of the first predicted traffic flow and the second predicted traffic flow according to the real-time traffic flow, and obtain the comprehensive predicted traffic flow of the road node according to the accuracy of the two.
2. The method for predicting road node traffic flow based on big data according to claim 1, wherein, The process of collecting the distribution information of urban roads and constructing a GIS viewable map of urban roads based on the collected distribution information includes: Divide urban roads into road lines and road nodes. The distribution information of urban roads includes the line information of road lines and the node information of road nodes; Use GIS technology to construct GIS viewable maps of road lines and road nodes respectively according to the collected line information and node information, and further obtain the GIS viewable map of urban roads.
3. The method for predicting road node traffic flow based on big data according to claim 2, wherein Set up traffic monitoring circles for each road node. The process of obtaining the real-time traffic volume and historical traffic volume of road nodes through the traffic monitoring circles includes: In the constructed GIS visual view, with the geographical coordinates of the road node as the center, construct a traffic monitoring circle for the road node to obtain its corresponding traffic monitoring section; Mark the number of vehicles on each traffic monitoring section as the real-time traffic volume of the road node. When a new real-time traffic volume appears, mark the original real-time traffic volume as the historical traffic volume.
4. A method for predicting road node traffic flow based on big data according to claim 3, characterized in that, Construct a traffic volume prediction model for the road node according to the traffic volume coefficient. The process of obtaining the first predicted traffic volume of the road node in the current time period according to the constructed traffic volume prediction model includes: Obtain the traffic volume coefficients of the road node in each time period by the same method, and use the traffic volume coefficients and their corresponding time periods as the traffic volume data of the road node; Select the logistic regression model as the initial traffic volume prediction model, divide the traffic volume data into a training set and a test set, use the training set to train the traffic volume prediction model, use the test set to evaluate the traffic volume prediction model, and obtain the latest traffic volume prediction model; Input the expected prediction time period into the traffic volume prediction model to predict the traffic volume of the road node in the corresponding time period and output the corresponding first predicted traffic volume.
5. A method for predicting road node traffic flow based on big data according to claim 4, characterized in that, Judge the accuracy of the first predicted traffic volume and the second predicted traffic volume according to the real-time traffic volume, and obtain the comprehensive predicted traffic volume of the road node according to the accuracy of the two. The process includes: Obtain the first accuracy of the first predicted traffic volume and the second accuracy of the second predicted traffic volume according to the real-time traffic volume, the first predicted traffic volume, and the second predicted traffic volume of the road node in the previous time period, and obtain the comprehensive predicted traffic volume of the road node according to the first accuracy and the second accuracy.
Citation Information
Patent Citations
Urban intelligent traffic early warning system based on Internet of Things
CN111882867A
Method for predicting traffic flow by using dynamic multi-graph fusion
CN116975642A