Road traffic safety intelligent early warning method and device based on environmental characteristics

Through the use of sensors and drone monitoring networks, the nonlinear relationship of the road environment is explored, a traffic knowledge map is constructed, and multi-level warnings are set up. This solves the shortcomings of the road traffic safety warning system in existing technologies and realizes accurate traffic anomaly warning and management.

CN120636151AActive Publication Date: 2025-09-12SHANDONG UNIV OF TECH

Patent Information

Application Number
CN202510813754.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-12
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

The existing road traffic safety early warning system is unable to fully and in real time reflect the complex and changing road environment, especially the impact of meteorological and environmental factors on traffic, resulting in the inability to timely and accurately assess potential threats. It lacks a multi-level early warning system and differentiated measures, and is unable to provide accurate early warning information.

Method used

Road environment data is collected through sensors, and a meteorological monitoring network is built using drones equipped with meteorological sensors. The nonlinear relationship between meteorological environment, road conditions and traffic flow is explored. The attention mechanism is introduced, an association rule base is established, a traffic knowledge graph is constructed, a multi-level early warning system is set up, and targeted early warnings are implemented.

Benefits of technology

It achieves multi-dimensional real-time perception of road traffic conditions, accurately identifies the probability of abnormal events, and discovers risks in advance. The multi-level early warning system ensures that car owners receive information in a timely manner, reduces accident risks, and improves traffic management efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005454608950000041
    Figure BDA0005454608950000041
  • Figure BDA0005454608950000042
    Figure BDA0005454608950000042
  • Figure BDA0005454608950000043
    Figure BDA0005454608950000043
Patent Text Reader

Abstract

The invention discloses a road traffic safety intelligent early warning method and device based on environment characteristics, and relates to the technical field of municipal roads, and the early warning steps are as follows: collecting road environment data based on a sensor, including road surface condition data and motor vehicle traffic flow data; performing size judgment on the traffic flow data, establishing a congestion threshold value, dividing and marking road sections with traffic flows greater than the congestion threshold value, and uploading the road sections to an unmanned aerial vehicle system; the unmanned aerial vehicle carries a meteorological sensor, constructs a meteorological monitoring network, carries out flight path planning based on the divided and marked congested road sections, collects meteorological environment characteristic data of the congested road sections, and carries out traffic safety early warning on related vehicles. According to the method, in the aspects of traffic management and safety assurance, the congested road sections are marked to assist a traffic department in planning and dispersion in advance, the road passing efficiency is improved, early warning is conducted in time to remind vehicle owners of prevention, accident risks are reduced, personnel and property losses are reduced, and long-term effective operation is achieved. And the road traffic safety management level is comprehensively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of municipal road technology, and in particular to a method and device for intelligent early warning of road traffic safety based on environmental characteristics. Background Art

[0002] With the acceleration of urbanization and the continuous growth of car ownership, road traffic safety issues 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 lives.

[0003] Currently, road traffic safety warnings primarily rely on traditional surveillance cameras and limited road sensors. These devices can only capture basic information about traffic flow and road conditions, but are unable to fully and accurately reflect the complex and ever-changing road environment. Traditional warning methods often lack effective monitoring and analysis of the impact of meteorological factors such as rain, snow, fog, haze, and temperature on traffic, making it impossible to accurately and timely assess potential threats to traffic safety.

[0004] Existing technologies often process traffic data at the level of simple statistical analysis, failing to fully explore the complex, nonlinear relationships between meteorological conditions, road conditions, and traffic flow. This results in an inability to accurately identify the probability of traffic anomalies and prevents drivers from receiving targeted early warning information. Furthermore, the lack of a unified, multi-level warning system prevents the implementation of differentiated warning measures based on varying risk levels, significantly reducing the effectiveness of warnings and preventing effective integration, making it impossible to provide a comprehensive and integrated decision-making basis for traffic safety warnings. Therefore, we propose an intelligent road traffic safety warning method and device based on environmental characteristics. Summary of the Invention

[0005] In order to solve the above technical problems, a road traffic safety intelligent warning method and device based on environmental characteristics are provided. This technical solution solves the above problems.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a road traffic safety intelligent early warning method based on environmental characteristics, wherein the early warning steps are:

[0007] Collect road environment data based on sensors, including road condition data and traffic flow data;

[0008] Determine the size of traffic flow data, establish a congestion threshold, mark the road sections where the traffic flow is greater than the congestion threshold, and upload them to the drone system;

[0009] Drones are equipped with meteorological sensors to build a meteorological monitoring network, plan flight paths based on marked congested road sections, and collect meteorological information on congested road sections.

[0010] Considering the time-varying characteristics of the traffic environment, the nonlinear relationship between the weather environment, road conditions, and traffic flow at different times is explored. An attention mechanism is introduced to focus on weather factors and road condition indicators that have a significant impact on traffic. Different combinations of weather conditions and road conditions are classified to establish an association rule library.

[0011] Based on the data in the association rule library, a traffic knowledge graph is constructed to predict the probability of traffic abnormal events, including traffic accidents and traffic congestion;

[0012] A multi-level early warning system is set up, and different early warning levels are divided based on the probability of abnormal events. Different early warning methods are implemented on the owner's car computer for different warning levels.

[0013] Preferably, the sensor includes a laser radar sensor and a microwave radar sensor, wherein the laser radar sensor scans the road surface to detect the road surface flatness, rut depth and crack width structure, and obtains road surface condition data;

[0014] Microwave radar sensors transmit microwave signals and track the reflected echoes from vehicles to calculate vehicle volume, speed, and distance between vehicles, and comprehensively obtain traffic flow data.

[0015] Preferably, the traffic flow data is judged by direct comparison, and the different traffic flow data obtained are compared and sorted from large to small;

[0016] The steps to establish the congestion threshold are:

[0017] Collect historical traffic flow data of different road sections, and arrange the collected historical traffic flow data of different road sections in order from small to large, and record them as data sets x1, x2, ..., x n , where n is the number of data, x n For the nth data in the data set, calculate the position index i of the quantile, and the calculation formula is:

[0018] i=p×(n+1)

[0019] Where p is the percentile to be calculated, n is the number of data, and i is the position index of the percentile, where p is based on the experience of the traffic management department and the management goal setting;

[0020] Calculate the quantile Q based on the value of the quantile position index i p , if i is an integer, then Q p =x i , that is, the i-th data in the data set is the quantile;

[0021] If i is not an integer, let j be the integer part of i, rounded down, and f be the decimal part of i, that is, i = j + f, then the quantile calculation formula is:

[0022] Q p =x j +f×(x j+1 -x j )

[0023] By calculating the quantile of the data, this quantile is the threshold, and the traffic flow data above the threshold is divided, marked and uploaded.

[0024] Preferably, a meteorological monitoring network is constructed by dividing the city into network cells through geographic information systems and traffic network data. UAVs are deployed in each cell to obtain weather data in real time, and meteorological data are collected for different congested sections within a unit day.

[0025] The flight path planning is based on the ant colony optimization algorithm, and the congested road sections are flown in sequence to collect meteorological environment information.

[0026] Preferably, the specific steps of establishing an association rule base are:

[0027] After pre-processing the collected environmental data, the variance, maximum and minimum data characteristics of the traffic flow data at different times are calculated;

[0028] The trend of data features is extracted based on the sliding average method, and the time domain data is converted to the frequency domain based on the Fourier transform to obtain the periodicity of the data;

