Intersection left-turn traffic organization scheme recommendation method
Through data processing and machine learning models, combined with interactive web interface, intelligent recommendation of the intersection left-turn traffic organization solution, solves the congestion problem caused by the long queue of left-turn vehicles and improves the operation efficiency and safety of the traffic system.
Patent Information
- Application Number
- CN202510648136.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-19
AI Technical Summary
Due to the congestion caused by the long queue of left-turn vehicles at the intersection, it is difficult for the existing technology to effectively organize left-turn traffic, resulting in reduced traffic efficiency and frequent traffic accidents.
Through data loading and preprocessing, building a random forest regression model, recommending optimization logic schemes, and building an interactive web interface, intelligent recommendation of the intersection left-turn traffic organization scheme is realized, including data cleaning, feature selection, model training and scheme evaluation, providing accurate delay time prediction and optimization scheme.
It improves the operating efficiency and safety of the transportation system and provides comprehensive decision-making support. Users can obtain accurate prediction results and reasonable optimization suggestions through an intuitive web interface.
Smart Images

Figure CN120510709A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of traffic organization, and in particular to a method for recommending a left-turn traffic organization plan at an intersection. Background Art
[0002] As my country's urbanization continues to advance, the number of motor vehicles continues to increase annually, placing increasing strain on urban road systems. Urban traffic congestion, air quality issues, and frequent accidents are becoming increasingly prominent. Intersections, as fundamental nodes in urban road networks, converge traffic flows from different directions. Multiple intersecting traffic flows diverge, converge, and collide at the same surface, interfering with each other. Due to spatial and temporal constraints, intersections have become a bottleneck restricting the full efficiency of the entire road traffic system. Data shows that traffic accidents at intersections account for 58.9% of all urban road accidents, with over two-thirds of these accidents involving left-turning vehicles. The resulting decrease in intersection efficiency and increased exhaust emissions caused by left-turning vehicles are becoming increasingly serious. Therefore, effectively managing left-turning traffic is crucial to ensuring traffic safety and improving intersection efficiency.
[0003] There are two main types of spatiotemporal optimization methods for left-turn traffic at signal-controlled intersections in China. The first type is phase-based optimization, which requires traversing all spatiotemporal optimization combinations, and the channeling phase scheme is separated from the timing optimization, which affects the optimization efficiency and results. The second type is lane-based optimization. This method takes the lane as the basic object and optimizes the channeling, signal phase and timing scheme simultaneously, ensuring the efficiency and optimality of the optimization scheme. However, since the zoning scheme of this method only determines the function of the left-turn lane, it does not consider the impact of the left-turn waiting area and the length of the left-turn short lane on the optimization results. Therefore, we propose a method for recommending left-turn traffic organization schemes at intersections to solve the above problems. Summary of the Invention
[0004] The problem to be solved by the present invention is the congestion problem caused by the long queue of left-turning vehicles at the intersection, while avoiding the problem of major reconstruction of the intersection at a lower cost.
[0005] In order to solve the above technical problems, the present invention provides a method for recommending left-turn traffic organization plans at intersections, the method specifically comprising:
[0006] S1: Data loading and preprocessing to provide a high-quality data foundation for subsequent model training and prediction;
[0007] S2: Build a prediction model to learn the relationship between traffic characteristics and delay time through historical data to predict delay time;
[0008] S3: Recommend optimization logic solutions. Based on the input traffic parameters, it intelligently recommends the appropriate intersection left-turn traffic organization optimization solution.
[0009] S4: Build an interactive web interface to interact with users and clearly present the predicted delay time and recommended optimization solutions to users;
[0010] Preferably, the data loading and preprocessing specifically include:
[0011] S101: Use the pandas library to read traffic data files in CSV format;
[0012] S102: Clean the raw traffic data to improve data quality and reduce the impact of noise and outliers on model training.
[0013] Preferably, the cleaning of the raw traffic data specifically includes:
[0014] S1021: Delete rows containing missing values to ensure data integrity;
[0015] S1022: Convert non-numeric data to numeric types to facilitate model processing;
[0016] S1023: Delete missing values again, especially focusing on key feature columns to ensure that the data is complete. Feature columns include the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, the through traffic flow QS, and the delay time D.
[0017] Preferably, the constructing of the prediction model specifically includes:
[0018] S201: Feature selection: Extracting a feature matrix X and a target variable y from the preprocessed data, wherein the feature matrix X includes the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, and the through traffic flow QS, and the target variable y is the delay time D;
[0019] S202: Model selection: Use sklearn.ensemble.RandomForestRegressor to build a random forest regression model. Random forest is an ensemble learning method that improves the accuracy and generalization ability of the model by building multiple decision trees and integrating their prediction results.
[0020] S203: Parameter setting: set n_estimators = 100, that is, build 100 decision trees and ensure that the results are reproducible, random_state = 42;
[0021] S204: Model training: The model is trained using training data so that it learns the complex nonlinear relationship between traffic characteristics and delay time. The trained model can predict the corresponding delay time based on the new traffic characteristic data.
[0022] Preferably, the recommended optimization logic scheme specifically includes:
[0023] S301: Customize six common intersection optimization schemes, including left-turn waiting area, left turn using the opposite lane, left turn using the same-direction through lane, shifted left turn, U-turn left, and long-distance left turn;
[0024] S302: Applicability determination: For each plan, the input check is performed to determine whether it meets the applicable conditions and classifies the plan as applicable or not. Traffic parameters include the number of left-turn lanes, the number of through lanes, green light duration, left-turn traffic flow, through traffic flow, the number of main road lanes, median width, branch road traffic flow, and whether remote U-turns are allowed.
[0025] S303: Setting recommendation priority: Setting a recommendation priority for each solution, selecting the solution with the highest priority from the applicable solutions as the most recommended solution. The priority is set based on the solution's effectiveness and applicability in different traffic scenarios.
[0026] S304: Reasons for recommendation and non-recommendation: Prepare detailed reasons for recommendation and non-recommendation for each solution to help users understand the applicable scenarios and restrictions of the solution.
[0027] Preferably, the constructing of the interactive web interface specifically includes:
[0028] S401: Use the Dash framework to build a web application and define the page layout, including input forms, buttons, and output areas;
[0029] S402: Input form design: Set input controls for various traffic parameters, such as input boxes and radio buttons. The input boxes are used to enter numerical data, such as the number of left-turn lanes and the number of through lanes, and the radio buttons are used to select Boolean data, such as whether to allow remote U-turns.
[0030] S403: Style setting: beautify the interface through CSS styles to improve user experience, for example, set the width, padding, border style of the input box, background color, font size, etc. of the button;
[0031] S404: Callback function definition: When the user clicks the submit button, the callback function is triggered. The function obtains the input data, calls the prediction model and recommendation function, and generates and displays the results.
[0032] Preferably, the construction of the interactive web interface further includes result display, specifically:
[0033] S501: Delay time display: The predicted delay time is displayed on the page in the format of "predicted delay time D: X.XX seconds / vehicle", so that the user can intuitively understand the delay situation under the current traffic conditions;
[0034] S502: Applicable solution table: Use the dash_table.DataTable component to display applicable optimization solutions and their recommended reasons. The table contains two columns: "Solution" and "Recommendation Reason", and each row corresponds to an applicable solution.
[0035] S503: Display of the most recommended solution: The most recommended solution and its reasons are highlighted on the page to help users quickly understand the best option;
[0036] S504: Inapplicable solution table: displays inapplicable optimization solutions and their reasons for not recommending them, so that users can understand why these solutions are not applicable to the current traffic conditions;
[0037] S505: Scheme Evaluation Principles Table: Provides evaluation principles for all optimization schemes, including applicable conditions, recommendation priorities, reasons for recommendation, and reasons for non-recommendation, for user reference to enhance the transparency and credibility of the system.
[0038] The technical effects and advantages of the present invention are as follows:
[0039] By integrating data processing, machine learning models, and a user interface, this invention enables the prediction of traffic delay time and the intelligent recommendation of left-turn traffic organization plans at intersections. Its underlying logic covers data-driven predictions and rule-based plan recommendations, providing comprehensive decision-making support for traffic management and planning. Users can input data through an intuitive web interface to obtain accurate prediction results and reasonable optimization suggestions, thereby effectively improving the operating efficiency and safety of the traffic system. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the overall structure flow of the present invention;
[0041] Figure 2 This is a schematic diagram of a traffic data file case in the present invention;
[0042] Figure 3 This is a schematic diagram of the data loading and preprocessing code of the present invention;
[0043] Figure 4 A schematic diagram of a prediction model constructed in the present invention;
[0044] Figure 5 The following is a schematic diagram of the function code recommended for the solution of the present invention;
[0045] Figure 6 Schematic diagram of the evaluation principle of the present invention;
[0046] Figure 7 This is an interface display diagram of the present invention;
[0047] Figure 8 This is a diagram showing the interface recommended for the solution of the present invention. DETAILED DESCRIPTION
[0048] The present invention provides a method for recommending a left-turn traffic organization plan at an intersection, the method specifically comprising:
[0049] S1: Data loading and preprocessing to provide a high-quality data foundation for subsequent model training and prediction;
[0050] like Figure 2-3 As shown in the figure, data loading and preprocessing specifically include:
[0051] S101: Use the pandas library to read traffic data files in CSV format;
[0052] S102: Clean the raw traffic data to improve data quality and reduce the impact of noise and outliers on model training;
[0053] Furthermore, the cleaning of raw traffic data specifically includes:
[0054] S1021: Delete rows containing missing values to ensure data integrity;
[0055] S1022: Convert non-numeric data to numeric types to facilitate model processing;
[0056] S1023: Delete missing values again, especially focusing on key feature columns to ensure that the data is complete. Feature columns include the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, the through traffic flow QS, and the delay time D.
[0057] S2: Build a prediction model to learn the relationship between traffic characteristics and delay time through historical data to predict delay time;
[0058] like Figure 4 As shown in Figure 2, building a prediction model specifically includes:
[0059] S201: Feature selection: Extract the feature matrix X and target variable y from the preprocessed data, where the feature matrix X includes the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, and the through traffic flow QS. The target variable y is the delay time D.
[0060] S202: Model selection: Use sklearn.ensemble.RandomForestRegressor to build a random forest regression model. Random forest is an ensemble learning method that improves the accuracy and generalization ability of the model by building multiple decision trees and integrating their prediction results.
[0061] S203: Parameter setting: set n_estimators = 100, that is, build 100 decision trees and ensure that the results are reproducible, random_state = 42;
[0062] S204: Model training: The model is trained using training data so that it learns the complex nonlinear relationship between traffic characteristics and delay time. The trained model can predict the corresponding delay time based on the new traffic characteristic data.
[0063] S3: Recommend optimization logic solutions. Based on the input traffic parameters, it intelligently recommends the appropriate intersection left-turn traffic organization optimization solution.
[0064] like Figure 5-6 As shown in the figure, the specific method of recommending the optimization logic solution is:
[0065] S301: Customize six common intersection optimization schemes, including left-turn waiting area, left turn using the opposite lane, left turn using the same-direction through lane, shifted left turn, U-turn left, and long-distance left turn;
[0066] S302: Applicability determination: For each plan, the input check is performed to determine whether it meets the applicable conditions and classifies the plan as applicable or not. Traffic parameters include the number of left-turn lanes, the number of through lanes, green light duration, left-turn traffic flow, through traffic flow, the number of main road lanes, median width, branch road traffic flow, and whether remote U-turns are allowed.
[0067] S303: Setting recommendation priority: Setting a recommendation priority for each solution, selecting the solution with the highest priority from the applicable solutions as the most recommended solution. The priority is set based on the solution's effectiveness and applicability in different traffic scenarios.
[0068] S304: Reasons for recommendation and non-recommendation: Prepare detailed reasons for recommendation and non-recommendation for each solution to help users understand the applicable scenarios and restrictions of the solution.
[0069] S4: Build an interactive web interface to interact with users and clearly present the predicted delay time and recommended optimization solutions to users;
[0070] like Figure 7 As shown in the figure, the specific method of building an interactive web interface is:
[0071] S401: Use the Dash framework to build a web application and define the page layout, including input forms, buttons, and output areas;
[0072] S402: Input form design: Set up input controls for various traffic parameters, such as input boxes and radio buttons. Input boxes are used to enter numerical data, such as the number of left-turn lanes and the number of through lanes, while radio buttons are used to select Boolean data, such as whether remote U-turns are allowed.
[0073] S403: Style setting: beautify the interface through CSS styles to improve user experience, for example, set the width, padding, border style of the input box, background color, font size, etc. of the button;
[0074] S404: Callback function definition: When the user clicks the submit button, the callback function is triggered. The function obtains the input data, calls the prediction model and recommendation function, and generates and displays the results.
[0075] like Figure 8 As shown, building an interactive web interface also includes result display, specifically:
[0076] S501: Delay time display: The predicted delay time is displayed on the page in the format of "predicted delay time D: X.XX seconds / vehicle", so that the user can intuitively understand the delay situation under the current traffic conditions;
[0077] S502: Applicable solution table: Use the dash_table.DataTable component to display applicable optimization solutions and their recommended reasons. The table contains two columns: "Solution" and "Recommendation Reason", and each row corresponds to an applicable solution.
[0078] S503: Display of the most recommended solution: The most recommended solution and its reasons are highlighted on the page to help users quickly understand the best option;
[0079] S504: Inapplicable solution table: displays inapplicable optimization solutions and their reasons for not recommending them, so that users can understand why these solutions are not applicable to the current traffic conditions;
[0080] S505: Scheme Evaluation Principles Table: Provides evaluation principles for all optimization schemes, including applicable conditions, recommendation priorities, reasons for recommendation, and reasons for non-recommendation, for user reference to enhance the transparency and credibility of the system.
[0081] The working principle of the present invention is as follows: first, a traffic dataset is loaded, and then data cleaning and preprocessing are performed to ensure data integrity and consistency. Feature matrices and target variables are then extracted from the preprocessed data through a training model. A random forest regression model is then used for training to learn the relationship between traffic characteristics and delay time. Current traffic condition data input by the user is received through an input form in the Dash application. The user-entered data is input into the trained model to predict traffic delay time under current conditions. At this time, the applicable optimization solutions can be determined based on the user-entered data, and the most appropriate solution can be selected based on the recommendation priority. Reasons for recommendation and non-recommendation are provided to help users understand the applicability of the solutions. Finally, the predicted delay time and recommended optimization solutions are displayed to users through a web interface, and the results can be clearly presented in the form of tables and text to enhance the user experience.
[0082] This method integrates data processing, machine learning models, and a user interface to predict traffic delays and intelligently recommend left-turn traffic organization plans at intersections. Its underlying logic encompasses data-driven predictions and rule-based plan recommendations, providing comprehensive decision-making support for traffic management and planning. Users can input data through an intuitive web interface to obtain accurate prediction results and reasonable optimization suggestions, thereby effectively improving the operational efficiency and safety of the traffic system.
[0083] It will be understood that the present invention is described by way of some embodiments, and it will be appreciated by those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are intended to be protected by the present invention.
Claims
1. A method for recommending a left-turn traffic organization plan at an intersection, characterized by: The recommended method specifically includes: S1: Data loading and preprocessing to provide a high-quality data foundation for subsequent model training and prediction; S2: Build a prediction model to learn the relationship between traffic characteristics and delay time through historical data to predict delay time; S3: Recommend optimization logic solutions. Based on the input traffic parameters, it intelligently recommends the appropriate intersection left-turn traffic organization optimization solution. S4: Build an interactive web interface to interact with users and clearly present the predicted delay time and recommended optimization solutions to users.
2. The method for recommending a left-turn traffic organization plan at an intersection according to claim 1, wherein: The data loading and preprocessing specifically include: S101: Use the pandas library to read traffic data files in CSV format; S102: Clean the raw traffic data to improve data quality and reduce the impact of noise and outliers on model training.
3. The method for recommending a left-turn traffic organization plan at an intersection according to claim 2, wherein: The cleaning of the raw traffic data specifically includes: S1021: Delete rows containing missing values to ensure data integrity; S1022: Convert non-numeric data to numeric types to facilitate model processing; S1023: Delete missing values again, especially focusing on key feature columns to ensure that the data is complete. Feature columns include the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, the through traffic flow QS, and the delay time D.
4. The method for recommending a left-turn traffic organization plan at an intersection according to claim 1, wherein: The construction of the prediction model specifically includes: S201: Feature selection: Extracting a feature matrix X and a target variable y from the preprocessed data, wherein the feature matrix X includes the number of left-turn lanes L, the number of through lanes N, the green light duration G, the left-turn traffic flow QL, and the through traffic flow QS, and the target variable y is the delay time D; S202: Model selection: Use sklearn.ensemble.RandomForestRegressor to build a random forest regression model. Random forest is an ensemble learning method that improves the accuracy and generalization ability of the model by building multiple decision trees and integrating their prediction results. S203: Parameter setting: set n_estimators = 100, that is, build 100 decision trees and ensure that the results are reproducible, random_state = 42; S204: Model training: The model is trained using training data so that it learns the complex nonlinear relationship between traffic characteristics and delay time. The trained model can predict the corresponding delay time based on the new traffic characteristic data.
5. The method for recommending a left-turn traffic organization plan at an intersection according to claim 1, wherein: The recommended optimization logic solution specifically includes: S301: Customize six common intersection optimization schemes, including left-turn waiting area, left turn using the opposite lane, left turn using the same-direction through lane, shifted left turn, U-turn left, and long-distance left turn; S302: Applicability determination: For each plan, the input check is performed to determine whether it meets the applicable conditions and classifies the plan as applicable or not. Traffic parameters include the number of left-turn lanes, the number of through lanes, green light duration, left-turn traffic flow, through traffic flow, the number of main road lanes, median width, branch road traffic flow, and whether remote U-turns are allowed. S303: Setting recommendation priority: Setting a recommendation priority for each solution, selecting the solution with the highest priority from the applicable solutions as the most recommended solution. The priority is set based on the solution's effectiveness and applicability in different traffic scenarios. S304: Reasons for recommendation and non-recommendation: Prepare detailed reasons for recommendation and non-recommendation for each solution to help users understand the applicable scenarios and restrictions of the solution.
6. The method for recommending a left-turn traffic organization plan at an intersection according to claim 1, wherein: The construction of the interactive web interface specifically includes: S401: Use the Dash framework to build a web application and define the page layout, including input forms, buttons, and output areas; S402: Input form design: Set input controls for various traffic parameters, such as input boxes and radio buttons. The input boxes are used to enter numerical data, such as the number of left-turn lanes and the number of through lanes, and the radio buttons are used to select Boolean data, such as whether to allow remote U-turns. S403: Style setting: beautify the interface through CSS styles to improve user experience, for example, set the width, padding, border style of the input box, background color, font size, etc. of the button; S404: Callback function definition: When the user clicks the submit button, the callback function is triggered. The function obtains the input data, calls the prediction model and recommendation function, and generates and displays the results.
7. The method for recommending a left-turn traffic organization plan at an intersection according to claim 1, wherein: The construction of the interactive web interface also includes result display, specifically: S501: Delay time display: The predicted delay time is displayed on the page in the format of "Predicted delay time D: X.XX seconds / vehicle", so that users can intuitively understand the delay situation under the current traffic conditions; S502: Applicable solution table: Use the dash_table.DataTable component to display applicable optimization solutions and their recommended reasons. The table contains two columns: "Solution" and "Recommendation Reason", and each row corresponds to an applicable solution. S503: Display of the most recommended solution: The most recommended solution and its reasons are highlighted on the page to help users quickly understand the best option; S504: Inapplicable solution table: displays inapplicable optimization solutions and their reasons for not recommending them, so that users can understand why these solutions are not applicable to the current traffic conditions; S505: Scheme Evaluation Principles Table: Provides evaluation principles for all optimization schemes, including applicable conditions, recommendation priorities, reasons for recommendation, and reasons for non-recommendation, for user reference to enhance the transparency and credibility of the system.