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

Through the cloud-edge and edge-end coordinated driving style recognition method, the coordinated optimization of local recognition model and global model is solved, and the driving style recognition efficiency in the existing technology is achieved, achieving higher accuracy and robustness.

CN119734716AActive Publication Date: 2025-04-01CHINA TELECOM CLOUD TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411774226.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-04-01
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

The existing driving style recognition model is not efficient, ignoring user privacy and computing timeliness requirements, and the large amount of high-precision model parameters leads to slow inference speed.

Method used

The driving style recognition method with cloud edge and end collaborative means is adopted to obtain driving behavior data, determine the local recognition model, and determine the reliability weight based on the number and sample proportion of the training data set, summarize the prediction results and train the global model, and optimize the local recognition model.

Benefits of technology

It realizes the accuracy and robustness of driving style recognition without obtaining private driving data, and meets the requirements of fast response during vehicle driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119734716A_ABST
    Figure CN119734716A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent driving, and discloses a driving style identification method and device, computer equipment and a storage medium, and the method comprises the steps: obtaining driving behavior data, determining a local identification model based on a training data set, and obtaining a driving style identification model according to a first number in the training data set and a proportion of samples belonging to a first category in the training data set; determining the reliability weight of the local recognition model, summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model, determining total driving style probability distribution, and training a global model based on the total driving style probability distribution; and optimizing the local identification model based on the prediction result of the global model. A lightweight driving style model is realized at a vehicle end, a global model is adopted at a cloud end, the global model is a complex recognition model, and under the condition that the models are heterogeneous, the capability of the global model is integrated on the premise of not obtaining privacy 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] The present invention relates to the field of intelligent driving technology, and in particular to a driving style recognition method, device, computer equipment and storage medium. Background Art

[0002] Smart cars have become the strategic direction of the development of the global automotive industry. As a complex intelligent system integrating driving, perception, interaction and other functions, smart cars involve a variety of advanced technologies such as the Internet of Things, artificial intelligence, and human-computer interaction. Through the smart cockpit system, vehicle status information and driver's driving data, such as equipment status data, vehicle speed, direction, acceleration, etc., can be fully collected to provide effective support for big data analysis and decision-making. In order to achieve effective coordination between people, vehicles and roads, it is necessary to carefully analyze human driving behavior and driving style so that the assisted driving system can better complete the assisted driving task.

[0003] The existing driving style recognition task ignores the user privacy and computational timeliness requirements in actual use scenarios, and the high-precision recognition model has a large number of parameters, which will slow down the model reasoning 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, apparatus, computer device and storage medium to solve the problem that the current driving style recognition model is inefficient.

