Driving style recognition method and device, computer device, and storage medium

By employing a cloud-edge-device collaborative driving style recognition method, lightweight modeling is performed on the vehicle side using a bidirectional long short-term memory network and a multilayer perceptron, while the global model is optimized in the cloud. This solves the problem of slow inference speed caused by the large number of model parameters in existing technologies, and achieves high accuracy and low latency driving style recognition.

CN119734716BActive Publication Date: 2026-04-24CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA TELECOM CLOUD TECH CO LTD
Filing Date
2024-12-04
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing driving style recognition models have a large number of parameters when performing high-precision recognition, resulting in slow inference speed. This makes them unable to meet the requirements for rapid response during vehicle operation and ignores user privacy and computational timeliness.

Method used

A cloud-edge-device collaborative driving style recognition method is adopted. By implementing a lightweight local recognition model on the vehicle and deploying a high-accuracy global model in the cloud, driving behavior modeling is carried out using bidirectional long short-term memory networks and multilayer perceptrons. The local model is optimized by combining knowledge distillation technology to achieve high accuracy and robustness.

Benefits of technology

Without acquiring private driving data, it achieves higher accuracy and robustness in driving style recognition, meets the low latency requirements during vehicle operation, and improves the model's recognition speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119734716B_ABST
    Figure CN119734716B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent driving and discloses a driving style recognition method and device, computer equipment and a storage medium, which comprise the following steps: acquiring driving behavior data, determining a local recognition model based on a training data set, determining the reliability weight of the local recognition model according to the first quantity in the training data set and the sample proportion belonging to the first category in the training data set, summarizing the driving style prediction result based on the driving style prediction result and the reliability weight of the local recognition model, determining a total driving style probability distribution, training a global model based on the total driving style probability distribution, and optimizing the local recognition model based on the prediction result of the global model. A lightweight driving style model is realized at the vehicle end, a global model is used in the cloud, the global model is a complex recognition model, and in the case of model heterogeneity, the ability of the terminal model is comprehensively summarized under the premise of not obtaining private driving data, so that higher accuracy and robustness are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent driving technology, specifically to a driving style recognition method, device, computer equipment, and storage medium. Background Technology

[0002] Intelligent vehicles have become a strategic direction for the development of the global automotive industry. As a complex intelligent system integrating driving, perception, and interaction, intelligent vehicles involve various advanced technologies such as the Internet of Things, artificial intelligence, and human-machine interaction. Through intelligent cockpit systems, vehicle status information and driver data, such as device status data, vehicle speed, direction, and acceleration, can be fully collected, providing effective support for big data analysis and decision-making. To achieve effective coordination between humans, vehicles, and roads, it is necessary to carefully analyze human driving behavior and styles, thereby enabling driver assistance systems to better perform their assisted driving tasks.

[0003] Existing driving style recognition tasks neglect the requirements of user privacy and computational speed in real-world scenarios, and high-precision recognition models have a large number of parameters, which slows down the model's inference speed. Therefore, providing an efficient recognition model is an urgent problem to be solved. Summary of the Invention

[0004] In view of this, the present invention provides a driving style recognition method, device, computer equipment and storage medium to solve the problem of low efficiency of current driving style recognition models.

[0005] In a first aspect, the present invention provides a driving style recognition method, the method comprising:

[0006] Acquire driving behavior data and determine a local recognition model based on a training dataset, wherein the training dataset is determined from the driving behavior data;

[0007] The reliability weight of the local recognition model is determined based on the first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset. The first quantity is used to characterize the accurate number of predictions made by the training dataset in the local recognition model.

[0008] The driving style prediction results are summarized based on the driving style prediction results and the reliability weights of the local recognition model to determine the total driving style probability distribution. A global model is then trained based on the total driving style probability distribution. The driving style prediction results are determined based on the local recognition model.

[0009] The local recognition model is optimized based on the prediction results of the global model.

[0010] The driving style recognition method provided in this embodiment includes acquiring driving behavior data, determining a local recognition model based on a training dataset, determining the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to a first category in the training dataset, summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model to determine the overall driving style probability distribution, training a global model based on the overall driving style probability distribution, and optimizing the local recognition model based on the prediction results of the global model. This method, as a cloud-edge-device collaborative driving style recognition method, implements a lightweight driving style model on the vehicle side and adopts a global model in the cloud. The global model is a more accurate and complex recognition model, capable of integrating the capabilities of terminal models in heterogeneous models without acquiring private driving data, achieving higher accuracy and robustness.