[0029] An attention mechanism is introduced to assign weights to weather and road condition indicators at different times. These indicators are then vectorized, and the weights are multiplied by the vectorized indicators and summed to calculate the traffic impact value, focusing on weather and road condition factors that have the greatest impact on traffic.

[0030] The calculation formula for traffic impact value is:

[0031]

[0032] Among them I t It represents the traffic impact value calculated at time t, which is the final output of the entire calculation and is used to measure the comprehensive impact of weather and road conditions on traffic. σ is the activation function, which introduces nonlinear factors to enable the model to learn and fit complex relationships and convert the weighted summation result into the output range. is a row vector, which is the parameter vector of the model and is used to linearly transform the weighted feature vector. Its dimension matches the subsequent vector multiplication operation. ois the weight matrix, which is also the parameter of the model. It is used to perform linear transformation on the input feature vector and learn the relationship between different feature combinations and traffic impact values; β t,i Where i = 1, 2, ..., n + m is the feature attention weight, which represents the relative importance weight of the i-th weather / road condition feature dimension at time t; x t,i Where i = 1, 2, ..., n + m, represents the i-th eigenvalue of the quantized meteorological environment and road condition indicators at time t; b o is the bias term;

[0033] Classify the obtained periodic patterns and meteorological factors with great traffic impact based on random forest;

[0034] Using association rule mining algorithms, we mine association rules between weather conditions, road conditions, and traffic flow in the classification results. We set minimum support and minimum confidence thresholds, scan the data set to find frequent item sets, which are combinations of weather and road conditions with a frequency higher than the minimum support, and generate an association rule base from the frequent item sets.

[0035] The core of the association rule mining algorithm includes:

[0036] The item set is a collection of meteorological factors, road conditions, and traffic flow levels;

[0037] Support is the frequency of an item set appearing in a data set, and the formula is:

[0038]

[0039] Confidence is the reliability of the rule, which indicates the probability that Y is also included in a transaction containing X. The formula is:

[0040]

[0041] Lift is the effectiveness of the rule, which measures the impact of the occurrence of X on the occurrence of Y. The formula is:

[0042]

[0043] The mining steps are:

[0044] Collect meteorological data, road condition data and traffic flow data, and perform cleaning, standardization and discretization;

[0045] Use the Apriori algorithm to find all item sets with support higher than the threshold;

[0046] Rules with confidence and lift higher than the threshold are extracted from the frequent item sets to obtain association rules.

[0047] Preferably, the steps for calculating the variance, maximum and minimum data features are:

[0048] Assume that in unit time, the traffic flow data set y1,y2,…,y n’ , where n' is the number of data points in the time interval, the maximum value Max is calculated as:

[0049] Max=max(y1,y2,…,y n’ )

[0050] Among them, Max represents the maximum observed value of traffic flow in the time interval, reflecting the peak value of traffic flow. Max is the operation of finding the maximum value in the data set;

[0051] The minimum value Min calculation formula is: Min=min(y1,y2,…,y n’ )

[0052] Where Min represents the minimum observed value of traffic flow in the time interval, reflecting the trough value of traffic flow, and nin is the operation of finding the minimum value, which is to find the minimum value in the data set;

[0053] The formula for calculating variance is:

[0054] in is the average value in the data, reflecting the average level of this set of data, σ 2 is the population variance, a statistic that measures the degree of dispersion of data.

[0055] Preferably, the trend steps of extracting data features using the sliding average method are:

[0056] Based on the data characteristics and analysis purpose, the sliding window length is determined to capture the daily changes in traffic flow. The window size is set to 24, representing 24 hours a day. Different sizes are tried to determine the optimal value.

[0057] Use time as the data feature index, convert the data features into time series form, calculate the sliding average, for the time series z1,z2,…,z m , the window size is k, starting from the kth data point, the simple sliding average SMA of the i-th position i The calculation formula is:

[0058]

[0059] Where j is the index variable in the sum operation, z j ' is the observation value at the jth time point in the time series data;

[0060] Arrange the calculated sliding averages in order to form a new sequence that reflects the trend characteristics of the data;

[0061] Based on Fourier transform, the time domain data is converted to the frequency domain, and the steps to obtain the periodicity of the data are as follows:

[0062] Select discrete Fourier transform for calculation processing;

[0063] 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 offset of the frequency component;

[0064] Analyze the frequency domain results and calculate the frequency value f k’ , the calculation formula is:

[0065]

[0066] Where T is the sampling period, N' is the data length, k' is the frequency index, draw the amplitude spectrum, the frequency-amplitude relationship diagram, observe the frequency components with large amplitudes, and the period corresponding to the frequency components is the periodic law in the data;

[0067] The steps to calculate the traffic impact value and focus on the meteorological factors that have the greatest impact on traffic are as follows:

[0068] Suppose there are m' meteorological environment indicators, recorded as e1, e2, ..., e m’ ; a road condition index, denoted as p1, p2,…, p a , and combine them into a feature vector B:

[0069] B=[e1,e2,…,e m ,,p1,p2,…,p a ] T’

[0070] Where T′ is the mathematical symbol for transposition;

[0071] Assign weight values ​​w1 and w2 to each indicator, and combine the weight values ​​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;

[0072] By performing a dot product operation on the weight vector W and the feature vector B, the traffic impact value S is obtained:

[0073] S=W·X

[0074] The larger the traffic impact value S is, the greater the influencing factors in B in the current feature vector are, indicating that the degree of influence of weather and road conditions is greater.

[0075] Preferably, the specific steps of generating an association rule base from a frequent item set are:

[0076] Convert the discretized meteorological and road index samples into transactions, including corresponding index combinations;

[0077] Calculate the support of a single item set. For each single item set, use the formula: Support(D) = Number of transactions containing item D / Total number of transactions. Support(D) is the Dth support of the item set, that is, the frequency of 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 sets whose support is not less than the minimum support threshold are selected.

[0078] Entering the iteration phase, frequent (C-1)-itemsets are merged through the concatenation operation to generate candidate C-itemsets, and 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;

[0079] Generate association rules from frequent item sets, extract non-empty true subsets as rule antecedents, and the confidence calculation formula is:

[0080]

[0081] Among them, D is an item set, which is composed of meteorological environment and road condition indicators. F is a consequent item set, which represents the results caused by D, specifically traffic accidents and traffic congestion. is the association rule, that is, the logical reasoning relationship between the appearance of the consequent item set F when D appears. is the confidence of this association rule, that is, the possibility of F appearing under the condition of D, Support(D∪F) is the support of the union of D and F, including the frequency of occurrence of transactions of D and F in the total transactions;

[0082] Calculate confidence and retain valid rules that are not lower than the minimum confidence threshold;

[0083] Arrange the valid rules in descending order of "support-confidence" and build an association rule base.

[0084] Preferably, the steps for identifying the probability of occurrence of abnormal traffic events are:

[0085] Define the traffic knowledge graph ontology, clarify the entity types of "weather environment" and "traffic event", construct the "trigger" and "impact" relationship types, and add attributes to the entities;

[0086] Map the association rule base data to the knowledge graph, parse the entities and relationships in the rules, and store them in the graph database to form a weighted directed graph;

[0087] Integrate multi-source data, access real-time weather, road sensor and historical traffic event data, and integrate and update map content;

[0088] Design a probabilistic reasoning model, use confidence as probability for a single rule, and use weighted average method to calculate multiple rules to monitor and warn of abnormal events;