[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 data set, wherein the training data set is determined from the driving behavior data;

[0007] Determining a reliability weight of the local recognition model according to a first quantity in the training data set and a proportion of samples belonging to a first category in the training data set, wherein the first quantity is used to characterize an accurate quantity predicted by the training data set in the local recognition model;

[0008] Summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model to determine a total driving style probability distribution, and training a global model based on the total driving style probability distribution, wherein 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 obtaining driving behavior data, and determining a local recognition model based on a training data set, determining the reliability weight of the local recognition model according to the first number in the training data set and the proportion of samples belonging to the first category in the training data set, summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model, determining the 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 results of the global model. As a cloud-edge-end collaborative driving style recognition method, this method implements a lightweight driving style model on the vehicle side and adopts a global model on the cloud side. The global model is a complex recognition model with higher accuracy. It can integrate the capabilities of the terminal model in the case of heterogeneous models without obtaining private driving data, and achieve higher accuracy and robustness.

[0011] In an optional implementation, determining the local recognition model based on the training data set includes:

[0012] Determine a hidden layer vector based on the training data set, and fuse the hidden layer vectors at a specified time to obtain a target hidden layer vector;

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

[0014] In an optional implementation, determining the hidden layer vector based on the training data set and fusing the hidden layer vectors at a specified time to obtain a target hidden layer vector includes:

[0015] Using the training data set as an input of a bidirectional long short-term memory network model to determine a hidden layer vector;

[0016] A hidden layer vector at a first moment and a hidden layer vector at a last moment are extracted, and the hidden layer vector at the first moment and the hidden layer vector at the last moment are concatenated to obtain a target hidden layer vector.

[0017] In an optional implementation, determining the reliability weight of the local recognition model according to the first quantity in the training data set and the proportion of samples belonging to the first category in the training data set includes:

[0018] Determining the accuracy of the local recognition model according to a ratio of the first number corresponding to the training data set to the total number;

[0019] Calculating the distribution balance of the training data set according to the proportion of samples belonging to the first category in the training data set;

[0020] A 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 a reliability weight of the local recognition model.

[0021] In an optional implementation, the distribution balance of the training data set is determined according to the following formula:

[0022]

[0023] Where P(k) represents the sample proportion of data category k in the training data set, b i Indicates the distribution balance of the training data set.

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

[0025] Performing random masking and position encoding preprocessing on the driving behavior data, and inputting the data into an encoder for multi-head self-attention calculation to restore vehicle speed information;

[0026] The cross attention is calculated based on the decoder and implicit vector, and then passed through a multi-layer perceptron to obtain the driving style recognition result;

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

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

[0029] Distributing the global model to vehicle terminals to predict new driving behavior data based on the global model to obtain prediction results of the global model;

[0030] Based on the prediction result of the global model and the prediction result 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, configured to acquire driving behavior data and determine a local recognition model based on a training data set, wherein the training data set is determined from the driving behavior data;

[0033] a reliability weight determination module, configured to determine a reliability weight of the local recognition model according to a first quantity in the training data set and a proportion of samples belonging to a first category in the training data set, wherein the first quantity is used to characterize an accurate quantity predicted by the training data set in the local recognition model;

[0034] a global model training module, configured to summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition models, determine a total driving style probability distribution, and train a global model based on the total driving style probability distribution, wherein the driving style prediction results are determined based on the local recognition models;

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

[0036] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the driving style recognition method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the driving style recognition method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

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

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

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

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

[0043] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] The current driving style recognition tasks can be divided into action recognition and overall recognition. In action recognition, the driving behavior is decomposed into a series of operations, and then the driving style is recognized based on some of the operations. A context-aware system is proposed in the related art to classify operations into dangerous or normal categories by detecting predefined operations (including U-turns, turns, and lane changes, etc.). However, this type of task is limited by the completeness of the predefined operations and the start and end time judgment of the operation behavior. Overall recognition uses data mining technology to extract hidden features from the original driving data, and then uses supervised or unsupervised methods for recognition.

[0046] However, in the existing driving style recognition methods, in order to achieve high-precision recognition effects, a large amount of location-related driving data is required, which involves the user's personal information. On the other hand, when the vehicle is driving at high speed, it is necessary to quickly identify the driving style and quickly intervene in dangerous driving behaviors to ensure driving safety. However, the number of high-precision recognition model parameters is relatively large, resulting in a slow model inference speed, which cannot meet the requirements of rapid response during vehicle driving. Based on this, the present invention provides a driving style recognition method. Applied 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 of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0048] In this embodiment, a driving style recognition method is provided, which is applied to the above-mentioned cloud device. Figure 1 is a flow chart of a driving style recognition method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0049] Step S101, acquiring driving behavior data, and determining a local recognition model based on a training data set.

[0050] The training data set is determined from the driving behavior data. For each vehicle, the driving behavior data of the vehicle is obtained. Specifically, the collected driving behavior data can be obtained from the terminal of each vehicle. The driving behavior data contains multiple driving trajectories, and each driving trajectory contains vehicle information at multiple times. The vehicle information includes vehicle position, speed, acceleration, lateral deviation, etc. Based on the actual driving situation, the driving style is annotated for each driving trajectory in the driving behavior data, and the annotated data constitutes the training data set. As an example, the driving style may include aggressive, moderate, and conservative.

[0051] The labeled driving behavior data (i.e., training data set) is used to train a local driving style recognition model for each vehicle, i.e., the vehicle's local recognition model. The local recognition model structure includes a bidirectional long short-term memory network model, which models the driver's driving behavior (e.g., acceleration, deceleration, lane change, etc.) over a period of time, and then uses a multi-layer 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 data set.

[0053] Step S102, determining the reliability weight of the local recognition model according to the first quantity in the training data set and the proportion of samples belonging to the first category in the training data set.

[0054] The first quantity is used to characterize the accurate quantity predicted by the training data set in the local recognition model.