[0011] In one alternative implementation, determining the local recognition model based on the training dataset includes:

[0012] The hidden layer vectors are determined based on the training dataset, and the hidden layer vectors at a specified time are fused to obtain the target hidden layer vector.

[0013] The probability distribution of driving style is predicted based on the target hidden layer vector, and the cross-entropy loss is calculated based on the probability distribution of driving style and the training dataset to determine the local recognition model according to the cross-entropy loss.

[0014] In one optional implementation, the step of determining the hidden layer vector based on the training dataset and fusing the hidden layer vectors at a specified time to obtain the target hidden layer vector includes:

[0015] The training dataset is used as input to a bidirectional long short-term memory network model to determine the hidden layer vectors;

[0016] Extract the hidden layer vector at the first time step and the hidden layer vector at the last time step, and concatenate the hidden layer vector at the first time step and the hidden layer vector at the last time step to obtain the target hidden layer vector.

[0017] In one optional implementation, determining the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to a first category in the training dataset includes:

[0018] The accuracy of the local recognition model is determined based on the ratio of the first quantity corresponding to the training dataset to the total quantity;

[0019] The distribution balance of the training dataset is calculated based on the proportion of samples belonging to the first category in the training dataset;

[0020] The reliability score of the local recognition model is determined based on the product of the accuracy and the distribution balance, and the reliability score is normalized to determine the reliability weight of the local recognition model.

[0021] In one optional implementation, the distribution balance of the training dataset is determined according to the following formula:

[0022]

[0023] Where P(k) represents the proportion of samples of data class k in the training dataset, b i This indicates the distribution balance of the training dataset.

[0024] In one optional implementation, training the global model based on the total driving style probability distribution includes:

[0025] The driving behavior data is preprocessed by random masking and position encoding, and then input into the encoder for multi-head self-attention calculation to recover vehicle speed information;

[0026] Cross-attention is calculated based on the decoder and implicit vectors, and then passed through a multilayer perceptron to obtain the driving style recognition result;

[0027] The global model parameters are updated based on the vehicle speed information and driving style recognition results to determine the global model.

[0028] In one optional implementation, optimizing the local recognition model based on the prediction results of the global model includes:

[0029] The global model is distributed to vehicle terminals to predict new driving behavior data based on the global model, thereby obtaining the prediction results of the global model.

[0030] Based on the prediction results of the global model and the prediction results of the local recognition model for the new driving behavior data, the parameters of the local recognition model are updated to optimize the local recognition model based on the updated parameters.

[0031] In a second aspect, the present invention provides a driving style recognition device, the device comprising:

[0032] A data acquisition module is used to acquire driving behavior data and determine a local recognition model based on a training dataset, wherein the training dataset is determined from the driving behavior data;

[0033] The reliability weight determination module is used to determine the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset. The first quantity is used to characterize the accurate number of predictions made by the training dataset in the local recognition model.

[0034] The global model training module is used to summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determine the total driving style probability distribution, and train the global model based on the total driving style probability distribution. The driving style prediction results are determined based on the local recognition model.

[0035] The local model optimization module is used to optimize the local recognition model based on the prediction results of the global model.

[0036] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the driving style recognition method of the first aspect or any corresponding embodiment described above.

[0037] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the driving style recognition method of the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating a driving style recognition method according to an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of a bidirectional long short-term memory network model according to an embodiment of the present invention;

[0041] Figure 3 This is a schematic diagram of the framework of a complex cloud model according to an embodiment of the present invention;

[0042] Figure 4 This is a structural block diagram of a driving style recognition device according to an embodiment of the present invention;

[0043] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] Current driving style recognition tasks can be divided into action recognition and overall recognition. In action recognition, driving behavior is decomposed into a series of operations, and driving style is identified based on some of these operations. A context-aware system has been proposed that classifies predefined operations (including U-turns, turns, and lane changes) into dangerous or normal categories. However, this type of task is limited by the completeness of the predefined operations and the determination of the start and end times of the operations. Overall recognition, on the other hand, utilizes data mining techniques to extract hidden features from raw driving data, and then uses supervised or unsupervised methods for recognition.

[0046] However, existing driving style recognition methods require a large amount of location-related driving data, involving users' personal information, to achieve high-precision recognition. Furthermore, rapid identification of driving styles is necessary when vehicles are traveling at high speeds to quickly intervene in dangerous driving behaviors and ensure driving safety. However, high-precision recognition models have a large number of parameters, resulting in slow inference speeds that cannot meet the requirements for rapid response during vehicle operation. Therefore, this invention provides a driving style recognition method applicable to cloud devices.

[0047] According to an embodiment of the present invention, a driving style recognition method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0048] This embodiment provides a driving style recognition method, applied to the aforementioned cloud device. Figure 1 This is a flowchart of a driving style recognition method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0049] Step S101: Obtain driving behavior data and determine a local recognition model based on the training dataset.

[0050] The training dataset is derived from driving behavior data. For each vehicle, driving behavior data is acquired, specifically from the terminal of each vehicle. This data includes multiple driving trajectories, each containing vehicle information at multiple points in time, such as vehicle position, speed, acceleration, and lateral deviation. Based on actual driving conditions, each driving trajectory in the driving behavior data is labeled with a driving style. This labeled data constitutes the training dataset. As an example, driving styles can include aggressive, moderate, and conservative.

[0051] An labeled driving behavior data (i.e., training dataset) is used to train a local driving style recognition model for each vehicle, which is the vehicle's local recognition model. The structure of this local recognition model includes a bidirectional long short-term memory network model, which models the driver's driving behavior over a period of time (e.g., acceleration, deceleration, lane changing, etc.), and then uses a multilayer perceptron to output the final driving style recognition result.

[0052] Each vehicle terminal can train a local recognition model based on its own labeled training dataset.

[0053] Step S102: Determine the reliability weight of the local recognition model based on the first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset.

[0054] The first quantity is used to characterize the number of accurate predictions made by the training dataset in the local recognition model.

[0055] Calculate the accuracy of the local recognition model for each vehicle and the distribution balance of the training dataset. First, obtain the first quantity in the training dataset, which is the number of accurate predictions made by the local recognition model. Calculate the accuracy of the local recognition model based on this first quantity. Then, calculate the distribution balance of the training dataset based on the proportion of samples belonging to the first category, where the first category represents any specified class.

[0056] The reliability score of the local recognition model is calculated by taking into account both the accuracy of the local recognition model and the distribution balance of the training dataset. The scores of all local recognition models are then normalized to obtain the reliability weight of each local recognition model.

[0057] Step S103: Summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determine the overall driving style probability distribution, and train the global model based on the overall driving style probability distribution.

[0058] The driving style prediction result is determined based on the local recognition model.

[0059] A subset of unlabeled driving behavior data is collected and distributed to the local recognition models of each vehicle terminal. This unlabeled data is then input into the local recognition models, which perform predictions and output driving style prediction results. The driving style prediction results from each vehicle's local terminal are then aggregated in the cloud. For each unlabeled data point, a corresponding driving style probability distribution is obtained based on the driving style prediction result and the reliability weights of the local recognition model. As an example, all driving style prediction results can be aggregated by calculating the sum of the products of all driving style prediction results and their reliability weights, resulting in the overall driving style probability distribution.

[0060] The global model is trained based on the probability distribution of the overall driving style. The global model is deployed in the cloud. In this embodiment, the global model in the cloud is trained using the idea of ​​distillation learning.

[0061] Step S104: Optimize the local recognition model based on the prediction results of the global model.

[0062] The global model is distributed to the local end of each vehicle. The global model is then used locally on each vehicle to predict newly generated driving behavior data. This means the newly generated driving behavior data is used as input to the global model, and the global model outputs a prediction result, which includes driving style. Based on the prediction results of the local recognition model and the global model, the parameters of the local recognition model are updated, and then the local recognition model is optimized based on the updated parameters.

