Intelligent warning method and device for road traffic safety based on environmental characteristics
By using sensor and drone monitoring networks to explore nonlinear relationships in the road environment, construct a traffic knowledge graph, and establish a multi-level early warning system, the problem of existing technologies being unable to reflect complex road environments has been solved, enabling accurate early warning and management of traffic anomalies and improving the level of traffic safety management.
Patent Information
- Application Number
- CN202510813754.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2045-06-18
AI Technical Summary
Existing technologies are unable to fully and in real time reflect the complex and ever-changing road environment, especially the impact of weather conditions on traffic safety. This results in an inability to accurately identify the probability of abnormal traffic events, a lack of a multi-level early warning system, and an inability to provide targeted and differentiated early warning measures, thus affecting the efficiency and effectiveness of traffic safety management.
By collecting road environment data based on sensors, constructing a meteorological monitoring network using drones equipped with meteorological sensors, exploring the nonlinear relationship between meteorological environment, road conditions and traffic flow, introducing an attention mechanism, establishing an association rule base, constructing a traffic knowledge graph, setting up a multi-level early warning system, and implementing differentiated early warning.
It enables multi-dimensional real-time perception of the road traffic environment, accurately identifies the probability of abnormal traffic events, provides early warnings, improves the pertinence and efficiency of traffic management, reduces accident risks, ensures that car owners are aware of risk information in a timely manner, and improves road traffic efficiency and safety.
Smart Images