[0055] Calculate the accuracy of the local recognition model for each vehicle and the distribution balance of the training data set. First, obtain the first quantity in the training data set, which is the accurate quantity predicted by the training data set in the local recognition model, and calculate the accuracy of the local recognition model through the first quantity. Calculate the distribution balance of the training data set according to the proportion of samples belonging to the first category in the training data set, where the first category represents any specified category.

[0056] The reliability score of the local recognition model is calculated by comprehensively considering the accuracy of the local recognition model and the distribution balance of the training data set, and the scores of all local recognition models are normalized to obtain the reliability weight of each local recognition model.

[0057] Step S103 , summarizing the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determining the total driving style probability distribution, and training the global model based on the total driving style probability distribution.

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

[0059] Collect some unlabeled data from driving behavior data, distribute these data to the local recognition model of each vehicle terminal, input these unlabeled data into the local recognition model, predict through the local recognition model, and output the driving style prediction result. Aggregate the driving style prediction results of each vehicle local terminal to the cloud. For each unlabeled data, based on the driving style prediction result and the reliability weight of the local recognition model, summarize the corresponding driving style probability distribution. As an example, all driving style prediction results can be summarized by calculating the product sum of all driving style prediction results and reliability weights, and the result obtained is the total driving style probability distribution.

[0060] The global model is trained based on the total driving style probability distribution. The global model is a model deployed in the cloud. In this embodiment, the global model in the cloud is trained using the distillation learning concept.

[0061] Step S104, optimizing the local recognition model based on the prediction result of the global model.

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

[0063] The driving style recognition method provided in this embodiment includes obtaining driving behavior data, and determining a local recognition model based on a training data set, determining the reliability weight of the local recognition model according to the first number in the training data set and the proportion of samples belonging to the first category in the training data set, summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model, determining the 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 results of the global model. As a cloud-edge-end collaborative driving style recognition method, this method implements a lightweight driving style model on the vehicle side and adopts a global model on the cloud side. The global model is a complex recognition model with higher accuracy. It can integrate the capabilities of the terminal model in the case of heterogeneous models without obtaining private driving data, and achieve higher accuracy and robustness.

[0064] In this embodiment, a driving style recognition method is provided, and the method comprises the following steps:

[0065] Step S201, acquiring driving behavior data, and determining a local recognition model based on a training data set.

[0066] Specifically, the above step S201 includes:

[0067] Step S2011, determine the hidden layer vector based on the training data set, and fuse the hidden layer vectors at the specified time to obtain the target hidden layer vector.

[0068] For a certain vehicle terminal, the driving behavior data generated is D = {T1, T2, ..., T H}, which contains H driving trajectories, each driving trajectory Contains vehicle information at t moments, including vehicle position, speed, acceleration, lateral deviation, etc. The superscript h of the vehicle information of the driving trajectory is omitted without causing ambiguity. Based on the actual driving situation, for each trajectory T h Mark its driving style h ,y h ∈{1,2,3} represent the three driving styles of aggressive, moderate and conservative respectively.

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

[0070] The designated time is one or more specific time periods, and the hidden layer vectors corresponding to the designated time periods are concatenated to obtain the target hidden layer vector.

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

[0072] Step a1, using the training data set as the input of the bidirectional long short-term memory network model to determine the hidden layer vector.

[0073] like Figure 2 As shown in the figure, the continuous driving behaviors {X1,X2,…,X t} as the input of the bidirectional long short-term memory network model, so as to obtain the hidden vector {h1,h2,…,h t}.