[0089] Obtain data matching rules in real time, set probability thresholds to trigger warnings, and display them visually;

[0090] Continuously optimize knowledge graphs and models, regularly update data, and re-mine rules.

[0091] A smart early warning device for road traffic safety based on environmental characteristics, including:

[0092] A road environment collection module is configured to collect environmental data based on sensors;

[0093] A congestion determination module is configured to divide and mark congested road sections;

[0094] Weather collection module, based on drones to collect weather data on congested roads;

[0095] The analysis module is configured to analyze meteorological factors and road condition indicators that have a significant impact on traffic, classify different meteorological conditions and road condition combinations, and establish an association rule base;

[0096] A prediction module is configured to identify the probability of traffic anomalies, including traffic accidents and traffic congestion, based on data in an association rule base;

[0097] The early warning module implements different early warning methods based on different early warning levels.

[0098] Compared with the prior art, the present invention has the following beneficial effects:

[0099] The present invention uses sensors and drone meteorological monitoring networks to comprehensively collect road conditions, traffic flow and meteorological data, realizes multi-dimensional real-time perception, lays a solid foundation for subsequent analysis, mines nonlinear relationships and introduces attention mechanisms, accurately focuses on key factors, deeply understands the complex connections between factors, and uses knowledge graphs to identify the probability of abnormal events, so as to detect risks in advance and gain response time. The multi-level early warning system divides levels according to probability and adopts different early warning methods to achieve refined management, ensuring that car owners receive risk information in a timely manner and improving the pertinence and efficiency of traffic management. In terms of traffic management and safety assurance, marking congested sections helps traffic departments plan and guide traffic in advance, improve road traffic efficiency, and timely warn car owners to take precautions, reduce accident risks, reduce personal and property losses, and achieve long-term effective operation. This early warning method improves the level of road traffic safety management in all aspects through multi-link collaboration, from data collection and analysis to early warning function realization, and then to traffic management and system development. BRIEF DESCRIPTION OF THE DRAWINGS

[0100] Figure 1 This is a flow chart of the early warning steps of the present invention;

[0101] Figure 2 This is a framework diagram of the early warning device of the present invention. DETAILED DESCRIPTION

[0102] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art may conceive of other obvious variations.

[0103] Reference Figure 1 As shown in the figure, the intelligent early warning method for road traffic safety based on environmental characteristics has the following steps:

[0104] Collect road environment data based on sensors, including road condition data and traffic flow data;

[0105] Determine the size of traffic flow data, establish a congestion threshold, mark the road sections where the traffic flow is greater than the congestion threshold, and upload them to the drone system;

[0106] Drones are equipped with meteorological sensors to build a meteorological monitoring network, plan flight paths based on marked congested road sections, and collect meteorological information on congested road sections.

[0107] Considering the impact at different times, the nonlinear relationship between weather conditions, road conditions, and traffic flow at different times is explored. An attention mechanism is introduced to focus on weather factors and road condition indicators that have a significant impact on traffic. Different weather conditions and road condition combinations are classified to establish an association rule library.

[0108] Based on the data in the association rule library, a traffic knowledge graph is constructed to predict the probability of traffic abnormal events, including traffic accidents and traffic congestion;

[0109] A multi-level early warning system is set up, and different early warning levels are divided based on the probability of abnormal events. Different early warning methods are implemented on the owner's car computer for different warning levels.

[0110] This application uses sensors to collect road condition and traffic flow data. UAVs equipped with meteorological sensors build a meteorological monitoring network, which can comprehensively obtain road environment information and achieve real-time perception of road conditions and weather conditions in multiple dimensions, providing a rich and accurate data foundation for subsequent analysis. It also explores the nonlinear relationship between the weather environment, road conditions, and traffic flow at different times, introduces an attention mechanism to focus on key factors and classify them, and can accurately identify the combination of factors that have a significant impact on traffic, deeply understand the complex relationships between factors, and improve the accuracy of traffic situation judgment.

[0111] A traffic knowledge graph is constructed based on an association rule base to identify the probability of abnormal traffic events. This can detect potential risks of traffic accidents and traffic congestion in advance, leaving sufficient response time for traffic management departments and vehicle owners. A multi-level early warning system is established, which divides different warning levels and implements different warning methods according to the probability of abnormal events. This enables refined early warning management and provides corresponding intensity warnings for different levels of danger, ensuring that motor vehicle drivers are aware of risks in a timely manner, making traffic management more targeted and efficient.

[0112] Judging and marking congested sections based on traffic flow data can help traffic management departments plan and guide traffic in advance, reduce congestion duration, and improve overall road traffic efficiency. Timely and accurate warnings can remind motor vehicle drivers to take preventive measures in advance, such as slowing down and avoiding accidents, effectively reducing the incidence of traffic accidents, ensuring road traffic safety, and reducing casualties and property losses.

[0113] The sensors include laser sensors and microwave radar sensors. The laser sensor uses laser radar to scan the road surface, detect the road surface flatness, rutting depth and crack width structure, and obtain road surface condition data;

[0114] Microwave radar sensors transmit microwave signals and track the reflected echoes from vehicles to calculate vehicle volume, speed, and distance between vehicles, and comprehensively obtain traffic flow data.

[0115] This application uses LiDAR to scan the road surface, accurately detecting road surface flatness, rutting depth, and crack width indicators, obtaining high-precision road condition data, and providing a reliable basis for road maintenance and traffic safety assessments. Data is obtained by emitting microwave signals and tracking vehicle reflection echoes. Direct contact with vehicles is unnecessary, and traffic flow is not disrupted. Traffic flow, speed, and vehicle spacing can be monitored in real time without affecting normal vehicle operation.

[0116] Structural refers to whether the material composition of each structural layer of the pavement (such as the surface layer, base layer and subbase layer) and the bonding between the layers are intact, without obvious damage, separation or fracture;

[0117] If the base material is loose or the surface layer and the base layer are separated, it will cause the overall structure of the pavement to fail, which is a structural defect;

[0118] Refers to the ability of the road surface to resist deformation and damage under long-term vehicle loads, temperature changes, and rain erosion;

[0119] It refers to the ability of the pavement structure to withstand the design load (such as standard axle load) without excessive deformation or damage, usually evaluated by deflection value and strength index.

[0120] Traffic flow data is judged by direct comparison, where different traffic flow data are obtained and sorted from largest to smallest.

[0121] The steps to establish the congestion threshold are:

[0122] Collect historical traffic flow data of different road sections, and arrange the collected historical traffic flow data of different road sections in order from small to large, and record them as data sets x1, x2, ..., x n , where n is the number of data, x n For the nth data in the data set, calculate the position index i of the quantile, and the calculation formula is:

[0123] i=p×(n+1)

[0124] Where p is the percentile to be calculated, n is the number of data, and i is the position index of the percentile, where p is based on the experience of the traffic management department and the management goal setting;

[0125] Calculate the quantile Q based on the value of the quantile position index i p , if i is an integer, then Q p =x i , that is, the i-th data in the data set is the quantile;

[0126] If i is not an integer, let j be the integer part of i, rounded down, and f be the decimal part of i, that is, i = j + f, then the quantile calculation formula is:

[0127] Q p =x j +f×(x j+1 -x j )

[0128] By calculating the quantile of the data, this quantile is the threshold, and the traffic flow data above the threshold is divided, marked and uploaded.

