A lightweight method for analyzing online driving behavior based on multi-source feature extraction
By employing a lightweight network-based driving behavior analysis method with multi-feature extraction, utilizing conditional random fields and lightweight networks, the method addresses the issues of lag and redundancy in existing driving behavior analysis techniques, achieving real-time and accurate assessment of driving behavior.
Patent Information
- Application Number
- CN202210589776.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-05-26
AI Technical Summary
Existing driving behavior analysis methods rely on low-level characteristics and lack consideration of external influencing factors, resulting in delayed behavior analysis and inability to conduct real-time assessments. Furthermore, existing models are complex and redundant, making it difficult to achieve accurate ratings in a short period of time.
A lightweight network-based driving behavior analysis method based on multi-feature extraction is adopted. Conditional random fields are used to predict the probability of vehicle lane changes, and a lightweight network is used for feature fusion. Through radar data preprocessing, time series analysis, and implicit spatial trajectory entropy correlation, a rating of driving behavior is achieved.
It enables real-time and accurate assessment of driving behavior, reduces the influence of human factors, improves the efficiency and accuracy of rating, and is suitable for complex and ever-changing urban road network environments.
Smart Images

Figure CN115204252B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of urban travel behavior analysis, and in particular to a lightweight online driving behavior analysis method based on multi-source feature extraction. Background Technology
[0002] With the continuous increase in the number of private cars per capita in cities, the driving risks for drivers are also increasing. Especially in the complex and ever-changing urban road network environment, traffic problems caused by improper driver behavior occur one after another. Therefore, assessing driving behavior is one of the solutions to avoid future traffic risks. It provides a basis for management decisions for traffic departments and reduces potential risks and hazards. Driving behavior analysis refers to extracting driver operational behavior characteristic data from massive amounts of driver trip data, such as vehicle instantaneous speed and acceleration, and using a calculation model to integrate vehicle physical characteristic information to ultimately evaluate the driver's driving style system, that is, the stable state rating of vehicle operation behavior.
[0003] However, rating the stable state of vehicle driving behavior is not easy: existing methods based on on-site surveys are simple and easy to operate, but they are too influenced by subjective human factors, resulting in a lack of objectivity in the results. Secondly, existing driving behavior analyses focus on the entire road and cannot capture the impact of vehicles between lanes, thus failing to provide accurate behavior ratings. Finally, many current driving behavior analysis models use feature labels as the main reference, extracting driving features from massive amounts of driving data, including driver physical and mental data, and driver operation data such as brake pedal pressure and engine speed. This makes it difficult to acquire, process, and use this type of data, and it has high data sensitivity, resulting in many input parameters, complex and redundant models, making it difficult to perform behavior rating analysis in a short time and failing to meet real-time evaluation requirements.
[0004] To address the aforementioned shortcomings, this method employs a lightweight network based on multi-feature extraction for driving behavior analysis, enabling the rating of driving behavior based on trajectories. First, conditional random fields are used to predict the vehicle's lane-change frequency, serving as features representing external influences such as physical constraints and lane interference. Second, the vehicle's lane position, speed, physical information, and lane traffic conditions are extracted to obtain the weights for each feature. Finally, a lightweight network is used for feature fusion to achieve the goal of driving behavior analysis and rating. Summary of the Invention
[0005] Existing driving behavior analysis methods rely solely on low-level motion characteristics, lacking consideration of external influencing factors and exhibiting incompatibility with real-time assessment, leading to lag in behavior analysis. This invention proposes a lightweight network-based driving behavior analysis method based on multi-feature extraction, further analyzing human factors in the identified trajectories. First, a conditional random field model is used, taking the vehicle's current lane and future lane-changing scenarios as priors to predict the vehicle's lane-changing probability, thus providing reliable feature support for lane-level driving behavior analysis. Second, a lightweight network is used to extract multiple features and classify different driving behavior ratings.
[0006] The present invention achieves the above-mentioned objective through the following technical solution: a lightweight online driving behavior analysis method based on multi-source feature extraction, comprising the following steps:
[0007] S1: Preprocess the raw radar data;
[0008] S2: Perform lane change probability prediction based on the data described in S1 using conditional random fields;
[0009] S3: Perform time-series-based analysis and judgment on the data described in S1 and S2;
[0010] S4: Perform implicit spatial trajectory entropy correlation analysis on the data described in S1 and S2;
[0011] S5: A comprehensive evaluation of the results of S3 and S4 is conducted to rate the driving behavior on the trajectory.
[0012] S1 specifically includes the following steps:
[0013] S1.1: Convert radar location data by approximately converting the location data obtained by the sensor into geographic coordinates in the same coordinate system. The calculation formula is shown in equation (1) below:
[0014]
[0015] S1.2: Cleaning and optimizing location trajectory data, such as smoothing the position and heading angle of all trajectory points, removing outliers, and setting non-motorized vehicle shielding areas.
[0016] S2 specifically includes the following steps:
[0017] S2.1: Since Conditional Random Fields (CRFs) require the output random variables to form a Markov Random Field, it is necessary to construct the lane trajectory as a probabilistic undirected graphical model, i.e., a joint probability distribution represented by an undirected graph. Urban lanes and graphical models share a high degree of similarity; vehicle trajectory points in the lane can serve as nodes in the graphical model, while edges represent the probability of vehicles changing lanes within the lane. This invention primarily focuses on predicting the probability of vehicle lane changes from the perspective of a graphical model. The key points of model construction are as follows:
[0018] 1) The undirected graph model of the road network lanes can be represented as G = (V, E), where G represents an undirected graph, and V and E represent the sets of nodes and edges, respectively. Specifically, V is the set of points for a single trajectory in a timestamp sequence, V = {v1, v2, ..., v...} n E is the set of lines connecting trajectory points, while the graph is a set of these nodes and the edges connecting the nodes. In a lane, it reflects the changes and transmission of vehicle trajectory points between lanes.
[0019] 2) Let v∈V be any node in an undirected graph G, W be all nodes connected to v by edges, O be all nodes other than v and W, and v represent the random variable Y. V W represents the set of random variables Y W O represents the set of random variables Y O Local Markov property refers to the property that, given a set of random variables Y, the local Markov property is... W Under the condition that the random variable Y V With random variable set Y O It is independent, as shown in equation (2) below:
[0020] P(Y V ,Y O |Y W )=P(Y V |Y W )P(Y O |Y W (2)
[0021] S2.2: After constructing the Conditional Random Field (CRF), the linear-chain CRF algorithm also needs to be implemented. A linear-chain CRF is a Markov random field of random variable Y given a random variable X. That is, given the current lane is x, it calculates the probability that a vehicle will change lanes to y in the future. For a specific vehicle, given the current variable X = (X1, X2, ..., X...),... n The conditional probability distribution P(Y|X) of the random variable sequence Y constitutes a linear chain conditional random field, as shown in equation (3):
[0022] P(Y i |X,Y1,…,Y i-1 ,Y i+1,…,Y n )=P(Y i |X,Y i-1 ,Y i+1 (3)
[0023] Based on this, given that the current lane is x, the conditional probability of the future lane being y is calculated as shown in equation (4):
[0024]
[0025] Where, β k For transition features, it indicates whether this node possesses a certain attribute, i.e., whether it is in a certain lane; θ l For state features, it indicates whether two states will transition due to a certain feature, i.e., whether the vehicle will change lanes based on its previous lane position; α k and λ l They are β k and θ l The corresponding weights, Z(x), are normalization factors. Conditional random fields are completely determined by the characteristic function β. k and θ l The corresponding weights are determined. Since the features in a Conditional Random Field (CRF) are defined at each location, the same feature can be summed to transform the local feature function into a global feature function. This allows the CRF to be written as the inner product of the weight vector and the feature vector, i.e., a simplified form of the CRF. The specific process is as follows:
[0026] S2.2.1: The transition features and state features and their weights are represented by a unified symbol. There are K1 transition features and K2 state features. The calculation formula is shown in the following formula (5):
[0027]
[0028] S2.2.2: Sum the transition and state features at each position i, and the calculation formula is shown in the following formula (6):
[0029]
[0030] S2.2.3: Use w k Representing feature f k The weights of (y,x) are given by w, which represents the weight vector. F(y,x) represents the global feature vector. The calculation formula is shown in equation (7) below:
[0031]
[0032] Therefore, a linear chain conditional random field can be written as the inner product of w and F(y,x), and the calculation formula is shown in equation (8) below:
[0033]
[0034] S2.2.4: When calculating probabilities, the linear chain conditional random field uses a forward-backward algorithm. For each index i = 0, 1, ..., n+1, a forward vector ξ is defined. i The calculation formula is shown in equation (9) below:
[0035]
[0036] Where, ξ i (y i |x) indicates that the label at position i is y. i And the unprogrammed probability of the first half of the labeled sequence up to position i, since y i There are m possible values for ξ, so i (x) is an m-dimensional column vector.
[0037] S2.2.5: Similarly, for each index i = 0, 1, ..., n+1, define the backward vector ψ i (x), the calculation formula is shown in equation (10) below:
[0038] ψ i (x)=M i+1 (x)ψ i+1 (x) (10)
[0039] S2.2.6: Z(x) can be easily obtained from the definition of forward-backward vectors, and the calculation formula is shown in the following formula (11):
[0040]
[0041] Among them, M i The formula for calculating (x) is shown in equation (12) below:
[0042]
[0043] S2.2.7: For a given input sequence x, find the output sequence y with the highest conditional probability using the trained conditional random field model. * The probability of lane change can be labeled for the observed behavior, and the calculation formula is shown in the following formula (13):
[0044]
[0045] S3 specifically includes the following steps:
[0046] S3.1: A vehicle trajectory time series data is a series of observations collected at equal time intervals by vehicle equipment and roadside units, processed jointly. This data can be used... It means that among them It refers to the vehicle i data observed by the device at time index t, where T is the time index value. i This represents the maximum time index value of the trajectory. Similarly, all vehicle trajectories can be represented by X = {X...} 1 ,X 2 ,…,X N This indicates that there are N trajectories in total. It's important to note that the maximum time index value T for different vehicles... i They may be different.
[0047] S3.2: For the input of the Long Short-Term Memory (LSTM) network, this invention divides the time-series data of the trajectory into frames according to time slices. For each trajectory, generate a hidden vector with an initial value of 0. and Where i represents the trajectory corresponding to the hidden vector, and t represents the time index value of the trajectory corresponding to the hidden vector. During the initialization phase, t = 0, and when t = T... i The time indicates that the hidden vector is the result of the last time slice. In the following description of the LSTM process, for ease of understanding, the selected trajectory sequence data is arbitrary, that is, the specific trajectory index i is no longer labeled.
[0048] At each time index value t, x t and the corresponding h of the previous time. t-1 and c t-1 Together they are used as input parameters for LSTM, and the relevant formulas are shown in equations (14)-(17) below:
[0049] i t =σ(W i ·[h t-1 ,x t ]+b i (14)
[0050] f t =σ(W f ·[h t-1 ,x t ]+b f (15)
[0051]
[0052] o t =σ(W o ·[h t-1 ,x t ]+b o (17)
[0053] Among them, i tThe input gate value at time index t determines the information to be stored in the current cell state; f t This represents the forgetting threshold, which determines the information to be lost in the current cell state; It is a candidate vector that will be added to the state of the current unit; o t This represents the output gate value, which determines the information to be output in the current cell state. σ(·) represents the Sigmoid function. Additionally, W and b in the formula represent the weight and offset values, respectively, where W... i [h t-1 ,x t ]+b i It can be broken down into W ih h t-1 +W ix x t +b i Similarly, other weight values can also be split.
[0054] S3.4: The output of each layer of the Long Short-Term Memory (LSTM) network can be calculated by further processing the results obtained from the above formula:
[0055]
[0056] h t =o t *tanh(c t (19)
[0057] After T rounds of calculations, all time data of the trajectory were processed, and the final result h was obtained. T Then, a fully connected layer FC(·) is used to resolve it to output O∈R. 3 This indicates that the output contains three sets of values. Further processing of O using the Softmax(·) method yields the final prediction result p∈R. 3 The relevant formula is shown in equation (20) below:
[0058]
[0059] Where, p c This represents the predicted probability that the current trajectory belongs to category c in dimension, O. c This indicates the output value in dimension c. In this case, the index of the highest value in p represents the index of the final result, indicating the three states: abnormal, suspicious, and normal.
[0060] S3.5: Regarding the loss function of the neural network, when training the LSTM neural network, considering that the trajectories of normal behavior are far more numerous than the trajectories of suspicious and abnormal behavior in driving behavior, this invention uses the cross-entropy loss function as the loss function of the neural network, and the relevant formula is shown in the following formula (21):
[0061]
[0062] Where M represents the number of categories, and in this invention, its value is set to 3. This represents the true label of trajectory i, which is 1 when the true category of trajectory i is equal to dimension c, and 0 otherwise. This represents the predicted probability that trajectory i belongs to category c in dimension.
[0063] S4 specifically includes the following steps:
[0064] S4.1: For spatial trajectory entropy, for a specific trajectory, it is not only related to the amount of trajectory data statistically obtained by traditional methods, but also to the trajectory change pattern and the number of trajectory clusters. The higher the similarity between it and all trajectories in the spatial lane, the smaller the implicit influence between trajectories and the lower the spatial trajectory entropy. The greater the difference in trajectory structure in space, the more disordered the trajectories are and the higher the spatial trajectory entropy.
[0065] S4.2: Similarity distance ratio of spatial trajectory entropy: where p(t i ,t j ) represents the trajectory t i With each cluster center t j The similarity distance ratio, t j Dist(t) represents the cluster center trajectory. i ,t j ) represents the trajectory t i With cluster center t j The similarity distance. n represents the number of cluster center trajectories. Represents the trajectory t i With each cluster center t k The sum of distances is given by the following formula (22):
[0066]
[0067] S4.3: For a single trajectory t i The trajectory entropy, using H(t) i The trajectory entropy here is the degree of influence between the trajectory and other types of trajectories, and its specific formula is shown in the following formula (23):
[0068]
[0069] S5 specifically includes the following steps:
[0070] S5.1: Behavioral analysis generally refers to the refined classification of perception ability and response skills. Measurable indicators of perception ability include the response time and accuracy of real-time strategies, while also requiring qualitative analysis of the driver's driving style and personality. Measurable indicators of response skills are the sum of vehicle control indicators, including the driver's speed control, direction control, distance control, etc.
[0071] S5.2: Regarding driving behavior rating, this invention focuses on ensuring lane driving safety by conducting a rating analysis of the driver's overall operation and driving behavior, emphasizing vehicle control indicators in the evaluation. Vehicle control indicators are refined data representations of driving operations and vehicle operating status, such as speed, acceleration, steering angle, lane change frequency, headway, and distance between vehicles, primarily describing changes in operation during the driving process. Based on the main causes of driving behavior, driving behavior can be rated into the following three categories:
[0072] 1) Impulsive Driving Behavior: Commonly known as aggressive driving, this is driving behavior driven by a psychological state akin to "road rage." Specifically, it manifests as a surge in driving stress due to external factors such as traffic congestion, leading to impulsive emotions and the deliberate use of unsafe or threatening driving methods, or actions that endanger other road users. This is an extremely dangerous driving behavior. This invention addresses situations where a vehicle's speed exceeds 60 km / h and its acceleration exceeds 2.5 m / s². 2 Impulsive driving is defined as driving a vehicle that changes lanes 3 or more times within a road segment; has a lane change probability greater than 60%; and exhibits poor stress resistance and engages in sudden braking or acceleration 3 or more times within a road segment in congested conditions.
[0073] 2) Stable Driving Behavior: Stable driving behavior refers to the driver strictly adhering to the driving parameters explicitly stipulated in road traffic safety laws and regulations, and strictly avoiding improper actions. It involves ensuring safe driving based on the driver's own driving conditions, vehicle condition, and the actual traffic capacity of the lane. This invention specifies that the vehicle speed should be between 25 km / h and 60 km / h, and the vehicle's acceleration should be between 2.5 m / s². 2 The following behaviors, including vehicles changing lanes less than or equal to 2 times within a road segment, with a lane change probability between 30% and 60%; and exhibiting average resilience in congested environments, with less than or equal to 2 instances of sudden braking or acceleration within a road segment, are classified as smooth driving.
[0074] 3) Conservative Driving Behavior: Commonly known as defensive driving, this is a driving technique and strategy that anticipates and avoids impending dangers. By actively reducing speed and maintaining lane position, it allows for a more comprehensive observation and understanding of the driving environment, a fuller perception and prediction of potential situations, and a more accurate forecasting of uncertain potential hazards. This enables proactive measures to avoid accidents caused by other vehicles' errors or objective environmental factors. This invention applies to vehicles traveling at speeds below 25 km / h and with accelerations below 2.5 m / s². 2 The following behaviors, including vehicles not changing lanes within a road segment (with a lane-changing probability of less than 30%), exhibiting good resilience in congested conditions, and maintaining a near-constant speed within the road segment, are categorized as conservative driving. Attached Figure Description
[0075] Figure 1 This is a flowchart of a driving behavior analysis method based on lightweight networks. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below.
[0077] This invention proposes a lightweight online driving behavior analysis method based on multi-feature extraction, which further analyzes human factors in the identified trajectories. The flowchart of this invention is shown below. Figure 1 As shown, the method includes:
[0078] S1: Preprocess the raw radar data, the steps are as follows:
[0079] S1.1: Convert radar location data by approximately converting the location data obtained by the sensor into geographic coordinates in the same coordinate system. The calculation formula is shown in equation (1) below:
[0080]
[0081] S1.2: Cleaning and optimizing location trajectory data, such as smoothing the position and heading angle of all trajectory points, removing outliers, and setting non-motorized vehicle shielding areas.
[0082] S2: Perform lane change probability prediction based on conditional random fields on the data mentioned in S1, as follows:
[0083] S2.1: Since Conditional Random Fields (CRFs) require the output random variables to form a Markov Random Field, it is necessary to construct the lane trajectory as a probabilistic undirected graphical model, i.e., a joint probability distribution represented by an undirected graph. Urban lanes and graphical models share a high degree of similarity; vehicle trajectory points in the lane can serve as nodes in the graphical model, while edges represent the probability of vehicles changing lanes within the lane. This invention primarily focuses on predicting the probability of vehicle lane changes from the perspective of a graphical model. The key points of model construction are as follows:
[0084] 1) The undirected graph model of the road network lanes can be represented as G = (V, E), where G represents an undirected graph, and V and E represent the sets of nodes and edges, respectively. Specifically, V is the set of points for a single trajectory in a timestamp sequence, V = {v1, v2, ..., v...} n E is the set of lines connecting trajectory points, while the graph is a set of these nodes and the edges connecting the nodes. In a lane, it reflects the changes and transmission of vehicle trajectory points between lanes.
[0085] 2) Let v∈V be any node in an undirected graph G, W be all nodes connected to v by edges, O be all nodes other than v and W, and v represent the random variable Y. V W represents the set of random variables Y W O represents the set of random variables Y O Local Markov property refers to the property that, given a set of random variables Y, the local Markov property is... W Under the condition that the random variable Y V With random variable set Y O It is independent, as shown in equation (2) below:
[0086] P(Y V ,Y O |Y W )=P(Y V |Y W )P(Y O |Y W (2)
[0087] S2.2: After constructing the Conditional Random Field (CRF), the linear-chain CRF algorithm also needs to be implemented. A linear-chain CRF is a Markov random field of random variable Y given a random variable X. That is, given the current lane is x, it calculates the probability that a vehicle will change lanes to y in the future. For a specific vehicle, given the current variable X = (X1, X2, ..., X...),... n The conditional probability distribution P(Y|X) of the random variable sequence Y constitutes a linear chain conditional random field, as shown in equation (3):
[0088] P(Y i |X,Y1,…,Y i-1 ,Y i+1,…,Y n )=P(Y i |X,Y i-1 ,Y i+1 (3)
[0089] Based on this, given that the current lane is x, the conditional probability of the future lane being y is calculated as shown in equation (4):
[0090]
[0091] Where, β k For transition features, it indicates whether this node possesses a certain attribute, i.e., whether it is in a certain lane; θ l For state features, it indicates whether two states will transition due to a certain feature, i.e., whether the vehicle will change lanes based on its previous lane position; α k and λ l They are β k and θ l The corresponding weights, Z(x), are normalization factors. Conditional random fields are completely determined by the characteristic function β. k and θ l The corresponding weights are determined. Since the features in a Conditional Random Field (CRF) are defined at each location, the same feature can be summed to transform the local feature function into a global feature function. This allows the CRF to be written as the inner product of the weight vector and the feature vector, i.e., a simplified form of the CRF. The specific process is as follows:
[0092] S2.2.1: The transition features and state features and their weights are represented by a unified symbol. There are K1 transition features and K2 state features. The calculation formula is shown in the following formula (5):
[0093]
[0094] S2.2.2: Sum the transition and state features at each position i, and the calculation formula is shown in the following formula (6):
[0095]
[0096] S2.2.3: Use w k Representing feature f k The weights of (y,x) are given by w, which represents the weight vector. F(y,x) represents the global feature vector. The calculation formula is shown in equation (7) below:
[0097]
[0098] Therefore, a linear chain conditional random field can be written as the inner product of w and F(y,x), and the calculation formula is shown in equation (8) below:
[0099]
[0100] S2.2.4: When calculating probabilities, the linear chain conditional random field uses a forward-backward algorithm. For each index i = 0, 1, ..., n+1, a forward vector ξ is defined. i The calculation formula is shown in equation (9) below:
[0101]
[0102] Where, ξ i (y i |x) indicates that the label at position i is y. i And the unprogrammed probability of the first half of the labeled sequence up to position i, since y i There are m possible values for ξ, so i (x) is an m-dimensional column vector.
[0103] S2.2.5: Similarly, for each index i = 0, 1, ..., n+1, define the backward vector ψ i (x), the calculation formula is shown in equation (10) below:
[0104] ψ i (x)=M i+1 (x)ψ i+1 (x) (10)
[0105] S2.2.6: Z(x) can be easily obtained from the definition of forward-backward vectors, and the calculation formula is shown in the following formula (11):
[0106]
[0107] Among them, M i The formula for calculating (x) is shown in equation (12) below:
[0108]
[0109] S2.2.7: For a given input sequence x, find the output sequence y with the highest conditional probability using the trained conditional random field model. * The probability of lane change can be labeled for the observed behavior, and the calculation formula is shown in the following formula (13):
[0110]
[0111] S3: Perform time-series-based analysis and discrimination on the data described in S1 and S2, as follows:
[0112] S3.1: A vehicle trajectory time series data is a series of observations collected at equal time intervals by vehicle equipment and roadside units, processed jointly. This data can be used... It means that among them It refers to the vehicle i data observed by the device at time index t, where T is the time index value. i This represents the maximum time index value of the trajectory. Similarly, all vehicle trajectories can be represented by X = {X...} 1 ,X 2 ,…,X N This indicates that there are N trajectories in total. It's important to note that the maximum time index value T for different vehicles... i They may be different.
[0113] S3.2: For the input of the Long Short-Term Memory (LSTM) network, this invention divides the time-series data of the trajectory into frames according to time slices. For each trajectory, generate a hidden vector with an initial value of 0. and Where i represents the trajectory corresponding to the hidden vector, and t represents the time index value of the trajectory corresponding to the hidden vector. During the initialization phase, t = 0, and when t = T... i The time indicates that the hidden vector is the result of the last time slice. In the following description of the LSTM process, for ease of understanding, the selected trajectory sequence data is arbitrary, that is, the specific trajectory index i is no longer labeled.
[0114] At each time index value t, x t and the corresponding h of the previous time. t-1 and c t-1 Together they are used as input parameters for LSTM, and the relevant formulas are shown in equations (14)-(17) below:
[0115] i t =σ(W i ·[h t-1 ,x t ]+b i (14)
[0116] f t =σ(W f ·[h t-1 ,x t ]+b f (15)
[0117]
[0118] o t =σ(W o ·[h t-1 ,x t ]+bo (17)
[0119] Among them, i t The input gate value at time index t determines the information to be stored in the current cell state; f t This represents the forgetting threshold, which determines the information to be lost in the current cell state; It is a candidate vector that will be added to the state of the current unit; o t This represents the output gate value, which determines the information to be output in the current cell state. σ(·) represents the Sigmoid function. Additionally, W and b in the formula represent the weight and offset values, respectively, where W... i [h t-1 ,x t ]+b i It can be broken down into W ih h t-1 +W ix x t +b i Similarly, other weight values can also be split.
[0120] S3.4: The output of each layer of the Long Short-Term Memory (LSTM) network can be calculated by further processing the results obtained from the above formula:
[0121]
[0122] h t =o t *tanh(c t (19)
[0123] After T rounds of calculations, all time data of the trajectory were processed, and the final result h was obtained. T Then, a fully connected layer FC(·) is used to resolve it to output O∈R. 3 This indicates that the output contains three sets of values. Further processing of O using the Softmax(·) method yields the final prediction result p∈R. 3 The relevant formula is shown in equation (20) below:
[0124]
[0125] Where, p c This represents the predicted probability that the current trajectory belongs to category c in dimension, O. c This indicates the output value in dimension c. In this case, the index of the highest value in p represents the index of the final result, indicating the three states: abnormal, suspicious, and normal.
[0126] S3.5: Regarding the loss function of the neural network, when training the LSTM neural network, considering that the trajectories of normal behavior are far more numerous than the trajectories of suspicious and abnormal behavior in driving behavior, this invention uses the cross-entropy loss function as the loss function of the neural network, and the relevant formula is shown in the following formula (21):
[0127]
[0128] Where M represents the number of categories, and in this invention, its value is set to 3. This represents the true label of trajectory i, which is 1 when the true category of trajectory i is equal to dimension c, and 0 otherwise. This represents the predicted probability that trajectory i belongs to category c in dimension.
[0129] S4: Perform implicit spatial trajectory entropy-based correlation analysis on the data described in S1 and S2, as follows:
[0130] S4.1: For spatial trajectory entropy, for a specific trajectory, it is not only related to the amount of trajectory data statistically obtained by traditional methods, but also to the trajectory change pattern and the number of trajectory clusters. The higher the similarity between it and all trajectories in the spatial lane, the smaller the implicit influence between trajectories and the lower the spatial trajectory entropy. The greater the difference in trajectory structure in space, the more disordered the trajectories are and the higher the spatial trajectory entropy.
[0131] S4.2: Similarity distance ratio of spatial trajectory entropy: where p(t i ,t j ) represents the trajectory t i With each cluster center t j The similarity distance ratio, t j Dist(t) represents the cluster center trajectory. i ,t j ) represents the trajectory t i With cluster center t j The similarity distance. n represents the number of cluster center trajectories. Represents the trajectory t i With each cluster center t k The sum of distances is given by the following formula (22):
[0132]
[0133] S4.3: For a single trajectory t i The trajectory entropy, using H(t) i The trajectory entropy here is the degree of influence between the trajectory and other types of trajectories, and its specific formula is shown in the following formula (23):
[0134]
[0135] S5: A comprehensive evaluation of the results from S3 and S4 is conducted to rate the driving behavior along the trajectory. The steps are as follows:
[0136] S5.1: Behavioral analysis generally refers to the refined classification of perception ability and response skills. Measurable indicators of perception ability include the response time and accuracy of real-time strategies, while also requiring qualitative analysis of the driver's driving style and personality. Measurable indicators of response skills are the sum of vehicle control indicators, including the driver's speed control, direction control, distance control, etc.
[0137] S5.2: Regarding driving behavior rating, this invention focuses on ensuring lane driving safety by conducting a rating analysis of the driver's overall operation and driving behavior, emphasizing vehicle control indicators in the evaluation. Vehicle control indicators are refined data representations of driving operations and vehicle operating status, such as speed, acceleration, steering angle, lane change frequency, headway, and distance between vehicles, primarily describing changes in operation during the driving process. Based on the main causes of driving behavior, driving behavior can be rated into the following three categories:
[0138] 1) Impulsive Driving Behavior: Commonly known as aggressive driving, this is driving behavior driven by a psychological state akin to "road rage." Specifically, it manifests as a surge in driving stress due to external factors such as traffic congestion, leading to impulsive emotions and the deliberate use of unsafe or threatening driving methods, or actions that endanger other road users. This is an extremely dangerous driving behavior. This invention addresses situations where a vehicle's speed exceeds 60 km / h and its acceleration exceeds 2.5 m / s². 2 Impulsive driving is defined as driving a vehicle that changes lanes 3 or more times within a road segment; has a lane change probability greater than 60%; and exhibits poor stress resistance and engages in sudden braking or acceleration 3 or more times within a road segment in congested conditions.
[0139] 2) Stable Driving Behavior: Stable driving behavior refers to the driver strictly adhering to the driving parameters explicitly stipulated in road traffic safety laws and regulations, and strictly avoiding improper actions. It involves ensuring safe driving based on the driver's own driving conditions, vehicle condition, and the actual traffic capacity of the lane. This invention specifies that the vehicle speed should be between 25 km / h and 60 km / h, and the vehicle's acceleration should be between 2.5 m / s². 2 The following behaviors, including vehicles changing lanes less than or equal to 2 times within a road segment, with a lane change probability between 30% and 60%; and exhibiting average resilience in congested environments, with less than or equal to 2 instances of sudden braking or acceleration within a road segment, are classified as smooth driving.
[0140] 3) Conservative Driving Behavior: Commonly known as defensive driving, this is a driving technique and strategy that anticipates and avoids impending dangers. By actively reducing speed and maintaining lane position, it allows for a more comprehensive observation and understanding of the driving environment, a fuller perception and prediction of potential situations, and a more accurate forecasting of uncertain potential hazards. This enables proactive measures to avoid accidents caused by other vehicles' errors or objective environmental factors. This invention applies to vehicles traveling at speeds below 25 km / h and with accelerations below 2.5 m / s². 2 The following behaviors, including vehicles not changing lanes within a road segment (with a lane-changing probability of less than 30%), exhibiting good resilience in congested conditions, and maintaining a near-constant speed within the road segment, are categorized as conservative driving.
Claims
1. A lightweight online driving behavior analysis method based on multi-source feature extraction, characterized in that, Includes the following steps: S1: Preprocess the raw radar data; S2: Perform lane change probability prediction based on conditional random fields on the data described in step S1; S3: Perform time-series-based analysis and judgment on the data described in steps S1 and S2; S4: Perform implicit spatial trajectory entropy-based correlation analysis on the data described in steps S1 and S2; specifically including: S4.1: For spatial trajectory entropy, the higher its similarity with all trajectories in the spatial lane, the smaller the implicit influence between trajectories, and the lower the spatial trajectory entropy; the greater the difference in trajectory structure in space, the more disordered the trajectories are, and the higher the spatial trajectory entropy. S4.2: The similarity distance ratio for spatial trajectory entropy, where p(t) i ,t j ) represents the trajectory t i With each cluster center t j The similarity distance ratio, t j Dist(t) represents the cluster center trajectory. i ,t j ) represents the trajectory t i With cluster center t j The similarity distance; n represents the number of cluster center trajectories. Represents the trajectory t i With each cluster center t k The sum of distances is given by the following formula (22): S4.3: For a single trajectory t i The trajectory entropy, using H(t) i The trajectory entropy here is the degree of influence between the trajectory and other types of trajectories, and its specific formula is shown in the following formula (23): S5: Conduct a comprehensive evaluation of the results of steps S3 and S4, and rate the driving behavior of the trajectory.
2. The lightweight online driving behavior analysis method based on multi-source feature extraction as described in claim 1, characterized in that: Step S1 includes the following steps: S1.1: Convert radar location data by approximately converting the location data obtained by the sensor into geographic coordinates in the same coordinate system. The calculation formula is shown in equation (1) below: S1.2: Cleaning and optimizing location trajectory data, such as smoothing the position and heading angle of all trajectory points, removing outliers, and setting up non-motorized vehicle shielding areas.
3. The lightweight online driving behavior analysis method based on multi-source feature extraction as described in claim 1, characterized in that: Step S2 includes the following steps: S2.1: Construct a probabilistic undirected graph model, where the undirected graph model of the road network lanes is represented as G = (V, E), where G represents an undirected graph, and V and E represent the sets of nodes and edges, respectively; let v ∈ V be any node in the undirected graph G, W be all nodes connected to v by edges, O be all other nodes besides v and W, and v represent the random variable Y. V W represents the set of random variables Y W O represents the set of random variables Y O Local Markov property refers to the property that, given a set of random variables Y, the local Markov property is... W Under the condition that the random variable Y V With random variable set Y O It is independent, as shown in equation (2) below: P(Y V ,AND O |And W )=P(Y V |And W )P(Y O |And W ) (2) S2.2: After constructing the Conditional Random Field (CRF), the linear-chain CRF algorithm also needs to be implemented. A linear-chain CRF is a Markov random field of random variable Y given a random variable X. That is, given the current lane is x, it calculates the probability that a vehicle will change lanes to y in the future. For a specific vehicle, given the current variable X = (X1, X2, ..., X...),... n The conditional probability distribution P(Y|X) of the random variable sequence Y constitutes a linear chain conditional random field, as shown in equation (3): P(Y i |X,Y1,…,Y i-1 ,Y i+1 ,…,Y n )=P(Y i |X,Y i-1 ,Y i+1 ) (3) Based on this, given that the current lane is x, the conditional probability of the future lane being y is calculated as shown in equation (4): Where, β k For transition features, it indicates whether this node possesses a certain attribute, i.e., whether it is in a certain lane; θ l For state features, it indicates whether two states will transition due to a certain feature, i.e., whether the vehicle will change lanes based on its previous lane position; α k and λ l They are β k and θ l The corresponding weights, Z(x), are normalization factors; the conditional random field is completely determined by the characteristic function β. k and θ l The corresponding weights are determined, which is a simplified form of the conditional random field. The specific process is as follows: S2.2.1: The transition features and state features and their weights are represented by a unified symbol. There are K1 transition features and K2 state features. The calculation formula is shown in the following formula (5): S2.2.2: Sum the transition and state features at each position i, and the calculation formula is shown in the following formula (6): S2.2.3: Use w k Representing feature f k The weights of (y,x) are given by w, which represents the weight vector. F(y,x) represents the global feature vector. The calculation formula is shown in equation (7) below: Therefore, the linear chain conditional random field can be written as the inner product of w and F(y,x), and the calculation formula is shown in equation (8) below: S2.2.4: When calculating probabilities, the linear chain conditional random field uses a forward-backward algorithm. For each index i = 0, 1, ..., n+1, a forward vector ξ is defined. i The calculation formula is shown in equation (9) below: Where, ξ i (y i |x) indicates that the label at position i is y. i And the unprogrammed probability of the first half of the labeled sequence up to position i, since y i There are m possible values for ξ, so i (x) is an m-dimensional column vector; S2.2.5: Similarly, for each index i = 0, 1, ..., n+1, define the backward vector ψ i (x), the calculation formula is shown in equation (10) below: ψ i (x)=M i+1 (x)ψ i+1 (x) (10) S2.2.6: Z(x) can be easily obtained from the definition of forward-backward vectors, and the calculation formula is shown in the following formula (11): Among them, M i The formula for calculating (x) is shown in equation (12) below: S2.2.7: For a given input sequence x, find the output sequence y with the highest conditional probability using the trained conditional random field model. * The probability of lane change can be labeled for the observed behavior, and the calculation formula is shown in the following formula (13):
4. The lightweight online driving behavior analysis method based on multi-source feature extraction as described in claim 1, characterized in that: Step S3 includes the following steps: S3.1: A vehicle trajectory time series data is processed jointly by vehicle equipment and roadside units, consisting of continuous observation values collected at equal time intervals. It means that among them It refers to the vehicle i data observed by the device at time index t, where T is the time index value. i This represents the maximum time index value of the i-th trajectory; similarly, all vehicle trajectories are represented by X = {X...} 1 ,X 2 ,…,X N } indicates that there are N trajectories in total; it should be noted that the maximum time index value T for different vehicles is... i They may be different; S3.2: For the input of the Long Short-Term Memory (LSTM) network, the time series data of the trajectory is divided into frames according to time slices. For each trajectory, generate a hidden vector with an initial value of 0. and Where i represents the trajectory corresponding to the hidden vector, and t represents the time index value of the trajectory corresponding to the hidden vector; at each time index value t, x is... t and the corresponding h of the previous time. t-1 and c t-1 Together they are used as input parameters for LSTM, and the relevant formulas are shown in equations (14)-(17) below: i t =σ(W i ·[h t-1 ,x t ]+b i ) (14) f t =σ(W f ·[h t-1 ,x t ]+b f ) (15) the t =σ(W o ·[h t-1 ,x t ]+b o ) (17) Among them, i t The input gate value at time index t determines the information to be stored in the current cell state; f t This represents the forgetting threshold, which determines the information to be lost in the current cell state; It is a candidate vector that will be added to the state of the current unit; o t σ represents the output gate value, which determines the information to be output in the current cell state; σ(·) represents the Sigmoid function; additionally, W and b in the formula represent the weight value and offset value in the formula, respectively, where W i [h t-1 ,x t ]+b i Can be broken down into W ih h t-1 +W ix x t +b i Other weight values can also be split in the same way; S3.4: For the output of each layer of the Long Short-Term Memory (LSTM) network, the results obtained from the above formula are further processed and calculated to obtain: h t =o t *fishy(c) t ) (19) After T rounds of calculations, all time data of the trajectory were processed, and the final result h was obtained. T Then, a fully connected layer FC(·) is used to resolve it to output O∈R. 3 This indicates that the output has three sets of values; further processing of O using the Softmax(·) method yields the final prediction result p∈R. 3 The relevant formula is shown in equation (20) below: Where, p c This represents the predicted probability that the current trajectory belongs to category c in dimension, O. c This indicates the output value in dimension c; at this point, the index of the highest value in p represents the index of the final result, representing the three states of abnormal, suspicious, and normal respectively. S3.5: For the loss function of the neural network, when training the LSTM neural network, considering that the trajectories of normal behavior are far more numerous than the trajectories of suspicious and abnormal behavior in driving behavior, the cross-entropy loss function is used as the loss function of the neural network, and the relevant formula is shown in the following formula (21): Where M represents the number of categories, and its value is set to 3; This represents the true label of trajectory i, which is 1 when the true category of trajectory i is equal to dimension c, and 0 otherwise. This represents the predicted probability that trajectory i belongs to category c in dimension.
5. The lightweight online driving behavior analysis method based on multi-source feature extraction as described in claim 1, characterized in that: Step S5 includes the following steps: S5.1: Behavioral analysis generally refers to the refined classification of perception ability and response skills. Measurable indicators of perception ability include the response time and accuracy of real-time strategies, while also requiring qualitative analysis of the driver's driving style and personality. Measurable indicators of response skills are the sum of vehicle control indicators, including the driver's speed control, direction control, and distance control. S5.2: For driving behavior rating, starting from ensuring lane driving safety, the overall operation and driving behavior of the driver are rated and analyzed, with the evaluation indicators focusing on vehicle control indicators; based on the main causes of driving behavior, driving behavior is rated into the following three categories: Impulsive driving behavior, steady driving behavior, and conservative driving behavior.
6. The lightweight online driving behavior analysis method based on multi-source feature extraction as described in claim 5, characterized in that: The impulsive driving behavior described refers to driving under a psychological state of "road rage." Specifically, it manifests as a surge in driving stress due to traffic congestion, leading to impulsive emotions and the deliberate use of unsafe or threatening driving methods, or actions that endanger other road users. This is an extremely dangerous driving behavior, specifically involving speeds exceeding 60 km / h and accelerations exceeding 2.5 m / s². 2 And vehicles that change lanes more than or equal to 3 times within a road segment; have a lane change probability greater than 60%; and exhibit poor stress resistance and make sudden braking or acceleration more than or equal to 3 times within a road segment in congested conditions are classified as impulsive driving. The aforementioned smooth driving behavior refers to a driver strictly adhering to the driving indicators explicitly stipulated in road traffic safety laws and regulations, and strictly avoiding improper actions; ensuring safe driving based on their own driving conditions, vehicle condition, and the actual traffic capacity of the lane; maintaining the vehicle's speed between 25 km / h and 60 km / h and its acceleration at less than 2.5 m / s². 2 The following behaviors, including vehicles changing lanes less than or equal to 2 times within a road segment, with a lane-changing probability between 30% and 60%, and exhibiting average resilience in congested environments, with less than or equal to 2 instances of sudden braking or acceleration within a road segment, are classified as smooth driving. The aforementioned conservative driving behavior is a driving technique and strategy for predicting and avoiding impending dangers. By actively reducing speed and maintaining lane position, it allows for a more comprehensive observation and understanding of the driving environment, a fuller perception and prediction of potential situations, and a more accurate forecasting of uncertain potential hazards. This enables proactive measures to avoid accidents caused by other vehicles' errors or objective environmental factors. The vehicle's speed should be below 25 km / h and its acceleration below 2.5 m / s². 2 The following behaviors, including vehicles not changing lanes within a road segment (with a lane-changing probability of less than 30%), exhibiting good resilience in congested conditions, and maintaining a near-constant speed within the road segment, are categorized as conservative driving.