[0074] Specifically, the hidden vector corresponding to the context information before and after the driving behavior fusion is {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 recurrent neural network, t represents t moments, X t represents the vehicle information at time t, h t Represents the hidden layer vector at time t.

[0077] Step a2, extracting the hidden layer vector at the first moment and the hidden layer vector at the last moment, and concatenating the hidden layer vector at the first moment and the hidden layer vector at the last moment to obtain the target hidden layer vector.

[0078] As an implementation method, the designated moments are the first moment and the last moment, the hidden layer vector at the first moment and the hidden layer vector at the last moment are taken, and the hidden layer vector h1 at the first moment and the hidden layer vector h at the last moment are calculated. t After concatenation, the target hidden layer vector is obtained.

[0079] Step S2012, predicting the probability distribution of the driving style based on the target hidden layer vector, and calculating the cross entropy loss based on the probability distribution of the driving style and the training data set, so as to determine the local recognition model according to the cross entropy loss.

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

[0081]

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

[0083] The cross entropy loss is calculated based on the true annotation results (i.e., training data set) and the probability distribution of driving style (i.e., prediction results):

[0084]

[0085] Among them, m represents the size of the data set, y (i) represents the true labeling result corresponding to the i-th sample, represents the probability of belonging to category k in the driving style probability distribution predicted by the i-th sample, It represents the probability of belonging to category j in the driving style probability distribution predicted by the i-th sample.

[0086] The cross entropy loss function is used to evaluate the model performance. The smaller the cross entropy loss, the better the performance of the model on the validation set, that is, the more accurate the model's prediction of the true annotation results. According to the cross entropy loss on the validation set, the model with the smallest loss is selected to determine the most appropriate local recognition model.

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

[0088] Step S202, determining the reliability weight of the local recognition model according to the first quantity in the training data set and the proportion of samples belonging to the first category in the training data set.

[0089] Specifically, the above step S202 includes:

[0090] Step S2021, determining the accuracy of the local recognition model according to the ratio of the first number corresponding to the training data set to the total number.

[0091] The first quantity is used to characterize the accurate number of predictions of the training data set in the local recognition model. The accuracy p of the local recognition model of the vehicle terminal i It is calculated as follows:

[0092]

[0093] Among them, c i Indicates that the training data set (i.e., labeled data) is local recognition model M i The exact number of predictions, m i represents the total quantity (i.e. the total amount of data), p i Indicates the accuracy of the local recognition model.

[0094] Step S2022, calculating the distribution balance of the training data set according to the proportion of samples belonging to the first category in the training data set.

[0095] The first category represents any specific category and is not specifically limited. The distribution balance of the training data set local to the vehicle terminal b i Determined according to the following formula:

[0096]

[0097] Where P(k) represents the sample proportion of data category k in the training data set, b i Indicates the distribution balance of the training data set.

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

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

[0100] s i =p i ×b i

[0101] Among them, b i Indicates the distribution balance of the training data set, p i represents the accuracy of the local recognition model, s i Represents the reliability score of the local recognition model.

[0102] The reliability scores are normalized. As an example, the reliability scores of all local recognition models are transformed by Softmax to obtain the final reliability weight. The sum of the reliability weights of all local recognition models is 1. Softmax is an activation function that can normalize a numerical vector into a probability distribution vector. i The details are as follows:

[0103]

[0104] Among them, r i Represents the reliability weight.

[0105] Step S203 , summarizing the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition model, determining the total driving style probability distribution, and training the global model based on the total driving style probability distribution.

[0106] Specifically, the training of the global model based on the total driving style probability distribution in step S203 includes:

[0107] Step S2031, performing random masking and position encoding preprocessing on the driving behavior data, and inputting the data into the encoder for multi-head self-attention calculation to restore the vehicle speed information;

[0108] Step S2032, calculating cross attention based on the decoder and implicit vector, and passing through a multi-layer perceptron to obtain a driving style recognition result;

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

[0110] Before training the global model based on the total driving style probability distribution, we first need to collect some unlabeled driving behavior data, distribute the unlabeled data to the vehicle terminal for prediction, and aggregate it to the cloud server. A driver with rich driving experience drives the vehicle randomly on the road to collect some data without style labels but only driving behavior data, denoted as D u . For the unlabeled public dataset D u , an unlabeled sample X u ∈D u Input to each local recognition model M i , and get the prediction result Combined with the reliability weight r of the local recognition model i , summarize all the prediction results, as follows:

[0111]

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

[0113] Similarly, we can calculate the entire data set D u Make a prediction, and the result can be recorded as:

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

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

[0116] Among them, {X′1,…X′ t} represents unlabeled driving behavior data, (X1,…X t ) represents the continuous driving behavior in the training data set, flag t Represents the mask mark of the vehicle at time t.

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

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

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

[0120] Among them, pos represents the position of the current time step in the complete driving trajectory, d represents the dimension of the position encoding, 2i represents the even dimension, 2i+1 represents the odd dimension, and PE (pos,2i) Indicates that the position encoding is an even-numbered position embedding vector, PE (pos,2i+1) The embedding vector representing the position where the position encoding is an odd number.

[0121] The masked data plus the position code is input into L encoders. Each encoder contains multi-head self-attention, normalization and linear layers. The calculation process is as follows:

[0122] Use three linear transformations to transform the input into Q, K, V matrices:

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

[0124] Calculate attention and weight:

[0125]

[0126] Among them, d k Represents the dimensions of Q, K, and v. Repeat the above process multiple times to generate multi-head self-attention results, and then concatenate the results. Then the results are normalized and linearized:

[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] At the same time, the output of the last encoder is input to the decoder to calculate the cross attention with a learnable implicit vector. The result of the cross attention layer is normalized and multi-layer perceptron to obtain the driving style recognition result:

[0131]

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

[0133]

[0134] Among them, α and β are two hyperparameters used to control the weights of the two parts of the error, MSE(·,·) represents the mean square error of the two values, X i [v] indicates input X i speed information, η represents the learning rate, σ represents the activation function, KL(·,·) represents the calculation of the KL divergence of two distributions, represents the j-th round of cloud model parameters at time t, Represents the cloud model dataset D u The predicted probability of .

[0135] Step S204, optimizing the local recognition model based on the prediction result of the global model.

[0136] Specifically, the above step S204 includes:

[0137] Step S2041, distributing the global model to the vehicle terminal to predict the new driving behavior data based on the global model to obtain the prediction result of the global model.

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

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

[0140] Step S2042: based on the prediction result of the global model and the prediction result 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.

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

[0142]

[0143] in, Represents the local recognition model M i The parameters in the kth round, Represents the local recognition model M i For new driving behavior data X new The predicted probability, σ(f(θ,X new )) represents the predicted probability of the global model for new driving behavior data.

[0144] The driving style recognition method provided by the present invention realizes a lightweight driving style recognition model on the vehicle side, uses a bidirectional long short-term memory network and a multi-layer perceptron to model driving behavior and recognize driving style, and ensures that the recognition speed meets the low latency requirements of the vehicle driving process. A complex recognition model with high accuracy is realized on the cloud side, and the knowledge distillation technology is used to comprehensively aggregate the capabilities of the terminal model without obtaining private driving data in the case of heterogeneous models, so as to achieve higher accuracy and robustness. The recognition model on the cloud side uses multi-head self-attention mechanism, self-supervised learning and other strategies to learn the deep correlation between driving behavior and driving style, and has stronger learning ability and better recognition effect. Using knowledge distillation technology, the complex model on the server side then reversely guides the terminal model to optimize its own parameters, reducing the impact of data distribution deviation on local model training, which is conducive to improving the recognition accuracy of the terminal model. At the same time, when training the cloud model, a reliability evaluation method is proposed to evaluate the contribution of the terminal model to the server-side model according to the performance of the terminal model and the characteristics of the data, so as to avoid the interference of inferior models.

[0145] In this embodiment, a driving style recognition device is also provided, which is used to implement the above embodiments and implementation methods, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

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

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

[0148] A reliability weight determination module 302, configured to determine a reliability weight of the local recognition model according to a first quantity in the training data set and a proportion of samples belonging to a first category in the training data set, wherein the first quantity is used to characterize an accurate quantity predicted by the training data set in the local recognition model;

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

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

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

[0152] A target hidden layer vector determination unit, used to determine a hidden layer vector based on the training data set, and fuse the hidden layer vectors at a specified time to obtain a target hidden layer vector;

[0153] A 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 data set 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] A hidden layer vector determination subunit, used for using the training data set as an input of a bidirectional long short-term memory network model to determine a hidden layer vector;

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

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