[0129] This application uses the method of calculating quantiles to deeply explore the data distribution characteristics in the data set. Quantiles can show the concentration trend of data at different locations, and can effectively capture the discrete degree and overall distribution of traffic flow data, so that the threshold is more in line with the actual traffic flow changes; the quantile percentage is based on the experience and management goal setting of the traffic management department, and can integrate actual management needs into the threshold calculation. In order to ensure smooth roads, the traffic management department hopes to intervene when the traffic flow reaches a certain proportion. By setting appropriate percentiles, the threshold can be made to meet this management goal and achieve scientific management. For the quantile position index calculation results, whether it is an integer or 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 calculation.

[0130] When building a meteorological monitoring network, we fully utilize geographic information systems and traffic network data to finely divide the city and construct a strict network cell system. We fully consider the city's geographical features, road distribution, population density and other factors to ensure that each cell can accurately correspond to a specific area in the city, achieving seamless coverage of the urban space. In each cell, we deploy specialized drones. These drones act like mobile weather sentinels. With their high-precision meteorological sensors, they can obtain various weather data in real time and dynamically, including temperature, humidity, wind speed, wind direction, rainfall, and visibility. Within a unit day, for different congested sections of road, drones conduct high-frequency, multi-dimensional meteorological data collection according to established monitoring strategies to ensure that the data obtained is comprehensive, accurate, and timely, and can truly reflect the changes in the meteorological environment of the congested sections.

[0131] For flight path planning, an ant colony optimization algorithm (ACO) is used for scientific planning. Drawing on the foraging intelligence of ants in nature, this algorithm simulates the ants' pheromone release and path selection based on pheromone concentrations during their foraging journey. When collecting meteorological data on congested roads, the algorithm treats these roads as "food sources" to explore. Through continuous iteration and optimization, it finds the flight path with the shortest flight time, lowest energy consumption, and highest efficiency within the complex urban traffic network. The algorithm comprehensively considers numerous factors, such as real-time traffic conditions on each road section, no-fly zones, and the drone's endurance, to avoid conflicts between the flight path and urban air traffic. This ensures that the drone can safely and efficiently collect flight data on congested roads in a timely and orderly manner, comprehensively acquiring meteorological and environmental data to provide strong data support for subsequent traffic management and safety warnings. The ACO algorithm is an existing technology and will not be elaborated on here.

[0132] The specific steps to establish an association rule base are:

[0133] After pre-processing the collected environmental data, the variance, maximum and minimum data characteristics of the traffic flow data at different times are calculated;

[0134] The trend of data features is extracted based on the sliding average method, and the time domain data is converted to the frequency domain based on the Fourier transform to obtain the periodicity of the data;

[0135] An attention mechanism is introduced to assign weights to weather and road condition indicators at different times. These indicators are then vectorized, and the weights are multiplied by the vectorized indicators and summed to calculate the traffic impact value, focusing on weather and road condition factors that have the greatest impact on traffic.

[0136] The calculation formula for traffic impact value is:

[0137]

[0138] Among them I t It represents the traffic impact value calculated at time t, which is the final output of the entire calculation and is used to measure the comprehensive impact of weather and road conditions on traffic. σ is the activation function, which introduces nonlinear factors to enable the model to learn and fit complex relationships and convert the weighted summation result into the output range. is a row vector, which is the parameter vector of the model and is used to linearly transform the weighted feature vector. Its dimension matches the subsequent vector multiplication operation. o is the weight matrix, which is also the parameter of the model. It is used to perform linear transformation on the input feature vector and learn the relationship between different feature combinations and traffic impact values; β t,iWhere i = 1, 2, ..., n + m is the feature attention weight, which represents the relative importance weight of the i-th weather / road condition feature dimension at time t; x t,i Where i = 1, 2, ..., n + m, represents the i-th eigenvalue of the quantized meteorological environment and road condition indicators at time t; b o is the bias term;

[0139] Classify the obtained periodic patterns and meteorological factors with great traffic impact based on random forest;

[0140] Using association rule mining algorithms, we mine association rules between weather conditions, road conditions, and traffic flow in the classification results. We set minimum support and minimum confidence thresholds, scan the data set to find frequent item sets, which are combinations of weather and road conditions with a frequency higher than the minimum support, and generate an association rule base from the frequent item sets.

[0141] The core of the association rule mining algorithm includes:

[0142] The item set is a collection of meteorological factors, road conditions, and traffic flow levels;

[0143] Support is the frequency of an item set appearing in a data set, and the formula is:

[0144]

[0145] Confidence is the reliability of the rule, which indicates the probability that Y is also included in a transaction containing X. The formula is:

[0146]

[0147] Lift is the effectiveness of the rule, which measures the impact of the occurrence of X on the occurrence of Y. The formula is:

[0148]

[0149] The mining steps are:

[0150] Collect meteorological data, road condition data and traffic flow data, and perform cleaning, standardization and discretization;

[0151] Use the Apriori algorithm to find all item sets with support higher than the threshold;

[0152] Rules with confidence and lift higher than the threshold are extracted from the frequent item sets to obtain association rules.

[0153] During the data processing phase, this application calculates the variance and maximum value characteristics of traffic flow data, which can intuitively reflect the data fluctuation range and degree of dispersion, and capture abnormal changes in traffic flow. The sliding average is combined with the Fourier transform to smooth data trends and explore periodic patterns, helping to understand the long-term trend and periodic fluctuations of traffic flow, such as identifying traffic flow differences between peak hours in the morning and evening, and between weekdays and weekends.

[0154] During feature extraction and analysis, an attention mechanism dynamically assigns weights to meteorological and road surface indicators based on their degree of traffic impact, highlighting key factors. Traffic impact values ​​are calculated to further quantify the contributions of each factor, ensuring that subsequent analysis focuses on the core elements. The random forest algorithm, based on periodic patterns and classification of key meteorological factors, integrates multi-dimensional information to improve classification accuracy and stability.

[0155] During the rule mining and generation stage, the association rule mining algorithm filters frequent item sets by setting thresholds, accurately finding strong correlation patterns between weather, road surface and traffic flow; generating a rule base from frequent item sets, transforming complex relationships into structured knowledge, providing data support for traffic anomaly warnings 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 features are as follows:

[0157] Assume that in unit time, the traffic flow data set y1,y2,…,y n’ , where n' is the number of data points in the time interval, the maximum value Max is calculated as:

[0158] Max=max(y1,y2,…,y n’ )

[0159] Among them, Max represents the maximum observed value of traffic flow in the time interval, reflecting the peak value of traffic flow. Max is the operation of finding the maximum value in the data set;

[0160] The minimum value Min calculation formula is: Min=min(y1,y2,…,y n’ )

[0161] Among them, Min represents the minimum observed value of traffic flow in the time interval, reflecting the low value of traffic flow. Min is the operation of finding the minimum value, which is to find the minimum value in the data set;

[0162] The formula for calculating variance is:

[0163] in is the average value in the data, reflecting the average level of this set of data, σ 2is the population variance, a statistic that measures the degree of dispersion of data.

[0164] The calculation of the maximum and minimum values ​​of this application can intuitively reflect the peak and trough of traffic flow in a unit of time. During holidays or large-scale events, the maximum value can timely detect abnormal surges in traffic flow and deploy diversion measures in advance; the minimum value helps to identify periods of extremely low traffic flow, optimize resource allocation, and avoid waste of manpower and material resources; variance, as an indicator of the degree of data dispersion, can effectively evaluate the stability of traffic flow. The larger the variance value, the more drastic the fluctuation of traffic flow and the more unstable the road traffic conditions; a small variance value means that the traffic 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, facilitating timely regulatory measures.

[0165] The trend steps of the sliding average method to extract data features are:

[0166] Based on the data characteristics and analysis purpose, the sliding window length is determined to capture the daily changes in traffic flow. The window size is set to 24, representing 24 hours a day. Different sizes are tried to determine the optimal value.

[0167] Use time as the data feature index, convert the data features into time series form, calculate the sliding average, for the time series z1,z2,…,z m , the window size is k, starting from the kth data point, the simple sliding average SMA of the i-th position i The calculation formula is:

[0168]

[0169] Where j is the index variable in the sum operation, z j ' is the observation value at the jth time point in the time series data;

[0170] Arrange the calculated sliding averages in order to form a new sequence that reflects the trend characteristics of the data;

[0171] Based on Fourier transform, the time domain data is converted to the frequency domain, and the steps to obtain the periodicity of the data are as follows:

[0172] Select discrete Fourier transform for calculation processing;

[0173] 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 offset of the frequency component;

[0174] Analyze the frequency domain results and calculate the frequency value fk’ , the calculation formula is:

[0175]

[0176] Where T is the sampling period, N' is the data length, k' is the frequency index, draw the amplitude spectrum, the frequency-amplitude relationship diagram, observe the frequency components with large amplitudes, and the period corresponding to the frequency components is the periodic law in the data;

[0177] The steps to calculate the traffic impact value and focus on the meteorological factors that have the greatest impact on traffic are as follows:

[0178] Suppose there are m' meteorological environment indicators, recorded as e1, e2, ..., e m’ ; a road condition index, denoted as p1, p2,…, p a , and combine them into a feature vector B:

[0179] B=[e1,e2,…,e m ,,p1,p2,…,p a ] T’

[0180] Where T′ is the mathematical symbol for transposition;

[0181] Assign weight values ​​w1 and w2 to each indicator, and combine the weight values ​​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;

[0182] By performing a dot product operation on the weight vector W and the feature vector B, the traffic impact value S is obtained:

[0183] S=W·X

[0184] The larger the traffic impact value S is, the greater the influencing factors in B in the current feature vector are, indicating that the degree of influence of weather and road conditions is greater.

[0185] The sliding average method of this application can effectively filter random noise in traffic flow data by setting the window length, smooth short-term fluctuations, and clearly present the long-term trend of daily changes. Taking the window size as 24 (corresponding to a 24-hour day) as an example, it can intuitively reflect the fluctuation pattern of daily traffic flow, facilitate the identification of fixed patterns of morning and evening peaks, and provide a basis for the daily scheduling of traffic resources. By trying different window sizes to determine the optimal value, it can flexibly adapt to the traffic characteristics of different roads and time periods, enhancing the universality of the analysis;

[0186] The Fourier transform converts time domain data into the frequency domain, which can accurately analyze the periodic patterns hidden in traffic flow data. By analyzing the amplitude spectrum and frequency-amplitude relationship diagram of the frequency domain results, the periodic characteristics of traffic flow can be clearly identified.

[0187] The specific steps for generating an association rule base from a frequent item set are:

[0188] Convert the discretized meteorological and road index samples into transactions, including corresponding index combinations;

[0189] The specific steps are as follows: the original meteorological and road monitoring data may contain missing values, erroneous values, or abnormal fluctuations. Statistical methods are needed to identify and correct outliers. Missing data are filled using multiple imputation methods or based on the mean / median of similar road sections to ensure data integrity and accuracy. Differentiated discretization methods are used based on indicator characteristics:

[0190] Meteorological indicators: For continuous variables (such as rainfall and temperature), a binning method is used to divide the intervals based on the distribution characteristics of historical data and the degree of traffic impact. For example, rainfall is divided into "light rain (0-10mm)", "moderate rain (10-50mm)", and "heavy rain (>50mm)", and temperature is divided into "low temperature (<5℃)", "normal temperature (5-25℃)", and "high temperature (>25℃)". For discrete variables (such as weather type), the original categories are retained directly, such as "sunny", "cloudy", and "foggy".

[0191] Pavement indicators: For pavement moisture and damage degree indicators, expert experience and data clustering are combined to classify pavement moisture into "dry," "slightly damp," and "waterlogged," and damage degree into "intact," "mildly damaged," and "severely damaged."

[0192] Transaction structured construction: Combine the meteorological and road surface indicators in each sample into a transaction in a unified format and store them in a set or list data structure. Each transaction represents an actual observation record, and together they constitute a transaction dataset.

[0193] Calculate the support of a single item set. For each single item set, use the formula: Support(D) = Number of transactions containing item D / Total number of transactions. Support(D) is the Dth support of the item set, that is, the frequency of 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 sets whose support is not less than the minimum support threshold are selected.

[0194] Entering the iteration phase, frequent (C-1)-itemsets are merged through the concatenation operation to generate candidate C-itemsets, and 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;

[0195] Generate association rules from frequent item sets, extract non-empty true subsets as rule antecedents, and the confidence calculation formula is:

[0196]

[0197] Among them, D is an item set, which is composed of meteorological environment and road condition indicators. F is a consequent item set, which represents the results caused by D, specifically traffic accidents and traffic congestion. is the association rule, that is, the logical reasoning relationship between the appearance of the consequent item set F when D appears. is the confidence of this association rule, that is, the possibility of F appearing under the condition of D, Support(D∪F) is the support of the union of D and F, including the frequency of occurrence of transactions of D and F in the total transactions;

[0198] Calculate confidence and retain valid rules that are not lower than the minimum confidence threshold;

[0199] Arrange the valid rules in descending order of "support-confidence" and build an association rule base.

[0200] The steps to identify the probability of traffic abnormality events are:

[0201] Based on the professional knowledge and actual needs in the field of transportation, the ontology architecture of the traffic knowledge graph is constructed, and the "meteorological environment" entity type is clarified, covering multiple meteorological indicators such as temperature, humidity, rainfall, wind speed, and visibility. At the same time, the "traffic event" entity type is determined, including traffic accidents, traffic congestion, and road construction. Then, the "trigger" and "influence" relationship types are constructed: the "trigger" relationship is used to describe the direct cause of traffic events by meteorological environmental factors, such as heavy rain may cause traffic accidents; the "influence" relationship reflects the indirect effect of the meteorological environment on traffic conditions, such as heavy fog will affect vehicle speed, thereby causing traffic congestion. In addition, attributes are added to each entity, such as the attributes of the meteorological environment entity include specific values ​​and duration, and the attributes of the traffic event entity cover event level and impact range, so as to comprehensively characterize the entity characteristics;

[0202] Deeply analyze the established association rule base to extract entity and relationship information from the rules. Meteorological and environmental indicators and traffic events are treated as nodes in the knowledge graph. Directed edges are constructed between the nodes based on the rule content, forming a weighted directed graph. For the rule "If heavy rain and flooded roads occur, there is a high probability of a traffic accident," a directed edge is created in the knowledge graph from the "heavy rain" and "flooded roads" nodes to the "traffic accident" node. The support and confidence of the rule are used as the edge weights. This information is stored in a graph database, such as Neo4j, to visualize and structure the association rules for easy query and analysis.

[0203] Access to real-time meteorological data comes from official meteorological monitoring and on-board meteorological sensors. Road surface sensor data is obtained through geomagnetic sensors and camera equipment deployed on the road, covering road conditions, traffic volume, and vehicle speed information. At the same time, historical traffic event data is introduced, including detailed records of the time, location, and cause of the event. Using data fusion technology, this multi-source data is matched and integrated with existing information in the traffic knowledge graph. New entities or relationships are added to the graph in a timely manner. If the attributes of existing entities change, such as when real-time meteorological data is updated, the corresponding content in the graph is modified synchronously to ensure that the knowledge graph always reflects the actual traffic environment conditions.

[0204] When designing a probabilistic reasoning model, for a single association rule, its confidence is directly used as the probability of a traffic anomaly. If the confidence of a rule is 80%, it is assumed that when the antecedent conditions of the rule are met, the probability of the corresponding traffic event is 80%. When there are multiple association rules, a weighted average method is used to calculate the overall probability, assigning corresponding weights based on 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 anomalies. Once the probability exceeds the set threshold, the warning mechanism is immediately triggered and warning information is generated.

[0205] Establish a real-time data processing system to continuously acquire meteorological, road surface, and traffic flow data, and quickly match them with the association rules in the knowledge graph. Set different levels of probability thresholds, 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 a traffic anomaly reaches the corresponding threshold, a warning will be displayed through the vehicle owner's computer and the traffic management platform in a variety of ways, such as pop-up reminders, voice broadcasts, and map highlights. In the visual interface, the probability distribution, impact range, and related factors of traffic anomalies are intuitively presented in the form of charts and heat maps, making it easier for traffic management departments and vehicle owners to intuitively understand the current traffic conditions and take timely response measures.

[0206] Establish a regular update mechanism, re-explore association rules based on newly collected data, optimize the traffic knowledge graph, analyze new meteorological-traffic event correlations that may exist in new data, update entities, relationships and weights in the graph, evaluate and tune the probabilistic reasoning model, and use historical traffic event data to verify the accuracy of the model's predictions. By adjusting model parameters and improving algorithmic methods, continuously improve the accuracy and reliability of the model's identification of the probability of traffic anomalies, ensure that the entire system can adapt to the ever-changing traffic environment, and continue to provide effective support for traffic management and travel safety.

[0207] A smart early warning device for road traffic safety based on environmental characteristics, including:

[0208] A road environment collection module is configured to collect environmental data based on sensors;

[0209] A congestion determination module is configured to divide and mark congested road sections;

[0210] Weather collection module, based on drones to collect weather data on congested roads;

[0211] The analysis module is configured to analyze meteorological factors and road condition indicators that have a significant impact on traffic, classify different meteorological conditions and road condition combinations, and establish an association rule base;

[0212] A prediction module is configured to identify the probability of traffic anomalies, including traffic accidents and traffic congestion, based on data in an association rule base;

[0213] The early warning module implements different early warning methods based on different early warning levels.

[0214] This application's intelligent road traffic safety warning device based on environmental characteristics uses multiple modules to collaborate and demonstrate significant advantages in data collection, analysis, and warning. The road environment collection and weather collection modules utilize sensors and drones to achieve real-time and accurate collection of multi-source data on road surface, traffic, and weather. The congestion judgment module locates congested sections based on data analysis.

[0215] The analysis module uses the attention mechanism and random forest algorithm to explore the nonlinear relationship between environmental factors and traffic conditions, and build a dynamic association rule library; the prediction module integrates rule confidence and weighted average method, and combines graph neural network to predict the probability of traffic anomalies, with the error controlled within 10%, and can provide early warning 30 minutes in advance.

[0216] Specific cases

[0217] Pavement condition data collection: Pavement condition monitoring stations are deployed at regular intervals (e.g., every 500 meters) along key sections of major urban roads and highways. These stations are equipped with distributed fiber optic sensors buried beneath the pavement to monitor pavement strain and temperature in real time (with an accuracy of ±0.1°C) to identify cracks and settlement defects. Furthermore, 3D laser scanners installed on patrol vehicles scan the pavement regularly (e.g., weekly) to generate a millimeter-level 3D model of the pavement's smoothness with an accuracy of 5mm.

[0218] Traffic flow data collection: Millimeter-wave radars and geomagnetic vehicle detectors are installed at various road sections. The millimeter-wave radars have a 300-meter coverage range and can measure vehicle speed (with an error of <1 km / h), traffic volume, and vehicle type classification (for example, identifying the proportion of trucks). Geomagnetic vehicle detectors are buried in the road surface and have an accuracy rate of ≥98%, effectively distinguishing between stopped and slow-moving vehicles. These devices collect real-time traffic flow data, including the number of vehicles of different types and from different directions.

[0219] Establishing congestion thresholds: Historical traffic flow data is collected and categorized by different road sections and time periods (e.g., weekday morning rush hour, evening rush hour, and weekends). Data analysis is used to determine the average traffic flow for each road section during different time periods. This is combined with the road's designed capacity to set congestion thresholds. For example, a four-lane, two-way urban arterial road is defined as congested when the number of vehicles passing through it exceeds 1,500 per hour during the weekday morning rush hour. 1,500 vehicles is the congestion threshold for this road section during this time period.

[0220] Congested road section classification and marking: Real-time collected traffic flow data is compared with the set congestion threshold. Once the traffic flow of a certain road section exceeds its corresponding congestion threshold, the system automatically marks the road section as congested. At the same time, the congestion start time and the specific location of the congested road section (such as the section between the intersection of XX Road and XX Road and the intersection of XX Road and XX Road) are recorded, and the marked congested road section data is uploaded to the drone system;

[0221] Establishing a meteorological monitoring network: UAVs are equipped with meteorological sensors, including a five-parameter meteorological instrument that can monitor visibility (measuring range 10m-10km), road surface temperature (-40℃ to +80℃), and snow / ice thickness (accuracy ±1mm). Based on the city's geographical scope and traffic congestion, the flight areas and routes of UAVs are rationally planned, and a meteorological monitoring network is established to ensure comprehensive coverage of road sections that may be congested.

[0222] Flight path planning based on congested sections: When the UAV system receives the congested section marking information, it uses a path planning algorithm to plan the optimal flight path for the UAV based on the location and scope of the congested section and the surrounding geographical environment (such as building distribution and no-fly zones). The A* algorithm is used to plan a safe and efficient flight route with the center point of the congested section as the target point, avoiding no-fly zones and obstacles, so that the UAV can quickly reach the congested section. During the flight, the system collects real-time meteorological environmental data of the section, including temperature, air pressure, humidity, wind speed, and wind direction.

[0223] Data integration and time dimension considerations: Integrate meteorological data, road condition data, and traffic flow data collected at different times. Divide the data into different time segments (e.g., 15-minute segments) in chronological order, ensuring that each time segment contains complete multi-factor data. For example, during the morning period of 8:00-8:15, there is meteorological data (e.g., temperature 25°C, humidity 60%, wind speed 3m / s), road condition data (no cracks, good flatness), and traffic flow data (number of passing vehicles: 120) for a certain road section.

[0224] Nonlinear relationship mining and the introduction of an attention mechanism: Deep learning algorithms, such as long short-term memory (LSTM) networks, are combined with an attention mechanism to analyze the integrated data. LSTM networks can process time series data and mine the nonlinear relationships between weather conditions, road conditions, and traffic flow at different times. The attention mechanism focuses on weather factors and road condition indicators that have a significant impact on traffic. The analysis found that during heavy rain, the depth of road flooding has a significant impact on traffic flow. The attention mechanism allows the model to focus more on the relationship between this indicator and traffic flow.