[0063] The driving style recognition method provided in this embodiment includes acquiring driving behavior data, determining a local recognition model based on a training dataset, determining the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to a first category in the training dataset, summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model to determine the overall driving style probability distribution, training a global model based on the overall driving style probability distribution, and optimizing the local recognition model based on the prediction results of the global model. This method, as a cloud-edge-device collaborative driving style recognition method, implements a lightweight driving style model on the vehicle side and adopts a global model in the cloud. The global model is a more accurate and complex recognition model, capable of integrating the capabilities of terminal models in heterogeneous models without acquiring private driving data, achieving higher accuracy and robustness.

[0064] This embodiment provides a driving style recognition method, which includes the following steps:

[0065] Step S201: Obtain driving behavior data and determine a local recognition model based on the training dataset.

[0066] Specifically, step S201 includes:

[0067] Step S2011: Determine the hidden layer vector based on the training dataset, and fuse the hidden layer vectors at a specified time to obtain the target hidden layer vector.

[0068] For a given vehicle terminal, the driving behavior data it generates is D = {T1, T2, ..., T}. H}, which contains H driving tracks, each driving track This contains vehicle information at t time points, including vehicle position, speed, acceleration, and lateral offset. The superscript 'h' for vehicle information in the driving trajectory is omitted to avoid ambiguity. Based on actual driving conditions, for each trajectory T... h Indicate its driving style y h y h ∈{1,2,3} represent three driving styles: aggressive, moderate, and conservative, respectively.

[0069] Continuous driving behavior data is input into a deep learning model, which includes a bidirectional long short-term memory network. The bidirectional long short-term memory network is used to calculate the hidden layer vector of the continuous driving behavior data to obtain the context information before and after the driving behavior is fused.

[0070] The specified time is one or more specific time points. The hidden layer vectors corresponding to the specified time points are concatenated to obtain the target hidden layer vector.

[0071] In some optional implementations, step S2011 above includes the following steps:

[0072] Step a1: Use the training dataset as input to the bidirectional long short-term memory network model to determine the hidden layer vectors.

[0073] like Figure 2 As shown, the continuous driving behaviors {X1,X2,…,X} in the training dataset are... t} is used as input to a bidirectional long short-term memory network model to obtain the hidden layer vector {h1,h2,…,h} corresponding to the contextual information before and after the fusion of driving behavior. t}

[0074] Specifically, the hidden layer vectors corresponding to the context information before and after the fusion of driving behavior are {h1,h2,…,h...} t The calculation process is as follows:

[0075] {h1,h2,…,h t} = BiLSTM(X1,X2,…,X) t )

[0076] Among them, BiLSTM (Bidirectional Long Short-Term Memory) is a special type of recurrent neural network, where t represents time t, and X... t h represents vehicle information at time t. t Let represent the hidden layer vector at time t.

[0077] Step a2: Extract the hidden layer vector at the first time step and the hidden layer vector at the last time step, and concatenate the hidden layer vector at the first time step and the hidden layer vector at the last time step to obtain the target hidden layer vector.

[0078] As one implementation method, the specified times are designated as the first time and the last time. The hidden layer vectors at the first time and the last time are taken, and the hidden layer vectors at the first time h1 and the last time h2 are compared. t The vectors are concatenated to obtain the target hidden layer vector.

[0079] Step S2012: Predict the probability distribution of driving style based on the target hidden layer vector, and calculate the cross-entropy loss based on the probability distribution of driving style and the training dataset, so as to determine the local recognition model based on the cross-entropy loss.

[0080] The concatenated target hidden layer vector is input into a multilayer perceptron to predict the probability distribution of driving style:

[0081]

[0082] Where σ represents the sigmoid activation function, and concat() represents the concatenation operation. The probability distribution of driving style (i.e., the prediction result) is represented by h1, and the hidden layer vector at the first time step is h t This represents the hidden layer vector at the last moment, and MLP() represents a multilayer perceptron.

[0083] Calculate the cross-entropy loss based on the true labeled results (i.e., the training dataset) and the probability distribution of driving styles (i.e., the prediction results):

[0084]

[0085] Where m represents the size of the dataset, y (i) This represents the true annotation result corresponding to the i-th sample. Let represent the probability that the i-th sample belongs to category k in the predicted driving style probability distribution. Let represent the probability that the i-th sample belongs to category j in the predicted driving style probability distribution.