[0158] an accuracy calculation unit, configured to determine the accuracy of the local recognition model according to a ratio of a first number corresponding to the training data set to a total number;

[0159] a distribution balance calculation unit, configured to calculate the distribution balance of the training data set according to the proportion of samples belonging to the first category in the training data set;

[0160] A 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 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 data set is determined according to the following formula:

[0162]

[0163] Where P(k) represents the sample proportion of data category k in the training data set, b i Indicates the distribution balance of the training data set.

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

[0165] A speed information determination unit, used for performing random masking and position encoding preprocessing on the driving behavior data, and inputting the data into an encoder for multi-head self-attention calculation to restore vehicle speed information;

[0166] A driving style recognition determination unit, which is used to calculate cross attention based on the decoder and implicit vector, and pass through a multi-layer perceptron to obtain a 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 the driving style recognition result to determine the global model.

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

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

[0170] A parameter updating unit is used to update the parameters of the local recognition model based on the prediction result of the global model and the prediction result 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] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

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

[0173] The embodiment of the present invention also provides a computer device having the above Figure 4 The driving style recognition device shown.

[0174] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0175] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0176] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0177] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

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

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

[0180] The input device can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0181] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0182] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

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

Claims

1. A driving style recognition method, characterized in that: The method comprises: Acquire driving behavior data and determine a local recognition model based on a training data set, wherein the training data set is determined from the driving behavior data; Determining a reliability weight of the local recognition model according to a first quantity in the training data set and a proportion of samples belonging to a first category in the training data set, wherein the first quantity is used to characterize an accurate quantity predicted by the training data set in the local recognition model; Summarizing the driving style prediction results based on the driving style prediction results and the reliability weight of the local recognition model to determine a total driving style probability distribution, and training a global model based on the total driving style probability distribution, wherein 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 determining of the local recognition model based on the training data set includes: Determine a hidden layer vector based on the training data set, and fuse the hidden layer vectors at a specified time to obtain a target hidden layer vector; A probability distribution of the driving style is predicted based on the target hidden layer vector, and a cross entropy loss is calculated based on the probability distribution of the driving style and the training data set to determine a local recognition model according to the cross entropy loss.