[0225] Classification of weather conditions and road conditions and establishment of an association rule base: Based on the relationships discovered, different combinations of weather conditions and road conditions are classified. Weather conditions are divided into sunny, cloudy, light rain, heavy rain, and rainstorm categories, and road conditions are divided into dry, wet, waterlogged, and icy categories. Through data analysis, the changing patterns of traffic flow under different combinations are determined, and an association rule base is established. For example, when the weather condition is rainstorm and the road condition is waterlogged, traffic flow will decrease by 30%-50%, and the probability of congestion will increase by 60%-80%.

[0226] Traffic knowledge graph construction: Based on the data in the association rule library, a traffic knowledge graph is constructed with roads, traffic flow, weather conditions, road conditions, and traffic anomalies as nodes, and their relationships (such as causal relationships and influence relationships) as edges. Heavy rain nodes are connected to road surface flooding nodes through cause-related edges, and road surface flooding nodes are connected to traffic flow reduction nodes through influence-related edges. A graph database (such as Neo4j) is used to store and manage the traffic knowledge graph for easy query and analysis.

[0227] Traffic anomaly probability prediction: Using the constructed traffic knowledge graph, combined with real-time meteorological data, road condition data, and traffic flow data, the probability of traffic anomalies is predicted through inference algorithms. When real-time data shows heavy rain, road condition monitoring stations report that some sections of the road have accumulated water, and traffic flow has dropped significantly in a short period of time, the probability of a traffic accident in the area is predicted to be 30%, and the probability of traffic congestion is predicted to be 70% through reasoning based on the knowledge graph.

[0228] Warning level classification: A multi-level warning system is set up according to the probability of traffic abnormal events, and the warning levels are divided into three levels: Level 1 warning is a high-risk warning, which is triggered when the probability of traffic accidents is ≥50% or the probability of traffic congestion is ≥80%; Level 2 warning is a medium-risk warning, which is triggered when the probability of traffic accidents is between 30%-50% or the probability of traffic congestion is between 50%-80%; Level 3 warning is a low-risk warning, which is 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 owner's car computer for different warning levels. When a level one warning is triggered, a striking red warning window pops up on the car computer screen, displaying warning information (such as there is a high-risk traffic accident and serious traffic congestion on the road ahead, please plan a detour route immediately), and a continuous high-intensity alarm sounds; when a level two warning is triggered, an orange warning window pops up on the car computer screen, displaying warning information (such as there may be traffic congestion on the road ahead, please drive carefully), and a medium-intensity alarm sounds; when a level three warning is triggered, a yellow prompt box pops up on the car computer screen, displaying prompt information (such as there is a slight change in traffic conditions on the road ahead, please pay attention to the 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 diversion measures;

[0230] In the data collection of this application, a variety of sensors are used to achieve multi-dimensional and real-time monitoring of road environment and traffic flow, to ensure the integrity and accuracy of the data, and to lay a solid foundation for subsequent analysis. In the traffic management link, congested sections are accurately located, and drones work together to build a meteorological monitoring network, which greatly improves the efficiency of congestion handling and meteorological data acquisition. At the data analysis level, advanced algorithms are used to explore multi-factor nonlinear relationships and focus on key influencing factors, so that the accuracy of traffic prediction and the efficiency of model training are significantly improved. In the application scenario, the multi-level early warning system is combined with the traffic knowledge graph to effectively shorten the driver's response time, reduce the accident rate, and assist the management department in making scientific decisions. From the comprehensive value point of view, this method can not only reduce traffic operating costs and reduce resource waste, but also promote the upgrading of traffic management models, optimize the urban traffic ecology, significantly improve citizens' commuting satisfaction, and effectively promote the construction of smart cities.

[0231] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions only describe the principles of the present invention. Various changes and improvements are possible without departing from the spirit and scope of the present invention, and such changes and improvements fall within the scope of the invention as claimed.

Claims

1. A road traffic safety intelligent early warning method based on environmental characteristics, characterized by: The early warning steps are: Collect road environment data based on sensors, including road condition data and traffic flow data; Determine the size of traffic flow data, establish a congestion threshold, mark the road sections where the traffic flow is greater than the congestion threshold, and upload them to the drone system; Drones are equipped with meteorological sensors to build a meteorological monitoring network, plan flight paths based on marked congested road sections, and collect meteorological environment characteristic data on congested road sections; Considering the time-varying characteristics of the traffic environment, the nonlinear relationship between the weather environment, road conditions, and traffic flow at different times is explored. An attention mechanism is introduced to focus on weather factors and road condition indicators that have a significant impact on traffic. Different combinations of weather conditions and road conditions are classified to establish an association rule library. Based on the data in the association rule library, 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, and different early warning levels are divided based on the probability of abnormal events. Different early warning methods are implemented on the owner's car computer for different warning levels.

2. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1 is characterized in that: The sensors include lidar sensors and microwave radar sensors. The lidar sensor scans the road surface to detect road surface flatness, rut depth, crack width and structure, and obtains road surface condition data. Microwave radar sensors transmit microwave signals and track the reflected echoes from vehicles to calculate vehicle volume, speed, and distance between vehicles, and comprehensively obtain traffic flow data.

3. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1 is characterized in that: Traffic flow data is judged by direct comparison, where different traffic flow data are obtained and sorted from largest to smallest. The steps to establish the congestion threshold are: Collect historical traffic flow data of different road sections, and arrange the collected historical traffic flow data of different road sections in order from small to large, and record them as data sets x1, x2, ..., x n , where n is the number of data, x n For the nth data in the data set, calculate the position index i of the quantile, and the calculation formula is: i=p×(n+1) Where p is the percentile to be calculated, n is the number of data, and i is the position index of the percentile, where p is based on the experience of the traffic management department and the management goal setting; Calculate the quantile Q based on the value of the quantile position index i p , if i is an integer, then Q p =x i , that is, the i-th data in the data set is the quantile; If i is not an integer, let j be the integer part of i, rounded down, and f be the decimal part of i, that is, i = j + f, then the quantile calculation formula is: Q p =x j +f×(x j+1 -x j ) By calculating the quantile of the data, this quantile is the threshold, and the traffic flow data above the threshold is divided, marked and uploaded.

4. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1 is characterized in that: Build a meteorological monitoring network. Use a geographic information system and a traffic network database to divide the city into network cells. Deploy drones in each cell to obtain real-time weather data. Collect meteorological data on different congested road sections within a certain number of days. The UAV flight path planning is based on the ant colony optimization algorithm, and the congested road sections are flown in sequence to collect meteorological environment data.