[0086] The cross-entropy loss function is used to evaluate model performance. The smaller the cross-entropy loss, the better the model performs on the validation set, meaning the more accurate the model's predictions of the true labeled results. Based on the cross-entropy loss on the validation set, the model with the smallest loss is selected to determine the most suitable local recognition model.

[0087] Each vehicle terminal can train a local driving style recognition model based on its own training dataset, which can be denoted as... Where n represents the number of vehicle terminals, M n This represents the local identification model of the nth vehicle terminal.

[0088] Step S202: Determine the reliability weight of the local recognition model based on the first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset.

[0089] Specifically, step S202 includes:

[0090] Step S2021: Determine the accuracy of the local recognition model based on the ratio of the first quantity corresponding to the training dataset to the total quantity.

[0091] The first quantity is used to characterize the accuracy of predictions made by the training dataset in the local recognition model, representing the accuracy p of the local recognition model on the vehicle terminal. i Calculate as follows:

[0092]

[0093] Among them, c i This indicates that the training dataset (i.e., labeled data) is used to locally identify model M. i The number of accurate predictions, m i p represents the total quantity (i.e., the total amount of data). i This indicates the accuracy of the local recognition model.

[0094] Step S2022: Calculate the distribution balance of the training dataset based on the proportion of samples belonging to the first category in the training dataset.

[0095] The first category represents any specific category, without specific limitations. The distribution balance of the local training dataset on the vehicle terminal (b) i Determine according to the following formula:

[0096]

[0097] Where P(k) represents the proportion of samples of data class k in the training dataset, b i This indicates the distribution balance of the training dataset.

[0098] Step S2023: Determine the reliability score of the local recognition model based on the product of accuracy and distribution balance, and normalize the reliability score to determine the reliability weight of the local recognition model.

[0099] Local recognition model M i Reliability score s i Determine according to the following formula:

[0100] s i =p i ×b i

[0101] Among them, b i p represents the distribution balance of the training dataset. i s represents the accuracy of the local recognition model. i This represents the reliability score of the local recognition model.

[0102] The reliability scores are normalized. As an example, a Softmax transformation is applied to the reliability scores of all local recognition models to obtain the final reliability weights. The sum of the reliability weights of all local recognition models is 1. Softmax is an activation function that normalizes a numerical vector into a probability distribution vector. The reliability weights are represented by r. i Specifically as follows:

[0103]

[0104] Where, r i Represents the reliability weight.

[0105] Step S203: Summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determine the overall driving style probability distribution, and train the global model based on the overall driving style probability distribution.

[0106] Specifically, the step S203 above, which involves training the global model based on the overall driving style probability distribution, includes:

[0107] Step S2031: Perform random masking and position encoding preprocessing on the driving behavior data, and input it into the encoder for multi-head self-attention calculation to recover vehicle speed information;

[0108] Step S2032: Calculate cross-attention based on the decoder and implicit vectors, and pass it through a multilayer perceptron to obtain the driving style recognition result;

[0109] Step S2033: Update the global model parameters based on vehicle speed information and driving style recognition results to determine the global model.

[0110] Before training a global model based on the overall driving style probability distribution, it is necessary to first collect a portion of unlabeled driving behavior data. This unlabeled data is then distributed to vehicle terminals for prediction and aggregated to a cloud server. Experienced drivers randomly drive on the road, collecting a portion of data without style labels, containing only driving behavior data, denoted as D. u For the unlabeled public dataset D u Take an unlabeled sample X u ∈D u Input into each local recognition model M i To obtain the prediction results Combine the reliability weight r of the local recognition model i The results of all predictions are summarized below:

[0111]

[0112] Where N represents the total number of participating vehicle terminals. r represents the aggregated driving style prediction results. i This represents the reliability weight of the local recognition model for the i-th vehicle terminal. This represents the prediction result for the i-th driving style.

[0113] Similarly, this can be applied to the entire dataset D. u The prediction result can be recorded as:

[0114] For example, a knowledge distillation technique is used to train a complex model in the cloud, and the framework of the complex model in the cloud is as follows: Figure 3 As shown, the model takes unlabeled driving behavior data as input. First, it performs a random masking operation to hide the vehicle speed information contained in a small number of time steps. The masking flag for the masked time steps is set to 1.

