CN119207100B - Real-time identification method, device and system for adverse traffic conditions - Google Patents
Real-time identification method, device and system for adverse traffic conditions Download PDFInfo
- Publication number
- CN119207100B CN119207100B CN202411709160.3A CN202411709160A CN119207100B CN 119207100 B CN119207100 B CN 119207100B CN 202411709160 A CN202411709160 A CN 202411709160A CN 119207100 B CN119207100 B CN 119207100B
- Authority
- CN
- China
- Prior art keywords
- data
- traffic
- point
- road traffic
- weight
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0125—Traffic data processing
- G08G1/0129—Traffic data processing for creating historical data or processing based on historical data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/10—Pre-processing; Data cleansing
- G06F18/15—Statistical pre-processing, e.g. techniques for normalisation or restoring missing data
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0499—Feedforward networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G08—SIGNALLING
- G08G—TRAFFIC CONTROL SYSTEMS
- G08G1/00—Traffic control systems for road vehicles
- G08G1/01—Detecting movement of traffic to be counted or controlled
- G08G1/0104—Measuring and analyzing of parameters relative to traffic conditions
- G08G1/0137—Measuring and analyzing of parameters relative to traffic conditions for specific applications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Molecular Biology (AREA)
- Computational Linguistics (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Probability & Statistics with Applications (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a method, a device and a system for identifying unfavorable traffic states in real time, wherein the method for identifying the unfavorable traffic states in real time comprises the steps of sending acquired historical road traffic data to a pre-trained traffic state identification model to obtain a traffic state evaluation result of each monitoring point, wherein the traffic state identification model is a multilayer perceptron model based on Swish activation functions, comprises an input layer, a plurality of hidden layers and an output layer, the layers are connected in a full-connection mode, a cross verification technology is adopted to adjust super parameters in the training process of the traffic state identification model, and a threshold judgment method is used for determining a region with congestion or potential risks based on the traffic state evaluation result of each monitoring point. The invention can realize high-precision real-time identification in complex and changeable urban traffic environments, discover and early warn unfavorable traffic conditions in time, and improve the efficiency and safety of traffic management.
Description
Technical Field
The invention belongs to the technical field of intelligent traffic, and particularly relates to a method, a device and a system for identifying unfavorable traffic states in real time.
Background
In recent years, with the acceleration of the urban process, traffic jam and safety problems are increasingly highlighted, and an intelligent traffic system (INTELLIGENT TRANSPORTATION SYSTEM, ITS) realizes the real-time acquisition, processing, analysis and release of traffic information by integrating information technology, communication technology, sensing technology and automation technology, so that the traffic efficiency and safety are remarkably improved. However, conventional traffic condition recognition methods rely on fixed thresholds and rules, appear static, lagging and have insufficient accuracy in coping with dynamically changing traffic environments. Although machine learning techniques, such as decision trees, random forests, support vector machines, etc., improve the recognition effect to some extent through historical data learning, limitations still exist in processing high-dimensional, nonlinear data, and it is difficult to meet the requirements of real-time recognition.
In contrast, deep learning techniques, particularly multi-layer perceptrons (Multilayer Perceptron, MLP) incorporating Swish activation functions, can provide higher predictive accuracy and real-time when processing complex traffic data, by virtue of their powerful automatic feature learning capabilities and smooth, non-monotonic characteristics, becoming an ideal choice for identifying adverse traffic conditions in real time.
Disclosure of Invention
Aiming at the problems, the invention provides a method, a device and a system for identifying the unfavorable traffic state in real time, which can realize high-precision real-time identification in complex and changeable urban traffic environments, discover and early warn the unfavorable traffic state in time and improve the efficiency and the safety of traffic management.
In order to achieve the technical purpose and achieve the technical effect, the invention is realized by the following technical scheme:
In a first aspect, the present invention provides a method for identifying an adverse traffic state in real time, including:
The method comprises the steps of sending acquired historical road traffic data to a pre-trained traffic state identification model to obtain a traffic state evaluation result of each monitoring point, wherein the traffic state identification model is a multi-layer perceptron model based on Swish activation functions, and comprises an input layer, a hidden layer and an output layer, all layers are connected in a full-connection mode, and the cross-validation technology is adopted to adjust super parameters in the training process of the traffic state identification model;
And determining the area with congestion or potential risk by using a threshold judgment method based on the traffic state evaluation result of each monitoring point.
With reference to the first aspect, optionally, the method for acquiring historical road traffic data includes:
Acquiring original road traffic data;
Data fusion is carried out on the original road traffic data, and data from different sources are integrated into a unified data stream to obtain first road traffic data;
Cleaning the first road traffic data, removing invalid data points, and filling missing values to obtain second road traffic data;
And extracting the characteristics of the second road traffic data to obtain historical road traffic data.
With reference to the first aspect, optionally, in removing invalid data points, a calculation formula is used as follows:
;
Wherein, Is normalized firstA data point is provided for each of the data points,Is the firstThe original value of the data point is set,Is the firstData pointsIs used for the weight of the (c),Is a weighted average value of the values,Is the weighted standard deviation ifThen considerAs an invalid data point,Is the threshold value of the threshold,The total number of data points.
With reference to the first aspect, optionally, in filling the missing value, a calculation formula is adopted as follows:
;
Wherein, Is the timestamp of the previous valid data point,Is the timestamp of the last valid data point,Is the time stamp of the data point that needs to be interpolated,Is the weight of the previous valid data point,Is the weight of the last valid data point,Is the weight of the adjusted previous valid data point,Is the weight of the adjusted last valid data point,Is the value of the previous valid data point,Is the value of the last valid data point,Is the interpolated value.
With reference to the first aspect, optionally, the feature extracting the second road traffic data includes:
calculating the traffic density of each monitoring point based on the second road traffic data ,Wherein, the method comprises the steps of, wherein,Is the firstEach monitoring point is at timeReflecting the density of vehicles on the road; is the first The first monitoring pointWeights of types of vehicles; Is at the time of First, theThe first monitoring pointA number of types of vehicles; Is at the time of First, theThe first monitoring pointRoad effective capacity of the type of vehicle;
traffic density based on the second road traffic data and each monitoring point And gradually removing the least relevant features by using a recursive feature elimination algorithm to generate feature vectors as historical road traffic data, wherein a selection formula adopted by the recursive feature elimination algorithm is as follows: Wherein, the method comprises the steps of, wherein, Is an initial set of features that are selected,Is the number of features selected.
With reference to the first aspect, optionally, the input layer of the multi-layer perceptron model receives feature vectorsWherein the feature vectorComprisesA plurality of features;
the hidden layer contains neurons of a preset number, and a formula adopted when the hidden layer processes data is as follows: Wherein, the method comprises the steps of, wherein, Represents the hidden layerThe output of the individual neurons is referred to as,Is the input feature vectorThe characteristics of the device are that,Is the Swish activation function of the device,Is the weight matrix representation from the input layerFrom the personal node to the hidden layerThe connection weight of the individual neurons,Is the hidden layerBias term of individual neurons Swish activation functionThe expression of (2) is:,,, Is a Sigmoid function;
The output end of the hidden layer is provided with Batch Normalization layers, and Batch Normalization layers output each neuron Normalization and then by means of a learnable parameterAndScaling and translating to obtain final normalized outputThe calculation formula adopted by Batch Normalization layers is as follows:
;
Wherein, Is the hidden layerThe output of the individual neurons is referred to as,AndThe mean and the variance are respectively given,Is a constant, preferably,AndIs a learnable parameter;
the output layer contains a neuron, directly outputs traffic density, using a linear activation function:
Wherein, In order to be a traffic density,Is a weight matrix of the output layer, representing the connection weights from each neuron of the last hidden layer to the output layer; Is the output of the hidden layer and, Is a bias term for the output layer.
With reference to the first aspect, optionally, when performing multi-layer perceptron model training, the method includes the following steps:
initializing parameters and initializing weights Bias and method of making same;
Forward propagation, calculating predictive probability of output layer;
The loss is calculated using the mean square error as the loss function:
Wherein, Is a true value of the code,Is a predicted value of the current value,Is the number of samples;
counter-propagating, calculating gradients, and updating parameters:
Wherein, Is the learning rate;
iterative training, repeating forward propagation and backward propagation until convergence or maximum iteration number is reached;
the hyper-parameters of the multi-layer perceptron model are obtained through the following steps:
dividing the data set into K subsets;
K-fold cross verification, taking each subset as a verification set and the rest subsets as training sets in sequence;
and calculating an accuracy evaluation index of the multi-layer perceptron model, and continuously adjusting the super parameters.
With reference to the first aspect, optionally, the method for calculating the threshold value of the traffic density in the threshold value judging method includes:
calculating the mean value of traffic density And standard deviation:
;
Wherein, Is the firstEach monitoring point is at timeIs used for the traffic density of the vehicle,Is the total number of monitoring points;
Mean value based on traffic density And standard deviationDetermining a threshold for traffic densityThe threshold valueThe calculation formula of (2) is as follows:
;
Wherein, Is an empirical factor.
In a second aspect, the present invention provides a real-time identification device for unfavorable traffic conditions, comprising:
The traffic state identification model is a multilayer perceptron model based on Swish activation functions and comprises an input layer, a plurality of hidden layers and an output layer, wherein the layers are connected in a full-connection mode, and a cross verification technology is adopted to adjust super parameters in the training process of the traffic state identification model;
And the risk identification module is used for determining the area with the congestion or potential risk by using a threshold judgment method based on the traffic state evaluation result of each monitoring point.
In a third aspect, the present invention provides a real-time identification system for adverse traffic conditions, comprising a storage medium and a processor;
the storage medium is used for storing instructions;
The processor is configured to operate in accordance with the instructions to perform the method according to any one of the first aspects.
Compared with the prior art, the invention has the beneficial effects that:
The model can better fit the complex nonlinear relation by using Swish to activate the function, so that the prediction accuracy of unfavorable traffic states is improved, and the non-monotonicity and smoothness of the Swish function are beneficial to capturing fine changes in traffic data, so that the model is more accurate in identifying traffic jam, accidents and other situations.
The invention can complete the processing and analysis of a large amount of real-time data in a short time by utilizing the efficient forward propagation algorithm, thereby realizing the real-time identification of unfavorable traffic conditions, which is helpful for traffic management departments to discover and cope with the emergency in time and reduce traffic delay and potential safety hazard.
The Swish multilayer perceptron can automatically learn and extract useful features in high-dimensional traffic data, reduce the dependence on artificial feature engineering, and enhance the generalization capability of the model, which means that the model not only can perform well on training data, but also can keep higher identification precision on new data which are not seen.
The invention simplifies the process of characteristic engineering and reduces the workload of data preprocessing by the automatic characteristic learning capability of the multi-layer perceptron (MLP), and the model can automatically extract the characteristics valuable for traffic state identification from the original data, thereby improving the efficiency of the whole work.
The model based on deep learning can dynamically adjust the prediction model according to real-time data and adapt to continuously changing traffic environment, so that the system can keep higher identification accuracy at different time and place, and the flexibility and the robustness of the system are enhanced.
Drawings
For a clearer description of an embodiment of the invention or of the solutions of the prior art, the drawings that are needed in the embodiment will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art, in which:
FIG. 1 is a block diagram of a method for identifying adverse traffic conditions in real time according to an embodiment of the present invention;
fig. 2 is a flow chart illustrating a method for determining a threshold value.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Example 1
The embodiment of the invention provides a method for identifying unfavorable traffic states in real time, which comprises the following steps:
(1) The method comprises the steps of sending acquired historical road traffic data to a pre-trained traffic state identification model to obtain a traffic state evaluation result of each monitoring point, wherein the traffic state identification model is a multi-layer perceptron model based on Swish activation functions, and comprises an input layer, a plurality of hidden layers and an output layer, all layers are connected in a full-connection mode, and the super-parameters are adjusted by adopting a cross verification technology in the training process of the traffic state identification model;
(2) And determining the area with congestion or potential risk by using a threshold judgment method based on the traffic state evaluation result of each monitoring point.
In a specific implementation manner of the embodiment of the present invention, the method for obtaining historical road traffic data includes:
Acquiring original road traffic data;
Data fusion is carried out on the original road traffic data, and data from different sources are integrated into a unified data stream to obtain first road traffic data;
Cleaning the first road traffic data, removing invalid data points, and filling missing values to obtain second road traffic data;
And extracting the characteristics of the second road traffic data to obtain historical road traffic data.
Wherein, when invalid data points are removed, the adopted calculation formula is as follows:
;
Wherein, Is a data point after the normalization,Is the firstThe original value of the data point is set,Is the firstData pointsIs used for the weight of the (c),Is a weighted average value of the values,Is the weighted standard deviation ifThen considerAs an invalid data point,Is the threshold value of the threshold,The total number of data points.
And in filling the missing value, adopting a calculation formula as follows:
;
Wherein, Is the timestamp of the previous valid data point,Is the timestamp of the last valid data point,Is the point in time at which interpolation is required,Is the weight of the previous valid data point,Is the weight of the last valid data point,Is the weight of the adjusted previous valid data point,Is the weight of the adjusted last valid data point,Is the value of the previous valid data point,Is the value of the last valid data point,Is the interpolated value.
The feature extraction of the second road traffic data includes:
calculating the traffic density of each monitoring point based on the second road traffic data ,Wherein, the method comprises the steps of, wherein,Is the firstEach monitoring point is at timeReflecting the density of vehicles on the road; is the first The first monitoring pointWeights of types of vehicles; Is at the time of Inner firstThe first monitoring pointA number of types of vehicles; Is at the time of Inner firstThe first monitoring pointRoad effective capacity of the type of vehicle;
traffic density based on the second road traffic data and each monitoring point And gradually removing the least relevant features by using a recursive feature elimination algorithm to generate feature vectors as historical road traffic data, wherein a selection formula adopted by the recursive feature elimination algorithm is as follows: Wherein, the method comprises the steps of, wherein, Is an initial set of features that are selected,Is the number of features selected.
In one embodiment of the present invention, the input layer of the multi-layer perceptron model receives feature vectorsWherein the feature vectorComprisesA plurality of features;
the hidden layer contains neurons of a preset number, and a formula adopted when the hidden layer processes data is as follows: Wherein, the method comprises the steps of, wherein, Represents the hidden layerThe output of the individual neurons is referred to as,Is the input feature vectorThe characteristics of the device are that,Is the Swish activation function of the device,Is the weight matrix representation slaveFrom the personal node to the hidden layerThe connection weight of the individual neurons,Is the hidden layerBias term of individual neurons Swish activation functionThe expression of (2) is:,,, Is a Sigmoid function;
The output end of the hidden layer is provided with Batch Normalization layers for outputting each neuron Normalization and then by means of a learnable parameterAndScaling and translating to obtain final normalized outputThe calculation formula adopted by Batch Normalization layers is as follows:
;
Wherein, Is the hidden layerThe output of the individual neurons is referred to as,AndThe mean and variance of the small batch data,Is a very small constant,AndIs a learnable parameter;
the output layer contains a neuron, directly outputs traffic density, using a linear activation function:
Wherein, In order to be a traffic density,Is a weight matrix of the output layer, representing the connection weights from each neuron of the last hidden layer to the output layer; Is the output of the last hidden layer, Is a bias term for the output layer.
In a specific implementation manner of the embodiment of the invention, when the multi-layer perceptron model training is performed, the method comprises the following steps:
initializing parameters and initializing weights Bias and method of making same;
Forward propagation, calculating predictive probability of output layer;
Calculating the loss using a cross entropy loss function:
Wherein, Is a true value of the code,Is a predicted value of the current value,The number of samples;
counter-propagating, calculating gradients, and updating parameters:
Wherein, Is the learning rate;
Iterative training, repeating forward propagation and backward propagation until convergence or a maximum number of iterations is reached.
In a specific implementation manner of the embodiment of the present invention, the hyper-parameters of the multi-layer perceptron model are obtained through the following steps:
The dataset is divided into K subsets.
And carrying out K-fold cross verification, namely taking each subset as a verification set and the rest subsets as training sets in sequence, and training and verifying each subset.
And calculating an accuracy evaluation index of the multi-layer perceptron model, and continuously adjusting the super parameters.
The method according to the embodiment of the present invention will be described in detail with reference to a specific embodiment.
As shown in fig. 1, the method for identifying the unfavorable traffic state in real time comprises the following steps:
The first step is data acquisition, which is to acquire real-time traffic flow through various sensors (such as cameras, radars, infrared detectors, etc.) installed along the expressway Average speedLane occupancy rateInformation such as vehicle information and vehicle information obtained by vehicle-mounted communication system V2X technologyIs the position of (2)Speed and velocity ofAnd accelerationObtaining weather information, including rainfall, from a weather stationWind speedMonitoring pointVisibility of the placeThe method comprises the steps of obtaining construction information, accident reports and other aperiodic event information affecting traffic mobility from a road monitoring center, converging the multisource data through an internet of things (IoT) platform to form original road traffic data.
And secondly, carrying out data fusion on the original road traffic data, and integrating data from different sources into a unified data stream to obtain first road traffic data. Specifically, data from different sources is integrated into a unified data stream using data fusion techniques, employing the kalman filter (KALMAN FILTER) algorithm: And smoothing the sensor data to improve the data quality. The data processing process of the Kalman filtering (KALMAN FILTER) algorithm is the prior art, and the application is not repeated;
Cleaning the first road traffic data, removing invalid data points, and filling missing values to obtain second road traffic data;
When invalid data points are removed, the adopted calculation formula is as follows:
;
Wherein, Is a data point after the normalization,Is the firstThe original value of the data point is set,Is the firstData pointsIs used for the weight of the (c),Is a weighted average value of the values,Is the weighted standard deviation ifThen considerAs an invalid data point,Is the threshold value of the threshold,Total number of data points;
and in filling the missing value, adopting a calculation formula as follows:
;
Wherein, Is the timestamp of the previous valid data point,Is the timestamp of the last valid data point,Is the point in time at which interpolation is required,Is the weight of the previous valid data point,Is the weight of the last valid data point,Is the weight of the adjusted previous valid data point,Is the weight of the adjusted last valid data point,Is the value of the previous valid data point,Is the value of the last valid data point,Is the interpolated value.
And extracting the characteristics of the second road traffic data to obtain historical road traffic data. In particular, use is made ofFeature selection method (recursive feature elimination RFE) in library to select the most representative feature, reduce redundant features, specifically calculate traffic density for each monitoring point,Wherein, the method comprises the steps of, wherein,Is the firstEach monitoring point is at timeReflecting the density of vehicles on the road; is the first The first monitoring pointWeights of types of vehicles; Is at the time of Inner firstThe first monitoring pointA number of types of vehicles; Is at the time of Inner firstThe first monitoring pointRoad effective capacity of the type of vehicle. Traffic density based on the second road traffic data and each monitoring pointAnd gradually removing the least relevant features by using a recursive feature elimination algorithm to generate feature vectors as historical road traffic data, wherein a selection formula adopted by the recursive feature elimination algorithm is as follows: Wherein, the method comprises the steps of, wherein, Is an initial set of features that are selected,Is the number of features selected.
As shown in table 1, the following is a display of the feature extraction result based on the data of the month of the year according to the key road section of the city:
TABLE 1 display of the feature extraction results
Time stamp | Traffic density | Average speed (km/h) | Vehicle type ratio (Car/truck/motorcycle) | Road occupancy rate | Temperature (° C) | Visibility (m) | Wind speed (m/s) |
14:00 | 0.75 | 30 | 0.6/0.3/0.1 | 0.8 | 20 | 10000 | 5 |
14:01 | 0.78 | 28 | 0.55/0.35/0.1 | 0.82 | 19 | 10000 | 5 |
14:02 | 0.8 | 26 | 0.5/0.4/0.1 | 0.85 | 20 | 8000 | 6 |
14:03 | 0.82 | 25 | 0.45/0.45/0.1 | 0.88 | 19 | 6000 | 7 |
Step three, building a traffic state recognition model, namely building a Swish-based multi-layer perceptron (MLP) model, wherein the model comprises an input layer, hidden layers (each hidden layer comprises a certain number of neurons) and an output layer, and the multi-layer perceptron (MLP) model is usedActivation function:,,, is a Sigmoid function, and Batch Normalization techniques are used to prevent overfitting: Wherein, the method comprises the steps of, wherein, Is the hidden layerThe output of the individual neurons is referred to as,AndThe mean and variance of the small batch data,Is a very small constant,AndIs a learnable parameter;
training a traffic state recognition model through a back propagation algorithm ) The weights are adjusted to minimize the loss function (cross entropy loss function: ) And model verification, namely evaluating the accuracy and the robustness of the model through a cross verification technology (K-fold cross verification), and adjusting the super parameters of the traffic state recognition model according to the verification result.
The acquired historical road traffic data is sent to a pre-trained traffic state identification model, and a traffic state evaluation result of each monitoring point, namely the traffic density of each monitoring point, is obtained;
Step four, using a threshold judgment method (setting that the congestion index is larger than a certain threshold value and is regarded as an unfavorable traffic state), adopting statistical analysis to the collected traffic density data to calculate the average value of the traffic density after threshold value determination And standard deviation:
Wherein, Is the firstEach monitoring point is at timeIs used for the traffic density of the vehicle,Is the total number of monitoring points;
Mean value based on traffic density And standard deviationDetermining a threshold for traffic densityThe threshold valueThe calculation formula of (2) is as follows:
;
Wherein, Is an empirical factor, and typically takes a value between 1 and 3;
if the traffic density of the monitoring point Greater than or equal to a threshold valueThe monitoring point is considered to be in an unfavorable traffic state and all areas with congestion or potential risk are determined, see fig. 2 in particular.
Outputting all areas with congestion or potential risks for further analysis or early warning, displaying all identified areas with congestion or potential risks through a visualization tool, issuing early warning information to an information entertainment system or mobile equipment of a driver through a wireless communication module, and recording important decision basis in each identification process.
Example 2
Based on the same inventive concept as embodiment 1, an embodiment of the present invention provides a real-time identifying device for adverse traffic conditions, including:
The traffic state identification model is a multilayer perceptron model based on Swish activation functions and comprises an input layer, a plurality of hidden layers and an output layer, wherein the layers are connected in a full-connection mode, and a cross verification technology is adopted to adjust super parameters in the training process of the traffic state identification model;
And the risk identification module is used for determining the area with the congestion or potential risk by using a threshold judgment method based on the traffic state evaluation result of each monitoring point.
Example 3
Based on the same inventive concept as embodiment 1, an adverse traffic state real-time identification system is provided in an embodiment of the present invention, including a storage medium and a processor;
the storage medium is used for storing instructions;
the processor is configured to operate in accordance with the instructions to perform the method according to any one of embodiment 1.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are all within the protection of the present invention.
The foregoing has shown and described the basic principles and main features of the present invention and the advantages of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, and that the above embodiments and descriptions are merely illustrative of the principles of the present invention, and various changes and modifications may be made without departing from the spirit and scope of the invention, which is defined in the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.
Claims (5)
1. A method for identifying unfavorable traffic conditions in real time, comprising:
The method comprises the steps of sending acquired historical road traffic data to a pre-trained traffic state identification model to obtain a traffic state evaluation result of each monitoring point, wherein the traffic state identification model is a multi-layer perceptron model based on Swish activation functions, and comprises an input layer, a hidden layer and an output layer, all layers are connected in a full-connection mode, and the cross-validation technology is adopted to adjust super parameters in the training process of the traffic state identification model;
determining a region with congestion or potential risk by using a threshold judgment method based on a traffic state evaluation result of each monitoring point, wherein the traffic state evaluation result is traffic density;
the method for acquiring the historical road traffic data comprises the following steps:
Acquiring original road traffic data;
Data fusion is carried out on the original road traffic data, and data from different sources are integrated into a unified data stream to obtain first road traffic data;
Cleaning the first road traffic data, removing invalid data points, and filling missing values to obtain second road traffic data;
extracting features of the second road traffic data to obtain historical road traffic data;
When invalid data points are removed, the adopted calculation formula is as follows:
Wherein Z i is the normalized i data point, x i is the original value of the i data point, w i is the weight of the i data point x i, μ w is the weighted mean, σ w is the weighted standard deviation, if |z i | > Z, then x i is considered to be the invalid data point, Z is the threshold, and N 1 is the total number of data points;
and in filling the missing value, adopting a calculation formula as follows:
Where t 1 is the timestamp of the previous active data point, t 2 is the timestamp of the next active data point, t is the timestamp of the data point that needs to be interpolated, ω 1 is the weight of the previous active data point, ω 2 is the weight of the next active data point, ω '1 is the weight of the adjusted previous active data point, ω' 2 is the weight of the adjusted next active data point, y 1 is the value of the previous active data point, y 2 is the value of the next active data point, Is the interpolated value;
the feature extraction of the second road traffic data includes:
Calculating the traffic density D k (t) of each monitoring point based on the second road traffic data, Wherein D k (t) is the traffic density of the kth monitoring point at time t and reflects the density of vehicles on the road, a k,j is the weight of the jth type of vehicles of the kth monitoring point, V k,j (t) is the number of the jth type of vehicles of the kth monitoring point at time t, and F k,j (t) is the road effective capacity of the jth type of vehicles of the kth monitoring point at time t;
Based on the second road traffic data and the traffic density D k (t) of each monitoring point, gradually removing the least relevant features by using a recursive feature elimination algorithm to generate feature vectors as historical road traffic data, wherein the recursive feature elimination algorithm adopts a selection formula of RFE (S, N 2)=select N2 features from S, wherein S is an initial feature set, and N 2 is a selected feature quantity;
the calculation method of the threshold value of the traffic density in the threshold value judgment method comprises the following steps:
Calculate the mean μ D and standard deviation σ D of traffic density:
Wherein D k (t) is the traffic density of the kth monitoring point at time t, and k max is the total number of monitoring points;
The method comprises the steps of determining a threshold D th of the traffic density based on a mean mu D and a standard deviation sigma D of the traffic density, wherein a calculation formula of the threshold D th is as follows:
Dth=μD+hD·σD;
Where h D is an empirical factor.
2. The method for identifying the unfavorable traffic state in real time according to claim 1, wherein the input layer of the multi-layer perceptron model receives a feature vector X, wherein the feature vector X comprises N 2 features;
The hidden layer contains a preset number of neurons, the formula adopted when the hidden layer processes the data is h d=f(We,dXe+bd), wherein h d represents the output of the d-th neuron of the hidden layer, X e is the e-th feature of the input feature vector, f is Swish activation function, W e,d is weight matrix representing the connection weight from the e-th node of the input layer to the d-th neuron of the hidden layer, b d is the bias term of the d-th neuron of the hidden layer, the expression of Swish activation function f is Swish (z d)=zd·σ(zd), Sigma (z d) is a Sigmoid function, the output end of the hidden layer is provided with Batch Normalization layers, the Batch Normalization layers normalize the output h d of each neuron, and then the final normalized output is obtained by scaling and translating the learnable parameters gamma and betaThe calculation formula adopted by the Batch Normalization layer is as follows:
wherein h d is the output of the d-th neuron of the hidden layer, μ B and Mean and variance, respectively, e is a constant, γ and β are learnable parameters;
the output layer contains a neuron, directly outputs traffic density, using a linear activation function:
Wherein, For traffic density, W out is the weight matrix of the output layer, representing the connection weight from each neuron of the last hidden layer to the output layer, h is the output of the hidden layer, and b out is the bias term of the output layer.
3. The method for identifying the unfavorable traffic state in real time according to claim 1, wherein the method comprises the following steps of:
initializing parameters, namely initializing a weight W and a bias b;
Forward propagation, calculating predictive probability of output layer
The loss is calculated using the mean square error as the loss function:
where y is the true value of y, Is a predicted value, m is the number of samples;
counter-propagating, calculating gradients, and updating parameters:
wherein α is the learning rate;
iterative training, repeating forward propagation and backward propagation until convergence or maximum iteration number is reached;
the hyper-parameters of the multi-layer perceptron model are obtained through the following steps:
dividing the data set into K subsets;
K-fold cross verification, taking each subset as a verification set and the rest subsets as training sets in sequence;
and calculating an accuracy evaluation index of the multi-layer perceptron model, and continuously adjusting the super parameters.
4. A real-time identification device for unfavorable traffic conditions, comprising:
The traffic state identification model is a multilayer perceptron model based on Swish activation functions and comprises an input layer, a plurality of hidden layers and an output layer, wherein the layers are connected in a full-connection mode, and a cross verification technology is adopted to adjust super parameters in the training process of the traffic state identification model;
the risk identification module is used for determining an area with congestion or potential risk based on the traffic state evaluation result of each monitoring point by using a threshold judgment method, wherein the traffic state evaluation result is traffic density;
the method for acquiring the historical road traffic data comprises the following steps:
Acquiring original road traffic data;
Data fusion is carried out on the original road traffic data, and data from different sources are integrated into a unified data stream to obtain first road traffic data;
Cleaning the first road traffic data, removing invalid data points, and filling missing values to obtain second road traffic data;
extracting features of the second road traffic data to obtain historical road traffic data;
When invalid data points are removed, the adopted calculation formula is as follows:
Wherein Z i is the normalized i data point, x i is the original value of the i data point, w i is the weight of the i data point x i, μ w is the weighted mean, σ w is the weighted standard deviation, if |z i | > Z, then x i is considered to be the invalid data point, Z is the threshold, and N 1 is the total number of data points;
and in filling the missing value, adopting a calculation formula as follows:
Where t 1 is the timestamp of the previous active data point, t 2 is the timestamp of the next active data point, t is the timestamp of the data point that needs to be interpolated, ω 1 is the weight of the previous active data point, ω 2 is the weight of the next active data point, ω '1 is the weight of the adjusted previous active data point, ω' 2 is the weight of the adjusted next active data point, y 1 is the value of the previous active data point, y 2 is the value of the next active data point, Is the interpolated value;
the feature extraction of the second road traffic data includes:
Calculating the traffic density D k (t) of each monitoring point based on the second road traffic data, Wherein D k (t) is the traffic density of the kth monitoring point at time t and reflects the density of vehicles on the road, a k,j is the weight of the jth type of vehicles of the kth monitoring point, V k,j (t) is the number of the jth type of vehicles of the kth monitoring point at time t, and F k,j (t) is the road effective capacity of the jth type of vehicles of the kth monitoring point at time t;
Based on the second road traffic data and the traffic density D k (t) of each monitoring point, gradually removing the least relevant features by using a recursive feature elimination algorithm to generate feature vectors as historical road traffic data, wherein the recursive feature elimination algorithm adopts a selection formula of RFE (S, N 2)=select N2 features from S, wherein S is an initial feature set, and N 2 is a selected feature quantity;
the calculation method of the threshold value of the traffic density in the threshold value judgment method comprises the following steps:
Calculate the mean μ D and standard deviation σ D of traffic density:
Wherein D k (t) is the traffic density of the kth monitoring point at time t, and k max is the total number of monitoring points;
The method comprises the steps of determining a threshold D th of the traffic density based on a mean mu D and a standard deviation sigma D of the traffic density, wherein a calculation formula of the threshold D th is as follows:
Dth=μD+hD·σD;
Where h D is an empirical factor.
5. A real-time identification system for unfavorable traffic conditions, which is characterized by comprising a storage medium and a processor;
the storage medium is used for storing instructions;
The processor is operative to perform the method according to any one of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411709160.3A CN119207100B (en) | 2024-11-27 | 2024-11-27 | Real-time identification method, device and system for adverse traffic conditions |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202411709160.3A CN119207100B (en) | 2024-11-27 | 2024-11-27 | Real-time identification method, device and system for adverse traffic conditions |
Publications (2)
Publication Number | Publication Date |
---|---|
CN119207100A CN119207100A (en) | 2024-12-27 |
CN119207100B true CN119207100B (en) | 2025-03-14 |
Family
ID=94061049
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202411709160.3A Active CN119207100B (en) | 2024-11-27 | 2024-11-27 | Real-time identification method, device and system for adverse traffic conditions |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN119207100B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140028801A (en) * | 2012-08-30 | 2014-03-10 | 경희대학교 산학협력단 | Prediction of urban congestion using its based data |
CN116778705A (en) * | 2022-08-15 | 2023-09-19 | 湖北文理学院 | Traffic flow prediction method, equipment, storage medium and device |
Family Cites Families (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7912627B2 (en) * | 2006-03-03 | 2011-03-22 | Inrix, Inc. | Obtaining road traffic condition data from mobile data sources |
CN114582130B (en) * | 2022-03-15 | 2022-09-27 | 合肥工业大学 | Expressway multiphase traffic state identification method |
WO2024039547A1 (en) * | 2022-08-17 | 2024-02-22 | Align Technology, Inc. | Augmentation of 3d surface of dental site using 2d images |
CN115620524B (en) * | 2022-12-15 | 2023-03-28 | 中南大学 | Traffic jam prediction method, system, equipment and storage medium |
CN116092525A (en) * | 2022-12-27 | 2023-05-09 | 南方电网调峰调频发电有限公司储能科研院 | A sound recognition method for electrical equipment status considering time-frequency domain feature fusion |
US20240249192A1 (en) * | 2023-01-25 | 2024-07-25 | Google Llc | Multi-Layer Perceptron Architecture For Times Series Forecasting |
CN117390973B (en) * | 2023-12-12 | 2024-03-22 | 中南大学 | Mine blasting hole utilization rate prediction method based on multilayer perceptron model |
CN117391550B (en) * | 2023-12-12 | 2024-03-08 | 上海凯士比泵有限公司 | Method, device and medium for predicting health status of rotating equipment |
CN118037065B (en) * | 2024-04-12 | 2024-07-19 | 武汉理工大学 | A data-driven dynamic assessment method for inland water navigation risks |
CN118314728A (en) * | 2024-04-26 | 2024-07-09 | 东南大学 | Traffic flow dynamic prediction and precision optimization method based on independent thermal coding |
CN118429896B (en) * | 2024-07-02 | 2024-09-24 | 宝鸡宏顺达钛业有限公司 | Distributor production monitoring method based on artificial intelligence |
CN118425955B (en) * | 2024-07-03 | 2024-08-27 | 太原理工大学 | Tunneling working face target detection method based on multi-sensor data fusion |
CN119007417A (en) * | 2024-10-23 | 2024-11-22 | 南通围界盾智能科技有限公司 | Airport enclosure intrusion detection alarm linkage system |
-
2024
- 2024-11-27 CN CN202411709160.3A patent/CN119207100B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140028801A (en) * | 2012-08-30 | 2014-03-10 | 경희대학교 산학협력단 | Prediction of urban congestion using its based data |
CN116778705A (en) * | 2022-08-15 | 2023-09-19 | 湖北文理学院 | Traffic flow prediction method, equipment, storage medium and device |
Also Published As
Publication number | Publication date |
---|---|
CN119207100A (en) | 2024-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109840660B (en) | A vehicle feature data processing method and a vehicle risk prediction model training method | |
Malik et al. | Driving pattern profiling and classification using deep learning | |
Gao et al. | Aggressive driving saves more time? Multi-task learning for customized travel time estimation. | |
CN113159403B (en) | Intersection pedestrian track prediction method and device | |
CN114926825A (en) | Vehicle driving behavior detection method based on space-time feature fusion | |
CN116702090A (en) | Multi-mode data fusion and uncertain estimation water level prediction method and system | |
CN119312169A (en) | A risk prediction method and platform for operating vehicles based on multi-factor analysis | |
Cai et al. | A driving fingerprint map method of driving characteristic representation for driver identification | |
CN118569307A (en) | Vehicle track prediction method and system based on decoupling graph diffusion neural network | |
CN120123883A (en) | A collision risk prediction method for autonomous vehicles targeting the long-tail phenomenon | |
CN118439034B (en) | Driving style recognition method, driving style recognition device, computer equipment and storage medium | |
CN115204252A (en) | Lightweight network driving behavior analysis method based on multi-source feature extraction | |
CN114792397A (en) | SAR image urban road extraction method, system and storage medium | |
CN118364231B (en) | A multi-feature flight maneuver recognition method | |
CN119207100B (en) | Real-time identification method, device and system for adverse traffic conditions | |
CN117975178B (en) | Taxi track data analysis method based on big data analysis | |
CN119068659A (en) | A vehicle abnormal behavior detection method based on Beidou positioning | |
CN117132958B (en) | Road element identification method and related device | |
CN110704789B (en) | Population dynamic measurement and calculation method and system based on 'urban superconcephalon' computing platform | |
CN118645017A (en) | A track prediction method in autonomous operation mode based on time-frequency analysis | |
CN117465472A (en) | Control method and device for vehicle speed control, vehicle speed controller and medium | |
CN114492544A (en) | Model training method and device and traffic incident occurrence probability evaluation method and device | |
Li | A deep learning approach for real-time crash risk prediction at urban arterials | |
CN117312470B (en) | Vehicle track and driving state reconstruction method, device and medium | |
CN120148251B (en) | Vehicle trajectory abnormality detection method, device, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |