Driving mode recognition method and system, electronic equipment and storage medium
By combining the recognition results of driving data and deep learning models, the problem of low accuracy in vehicle driving pattern recognition in the prior art is solved, and higher recognition accuracy and generalization capabilities are achieved, providing immediate feedback for the vehicle control system.
Patent Information
- Application Number
- CN202510239078.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art has low accuracy and poor generalization ability when determining vehicle driving modes.
By obtaining driving data during the vehicle's driving process, using preset conditions and feature parameters to determine the initial driving mode, and combining pre-trained recognition models (including convolutional neural networks, long-term and short-term memory neural networks and attention mechanisms) to check and correct the recognition results, the vehicle's driving mode is finally determined.
It improves the accuracy and generalization ability of driving pattern recognition, can more accurately capture the differences in driving modes of different users, and promptly respond to changes in driving styles, providing immediate feedback to the vehicle control system.
Smart Images

Figure CN119749571A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of driving mode recognition, and in particular to a driving mode recognition method, system, electronic device and storage medium. Background Art
[0002] With the advancement of science and technology and the development of automotive electronics, modern vehicles are generally equipped with automated driving functions, providing drivers with a more convenient and relaxing driving experience, making vehicles safer and more efficient on the road. In order to make the driving mode more in line with the user's driving habits, the relevant technology usually determines the vehicle's driving mode through parameters during the vehicle's driving process, which has the problems of low accuracy and poor generalization ability. Summary of the invention
[0003] In view of the above, it is necessary to propose a driving mode recognition method, system, electronic device and storage medium to solve the technical problem of low accuracy in determining the driving mode of a vehicle.
[0004] The present application provides a driving mode recognition method, which is applied to an electronic device, wherein the electronic device is arranged in a vehicle, and the method comprises: acquiring driving data during the driving process of the vehicle; when a first characteristic parameter in the driving data meets a preset condition, determining that the driving mode of the vehicle is a first driving mode; the first characteristic parameter is used to characterize the driving state of the vehicle; when the first characteristic parameter in the driving data does not meet the preset condition, based on the driving data, determining a first recognition result of the vehicle according to a pre-trained first recognition model; based on the driving data, determining a second recognition result of the vehicle according to a second recognition model; according to the first recognition result and the second recognition result, determining that the driving mode of the vehicle is a second driving mode; and outputting the driving mode of the vehicle.
[0005] In some embodiments, the method also includes training the first recognition model, and the training of the first recognition model includes: obtaining historical driving data of the vehicle and the driving mode corresponding to the historical driving data; determining corresponding prediction mode data based on the historical driving data and a pre-constructed initial recognition model; determining a loss value of the initial recognition model based on the prediction mode data and the driving mode corresponding to the historical driving data; updating the initial recognition model based on a back propagation algorithm until the loss value meets a preset termination condition, stopping updating the initial recognition model, and obtaining a first recognition model trained to a convergence state.
[0006] In some embodiments, determining the second driving mode of the vehicle based on the first recognition result and the second recognition result includes: when the first recognition result and the second recognition result are different, determining the first candidate mode indicated by the first recognition result, and determining the second candidate mode indicated by the second recognition result; determining a first probability value of the first candidate mode output by the first recognition model based on the historical driving data; determining a second probability value of the second candidate mode output by the second recognition model based on the historical driving data; and determining the second driving mode of the vehicle based on the first probability value and the second probability value.
[0007] In some embodiments, determining the second driving mode of the vehicle based on the first probability value and the second probability value includes: when the first probability value is greater than the second probability value, determining that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; when the first probability value is less than the second probability value, determining that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0008] In some embodiments, determining the second driving mode of the vehicle based on the first probability value and the second probability value includes: determining the first probability value as valid data when the driving mode corresponding to the historical driving data is the same as the first candidate mode; determining the second probability value as valid data when the driving mode corresponding to the historical driving data is the same as the second candidate mode; determining a first mean based on the valid first probability value; determining a second mean based on the valid second probability value; when the first mean is greater than the second mean, determining that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; when the first mean is less than the second mean, determining that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0009] In some embodiments, determining the second driving mode of the vehicle based on the first recognition result and the second recognition result includes: when the first recognition result and the second recognition result are the same, determining that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0010] In some embodiments, the preset condition includes: the first characteristic parameter is greater than a preset first threshold; or the first characteristic parameter is less than a preset second threshold.
[0011] An embodiment of the present application also provides a driving mode recognition system, including an electronic device installed on a vehicle, and the electronic device is used to obtain driving data of the vehicle during driving; the electronic device is also used to determine that the driving mode of the vehicle is a first driving mode when a first characteristic parameter in the driving data meets a preset condition; the first characteristic parameter is used to characterize the driving state of the vehicle; the electronic device is also used to determine a first recognition result of the vehicle based on the driving data according to a pre-trained first recognition model when the first characteristic parameter in the driving data does not meet the preset condition; based on the driving data, determine a second recognition result of the vehicle according to a second recognition model; the electronic device is also used to determine that the driving mode of the vehicle is a second driving mode based on the first recognition result and the second recognition result; the electronic device is also used to output the driving mode of the vehicle.
[0012] An embodiment of the present application also provides an electronic device, comprising: a memory storing at least one instruction; and a processor executing the instruction stored in the memory to implement the driving mode recognition method.
[0013] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the driving mode recognition method is implemented.
[0014] It can be seen from the above technical solutions that the embodiment of the present application realizes real-time recognition of the constantly changing driving style of the user during actual driving by acquiring the vehicle's driving data in real time and statistically analyzing multiple operating status parameters in the vehicle's driving data. It can capture the differences in driving modes of different users, ensure that the vehicle can respond quickly to changes in driving style, and provide instant feedback to the vehicle control system. In the process of driving mode recognition, by integrating the threshold judgment method and the deep learning model, the driving mode of the vehicle is determined based on the vehicle status parameters during the user's actual driving process while ensuring the recognition efficiency, which can improve the accuracy of driving mode recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is an application scenario diagram of a driving mode recognition method provided in one embodiment of the present application.
[0016] Figure 2 This is a flowchart of a driving mode recognition method provided in one embodiment of the present application.
[0017] Figure 3 This is a flowchart of a method for training a first recognition model provided in one embodiment of the present application.
[0018] Figure 4It is a schematic diagram of a first recognition model provided in an embodiment of the present application.
[0019] Figure 5 It is a schematic diagram of a method for determining a second driving mode provided in an embodiment of the present application.
[0020] Figure 6 It is a schematic diagram of a method for determining a second driving mode provided in another embodiment of the present application.
[0021] Figure 7 It is a schematic diagram of a method for determining a second driving mode provided in yet another embodiment of the present application.
[0022] Figure 8 is a schematic diagram of a driving mode recognition system provided in one embodiment of the present application.
[0023] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to more clearly understand the purpose, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other. In the following description, many specific details are set forth to facilitate a full understanding of the present application, and the embodiments described are only a part of the embodiments of the present application, rather than all of the embodiments.
[0025] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used herein in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0027] The embodiment of the present application provides a driving mode recognition method, which can be applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device, etc.
[0028] An electronic device can be any electronic product that can interact with customers, such as personal computers, tablet computers, smart phones, personal digital assistants (PDAs), game consoles, Internet Protocol Television (IPTV), smart wearable devices, etc.
[0029] The electronic device may also include a network device and / or a client device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud consisting of a large number of hosts or network servers based on cloud computing.
[0030] The networks where electronic devices are located include but are not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0031] like Figure 1The figure shows an application scenario diagram of a driving mode recognition method provided by an embodiment of the present application. The driving mode recognition method provided by the present application can be applied to an electronic device 100. The electronic device 100 is arranged in a vehicle 200, and the electronic device 100 is connected to a vehicle-mounted device in the vehicle 200 for communication. Among them, the vehicle-mounted device includes a vehicle controller 300. During the driving process of the vehicle 200, the electronic device 100 obtains the driving data of the vehicle 200 from the vehicle controller 300 in real time. The electronic device 100 also determines that the driving mode of the vehicle 200 is the first driving mode when the first characteristic parameter in the driving data meets the preset condition. When the first characteristic parameter in the driving data does not meet the preset condition, the electronic device 100 determines the first recognition result of the vehicle 200 based on the driving data according to the pre-trained first recognition model. The electronic device 100 also determines the second recognition result of the vehicle 200 based on the driving data according to the second recognition model. The electronic device 100 is also used to determine that the driving mode of the vehicle 200 is the second driving mode according to the first recognition result and the second recognition result. The electronic device 100 is also used to output the driving mode of the vehicle 200.
[0032] like Figure 2 , is a flowchart of a driving mode recognition method provided in an embodiment of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted. A driving mode recognition method provided in an embodiment of the present application includes the following steps.
[0033] S20, obtaining driving data of the vehicle during driving.
[0034] In one embodiment of the present application, in order to determine the driving style of the driver when driving the vehicle, the vehicle's driving data can be obtained in real time from the vehicle-mounted device during the vehicle's driving. The vehicle-mounted device can be a sensor, a vehicle controller, etc., which is not limited in the present application.
[0035] In one embodiment of the present application, the driving data of the vehicle during driving can be used to characterize the actual driving state of the vehicle. For example, the driving data can be the wheel speed of the vehicle, the vehicle driving speed, the vehicle driving acceleration, the vehicle yaw rate, the distance between the vehicle and the preceding vehicle, the vehicle driving torque, the steering wheel angle / speed, the brake pedal depth, the accelerator pedal depth, the vehicle latitude and longitude coordinates, etc., which are not limited in the present application.
[0036] In one embodiment of the present application, in order to improve the quality of the acquired vehicle driving data, the driving data may be preprocessed to improve the quality of the driving data. Specifically, the preprocessing of the vehicle driving data includes: first, segmenting and cutting the data to eliminate invalid and abnormal data in the data collection process, such as data with obvious glitches, data of the vehicle in a stationary state, and data of the vehicle in a uniform speed driving process. Next, the data is segmented and processed, and the operating condition type of each segment of data is further determined. For example, the operating condition types include turning / U-turning, overtaking / changing lanes, starting / stopping, and accelerating / decelerating. The judgment basis is that the operating condition identification is performed every 5 seconds within a 10-second time period. For example, when the sum of the squares of the yaw rate exceeds 80, and the absolute value of the vehicle steering angle is greater than 30 degrees, or the absolute value of the maximum yaw rate exceeds 7.5 degrees, and the average vehicle speed is maintained between 15 and 60, it is determined to be a turning / U-turn condition; if the sum of the squares of the yaw rate is greater than 200, and the absolute value of the vehicle steering angle is greater than 2.5 degrees, or the sum of the squares of the yaw rate is greater than 150, and the absolute value of the vehicle steering angle is greater than 3.5 degrees, and the absolute value of the vehicle steering angle is less than 30 degrees, and the average vehicle speed exceeds 60, and the minimum speed also exceeds 50, it is determined to be a high-speed lane change / overtaking condition. When the sum of the squares of the yaw rate is less than 150, or the absolute value of the vehicle steering angle is less than 30 degrees, and the minimum speed is less than 3, and the maximum speed exceeds 10, and the accelerator pedal position is greater than 18, or the brake pedal position is greater than 20, it is determined to be a starting / stopping condition. If the absolute value of the vehicle steering angle is less than 30 degrees, the minimum speed is greater than 15, the average speed is greater than 25, and the absolute value of the maximum yaw rate is less than 7.5 degrees, and the maximum speed is at least 18 greater than the minimum speed, it is determined to be an acceleration / deceleration condition. Then, combined with the recorded evaluation results of the driver's driving style at key locations (such as turns, roundabouts, gates) and each test section (corresponding to different road types), and using the latitude and longitude position information of the vehicle, the driving style of the driver in each section of data is accurately marked. Subsequently, feature selection is carried out. In-depth analysis of the collected vehicle state parameters, vehicle handling parameters, derived parameters of the collected parameters (such as impact degree), and statistical characteristic parameters of the collected parameters (including mean, variance, maximum value, etc.) is carried out to identify parameters that have an important impact on driving style. The most important vehicle state parameters, their derived parameters and statistical characteristic parameters are selected as input parameters of the machine learning model. Finally, the data is normalized and the processed sample data is divided into training set, validation set and test set to improve the applicability and generalization ability of the machine learning model in different usage scenarios.
[0037] S21, when a first characteristic parameter in the driving data meets a preset condition, determining that the driving mode of the vehicle is a first driving mode; the first characteristic parameter is used to characterize the driving state of the vehicle.
[0038] In one embodiment of the present application, when the driver is driving the vehicle, due to the difference in the working conditions of the vehicle itself or the difference in the subjective feelings of the driver, the actual driving mode of the vehicle may deviate from the driver's expectations. For example, when the driver turns the steering wheel to steer the vehicle, due to the tolerance of the vehicle's transmission system or the error caused by the friction between the wheels and the ground, the steering angle of the vehicle and the driver's steering intention are different; when the driver steps on the accelerator pedal to accelerate the vehicle, due to the tolerance of the accelerator pedal itself, the acceleration of the vehicle and the driver's acceleration intention are different; when the driver steps on the brake pedal to brake the vehicle, due to the tolerance of the brake pedal itself, the braking force applied to the vehicle by the braking system and the driver's deceleration intention are different. Therefore, the actual driving mode of the vehicle can be determined based on the vehicle's driving data, so that the actual driving mode of the vehicle can be fed back to the driver, helping the driver to accurately evaluate the current driving mode of the vehicle and improve the driver's driving experience and driving safety.
[0039] In an embodiment of the present application, the driving data includes a first characteristic parameter, and the first characteristic parameter can indicate the driving state of the vehicle. For example, the first characteristic parameter can be the yaw angle of the vehicle, the steering angle of the vehicle, the yaw angular velocity of the vehicle, or the average speed of the vehicle, which is not limited in the present application.
[0040] In one embodiment of the present application, in order to improve the efficiency of determining the vehicle driving mode, the vehicle driving mode can be determined according to the first characteristic parameter in the driving data. Specifically, when the first characteristic parameter in the driving data meets the preset condition, it indicates that the driving condition of the vehicle meets the preset condition, and the driving mode of the vehicle can be determined to be the first driving mode.
[0041] In one embodiment of the present application, the preset condition includes: the first characteristic parameter is greater than a preset first threshold value; or the first characteristic parameter is less than a preset second threshold value. The first threshold value is used to characterize the critical value of the first characteristic parameter of the vehicle when the driving mode of the vehicle is an aggressive mode. When the first characteristic parameter is greater than the first threshold value, it can be determined that the driving mode of the vehicle is an aggressive mode. The second threshold value is used to characterize the critical value of the second characteristic parameter of the vehicle when the driving mode of the vehicle is a gentle mode. When the first characteristic parameter is less than the second threshold value, it can be determined that the driving mode of the vehicle is a gentle mode.
[0042] For example, the first threshold value may be that the yaw angle of the vehicle is 30 degrees, the steering angle of the vehicle is 20 degrees, the yaw rate of the vehicle is 1 degree per second, and the average speed of the vehicle is 140 kilometers per hour; the second threshold value may be that the yaw angle of the vehicle is 3 degrees, the steering angle of the vehicle is 3 degrees, the yaw rate of the vehicle is 0.01 degrees per second, and the average speed of the vehicle is 30 kilometers per hour. In the case where the yaw angle of the vehicle is greater than 30 degrees, the steering angle of the vehicle is greater than 20 degrees, the yaw rate of the vehicle is greater than 1 degree per second, and the average speed of the vehicle is greater than 140 kilometers per hour in the first characteristic parameters of the vehicle, it indicates that the first characteristic parameter of the vehicle during driving is greater than the first threshold value, and the first driving mode of the vehicle can be determined to be an aggressive mode. In the case where the yaw angle of the vehicle is less than 3 degrees, the steering angle of the vehicle is less than 3 degrees, the yaw rate of the vehicle is less than 0.01 degrees per second, and the average speed of the vehicle is less than 30 kilometers per hour in the first characteristic parameters of the vehicle, it indicates that the first characteristic parameter of the vehicle during driving is less than the second threshold value, and the first driving mode of the vehicle can be determined to be a gentle mode.
[0043] In one embodiment of the present application, after determining the first driving mode of the vehicle, relevant information of the first driving mode can be output, thereby providing the driver with the real driving mode information of the vehicle and assisting the driver in controlling the vehicle. For example, when the first driving mode is the soft mode, the driver can be prompted by voice or text that the current driving mode of the vehicle is the soft mode, so as to prompt the driver to switch or maintain the driving mode according to the current environment, thereby improving driving safety.
[0044] S22, when the first characteristic parameter in the driving data does not meet the preset conditions, based on the driving data, according to a pre-trained first recognition model, determine a first recognition result of the vehicle; based on the driving data, according to a second recognition model, determine a second recognition result of the vehicle.
[0045] In one embodiment of the present application, when the first characteristic parameter in the driving data does not meet the preset conditions, indicating that the current real driving condition of the vehicle cannot be determined based on the first characteristic parameter of the vehicle, the driving data can be processed according to the pre-trained first recognition model and the second recognition model, respectively, to obtain the first recognition result output by the first recognition model and the second recognition result output by the second recognition model. The first recognition result is used to indicate the first candidate mode, and the second recognition result is used to indicate the second candidate mode. In order to improve the accuracy of identifying the driving mode of the vehicle, the real driving mode of the vehicle can be determined by comparing the first recognition result and the second recognition result.
[0046] In one embodiment of the present application, the first recognition model may be a pre-trained neural network model. The first recognition model includes a convolutional layer, a long short-term memory layer, and an attention layer. In order to improve the accuracy of the first recognition model in recognizing the driving mode, the first recognition model may be trained based on the historical driving data of the vehicle, thereby improving the performance of the first recognition model. For details, please refer to the method for training the first recognition model. Figure 3 Corresponding detailed description. Among them, the historical driving data can be the driving data collected in advance when multiple drivers drive their vehicles in sections with different road conditions. Specifically, the driving modes of multiple drivers include at least aggressive, sporty, stable and gentle. Among them, the driving time of each driver is between 1.5 hours and 2 hours, and the road conditions of the driving section include various road types such as municipal roads, highways and mountain roads. In addition, the driver's driving route includes multiple pre-marked key positions (for example, uphill position, downhill position, turning position, U-turn position, etc.). When the driver drives the vehicle through the key position points, the driving style is marked according to the vehicle's driving data. Specifically, the parameters used to characterize the vehicle's driving state in the vehicle's driving data include wheel speed, vehicle speed, acceleration, yaw angular velocity, front vehicle distance, driving torque, etc.; at the same time, it also includes the vehicle's handling parameters, such as steering wheel angle / speed, brake pedal depth and accelerator pedal depth. In addition, the vehicle's driving data also includes the vehicle's latitude and longitude position information.
[0047] In one embodiment of the present application, the convolution layer in the first recognition model can be a convolutional neural network, the long short-term memory layer in the first recognition model can be a long short-term memory neural network, and the attention layer in the first recognition model can be a neural network with an attention mechanism. Figure 4 A schematic diagram of the first recognition model 400 is shown, wherein the convolution layer 410 is used to perform convolution operations on the vehicle's driving data to obtain global information of the driving data, which can ensure that the recognition result of the driving mode has a high overall prediction accuracy; the long short-term memory layer 420 is used to determine the timing delay of the driving data based on the global information of the driving data, which can improve the prediction accuracy of the instantaneous peak in the driving data; the attention layer 430 is used to output the first recognition result based on the information with time delay output by the long short-term memory layer 420, which can improve the convergence efficiency of the first recognition model. In this way, according to the multiple levels in the first recognition model, the prediction accuracy of the first recognition result for problems with high timing, high dynamic characteristics, and strong nonlinear characteristics can be improved, thereby improving the confidence of the first candidate mode indicated by the first recognition result.
[0048] S23: Determine, based on the first recognition result and the second recognition result, that the driving mode of the vehicle is a second driving mode.
[0049] In one embodiment of the present application, since the difference between the driving data of the vehicle may be small when the driving mode of the vehicle is sporty and the driving mode is robust, when the driving mode of the vehicle is identified according to the first recognition model, the sporty driving mode and the robust driving mode may be misidentified (for example, the sporty driving mode is identified as a robust driving mode, or the robust driving mode is identified as a sporty driving mode), which may affect the credibility of the first recognition result output by the first recognition model. Therefore, the present application also processes the driving data of the vehicle based on the second recognition model to obtain a second recognition result. Among them, the second recognition model can be a machine learning model (for example, a K nearest neighbor model, a decision tree model, a random forest model, etc.). In this way, the first recognition result can be verified and corrected based on the second recognition result.
[0050] In one embodiment of the present application, when the first recognition result and the second recognition result are the same, it indicates that the credibility of the first recognition result and the second recognition result is high, and it can be determined that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0051] In one embodiment of the present application, when the first recognition result and the second recognition result are different, it indicates that the credibility of the first recognition result and the second recognition result is low, and the second driving mode of the vehicle can be determined by comparing the first candidate mode indicated by the first recognition result and the second candidate mode indicated by the second recognition result. Specifically, when the first recognition result and the second recognition result are different, the specific method of determining that the driving mode of the vehicle is the second driving mode according to the first recognition result and the second recognition result can be found in Figure 5 , Figure 6 and Figure 7 The corresponding detailed description.
[0052] S24, outputting the driving mode of the vehicle.
[0053] In one embodiment of the present application, after determining the driving mode of the vehicle, the vehicle controller of the vehicle can be controlled by the electronic device to output information related to the driving mode of the vehicle. For example, the vehicle controller can send a display instruction to the vehicle display device, and use the display device to output text or image information to prompt the driver of the vehicle's current real driving mode; the vehicle controller can also send a voice output instruction to the vehicle voice device, and use the voice device to output voice information to prompt the driver of the vehicle's current real driving mode. In this way, the real driving mode of the vehicle can be timely identified based on the real-time vehicle driving data, and feedback information can be provided to the driver in a timely manner based on the identification results, so as to assist the driver in improving the accuracy of judging the vehicle condition, thereby improving driving safety.
[0054] It can be seen from the above technical solutions that the embodiment of the present application realizes real-time recognition of the constantly changing driving style of the user during actual driving by acquiring the vehicle's driving data in real time and statistically analyzing multiple operating status parameters in the vehicle's driving data. It can capture the differences in driving modes of different users, ensure that the vehicle can respond quickly to changes in driving style, and provide instant feedback to the vehicle control system. In the process of driving mode recognition, by integrating the threshold judgment method and the deep learning model, the driving mode of the vehicle is determined based on the vehicle status parameters during the user's actual driving process while ensuring the recognition efficiency, which can improve the accuracy of driving mode recognition.
[0055] like Figure 3 , is a flow chart of a method for training a first recognition model provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for training a first recognition model provided in an embodiment of the present application includes the following steps.
[0056] S30, acquiring historical driving data of the vehicle and a driving mode corresponding to the historical driving data.
[0057] In one embodiment of the present application, the historical driving data can be used to characterize the actual driving state of the vehicle during the historical period. For example, the historical driving data can be the vehicle's wheel speed, vehicle speed, vehicle acceleration, vehicle yaw rate, the distance between the vehicle and the preceding vehicle, vehicle driving torque, steering wheel angle / speed, brake pedal depth, accelerator pedal depth, vehicle longitude and latitude coordinates, etc., which are not limited in the present application.
[0058] S31, determining corresponding prediction mode data according to the historical driving data and based on a pre-built initial recognition model.
[0059] In one embodiment of the present application, the initial recognition model includes an initial convolutional layer, an initial long short-term memory layer, and an initial attention layer. Among them, the initial convolutional layer can be a convolutional neural network, the initial long short-term memory layer can be a long short-term memory neural network, and the initial attention layer can be a neural network with an attention mechanism. Specifically, the initial convolutional layer is used to perform convolution operations on historical driving data to obtain global information of the historical driving data; the initial historical long short-term memory layer is used to determine the timing delay of the driving data based on the global information of the driving data, and output the local information of the historical driving data; the initial attention layer is used to output prediction mode data based on the local information with time delay output by the initial long short-term memory layer. Among them, the prediction mode data includes multiple driving modes and the probability corresponding to each driving mode.
[0060] S32, determining a loss value of the initial recognition model according to the predicted mode data and the driving mode corresponding to the historical driving data.
[0061] In an embodiment of the present application, the loss value of the initial recognition model may be determined based on a preset loss function according to the driving mode corresponding to the predicted mode data and the historical driving data. Exemplarily, the preset loss function may be a cross entropy loss function.
[0062] S33, updating the initial recognition model based on the back propagation algorithm until the loss value meets the preset termination condition, stopping updating the initial recognition model, and obtaining a first recognition model trained to a convergence state.
[0063] In one embodiment of the present application, when the loss value satisfies a preset termination condition, it indicates that the initial recognition model has been trained to a convergence state. The termination condition may be that the loss value is less than or equal to a preset termination threshold (e.g., 0.01). When the loss value is less than or equal to the preset termination threshold, it indicates that the difference between the driving mode corresponding to the historical driving data and the predicted mode data is small, and the accuracy of the predicted mode data output by the initial recognition model is high, so the initial recognition model can be stopped from being updated to obtain the first recognition model trained to a convergence state.
[0064] like Figure 5 , is a flow chart of a method for determining a second driving mode provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a second driving mode provided in an embodiment of the present application includes the following steps.
[0065] S50: When the first recognition result and the second recognition result are different, determine a first candidate mode indicated by the first recognition result, and determine a second candidate mode indicated by the second recognition result.
[0066] In an embodiment of the present application, when the first recognition result and the second recognition result are different, indicating that the first recognition result and the second recognition result have low credibility, the first candidate mode indicated by the first recognition result may be determined, and the second candidate mode indicated by the second recognition result may be determined. Exemplarily, the first candidate mode indicated by the first recognition result may be a sporty driving mode, and the second candidate mode indicated by the second recognition result may be a robust driving mode.
[0067] S51, determining that the first recognition model outputs a first probability value of the first candidate mode according to the historical driving data.
[0068] In one embodiment of the present application, a first probability value of the first candidate mode can be determined according to the historical driving data during the training of the first recognition model. The first probability value is used to characterize the possibility of the vehicle being in the first candidate mode predicted by the first recognition model during the training of the first recognition model. Exemplarily, when the first candidate mode is a sport driving mode, if the number of times the sport driving mode is output according to the historical driving data during the training of the first recognition model is 3, and the probability values are 45%, 50% and 65% respectively, it can be determined that the average of the three probability values is the first probability value, and the first probability value is 53%.
[0069] S52: Determine that the second recognition model outputs a second probability value of the second candidate mode according to the historical driving data.
[0070] In one embodiment of the present application, the method for determining the second probability value is the same as the method for determining the first probability value in step S51, and will not be repeated here. For example, when the second candidate mode is a robust driving mode, if the number of times the robust driving mode is output according to historical driving data during the training of the first recognition model is 4, and the probability values are 25%, 80%, 55% and 65% respectively, then the average of the four probability values can be determined to be the second probability value, and the second probability value is 56%. S53: Determine a second driving mode of the vehicle according to the first probability value and the second probability value.
[0071] In one embodiment of the present application, the second driving mode of the vehicle can be determined by comparing the first probability value and the second probability value. For details, please refer to the method for determining the second driving mode according to the first probability value and the second probability value. Figure 6 The corresponding detailed description.
[0072] like Figure 6 , is a flow chart of a method for determining a second driving mode provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a second driving mode provided in an embodiment of the present application includes the following steps.
[0073] S60: When the first probability value is greater than the second probability value, determine that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0074] In one embodiment of the present application, when the first probability value is greater than the second probability value, it indicates that the confidence that the driving mode of the vehicle is the first candidate mode is higher, and therefore it can be determined that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0075] S61: When the first probability value is less than the second probability value, determine that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0076] In one embodiment of the present application, when the first probability value is less than the second probability value, it indicates that the confidence that the vehicle's driving mode is the second candidate mode is higher, and therefore it can be determined that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0077] like Figure 7 , is a flow chart of a method for determining a second driving mode provided in an embodiment of the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The method for determining a second driving mode provided in an embodiment of the present application includes the following steps.
[0078] S70: When the driving mode corresponding to the historical driving data is the same as the first candidate mode, determine that the first probability value is valid data.
[0079] In one embodiment of the present application, when the driving mode corresponding to the historical driving data is the same as the first candidate mode, it indicates that the actual driving mode of the vehicle represented by the historical driving data during the historical period is the same as the first candidate mode, then it can be determined that the confidence level when outputting the first recognition result based on the historical driving data is high, and the corresponding first probability value can be determined to be valid data.
[0080] S71: When the driving mode corresponding to the historical driving data is the same as the second candidate mode, determine that the second probability value is valid data.
[0081] In one embodiment of the present application, when the driving mode corresponding to the historical driving data is the same as the second candidate mode, it indicates that the actual driving mode of the vehicle represented by the historical driving data during the historical period is the same as the second candidate mode, then it can be determined that the confidence level when outputting the second recognition result based on the historical driving data is high, and the corresponding second probability value can be determined to be valid data.
[0082] S72: Determine a first mean value according to the valid first probability value.
[0083] In an embodiment of the present application, the means of the valid first probability values may be calculated to obtain the first mean value. For example, when the valid first probability values are 45%, 50%, and 65%, the first mean value may be determined to be 53%.
[0084] S73: Determine a second mean value according to the valid second probability value.
[0085] In one embodiment of the present application, the average of the valid second probability values may be calculated to obtain the second average value. For example, when the valid first probability values are 25%, 80%, 55% and 65%, the second average value may be determined to be 56%.
[0086] S74: When the first mean value is greater than the second mean value, determine that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0087] In one embodiment of the present application, when the first mean is greater than the second mean, it indicates that the confidence that the driving mode of the vehicle is the first candidate mode is high, and therefore it can be determined that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0088] S75: When the first mean value is smaller than the second mean value, determine that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0089] In one embodiment of the present application, when the first mean is smaller than the second mean, it indicates that the confidence that the vehicle's driving mode is the second candidate mode is high, and therefore it can be determined that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0090] See also Figure 8 , Figure 8 8 is a schematic diagram of a driving mode recognition system provided by an embodiment of the present application. The driving mode recognition system 800 includes an electronic device 100 and a vehicle controller 300. The electronic device 100 is disposed in a vehicle 200, and the electronic device 100 is communicatively connected with the vehicle controller 300 in the vehicle 200. The vehicle 200 includes a wheel assembly 210, and the wheel assembly 210 includes a left front wheel 211, a right front wheel 212, a left rear wheel 213, and a right rear wheel 214. The vehicle controller 300 is used to monitor various parameters of the vehicle 200 during driving in real time.
[0091] In one embodiment of the present application, the electronic device 100 is used to obtain driving data of a vehicle during driving; the electronic device 100 is also used to determine that the driving mode of the vehicle is a first driving mode when a first characteristic parameter in the driving data meets a preset condition; the first characteristic parameter is used to characterize the driving state of the vehicle; the electronic device 100 is also used to determine a first recognition result of the vehicle based on the driving data according to a pre-trained first recognition model when the first characteristic parameter in the driving data does not meet the preset condition; determine a second recognition result of the vehicle based on the driving data according to a second recognition model; the electronic device 100 is also used to determine that the driving mode of the vehicle is a second driving mode based on the first recognition result and the second recognition result; the electronic device 100 is also used to output the driving mode of the vehicle.
[0092] In some embodiments, the electronic device 100 is also used to: obtain historical driving data of the vehicle, and the driving mode corresponding to the historical driving data; determine the corresponding prediction mode data based on the historical driving data and a pre-built initial recognition model; determine the loss value of the initial recognition model based on the prediction mode data and the driving mode corresponding to the historical driving data; update the initial recognition model based on a back propagation algorithm until the loss value meets a preset termination condition, stop updating the initial recognition model, and obtain a first recognition model trained to a convergence state.
[0093] In some embodiments, the electronic device 100 is also used to: when the first recognition result and the second recognition result are different, determine the first candidate mode indicated by the first recognition result, and determine the second candidate mode indicated by the second recognition result; determine the first probability value of the first candidate mode output by the first recognition model based on the historical driving data; determine the second probability value of the second candidate mode output by the second recognition model based on the historical driving data; and determine the second driving mode of the vehicle based on the first probability value and the second probability value.
[0094] In some embodiments, the electronic device 100 is also used to: when the first probability value is greater than the second probability value, determine that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; when the first probability value is less than the second probability value, determine that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0095] In some embodiments, the electronic device 100 is also used to: determine that the first probability value is valid data when the driving mode corresponding to the historical driving data is the same as the first candidate mode; determine that the second probability value is valid data when the driving mode corresponding to the historical driving data is the same as the second candidate mode; determine a first mean based on the valid first probability value; determine a second mean based on the valid second probability value; when the first mean is greater than the second mean, determine that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; when the first mean is less than the second mean, determine that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
[0096] In some embodiments, the electronic device 100 is further used to: when the first recognition result and the second recognition result are the same, determine that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle.
[0097] See also Fig. 9 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 includes a memory 12 and a processor 13. The memory 12 is used to store computer-readable instructions, and the processor 13 is used to execute the computer-readable instructions stored in the memory to implement a driving mode recognition method described in any of the above embodiments.
[0098] In an embodiment of the present application, the electronic device 100 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as a driving mode recognition program.
[0099] Fig. 9 Only the electronic device 100 having the memory 12 and the processor 13 is shown, and those skilled in the art can understand that Fig. 9 The structure shown does not constitute a limitation on the electronic device 100 , and the electronic device 100 may include fewer or more components than shown in the figure, or combine some components, or arrange the components differently.
[0100] Combination Figure 2The memory 12 in the electronic device 100 stores a plurality of computer-readable instructions to implement the driving mode recognition method, and the processor 13 can execute the plurality of instructions to implement: obtaining driving data during vehicle driving; when a first characteristic parameter in the driving data meets a preset condition, determining that the driving mode of the vehicle is a first driving mode; the first characteristic parameter is used to characterize the driving state of the vehicle; when the first characteristic parameter in the driving data does not meet the preset condition, based on the driving data, according to a pre-trained first recognition model, determining a first recognition result of the vehicle; based on the driving data, according to a second recognition model, determining a second recognition result of the vehicle; according to the first recognition result and the second recognition result, determining that the driving mode of the vehicle is a second driving mode; and outputting the driving mode of the vehicle.
[0101] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 2 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0102] Those skilled in the art will appreciate that the schematic diagram is merely an example of the electronic device 100 and does not constitute a limitation on the electronic device 100. The electronic device 100 may be a bus-type structure or a star-type structure. The electronic device 100 may also include more or less other hardware or software than shown in the diagram, or a different arrangement of components. For example, the electronic device 100 may also include input and output devices, network access devices, etc.
[0103] It should be noted that the electronic device 100 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.
[0104] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium can be non-volatile or volatile. The readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 100, such as a mobile hard disk of the electronic device 100. In other embodiments, the memory 12 can also be an external storage device of the electronic device 100, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 100. The memory 12 can not only be used to store application software and various types of data installed in the electronic device 100, such as a code of a driving mode recognition program, etc., but also can be used to temporarily store data that has been output or is to be output.
[0105] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the electronic device 100, and uses various interfaces and lines to connect various components of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing programs or modules stored in the memory 12 (for example, executing a driving mode recognition program, etc.), and calling data stored in the memory 12.
[0106] The processor 13 executes the operating system of the electronic device 100 and various installed applications. The processor 13 executes the applications to implement the steps in the above-mentioned driving mode recognition method embodiments, for example Figure 2 Steps shown.
[0107] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units may be a series of computer-readable instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the electronic device 100.
[0108] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, and includes a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute a part of a driving mode recognition method described in various embodiments of the present application.
[0109] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware devices to complete through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0110] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory and other memory, etc.
[0111] Furthermore, the computer-readable storage medium may mainly 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, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0112] The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. Fig. 9 Only one arrow is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13, etc.
[0113] An embodiment of the present application also provides a computer-readable storage medium (not shown), in which computer-readable storage medium is stored computer-readable instructions, and the computer-readable instructions are executed by a processor in an electronic device to implement the driving mode recognition method described in any of the above embodiments.
[0114] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0115] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0116] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A driving mode recognition method, applied to an electronic device, characterized in that: The method comprises: Acquire driving data of the vehicle during driving; When a first characteristic parameter in the driving data meets a preset condition, determining that the driving mode of the vehicle is a first driving mode; the first characteristic parameter is used to characterize the driving state of the vehicle; When the first characteristic parameter in the driving data does not meet the preset condition, determining a first recognition result of the vehicle based on the driving data and a pre-trained first recognition model; determining a second recognition result of the vehicle based on the driving data and a second recognition model; Determining, according to the first recognition result and the second recognition result, that the driving mode of the vehicle is a second driving mode; A driving mode of the vehicle is output.
2. The driving mode recognition method according to claim 1, characterized in that: The method further includes training the first recognition model, wherein the training the first recognition model includes: Acquiring historical driving data of the vehicle and a driving mode corresponding to the historical driving data; According to the historical driving data, based on a pre-built initial recognition model, determining corresponding prediction mode data; determining a loss value of the initial recognition model according to the predicted mode data and the driving mode corresponding to the historical driving data; The initial recognition model is updated based on a back-propagation algorithm until the loss value meets a preset termination condition, and then the updating of the initial recognition model is stopped to obtain a first recognition model trained to a convergent state.
3. The driving mode recognition method according to claim 2, characterized in that: Determining the driving mode of the vehicle as the second driving mode according to the first recognition result and the second recognition result includes: When the first recognition result and the second recognition result are different, determining a first candidate mode indicated by the first recognition result, and determining a second candidate mode indicated by the second recognition result; Determine that the first recognition model outputs a first probability value of the first candidate mode according to the historical driving data; determining that the second recognition model outputs a second probability value of the second candidate mode according to the historical driving data; A second driving mode of the vehicle is determined according to the first probability value and the second probability value.
4. The driving mode recognition method according to claim 3, characterized in that: The determining the second driving mode of the vehicle according to the first probability value and the second probability value includes: When the first probability value is greater than the second probability value, determining that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; When the first probability value is less than the second probability value, it is determined that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
5. The driving mode recognition method according to claim 3, characterized in that: The determining the second driving mode of the vehicle according to the first probability value and the second probability value includes: When the driving mode corresponding to the historical driving data is the same as the first candidate mode, determining that the first probability value is valid data; When the driving mode corresponding to the historical driving data is the same as the second candidate mode, determining that the second probability value is valid data; determining a first mean value according to the effective first probability value; determining a second mean value according to the effective second probability value; When the first mean value is greater than the second mean value, determining that the first candidate mode indicated by the first recognition result is the second driving mode of the vehicle; When the first mean value is smaller than the second mean value, it is determined that the second candidate mode indicated by the second recognition result is the second driving mode of the vehicle.
6. The driving mode recognition method according to claim 3, characterized in that: The determining the second driving mode of the vehicle according to the first recognition result and the second recognition result includes: When the first recognition result and the second recognition result are the same, a first candidate mode indicated by the first recognition result is determined to be the second driving mode of the vehicle.
7. The driving mode recognition method according to any one of claims 1 to 6, characterized in that: The preset conditions include: The first characteristic parameter is greater than a preset first threshold; or The first characteristic parameter is less than a preset second threshold.
8. A driving mode recognition system, comprising an electronic device installed in a vehicle, characterized in that: The electronic device is used to obtain driving data of the vehicle during driving; The electronic device is further used to determine that the driving mode of the vehicle is the first driving mode when a first characteristic parameter in the driving data meets a preset condition; the first characteristic parameter is used to characterize the driving state of the vehicle; The electronic device is further configured to determine a first recognition result of the vehicle based on the driving data and a pre-trained first recognition model when the first characteristic parameter in the driving data does not meet a preset condition; Based on the driving data and according to a second recognition model, determining a second recognition result of the vehicle; The electronic device is further used to determine that the driving mode of the vehicle is a second driving mode according to the first recognition result and the second recognition result; The electronic device is also used to output the driving mode of the vehicle.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, and the processor is used to implement the driving mode recognition method as described in any one of claims 1 to 7 when executing a computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the driving mode recognition method according to any one of claims 1 to 7 are implemented.