5. The road traffic safety intelligent early warning method based on environmental characteristics according to claim 1 is characterized in that: To establish an association rule base, the specific steps are as follows: After pre-processing the collected environmental data, the variance, maximum and minimum data characteristics of the traffic flow data at different times are calculated; The changing trend of data features is extracted based on the sliding average method, and the time domain data is converted to the frequency domain based on the Fourier transform to obtain the periodicity of the data; An attention mechanism is introduced to assign weights to weather and road condition indicators at different times. These indicators are then vectorized, and the weights are multiplied by the vectorized indicators and summed to calculate the traffic impact value, focusing on weather and road condition factors that have the greatest impact on traffic. The calculation formula for traffic impact value is: Among them I t It represents the traffic impact value calculated at time t, which is the final output of the entire calculation and is used to measure the comprehensive impact of weather and road conditions on traffic. σ is the activation function, which introduces nonlinear factors to enable the model to learn and fit complex relationships and convert the weighted summation result into the output range. is a row vector, which is the parameter vector of the model and is used to linearly transform the weighted feature vector. Its dimension matches the subsequent vector multiplication operation. o is the weight matrix, which is also the parameter of the model. It is used to perform linear transformation on the input feature vector and learn the relationship between different feature combinations and traffic impact values; β t,i Where i = 1, 2, ..., n + m is the feature attention weight, which represents the relative importance weight of the i-th weather / road condition feature dimension at time t; x t,i Where i = 1, 2, ..., n + m, represents the i-th eigenvalue of the quantized meteorological environment and road condition indicators at time t; b o is the bias term; The resulting periodic patterns and meteorological factors with significant traffic impacts are classified using a random forest algorithm. An association rule mining algorithm is used to mine association rules between meteorological and environmental characteristics, road conditions, and traffic flow within the classification results. Minimum support and minimum confidence thresholds are set, and the dataset is scanned to identify frequent item sets (i.e., combinations of meteorological and road conditions with a frequency exceeding the minimum support). An association rule base is then generated from these frequent item sets. The core of the association rule mining algorithm includes: The item set is a collection of meteorological factors, road conditions, and traffic flow levels; Support is the frequency of an item set appearing in a data set, and the formula is: Confidence is the reliability of the rule, which indicates the probability that Y is also included in a transaction containing X. The formula is: Lift is the effectiveness of the rule, which measures the impact of the occurrence of X on the occurrence of Y. The formula is: The mining steps are: Collect meteorological data, road condition data and traffic flow data, and perform cleaning, standardization and discretization; Use the Apriori algorithm to find all item sets with support higher than the threshold; Rules with confidence and lift higher than the threshold are extracted from the frequent item sets to obtain association rules.

6. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 5 is characterized in that: The steps for calculating the variance, maximum and minimum data features are as follows: Assume that in unit time, the traffic flow data set y1,y2,…,y n’ , where n' is the number of data points in the time interval, the maximum value Max is calculated as: Max=max(y1,y2,…,y n’ ) Among them, Max represents the maximum observed value of traffic flow in the time interval, reflecting the peak value of traffic flow. Max is the operation of finding the maximum value in the data set; The calculation formula for the minimum value Min is: Min=min(y1,y2,…,y n’ ) Among them, Min represents the minimum observed value of traffic flow in the time interval, reflecting the low value of traffic flow. Min is the operation of finding the minimum value, which is to find the minimum value in the data set; The formula for calculating variance is: in is the average value in the data, reflecting the average level of this set of data, σ 2 is the population variance, a statistic that measures the degree of dispersion of data.

7. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 5 is characterized in that: The trend steps of the sliding average method to extract data features are: Based on the data characteristics and analysis purpose, the sliding window length is determined to capture the daily changes in traffic flow. The window size is set to 24, representing 24 hours a day. Different sizes are tried to determine the optimal value. Use time as the data feature index, convert the data features into time series form, calculate the sliding average, for the time series z1,z2,…,z m , the window size is k, starting from the kth data point, the simple sliding average SMA of the i-th position i The calculation formula is: Where j is the index variable in the sum operation, z j ' is the observation value at the jth time point in the time series data; Arrange the calculated sliding averages in order to form a new sequence that reflects the trend characteristics of the data; Based on Fourier transform, the time domain data is converted to the frequency domain, and the steps to obtain the periodicity of the data are as follows: Select discrete Fourier transform for calculation processing; 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 offset of the frequency component; Analyze the frequency domain results and calculate the frequency value f k’ , the calculation formula is: Where T is the sampling period, N' is the data length, k' is the frequency index, draw the amplitude spectrum, the frequency-amplitude relationship diagram, observe the frequency components with large amplitudes, and the period corresponding to the frequency components is the periodic law in the data; The steps to calculate the traffic impact value and focus on the meteorological factors that have the greatest impact on traffic are as follows: Suppose there are m' meteorological environment indicators, recorded as e1, e2, ..., e m’ ; a road condition index, denoted as p1, p2,…, p a , and combine them into a feature vector B: B=[e1,e2,…,e m ,,p1,p2,…,p a ] T’ Where T′ is the mathematical symbol for transposition; Assign weight values ​​w1 and w2 to each indicator, and combine the weight values ​​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 performing a dot product operation on the weight vector W and the feature vector B, the traffic impact value S is obtained: S=W·X The larger the traffic impact value S is, the greater the influencing factors in B in the current feature vector are, indicating that the weather has a greater impact on the road conditions.

8. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 5 is characterized in that: The specific steps for generating an association rule base from a frequent item set are: Convert the discretized meteorological and road index samples into transactions, including corresponding index combinations; Calculate the support of a single item set. For each single item set, use the formula: Support(D) = Number of transactions containing item D / Total number of transactions. Support(D) is the Dth support of the item set, that is, the frequency of 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 sets whose support is not less than the minimum support threshold are selected. Entering the iteration phase, frequent (C-1)-itemsets are merged through the concatenation operation to generate candidate C-itemsets, and 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; Generate association rules from frequent item sets, extract non-empty true subsets as rule antecedents, and the confidence calculation formula is: Among them, D is an item set, which is composed of meteorological environment and road condition indicators. F is a consequent item set, which represents the results caused by D, specifically traffic accidents and traffic congestion. is the association rule, that is, the logical reasoning relationship between the appearance of the consequent item set F when D appears. is the confidence of this association rule, that is, the possibility of F appearing under the condition of D, Support(D∪F) is the support of the union of D and F, including the frequency of occurrence of transactions of D and F in the total transactions; Calculate confidence and retain valid rules that are not lower than the minimum confidence threshold; Arrange the valid rules in descending order of "support-confidence" to build an association rule base.

9. The intelligent early warning method for road traffic safety based on environmental characteristics according to claim 1 is characterized in that: The steps to identify the probability of traffic abnormality events are: Define the traffic knowledge graph ontology, clarify the entity types of "weather environment" and "traffic event", construct the "trigger" and "impact" relationship types, and add attributes to the entities; Map the association rule base data to the knowledge graph, parse the entities and relationships in the rules, and store them in the graph database to form a weighted directed graph; Integrate multi-source data, access real-time weather, road sensor and historical traffic event data, and integrate and update map content; Design a probabilistic reasoning model, use confidence as probability for a single rule, and use weighted average method to calculate multiple rules to monitor and warn of abnormal events; Obtain data matching rules in real time, set probability thresholds to trigger warnings, and display them visually; Continuously optimize knowledge graphs and models, regularly update data, and re-mine rules.

10. The intelligent early warning device for road traffic safety based on environmental characteristics is characterized by: Early warning devices include: A road environment collection module is configured to collect environmental data based on sensors; A congestion determination module is configured to divide and mark congested road sections; Weather collection module, based on drones to collect weather data on congested roads; The analysis module is configured to analyze meteorological factors and road condition indicators that have a significant impact on traffic, classify different meteorological conditions and road condition combinations, and establish an association rule base; A prediction module is configured to predict the probability of occurrence of abnormal traffic events, including traffic accidents and traffic congestion, based on data in an 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

  • Traffic accident analysis method and system based on multivariate data

    CN119904993A

  • Method and server for identifying the cause of traffic congestion using visual analytics

    KR102124955B1

Cited By

  • Traffic situation analysis system based on holographic intersection

    CN121281277A