Method for predicting distracted behavior of driver of key operating truck based on road operating environment
By constructing the operating environment feature map and using the Fi-GNN model and attention mechanism, the problem of difficult to predict the distraction behavior of key operating truck drivers in the existing technology is solved, and more accurate risk management and accident prevention are achieved.
Patent Information
- Application Number
- CN202510492942.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-22
AI Technical Summary
The existing technology is difficult to fully reflect the driver's behavior characteristics, the interaction and dynamic changes of the traffic environment and vehicle state, and cannot provide an accurate basis for driving decisions and vehicle control in complex driving environments. Moreover, the machine learning method has insufficient direct modeling ability and interpretation of graph structure information, and cannot effectively predict the probability of distracted behavior of key truck drivers.
By collecting and preprocessing data, a feature map of the operating environment is constructed, and graph structure modeling and Fi-GNN model combined with attention mechanism are used to predict the probability of drivers' distracted behavior in different environments, which comprehensively reflects the complex interaction between multiple factors.
It improves the accuracy of distracted behavior prediction, provides transportation companies with more accurate risk management tools, effectively reduces the accident risk of key operating trucks, and realizes systematic risk prevention from driving to before task dispatch.
Smart Images

Figure CN120356329A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of road traffic safety, and specifically relates to a method for predicting distracted behaviors of drivers of key commercial trucks based on road operating environments. Background Art
[0002] Key commercial vehicles refer to special vehicles for transporting dangerous goods by road and commercial trucks with a load capacity of 12 tons or more. Because of their flexible and convenient transportation mode and higher efficiency compared with general motor vehicles, they have become the main body of road transportation.
[0003] Since key commercial vehicles have a high center of gravity and a large volume, once an accident occurs, the loss of life and property is more serious, which is one of the major social public safety issues. Therefore, the prediction of distracted behaviors and risk management for key commercial trucks have important practical application values.
[0004] At present, there are few studies on the influence of multiple elements of road operating environments on driver behaviors. The available research results that can be referred to in terms of operating environments mainly focus on the influence of several elements in the operating environment on traffic risks and traffic accidents, as well as the dynamic analysis of vehicle driving safety under driving environments applied to driving decision-making and vehicle control in recent years.
[0005] In terms of the influence of operating environment elements on traffic risks and accidents, some experts have achieved certain research results. For example, Hu Liwei et al. constructed a coupling model of highway traffic risk causes under plateau geology and meteorological environments by using the N-K model and an improved coupling degree model, calculated the coupling degrees between the constituent elements of single and double risk factor coupling models respectively, quantified the danger degrees of various couplings, and finally analyzed the correlation mechanism between highway traffic risk values and various risk constituent elements under plateau geology and meteorological environments. However, this method uses statistical methods to analyze the macroscopic correlation between elements and risks, and does not carry out the analysis of the complex microscopic relationship between multi-environment elements and traffic risks.
[0006] Wen Huiying et al. proposed a comprehensive multi-element risk analysis model for mountain highway traffic accidents based on the joint return period of vulnerability surfaces and risk elements by using the binary nonlinear regression analysis method of predictive statistical methods to improve the theory of mountain highway traffic accident and risk analysis under the action of multi-element risks, and studied the number of casualties of traffic participants under the combined action of two elements of rainfall and fog visibility.
[0007] YAU et al. used the LOGIT model to study the influence of factors such as drivers, vehicles, and environments on the severity of motor vehicle accidents, PENMETSA et al. analyzed the influence of road alignment characteristic elements on the severity of accidents and constructed an influence degree model; Xiao Runmou et al. analyzed the traffic safety cognition and behavior characteristics of drivers driving on long straight sections of plateau highways.
[0008] In the research on vehicle driving safety models in the driving environment, existing driving safety models are usually established based on vehicle kinematics and dynamics theories. The expression of vehicle driving safety is mostly realized based on vehicle state information (speed, acceleration, yaw rate, etc.) and the relative motion relationship information between two vehicles (relative speed, relative distance, etc.). However, such driving safety models are difficult to reflect the impact of various traffic elements on safety, and it is difficult to embody the interaction and dynamic changes among driver behavior characteristics, traffic environment, and vehicle state, and cannot provide an accurate judgment basis for driving decisions and vehicle control in complex driving environments.
[0009] To explore better vehicle safety decision-making methods, some scholars use the concept and theoretical method of artificial potential field (APF) to solve the problems of robot working path planning and collision avoidance, and establish various field theory models. Wang Jianqiang et al. established a unified model of "driving risk field" for the human-vehicle-road closed-loop system on the basis of the existing field theory models, which characterizes the risk degree caused by multiple elements of human-vehicle-road to vehicle driving safety. The driving risk field mainly uses differential geometry tools to study the fields and their interactions in physics, and can accurately describe the spatial geometric relationship between elements, but cannot effectively reflect the dynamic interaction relationship between the operating environment and traffic participants.
[0010] With the wide application of AI technology, machine learning methods are also used to explore the relationship between traffic operating environment and traffic safety.
[0011] Qing C et al. explored the impact of drivers' visual environment on speeding collisions by using different machine learning techniques, and applied three different tree-based ensemble models (i.e., random forest, adaptive boosting (AdaBoost), and extreme gradient boosting (XGBoost)) to estimate the number of speeding collisions. The comparison results show that XGBoost can provide the best data fitting. In addition, it is found that the complexity of the drivers' visual environment increases the incidence of collisions.
[0012] To solve the problem of effectively identifying specific meteorological characteristics that cause traffic congestion or delays, Li C et al. proposed a meteorological-traffic causal inference variational autoencoder model (MT-CIVAE) to estimate the causal impact of fine-grained meteorological changes (e.g., rainfall and temperature) on traffic. A Transformer encoder layer is introduced to analyze the spatial and temporal correlations of historical traffic data to further enhance the inference ability.
[0013] In summary, the methods used in existing research can be divided into traditional statistical methods and modern machine learning methods. Traditional statistical methods have limitations such as weak deduction ability, difficulty in dealing with complex implicit interaction relationships, and the field theory being limited to spatial geometric relationships, which prevent them from comprehensively reflecting the overall characteristics of the operating environment and the complex correlation relationships of traffic participants. For the machine learning methods used, the tree-based ensemble model and causal inference variational autoencoder model are insufficient in directly modeling the graph structure information and interpretability for the operating environment data with semi-structured characteristics. Although the causal inference variational autoencoder (VAE) model can capture the latent features of data through the latent space representation, it usually does not directly consider the edge and node relationships in the graph structure; moreover, its latent feature representation is implicit and difficult to directly interpret as specific relationships in the graph structure. Summary of the Invention
[0014] Aiming at the above problems existing in the prior art, the purpose of the present invention is to provide a method for predicting distracted driving behavior of key commercial vehicle drivers based on the road operating environment, which can effectively predict the probability of drivers generating distracted driving behavior in different environments, so as to provide more accurate risk management tools for transportation enterprises and effectively reduce the accident risk of key commercial vehicles.
[0015] To solve the above problems, the technical solutions adopted by the present invention are as follows:
[0016] A method for predicting distracted driving behavior of key commercial vehicle drivers based on the road operating environment, the method comprising the following steps:
[0017] (1) Collect data and preprocess the data;
[0018] (2) Extract trajectory data and active safety alarm data from the preprocessed data;
[0019] (3) Based on the trajectory data and active safety alarm data obtained in step (2), construct an operating environment feature graph;
[0020] (4) Based on the environment feature graph obtained in step (3), the interaction relationship of the operating environment features, predict the probability of the driver having distracted driving behavior.
[0021] Further, in step (1), the collected data includes trajectory data and active safety alarm data;
[0022] The trajectory data includes time, longitude and latitude, speed, status, alarm bit status, and additional information;
[0023] The active safety alarm data includes an alarm point trajectory file and dynamic video surveillance content, and the content includes the time, longitude and latitude, vehicle speed, in-vehicle conditions, driver's facial expressions, road conditions, and surrounding vehicle operation states of each alarm point.
[0024] Further, in step (1), the preprocessing process includes:
[0025] (1.1) For phenomena where the historical data does not match the preset and the driving mileage data does not match the speed, longitude and latitude data does not match the preset, mark and segment them respectively, and mark and clean them.
[0026] (1.2) Use the Haversine formula to calculate the spherical distance between two adjacent trajectory points to eliminate the longitude and latitude drift phenomenon in the trajectory data:
[0027]
[0028] In the above formula, d is the spherical distance between two adjacent trajectory points, r is the radius of the earth, lon i , lat i are the longitude and latitude of trajectory point i respectively, lon i+1 , lat i+1 are the longitude and latitude of trajectory point i + 1 respectively;
[0029] If the spherical distance between trajectory points > the maximum distance that can be traveled, it is determined that there is a drift point, otherwise there is no drift point;
[0030] The maximum distance is the distance traveled by the vehicle at the maximum speed;
[0031] (1.3) Match each alarm point with the trajectory point with the closest time interval, and eliminate false alarm data by observing the surveillance video.
[0032] Further, in step (2), the process of feature extraction is as follows:
[0033] (2.1) Road POI information acquisition: Through the reverse geocoding function of the map service, obtain road information, road intersection information, and POI information of the trajectory point location;
[0034] (2.2) Traffic condition acquisition: According to the actual data situation, use one of the following two methods to obtain the real-time traffic condition;
[0035] (2.2.1) Real-time traffic condition query based on the map service: Through the real-time traffic condition query function of the map service, obtain the real-time congestion situation and congestion trend of the specified road, and describe the traffic condition by grading;
[0036] (2.2.2) Traffic flow analysis based on video recognition: Obtain traffic flow information through video recognition technology, combine data on the number of vehicles, vehicle types, and number of lanes, calculate the highway service level density, and classify traffic conditions into different grades. The calculation formula for the highway service level density is as follows:
[0037]
[0038] In the above formula, H represents hours, LN represents lanes, Pcu (i.e., Passenger Car Unit) represents the equivalent number of standard vehicles; D represents the highway service level density, with the unit of pcu / h / ln;
[0039] (2.3) Weather condition acquisition: Adopt the method of data crawling to obtain meteorological information of the district / county / prefecture-level city where each track point is located, including:
[0040] (2.3.1) Data crawling: According to the time and location information of the track point, access the weather website to obtain meteorological data;
[0041] (2.3.2) Data matching: Match the obtained meteorological data with the track point data;
[0042] (2.3.3) Weather classification: Define moderate rain, snow, fog, and haze as bad weather, and the rest as non-bad weather;
[0043] (2.4) Driver category labels: Define labels for each type of driver;
[0044] (2.5) Obtaining driving behavior labels: The alarm data label is obtained from the alarm event code. The normal driving behavior label is obtained by matching the original track data and alarm data according to the timestamp. The track data within 300m of the alarm occurrence is excluded from the original track, and randomly selected at a ratio of 1:1 with the alarm data as normal driving data.
[0045] Furthermore, in step (4), the process of predicting the probability of a driver having a distracted behavior through the interaction relationship of operating environment characteristics is as follows:
[0046] (4.1) Input the operating environment characteristic map into the Fi-GNN model, and the embedding vector e of feature i i serves as the initial state vector of the corresponding node n i , that is
[0047] (4.2) Learn the weight w(n i ,n j) After processing the initial state vector through the Softmax function, the similarity score is transformed into a probability distribution to obtain the attention allocation coefficient. Calculate the weighted average of the input information sequence, and then use the attention allocation coefficient to perform weighted summation on the original values, thereby constructing the adjacency matrix A[n j ,n i ;
[0048] (4.3) In the interaction step t, each node n i will receive the state information from the surrounding nodes n j . Assign an output matrix j and an input matrix to each surrounding node n . Then is the transformation function from node n j →n i to node n j to node n i . The adjacency matrix and the transformation function complete the aggregation of the node state information, and the calculation formula is:
[0049]
[0050] In the above formula, W w ∈R 2D is the weight matrix, || is the concatenation operation, A[n j ,n i is the weight of the edge from node n j to node n i , is the aggregated state information, b p is the bias term;
[0051] (4.4) After completing the aggregation, update the state vector of node n according to the aggregated state information and the state of the previous interaction step i through GRU;
[0052] Combine low-order and high-order interactions, introduce a residual connection to update the node state together with GRU, and the formula is:
[0053]
[0054] (4.5) After T interaction steps, obtain the node state and use two multi-layer perceptrons MLP1 and MLP2 to estimate the prediction score i of node n and its attention weight a i . The final prediction score is the sum of all nodes, and the formula is:
[0055]
[0056] During the training process of this step, a grid search strategy is adopted to determine the optimal hyperparameters. The dimensionality of the feature embedding vector is set to 16, the batch size is 1024, the deep cross has four feedforward layers, each layer consists of 100 hidden units, the Relu is used as the activation function, and the Adam optimizer is used to solve the optimization parameters. The loss function adopted is the logarithmic loss, and the formula is:
[0057]
[0058] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0059] (1) Aiming at the characteristics of key operating trucks, this method can effectively predict the probability of distracted driving behavior of drivers in different environments through graph structure modeling.
[0060] (2) By modeling different driver types and external environment indicators as nodes and using edges to represent the interaction relationship between drivers and the environment, this method can comprehensively reflect the complex interaction relationship among multiple factors. In particular, through the Fi-GNN model and the attention mechanism, it can dynamically adjust the model parameters, capture the interaction relationship between different features, thereby improving the accuracy of distracted driving behavior prediction. This method can provide a more accurate risk management tool for transportation enterprises and effectively reduce the accident risk of key operating trucks.
[0061] (3) The application of the present invention enables transportation enterprises to select a suitable driver according to the transportation tasks and driving routes before executing the goods transportation, extending the enterprise's risk control from the current single in-transit control to the source control before task dispatch, and preventing risks more systematically. The driving characteristics of trucks are significantly diverse. Especially in terms of safety, this diversity makes truck driving more challenging than that of ordinary vehicles. Trucks usually undertake long-distance transportation tasks with long driving hours, and drivers are prone to fatigue and decreased attention during long driving. At the same time, due to the timeliness requirements of transportation tasks, drivers often need to drive at night with low visibility, further increasing the risk of distraction. In addition, truck transportation tasks are not restricted by weather conditions. When driving in adverse weather conditions such as rain, snow, etc., factors such as slippery roads and low visibility will significantly increase the driving difficulty, and drivers' attention is more likely to be distracted. Moreover, truck transportation routes usually involve various road conditions such as highways, mountain roads, and urban roads. Drivers need to frequently adjust their driving strategies under different road conditions, which is prone to fatigue and distraction. The transportation tasks of trucks usually have high timeliness and economic pressure. Drivers may face greater psychological pressure during transportation, which will lead to mood swings of drivers and further increase the risk of distraction. In addition, trucks are large in size, high in center of gravity, have a long braking distance, and are difficult to control. Drivers need higher concentration and reaction speed during driving. Once distraction occurs, the consequences of accidents are often more serious. Therefore, the research on distraction behavior of trucks has important practical significance, which can provide more accurate risk management tools for transportation enterprises and effectively reduce the accident risk during truck driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 is a schematic flow chart of the steps of this method;
[0063] Figure 2 is a schematic diagram of feature interaction comparison;
[0064] Figure 3 is a schematic diagram of cross-validation;
[0065] Figure 4 is a schematic diagram of the Fi-GNN model;
[0066] Figure 5 is a schematic diagram of the attention mechanism;
[0067] Figure 6 is a schematic diagram of the transfer process of GRU. DETAILED DESCRIPTION OF THE INVENTION
[0068] The present invention will be further described below in conjunction with specific embodiments.
[0069] Such as Figure 1As shown in the figure, the method for predicting distracted driving behavior of key commercial vehicle drivers based on road operating environment according to the present invention includes the following steps:
[0070] (1) Collect data and preprocess the data;
[0071] Among them, the data mainly comes from road transport operating enterprises, including GPS trajectory data and active safety alarm data.
[0072] The trajectory data includes time, longitude and latitude, speed, status, alarm bit status, and additional information, etc.; the active safety alarm data includes alarm point trajectory files and dynamic video monitoring content, which contains information such as the time, longitude and latitude, vehicle speed, in-vehicle status, driver's facial expression, road status, and surrounding operating status of each alarm point.
[0073] It is found through data screening that there are obvious outliers, drift points, mismatches between over-alarm points and original trajectory points, and false alarms, etc., and data cleaning is required. The specific process is as follows:
[0074] (1.1) For the phenomena where the historical data does not match the preset and the driving mileage data does not match the speed, longitude and latitude data does not match the preset, mark and segment, and mark and clean them respectively;
[0075] (1.2) For the longitude and latitude drift phenomenon in the trajectory data, it cannot be simply screened. Therefore, the Haversine formula is used to calculate the spherical distance between two adjacent trajectory points to eliminate the longitude and latitude drift phenomenon in the trajectory data:
[0076]
[0077] In the above formula, d is the spherical distance between two adjacent trajectory points, r is the radius of the earth, lon i 、lat i are the longitude and latitude of trajectory point i respectively, lon i+1 、lat i+1 are the longitude and latitude of trajectory point i + 1 respectively. The basic principle followed by this process is: if the spherical distance between trajectory points > the maximum distance that can be traveled, there is a drift point, otherwise there is no. The maximum distance is the distance traveled by the vehicle at the maximum speed. The maximum driving speed of key commercial vehicles is calculated according to 80 km / h.
[0078] (1.3) There are generally no outliers and drift phenomena in the trajectory files in the alarm data, but there is a phenomenon that the alarm points do not coincide with the original trajectory points in time. Therefore, each alarm point needs to be matched with the trajectory point with the closest time interval, and false alarm data is eliminated by observing the monitoring video.
[0079] (2) Extract trajectory data and active safety alarm data from the preprocessed data;
[0080] In this process, four types of driving behaviors, namely distracted driving, lane departure, near collision, and normal driving, are used as labels. The trajectory data is mined from aspects such as roads, traffic, time, weather, transportation tasks, and drivers to obtain the operating environment characteristic indicators of each trajectory point. Finally, a total of 23 operating environment elements are selected as potential influencing variables for unsafe driving behaviors. The specific process is as follows:
[0081] (2.1) Road POI information acquisition: Obtain road information, road intersection information, and POI information at the location of the trajectory point through the reverse geocoding function of the map service;
[0082] (2.2) Traffic condition acquisition: Obtain the real-time traffic condition using one of the following two methods according to the actual data situation;
[0083] (2.2.1) Real-time traffic condition query based on the map service: Obtain the real-time congestion situation and congestion trend of the specified road through the real-time traffic condition query function of the map service, and describe the traffic condition in grades;
[0084] (2.2.2) Traffic flow analysis based on video recognition: Obtain traffic flow information through video recognition technology, combine data on the number of vehicles, vehicle types, and number of lanes, calculate the highway service level density, and classify the traffic condition into different grades. The calculation formula for the highway service level density is:
[0085]
[0086] In the above formula, H represents hours, LN represents lanes, Pcu (i.e., Passenger Car Unit) represents the standard vehicle equivalent number; D represents the highway service level density, with the unit of pcu / h / ln;
[0087] (2.3) Weather condition acquisition: Use the method of data crawling to obtain meteorological information in the district / county / prefecture-level city where each trajectory point is located, including:
[0088] (2.3.1) Data crawling: According to the time and location information of the trajectory point, access the weather website to obtain meteorological data;
[0089] (2.3.2) Data matching: Match the obtained meteorological data with the trajectory point data;
[0090] (2.3.3) Weather classification: Define moderate rain, snow, fog, haze, etc. as bad weather, and the rest as non-bad weather;
[0091] (2.4) Driver category labels: Define labels for each type of driver, including drivers with weak inhibitory control, drivers with weak cognitive inhibitory control, steady drivers, etc.;
[0092] (2.5) Obtaining driving behavior labels: The alarm data labels are obtained from the alarm event codes, namely, drowsy driving (code 11011), distracted driving (code 12002), frontal collision (code 22011), lane departure (code 22002), pedestrian collision (codes 22003 / 22006). The normal driving behavior labels are obtained by matching the original trajectory data and the alarm data according to the timestamp. The trajectory data within 300 m of the alarm occurrence is removed from the original trajectory, and the remaining data is randomly selected at a ratio of 1:1 with the alarm data as the normal driving data.
[0093] (3) Based on the trajectory data and active safety alarm data obtained in step (2), construct an operating environment feature map;
[0094] In this method, the graph structure is innovatively applied to distraction prediction, fully drawing on its successful experience in the transportation field and combining the actual needs of distraction behavior analysis, providing a new path for the optimization of driving safety technology. In the transportation field, the graph structure has been widely used to represent and analyze complex transportation networks, such as modeling the relationships between stations and lines, path optimization, traffic flow prediction, etc. Through the shortest path algorithm, drivers can quickly plan the driving route that avoids congestion and takes the shortest time; community discovery technology can accurately identify traffic congestion areas and provide targeted guidance strategies for traffic management; while the dynamic graph model can dynamically reflect the real-time traffic conditions and provide strong support for traffic planning and management. These successful applications fully demonstrate the unique advantages of the graph structure in capturing complex relationships, dynamic changes, and multi-source data fusion.
[0095] This technical advantage is extended to distraction prediction. By modeling different types of drivers (such as drivers with weak inhibitory control, drivers with weak cognitive inhibitory control, and robust drivers) as nodes, and modeling external environmental indicators (such as weather conditions, road wetness, traffic flow density, etc.) as another type of node, and using edges to represent the behavioral responses and distraction tendencies of different driver categories under specific environmental conditions, the complex interactive relationship between multiple factors can be fully reflected. For example, when it is sunny (environmental node) and the traffic flow density is low (another environmental node), the distraction risk of the weak inhibitory control driver node is high. The graph structure model can capture the association pattern in such situations and predict possible risks, and then issue warnings or make targeted intervention suggestions. This method integrates driver characteristics and external environmental factors through static modeling, significantly improving the accuracy of distraction behavior detection and prediction. At the same time, combined with advanced graph analysis technologies such as graph convolutional networks, it can explore the potential patterns behind driving behavior and realize clustered warnings. The intuitive interpretability of the graph structure can also help identify key risk factors for different driver categories, providing a scientific basis for developing targeted driving intervention strategies and improving driving safety technologies, thereby promoting the further development of traffic safety research. Ordinary feature interactions can usually only handle simple linear relationships, while graph structure feature interactions can capture complex nonlinear relationships and interactions between multidimensional features. Through the graph structure, the complex relationship between the driver and the environment can be more intuitively represented, thereby improving prediction accuracy. Figure 2 The comparison between common feature interactions and graph structure feature interactions is shown. The graph structure can better reflect the complex interaction relationship between the driver and the environment.
[0096] The specific process is:
[0097] First, the various characteristics of the operating environment are represented in the form of digital vectors, and each node is encoded to form an embedded vector. The format of the input data required by the model is as follows:
[0098] (1) train_x: train_x[s][t] is the feature value of feature t of sample s in the data set. The feature value of categorical data defaults to 1.
[0099] (2) train_i: train_i[s][t] is the feature encoding of feature t of sample s in the dataset. The maximum value of train_i is the size of the feature set.
[0100] (3) train_y is the label of each sample in the dataset, where unsafe driving behavior is set to 1 and normal driving behavior is set to 0.
[0101] Subsequently, the K-fold cross-validation method is adopted to evaluate the generalization ability of the model. That is, the original data is divided into k subsets. Each time, k - 1 subsets are selected as the training set, and the remaining one subset is used as the validation set. This process is repeated k times, and finally, the average accuracy of the k evaluation results of the model is calculated. Figure 3 shows the process of K-fold cross-validation, where the original data is divided into k subsets. Each time, k - 1 subsets are selected as the training set, and the remaining one subset is used as the validation set. This process is repeated k times, and finally, the average accuracy of the k evaluation results of the model is calculated.
[0102] Finally, the generated embedding vectors are input, and the operating environment is abstracted as a feature map. Using the operating environment features as nodes and the interaction relationships between features as edges, an operating environment feature map is constructed.
[0103] (4) Based on the environment feature map obtained in step (3) and the operating environment feature interaction relationships, predict the probability of the driver having a distracted behavior.
[0104] The feature interaction graph neural network (Fi-GNN) method adopted in this method is an improvement based on the gated graph neural network GGNN. At the same time, the attention mechanism is used to learn the attention node weights, which are used to reflect the importance of a certain input feature to the final prediction score. Figure 4 shows the structure of the Fi-GNN model. Through the graph convolutional network and the attention mechanism, the model can dynamically adjust the model parameters and capture the interaction relationships between different features. The specific process is as follows:
[0105] (4.1) Input the operating environment feature map into the Fi-GNN model. The embedding vector e of feature i i is used as the initial state vector of the corresponding node n i , that is
[0106] (4.2) To reflect the importance of the interaction between different features, this method uses the attention mechanism to learn the weight w(n i , n j ) of the edge. After the initial state vector is processed by the Softmax function, the similarity score will be transformed into a probability distribution to obtain the attention distribution coefficient. Calculate the weighted average of the input information sequence, and then use the attention distribution coefficient to perform weighted summation on the original values, thereby constructing the adjacency matrix A[n j , n i ;
[0107] Figure 5 shows the working principle of the attention mechanism. The weights between features can be calculated through the Softmax function, so that more attention can be paid to the features that have a greater impact on distracted behavior during the prediction process.
[0108] (4.3) In the interaction step t, each node n i receives the status information from the surrounding nodes n j , assigns an output matrix to each surrounding node n j and an input matrix Then for the edge n →n j from node n i to node n j to node n i the transformation function, the adjacency matrix and the transformation function complete the aggregation of the node status information, and the calculation formula is:
[0109]
[0110] In the above formula, W w ∈R 2D is the weight matrix, || is the concatenation operation, A[n j ,n i is the weight of the edge from node n j to node n i , is the aggregated status information, b p is the bias term;
[0111] (4.4) After the aggregation is completed, according to the aggregated status information and the status of the previous interaction step update the state vector of node n i through GRU; as Figure 6 shown in the schematic diagram of the GRU transmission process. At the same time, to promote the reuse of low-order features and solve the problems of gradient disappearance and explosion, this method combines low-order and high-order interactions, introduces a residual connection to update the node state together with GRU, and the formula is:
[0112]
[0113] (4.5) After T interaction steps, the node status is obtained, and two multi-layer perceptrons MLP1 and MLP2 are used to estimate the prediction score i of node n and its attention weight a i , and the final prediction score is the sum of all nodes, and the formula is:
[0114]
[0115]
[0116] During the training process of this step, a grid search strategy is adopted to determine the optimal hyperparameters. The dimension of the feature embedding vector is set to 16, the batch size is 1024, the deep cross has four feed-forward layers, each layer consists of 100 hidden units, Relu is used as the activation function, and the Adam optimizer is used to solve the optimization parameters. The loss function adopted is the logarithmic loss, and the formula is:
[0117]
[0118] This method uses a graph structure to represent the operating environment. The graph structure can effectively process unstructured data (such as meteorology, traffic conditions, road grades, etc.). Through the design of nodes and edges, it can comprehensively reflect the complex interaction relationship between the driver and the environment. For different types of features such as continuous traffic volume values and enumerated road grades, corresponding representation methods can be found in the graph structure. The mutual relationship between different features is reflected through edges. Whether it is the association between features themselves or the relationship between each other, it can be clearly shown through the connection and attributes of the graph. This enables the complex operating environment features and their unstructured relationships to be uniformly and effectively described, providing a good foundation for subsequent analysis and processing.
[0119] In view of the fact that existing technologies mostly study the relationship between the operating environment and traffic risks from single-factor or two-factor perspectives, and rarely consider the complex relationship between the overall feature elements of the operating environment, traffic risks, and accidents. In the data collection stage of the present invention, GPS trajectory data and active safety alarm data covering various aspects such as time, longitude and latitude, speed, alarm information, and various unsafe driving behaviors are widely collected. During the extraction process of operating environment features, various factors such as road features, traffic conditions, meteorological information, and driver categories are comprehensively considered. In the risk identification link, these multi-faceted features are integrated to construct a feature graph. Through steps such as information aggregation and calculation of risk prediction scores, the complex relationship between various elements is fully considered, so as to more accurately reveal the complex connection between the overall feature elements of the operating environment, traffic risks, and accidents, providing a more comprehensive and accurate basis for traffic risk prevention and control.
Claims
1. A method for predicting distracted behavior of drivers of key commercial vehicles based on road operating environment, characterized in that, This method includes the following steps: (1) Collect data and preprocess the data; (2) Extract trajectory data and active safety alarm data from the preprocessed data; (3) Based on the trajectory data and active safety alarm data obtained in step (2), construct a running environment feature map; (4) Based on the environment feature map obtained in step (3), the interaction relationship of the running environment features, predict the probability of the driver's distracted behavior.
2. The method for predicting distracted behaviors of key commercial vehicle drivers based on roads and operating environments according to claim 1, wherein In step (1), the collected data includes trajectory data and active safety alarm data; The trajectory data includes time, longitude and latitude, speed, status, alarm bit status, and additional information; The active safety alarm data includes an alarm point trajectory file and dynamic video monitoring content, and the content includes the time, longitude and latitude, vehicle speed, in-vehicle condition, driver's facial expression, road condition, and surrounding vehicle running condition of each alarm point.
3. The method for predicting distracted driving behavior of key commercial vehicle drivers based on road and operating environment according to claim 1, wherein In step (1), the preprocessing process includes: (1.1) For the phenomenon that the data existence history data does not match the preset and the driving mileage data should not match the speed, longitude and latitude data and the preset, mark and segment, mark and clean them respectively; (1.2) Use the Haversine formula to calculate the spherical distance between two adjacent trajectory points to eliminate the longitude and latitude drift phenomenon in the trajectory data: In the above formula, d is the spherical distance between two adjacent trajectory points, r is the radius of the earth, lon i , lat i are the longitude and latitude of trajectory point i respectively, lon i+1 , lat i+1 are the longitude and latitude of trajectory point i + 1 respectively; If the spherical distance between trajectory points > the maximum distance that can be traveled, it is determined that there is a drift point, otherwise there is no drift point; The maximum distance is the distance traveled by the vehicle at the maximum speed; (1.3) Match each alarm point with the trajectory point with the closest time interval, and eliminate false alarm data by observing the monitoring video.
4. The method for predicting distracted behaviors of key commercial vehicle drivers based on roads and operating environments according to claim 1, wherein In step (2), the process of feature extraction is as follows: (2.1) Road POI information acquisition: Through the reverse geocoding function of the map service, obtain the road information, road intersection information, and POI information of the trajectory point location; (2.2) Traffic condition acquisition: Obtain the real-time traffic condition by using one of the following two methods according to the actual data situation; (2.2.1) Real-time traffic condition query based on the map service: Through the real-time traffic condition query function of the map service, obtain the real-time congestion situation and congestion trend of the specified road, and describe the traffic condition by grading; (2.2.2) Traffic flow analysis based on video recognition: Obtain traffic flow information through video recognition technology, combine vehicle number, vehicle type, and lane number data, calculate the highway service level density, and divide the traffic condition into different grades. The calculation formula of the highway service level density is: In the above formula, H represents hours, LN represents lanes, Pcu, that is, Passenger Car Unit, represents the standard vehicle equivalent number; D represents the highway service level density, and the unit is pcu / h / ln; (2.3) Weather condition acquisition: Use the data crawling method to obtain the meteorological information of each district / county / prefecture-level city where the trajectory points are located, including: (2.3.1) Data crawling: According to the time and location information of the trajectory points, access the weather website to obtain meteorological data; (2.3.2) Data matching: Match the obtained meteorological data with the trajectory point data; (2.3.3) Weather Classification: Define moderate rain, snow, fog, and haze as bad weather, and the rest as non-bad weather; (2.4) Driver Category Labels: Define the labels for each type of driver; (2.5) Obtaining Driving Behavior Labels: The police situation data labels are obtained from the alarm event codes. The normal driving behavior labels are obtained by matching the original trajectory data and the police situation data according to the timestamp. The trajectory data within 300m of the police situation occurrence is removed from the original trajectory, and the remaining data is randomly selected at a 1:1 ratio with the police situation data as the normal driving data.
5. The method for predicting distracted driving behavior of key commercial vehicle drivers based on road and operating environment according to claim 4, characterized in that In step (4), the process of predicting the probability of a driver's distraction behavior through the interaction relationship of the operating environment characteristics is as follows: (4.1) Input the running environment feature map into the Fi-GNN model, and the embedding vector e of feature i i serves as the initial state vector of the corresponding node n i , that is (4.2) Learn the edge weight w(n i ,n j ) through the attention mechanism. After processing the initial state vector through the Softmax function, the similarity score will be transformed into a probability distribution to obtain the attention distribution coefficient. Calculate the weighted average of the input information sequence, and then use the attention distribution coefficient to perform a weighted sum on the original values, thereby constructing the adjacency matrix A[n j ,n i ; (4.3) In interaction step t, each node n i receives status information from neighboring nodes n j and assigns an output matrix j and an input matrix to each neighboring node n Then for edge n j →n i the transformation function from node n j to node n i and the adjacency matrix complete the aggregation of node status information. The calculation formula is as follows: In the above formula, W w ∈ R 2D is the weight matrix, || is the concatenation operation, A[n j , n i is the weight of the edge from node n j to node n i , and is the aggregated state information, and b p is the bias term; (4.4) After the aggregation is completed, according to the status information of the aggregation and the status of the previous interaction step update the state vector of node n through GRU i ; Combine low-order and high-order interactions, introduce residual connections to update the node state together with GRU, and the formula is: After T interaction steps, the node state is obtained Two multi-layer perceptrons MLP1 and MLP2 are respectively used to estimate node n i 's predicted score and its attention weight a i The final predicted score is the sum of all nodes, and the formula is: During the training process of this step, a grid search strategy is used to determine the optimal hyperparameters. Set the dimension of the feature embedding vector to 16, the batch size to 1024, the deep cross has four feedforward layers, each layer has 100 hidden units, use Relu as the activation function, and use the Adam optimizer to solve the optimization parameters. The loss function used is the logarithmic loss, and the formula is: