A method and device for identifying risk factors in highway road areas
Through the neural network model and sensor optimization configuration, combined with dynamic adjustment factors, the subjectivity and static nature of highway road risk factor identification in traditional methods are solved, and more accurate and real-time risk factor identification and management are achieved, improving the safety and efficiency of highway operations.
Patent Information
- Application Number
- CN202411963171.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-12-30
AI Technical Summary
Traditional highway road risk factor identification methods rely on manual patrols and static assessments, with subjectivity and uncertainty, making it difficult to make full use of modern information technology for in-depth analysis and real-time adjustments, and it is impossible to comprehensively and accurately identify risk factors and their relationships.
By obtaining data such as traffic flow, weather conditions and road conditions, the neural network model is used for preprocessing and feature extraction, the relationship between risk factors is identified, and the importance score sort is sorted based on dynamic adjustment factors, and data collection is collected in combination with sensor optimization configuration.
It realizes more accurate and efficient risk factor identification, reveals the mutual relationship between risk factors, provides real-time adjustment capabilities, improves the accuracy of risk management and resource allocation efficiency, and improves the safety and efficiency of highway operations.
Smart Images

Figure CN119992819B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method and device for identifying risk factors in the highway road area. Background Art
[0002] There are many risk factors in the highway road area, such as bad weather, road damage, high traffic flow, etc. These factors directly affect driving safety and may even lead to traffic accidents. Therefore, the accurate identification and assessment of risk factors in the highway road area are particularly important.
[0003] Traditional methods for identifying risk factors in the highway road area mainly rely on manual inspections and regular detections. Although these methods can discover potential risks to a certain extent, they have the following defects:
[0004] For example, the risk assessment of traditional methods sometimes relies on the experience and judgment of inspectors, lacking a unified and objective evaluation standard, resulting in the evaluation results may have large subjectivity and uncertainty. Some traditional methods fail to make full use of modern information technologies, such as big data, artificial intelligence, etc., to deeply analyze and mine massive data, thus it is difficult to comprehensively and accurately identify risk factors and their interrelationships. Some traditional methods adopt static risk assessment models, which cannot dynamically adjust the risk assessment results according to real-time data and are difficult to adapt to the rapid changes of risk factors in the highway road area. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method and device for identifying risk factors in the highway road area, which can more accurately and efficiently identify risk factors.
[0006] To solve the above technical problem, the technical solution of the present invention is as follows:
[0007] In the first aspect, a method for identifying risk factors in the highway road area, the method includes:
[0008] Step 1, obtaining data related to the risk of the highway road area, the data including traffic flow, weather conditions, and road conditions;
[0009] Step 2, preprocessing the data related to the risk of the highway road area to obtain preprocessed data;
[0010] Step 3, extracting key features from the preprocessed data, the key features being used for risk factor identification;
[0011] Step 4, training a neural network model using the key features to obtain a trained neural network model;
[0012] Step 5: Identify risk factors through the trained neural network model, and conduct association mining on the risk factors to obtain the interrelationships between the risk factors;
[0013] Step 6: Based on the interrelationships between the risk factors, assign an importance score to each risk factor; calculate the dynamic adjustment factor, multiply the dynamic adjustment factor by the importance score of each risk factor to obtain the adjusted importance score; sort the risk factors according to the adjusted importance score to obtain the key factors affecting the highway road area risk.
[0014] Furthermore, obtain data related to highway road area risk, and the data includes traffic flow, weather conditions, and road conditions, including:
[0015] Regard the selection and configuration of data collection points as an optimization problem, and the goal is to maximize the efficiency and quality of data collection; determine the decision variables, including the location, type, and collection frequency of sensors;
[0016] Use binary coding to represent the solution, and initialize a population that contains multiple solutions;
[0017] Define a fitness function to evaluate the quality of each individual; use the roulette wheel selection method to select corresponding individuals from the current population into the next generation; perform crossover operations on the selected individuals to generate new solutions; perform mutation operations on the newly generated individuals, and repeat the selection, crossover, and mutation operations until the termination condition is met. When terminated, output the final solution, that is, the final sensor configuration plan;
[0018] Deploy sensors according to the final sensor configuration plan to obtain data related to highway road area risk.
[0019] Furthermore, extract key features from the preprocessed data, and the key features are used for risk factor identification, including:
[0020] According to the data dictionary in the preprocessed data, determine the name, definition, and expected meaning of each feature; quantify the value range and distribution of each feature through the mean; determine the target variable, that is, the risk factor index to be identified;
[0021] Calculate the Pearson correlation coefficient between each feature and the target variable; construct a correlation coefficient matrix based on the Pearson correlation coefficient; analyze the correlation coefficient matrix to identify the identification features related to the target variable;
[0022] Set a screening threshold according to the Pearson correlation coefficient; screen out the key features that meet the screening threshold conditions from the identification features.
[0023] Further, training a neural network model using key features to obtain a trained neural network model, including:
[0024] Initializing the weights and bias parameters of the convolutional neural network;
[0025] Defining a loss function to measure the gap between the predicted values and the true values of the neural network model;
[0026] During the training process, using the gradient descent algorithm to optimize the weights and bias parameters of the neural network;
[0027] For each training batch, calculating the gradients of the loss function with respect to the weights and biases;
[0028] According to the calculated gradients, updating the weights and bias parameters, repeating the process until the stopping condition is met; setting the learning rate and optimizer; dividing the preprocessed data into a training set and a validation set;
[0029] Using the training set data, calculating the predicted values of the neural network model through forward propagation, and calculating the value of the loss function; using the gradient descent algorithm and optimizer to update the weights and bias parameters of the neural network according to the gradients of the loss function; after each iteration cycle, evaluating the performance of the neural network model on the validation set to obtain an evaluation result;
[0030] Adjusting the structure, learning rate, and optimizer parameters of the neural network model according to the evaluation result to obtain a trained neural network model.
[0031] Further, identifying risk factors through the trained neural network model, and performing association mining on the risk factors to obtain the interrelationships between the risk factors, including:
[0032] Inputting the dataset to be analyzed into the trained neural network model; through the forward propagation process of the trained neural network model, obtaining the predicted values of the risk factors corresponding to each observation point;
[0033] Setting the minimum support and minimum confidence thresholds of the Apriori algorithm; running the Apriori algorithm, inputting the transaction dataset, minimum support, and minimum confidence;
[0034] The Apriori algorithm will output a series of association rules, each rule represented as a combination of an antecedent and a consequent;
[0035] For each association rule, calculating its support, confidence, and lift, where support represents the frequency of the rule in the data, confidence represents the reliability of the rule, and lift represents the correlation strength between the antecedent and the consequent in the rule;
[0036] Rank and filter association rules according to support, confidence, and lift to find the corresponding key rules; analyze the key rules to obtain the correlation and dependence relationships between different risk factors.
[0037] Furthermore, based on the mutual relationships between risk factors, assign an importance score to each risk factor, including:
[0038] Determine the quantitative metrics for the mutual relationships, where the quantitative metrics include support, confidence, and lift;
[0039] According to the quantitative metrics, through Calculate the importance score;
[0040] Among them, f r (A∪B) represents the transaction frequency of the item sets A and B occurring simultaneously for the association rule r; f r (A) and f r (B) respectively represent the transaction frequencies of the item sets A and B occurring separately for the association rule r; N represents the total number of transactions in the dataset; w S 、w c and w L are weight parameters; max r∈R represents the maximum value of the unnormalized importance score in the set R of all association rules; N r represents the normalized importance score of the association rule r.
[0041] Furthermore, the calculation formula for the dynamic adjustment factor is:
[0042]
[0043] Among them, F represents the dynamic adjustment factor; w represents the weight of traffic flow; V represents the current traffic flow; U represents the reference traffic flow; z represents the weight of visibility; a represents the peak value of the Gaussian function; S represents the current visibility; T represents the optimal visibility; C represents the standard deviation of the Gaussian function related to visibility.
[0044] In a second aspect, a highway road area risk factor identification device includes:
[0045] An acquisition module, configured to acquire data related to highway road area risks, where the data includes traffic flow, weather conditions, and road conditions;
[0046] A preprocessing module, configured to preprocess the data related to highway road area risks to obtain preprocessed data;
[0047] An extraction module, configured to extract key features from the preprocessed data, where the key features are used for risk factor identification;
[0048] A training module for training a neural network model using key features to obtain a trained neural network model;
[0049] An identification module for identifying risk factors through the trained neural network model and performing association mining on the risk factors to obtain the interrelationships between the risk factors;
[0050] A calculation module for assigning an importance score to each risk factor based on the interrelationships between the risk factors; calculating a dynamic adjustment factor, multiplying the dynamic adjustment factor by the importance score of each risk factor to obtain an adjusted importance score; and sorting the risk factors according to the adjusted importance score to obtain the key factors affecting the risk of the highway road area.
[0051] In a third aspect, a computing device includes:
[0052] One or more processors;
[0053] A storage device for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the described method.
[0054] In a fourth aspect, a computer-readable storage medium stores a program that, when executed by a processor, implements the described method.
[0055] The above solution of the present invention has at least the following beneficial effects:
[0056] By obtaining multi-dimensional data (such as traffic flow, weather conditions, road conditions, etc.), this method can more comprehensively reflect the actual risk situation of the highway road area. Combining the deep learning ability of the neural network model, it can accurately extract key features from complex data, thereby improving the recognition accuracy of risk factors.
[0057] Compared with traditional manual inspection and data processing methods, this method uses automated data preprocessing and feature extraction steps, significantly improving the efficiency of data processing. This not only reduces the investment in human resources but also shortens the time cycle from data collection to risk factor identification, making risk response more timely.
[0058] Through association mining technology, this method can reveal the interrelationships between different risk factors. This understanding of the correlation helps to more comprehensively evaluate risks, formulate more accurate risk management strategies, and optimize resource allocation.
[0059] By dynamically adjusting factors, risk assessment can be adjusted in real time according to the actual situation. This dynamic nature not only reflects the time-varying characteristics of highway road area risks but also enhances the flexibility and adaptability of the risk assessment model.
[0060] By ranking risk factors, this method can identify the key factors affecting highway road area risks. This provides strong information support for decision-makers, helps formulate risk management measures with clear priorities and strong pertinence, and thus improves the safety and efficiency of highway operations. Description of the Drawings
[0061] Figure 1 is a schematic flowchart of a method for identifying risk factors in a highway road area provided by an embodiment of the present invention.
[0062] Figure 2 is a schematic diagram of a device for identifying risk factors in a highway road area provided by an embodiment of the present invention. Detailed Embodiments
[0063] Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.
[0064] As Figure 1 shown, an embodiment of the present invention proposes a method for identifying risk factors in a highway road area, and the method includes the following steps:
[0065] Step 1: Obtain data related to highway road area risks, where the data includes traffic flow, weather conditions, and road conditions;
[0066] Step 2: Preprocess the data related to highway road area risks to obtain preprocessed data;
[0067] Step 3: Extract key features from the preprocessed data, where the key features are used for risk factor identification;
[0068] Step 4: Train a neural network model using the key features to obtain a trained neural network model;
[0069] Step 5: Identify risk factors through the trained neural network model, and perform association mining on the risk factors to obtain the mutual relationships between the risk factors;
[0070] Step 6: Based on the interrelationships among risk factors, assign an importance score to each risk factor; calculate a dynamic adjustment factor, and multiply the dynamic adjustment factor by the importance score of each risk factor to obtain an adjusted importance score; sort the risk factors according to the adjusted importance score to obtain the key factors affecting the highway road area risk.
[0071] In the embodiment of the present invention, by comprehensively collecting multi-dimensional data such as traffic flow, weather conditions, and road conditions, rich basic information is provided for subsequent risk factor identification and analysis. The collection of such comprehensive data helps to more comprehensively understand the operating status and potential risks of the highway road area. Data preprocessing can clean and organize the original data, remove noise and outliers, and improve the quality and usability of the data. This step ensures the accuracy and reliability of subsequent analysis and provides a clean and standardized data set for the training of the neural network model. Feature extraction helps to extract key information directly related to risk factor identification from complex data sets. This not only reduces the dimension of the data but also enables the neural network model to focus more on learning these key features, thereby improving the efficiency and accuracy of risk identification. By training the neural network model, it can learn the mapping relationship from key features to risk factors. The powerful learning ability of the neural network model can capture the non-linear relationships in the data, further improving the accuracy and complexity of risk factor identification. Using the trained neural network model for risk factor identification can quickly and accurately locate potential risks. At the same time, the association mining technology can reveal the internal connections among risk factors, helping to deeply understand the causes and propagation mechanisms of risks. By assigning importance scores to risk factors and introducing a dynamic adjustment factor for real-time adjustment, the impact degree of each risk factor on the highway road area safety can be more accurately quantified.
[0072] In a preferred embodiment of the present invention, in the above step 1 of obtaining data related to the highway road area risk, the data includes traffic flow, weather conditions, and road conditions, and may include:
[0073] Step 11: Regard the selection and configuration of data collection points as an optimization problem, with the goal of maximizing the efficiency and quality of data collection; determine the decision variables, including the location, type, and collection frequency of sensors, specifically including: determining the specific indicators of data collection efficiency and quality, such as timeliness, integrity, and accuracy of data collection; quantifying these indicators into measurable objective functions, for example, by defining a data collection efficiency index and a quality index; listing all possible sensor locations based on the geographical characteristics and key risk points of the highway; selecting sensor types suitable for data collection of traffic flow, weather conditions, road conditions, etc.; setting the range of sensor collection frequencies, considering the balance between data real-time and transmission costs; considering the physical limitations of sensor deployment, such as the availability of power supply, communication, and other infrastructure, and setting a budget limit to ensure the economic feasibility of the overall solution.
[0074] Step 12: Represent the solution using binary coding, and initialize a population that contains multiple solutions, specifically including: using binary coding to represent the decision variables of sensor location, type, and collection frequency; for example, the location can be represented by a series of binary bits for different candidate locations, the type can be represented by several binary bits for different sensor types, and the collection frequency can also be represented by binary coding for different frequency levels; randomly generate a certain number of initial solutions, each solution being a binary string, ensuring that the population size is large enough to cover the diversity of the search space.
[0075] Step 13: Define a fitness function to evaluate the quality of each individual; use the roulette wheel selection method to select the corresponding individuals from the current population to enter the next generation; perform a crossover operation on the selected individuals to generate new solutions; perform a mutation operation on the newly generated individuals, and repeat the selection, crossover, and mutation operations until the termination condition is met. When terminated, output the final solution, that is, the final sensor configuration plan, specifically including:
[0076] According to the optimization objective, design a fitness function that can evaluate the advantages and disadvantages of each individual (solution); this function should comprehensively consider the efficiency and quality of data collection and give a quantitative score; use the roulette wheel selection method to select the probability of each individual entering the next generation according to its fitness value, and individuals with higher fitness will have a greater chance of being selected and passed on to the next generation; randomly pair the selected individuals and select a crossover point for crossover of the binary strings; through the crossover operation, generate new solutions that combine the excellent characteristics of the parent individuals; perform random binary bit flips on the newly generated individuals to introduce new genetic variations, and the mutation operation helps to increase the diversity of the population and prevent premature convergence. Set the termination conditions of the genetic algorithm, such as reaching the maximum number of iterations or the fitness value reaching a preset threshold. When the termination conditions are met, output the individual with the highest fitness in the current population as the final solution, that is, the optimal sensor configuration scheme. Among them, the calculation formula of the fitness function is:
[0077]
[0078] Among them, F represents the fitness function value; α represents the weight adjustment coefficient of efficiency; β represents the scaling coefficient of the efficiency term; γ represents the influence weight of the sensor cost; δ represents the influence exponent of the sensor frequency; N represents the number of sensors; c i represents the deployment cost coefficient of the i-th sensor; f i represents the acquisition frequency of the i-th sensor; M represents the number of data points collected; d mj represents the measured value of the j-th data point; d aj represents the actual value of the j-th data point; ∈ represents the influence weight of the data error; ζ represents the influence weight of the actual data value; η represents the exponential adjustment weight of the quality term.
[0079] Step 14, deploy sensors according to the final sensor configuration scheme to obtain data related to highway road area risks, specifically including: according to the sensor positions, types and acquisition frequencies determined by the final solution, carry out actual sensor deployment work to ensure that the sensors are installed correctly and establish a stable communication connection with the data acquisition system; start the sensors and begin to collect data related to highway road area risks, and conduct preliminary verification on the collected data to ensure that its accuracy and integrity meet the requirements; if data quality problems are found, adjust the sensor configuration in time or perform necessary maintenance operations.
[0080] In the embodiments of the present invention, by optimizing the position, type, and acquisition frequency of sensors, effective data acquisition can be ensured at critical areas and critical time points, thus avoiding unnecessary resource waste and improving the overall efficiency of data acquisition. A reasonable sensor configuration can capture more accurately the data related to highway road area risks. By selecting appropriate sensor types and positions, the data collected can be made more representative and accurate. Optimizing the sensor configuration can avoid deploying too many sensors at unnecessary locations or times, thereby reducing hardware costs, maintenance costs, and data processing costs. High-quality data acquisition provides a solid foundation for risk identification. Through accurate data, potential risk factors can be identified more accurately, and corresponding preventive and response measures can be taken in a timely manner. Optimizing the sensor configuration is an important part of the construction of intelligent transportation systems (ITS). Through efficient data acquisition, richer and more real-time information can be provided for intelligent transportation systems, thus promoting the further development of intelligent transportation technologies. Based on the data collected from the optimized sensor configuration, road managers can more accurately grasp the road operation conditions, discover and handle potential safety hazards in a timely manner, thereby improving the efficiency and effectiveness of road safety management.
[0081] In a preferred embodiment of the present invention, step 2 above, preprocessing the data related to highway road area risks to obtain preprocessed data, may include:
[0082] Integrate the raw data collected from different data sources (such as traffic flow monitoring devices, weather stations, road condition sensors, etc.) into a unified data storage system; conduct a preliminary check of the data to confirm the integrity and correct format of the data. Identify and delete duplicate data records to ensure that each piece of data is unique. Detect and process outliers, such as extremely large or extremely small values that suddenly appear in traffic flow data, which may be caused by sensor errors or data transmission problems. For missing data, fill or interpolate according to specific circumstances. If there is too much missing data, consider deleting that record.
[0083] Since data such as traffic flow, weather conditions, and road conditions may have different dimensions and value ranges, in order to eliminate the influence of these differences on subsequent analysis, it is necessary to normalize the data. The minimum-maximum normalization method can be selected to scale the data to the range of [0, 1], or Z-score normalization can be used to convert the data into a distribution with a mean of 0 and a standard deviation of 1.
[0084] In a preferred embodiment of the present invention, step 3 above, extracting key features from the preprocessed data, where the key features are used for risk factor identification, may include:
[0085] Step 31: Determine the name, definition, and expected meaning of each feature according to the data dictionary in the preprocessed data; Quantify the value range and distribution of each feature by the mean; Determine the target variable, that is, the risk factor index to be identified, specifically including: Refer to the data dictionary attached to the preprocessed data, which is the first step in understanding the data set.
[0086] The data dictionary contains information such as the name, data type, description, and possible value range of each feature. According to the data dictionary, sort out the name, definition (i.e., what the feature represents), and expected meaning (how the feature should be understood in the business logic) of each feature. For example, the definition of the feature "average vehicle speed" is the average speed of all vehicles passing through a certain section within a certain period of time, and its expected meaning is an important indicator reflecting the smoothness of road traffic. For numerical features, quantify their value range and distribution by calculating statistics such as the mean, standard deviation, minimum value, and maximum value. For categorical features, count the frequencies or frequencies of each category to understand the distribution of different categories. Determine the target variable. The target variable is the risk factor index that we hope to predict or explain, such as the accident incidence rate, traffic congestion level, etc. According to the business requirements and the purpose of data analysis, clarify the target variable and ensure that the data set contains relevant information about this variable.
[0087] Step 32: Calculate the Pearson correlation coefficient between each feature and the target variable; Construct a correlation coefficient matrix according to the Pearson correlation coefficient; Analyze the correlation coefficient matrix to identify the identification features related to the target variable, specifically including: Calculate the Pearson correlation coefficient between each feature and the target variable. The Pearson correlation coefficient measures the strength and direction of the linear relationship between two variables; Organize the calculated Pearson correlation coefficients into a matrix form, where the rows and columns represent different features respectively, and the elements in the matrix represent the correlation coefficients between the corresponding feature pairs. For the correlation coefficients between the target variable and each feature, they can be extracted separately to form a column or a row; By observing the correlation coefficient matrix, especially the correlation coefficients between the target variable and each feature, the features with relatively strong correlation with the target variable can be initially identified; The closer the absolute value of the correlation coefficient is to 1, the stronger the linear relationship between the two variables.
[0088] Step 33: Set a screening threshold according to the Pearson correlation coefficient; Select the key features that meet the screening threshold conditions from the identification features, specifically including:
[0089] Set a screening threshold according to business requirements and data analysis experience. This threshold is used to determine which features have a strong enough correlation with the target variable to be regarded as key features. The selection of the threshold can be absolute (such as the correlation coefficient being greater than 0.5 or less than -0.5), or relative (such as selecting the top 10% of features ranked by the correlation coefficient). Compare the correlation coefficients calculated in step 32 with the set screening threshold, and retain those features whose correlation coefficients exceed (or are lower, for negative correlation relationships) the screening threshold. These features are regarded as key features significantly correlated with the target variable.
[0090] In the embodiment of the present invention, by calculating the Pearson correlation coefficient between each feature and the target variable, those features highly correlated with the target variable can be accurately identified. These key features will play an important role in the subsequent risk factor identification model, thereby improving the identification accuracy of the model. In feature engineering, removing features with low correlation with the target variable can effectively reduce the complexity of the model. This not only makes the model more concise and easy to understand, but also reduces the risk of overfitting and improves the generalization ability of the model. The screening process of key features is actually a dimensionality reduction process. By reducing the number of input features, the computational amount during model training can be significantly reduced, thereby improving the computational efficiency. This is particularly important when dealing with large-scale data sets. By screening key features, those non-stable features that may be caused by noise or outliers can be removed. In this way, the constructed risk factor identification model will be more robust and have better tolerance to small changes in the input data. The identification results of key features can also provide guidance for future data collection work. By clarifying which features are crucial for risk factor identification, more attention can be paid to these features in the subsequent data collection process, thereby optimizing the data collection strategy and improving the data quality.
[0091] In a preferred embodiment of the present invention, step 4, training a neural network model using key features to obtain a trained neural network model, may include: <s
[0092] Step 41, initialize the weight and bias parameters of the convolutional neural network, specifically including: initialize the weight parameters of the neural network using random values (such as normal distribution or uniform distribution). These weights are key parameters for the neural network to learn, and they will be continuously adjusted during the training process. Initialize the bias parameter to zero or a small decimal close to zero. The bias parameter is used to adjust the output of the neuron to make it easier to be processed by the activation function. Select a suitable initialization method according to the specific neural network structure and task requirements, such as He initialization, Xavier initialization, etc.
[0093] Step 42, define a loss function, which is used to measure the gap between the predicted value and the true value of the neural network model. Among them, the calculation formula of the loss function is:
[0094]
[0095] Among them, n is the number of samples, yi is the true value, is the predicted value of the model.
[0096] Step 43, during the training process, use the gradient descent algorithm to optimize the weight and bias parameters of the neural network, specifically including: Select a standard gradient descent algorithm according to requirements, such as Stochastic Gradient Descent (SGD). Determine an appropriate learning rate to control the step size of parameter update. An overly large learning rate may lead to unstable training, while an overly small learning rate may result in slow training speed. According to the selected gradient descent algorithm and learning rate, configure the corresponding optimizer, such as using the optimizer library in TensorFlow or PyTorch.
[0097] Step 44, for each training batch, calculate the gradients of the loss function with respect to the weights and biases, specifically including: Input the training data into the neural network and obtain the predicted value of the model through calculations of each layer; According to the predicted value and the true value, calculate the loss value using the loss function defined in Step 42; Use the chain rule to calculate the gradients of the loss function with respect to each weight and bias parameter, and these gradients indicate how the parameters should be adjusted to reduce the loss.
[0098] Step 45, update the weight and bias parameters according to the calculated gradients, and repeat the process until the stopping condition is met; Set the learning rate and optimizer; Divide the preprocessed data into a training set and a validation set, specifically including: Use the optimizer configured in Step 43 and the calculated gradients to update the weight and bias parameters of the neural network; Repeat Steps 44 and 45, that is, continuously perform forward propagation, calculate the loss, backpropagation, and parameter update until the stopping condition is met (such as reaching a preset number of iterations or the loss value converges); Before starting iterative training, ensure that the preprocessed data has been divided into a training set and a validation set. The training set is used to train the model, and the validation set is used to evaluate the performance of the model.
[0099] Step 46, use the training set data to calculate the predicted value of the neural network model through forward propagation and calculate the value of the loss function; Use the gradient descent algorithm and optimizer to update the weight and bias parameters of the neural network according to the gradients of the loss function; After each iteration cycle, evaluate the performance of the neural network model on the validation set to obtain the evaluation result, specifically including: After each iteration cycle ends, use the validation set data to evaluate the model. This helps to understand the generalization ability of the model on unseen data; Select appropriate performance metrics according to the nature of the task (such as accuracy, recall rate, F1 score, etc.) and calculate the values of these metrics; Monitor the performance changes of the model on the validation set and record the performance metric values of each iteration cycle for subsequent analysis and comparison.
[0100] Step 47: Adjust the structure, learning rate, and optimizer parameters of the neural network model according to the evaluation results to obtain the trained neural network model, specifically including: Analyze the performance of the model based on the performance metric values recorded in Step 46, and identify potential problems and areas for improvement; According to the analysis results, try to adjust the structural parameters such as the number of layers, number of neurons, and activation functions of the neural network to improve the performance of the model; If the training speed of the model is slow or unstable, try to adjust the size of the learning rate or replace it with other optimizers for experimentation; After adjusting the model structure and parameters, repeat the training (Steps 41 to 46) and evaluation (Step 46) until a satisfactory performance level is achieved.
[0101] In the embodiment of the present invention, by training the model with key features, the neural network can more accurately capture the potential laws and patterns in the data. This helps to improve the accuracy of the model in predicting risk factors, thereby providing more reliable decision-making support. Using key features instead of all features for training helps to reduce the complexity of the model, and thus reduces the risk of overfitting. Overfitting refers to the situation where the model performs well on the training data but has poor generalization ability on new data. By screening key features, the model can focus more on learning the information that is truly important for the prediction result. Since only key features are used for training, the input dimension of the neural network is reduced, which can significantly speed up the training process and reduce the consumption of computing resources. The process of screening key features helps to remove noise and redundant information, making the model more robust. This means that in the face of minor changes or outliers in the data, the model can maintain relatively stable prediction performance. Adjusting the structure, learning rate, and optimizer parameters of the neural network model according to the evaluation results mentioned in Step 47 helps to find the optimal configuration of the model. By continuously optimizing these hyperparameters, the prediction performance and generalization ability of the model can be further improved. Using key features for training also helps to improve the interpretability of the model. Since the number of features is small and each feature has a significant association with the target variable, it is easier to understand how the model makes predictions based on these features.
[0102] In a preferred embodiment of the present invention, Step 5 above, identifying risk factors through the trained neural network model and performing association mining on the risk factors to obtain the interrelationships between the risk factors, may include:
[0103] Step 51: Input the dataset to be analyzed into the trained neural network model; through the forward propagation process of the trained neural network model, obtain the risk factor prediction values corresponding to each observation point, specifically including: ensuring that the dataset to be analyzed has been properly preprocessed, including data cleaning, standardization or normalization, etc., to meet the input requirements of the neural network model; loading the previously trained neural network model to ensure that the model weights and structure have been correctly loaded; taking the dataset to be analyzed as the input and performing forward propagation calculations through the neural network model. This involves calculating the data through each layer of the model and finally obtaining the prediction values of the output layer; obtaining the risk factor prediction values corresponding to each observation point from the output layer of the neural network, and these prediction values will be used for subsequent association rule mining.
[0104] Step 52: Set the minimum support and minimum confidence thresholds of the Apriori algorithm; run the Apriori algorithm, inputting the transaction dataset, minimum support, and minimum confidence, specifically including: according to specific requirements and data characteristics, set the minimum support (min_support) and minimum confidence (min_confidence) thresholds of the Apriori algorithm. These thresholds will be used to filter valid association rules; convert the risk factor prediction values obtained in Step 51 into a transaction dataset format suitable for the Apriori algorithm to process, which requires discretizing the continuous risk factor prediction values into specific intervals or categories. Call the Apriori algorithm function or library and input the converted transaction dataset, minimum support, and minimum confidence parameters to start the association rule mining process.
[0105] Step 53: The Apriori algorithm will output a series of association rules, and each rule is represented as a combination of an antecedent and a consequent, specifically including: the Apriori algorithm traverses the transaction dataset, discovers item sets that meet the minimum support and minimum confidence thresholds, and generates association rules based on these item sets. Each association rule consists of an antecedent and a consequent. After the algorithm runs to completion, a series of association rules that meet the conditions will be output. These rules represent the potential associations between different risk factors.
[0106] Step 54: For each association rule, calculate its support, confidence, and lift. The support represents the frequency of the rule appearing in the data, the confidence represents the reliability of the rule, and the lift represents the correlation strength between the antecedent and the consequent in the rule. Specifically, it includes: For each association rule, calculate its support, confidence, and lift. The support represents the frequency of the rule appearing in the data; the confidence represents the reliability or conditional probability of the rule; the lift represents the degree of enhancement of the correlation strength between the antecedent and the consequent in the rule compared to when they appear independently; traverse all the output association rules and calculate the values of the above three metrics according to the definitions.
[0107] Step 55: Sort and filter the association rules according to the support, confidence, and lift, and find the corresponding key rules; analyze the key rules to obtain the association and dependency relationships between different risk factors. Specifically, it includes: Sort all the association rules according to the calculated support, confidence, and lift values. This helps to identify those rules that are most statistically significant and have business value. According to the sorting results and a preset threshold (such as the minimum values of support, confidence, and lift), filter out the key rules, and these key rules represent the strongest and most meaningful association relationships in the data; conduct in-depth analysis on the filtered key rules to reveal the association and dependency relationships between different risk factors. This helps to understand the interaction mechanism between risk factors and provides support for subsequent risk management and decision-making.
[0108] In the embodiment of the present invention, by performing forward propagation on the dataset to be analyzed through the trained neural network model, the risk factor values corresponding to each observation point can be accurately predicted. This helps to more precisely identify potential risk factors and provides support for subsequent risk management and decision-making. The Apriori algorithm can mine the association rules between risk factors in the dataset, and these rules may be difficult to be discovered in traditional statistical analysis. By revealing these hidden associations, the interaction and influence mechanism between risk factors can be understood more deeply. By calculating the support, confidence, and lift of the association rules, the frequency, reliability, and correlation strength of the rules can be quantitatively evaluated, which helps to more objectively evaluate the association degree between different risk factors. Based on the mined key association rules, risk management strategies can be formulated more targeted. For example, by identifying highly associated combinations of risk factors, those factors that have the greatest impact on the overall risk can be preferentially processed, thereby improving the efficiency and effectiveness of risk management.
[0109] In a preferred embodiment of the present invention, step 6 above, based on the mutual relationship between risk factors, assigning an importance score to each risk factor may include:
[0110] Step 61, determine the quantitative metrics for the mutual relationship. The quantitative metrics include support, confidence, and lift.
[0111] Step 62, according to the quantitative metrics, through calculate the importance score;
[0112] where f r (A∪B) represents the transaction frequency of the simultaneous occurrence of item sets A and B for the association rule r; F r (A) and f r (B) respectively represent the transaction frequencies of item sets A and item set B for the association rule r; N represents the total number of transactions in the dataset; w S 、w C and w L are weight parameters; max r∈R represents the maximum value of the unnormalized importance scores in all association rule sets R; N r represents the normalized importance score of the association rule r.
[0113] In the embodiment of the present invention, by assigning importance scores to each risk factor, the key risk factors in the dataset can be identified more intuitively. This helps risk managers quickly locate the risk points that need to be focused on, improving the pertinence and efficiency of risk management. The use of quantitative metrics such as support, confidence, and lift enables the quantitative evaluation of the mutual relationship between risk factors. This quantitative evaluation method is more objective and accurate, helping to deeply understand the complex associations between risk factors. By introducing weight parameters, users can flexibly adjust the weights of support, confidence, and lift in the score calculation according to actual needs. This flexibility makes the evaluation process more in line with the actual business scenario, improving the practicality and operability of the evaluation results. Normalizing the importance scores of all association rules makes the scores between different rules comparable. This helps to rank and screen risk factors on a global scale, further simplifying the risk management decision-making process.
[0114] In a preferred embodiment of the present invention, the calculation formula for the dynamic adjustment factor is:
[0115]
[0116] where F represents the dynamic adjustment factor; w represents the weight of traffic flow; V represents the current traffic flow; U represents the reference traffic flow; z represents the weight of visibility; a represents the peak of the Gaussian function; S represents the current visibility; T represents the optimal visibility; C represents the standard deviation of the Gaussian function related to visibility.
[0117] In the embodiment of the present invention, the traffic flow part in the formula It can reflect the proportional relationship between the current traffic flow and the reference traffic flow in real time. When the traffic flow changes, the dynamic adjustment factor will be adjusted accordingly, so as to achieve a rapid response to the traffic state. By introducing the Gaussian function The formula can accurately quantify the impact of visibility on the traffic environment. The characteristics of the Gaussian function make the adjustment factor change smoothly when the visibility is close to the optimal value; while when the visibility is far from the optimal value, the adjustment factor changes rapidly, thus more accurately reflecting the importance of visibility to traffic safety. The weight parameters in the formula and the parameters of the Gaussian function can be flexibly configured according to the actual situation. This enables the dynamic adjustment factor to adapt to different traffic scenarios and specific requirements, improving its versatility and practicality. By comprehensively considering traffic flow and visibility, the dynamic adjustment factor can provide a scientific decision-making basis for the traffic management system. For example, in the case of traffic congestion or poor visibility, the control strategy of traffic lights can be adjusted in a timely manner to optimize the vehicle passing order, thereby improving traffic safety and efficiency.
[0118] In the embodiment of the present invention, according to the adjusted importance scores, the risk factors are sorted to obtain the key factors affecting the highway road area risk, specifically including:
[0119] Using the adjusted importance scores, all risk factors are sorted from high to low; the sorting result will reflect the relative influence degree of each risk factor on the highway road area risk. According to the sorting result, the risk factors with higher scores (i.e., greater influence) are selected as key factors, and the number of key factors can be determined according to the actual situation and requirements, such as selecting the top 5% or top 10% of the risk factors.
[0120] A highway road area risk factor identification device, comprising:
[0121] An acquisition module, configured to acquire data related to the highway road area risk, where the data includes traffic flow, weather conditions, and road conditions;
[0122] A preprocessing module, configured to preprocess the data related to the highway road area risk to obtain preprocessed data;
[0123] An extraction module, configured to extract key features from the preprocessed data, where the key features are used for risk factor identification;
[0124] A training module, configured to train a neural network model using the key features to obtain a trained neural network model;
[0125] An identification module, configured to identify risk factors through the trained neural network model, perform association mining on the risk factors to obtain the mutual relationship between the risk factors;
[0126] A calculation module, configured to assign an importance score to each risk factor based on the mutual relationship between risk factors; calculate a dynamic adjustment factor, multiply the dynamic adjustment factor by the importance score of each risk factor to obtain an adjusted importance score; and rank the risk factors according to the adjusted importance score to obtain key factors affecting the risk of the highway road area.
[0127] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when run on a computer, cause the computer to execute the method described above. All implementation manners in the above method embodiments are applicable to this embodiment and can also achieve the same technical effects.
[0128] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention.
Claims
1. A method for identifying risk factors in highway road areas, characterized in that The method includes: Step 1: Obtain data related to highway road area risks, where the data includes traffic flow, weather conditions, and road conditions; Step 2: Preprocess the data related to highway road area risks to obtain preprocessed data; Step 3: Extract key features from the preprocessed data, where the key features are used for risk factor identification; Step 4: Train a neural network model using the key features to obtain a trained neural network model; Step 5: Identify risk factors through the trained neural network model, and conduct association mining on the risk factors to obtain the mutual relationships between the risk factors; Step 6: Based on the mutual relationships between the risk factors, assign an importance score to each risk factor; calculate a dynamic adjustment factor, multiply the dynamic adjustment factor by the importance score of each risk factor to obtain an adjusted importance score; sort the risk factors according to the adjusted importance score to obtain the key factors affecting highway road area risks. The calculation formula of the dynamic adjustment factor is: ; Among them, represents the dynamic adjustment factor; represents the weight of traffic flow; represents the current traffic flow; represents the reference traffic flow; represents the weight of visibility; represents the peak value of the Gaussian function; represents the current visibility; represents the optimal visibility; represents the standard deviation of the Gaussian function related to visibility.
2. The method for identifying risk factors in the highway road area according to claim 1, characterized in that, Obtain data related to highway road area risks, where the data includes traffic flow, weather conditions, and road conditions, including: Regard the selection and configuration of data collection points as an optimization problem, and the goal is to maximize the efficiency and quality of data collection; determine decision variables, including the location, type, and collection frequency of sensors; Use binary coding to represent the solution, and initialize a population containing multiple solutions; Define a fitness function to evaluate the pros and cons of each individual; use the roulette wheel selection method to select corresponding individuals from the current population into the next generation; perform crossover operations on the selected individuals to generate new solutions; perform mutation operations on the newly generated individuals, and repeat the selection, crossover, and mutation operations until the termination condition is met. When terminated, output the final solution, that is, the final sensor configuration plan; Deploy sensors according to the final sensor configuration plan to obtain data related to highway road area risks.
3. The method for identifying highway road area risk factors according to claim 2, wherein, Extract key features from the preprocessed data, where the key features are used for risk factor identification, including: According to the data dictionary in the preprocessed data, determine the name, definition, and expected meaning of each feature; quantify the value range and distribution of each feature through the mean; determine the target variable, that is, the risk factor index to be identified; Calculate the Pearson correlation coefficient between each feature and the target variable; construct a correlation coefficient matrix according to the Pearson correlation coefficient; analyze the correlation coefficient matrix to identify the identification features related to the target variable; Set a screening threshold according to the Pearson correlation coefficient; screen out the key features that meet the screening threshold conditions from the identification features according to the screening threshold.
4. The freeway road area risk factor identification method according to claim 3, wherein Train a neural network model using the key features to obtain a trained neural network model, including: Initialize the weight and bias parameters of the convolutional neural network; Define a loss function to measure the gap between the predicted value and the true value of the neural network model; During the training process, use the gradient descent algorithm to optimize the weight and bias parameters of the neural network; For each training batch, calculate the gradient of the loss function with respect to the weight and bias; Update the weight and bias parameters according to the calculated gradients, and repeat the process until the stopping condition is met; set the learning rate and optimizer; divide the preprocessed data into a training set and a validation set; Use the training set data to calculate the predicted values of the neural network model through forward propagation, and calculate the value of the loss function; use the gradient descent algorithm and the optimizer to update the weight and bias parameters of the neural network according to the gradient of the loss function; after each iteration, evaluate the performance of the neural network model on the validation set to obtain the evaluation results; Adjust the structure, learning rate, and optimizer parameters of the neural network model according to the evaluation results to obtain the trained neural network model.
5. The method for identifying risk factors in the highway road area according to claim 4, wherein, Identify risk factors through the trained neural network model, and perform association mining on the risk factors to obtain the mutual relationships between the risk factors, including: Input the dataset to be analyzed into the trained neural network model; through the forward propagation process of the trained neural network model, obtain the predicted values of the risk factors corresponding to each observation point; Set the minimum support and minimum confidence thresholds of the Apriori algorithm; run the Apriori algorithm, input the transaction dataset, minimum support, and minimum confidence; The Apriori algorithm will output a series of association rules, and each rule is represented as a combination of an antecedent and a consequent; For each association rule, calculate its support, confidence, and lift. The support represents the frequency of the rule in the data, the confidence represents the reliability of the rule, and the lift represents the correlation strength between the antecedent and the consequent in the rule; Sort and filter the association rules according to the support, confidence, and lift to find the corresponding key rules; analyze the key rules to obtain the association and dependence relationships between different risk factors.
6. The method for identifying highway road area risk factors according to claim 5, characterized in that, Based on the mutual relationships between the risk factors, assign an importance score to each risk factor, including: Determine the quantitative indicators of the mutual relationships. The quantitative indicators include support, confidence, and lift; According to the quantitative metrics, through calculate the importance score; Among them, represents the transaction frequency of the item sets and appearing simultaneously for the association rule ; and respectively represent the transaction frequencies of the item sets and and the item set appearing for the association rule ; represents the total number of transactions in the dataset; , and are weight parameters; represents the maximum value of the unnormalized importance scores in all association rule sets ; represents the normalized importance score of the association rule 7. An identification device for highway road area risk factors, which implements the method described in any one of claims 1 to 6, characterized in that including: An acquisition module for acquiring data related to highway road domain risks, where the data includes traffic flow, weather conditions, and road conditions; A preprocessing module for preprocessing the data related to highway road domain risks to obtain preprocessed data; An extraction module for extracting key features from the preprocessed data, where the key features are used for risk factor identification; A training module for training a neural network model using the key features to obtain a trained neural network model; An identification module for identifying risk factors through the trained neural network model and performing association mining on the risk factors to obtain the mutual relationships between the risk factors; A calculation module for assigning an importance score to each risk factor based on the mutual relationships between the risk factors; Calculate the dynamic adjustment factor, and multiply the dynamic adjustment factor by the importance score of each risk factor to obtain the adjusted importance score; 8. A computing device, characterized in that, Sort the risk factors according to the adjusted importance score to obtain the key factors affecting highway road domain risks. including: One or more processors; A storage device for storing one or more programs, which when executed by the one or more processors cause the one or more processors to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, A program is stored in the computer-readable storage medium, and when the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Traffic risk assessment method, system and device
CN117475631A
Expressway area risk prediction method and device
CN118015839A