[0115] {X′1,…X′ t},{flag1,…flag t} = MASK(X1,…X t )

[0116] Where, {X′1,…X′ t} represents unlabeled driving behavior data, (X1,…X t ) represents continuous driving behavior in the training dataset, flag t This represents the mask marker of the vehicle at time t.

[0117] Then calculate the position embedding vector of the input data:

[0118] PE (pos,2i) =sin(pos / 10000)2i / d )

[0119] PE (pos,2i+1) =cos(pos / 10000) 2i / d )

[0120] Where pos represents the position of the current time step within the complete driving trajectory, d represents the dimension of the position encoding, 2i represents an even dimension, 2i+1 represents an odd dimension, and PE (pos,2i) PE represents the position embedding vector where the position encoding is even. (pos,2i+1) This represents a position embedding vector where the position encoding is odd.

[0121] The masked data, with added position codes, is input into L encoders. Each encoder contains a multi-head self-attention layer, a normalization layer, and a linear layer. The calculation process is as follows:

[0122] The input is transformed into Q, K, V matrices using three linear transformations:

[0123] Q, K, V=Linear1(X′,PE),Linear2(X′,PE),Linear3(X′,PE)

[0124] Calculate and weight attention:

[0125]

[0126] Where, d k This represents the dimensions of Q, K, and V. The above process is repeated multiple times to generate multi-head self-attention results, which are then concatenated. The results are then normalized and applied to a linear layer.

[0127] Z=Linear(BatchNorm(X′+MultiHeadAttention(X′,PE)))

[0128] The output of the last encoder is then passed through a fully connected layer to obtain the recovered vehicle speed information:

[0129] X″ = Linear(Z)

[0130] Simultaneously, the output of the last encoder is input to the decoder, where cross-attention is calculated with a learnable implicit vector. The result of the cross-attention layer is normalized and then processed by a multilayer perceptron to obtain the driving style recognition result.

[0131]

[0132] The global model training process in the cloud is as follows:

[0133]

[0134] Here, α and β are two hyperparameters used to control the weights of the two error components, MSE(·,·) represents the mean square error of the two values, and X i [v] indicates input X i The velocity information is given by η, where η represents the learning rate, σ represents the activation function, and KL(·,·) represents the calculation of the KL divergence between the two distributions. This represents the cloud model parameters in the j-th round at time t. Represents the cloud-based model dataset D u The predicted probability.

[0135] Step S204: Optimize the local recognition model based on the prediction results of the global model.

[0136] Specifically, step S204 includes:

[0137] Step S2041: Distribute the global model to the vehicle terminal to predict new driving behavior data based on the global model and obtain the prediction results of the global model.

[0138] The global model is distributed to each vehicle terminal to predict new driving behavior data generated locally in the vehicle, thus obtaining the predicted driving style.

[0139] Let the new driving behavior data be X. new The prediction result obtained based on the global model is σ(f(θ,X). new )).

[0140] Step S2042: Based on the prediction results of the global model and the prediction results of the local recognition model on the new driving behavior data, update the parameters of the local recognition model to optimize the local recognition model based on the updated parameters.

[0141] The parameters of the local recognition model are determined according to the following formula:

[0142]

[0143] in, Indicates the local recognition model M i The parameters in the k-th round, Indicates the local recognition model M j New driving behavior data X new The predicted probability, σ(f(θ,X) new )) represents the global model's prediction probability for new driving behavior data.

[0144] This invention provides a driving style recognition method that implements a lightweight driving style recognition model on the vehicle side. It utilizes a bidirectional long short-term memory network and a multilayer perceptron to model driving behavior and identify driving styles, ensuring that the recognition speed meets the low latency requirements of the vehicle driving process. A high-accuracy complex recognition model is implemented in the cloud. Using knowledge distillation technology, it can integrate the capabilities of the terminal model even with heterogeneous models, without acquiring private driving data, achieving higher accuracy and robustness. The cloud-based recognition model uses multi-head self-attention mechanisms and self-supervised learning strategies to learn the deep correlation between driving behavior and driving style, possessing stronger learning capabilities and better recognition results. Using knowledge distillation technology, the complex model on the server side then guides the terminal model to optimize its own parameters, reducing the impact of data distribution bias on local model training and improving the recognition accuracy of the terminal model. Simultaneously, a reliability evaluation method is proposed when training the cloud model, assessing the contribution of the terminal model to the server-side model based on the performance of the terminal model and data characteristics, avoiding interference from inferior models.