Figure CN120636151B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of municipal roads, in particular to a road traffic safety intelligent early warning method and device based on environmental characteristics. BACKGROUND
[0002] With the acceleration of urbanization and the continuous growth of car ownership, road traffic safety problems have become increasingly prominent. Traffic congestion not only reduces travel efficiency, but also increases the risk of traffic accidents, bringing many adverse effects to the social economy and people's life.
[0003] Currently, road traffic safety warning mainly relies on traditional monitoring cameras and limited road sensors. These devices can only obtain basic information of traffic flow and road conditions, and are difficult to comprehensively and real-time reflect the complex and changeable road environment. For meteorological environmental factors such as rain, snow, fog, haze and temperature, the traditional warning method often lacks effective monitoring and analysis means, and cannot timely and accurately assess the potential threat to traffic safety.
[0004] In the prior art, the processing of traffic data is mostly limited to simple statistical analysis, and the complex nonlinear relationship between meteorological environment, road conditions and traffic flow cannot be fully explored. This leads to the inability to accurately identify the probability of occurrence of traffic abnormal events, and it is difficult to provide targeted warning information for drivers in advance. At the same time, there is a lack of unified multi-level warning system, which cannot implement differentiated warning measures according to different risk levels, so that the warning effect is greatly reduced, and effective integration cannot be achieved, which cannot provide comprehensive and comprehensive decision basis for traffic safety warning. To this end, we propose a road traffic safety intelligent early warning method and device based on environmental characteristics. SUMMARY
[0005] To solve the above technical problems, the road traffic safety intelligent early warning method and device based on environmental characteristics are provided, which solves the above problems.
[0006] To achieve the above purpose, the technical scheme adopted by the present application is: a road traffic safety intelligent early warning method based on environmental characteristics, the early warning steps are:
[0007] Based on sensor collection of road environment data, including road condition data and traffic flow data;
[0008] The size of the traffic flow data is judged, the congestion threshold is established, the road sections with traffic flow greater than the congestion threshold are marked and uploaded to the unmanned aerial vehicle system;
[0009] The unmanned aerial vehicle is equipped with a meteorological sensor to build a meteorological monitoring network, and the flight path planning is carried out based on the marked congestion road section to collect the meteorological environment of the congestion road section;
[0010] Considering the time-varying characteristics of the traffic environment, the nonlinear relationship between the meteorological environment, the road surface condition and the traffic flow at different times is mined, the attention mechanism is introduced, the meteorological factors and the road surface condition indexes that have great influence on traffic are focused on, different meteorological conditions and road surface condition combinations are classified, and a correlation rule base is established;
[0011] Based on the data in the correlation rule base, a traffic knowledge graph is constructed, and the probability of occurrence of traffic abnormal events, including traffic accidents and traffic congestion, is predicted;
[0012] A multi-level warning system is set, different warning levels are divided based on the probability of occurrence of abnormal events, and different warning methods are implemented on the vehicle machine of the vehicle owner according to different warning levels.
[0013] Preferably, the sensor includes a laser radar sensor and a microwave radar sensor, wherein the laser radar sensor detects the road surface flatness, the rut depth and the crack width structure by scanning the road surface to obtain the road surface condition data;
[0014] The microwave radar sensor emits a microwave signal and tracks the vehicle reflection echo to calculate the traffic flow, speed and vehicle spacing, and comprehensively obtains the traffic flow data.
[0015] Preferably, the traffic flow data is compared in size by a direct comparison method, and the obtained different traffic flow data is compared and sorted from large to small;
[0016] The congestion threshold establishment step is:
[0017] Collect historical traffic flow data of different road sections, arrange the collected historical traffic flow data of different road sections in order from small to large, and mark it as data set , wherein is the number of data, is the data in the data set , and the position index of the quantile is calculated , and the calculation formula is:
[0018]
[0019] , wherein is the quantile percentage to be calculated, is the number of data, is the position index of the quantile, wherein is obtained based on the experience and management target setting of the traffic management department;
[0020] The quantile is calculated based on the value of the position index of the quantile , and if is an integer, then The data in the data set is the quantile;
[0021] If is not an integer, let be the integer part of , rounded down, be the decimal part of , that is , then the quantile calculation formula is:
[0022]
[0023] By calculating the quantile of the data, the quantile is the threshold value, and the traffic flow data higher than the threshold value is divided and marked for uploading.
[0024] Preferably, the meteorological monitoring network is divided into network cells by geographic information system and traffic network data, and a UAV is configured in each cell to obtain real-time weather data, and meteorological data is collected for different congestion sections within a unit day.
[0025] The flight path planning is based on the ant colony optimization algorithm to plan the path, and the congestion sections are flown in sequence to collect meteorological environment.
[0026] Preferably, the specific steps for establishing the association rule base are:
[0027] After preprocessing the collected environmental data, the variance, maximum and minimum data characteristics of the traffic flow data at different times are calculated.
[0028] Based on the moving average method, the trend of the data characteristics is extracted, and based on the Fourier transform, the time domain data is converted to the frequency domain to obtain the periodicity of the data.
[0029] The attention mechanism is introduced, the meteorological environment and road surface condition indicators at different times are weighted, the meteorological environment and road surface condition indicators are vectorized, the weights are multiplied by the vectorized indicators and summed to calculate the traffic impact value, and the meteorological and road condition factors with great impact on traffic are focused on.
[0030] The traffic impact value calculation formula is:
[0031]
[0032] Wherein represents the traffic impact value calculated at time , which is the final output result of the entire calculation, used to measure the comprehensive influence degree of meteorological and road surface condition factors on traffic, is an activation function, which introduces a nonlinear factor, makes the model learn and fit complex relationships, and converts the weighted sum result to the output range. is a row vector, which is the parameter vector of the model, used to linearly transform the weighted feature vector, whose dimension matches the subsequent vector multiplication operation, is a weight matrix, which is also the parameter of the model, used to linearly transform the input feature vector, learning the relationship between different feature combinations and traffic impact values; wherein is the feature attention weight, representing the relative importance weight of the th meteorological / road surface condition feature dimension at time ; wherein , represents the th feature value in the vectorized meteorological environment and road surface condition indicators at time ; is a bias term;
[0033] Based on the random forest, the periodic regularity and the meteorological factors with large traffic impact are classified;
[0034] The association rule mining algorithm is used to mine the association rules between meteorological environment, road surface condition and traffic flow in the classification results. The minimum support and minimum confidence thresholds are set, the data set is scanned to find the frequent item set, i.e. the meteorological and road surface condition combinations with frequency higher than the minimum support, and the association rule library is generated from the frequent item set;
[0035] The core of the association rule mining algorithm includes:
[0036] The item set is a set composed of meteorological factors, road surface conditions and traffic flow levels;
[0037] The support is the frequency of the item set appearing in the data set, and the formula is:
[0038]
[0039] The confidence is the reliability of the rule, representing the probability of containing Y in the transaction containing X, and the formula is:
[0040]
[0041] The lift is the effectiveness of the rule, measuring the influence of the occurrence of X on the occurrence of Y, and the formula is:
[0042]
[0043] The mining steps are:
[0044] Collect meteorological data, road surface condition data and traffic flow data, and perform cleaning, standardization and discretization;
[0045] Using the Apriori algorithm to find all item sets with support higher than the threshold value;
[0046] Extracting rules with confidence and lift higher than the threshold value from the frequent item sets to obtain association rules.
[0047] Preferably, the variance value, maximum value and minimum value data feature calculation step is:
[0048] Suppose in a unit time, the traffic flow data set collected , wherein is the number of data points in the time interval, then the maximum value Max is calculated as:
[0049]
[0050] , wherein represents the maximum observed value of traffic flow in the time interval, reflecting the peak value of traffic flow, and max is the maximum value operation to find the largest value from the data set;
[0051] The minimum value is calculated as:
[0052] , wherein represents the minimum observed value of traffic flow in the time interval, reflecting the trough value of traffic flow, and nin is the minimum value operation to find the smallest value from the data set;
[0053] The variance calculation formula is:
[0054] , wherein is the average value in the data, reflecting the average level of the data, is the overall variance, a statistical measure of the degree of dispersion of the data.
[0055] Preferably, the trend step of the sliding average method for extracting data features is:
[0056] Based on the data features and the analysis purpose, the sliding window length is determined to capture the daily change of traffic flow, and the window size is set to 24, representing 24h per day. By trying different sizes, the optimal value is determined.
[0057] Taking time as the data feature index, the data features are converted into time series form, and the moving average is calculated. For the time series , the window size is , and the calculation starts from the th data point. The simple moving average value at the th position is , and the calculation formula is:
[0058]
[0059] wherein is an index variable in summation operation, is the observation value at the th time point in time series data;
[0060] The calculated moving average values are arranged in order to form a new sequence reflecting the trend characteristics of the data;
[0061] The time-domain data is converted to the frequency domain based on Fourier transform to obtain the periodicity of the data, and the steps are as follows:
[0062] The discrete Fourier transform is selected for calculation and processing;
[0063] Based on the selected Fourier transform algorithm, the new sequence data is calculated to obtain the frequency domain representation. The calculation result is a complex number sequence, the amplitude of each complex number represents the strength of the corresponding frequency component, and the phase represents the phase shift of the frequency component;
[0064] The frequency domain result is analyzed to calculate the frequency value , and the calculation formula is:
[0065]
[0066] wherein is the sampling period, is the data length, is the frequency index, the amplitude spectrum and the frequency-amplitude relationship diagram are drawn, the frequency component with large amplitude is observed, and the period corresponding to the frequency component is the periodicity in the data;
[0067] The traffic impact value is calculated, and the steps of focusing on the meteorological factors that have a large impact on traffic are as follows:
[0068] There are meteorological environmental indicators, denoted as ; a road surface condition indicator, denoted as , which is combined into a feature vector :
[0069]
[0070] wherein is the transpose mathematical symbol;
[0071] The weight values w1 and w2 are assigned to each indicator, and the weight values are combined into a weight vector value W. The weight values are obtained based on expert analysis method, and the weight of each indicator is directly given by meteorological and traffic experts based on experience;
[0072] The weight vector with the feature vector The dot product operation is performed to obtain a traffic impact value :
[0073]
[0074] The traffic impact value obtained The greater, the greater the impact factor present in the current feature vector, indicating that the weather and road conditions have a greater impact.
[0075] Preferably, the specific steps for generating an association rule base from the frequent item set are as follows:
[0076] The discretized weather and road surface index samples are converted into transactions, including the corresponding index combinations;
[0077] Calculate the support of each single item set according to the formula: Support(D) = number of transactions containing item D / total number of transactions, where Support(D) is the Dth support of the item set, i.e. the frequency of the item set D appearing in all transactions, which measures the importance of the item set; D is the item set, and the frequent 1-item set with a support not lower than the minimum support threshold is selected;
[0078] Enter the iteration link, merge the frequent (C-1)-item set through the connection operation to generate candidate C-item sets, and then remove the candidate sets containing non-frequent subsets through pruning, and calculate the support to retain the frequent C-item sets meeting the threshold requirements;
[0079] Generate association rules from the frequent item set, extract non-empty true subsets as the rule antecedent, and the confidence calculation formula is:
[0080] Confidence(D⇒F) = Support(D∪F) / Support(D)
[0081] Where D is an item set composed of weather environment and road surface condition indicators, F is the consequent item set, indicating the result caused by D, specifically traffic accidents and traffic congestion, D⇒F is the association rule, i.e. the logical reasoning relationship between the appearance of D and the appearance of the consequent item set F, Confidence(D⇒F) is the confidence of this association rule, i.e. the possibility of the appearance of F under the condition of D, Support(D∪F is the support of the union of D and F, including the frequency of the transaction of D and F appearing in the total transaction;
[0082] Calculate the confidence and retain the effective rules not lower than the minimum confidence threshold;
[0083] Arrange the effective rules in descending order of "support-confidence", and construct the association rule base.
[0084] Preferably, the step of identifying the probability of occurrence of the traffic abnormal event is:
[0085] The traffic knowledge graph ontology is defined, the "meteorological environment" and "traffic event" entity types are clarified, the "triggering" and "influence" relationship types are constructed, and attributes are added to the entities;
[0086] The association rule base data is mapped to the knowledge graph, the entities and relationships in the rules are parsed, and the weighted directed graph is stored in the graph database;
[0087] Integrate multi-source data, access real-time weather, road surface sensing and historical traffic event data, and update the graph content;
[0088] Design a probability reasoning model, take the confidence as the probability for a single rule, and use the weighted average method to calculate multiple rules, and perform abnormal event monitoring and early warning;
[0089] Real-time data matching rules are obtained, a probability threshold is set to trigger early warning and visual display;
[0090] Continuously optimize the knowledge graph and the model, and regularly update the data and re-mine the rules.
[0091] The road traffic safety intelligent early warning device based on environmental characteristics, the early warning device comprises:
[0092] The road environment acquisition module is configured to acquire environmental data based on sensors;
[0093] The congestion judgment module is configured to divide and mark the congestion road section;
[0094] The weather acquisition module is based on unmanned aerial vehicles to collect weather on the congestion road section;
[0095] The analysis module is configured to analyze the weather factors and road surface condition indexes that have a great impact on traffic, classify different weather conditions and road surface conditions, and establish an association rule base;
[0096] The prediction module is configured to identify the probability of occurrence of traffic abnormal events, including traffic accidents and traffic congestion, based on the data in the association rule base;
[0097] The early warning module is based on different early warning levels to implement different early warning methods.
[0098] Compared with the prior art, the beneficial effects of the present application are:
[0099] The application comprehensively collects road surface conditions, traffic flow and meteorological data by means of sensors and unmanned aerial vehicle meteorological monitoring networks, realizes multi-dimensional real-time perception, lays a foundation for subsequent analysis, excavates non-linear relationships and introduces an attention mechanism, accurately focuses on key factors, deeply understands the complex relationship between various factors, uses a knowledge graph to identify abnormal event probabilities, can detect risks in advance, strive for response time, a multi-level early warning system divides levels and adopts different early warning methods according to probability, realizes fine management, ensures that vehicle owners receive risk information in a timely manner, improves the pertinence and efficiency of traffic management, and in the aspects of traffic management and safety protection, marks congested road sections to help traffic departments plan and dredge in advance, improve road traffic efficiency, timely warn and remind vehicle owners to prevent, reduce accident risks, reduce personnel and property losses, realize long-term effective operation, the early warning method realizes the whole process of data collection and analysis to early warning function, and then to traffic management and system development, and comprehensively improves the road traffic safety management level. BRIEF DESCRIPTION OF DRAWINGS
[0100] Figure 1 The early warning step flowchart of the application;
[0101] Figure 2 The early warning device framework of the application. DETAILED DESCRIPTION
[0102] The following description is used to disclose the application so that those skilled in the art can implement the application. The preferred embodiments in the following description are only as examples, and other obvious modifications can be thought of by those skilled in the art.
[0103] Referring to Figure 1 As shown in the figure, the road traffic safety intelligent early warning method based on environmental characteristics, the early warning step is:
[0104] Road environment data is collected based on sensors, including road surface condition data and traffic flow data;
[0105] The traffic flow data is judged by size, a congestion threshold is established, and the road section with traffic flow greater than the congestion threshold is divided and marked and uploaded to the unmanned aerial vehicle system;
[0106] The unmanned aerial vehicle is equipped with a meteorological sensor, a meteorological monitoring network is constructed, flight path planning is carried out based on the divided and marked congestion road section, and the meteorological environment of the congestion road section is collected;
[0107] The non-linear relationship between the meteorological environment, road surface condition and traffic flow at different times is excavated, the attention mechanism is introduced, the meteorological factors and road surface condition indexes that have great influence on traffic are focused on, different meteorological conditions and road surface condition combinations are classified, and the association rule library is established;
[0108] Based on the data in the association rule base, a traffic knowledge graph is constructed to predict the probability of traffic abnormal event occurrence, including traffic accidents and traffic congestion.
[0109] A multi-level warning system is set up based on the probability of abnormal event occurrence, different warning levels are divided, and different warning methods are implemented on the vehicle owner's car machine for different warning levels.
[0110] The present application collects road surface conditions and traffic flow data through sensors, and unmanned aerial vehicles carry meteorological sensors to build a meteorological monitoring network, which can comprehensively obtain road environment information and realize real-time perception of road conditions and meteorological conditions in multiple dimensions, providing rich and accurate data basis for subsequent analysis; The nonlinear relationship between meteorological environment, road surface conditions and traffic flow at different times is mined, the attention mechanism is introduced to focus on key factors and classification, which can accurately find out the factor combination that has a significant impact on traffic, deeply understand the complex relationship between factors, and improve the accuracy of traffic situation judgment;
[0111] Based on the association rule base, a traffic knowledge graph is constructed to identify the probability of traffic abnormal event occurrence, which can discover potential risks of traffic accidents and traffic congestion in advance, provide sufficient response time for traffic management departments and vehicle owners, set up a multi-level warning system, divide different warning levels according to the probability of abnormal event occurrence and implement different warning methods, realize fine warning management, provide corresponding intensity warning for different dangerous levels, ensure that motor vehicle drivers know the risk in time, and also make traffic management more targeted and efficient;
[0112] Traffic flow data is judged and marked to identify congestion sections, which can help traffic management departments plan and guide traffic in advance, reduce congestion time, and improve overall road traffic efficiency. Timely and accurate warning can remind motor vehicle drivers to take preventive measures in advance, such as reducing speed and avoiding, effectively reducing the incidence of traffic accidents, ensuring road traffic safety, and reducing personnel casualties and property losses.
[0113] The sensor includes a laser sensor and a microwave radar sensor, wherein the laser sensor scans the road surface through laser radar to detect the flatness, rut depth and crack width structure of the road surface, and obtains road surface condition data;
[0114] The microwave radar sensor emits microwave signals and tracks vehicle reflected echoes to calculate traffic flow, speed and vehicle spacing, and comprehensively obtains traffic flow data.
[0115] The application can accurately detect the road flatness, rut depth and crack width indexes by scanning the road surface by laser radar, obtain high-precision road condition data, provide reliable basis for road maintenance and traffic safety evaluation, obtain data by transmitting microwave signals to track vehicle reflection echoes, without direct contact with vehicles, without interference to traffic flow, can monitor traffic flow, speed and vehicle spacing information in real time without affecting normal driving of vehicles;
[0116] Among them, the structure is represented as: whether the material composition of each structural layer of the road surface (such as the surface layer, the base layer and the bottom base layer) and the interlayer bonding state are intact, without obvious damage, separation or fracture;
[0117] If the base layer material is loose or the surface layer and the base layer are separated, it will cause the overall structure of the road surface to fail, which belongs to structural defects;
[0118] It refers to the ability of the road surface to resist deformation and damage under the action of long-term vehicle load, temperature change and rain erosion;
[0119] It refers to the ability of the road surface structure to withstand design load (such as standard axle load) without excessive deformation or damage, which is usually evaluated by deflection value and strength index.
[0120] The size judgment of traffic flow data is performed by direct comparison, and the obtained different traffic flow data are compared and sorted from large to small;
[0121] The congestion threshold establishment step is:
[0122] Collect historical traffic flow data of different road sections, arrange the collected historical traffic flow data of different road sections in order from small to large, and mark it as data set , wherein is the number of data, is the data in the data set, and the position index of the quantile is calculated , and the calculation formula is:
[0123]
[0124] Among them, is the quantile percentage to be calculated, is the number of data, is the position index of the quantile, wherein It is obtained based on the experience and management target setting of the traffic control department;
[0125] The quantile is calculated based on the value of the position index of the quantile , if is an integer, then , that is, the The data is quantile;
[0126] If is not an integer, let be the integer part of , rounded down, be the decimal part of , i.e. , then the quantile calculation formula is:
[0127]
[0128] By calculating the quantile of the data, the quantile is the threshold value, and the traffic flow data higher than the threshold value is divided and marked for uploading.
[0129] The application deeply excavates the data distribution characteristics in the data set by means of calculating the quantile. The quantile can show the concentration trend of the data at different positions, can effectively capture the dispersion degree and overall distribution of the traffic flow data, and makes the threshold value more in line with the actual traffic flow changes. The quantile percentage is based on the experience and management target setting of the traffic management department, can integrate the actual management requirements into the threshold value calculation, and the traffic management department hopes to intervene when the traffic flow reaches a certain proportion to ensure the smoothness of the road. By setting appropriate percentiles, the threshold value can meet this management goal and realize scientific management. For the quantile position index calculation result, whether it is an integer or a non-integer case, there is a corresponding method for calculating the quantile, which can adapt to the characteristics of various traffic flow data sets and ensure the accuracy of the threshold value calculation.
[0130] When constructing the meteorological monitoring network, the geographic information system and the traffic network data are fully utilized, the city is finely divided, a rigorous network cell system is constructed, the geographical and geomorphic conditions, road distribution, population density and other factors of the city are fully considered, it is ensured that each cell can accurately correspond to a specific area in the city, seamless coverage of the city space is realized, and special unmanned aerial vehicles are configured in each cell. These unmanned aerial vehicles are like mobile meteorological sentinels and can obtain various weather data including temperature, humidity, wind speed, wind direction, rainfall, and visibility in real time and dynamically by virtue of the high-precision meteorological sensors carried by the unmanned aerial vehicles. In a unit day, the unmanned aerial vehicles perform high-frequency and multi-dimensional meteorological collection work according to the established monitoring strategy, ensure that the obtained data are comprehensive, accurate and timely, and can truly reflect the meteorological environmental changes of the congestion road section.
[0131] In the flight path planning, an ant colony optimization algorithm is adopted for scientific planning. The algorithm draws on the wisdom of ant colonies foraging in nature, simulates the behavior mode of ants releasing pheromones and selecting paths according to pheromone concentration in the process of searching for food, and when collecting weather data on congested road sections, the algorithm regards these road sections as "food sources" that need to be explored. Through continuous iteration and optimization, the algorithm finds a flight path that is the shortest in time, the lowest in energy consumption, and the highest in efficiency in the complex urban traffic network. The algorithm considers many factors, such as the real-time traffic conditions of each road section, the air no-fly zone, and the endurance of the UAV, to avoid conflicts between the flight path and urban air traffic, ensure that the UAV can safely and efficiently collect flight data on congested road sections in sequence, and comprehensively obtain weather environment data to provide strong data support for subsequent traffic management and safety warning. The ant colony optimization algorithm is the prior art, which will not be described in detail here.
[0132] The specific steps for establishing the association rule base are:
[0133] After preprocessing the collected environmental data, the variance, maximum and minimum data characteristics of the traffic flow data at different times are calculated;
[0134] Based on the moving average method, the trend of the data characteristics is extracted, and based on the Fourier transform, the time domain data is converted to the frequency domain to obtain the periodicity of the data;
[0135] The attention mechanism is introduced to assign weights to the meteorological environment and road surface condition indicators at different times, vectorize the meteorological environment and road surface condition indicators, multiply the weights and the vectorized indicators, and sum them up to calculate the traffic impact value, focusing on the meteorological and road condition factors that have a large impact on traffic;
[0136] The traffic impact value calculation formula is:
[0137]
[0138] wherein represents the traffic impact value calculated at time , which is the final output result of the entire calculation, used to measure the comprehensive impact of meteorological and road surface condition factors on traffic, is an activation function, which introduces a nonlinear factor to enable the model to learn and fit complex relationships and convert the weighted sum result to the output range, is a row vector, which is the parameter vector of the model, used to perform linear transformation on the weighted feature vector, and its dimension matches the subsequent vector multiplication operation, is a weight matrix, which is also a model parameter, used to perform linear transformation on the input feature vector to learn the relationship between different feature combinations and traffic impact values; wherein is a feature attention weight, representing the relative importance weight of the th weather / road condition feature dimension at time ; wherein represents the th feature value in the vectorized weather environment and road condition indicators at time ; is a bias term;
[0139] Classify the periodic regularity and traffic-influencing weather factors based on random forest;
[0140] Use association rule mining algorithm to mine the association rules between weather environment, road condition and traffic flow in the classification results, set the minimum support and minimum confidence threshold, scan the data set to find the frequent item set, i.e. the combination of weather and road conditions with frequency higher than the minimum support, and generate the association rule base from the frequent item set;
[0141] The core of the association rule mining algorithm includes:
[0142] The item set is a set composed of weather factors, road conditions and traffic flow levels;
[0143] The support is the frequency of the item set appearing in the data set, and the formula is:
[0144]
[0145] The confidence is the reliability of the rule, representing the probability of containing Y in the transaction containing X, and the formula is:
[0146]
[0147] The lift is the effectiveness of the rule, measuring the influence of the occurrence of X on the occurrence of Y, and the formula is:
[0148]
[0149] The mining steps are:
[0150] Collect weather data, road condition data and traffic flow data, and perform cleaning, standardization and discretization;
[0151] Use Apriori algorithm to find all item sets with support higher than the threshold;
[0152] Extract rules with confidence and lift higher than the threshold from the frequent item set to obtain the association rules.
[0153] In the data processing stage, this application calculates the variance and extreme value characteristics of traffic flow data, which can intuitively reflect the range of data fluctuations and the degree of dispersion, and capture abnormal changes in traffic flow. The combination of moving average and Fourier transform not only smooths the data trend, but also uncovers periodic patterns, helping to understand the long-term trend and periodic fluctuations of traffic flow, such as identifying the differences in traffic flow during morning and evening peak hours, weekdays and weekends.
[0154] In the feature extraction and analysis stage, the attention mechanism dynamically allocates weights to meteorological and road indicators according to the degree of traffic impact, highlighting key factors; the traffic impact value is calculated to further quantify the role of each factor, ensuring that subsequent analysis focuses on the core; the random forest algorithm is based on periodic patterns and key meteorological factors for classification, integrating multi-dimensional information to improve classification accuracy and stability.
[0155] In the rule mining and generation stage, the association rule mining algorithm filters frequent itemsets by setting thresholds to accurately find strong correlation patterns between weather, road surface and traffic flow; it generates a rule base from frequent itemsets, transforming complex relationships into structured knowledge, providing data support for traffic anomaly early warning and management decisions, helping traffic management departments to intervene in advance, optimize scheduling, and improve road traffic efficiency and safety.
[0156] The steps for calculating the variance, maximum, and minimum data characteristics are as follows:
[0157] Suppose that the traffic flow dataset collected within a unit of time is ,in Given the number of data points within this time interval, the maximum value (Max) is calculated using the following formula:
[0158]
[0159] in This represents the maximum observed traffic flow within the given time interval, reflecting the peak traffic flow. `max` is the operation to find the maximum value from the dataset.
[0160] Minimum value The calculation formula is:
[0161] in This represents the minimum observed traffic flow within the given time interval, reflecting the lowest point in traffic flow. The "min" operation finds the minimum value from the dataset.
[0162] The formula for calculating variance is:
[0163] in The average value in the data reflects the average level of this set of data. The total variance is a statistical quantity that measures the degree of dispersion of data.
[0164] The maximum and minimum values calculated in the present application can intuitively reflect the peak and trough of traffic flow in a unit of time. During holidays or large-scale activities, the maximum value can timely find the abnormal surge of traffic flow, and deploy relief measures in advance. The minimum value helps to identify periods of extremely low traffic flow, optimize resource allocation, and avoid waste of manpower and resources. The variance, as an index measuring the degree of data dispersion, can effectively evaluate the stability of traffic flow. The larger the variance value, the more intense the fluctuation of traffic flow, and the more unstable the road traffic conditions. A small variance value means that the flow changes smoothly. By monitoring the variance, the traffic management department can determine whether the road is at risk of congestion. For example, a sudden increase in variance may indicate that congestion is about to occur, making it easier to take timely control measures.
[0165] The trend step of extracting data features by the moving average method is:
[0166] Based on data features and analysis purposes, the length of the sliding window is determined to capture data of daily changes in traffic flow. The window size is set to 24, representing 24 hours a day. By trying different sizes, the optimal value is determined.
[0167] Taking time as the data feature index, the data features are converted into time series form, and the moving average is calculated. For a time series , the window size is , and the calculation starts from the th data point. The simple moving average at the th position is The calculation formula is:
[0168]
[0169] where is the index variable in the summation operation, is the observation value at the th time point in the time series data;
[0170] The calculated moving average values are arranged in order to form a new sequence reflecting the trend characteristics of the data.
[0171] The step of converting time-domain data to frequency domain based on Fourier transform to obtain the periodicity of the data is:
[0172] Discrete Fourier transform is selected for calculation and processing.
[0173] Based on the selected Fourier transform algorithm, the new sequence data is calculated to obtain the frequency domain representation. The calculation result is a complex number sequence. The amplitude of each complex number represents the strength of the corresponding frequency component, and the phase represents the phase shift of the frequency component.
[0174] The frequency domain result is analyzed to calculate the frequency value , and the calculation formula is:
[0175]
[0176] wherein is a sampling period, is a data length, is a frequency index, an amplitude spectrum is drawn, a frequency-amplitude relationship diagram is drawn, a frequency component with large amplitude is observed, and the period corresponding to the frequency component is the periodicity in the data;
[0177] The traffic influence value is calculated, and the steps of focusing on the meteorological factors that have a large influence on traffic are:
[0178] There are meteorological environment indexes, denoted as ; a road surface condition index, denoted as ; and a feature vector is formed by combining them:
[0179]
[0180] wherein is a transpose mathematical symbol;
[0181] A weight value w1 and w2 are assigned to each index, a weight vector value W is formed by combining the weight values, and the weight values are obtained based on an expert analysis method. The weight of each index is directly given by meteorological and traffic experts based on experience;
[0182] The traffic influence value is obtained by performing a dot product operation on the weight vector and the feature vector :
[0183]
[0184] The larger the traffic influence value obtained is, the greater the influence factors present in the feature vector in the current feature vector, and the greater the influence degree of meteorology and road conditions.
[0185] The sliding average method of the application can effectively filter random noise in traffic flow data, smooth short-term fluctuations, and clearly present long-term trends of daily changes by setting a window length. For example, when the window size is set to 24 (corresponding to 24 hours a day), the fluctuation rules of daily traffic flow can be intuitively reflected, and the morning and evening peak fixed patterns can be easily identified, thereby providing a basis for daily scheduling of traffic resources. By trying different window sizes to determine the optimal value, the flow characteristics of different roads and time periods can be flexibly adapted, and the universality of the analysis is enhanced.
[0186] Fourier transform converts time domain data to frequency domain, which can accurately analyze the periodicity hidden in traffic flow data. By analyzing the amplitude spectrum and frequency-amplitude relationship diagram of the frequency domain results, the periodicity of traffic flow can be determined.
[0187] The specific steps for generating an association rule base from the frequent item set are as follows:
[0188] The discretized weather and road index samples are converted into transactions, including the corresponding index combinations.
[0189] The specific steps are as follows: The original weather and road monitoring data may have missing values, errors or abnormal fluctuations, which need to be identified and corrected by statistical methods. The missing data is filled by multiple imputation method or based on the mean / median of similar road sections to ensure the integrity and accuracy of the data. According to the characteristics of the index, different discrete methods are used:
[0190] Weather index: For continuous variables (such as rainfall, temperature), use the binning method, combined with historical data distribution characteristics and traffic impact degree to divide the interval, for example, divide the rainfall into "light rain (0-10mm)", "moderate rain (10-50mm)", "heavy rain (>50mm)", and the temperature into "low temperature (<5℃)", "normal temperature (5-25℃)", "high temperature (>25℃)"; For discrete variables (such as weather type), directly retain the original categories, such as "sunny", "cloudy", "foggy";
[0191] Road index: For road humidity and damage degree index, use a combination of expert experience and data clustering to divide the road humidity into "dry", "slightly wet", "waterlogged", and the damage degree into "intact", "mild damage", "severe damage";
[0192] Transaction structure construction: Combine the weather and road index in each sample into a unified format transaction, use set or list data structure for storage, each transaction represents an actual observation record, and together constitutes the transaction data set;
[0193] Calculate the support of single item set, for each single item set, calculate the support according to the formula: Support(D)=number of transactions containing item D / total number of transactions, where Support(D) is the Dth support of item set, that is, the frequency of item set D appearing in all transactions, which measures the importance of item set; D is the item set, and the frequent 1-item set with support not less than the minimum support threshold is selected;
[0194] Enter the iteration link, merge the frequent (C-1)-item set to generate candidate C-item set through connection operation, and then remove the candidate set containing non-frequent subsets through pruning, and calculate the support of frequent C-item set that meets the threshold requirements;
[0195] The association rules are generated from the frequent item sets, the non-empty subsets are extracted as the rule antecedents, and the confidence calculation formula is:
[0196] Confidence(D⇒F) = Support(D∪F) / Support(D)
[0197] where D is an item set composed of meteorological environment and road condition indicators, F is the consequent item set, indicating the results caused by D, specifically traffic accidents and traffic congestion, D⇒F is the association rule, that is, the logical reasoning relationship between the occurrence of D and the occurrence of the consequent item set F, Confidence(D⇒F) is the confidence of this association rule, that is, the possibility of the occurrence of F under the condition of D, Support(D∪F) is the support of the union of D and F, including the frequency of the occurrence of D and F in the total transactions;
[0198] The confidence is calculated, and the effective rules not lower than the minimum confidence threshold are retained;
[0199] The effective rules are arranged in descending order of “support-confidence”, and the association rule base is constructed.
[0200] The probability of occurrence of traffic abnormal events is identified in the following steps:
[0201] Based on the professional knowledge and actual needs in the field of transportation, the ontology architecture of the traffic knowledge graph is constructed, the “meteorological environment” entity type is determined, covering temperature, humidity, rainfall, wind speed, and visibility, and the “traffic event” entity type is determined, including traffic accidents, traffic congestion, and road construction. Then, the “trigger” and “impact” relationship types are constructed: the “trigger” relationship is used to describe the direct cause of meteorological environment factors leading to traffic events, for example, heavy rain may cause traffic accidents; the “impact” relationship reflects the indirect effect of meteorological environment on traffic conditions, for example, heavy fog weather will affect the driving speed of vehicles, and thus cause traffic congestion. In addition, attributes are added to each entity, such as the attributes of meteorological environment entities including specific numerical values and duration, and the attributes of traffic event entities including event level and impact range, so as to fully depict the characteristics of entities.
[0202] Deep analysis is performed on the established association rule base, entity and relationship information in the rule are extracted, and meteorological environment indicators and traffic events are taken as nodes in the knowledge graph. According to the rule content, the directed edges between nodes are constructed to form a weighted directed graph. For the rule "if there is heavy rain and waterlogged road conditions, there is a higher probability of traffic accidents", a directed edge from the "heavy rain" and "waterlogged road" nodes to the "traffic accident" node is established in the knowledge graph, and the support and confidence of the rule are taken as the weight of the edge. These information is stored in a graph database such as Neo4j, realizing the visualization and structured storage of association rules, facilitating subsequent query and analysis;
[0203] Real-time meteorological data is accessed, including official monitoring by meteorological departments and vehicle-mounted meteorological sensors. Road surface sensing data is obtained through geomagnetic sensors and camera devices deployed on the road, covering road conditions, traffic volume and speed information. At the same time, historical traffic event data is introduced, including detailed records of the time, location and cause of the event. Data fusion technology is used to match and integrate these multi-source data with existing information in the traffic knowledge graph. For new entities or relationships, the graph is supplemented in a timely manner. If the attributes of an existing entity change, such as real-time meteorological data updates, the corresponding content in the graph is modified synchronously to ensure that the knowledge graph always reflects the real traffic environment conditions.
[0204] When designing the probability reasoning model, for a single association rule, its confidence is directly taken as the probability of traffic abnormal event occurrence. The confidence of a rule is 80%, so when the rule's antecedent conditions are met, the probability of the corresponding traffic event occurrence is 80%. When there are multiple association rules, a weighted average method is used to calculate the comprehensive probability, giving appropriate weights according to the support and confidence of each rule to avoid the limitations of a single rule. Through this model, real-time traffic data is analyzed to continuously monitor the probability of traffic abnormal event occurrence. Once the probability exceeds the set threshold, the early warning mechanism is triggered to generate warning information.
[0205] A real-time data processing system is established to continuously obtain meteorological, road and traffic flow data and quickly match them with the association rules in the knowledge graph. Different levels of probability thresholds are set, such as low risk (60%-70%), medium risk (70%-80%) and high risk (above 80%), corresponding to different warning levels. When the calculated probability of traffic abnormal event occurrence reaches the corresponding threshold, warning is displayed through various ways such as pop-up reminders, voice broadcasts and map highlighting on the vehicle owner's car machine and traffic management platform. In the visualization interface, the probability distribution, impact range and associated factors of traffic abnormal events are presented in the form of charts and heat maps, making it easy for traffic management departments and vehicle owners to understand the current traffic conditions and take timely measures.
[0206] A regular update mechanism is established to re-mine association rules based on newly collected data, optimize the traffic knowledge graph, analyze new types of weather-traffic event correlation relationships that may exist in new data, update entities, relationships and weights in the graph, evaluate and optimize the probability reasoning model, verify the accuracy of the model prediction using historical traffic event data, continuously improve the precision and reliability of the model in identifying the probability of traffic abnormal events by adjusting model parameters and improving algorithm methods, and ensure that the entire system can adapt to changing traffic environments and continuously provide effective support for traffic management and travel safety.
[0207] The road traffic safety intelligent warning device based on environmental characteristics comprises:
[0208] A road environment acquisition module is configured to acquire environmental data based on sensors;
[0209] A congestion judgment module is configured to divide and mark congested road sections;
[0210] A weather acquisition module acquires weather on congested road sections based on a drone;
[0211] An analysis module is configured to analyze weather factors and road surface condition indicators that have a significant impact on traffic, classify different combinations of weather conditions and road surface conditions, and establish an association rule library;
[0212] A prediction module is configured to identify the probability of traffic abnormal events, including traffic accidents and traffic congestion, based on data in the association rule library;
[0213] A warning module implements different warning methods based on different warning levels.
[0214] The road traffic safety intelligent warning device based on environmental characteristics of the present application has significant advantages in data collection, analysis, and warning through multi-module cooperation. The road environment acquisition and weather acquisition modules use sensors and drones to achieve real-time and accurate collection of multi-source data on road surfaces, traffic, and weather. The congestion judgment module locates congested road sections based on data analysis.
[0215] The analysis module uses attention mechanisms and random forest algorithms to mine the non-linear relationship between environmental factors and traffic conditions, and constructs a dynamic association rule library. The prediction module combines rule confidence and weighted average method with graph neural network to predict traffic abnormal probability, with an error control within 10% and a 30-minute early warning.
[0216] Specific case
[0217] Road surface condition data collection: Deploy road surface condition monitoring stations at regular intervals (e.g., every 500 meters) on major urban roads and key sections of highways. Equip the stations with distributed fiber optic sensors, which are buried under the road surface to monitor strain and temperature (accuracy up to ±0.1°C) in real time, thereby identifying cracks and settlement diseases. Additionally, use a 3D laser scanner installed on a patrol vehicle to periodically (e.g., once a week) scan the road surface, generating a millimeter-level three-dimensional model of road smoothness with a precision of 5mm;
[0218] Traffic flow data collection: Install millimeter wave radars and ground magnetic vehicle detectors at various sections of the road. Millimeter wave radars can cover a range of 300 meters, counting vehicle speed (error <1 km / h), traffic volume, and classifying vehicle types (e.g., identifying the proportion of trucks). Ground magnetic vehicle detectors are buried in the road surface with an accuracy of ≥98%, effectively distinguishing between vehicle parking and slow-moving states. These devices collect real-time traffic flow data, including the number of vehicles passing in different directions and types;
[0219] Establishment of congestion threshold: Collect historical traffic flow data and classify and count it by different road sections and time periods (e.g., weekday morning and evening peak hours, weekends). Through data analysis, determine the average traffic flow for each road section in different time periods and set the congestion threshold based on the road's designed capacity. For example, a certain two-way four-lane urban main road is defined as congested during the weekday morning peak hours when the number of vehicles passing per hour exceeds 1500. This number is the congestion threshold for that road section at that time.
[0220] Congestion section division and marking: Compare real-time traffic flow data with the set congestion threshold. Once the traffic flow of a certain road section exceeds its corresponding congestion threshold, the system automatically marks that road section as congested. Simultaneously, record the congestion start time and the specific location of the congested road section (e.g., the section between the XX Road intersection and the XX Road intersection) and upload this marked congestion road section data to the UAV system.
[0221] Weather monitoring network construction: Equip UAVs with weather sensors, including a five-parameter weather instrument that can monitor visibility (measurement range 10m-10km), road surface temperature (-40°C~+80°C), and snow / ice thickness (accuracy ±1mm). Based on the city's geographical range and traffic congestion situation, reasonably plan the flight area and route of the UAVs to construct a weather monitoring network, ensuring comprehensive coverage of possible congested road sections.
[0222] Flight path planning based on congested road segments: When the UAV system receives congestion road segment marking information, according to the location and range of the congestion road segment, combined with the surrounding geographical environment (such as building distribution, no-fly area), using path planning algorithm to plan the optimal flight path for the UAV, using A* algorithm, taking the center point of the congestion road segment as the target point, avoiding no-fly areas and obstacles, planning a safe and efficient flight route, so that the UAV can quickly reach the congestion road segment, and collect real-time meteorological environmental data, including temperature, pressure, humidity, wind speed, wind direction, during the flight process;
[0223] Data integration and time dimension consideration: Integrate the meteorological environmental data, road condition data and traffic flow data collected at different times, divide the data into different time segments (such as every 15 minutes) according to time sequence, ensure that each time segment contains complete multi-factor data, for example, in the time period of 8:00-8:15, there are meteorological data (such as temperature 25℃, humidity 60%, wind speed 3m / s), road condition data (no cracks, good flatness) and traffic flow data (120 vehicles) of a certain road segment in this time period;
[0224] Nonlinear relationship mining and attention mechanism introduction: Use deep learning algorithms such as long short-term memory network (LSTM) combined with attention mechanism to analyze the integrated data, LSTM network can process time series data, mine the nonlinear relationship between meteorological environment, road condition and traffic flow at different times, and attention mechanism is used to focus on meteorological factors and road condition indicators that have greater impact on traffic, it is found that in heavy rain weather, the influence of road water depth on traffic flow is larger, through the attention mechanism, the model will pay more attention to the relationship between road water depth and traffic flow;
[0225] Classification and association rule base establishment of meteorological conditions and road condition combinations: According to the mined relationship, classify different combinations of meteorological conditions and road conditions, divide meteorological conditions into sunny, cloudy, light rain, heavy rain, and heavy rain categories, and divide road conditions into dry, wet, waterlogged, and icy categories, through data analysis, determine the change rule of traffic flow under different combinations, and establish an association rule base, such as when the meteorological condition is heavy rain and the road condition is waterlogged, the traffic flow will decrease by 30%-50%, and the congestion probability will increase by 60%-80%;
[0226] Traffic knowledge graph construction: Based on the data in the association rule library, taking roads, traffic flow, weather conditions, road conditions, and traffic abnormal events as nodes, and their mutual relationships (such as causal relationship, influence relationship) as edges, a traffic knowledge graph is constructed. The heavy rain node is connected to the road water accumulation node through the cause relationship edge, and the road water accumulation node is connected to the traffic flow decrease node through the influence relationship edge. The traffic knowledge graph is stored and managed using a graph database (such as Neo4j) for easy querying and analysis.
[0227] Traffic abnormal event occurrence probability prediction: Using the constructed traffic knowledge graph, combined with real-time collected meteorological environment data, road condition data, and traffic flow data, the occurrence probability of traffic abnormal events is predicted through inference algorithms. When real-time data shows that the current weather condition is heavy rain, some road sections have accumulated water according to road condition monitoring station feedback, and traffic flow has decreased significantly in a short time, through the inference of the knowledge graph, it is predicted that the probability of traffic accidents in this area is 30%, and the probability of traffic congestion is 70%.
[0228] Warning level classification: According to the probability of traffic abnormal events, a multi-level warning system is set up, and the warning level is divided into three levels: first-level warning for high-risk warning, triggered when the probability of traffic accidents ≥50% or the probability of traffic congestion ≥80%; second-level warning for medium-risk warning, triggered when the probability of traffic accidents is between 30%-50% or the probability of traffic congestion is between 50%-80%; third-level warning for low-risk warning, triggered when the probability of traffic accidents is between 10%-30% or the probability of traffic congestion is between 30%-50%.
[0229] Implementation of warning methods for different warning levels: Different warning methods are implemented on the car machine according to different warning levels. When the first-level warning is triggered, a prominent red warning window pops up on the car machine screen, displaying warning information (such as high-risk traffic accidents and severe traffic congestion on the front road section, please plan a detour route immediately), and a continuous high-intensity alarm sound is emitted; when the second-level warning is triggered, an orange warning window pops up on the car machine screen, displaying warning information (such as possible traffic congestion on the front road section, please drive carefully), and a medium-intensity alarm sound is emitted; when the third-level warning is triggered, a yellow prompt box pops up on the car machine screen, displaying prompt information (such as slight changes in traffic conditions on the front road section, please pay attention to road conditions), and a slight prompt sound is emitted. At the same time, the warning information is sent to the command center of the traffic management department so that they can take timely traffic relief measures;
[0230] In the data collection, multiple sensors are used to realize multi-dimensional and real-time monitoring of road environment and traffic flow, guarantee the integrity and accuracy of data, lay a solid foundation for subsequent analysis, accurately locate the congestion section in the traffic management link, and greatly improve the efficiency of congestion processing and weather data acquisition; in the data analysis layer, the advanced algorithm is used to mine the nonlinear relationship of multiple factors, and the key influence factor is focused on, so that the traffic prediction accuracy and model training efficiency are significantly improved; in the application scene, the multi-level early warning system cooperates with the traffic knowledge graph, which can effectively shorten the response time of the driver, reduce the accident rate, and assist the management department in scientific decision-making; from the comprehensive value, this method not only can reduce the traffic operation cost and reduce the resource waste, but also can promote the upgrading of the traffic management mode, optimize the urban traffic ecology, significantly improve the commuting satisfaction of citizens, and effectively promote the construction of smart city.
[0231] The above shows and describes the basic principles, main features and advantages of the present application. Those skilled in the art should understand that the present application is not limited to the above examples, and the above examples and descriptions in the specification are only the principles of the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application.
Claims
1. A smart early warning method for road traffic safety based on environmental characteristics, characterized in that, The early warning steps are as follows: Based on sensor-collected road environment data, including road surface condition data and traffic flow data; Traffic flow data is analyzed to determine its magnitude, a congestion threshold is established, road segments with traffic flow exceeding the congestion threshold are marked and uploaded to the drone system; The drone is equipped with meteorological sensors to build a meteorological monitoring network, and plans its flight path based on the marked congested road sections to collect meteorological environmental characteristic data of the congested road sections; Considering the time-varying characteristics of the traffic environment, we explore the nonlinear relationship between meteorological environment, road conditions and traffic flow at different times, introduce an attention mechanism to focus on meteorological factors and road condition indicators that have a significant impact on traffic, classify different combinations of meteorological conditions and road conditions, and establish an association rule base. Based on data within the association rule base, a traffic knowledge graph is constructed to predict the probability of traffic anomalies, including traffic accidents and traffic congestion. A multi-level early warning system is set up, which divides different early warning levels based on the probability of abnormal events, and implements different early warning methods on the vehicle owner's in-vehicle infotainment system for different early warning levels; The specific steps to establish an association rule base are as follows: After preprocessing the collected environmental data, the variance, maximum and minimum values of traffic flow data at different times are calculated to identify data characteristics. The moving average method is used to extract the changing trend of data features, and the Fourier transform is used to convert the time domain data to the frequency domain to obtain the periodic pattern of the data. An attention mechanism is introduced to assign weights to meteorological and road condition indicators at different times. The meteorological and road condition indicators are vectorized, and the weights are multiplied by the vectorized indicators and summed to calculate the traffic impact value, focusing on meteorological and road condition factors that have a significant impact on traffic. The formula for calculating traffic impact value is: in Indicates time The traffic impact value calculated in real time is the final output of the entire calculation, used to measure the combined impact of weather and road conditions on traffic. The activation function introduces a non-linear factor, enabling the model to learn and fit complex relationships. It transforms the weighted summation result into the output range. This is a row vector, representing the model's parameter vector, used to perform a linear transformation on the weighted feature vector. Its dimension matches that of subsequent vector multiplication operations. The weight matrix, which is also a parameter of the model, is used to perform a linear transformation on the input feature vector to learn the relationship between different feature combinations and traffic impact values. in , is the feature attention weight, representing the time... At that time, the first The relative importance weights of each meteorological / road condition feature dimension; in , representing time At that time, the first of the vectorized meteorological environment and road surface condition indicators One eigenvalue; For bias terms; Random forest is used to classify the periodic patterns and meteorological factors that have a significant impact on traffic. An association rule mining algorithm is used to mine the association rules between meteorological environmental features, road conditions and traffic flow in the classification results. Minimum support and minimum confidence thresholds are set, and the dataset is scanned to find frequent itemsets, that is, combinations of meteorological and road conditions that occur more frequently than the minimum support. An association rule library is generated from the frequent itemsets. The core of the association rule mining algorithm includes: Itemsets are sets consisting of meteorological factors, road conditions, and traffic flow levels; Support is the frequency of an itemset in a dataset, and the formula is: Confidence score is the reliability of a rule, representing the probability that a transaction containing X also contains Y. The formula is: Lifting degree is the effectiveness of a rule, measuring the impact of the occurrence of X on the occurrence of Y. The formula is: The excavation steps are as follows: Collect meteorological data, road condition data, and traffic flow data, and then clean, standardize, and discretize them. Use the Apriori algorithm to find all itemsets with support higher than a threshold; Rules with confidence and lift values higher than the threshold are extracted from the frequent itemset to obtain association rules.
2. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, The sensors include lidar sensors and microwave radar sensors. The lidar sensor scans the road surface to detect the road surface smoothness, rut depth and crack width structure, and obtains road surface condition data. Microwave radar sensors transmit microwave signals and track vehicle reflections to calculate traffic flow, speed, and vehicle spacing, thus obtaining comprehensive traffic flow data.
3. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, Traffic flow data is compared directly, with different traffic flow data being compared and sorted from largest to smallest. The steps for establishing a congestion threshold are as follows: Collect historical traffic flow data for different road segments, and arrange the collected historical traffic flow data for different road segments in ascending order, denoted as the dataset. ,in For the amount of data, For the first in the dataset Given a set of data, calculate the position index of the quantile. The calculation formula is as follows: in It is the percentile percentage to be calculated. For the amount of data, Here is the position index of the quantile, where Based on the experience of traffic management departments and the setting of management objectives; Location index based on quantiles Calculate the quantile value ,like If it is an integer, then That is, the first in the dataset Each data point is a quantile; like Not an integer, let for Round down to the nearest integer part. for The decimal part, i.e. The formula for calculating quantiles is: By calculating the quantiles of the data, which serve as the threshold, traffic flow data exceeding the threshold is segmented, marked, and uploaded.
4. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, A meteorological monitoring network is constructed by dividing the city into network cells through a geographic information system and a traffic network database. Drones are deployed in each cell to acquire weather data in real time, and meteorological data for different congested road sections are collected within a unit of days. The drone flight path planning is based on the ant colony optimization algorithm, which plans the path and collects meteorological and environmental data by flying through congested road sections in sequence.
5. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, The steps for calculating the variance, maximum, and minimum data characteristics are as follows: Suppose that the traffic flow dataset collected within a unit of time is ,in Given the number of data points within this time interval, the maximum value (Max) is calculated using the following formula: in This represents the maximum observed traffic flow within the given time interval, reflecting the peak traffic flow. `max` is the operation to find the maximum value from the dataset. Minimum value The calculation formula is: in This represents the minimum observed traffic flow within the given time interval, reflecting the lowest point in traffic flow. The "min" operation finds the minimum value from the dataset. The formula for calculating variance is: in The average value in the data reflects the average level of this set of data. The population variance is a statistic that measures the dispersion of the data.
6. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, The trend extraction steps for data features using the moving average method are as follows: Based on the data characteristics and analysis objectives, the sliding window length was determined to capture daily traffic flow data. The window size was set to 24, representing a 24-hour day. By trying different sizes, the optimal value was determined. Using time as a data feature index, the data features are transformed into time series form, and a moving average is calculated for the time series. Window size is From the first Calculations begin with the first data point, and the... Simple moving average at each position The calculation formula is: in For the index variable in the summation operation, For the time series data, the first Observations at each time point; The calculated moving averages are arranged in order to form a new sequence that reflects the trend characteristics of the data. The steps for converting time-domain data to the frequency domain based on Fourier transform and obtaining the periodicity of the data are as follows: The Discrete Fourier Transform is chosen for computation. The new sequence data is calculated based on the selected Fourier transform algorithm to obtain a frequency domain representation. The calculation result is a complex number sequence, where the amplitude of each complex number represents the intensity of the corresponding frequency component, and the phase represents the phase shift of that frequency component. Analyze the frequency domain results and calculate the frequency values. The calculation formula is: in The sampling period is For data length, For frequency indexing, draw amplitude spectrum and frequency-amplitude relationship graph, observe frequency components with large amplitude, and the period corresponding to the frequency component is the periodicity of the data; The steps for calculating traffic impact values, focusing on meteorological factors with significant traffic impact, are as follows: It has A meteorological environmental indicator, denoted as ; a road surface condition indicators, denoted as Combine them into a feature vector : in The mathematical symbol for transpose; Each indicator is assigned a weight value w1 and w2, and the weight values are combined into a weight vector value W. The weight values are obtained based on expert analysis, and the weights of each indicator are directly given by experts in the fields of meteorology and transportation based on their experience. By weight vector With feature vectors Perform a dot product operation to obtain the traffic impact value. : Traffic impact values obtained The larger the value, the higher the value in the current feature vector. The greater the influencing factors present, the greater the impact of weather on road conditions.
7. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, The specific steps for generating an association rule base from a frequent item set are as follows: The discretized meteorological and road surface indicator samples are transformed into transactions, including corresponding indicator combinations; The support of a single itemset is calculated using the formula: Support(D) = number of transactions containing item D / total number of transactions. Support(D) is the Dth support of the itemset, which is the frequency of the itemset D in all transactions, measuring the importance of the itemset. D is the itemset. Frequent 1-itemsets with a support not lower than the minimum support threshold are selected. In the iteration phase, frequent (C-1)-itemsets are merged through a join operation to generate candidate C-itemsets. Then, candidate sets containing infrequent subsets are removed through pruning, and the support is calculated to retain frequent C-itemsets that meet the threshold requirements. Association rules are generated from frequent itemsets, and non-empty proper subsets are extracted as rule antecedents. The confidence score is calculated using the following formula: Confidence(D⇒F) = Support(D∪F) / Support(D) Where D is an itemset composed of meteorological environment and road condition indicators, F is a consequent itemset representing the result caused by D, specifically traffic accidents and traffic congestion, D⇒F is an association rule, that is, the logical reasoning relationship that the consequent itemset F appears when D appears, Confidence(D⇒F) is the confidence of this association rule, that is, the probability of F appearing under D, and Support(D∪F) is the union support of D and F, which includes the frequency of D and F transactions in the total transaction; Calculate the confidence level and retain valid rules that are not lower than the minimum confidence threshold; The effective rules are arranged in descending order of "support - confidence" to construct an association rule base.
8. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1, characterized in that, The steps for identifying the probability of traffic anomalies are as follows: Define the ontology of the traffic knowledge graph, clarify the entity types of "meteorological environment" and "traffic event", construct the relationship types of "cause" and "impact", and add attributes to the entities; The association rule base data is mapped to the knowledge graph, the entities and relationships in the rules are parsed, and the data is stored in the graph database to form a weighted directed graph; Integrate multi-source data, access real-time weather, road surface sensor and historical traffic event data, and merge and update map content; Design a probabilistic reasoning model, using confidence level as the probability for a single rule and weighted average method for multiple rules, to monitor and warn of abnormal events; Real-time data matching rules are acquired, probability thresholds are set to trigger alerts, and the results are visualized. We continuously optimize the knowledge graph and model, and regularly update the data and re-mind the rules.
9. A road traffic safety intelligent early warning device based on environmental characteristics, applied to the road traffic safety intelligent early warning method based on environmental characteristics according to any one of claims 1-8, characterized in that, The early warning device includes: The road environment data acquisition module is configured to collect environmental data based on sensors. The congestion assessment module is configured to divide and mark congested road segments; The meteorological data acquisition module is based on drones to collect meteorological data on congested road sections; The analysis module is configured to classify different combinations of meteorological conditions and road conditions that have a significant impact on traffic, and establish an association rule base. The prediction module is configured to predict the probability of traffic anomalies and traffic congestion based on data in the association rule base. The early warning module implements different early warning methods based on different early warning levels.
Citation Information
Patent Citations
Highway network situation awareness method and system based on Internet of Things
CN117994983A
Multi-mode integrated traffic abnormal event detection method
CN118298628A