Intelligent traffic dispersion system and method suitable for highway engineering
By designing a smart traffic diversion system, combining real-time traffic density, driving behavior and weather conditions, traffic flow management and signal control are optimized, and the problem that existing systems are difficult to effectively manage traffic flow during peak periods or inclement weather is solved, achieving more efficient traffic flow management and congestion reduction effects.
Patent Information
- Application Number
- CN202411214144.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-31
- Publication Date
- 2025-05-06
AI Technical Summary
The existing highway traffic management system is difficult to effectively manage traffic flow during peak periods or inclement weather, resulting in increased traffic congestion and accident risks. The existing system lacks comprehensive considerations for driving behavior and weather conditions.
A smart traffic diversion system was designed, including a computing flow module, a behavior analysis module, a flow correction module, a queue detection module, a time allocation module and a path planning module. By analyzing traffic density, driving behavior and weather conditions in real time, traffic flow management and signal control are optimized.
It improves the accuracy of traffic flow management, optimizes signal control, reduces traffic congestion and waiting time, intelligently responds to traffic abnormal events, and reduces traffic delays.
Smart Images

Figure CN119942811A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of highway traffic diversion, and in particular to an intelligent traffic diversion system and method applicable to highway engineering. Background Art
[0002] The current highway traffic management system often faces traffic congestion problems during peak hours or in bad weather conditions, resulting in large fluctuations in traffic flow, increasing the risk of traffic accidents and reducing the efficiency of road use. Although existing technologies use various methods to predict and manage traffic flow, these methods are still limited in real-time data analysis and prediction accuracy. Existing intelligent transportation systems mainly rely on basic video surveillance and traditional traffic flow calculation methods, which cannot effectively adapt to rapidly changing traffic conditions. In addition, existing systems often lack the ability to only consider the impact of traffic flow on traffic congestion, ignoring the digestion of traffic flow at intersections, and at the same time, ignoring the impact of driving behavior and weather conditions on road traffic flow. Summary of the invention
[0003] Based on the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide an intelligent traffic diversion system and method suitable for highway engineering to solve the above-mentioned technical problems.
[0004] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: an intelligent traffic diversion system applicable to highway engineering, comprising a flow calculation module, a behavior analysis module, a flow correction module, a queue detection module, a time allocation module and a path planning module;
[0005] A traffic flow calculation module, used for calculating the traffic flow of the first road section according to the road section traffic density on the road section;
[0006] A behavior analysis module, used to calculate a driving behavior analysis coefficient based on driving behavior parameters of vehicles on a road section and a preset driving behavior analysis index;
[0007] A traffic flow correction module, used to correct the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section;
[0008] A queue detection module, configured to obtain the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit according to a preset queue detection algorithm when the road section traffic density is greater than a preset road section traffic density threshold and the second road section traffic flow is less than a second road section traffic flow threshold;
[0009] A time allocation module is used to allocate traffic light time according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-through queue, and obtain the digested traffic flow at the road section exit within a traffic light cycle; wherein the digested traffic flow at the road section exit includes the digested traffic flow at the road section exit for left-turn, the digested traffic flow at the road section exit for straight-through traffic, and the digested traffic flow at the road section exit for right-turn;
[0010] A path planning module is used to ignore the section in the path algorithm in vehicle navigation and perform path planning when the ratio of the traffic flow of the first section to the traffic flow digested at the section exit is greater than a preset value, and to meet the constraint condition that the ratio of the traffic flow of the first section to the traffic flow digested at the section exit of each section is less than or equal to a preset value.
[0011] The present invention is further configured that the intelligent traffic diversion system further includes: a road section traffic density-road section average speed relationship creation module; the road section traffic density-road section average speed relationship creation module includes: a road section traffic density and average speed calculation unit, a traffic density matrix construction unit, an average speed matrix construction unit, a coefficient matrix construction unit and a relationship formula generation unit; wherein,
[0012] The section traffic density and average speed calculation unit is used to calculate the section traffic density and the section average speed according to the number of vehicles on the section and the average speed of vehicles on the section in the historical data, wherein the calculation logic of the section traffic density is: ρ is the traffic density of the road section, n is the number of vehicles on the road section, and L is the length of the road section; the calculation logic of the average speed of the road section is: is the average speed of the road section, is the average speed of vehicles on the road section;
[0013] The traffic density matrix construction unit is used to construct a road section traffic density matrix X according to the road section traffic density, wherein for the j-th road section traffic density value, the j-th row of the road section traffic density matrix X is generated, which is Among them, ρ j is the traffic density value of the jth road section, l is the degree of the polynomial regression model, the value of l is [1, ..., ∞], and is a natural number. When l is 1, the traffic density of the road section is linearly related to the average speed of the road section;
[0014] The average speed matrix construction unit is used to construct a section average speed matrix y according to the section average speed, wherein the section average speed matrix y is is the average speed of the road section corresponding to the traffic density value of the jth road section;
[0015] The coefficient matrix building unit is used to construct the coefficient matrix according to the coefficient equation θ = (X T X) -1X T y, calculate the coefficient matrix θ, where the coefficient matrix θ is [θ0, θ1,, ..., θ j ];
[0016] A relationship formula generating unit is used to generate a relationship formula between the traffic density of a section and the average speed of a section according to the coefficient matrix θ, wherein the relationship formula between the traffic density of a section and the average speed of a section is: in, is the average speed of the predicted road section, and ρ is the traffic density of the road section.
[0017] The present invention is further configured that the traffic flow calculation module includes: a road section average speed prediction unit and a first road section traffic flow calculation unit; wherein,
[0018] The road section average speed prediction unit is used to calculate the predicted road section average speed based on the road section traffic density ρ on the current road section and the road section traffic density-road section average speed relationship.
[0019] The first section traffic flow calculation unit is used to calculate the traffic flow of the first section according to the traffic density ρ of the section and the average speed of the predicted section. Calculate the traffic flow of the first road section, wherein the calculation logic of the traffic flow of the first road section is: Among them, Q1 is the traffic flow of the first section.
[0020] The present invention is further configured that the intelligent traffic diversion system further includes: a model training module; the model training module includes: a data set acquisition unit and a model training unit; wherein,
[0021] A data set acquisition unit, used for dividing the acquired historical road section traffic density data set and the first road section traffic flow data set corresponding to the historical road section traffic density data set into a training set, a validation set and a test set for model training;
[0022] The model training unit is used to set the road section traffic density as the input feature of the input layer, set the first road section traffic flow as the output feature of the output layer, and use the ReLU function as the activation function of the hidden layer in the preset neural network model, and use the training set to perform model training on the preset neural network model until the training meets the training cycle or meets the evaluation performance of the test set, so as to obtain the first road section traffic flow model; wherein, in the process of using the training set to perform model training on the preset neural network model, the weighted time-dependent mean square error is used as the loss function of the regression task, wherein the calculation logic of the loss function is: Among them, Loss is the loss function, N is the total number of samples in the training set, ρ iis the actual traffic flow of the first section of the i-th sample, is the predicted traffic flow of the first road section of the i-th sample, wi is the weight of the i-th sample, and the calculation logic of wi is: t i is the time of the ith sample, and δ is the time correction coefficient.
[0023] The present invention is further configured that the traffic flow calculation module includes a first road section traffic flow acquisition unit; wherein,
[0024] The first road section traffic flow acquisition unit is used to input the road section traffic density on the road section into the first road section traffic flow model, and the first road section traffic flow model outputs the first road section traffic flow.
[0025] The present invention is further configured that the driving behavior analysis coefficient is calculated according to the driving behavior parameters of the vehicle on the road section and the preset driving behavior analysis index, including:
[0026] The driving behavior parameters of the vehicle on the road section, including the driving time of the vehicle on the road, the number of lane changes and the number of emergency brakes, are obtained and normalized, and then brought into the preset driving behavior analysis index to calculate the driving behavior analysis coefficient, wherein the calculation logic of the driving behavior analysis index is: Idb = e α*tlr+β*nlc+γ*neb-1 +1, where Idb is the driving behavior analysis coefficient, e is a natural constant, tlr is the time the vehicle is driving on the line, nlc is the number of lane changes, neb is the number of emergency brakes, α, β and γ are the weight coefficients of the time the vehicle is driving on the line, the number of lane changes and the number of emergency brakes, respectively, and α, β and λ are all greater than 0.
[0027] The present invention is further configured that the traffic flow of the first road section is corrected according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section, and the correction logic is: Among them, Q2 is the traffic flow of the second road section, σ is the environmental factor of the current environmental weather, and the value range of the environmental factor is [0.5, 1].
[0028] The present invention is further configured such that the preset queuing detection algorithm comprises:
[0029] Continuously capture video frames of the queuing area at the road section exit, and perform grayscale conversion and smoothing filtering on the video frames;
[0030] Calculate the difference between frames, where the calculation logic of the difference between frames is D(x, y) = |f k (x,y)-f k-m (x,y)|, where (x,y) is the pixel point, f k (x,y) is the current frame, f k-m(x, y) is the frame m before, and D(x, y) is the difference between frames;
[0031] Calculate an optimal threshold value by Otsu method, and convert the inter-frame difference into a binary image according to the optimal threshold value, wherein moving pixels are 1 and stationary pixels are 0;
[0032] A connected component labeling algorithm is used to label continuous static areas, an inter-frame tracking algorithm is used to track the static areas, the pixel areas of the static areas are calculated, and the number of queued vehicles is obtained.
[0033] The present invention is further configured such that the path planning module includes an event detection unit;
[0034] The event detection unit is used to determine whether there is a marking event on the target road section. When there is a marking event on the road section, the road section is ignored in the path algorithm in the vehicle navigation and path planning is performed, and the constraint condition that the ratio of the road section traffic flow of each road section to the traffic flow digested by the road section exit is less than or equal to a preset value is satisfied; when there is no marking event on the road section, the road section participates in the path planning of the path algorithm in the vehicle navigation, wherein the marking event is used to mark the existence of an event that the current road section is impassable.
[0035] The present invention also provides a smart traffic diversion method applicable to highway engineering, including:
[0036] Calculating the traffic flow of the first road section according to the road section traffic density on the road section;
[0037] Calculating a driving behavior analysis coefficient according to driving behavior parameters of vehicles on the road section and a preset driving behavior analysis index;
[0038] Correcting the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section;
[0039] When the traffic density of the road section is greater than a preset road section traffic density threshold and the traffic flow of the second road section is less than a second road section traffic flow threshold, the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit are obtained according to a preset queue detection algorithm;
[0040] Traffic light time is allocated according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-ahead queue, and the traffic flow digestion at the road section exit within a traffic light cycle is obtained; wherein the traffic flow digestion at the road section exit includes the traffic flow digestion at the road section exit for left-turn, the traffic flow digestion at the road section exit for straight-ahead traffic, and the traffic flow digestion at the road section exit for right-turn;
[0041] When the ratio of the traffic flow of the second section to the traffic flow digested at the section exit is greater than a preset value, the section is ignored in the path algorithm in the vehicle navigation and path planning is performed, and the constraint condition that the ratio of the first traffic flow of each section to the traffic flow digested at the section exit is less than or equal to the preset value is satisfied.
[0042] The present invention provides an intelligent traffic diversion system and method applicable to highway engineering, the system comprising a flow calculation module, which is used to calculate the traffic flow of a first road section according to the traffic density of the road section; a behavior analysis module, which is used to calculate the driving behavior analysis coefficient according to the driving behavior parameters of the vehicles on the road section and the preset driving behavior analysis index; a flow correction module, which is used to correct the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section; a queue detection module, which is used to obtain the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit according to a preset queue detection algorithm when the traffic density of the road section is greater than the preset road section traffic density threshold and the traffic flow of the second road section is less than the second road section traffic flow threshold The number of vehicles in the queue; a time allocation module, used to allocate traffic light time according to the number of left-turn queue vehicles and the number of straight-going queue vehicles, and obtain the digestion traffic flow of the section exit within a traffic light cycle; wherein the digestion traffic flow of the section exit includes the digestion traffic flow of the left-turn at the section exit, the digestion traffic flow of the straight-going traffic at the section exit, and the digestion traffic flow of the right-turn traffic at the section exit; a path planning module, used to ignore the section in the path algorithm in the vehicle navigation and perform path planning when the ratio of the first section traffic flow to the section exit digestion traffic flow is greater than a preset value, and meet the constraint condition that the ratio of the first section traffic flow to the section exit digestion traffic flow of each section is less than or equal to the preset value, and the beneficial effects produced include:
[0043] 1. Improve the accuracy of traffic flow management: By analyzing real-time traffic density and accurately calculating traffic flow, traffic control can be more in line with current road conditions; at the same time, combined with driving behavior analysis and environmental weather, traffic flow estimation can be corrected to enhance the accuracy and adaptability of traffic flow prediction;
[0044] 2. Optimize signal control: dynamically adjust the time allocation of traffic lights according to the actual number of vehicles in line, optimize traffic flow efficiency, and reduce traffic congestion and waiting time;
[0045] 3. Intelligent response to abnormal traffic events: When traffic congestion is detected, the traffic route is replanned to avoid congested sections and reduce traffic delays. At the same time, the route planning can be updated in real time when specific events occur to ensure that traffic flows around problem areas.
[0046] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0048] Figure 1 A schematic diagram of the structure of an intelligent traffic diversion system applicable to highway engineering, shown as an exemplary embodiment of the present invention;
[0049] Figure 2 The present invention is a flowchart of an intelligent traffic diversion method applicable to highway engineering, showing an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0051] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0052] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0053] Embodiment 1
[0054] Intelligent traffic management system for highway projects, such as Figure 1 As shown, it includes a flow calculation module, a behavior analysis module, a flow correction module, a queue detection module, a time allocation module and a path planning module;
[0055] A traffic flow calculation module, used for calculating the traffic flow of the first road section according to the road section traffic density on the road section;
[0056] A behavior analysis module, used to calculate a driving behavior analysis coefficient based on driving behavior parameters of vehicles on a road section and a preset driving behavior analysis index;
[0057] A traffic flow correction module, used to correct the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section;
[0058] A queue detection module, configured to obtain the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit according to a preset queue detection algorithm when the road section traffic density is greater than a preset road section traffic density threshold and the second road section traffic flow is less than a second road section traffic flow threshold;
[0059] A time allocation module is used to allocate traffic light time according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-through queue, and obtain the digested traffic flow at the road section exit within a traffic light cycle; wherein the digested traffic flow at the road section exit includes the digested traffic flow at the road section exit for left-turn, the digested traffic flow at the road section exit for straight-through traffic, and the digested traffic flow at the road section exit for right-turn;
[0060] A path planning module is used to ignore the section in the path algorithm in vehicle navigation and perform path planning when the ratio of the traffic flow of the first section to the traffic flow digested at the section exit is greater than a preset value, and to meet the constraint condition that the ratio of the traffic flow of the first section to the traffic flow digested at the section exit of each section is less than or equal to a preset value.
[0061] Specifically, the traffic flow calculation module is used to calculate the actual traffic flow of the road section according to the traffic density actually measured on the road section.
[0062] According to the actually measured traffic density on the road section, the actual traffic flow on the road section, i.e., the first road section traffic flow, can be obtained by using the pre-selected traffic density-road section average speed relationship or the first road section traffic flow model pre-trained through historical data sets.
[0063] The behavior analysis module is used to analyze the actual driving behavior of vehicles on the road section, including the length of time the vehicle crosses the line, the number of lane changes and the number of emergency brakes, and calculate the driving behavior analysis coefficient using the preset driving behavior analysis index. The driving behavior analysis coefficient reflects the safety and efficiency of driving behavior.
[0064] The traffic correction module is used to adjust the actual traffic flow initially calculated using the driving behavior analysis coefficient obtained by the behavior analysis module and the current environmental weather conditions; the queue detection module is used to determine the number of left-turning and straight-ahead vehicles queuing at the exit of a certain section of road using a preset queue detection algorithm when the traffic density of the section exceeds a preset threshold and the traffic flow is lower than another threshold.
[0065] The time allocation module is based on the data provided by the queue detection module. The time allocation module adjusts the duration of the traffic signal to optimize the efficiency of vehicles passing through the intersection. The adjustment of the time allocation module relies on real-time data, aiming to reduce the waiting time for parking and improve the traffic capacity of the road section. Furthermore, the traffic density of the road section is greater than the preset threshold, indicating that the vehicle density of the road section is high. The higher the density, the closer the distance between vehicles, usually the slower the speed, and congestion may be gradually forming; at the same time, the traffic flow of the second road section is lower than the preset threshold, indicating that despite the high vehicle density of the road section, the vehicles do not flow smoothly into the next road section, indicating that there is a bottleneck or obstruction, which prevents vehicles from passing at a normal speed or number; the left-turn digestion traffic flow refers to the number of left-turn vehicles passing through the intersection of the road section, the straight traffic digestion traffic flow at the road section exit refers to the number of straight vehicles passing through the intersection of the road section, and the right-turn traffic digestion traffic flow at the road section exit refers to the number of right-turn vehicles passing through the intersection of the road section.
[0066] The route planning module is used to ignore the first road section and provide a new driving route for the driver when the ratio of the traffic flow of the first road section to the traffic flow that can be handled by the exit of the road section exceeds the preset value. It ensures that the traffic flow of each road section and the exit handling capacity are kept within a reasonable ratio range, effectively avoiding delays caused by traffic congestion.
[0067] The present invention is further configured that the intelligent traffic diversion system further includes: a road section traffic density-road section average speed relationship creation module; the road section traffic density-road section average speed relationship creation module includes: a road section traffic density and average speed calculation unit, a traffic density matrix construction unit, an average speed matrix construction unit, a coefficient matrix construction unit and a relationship formula generation unit; wherein,
[0068] The section traffic density and average speed calculation unit is used to calculate the section traffic density and the section average speed according to the number of vehicles on the section and the average speed of vehicles on the section in the historical data, wherein the calculation logic of the section traffic density is: ρ is the traffic density of the road section, n is the number of vehicles on the road section, and L is the length of the road section; the calculation logic of the average speed of the road section is: is the average speed of the road section, is the average speed of vehicles on the road section; specifically, the traffic density of a road section is defined as the number of vehicles per unit length of the road section. Furthermore, the number of vehicles entering the road section is obtained at the entrance of the road section, the number of vehicles leaving the road section is obtained at the exit of the road section, and the number of vehicles on the road section is obtained by subtracting the number of vehicles leaving the road section from the number of vehicles entering the road section; the average speed of vehicles on the road section is the average speed of a single vehicle passing through the road section, and the value of the average speed of vehicles on the road section can be achieved by setting the interval speed measurement on the road section;
[0069] The traffic density matrix construction unit is used to construct a road section traffic density matrix X according to the road section traffic density, wherein for the j-th road section traffic density value, the j-th row of the road section traffic density matrix X is generated, which is Among them, ρ j is the traffic density value of the jth road section, l is the degree of the polynomial regression model, the value of l is [1,...,∞], and is a natural number. When l is 1, the traffic density of the road section is linearly related to the average speed of the road section;
[0070] The average speed matrix construction unit is used to construct a section average speed matrix y according to the section average speed, wherein the section average speed matrix y is is the average speed of the road section corresponding to the traffic density value of the jth road section;
[0071] The coefficient matrix building unit is used to construct the coefficient matrix according to the coefficient equation θ = (X T X) -1 X T y, calculate the coefficient matrix θ, where the coefficient matrix θ is [θ0, θ1,, ..., θ j ];
[0072] A relationship formula generating unit is used to generate a relationship formula between the traffic density of a section and the average speed of a section according to the coefficient matrix θ, wherein the relationship formula between the traffic density of a section and the average speed of a section is: in, To predict the average speed of a road section, ρ is the traffic density of the road section. Specifically, the average speed of a road section can be predicted in real time according to the traffic density of the road section through the relationship formula of the traffic density of the road section, which greatly improves the data processing effect. If the average speed of the road section is obtained by setting an interval speed measurement, the traffic flow of the road section can only be obtained at the end point of the interval speed measurement. The lag of the traffic flow of the road section is solved by the relationship formula of the traffic density of the road section and the average speed of the road section.
[0073] The present invention is further configured that the traffic flow calculation module includes: a road section average speed prediction unit and a first road section traffic flow calculation unit; wherein,
[0074] The road section average speed prediction unit is used to calculate the predicted road section average speed based on the road section traffic density ρ on the current road section and the road section traffic density-road section average speed relationship.
[0075] The first section traffic flow calculation unit is used to calculate the traffic flow of the first section according to the traffic density ρ of the section and the average speed of the predicted section. Calculate the traffic flow of the first road section, wherein the calculation logic of the traffic flow of the first road section is: Among them, Q1 is the traffic flow of the first road section; specifically, the road section traffic flow refers to the number of vehicles passing through a certain point or a certain section of road in a unit time. The road section traffic flow provides comprehensive information on traffic volume and speed, while traffic density (i.e. the number of vehicles per unit length) can only provide information about the density of vehicles. The road section traffic flow data can more comprehensively reflect the road usage and traffic conditions.
[0076] The present invention is further configured that the intelligent traffic diversion system further includes: a model training module; the model training module includes: a data set acquisition unit and a model training unit; wherein,
[0077] A data set acquisition unit, used for dividing the acquired historical road section traffic density data set and the first road section traffic flow data set corresponding to the historical road section traffic density data set into a training set, a validation set and a test set for model training;
[0078] The model training unit is used to set the road section traffic density as the input feature of the input layer, set the first road section traffic flow as the output feature of the output layer, and use the ReLU function as the activation function of the hidden layer in the preset neural network model, and use the training set to perform model training on the preset neural network model until the training meets the training cycle or meets the evaluation performance of the test set, so as to obtain the first road section traffic flow model; wherein, in the process of using the training set to perform model training on the preset neural network model, the weighted time-dependent mean square error is used as the loss function of the regression task, wherein the calculation logic of the loss function is: Among them, Loss is the loss function, N is the total number of samples in the training set, ρ i is the actual traffic flow of the first section of the i-th sample, is the predicted traffic flow of the first road section of the i-th sample, wi is the weight of the i-th sample, and the calculation logic of wi is: t i is the time of the i-th sample, and δ is the time correction coefficient; specifically, the purpose of using the weighted time-dependent mean square error as the loss function of the regression task is to improve the accuracy of the prediction during peak hours or under specific conditions, which is achieved by assigning different weights to the prediction errors in different periods.
[0079] The present invention is further configured that the traffic flow calculation module includes a first road section traffic flow acquisition unit; wherein,
[0080] The first road section traffic flow acquisition unit is used to input the road section traffic density on the road section into the first road section traffic flow model, and the first road section traffic flow model outputs the first road section traffic flow.
[0081] The present invention is further configured that the driving behavior analysis coefficient is calculated according to the driving behavior parameters of the vehicle on the road section and the preset driving behavior analysis index, including:
[0082] The calculating of the driving behavior analysis coefficient according to the driving behavior parameters of the vehicle on the road section and the preset driving behavior analysis index includes:
[0083] The driving behavior parameters of the vehicle on the road section, including the driving time of the vehicle on the road, the number of lane changes and the number of emergency brakes, are obtained and normalized, and then brought into the preset driving behavior analysis index to calculate the driving behavior analysis coefficient, wherein the calculation logic of the driving behavior analysis index is: Idb = e α*tlr+β*nlc+γ*neb-1 +1, where Idb is the driving behavior analysis coefficient, e is a natural constant, tlr is the time the vehicle is driving on the line, nlc is the number of lane changes, neb is the number of emergency brakes, α, β and γ are the weight coefficients of the time the vehicle is driving on the line, the number of lane changes and the number of emergency brakes, and α, β and γ are all greater than 0; specifically, the time the vehicle is driving on the line, the number of lane changes and the number of emergency brakes can be collected through traffic monitoring equipment or vehicle-mounted sensors. In order to ensure the rationality of the comparison and combination of different driving behavior parameters in statistical analysis, the collected data needs to be normalized. Normalization can scale the data to a uniform range (between 0 and 1), making the calculation more fair and avoiding excessive influence of some parameters with large values on the results.
[0084] The present invention is further configured that the traffic flow of the first road section is corrected according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section, and the correction logic is: Wherein, Q2 is the traffic flow of the second road section, σ is the environmental factor of the current environmental weather, and the value range of the environmental factor is [0.5, 1]; specifically, the environmental factor σ is set to different values according to different weather conditions, reflecting the influence of weather conditions on traffic flow. In one embodiment of the present invention, it is set to 1 in sunny weather, 0.8 in rainy days, and 0.5 in blizzard days. The environmental factor σ reflects the influence of different weather on the traffic flow of the road section, and the specific value is not restricted here; the calculated driving behavior analysis coefficient reflects the quality and safety of driving behavior, and a higher calculated driving behavior analysis coefficient value indicates poor driving behavior, thereby affecting traffic smoothness. By making corrections through the environmental factors of the current environmental weather and the calculated driving behavior analysis coefficient, the system can more accurately predict and regulate traffic flow, especially under complex or changeable environmental and behavioral conditions.
[0085] The present invention is further configured such that the preset queuing detection algorithm comprises:
[0086] Continuously capture video frames of the queuing area at the road section exit, and perform grayscale conversion and smoothing filtering on the video frames;
[0087] Calculate the difference between frames, where the calculation logic of the difference between frames is D(x, y) = |f k (x, y)-f k-m (x, y)|, where (x, y) is the pixel point, f k (x, y) is the current frame, f k-m (x, y) is the frame before time interval m, and D(x, y) is the difference between frames;
[0088] Calculate an optimal threshold value by Otsu method, and convert the inter-frame difference into a binary image according to the optimal threshold value, wherein moving pixels are 1 and stationary pixels are 0;
[0089] Use the connected component labeling algorithm to label continuous static areas, use the inter-frame tracking algorithm to track the static areas, calculate the pixel area of the static areas, and obtain the number of queued vehicles; specifically, use the connected component labeling algorithm in the binary image to identify and label all continuous static areas. The static areas represent queued vehicles, and the inter-frame tracking technology in image processing is used to track the changes of static areas in continuous frames to ensure continuity and accuracy. By calculating the total pixel area of the areas marked as static, the length of the queue area can be estimated, and the number of queued vehicles can be obtained by estimating the average length of the vehicles.
[0090] The present invention is further configured such that the path planning module includes an event detection unit;
[0091] The event detection unit is used to determine whether there is a marked event on the target road section. When there is a marked event on the road section, the road section is ignored in the path algorithm in the vehicle navigation and path planning is performed, and the constraint condition that the ratio of the road section traffic flow to the road section exit digestion traffic flow of each road section is less than or equal to a preset value is satisfied; when there is no marked event on the road section, the road section participates in the path planning of the path algorithm in the vehicle navigation, wherein the marked event is used to mark the existence of an event that the current road section is impassable; specifically, the system first identifies and records the road sections that are temporarily or permanently impassable due to special events, and special events include traffic accidents, road construction, natural disasters, etc., which cause the road sections to be temporarily or permanently closed; when the system finds that a road section has a marked event during path planning, the road section will be automatically excluded from possible driving routes; the algorithm will recalculate alternative routes to avoid the marked impassable road sections.
[0092] Embodiment 2
[0093] See also Figure 2 The exemplary intelligent traffic diversion method applicable to highway engineering includes:
[0094] Calculating the traffic flow of the first road section according to the road section traffic density on the road section;
[0095] Calculating a driving behavior analysis coefficient according to driving behavior parameters of vehicles on the road section and a preset driving behavior analysis index;
[0096] Correcting the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section;
[0097] When the traffic density of the road section is greater than a preset road section traffic density threshold and the traffic flow of the second road section is less than a second road section traffic flow threshold, the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit are obtained according to a preset queue detection algorithm;
[0098] Traffic light time is allocated according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-ahead queue, and the traffic flow digestion at the road section exit within a traffic light cycle is obtained; wherein the traffic flow digestion at the road section exit includes the traffic flow digestion at the road section exit for left-turn, the traffic flow digestion at the road section exit for straight-ahead traffic, and the traffic flow digestion at the road section exit for right-turn;
[0099] When the ratio of the traffic flow of the second section to the traffic flow digested at the section exit is greater than a preset value, the section is ignored in the path algorithm in the vehicle navigation and path planning is performed, and the constraint condition that the ratio of the traffic flow of the first section of each section to the traffic flow digested at the section exit is less than or equal to the preset value is satisfied.
[0100] It should be noted that the intelligent traffic diversion method applicable to highway engineering provided in the above embodiment and the intelligent traffic diversion system applicable to highway engineering provided in the above embodiment belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the embodiment and will not be repeated here. In actual applications, the intelligent traffic diversion method applicable to highway engineering provided in the above embodiment can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0101] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0102] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0103] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0104] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0105] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0106] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0107] In the several embodiments provided in the present application, it should be understood that the disclosed system can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0110] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An intelligent traffic diversion system applicable to highway engineering, characterized by: It includes flow calculation module, behavior analysis module, flow correction module, queue detection module, time allocation module and path planning module; A traffic flow calculation module, used for calculating the traffic flow of the first road section according to the road section traffic density on the road section; A behavior analysis module, used to calculate a driving behavior analysis coefficient based on driving behavior parameters of vehicles on a road section and a preset driving behavior analysis index; A traffic flow correction module, used to correct the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section; A queue detection module, configured to obtain the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit according to a preset queue detection algorithm when the road section traffic density is greater than a preset road section traffic density threshold and the second road section traffic flow is less than a second road section traffic flow threshold; A time allocation module is used to allocate traffic light time according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-through queue, and obtain the digested traffic flow at the road section exit within a traffic light cycle; wherein the digested traffic flow at the road section exit includes the digested traffic flow at the road section exit for left-turn, the digested traffic flow at the road section exit for straight-through traffic, and the digested traffic flow at the road section exit for right-turn; A path planning module is used to ignore the section in the path algorithm in vehicle navigation and perform path planning when the ratio of the traffic flow of the first section to the traffic flow digested at the section exit is greater than a preset value, and to meet the constraint condition that the ratio of the traffic flow of the first section to the traffic flow digested at the section exit of each section is less than or equal to a preset value.
2. The intelligent traffic diversion system applicable to highway engineering according to claim 1 is characterized in that: The intelligent traffic diversion system also includes: a road section traffic density-road section average speed relationship creation module; the road section traffic density-road section average speed relationship creation module includes: a road section traffic density and average speed calculation unit, a traffic density matrix construction unit, an average speed matrix construction unit, a coefficient matrix construction unit and a relationship formula generation unit; wherein, The section traffic density and average speed calculation unit is used to calculate the section traffic density and the section average speed according to the number of vehicles on the section and the average speed of vehicles on the section in the historical data, wherein the calculation logic of the section traffic density is: ρ is the traffic density of the road section, n is the number of vehicles on the road section, and L is the length of the road section; the calculation logic of the average speed of the road section is: is the average speed of the road section, is the average speed of vehicles on the road section; The traffic density matrix construction unit is used to construct a road section traffic density matrix X according to the road section traffic density, wherein for the j-th road section traffic density value, the j-th row of the road section traffic density matrix X is generated, which is Among them, ρ j is the traffic density value of the jth road section, l is the degree of the polynomial regression model, the value of l is [1, ..., ∞], and is a natural number. When l is 1, the traffic density of the road section is linearly related to the average speed of the road section; The average speed matrix construction unit is used to construct a section average speed matrix y according to the section average speed, wherein the section average speed matrix y is is the average speed of the road section corresponding to the traffic density value of the jth road section; The coefficient matrix building unit is used to construct the coefficient matrix according to the coefficient equation θ = (X T X) -1 X T y, calculate the coefficient matrix θ, where the coefficient matrix θ is [θ0, θ1,, ..., θ j ]; A relationship formula generating unit is used to generate a relationship formula between the traffic density of a section and the average speed of a section according to the coefficient matrix θ, wherein the relationship formula between the traffic density of a section and the average speed of a section is: in, is the average speed of the predicted road section, and ρ is the traffic density of the road section.
3. The intelligent traffic diversion system applicable to highway engineering according to claim 2 is characterized in that: The traffic flow calculation module includes: a road section average speed prediction unit and a first road section traffic flow calculation unit; wherein, The road section average speed prediction unit is used to calculate the predicted road section average speed based on the road section traffic density ρ on the current road section and the road section traffic density-road section average speed relationship. The first section traffic flow calculation unit is used to calculate the traffic flow of the first section according to the traffic density ρ of the section and the average speed of the predicted section. Calculate the traffic flow of the first road section, wherein the calculation logic of the traffic flow of the first road section is: Among them, Q1 is the traffic flow of the first section.
4. The intelligent traffic diversion system applicable to highway engineering according to claim 1 is characterized in that: The intelligent traffic diversion system further includes: a model training module; the model training module includes: a data set acquisition unit and a model training unit; wherein, A data set acquisition unit, used for dividing the acquired historical road section traffic density data set and the first road section traffic flow data set corresponding to the historical road section traffic density data set into a training set, a validation set and a test set for model training; The model training unit is used to set the road section traffic density as the input feature of the input layer, set the first road section traffic flow as the output feature of the output layer, and use the ReLU function as the activation function of the hidden layer in the preset neural network model, and use the training set to perform model training on the preset neural network model until the training meets the training cycle or meets the evaluation performance of the test set, so as to obtain the first road section traffic flow model; wherein, in the process of using the training set to perform model training on the preset neural network model, the weighted time-dependent mean square error is used as the loss function of the regression task, wherein the calculation logic of the loss function is: Among them, Loss is the loss function, N is the total number of samples in the training set, ρ i is the actual traffic flow of the first section of the i-th sample, is the predicted traffic flow of the first road section of the i-th sample, wi is the weight of the i-th sample, and the calculation logic of wi is: t i is the time of the ith sample, and δ is the time correction coefficient.
5. The intelligent traffic diversion system applicable to highway engineering according to claim 4 is characterized in that: The traffic flow calculation module includes a first section traffic flow acquisition unit; wherein, The first road section traffic flow acquisition unit is used to input the road section traffic density on the road section into the first road section traffic flow model, and the first road section traffic flow model outputs the first road section traffic flow.
6. The intelligent traffic diversion system applicable to highway engineering according to claim 1 is characterized in that: The calculating of the driving behavior analysis coefficient according to the driving behavior parameters of the vehicle on the road section and the preset driving behavior analysis index includes: The driving behavior parameters of the vehicle on the road section, including the driving time of the vehicle on the road, the number of lane changes and the number of emergency brakes, are obtained and normalized, and then brought into the preset driving behavior analysis index to calculate the driving behavior analysis coefficient, wherein the calculation logic of the driving behavior analysis index is: Idb = e α*tlr+β*nlc+γ*neb-1 +1, where Idb is the driving behavior analysis coefficient, e is a natural constant, tlr is the time the vehicle is driving on the line, nlc is the number of lane changes, neb is the number of emergency brakes, α, β and γ are the weight coefficients of the time the vehicle is driving on the line, the number of lane changes and the number of emergency brakes, respectively, and α, β and γ are all greater than 0.
7. The intelligent traffic diversion system applicable to highway engineering according to claim 6 is characterized in that: The traffic flow of the first road section is corrected according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section. The correction logic is: Among them, Q2 is the traffic flow of the second road section, σ is the environmental factor of the current environmental weather, and the value range of the environmental factor is [0.5, 1].
8. The intelligent traffic diversion system applicable to highway engineering according to claim 1 is characterized in that: The preset queue detection algorithm includes: Continuously capture video frames of the queuing area at the road section exit, and perform grayscale conversion and smoothing filtering on the video frames; Calculate the difference between frames, where the calculation logic of the difference between frames is D(x, y) = |f k (x,y)-f k-m (x, y)|, where (x, y) is the pixel point, f k (x, y) is the current frame, f k-m (x, y) is the frame before time interval m, and D(x, y) is the difference between frames; Calculate an optimal threshold value by Otsu method, and convert the inter-frame difference into a binary image according to the optimal threshold value, wherein moving pixels are 1 and stationary pixels are 0; A connected component labeling algorithm is used to label continuous static areas, an inter-frame tracking algorithm is used to track the static areas, the pixel areas of the static areas are calculated, and the number of queued vehicles is obtained.
9. The intelligent traffic diversion system applicable to highway engineering according to claim 1 is characterized in that: The path planning module includes an event detection unit; The event detection unit is used to determine whether there is a marked event on the target road section. When there is a marked event on the road section, the road section is ignored in the path algorithm in the vehicle navigation and the path planning is performed, and the constraint condition that the ratio of the road section traffic flow of each road section to the digested traffic flow at the road section exit is less than or equal to a preset value is satisfied; When there is no marking event on the road section, the road section participates in the path planning of the path algorithm in the vehicle navigation, wherein the marking event is used to mark the existence of an impassable event on the current road section.
10. An intelligent traffic diversion method applicable to highway engineering, characterized in that: include: Calculating the traffic flow of the first road section according to the road section traffic density on the road section; Calculating a driving behavior analysis coefficient according to driving behavior parameters of vehicles on the road section and a preset driving behavior analysis index; Correcting the traffic flow of the first road section according to the driving behavior analysis coefficient and the current environmental weather to obtain the traffic flow of the second road section; When the traffic density of the road section is greater than a preset road section traffic density threshold and the traffic flow of the second road section is less than a second road section traffic flow threshold, the number of left-turn queued vehicles and the number of straight-ahead queued vehicles at the road section exit are obtained according to a preset queue detection algorithm; Traffic light time is allocated according to the number of vehicles in the left-turn queue and the number of vehicles in the straight-ahead queue, and the traffic flow digestion at the road section exit within a traffic light cycle is obtained; wherein the traffic flow digestion at the road section exit includes the traffic flow digestion at the road section exit for left-turn, the traffic flow digestion at the road section exit for straight-ahead traffic, and the traffic flow digestion at the road section exit for right-turn; When the ratio of the traffic flow of the second section to the traffic flow digested at the section exit is greater than a preset value, the section is ignored in the path algorithm in the vehicle navigation and path planning is performed, and the constraint condition that the ratio of the traffic flow of the first section of each section to the traffic flow digested at the section exit is less than or equal to the preset value is satisfied.