3. The method according to claim 2, characterized in that The step of determining a hidden layer vector based on the training data set and fusing the hidden layer vectors at a specified time to obtain a target hidden layer vector includes: Using the training data set as an input of a bidirectional long short-term memory network model to determine a hidden layer vector; A hidden layer vector at a first moment and a hidden layer vector at a last moment are extracted, and the hidden layer vector at the first moment and the hidden layer vector at the last moment are concatenated to obtain a 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 according to the first quantity in the training data set and the proportion of samples belonging to the first category in the training data set includes: Determining the accuracy of the local recognition model according to a ratio of the first number corresponding to the training data set to the total number; Calculating the distribution balance of the training data set according to the proportion of samples belonging to the first category in the training data set; A 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 a reliability weight of the local recognition model.

5. The method according to claim 4, characterized in that The distribution balance of the training data set is determined according to the following formula: Where P(k) represents the sample proportion of data category k in the training data set, b i Indicates the distribution balance of the training data set.

6. The method according to claim 1, characterized in that The training of the global model based on the total driving style probability distribution comprises: Performing random masking and position encoding preprocessing on the driving behavior data, and inputting the data into an encoder for multi-head self-attention calculation to restore vehicle speed information; The cross attention is calculated based on the decoder and implicit vector, and then passed through a multi-layer perceptron to obtain the driving style recognition result; The global model parameters are updated based on the vehicle speed information and the driving style recognition result to determine a global model.

7. The method according to claim 1, characterized in that The optimizing the local recognition model based on the prediction result of the global model comprises: Distributing the global model to vehicle terminals to predict new driving behavior data based on the global model to obtain prediction results of the global model; Based on the prediction result of the global model and the prediction result 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 comprises: a data acquisition module, configured to acquire driving behavior data and determine a local recognition model based on a training data set, wherein the training data set is determined from the driving behavior data; a reliability weight determination module, configured to determine a reliability weight of the local recognition model according to a first quantity in the training data set and a proportion of samples belonging to a first category in the training data set, wherein the first quantity is used to characterize an accurate quantity predicted by the training data set in the local recognition model; a global model training module, configured to summarize the driving style prediction results based on the driving style prediction results and the reliability weights of the local recognition models, determine a total driving style probability distribution, and train a global model based on the total driving style probability distribution, wherein the driving style prediction results are determined based on the local recognition models; The local model optimization module is used to optimize the local recognition model based on the prediction result of the global model.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, 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, and the computer instructions are used to enable a computer to execute 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

  • Driving behavior prediction method and device, computer equipment and storage medium

    CN116022154A

  • Offline federal reinforcement learning method and device based on double regularization

    CN118211678A

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

    CN118953377A