[0145] This embodiment also provides a driving style recognition device for implementing the above embodiments and implementation methods; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0146] This embodiment provides a driving style recognition device, such as Figure 4 As shown, it includes:

[0147] The data acquisition module 301 is used to acquire driving behavior data and determine a local recognition model based on a training dataset, wherein the training dataset is determined from the driving behavior data;

[0148] The reliability weight determination module 302 is used to determine the reliability weight of the local recognition model based on the first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset. The first quantity is used to characterize the accurate number of predictions made by the training dataset in the local recognition model.

[0149] The global model training module 303 is used to summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determine the total driving style probability distribution, and train a global model based on the total driving style probability distribution. The driving style prediction results are determined based on the local recognition model.

[0150] The local model optimization module 304 is used to optimize the local recognition model based on the prediction results of the global model.

[0151] In some optional implementations, the data acquisition module 301 includes:

[0152] The target hidden layer vector determination unit is used to determine the hidden layer vector based on the training dataset and fuse the hidden layer vectors at a specified time to obtain the target hidden layer vector.

[0153] The local recognition model determination unit is used to predict the probability distribution of driving style based on the target hidden layer vector, and calculate the cross-entropy loss based on the probability distribution of driving style and the training dataset, so as to determine the local recognition model according to the cross-entropy loss.

[0154] In some optional implementations, the target hidden layer vector determination unit includes:

[0155] The hidden layer vector determination subunit is used to take the training dataset as input to the bidirectional long short-term memory network model in order to determine the hidden layer vectors.

[0156] The target hidden layer vector determination subunit is used to extract the hidden layer vector at the first time step and the hidden layer vector at the last time step, and to concatenate the hidden layer vector at the first time step and the hidden layer vector at the last time step to obtain the target hidden layer vector.

[0157] In some optional implementations, the reliability weight determination module 302 includes:

[0158] An accuracy calculation unit is used to determine the accuracy of the local recognition model based on the ratio of the first quantity corresponding to the training dataset to the total quantity.

[0159] The distribution balance calculation unit is used to calculate the distribution balance of the training dataset based on the proportion of samples belonging to the first category in the training dataset.

[0160] The reliability weight determination unit is used to determine the reliability score of the local recognition model based on the product of the accuracy and the distribution balance, and to normalize the reliability score to determine the reliability weight of the local recognition model.

[0161] In some optional implementations, the distribution balance of the training dataset is determined according to the following formula:

[0162]

[0163] Where P(k) represents the proportion of samples of data class k in the training dataset, b i This indicates the distribution balance of the training dataset.

[0164] In some alternative implementations, the global model training module 303 includes:

[0165] The speed information determination unit is used to perform random masking and position encoding preprocessing on the driving behavior data, and input it into the encoder for multi-head self-attention calculation to recover the vehicle speed information;

[0166] The driving style recognition and determination unit is used to calculate cross-attention based on the decoder and implicit vectors, and then passes it through a multilayer perceptron to obtain the driving style recognition result;

[0167] The global model determination unit is used to update the global model parameters based on the vehicle speed information and driving style recognition results to determine the global model.

[0168] In some alternative implementations, the local model optimization module 304 includes:

[0169] A global model prediction unit is used to distribute the global model to the vehicle terminal to predict new driving behavior data based on the global model and obtain the prediction result of the global model.

[0170] The parameter update unit is used to update the parameters of the local recognition model based on the prediction results of the global model and the prediction results of the local recognition model for the new driving behavior data, so as to optimize the local recognition model based on the updated parameters.

[0171] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0172] In this embodiment, the driving style recognition device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0173] This invention also provides a computer device having the above-described features. Figure 4 The driving style recognition device shown.

[0174] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.

[0175] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0176] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0177] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0178] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0179] The computer device also includes input and output devices. The processor 10, memory 20, input and output devices can be connected via a bus or other means.

[0180] Input devices can receive input numerical or character information and generate key signal inputs related to user settings and function control of the computer device, such as touchscreens, keypads, mice, trackpads, touchpads, joysticks, one or more mouse buttons, trackballs, joysticks, etc. Output devices may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.

[0181] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0182] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0183] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and all such modifications and variations fall within the scope defined by the invention.

Claims

1. A driving style recognition method, characterized in that, The method includes: Acquire driving behavior data and determine a local recognition model based on a training dataset, wherein the training dataset is determined from the driving behavior data; The reliability weight of the local recognition model is determined based on the first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset. The first quantity is used to characterize the accurate number of predictions made by the training dataset in the local recognition model. The driving style prediction results are summarized based on the driving style prediction results and the reliability weights of the local recognition model to determine the total driving style probability distribution. A global model is then trained based on the total driving style probability distribution. The driving style prediction results are determined based on the local recognition model. The local recognition model is optimized based on the prediction results of the global model.

2. The method according to claim 1, characterized in that, The process of determining the local recognition model based on the training dataset includes: The hidden layer vectors are determined based on the training dataset, and the hidden layer vectors at a specified time are fused to obtain the target hidden layer vector. The probability distribution of driving style is predicted based on the target hidden layer vector, and the cross-entropy loss is calculated based on the probability distribution of driving style and the training dataset to determine the local recognition model according to the cross-entropy loss.

3. The method according to claim 2, characterized in that, The step of determining the hidden layer vector based on the training dataset and fusing the hidden layer vectors at a specified time to obtain the target hidden layer vector includes: The training dataset is used as input to a bidirectional long short-term memory network model to determine the hidden layer vectors; Extract the hidden layer vector at the first time step and the hidden layer vector at the last time step, and concatenate the hidden layer vector at the first time step and the hidden layer vector at the last time step to obtain the target hidden layer vector.

4. The method according to claim 1, characterized in that, The step of determining the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset includes: The accuracy of the local recognition model is determined based on the ratio of the first quantity corresponding to the training dataset to the total quantity; The distribution balance of the training dataset is calculated based on the proportion of samples belonging to the first category in the training dataset; The reliability score of the local recognition model is determined based on the product of the accuracy and the distribution balance, and the reliability score is normalized to determine the reliability weight of the local recognition model.

5. The method according to claim 4, characterized in that, The distribution balance of the training dataset is determined according to the following formula: Where P(k) represents the proportion of samples of data class k in the training dataset, b i This indicates the distribution balance of the training dataset.

6. The method according to claim 1, characterized in that, The training of the global model based on the overall driving style probability distribution includes: The driving behavior data is preprocessed by random masking and position encoding, and then input into the encoder for multi-head self-attention calculation to recover vehicle speed information; Cross-attention is calculated based on the decoder and implicit vectors, and then passed through a multilayer perceptron to obtain the driving style recognition result; The global model parameters are updated based on the vehicle speed information and driving style recognition results to determine the global model.

7. The method according to claim 1, characterized in that, The optimization of the local recognition model based on the prediction results of the global model includes: The global model is distributed to vehicle terminals to predict new driving behavior data based on the global model, thereby obtaining the prediction results of the global model. Based on the prediction results of the global model and the prediction results of the local recognition model for the new driving behavior data, the parameters of the local recognition model are updated to optimize the local recognition model based on the updated parameters.

8. A driving style recognition device, characterized in that, The device includes: A data acquisition module is used to acquire driving behavior data and determine a local recognition model based on a training dataset, wherein the training dataset is determined from the driving behavior data; The reliability weight determination module is used to determine the reliability weight of the local recognition model based on a first quantity in the training dataset and the proportion of samples belonging to the first category in the training dataset. The first quantity is used to characterize the accurate number of predictions made by the training dataset in the local recognition model. The global model training module is used to summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determine the total driving style probability distribution, and train the global model based on the total driving style probability distribution. The driving style prediction results are determined based on the local recognition model. The local model optimization module is used to optimize the local recognition model based on the prediction results of the global model.

9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the driving style recognition method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the driving style recognition method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Federal learning method and system for mixed noise robustness

    CN115577803A

  • Vehicle speed prediction method and device, electronic equipment and readable storage medium

    CN118953377A