Driver hand state detection method and hand state detection model construction method
By utilizing a dual-feature extraction and fusion method of steering wheel torque signal on the vehicle controller area network bus, the problems of high hardware cost, poor environmental adaptability and privacy leakage in the existing technology are solved, thereby improving the accuracy and reliability of driver hand state detection.
Patent Information
- Application Number
- CN202611646091.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-23
- Publication Date
- 2026-11-27
AI Technical Summary
In existing technologies, capacitive sensing and visual monitoring solutions require additional hardware, which is costly. Visual monitoring is susceptible to lighting, occlusion, and posture, and poses a risk of privacy leakage. Vehicle signal-based methods rely on single features or simple thresholds, resulting in insufficient detection accuracy and reliability.
Using the steering wheel torque signal on the vehicle controller area network bus, a dual feature extraction and fusion method is used to extract deep feature vectors and manual feature vectors respectively, and then fuse them into a fused feature to generate the predicted probability of whether the driver's hands are off or not off the steering wheel, and output the detection result.
It reduces hardware costs, avoids the influence of lighting and posture, improves detection accuracy and reliability, avoids the risk of privacy leakage, and enables more comprehensive and full utilization of multi-dimensional information related to hand status in the steering wheel torque signal.
Smart Images

Figure CN123182302A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of intelligent vehicles and autonomous driving technology, and in particular to a method for detecting the state of a driver's hands and a method for constructing a hand state detection model. Background Technology
[0002] With the popularization of advanced autonomous driving technology, real-time monitoring of whether the driver has their hands on the steering wheel is crucial for driving safety.
[0003] In existing technologies, capacitive sensing solutions arrange capacitor plates inside the steering wheel and determine the driver's hand status by the capacitance change caused by hand contact; visual monitoring uses an in-vehicle camera to collect images and identify hand positions; and vehicle signal-based methods typically extract a single statistical feature of the torque signal and set a fixed threshold for judgment.
[0004] However, among the above solutions, capacitive sensing and visual monitoring require additional hardware, which is costly. Visual monitoring is susceptible to lighting, occlusion, and posture, and poses a risk of privacy leakage. Vehicle signal-based methods rely on a single feature or simple threshold, resulting in insufficient detection accuracy and reliability. Summary of the Invention
[0005] The driver hand state detection method and hand state detection model construction method provided in this application are used to solve the problems that capacitive sensing schemes and visual monitoring schemes require additional hardware, which is costly; visual monitoring is easily affected by lighting, occlusion and posture, and there is a risk of privacy leakage; and vehicle signal-based methods have insufficient detection accuracy and reliability due to reliance on a single feature or simple threshold.
[0006] In a first aspect, embodiments of this application provide a method for detecting the state of a driver's hands, including:
[0007] Acquire the steering wheel torque signal from the vehicle's controller area network bus;
[0008] The steering wheel torque signal is input into a hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through a first branch, and to process the manual features of the steering wheel torque signal through a second branch to obtain a manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and a second prediction probability that the driver's hand does not leave the steering wheel.
[0009] Based on the prediction result, a first result or a second result is generated. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
[0010] In one possible implementation, acquiring the steering wheel torque signal includes:
[0011] Obtain the message sent by the electric power steering system of the vehicle in the controller area network bus;
[0012] The original torque signal of the vehicle's steering wheel is parsed from the message, and the steering wheel torque signal is obtained based on the original torque signal.
[0013] In one possible implementation, the step of acquiring the message sent by the controller of the vehicle's electric power steering system in the controller area network bus includes:
[0014] The message in the controller area network bus is obtained through the vehicle's fault diagnosis interface.
[0015] In one possible implementation, obtaining the steering wheel torque signal based on the original torque signal includes:
[0016] The missing torque signal sampling points in the original torque signal are filled in using linear interpolation to obtain the first signal;
[0017] The steering wheel torque signal is obtained by processing the first signal.
[0018] In one possible implementation, processing the first signal to obtain the steering wheel torque signal includes:
[0019] The first signal is subjected to signal amplitude normalization processing to obtain the second signal;
[0020] The second signal is divided into multiple sample segments, and the multiple sample segments are used as the steering wheel torque signal.
[0021] In one possible implementation, before processing the manual features of the steering wheel torque signal through the second branch to obtain the manual feature vector, the method further includes:
[0022] The time-domain features, frequency-domain features, and time-frequency features of the steering wheel torque signal are extracted as the manual features.
[0023] In one possible implementation, the method further includes:
[0024] Based on the first result, determine the current duration for which the driver's hands have been off the steering wheel;
[0025] Determine whether the current duration is greater than or equal to a preset duration threshold;
[0026] If so, a warning is triggered and / or the vehicle takeover procedure is initiated.
[0027] In one possible implementation, determining the current duration of the driver's hands being off the steering wheel based on the first result includes:
[0028] When multiple first results are received consecutively at preset time intervals, the product of the number of first results and the preset time interval is taken as the current time interval.
[0029] In one possible implementation, generating a first result or a second result based on the prediction result includes:
[0030] Determine the judgment threshold corresponding to the state information of the vehicle;
[0031] If the first predicted probability is greater than or equal to the determination threshold, the first result is generated; otherwise, the second result is generated.
[0032] In one possible implementation, the state information includes the vehicle's current speed, and the determination of the threshold corresponding to the vehicle's state information includes:
[0033] When the current vehicle speed is greater than a preset threshold, the first threshold is determined as the determination threshold; otherwise, the second threshold, which is less than the first threshold, is determined as the determination threshold.
[0034] Secondly, embodiments of this application provide a method for constructing a hand state detection model, including:
[0035] Acquire the torque signal of the steering wheel and its corresponding real category, wherein the real category is used to indicate whether the driver's hands have left the steering wheel;
[0036] Model building is performed based on an initial model that includes a first branch and a second branch with parallel settings. The model building includes:
[0037] The first branch extracts the depth feature vector from the torque signal, and the second branch processes the manual features of the torque signal to obtain the manual feature vector.
[0038] The deep feature vector and the handcrafted feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel and a second prediction probability that the driver's hand does not leave the steering wheel.
[0039] Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct the hand state detection model.
[0040] In one possible implementation, calculating the classification loss includes:
[0041] Calculate the base loss between the predicted result and the true category;
[0042] The true category indicates when the driver's hands leave the steering wheel, amplifying the base loss to obtain the classification loss.
[0043] In one possible implementation, calculating the classification loss includes:
[0044] Calculate the product of the easy / difficult sample factor and the base loss, and determine the classification loss that is positively correlated with the product. The higher the predicted probability of the true category in the prediction result, the smaller the easy / difficult sample factor.
[0045] In one possible implementation, the underlying loss between the prediction result and the true category includes:
[0046] The underlying loss is calculated using a loss function based on cross-entropy.
[0047] In one possible implementation, extracting the depth feature vector includes:
[0048] The torque signal is converted into a first feature map through the first branch, and channel attention processing and spatial attention processing are sequentially performed on the feature map to obtain a second feature map. The depth feature vector is obtained based on the second feature map.
[0049] In one possible implementation, obtaining the deep feature vector based on the second feature map includes:
[0050] The second feature map is converted into a target feature vector with a preset dimension by an adaptive pooling layer, and the deep feature vector is obtained based on the target feature vector.
[0051] In one possible implementation, the method further includes:
[0052] The gradient inversion layer is used to invert the sign of the gradients of the domain classifier backpropagated to the first branch and / or the second branch. The domain classifier is used to identify the driving scenario category corresponding to the torque signal based on the deep feature vector and the handcrafted feature vector.
[0053] Thirdly, embodiments of this application provide a driver's hand status detection device, comprising:
[0054] The signal acquisition module is used to acquire the steering wheel torque signal on the vehicle's controller area network bus.
[0055] The detection module is used to input the steering wheel torque signal into a hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through a first branch, and to process the manual features of the steering wheel torque signal through a second branch to obtain a manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and a second prediction probability that the driver's hand does not leave the steering wheel.
[0056] Based on the prediction result, a first result or a second result is generated. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
[0057] Fourthly, embodiments of this application provide a hand state detection model construction device, comprising:
[0058] The sample acquisition module is used to acquire the torque signal of the steering wheel and the corresponding real category, wherein the real category is used to indicate whether the driver's hands have left the steering wheel;
[0059] A model building module is configured to perform model building based on an initial model including a first branch and a second branch with parallel settings, the model building comprising:
[0060] The first branch extracts the depth feature vector from the torque signal, and the second branch processes the manual features of the torque signal to obtain the manual feature vector.
[0061] The deep feature vector and the handcrafted feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel and a second prediction probability that the driver's hand does not leave the steering wheel.
[0062] Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct the hand state detection model.
[0063] Fifthly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0064] The memory stores computer-executed instructions;
[0065] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in the first aspect, or to perform the method as described in the second aspect.
[0066] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to perform the method described in the first aspect, or to perform the method described in the second aspect.
[0067] In a seventh aspect, this application provides a computer program product, including a computer program that, when executed by a processor, is used to perform the method described in the first aspect, or to perform the method described in the second aspect.
[0068] The driver hand state detection method and hand state detection model construction method provided in this application have the following technical effects:
[0069] This method determines the driver's hand position based on the steering wheel torque signal on the vehicle controller area network bus. The steering wheel torque signal is a signal already generated by existing components such as the vehicle's electric power steering system, eliminating the need for additional detection hardware such as capacitive sensors or in-vehicle cameras, thus reducing hardware costs. At the same time, since the detection relies on the physical torque signal rather than a visual image, it is not affected by changes in lighting, occlusion, or driver posture, and it does not involve the privacy leakage risks associated with in-vehicle image acquisition. This effectively solves the shortcomings of capacitive sensing solutions and visual monitoring solutions in terms of cost, environmental adaptability, and privacy.
[0070] Building upon this foundation, the hand state detection model in this method does not rely on a single feature or simple threshold for judgment. Instead, it extracts both the depth feature vector and the handcrafted feature vector from the steering wheel torque signal, fuses them into a fused feature, and then generates predicted probabilities for two categories: driver's hands off the steering wheel and hands not off the steering wheel, based on this fused feature. Finally, it outputs a clear detection result based on the prediction results. Because depth features can automatically uncover deep hidden patterns in the signal, and handcrafted features, as artificially constructed feature representations, can provide information with clear physical meaning and interpretability, the two complement each other at the feature level. This allows for a more comprehensive and fuller utilization of the multidimensional effective information related to hand state in the steering wheel torque signal. Therefore, compared to judgment methods based on a single feature or simple threshold, it can effectively improve the accuracy and reliability of driver hand state detection. Attached Figure Description
[0071] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0072] Figure 1 This is a schematic flowchart of a driver's hand state detection method provided in an embodiment of this application;
[0073] Figure 2 This is a schematic diagram of temporal feature extraction provided in an embodiment of this application;
[0074] Figure 3 A schematic diagram of the time-domain feature extraction process based on Mel filter bank filtering provided in this application embodiment;
[0075] Figure 4 This application provides a schematic diagram of a possible hand state detection process.
[0076] Figure 5 A schematic diagram of the hand state detection model construction method provided in this application embodiment;
[0077] Figure 6 This is a schematic diagram of the initial model workflow provided for an embodiment of this application;
[0078] Figure 7 This is a schematic diagram of the channel attention workflow in the dual attention mechanism provided in the embodiments of this application;
[0079] Figure 8 A schematic diagram of class imbalance processing based on Focal Loss provided for embodiments of this application;
[0080] Figure 9 A schematic diagram of a driver's hand status detection device provided in an embodiment of this application;
[0081] Figure 10 A schematic diagram of the hand state detection model construction device provided in the embodiments of this application;
[0082] Figure 11 This is a schematic diagram of the structure of an electronic device provided in this application.
[0083] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0084] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0085] In existing technologies, the main implementation schemes for steering wheel hands-off detection are as follows:
[0086] One approach is capacitive sensing. This method involves placing capacitor plates inside the steering wheel and using the capacitance changes caused by hand contact to determine the driver's hand position. While capacitive sensing allows for direct measurement of the driver's contact with the steering wheel, it requires integrating additional sensing hardware into the steering wheel structure. This increases manufacturing costs and assembly complexity, and is also susceptible to interference from factors such as wearing gloves, sweaty hands, or water stains on the steering wheel surface, affecting detection accuracy.
[0087] The second approach is visual monitoring. This method uses in-vehicle cameras to capture images of the driver's hand area and then employs image recognition algorithms to determine the hand's position. While visual solutions provide relatively intuitive observational information, their detection effectiveness is heavily dependent on ambient lighting conditions. They are prone to failure at night, in tunnels, or in strong backlighting scenarios. Furthermore, the driver's hands may be obstructed by their body or other objects, creating blind spots. In addition, the continuous image capture by in-vehicle cameras raises concerns about user privacy, further limiting the large-scale application of this solution.
[0088] Besides the aforementioned solutions that rely on additional hardware, some detection methods based on the vehicle's own signals have emerged in recent years. These methods typically utilize the torque sensor already present in the electric power steering system to acquire the steering wheel torque signal from the vehicle's controller area network bus, thereby determining whether the driver is holding the steering wheel. This method requires no additional equipment and has a significant cost advantage. However, most existing vehicle signal-based solutions only extract a single statistical feature of the torque signal, such as the mean or variance, and set a fixed threshold for state determination. However, this method suffers from insufficient accuracy and robustness under complex driving conditions.
[0089] To address the aforementioned issues, this invention proposes a driver hand state detection scheme based on steering wheel torque signals: The existing torque signal on the vehicle's CAN bus is input into the hand state detection model. This model employs a dual feature extraction and fusion structure, extracting depth features from the original signal and manual features from signal statistical characteristics, respectively. These two types of features are then fused to predict the probabilities of the driver's "hands off the steering wheel" and "hands not off the steering wheel." Based on the probability results, the corresponding driver hand state detection result can be output.
[0090] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0091] Example 1
[0092] This embodiment provides a method for detecting driver hand status. This method can be executed by a controller on the vehicle with data processing capabilities, including but not limited to the vehicle controller, domain controller, gateway controller, and other electronic control units dedicated to driver assistance or autonomous driving; it can also be executed by an external computing device that communicates with the vehicle via wired or wireless means. It should be noted that different execution devices may differ in how they acquire steering wheel torque signals, run detection models, and output results; this embodiment does not strictly limit these aspects.
[0093] The vehicle controller, the core unit for coordinating the vehicle's powertrain and overall functions, typically possesses high-level vehicle control authority, allowing it to access the controller area network (CLAN) bus and read relevant messages. In this solution, the vehicle controller can acquire torque messages from the electric power steering system via bus monitoring or proactive requests, and execute steps S102 and S103 using a pre-deployed internal hand state detection model. Since the vehicle controller directly participates in the vehicle's longitudinal and lateral motion control, upon detecting that the driver's hands have left the steering wheel, it can immediately invoke its internal control scheduling logic to trigger instrument alarms, audible alerts, or send takeover requests to the steering and braking control modules, eliminating the need for an intermediary controller and shortening the time chain from detection to response.
[0094] A domain controller is an electronic control unit that centrally controls vehicle functions by dividing them into domains. Common domain controllers include autonomous driving domain controllers, chassis domain controllers, and cockpit domain controllers. Autonomous driving domain controllers typically possess strong computing capabilities to process sensor data and execute intelligent driving algorithms, making them suitable for running hand-eye coordination detection models. In this solution, the autonomous driving domain controller can acquire torque signals from the controller area network bus or forward torque signals to the domain controller via a gateway controller. Since domain controllers often simultaneously receive vehicle operating information such as vehicle speed, steering angle, and driving mode, they can easily and dynamically adjust judgment thresholds based on this state information, working in conjunction with the adaptive threshold mechanism described in S103. The chassis domain controller, being directly associated with the steering execution system, can quickly intervene in steering wheel takeover or steering assist control after acquiring detection results, improving response efficiency.
[0095] The gateway controller in the vehicle network handles data routing and protocol conversion between different buses, and also possesses some local processing capabilities. In one implementation, the gateway controller can selectively acquire torque messages from the electric power steering system from the controller area network bus, perform internal signal preprocessing (such as interpolation, normalization, and segmentation), and then send the processed steering wheel torque signal to other controllers via the internal bus. Alternatively, it can directly run a lightweight hand state detection model within the gateway controller and output the judgment result. Because the gateway controller is located at the hub of the vehicle's communication network, it experiences low signal acquisition latency and can easily communicate with multiple actuators simultaneously, making it suitable for detection tasks with high real-time requirements.
[0096] Other electronic control units with data processing capabilities, such as advanced driver assistance controllers, automatic emergency braking controllers, or controllers specifically designed for driver monitoring, can also serve as the execution subject of this method. These controllers typically possess the necessary computing resources and communication interfaces to load hand state detection models. In practical implementation, these controllers can acquire steering wheel torque signals via controller area network (CLAN), Ethernet, or other in-vehicle communication methods, execute detection steps, and send the generated first or second result to the vehicle control system or human-machine interface. The hardware platform, model deployment method, and result output format used by different controllers when executing this method can be adjusted according to differences in the vehicle's electronic and electrical architecture; this application does not impose any limitations on this.
[0097] External computing devices connected to the vehicle can include cloud servers, roadside computing devices, diagnostic terminals, mobile terminals, or other portable computing devices. Since hand state detection models may involve model training, continuous updates, or complex inference, external computing devices can undertake some or all of the computational tasks. For example, the vehicle sends the steering wheel torque signal or pre-processed signal acquired from the controller area network bus to the cloud server via the onboard communication module. After running the detection model, the cloud server returns the prediction results to the vehicle for use by the vehicle control system. This approach is suitable for scenarios where the model requires frequent iterations or where the vehicle's local computing power is insufficient. As another example, after establishing communication with the vehicle bus through the fault diagnosis interface, the processor in the diagnostic terminal can execute the detection method and return the generated first or second result to the vehicle's electronic controller via a diagnostic session. It should be noted that for takeover warning functions with high real-time requirements, external computing devices typically need to coordinate with the onboard communication link to ensure that data transmission latency meets vehicle control requirements; while in non-real-time or offline analysis scenarios, external computing devices can execute the aforementioned detection methods based on recorded bus data for offline verification or model tuning.
[0098] It should be understood that the vehicle controller, domain controller, gateway controller, other electronic control units, and external computing devices listed above are only a few optional execution entities, not all of them. In practical applications, the steps of the detection method can also be distributed among different devices for execution. For example, the gateway controller can be responsible for acquiring signals, the domain controller can be responsible for running the detection model, and the vehicle controller can be responsible for responding and executing, with each device working together to complete the entire driver's hand state detection process. This application does not limit the specific form, combination, or allocation of the execution entities in its embodiments.
[0099] It should be noted that the driver hand state detection method provided in this embodiment can make real-time judgments on the driver's hand state based on the steering wheel torque signal, providing a basis for autonomous driving takeover prompts, warnings and vehicle control.
[0100] Figure 1 This is a schematic flowchart of the driver's hand state detection method provided in the embodiments of this application, as shown below. Figure 1 As shown, the method includes:
[0101] S101. Obtain the steering wheel torque signal from the vehicle's controller area network bus;
[0102] It should be noted that the Controller Area Network (CAN) bus is used to carry communication data between the various controllers in the vehicle. In this embodiment, the required steering wheel torque signal does not require an additional independent torque sensor; it can be obtained directly from the CAN bus. Specifically, the vehicle's electric power steering system controller sends a message containing steering wheel torque information on the CAN bus at a preset period, such as 10ms to 20ms. This message can be a communication frame sent cyclically at the preset period, and the torque-related fields can be located via message identifier, byte offset, and signal bit width. The vehicle's gateway controller, domain controller, or diagnostic terminal can listen to or read this message through the vehicle's fault diagnosis interface, such as the OBD-II fault diagnosis interface, and decode the target bytes according to the message protocol to obtain the original torque signal corresponding to the steering wheel angle and applied torque.
[0103] Furthermore, in this embodiment, the process of acquiring and parsing the original torque signal includes the following sub-steps:
[0104] Sub-step 1: Listen for CAN messages sent from the Electric Power Steering (EPS) controller via the vehicle's OBD-II diagnostic interface or by directly connecting to the CAN bus. It should be noted that the OBD-II diagnostic interface has standard CAN communication pins defined by the SAE J1962 standard, with pins 6 and 14 corresponding to the CAN_High and CAN_Low signal lines respectively. Physical layer access can be achieved using a standard CAN transceiver. The target message ID can be determined based on the target vehicle's CAN database DBC file. For example, the EPS torque message ID for a certain vehicle model is 0x1A3, and the transmission period for this message is 10ms.
[0105] Sub-step 2: Load the corresponding DBC file using the CAN parsing library to parse the received CAN message frames in real time. Based on the parameters defined in the DBC file, such as the signal start bit, signal length, byte order, scaling factor, and offset, parse the raw bytes in the CAN message into steering wheel torque values with physical meaning, forming the raw torque signal time series. In this embodiment, the physical unit of the steering wheel torque signal is Newton-meter, and the signal range can be, for example, -10 N·m to +10 N·m, with a sampling frequency of 100 Hz. Simultaneously, by decoding the fields related to the steering wheel angle in the message, the steering wheel angle signal can also be obtained for collaborative analysis of multiple correlated signals.
[0106] It should be noted that, to avoid sampling time deviations caused by inconsistent CAN bus message cycles, transmission delays, or node clock differences among multiple associated signals, timestamp alignment of the acquired associated signals is necessary. Alignment methods can include: first, parsing the timestamps carried in each CAN message, or using the local reception time of the receiver as the sampling time marker for each signal; then, selecting the time axis of the steering wheel torque signal as the reference time axis. For other associated signals, such as steering wheel angle and vehicle speed, if their sampling times are inconsistent with the reference time axis, linear interpolation is used to resample these signals to the sampling points of the reference time axis. If the original sampling frequencies of multiple associated signals are different, they can also be unified to the same sampling frequency through interpolation. Through this method, it can be ensured that in each sample segment formed by the subsequent sliding window segmentation, different signals correspond to the same physical time at each sampling point, thereby achieving time synchronization of multiple source signals. Timestamp alignment eliminates time misalignment between signals caused by CAN message scheduling jitter, bus load variations, and clock differences between different ECUs. It ensures strict consistency in time across multiple correlated signals relied upon for feature extraction and model input, preventing false features or information loss due to signal phase shifts. Furthermore, when the system subsequently integrates signals from other vehicles to assist in hands-free detection, it effectively improves the accuracy of state classification and the robustness of the entire detection system. It should be noted that the specific implementation of timestamp alignment described above is a common technique in vehicle CAN signal processing. Those skilled in the art can adopt appropriate interpolation or synchronization strategies based on the signal type and sampling characteristics of the actual application; this embodiment does not impose strict limitations on this approach.
[0107] In practical applications, relevant signals that can be used for collaborative analysis include, but are not limited to: steering wheel angle signal, steering wheel angular velocity signal, vehicle speed signal, lateral acceleration signal, yaw rate signal, driver's seat pressure signal, and brake pedal or accelerator pedal status signal. These signals can all be obtained directly from the vehicle's CAN bus without the need for additional hardware.
[0108] Considering the potential for electromagnetic interference, excessive bus load, or node failure in the CAN communication environment, data packet loss or delay may occur in the received raw torque signal. To address this, in one possible implementation, the steering wheel torque signal is obtained based on the raw torque signal, including:
[0109] Linear interpolation is used to fill in the missing torque signal sampling points in the original torque signal to obtain the first signal;
[0110] The steering wheel torque signal is obtained by processing the first signal.
[0111] Specifically, a linear interpolation method can be used to calculate the missing value based on the numerical relationship between adjacent valid sampling points before and after the missing torque signal sampling point, and the calculation result is written into the corresponding time position to obtain the first signal.
[0112] Specifically, for the original torque signal Any missing sampling point in Let the two most recent valid sampling time points before and after the missing point be respectively and The corresponding actual torque signal values collected are as follows: and The filler value is then calculated using the following linear interpolation formula:
[0113]
[0114] in, By traversing all missing points in the original torque signal, a continuous and complete first signal can be obtained. .
[0115] Furthermore, the first signal can be normalized to obtain the second signal, thereby eliminating amplitude differences caused by different vehicles, different drivers' force application habits, and different sensor ranges, so that torque signals from different sources have a consistent numerical range.
[0116] Specifically, regarding the first signal The fragment to be processed (in (where the total number of sampling points in the segment is 1), and the signal amplitude is scaled to the [0,1] interval using the minimum-maximum normalization method to obtain the second signal. :
[0117]
[0118] in, For fragments The original first signal value at a certain sampling point, and These are the minimum and maximum values of all sampling points in segment X, respectively. After performing the above normalization process on all data of the first signal, the second signal is obtained. .
[0119] Then, the second signal can be divided into multiple sample segments according to a preset time window. Each sample segment covers the complete short-term torque fluctuation characteristics, and these sample segments are used as steering wheel torque signals for subsequent detection models to call.
[0120] Specifically, in order to convert the continuous signal into a fixed-length sample segment that the model can process, this step performs sliding time window segmentation on the second signal, thereby dividing the second signal into multiple sample segments, and using these sample segments as the steering wheel torque signal subsequently input to the hand state detection model.
[0121] Specifically, set the preset time window length. Number of sampling points (corresponding to a time length of 5.12 seconds at a sampling rate of 100Hz), sliding step size 1 sampling point (corresponding to 1.28 seconds). For a length of The second signal can generate There are 12 sample segments, each of which is a 512-dimensional column vector, represented as follows:
[0122]
[0123] in, Indicates the first Each sample segment is a time window to be detected, corresponding to an independent detection state.
[0124] At this point, this step has yielded the steering wheel torque signal, which can be directly input into the hand state detection model, consisting of multiple fixed-length sample segments. .
[0125] It should be noted that the above-mentioned interpolation completion, amplitude normalization and sample fragmentation are all optional preprocessing methods. The embodiments of this application do not limit the specific acquisition and processing methods of the steering wheel torque signal.
[0126] S102. Input the steering wheel torque signal into the hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through the first branch, and process the manual features of the steering wheel torque signal through the second branch to obtain the manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature. Based on the fused feature, a prediction result is generated. The prediction result includes the first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and the second prediction probability that the driver's hand does not leave the steering wheel.
[0127] In this embodiment, extracting the time-domain features, frequency-domain features, and time-frequency features from the steering wheel torque signal as manual features includes:
[0128] For each sample fragment obtained in step one Simultaneously extract the following three categories of 70-dimensional handcrafted features to construct the handcrafted feature vector. It should be noted that in the field of machine learning It represents the "70-dimensional real vector space", that is, the set of all vectors consisting of 70 real numbers.
[0129] 1. Extracting temporal features (8 dimensions in total):
[0130] Figure 2 This is a schematic diagram of temporal feature extraction provided in an embodiment of this application, such as... Figure 2 As shown, this embodiment uses sample fragments. The following 8-dimensional time-domain features can be extracted and calculated using the following formula.
[0131] Mean:
[0132]
[0133] in:
[0134] : The length of the sliding time window, i.e. the number of sampling points, is 512 in this embodiment;
[0135] : No. In the sample segment, the first Torque values at each sampling point;
[0136] : The arithmetic mean of all sampling points within the sliding time window.
[0137] Significance: The mean reflects the DC component or static level of the torque signal within a window. When the driver's hands are on the steering wheel, the torque signal typically exhibits a non-zero static bias due to arm weight or continuously applied gripping force; after the hands are removed from the steering wheel, the torque signal tends towards zero. Therefore, the mean is the fundamental time-domain characteristic that distinguishes between "hands on the steering wheel" and "hands off the steering wheel".
[0138] variance:
[0139]
[0140] in:
[0141] The mean value of the torque signal within the aforementioned sliding time window;
[0142] : The variance of the torque signal within the window.
[0143] Significance: Variance describes the degree of fluctuation of the torque signal around its mean. When the driver holds or manipulates the steering wheel, the torque signal fluctuates significantly due to muscle tremors, road feedback, and steering operations, resulting in a large variance. After the driver removes their hands from the steering wheel, the signal becomes more stable, and the variance decreases significantly. Therefore, variance can be used to reflect the dynamic force applied by the driver to the steering wheel.
[0144] Skewness:
[0145]
[0146] in:
[0147] Standard deviation ;
[0148] Skewness: Used to describe the degree of asymmetry in signal distribution.
[0149] Significance: Skewness indicates the symmetry of the torque signal distribution relative to the mean. When the driver applies directional torque, the signal amplitude distribution may show positive or negative skewness; after releasing the hands, the signal distribution is usually more symmetrical. Skewness can be used as a feature to distinguish different hand force application states.
[0150] Kuroshi:
[0151]
[0152] in:
[0153] Standard deviation;
[0154] Kurtosis describes the sharpness of the signal distribution. Subtracting 3 makes the kurtosis of the standard normal distribution zero.
[0155] Significance of the characteristic: Kuroki reflects whether there are obvious transient shocks or extreme peaks in the signal. When the driver quickly corrects the direction or turns the steering wheel, the torque signal will show large transient changes and a high kuroki; after the driver releases the steering wheel, the signal flattens out and the kuroki is low. This characteristic helps to identify the driver's active control actions.
[0156] Peak-to-peak value:
[0157]
[0158] in:
[0159] The maximum value of the torque signal within the sliding time window;
[0160] The minimum value of the torque signal within the sliding time window;
[0161] Peak-to-peak value.
[0162] Significance of characteristics: Peak-to-peak value describes the maximum variation of the torque signal within the slip time window. When the driver's hands are on the steering wheel, the torque applied varies widely, resulting in a high peak-to-peak value; after the hands are released, the torque signal fluctuates only around zero, resulting in a smaller peak-to-peak value.
[0163] Root mean square (RMS):
[0164]
[0165] in:
[0166] Root mean square value;
[0167] The other symbols are the same as above.
[0168] Significance: The root mean square (RMS) value comprehensively reflects the overall effective energy of the signal, taking into account both signal amplitude and fluctuation. The RMS provides a robust measure of the overall strength of the torque signal and can be used to determine whether the driver is continuously applying torque.
[0169] Average absolute value:
[0170]
[0171] Parameter meaning:
[0172] : No. The absolute value of the torque at each sampling point;
[0173] : Average absolute value.
[0174] Significance of characteristics: The average absolute value reflects the average amplitude of the signal after rectification. It can eliminate the mutual cancellation of positive and negative directions and is the basis for calculating dimensionless characteristics such as waveform factor and pulse factor. It can also be used independently to characterize the average intensity of torque applied by the hand.
[0175] Waveform factor:
[0176]
[0177] in, It represents the absolute value of the average.
[0178] Root mean square value;
[0179] : Average absolute value;
[0180] Waveform factor.
[0181] Significance: The waveform factor is the ratio of the root mean square value to the mean absolute value, representing a dimensionless waveform morphology characteristic. Different signal morphologies have different waveform factors: for example, the waveform factor of a pure sine wave is approximately 1.11, while that of random noise is approximately 1.25. Torque signals exhibit different waveform morphologies under conditions of hand tremor, stable grip, and release, thus the waveform factor can provide additional discriminative information.
[0182] Pulse factor:
[0183]
[0184] The maximum absolute value of the torque signal within the window;
[0185] : Average absolute value;
[0186] : Pulse factor.
[0187] Significance: The impulse factor reflects the relative intensity of the peak value in the signal. When the driver makes a sharp turn or applies force suddenly, the torque signal will show a large instantaneous peak value, and the impulse factor will increase significantly; after releasing the steering wheel, there is no obvious impact in the signal, and the impulse factor is close to 1.
[0188] Optionally, zero-crossing rate can also be included:
[0189]
[0190] in:
[0191] : No. Torque values at each sampling point;
[0192] : No. Torque values at each sampling point;
[0193] : Indicator function, takes the value 1 when the condition in parentheses is true, otherwise takes the value 0;
[0194] : Length of the sliding time window;
[0195] Zero-crossing rate.
[0196] Significance of the feature: Zero-crossing rate measures the number of times the sign of the torque signal changes per unit time, i.e., the rate at which the signal crosses zero. When the driver's hand trembles slightly, adjusts their grip, or makes minor steering corrections, the torque signal fluctuates frequently around zero, resulting in a high zero-crossing rate; while after the hand leaves the steering wheel, the signal tends to stabilize, and the zero-crossing rate decreases significantly. This feature can effectively capture subtle dynamic behaviors of the hands.
[0197] It should be noted that, in specific implementation, the zero-crossing rate can be added to the feature set as an optional time-domain feature; if it is necessary to strictly maintain the total number of 70 features, the zero-crossing rate can be used to replace one of the above time-domain features, for example, it can be used in combination with the waveform factor or the pulse factor, so as to ensure that the time-domain features are still 8-dimensional.
[0198] 2. Frequency domain feature extraction (4 dimensions in total):
[0199] For sample fragments Perform a Fast Fourier Transform (FFT) to obtain the spectral representation. The FFT calculation formula is as follows:
[0200]
[0201] in:
[0202] Time-domain sampling point index ;
[0203] Frequency domain index;
[0204] Imaginary unit;
[0205] : The complex spectrum value corresponding to the k-th frequency point.
[0206] Significance: FFT is the fundamental operation for transforming time-domain torque signals to the frequency domain; subsequent frequency domain statistics are all based on it. Calculation. Through frequency domain analysis, periodic components and energy distribution patterns that are not easily observed in the time domain can be extracted.
[0207] Based on spectrum Extract the following 4-dimensional frequency domain features:
[0208] Spectral mean:
[0209]
[0210] in:
[0211] : No. Amplitude spectrum values at each frequency point;
[0212] The number of FFT points is the same as the length of the sliding time window;
[0213] : Spectral mean.
[0214] Significance: The mean spectral value reflects the average amplitude level of the signal across the entire frequency band within a window. When the driver's hands are on the steering wheel, the torque signal generated by the driver's operation contains a large low-frequency component, and the mean spectral value is usually high; after the hands are released, the signal energy is low, and the mean spectral value is low.
[0215] Spectrum standard deviation:
[0216]
[0217] in:
[0218] : No. Amplitude spectrum values at each frequency point;
[0219] : Spectral mean;
[0220] : Standard deviation of the spectrum.
[0221] Significance: The standard deviation of the spectrum describes the dispersion of the spectrum amplitude at various frequency points, reflecting the complexity of the signal's frequency components. When a driver operates the steering wheel, the torque signal contains both low-frequency steering torque and potentially high-frequency components caused by road surface excitation, resulting in a more dispersed spectrum distribution and a larger standard deviation. After the driver releases the steering wheel, the spectrum structure becomes simpler, and the standard deviation decreases.
[0222] Total spectrum:
[0223]
[0224] in:
[0225] : No. Amplitude spectrum values at each frequency point;
[0226] : Sum of the spectrum.
[0227] Significance: The sum of the spectral frequencies represents the total energy of the signal within the window in the frequency domain, and corresponds to the root mean square in the time domain. This characteristic reflects whether the driver is continuously applying torque: the total energy is greater when the driver is holding the steering wheel, and decreases significantly when the driver releases the wheel.
[0228] Spectral centroid:
[0229]
[0230] in:
[0231] : No. The frequency value corresponding to each frequency point can usually be calculated as follows: Calculation, where In this embodiment, the sampling rate is... ;
[0232] : No. Amplitude spectrum values at each frequency point;
[0233] : Spectral centroid, which is the center frequency of the spectral energy distribution.
[0234] Significance: The centroid of the spectrum reflects the position of the center of gravity of the signal's spectral energy. When a driver performs a steering operation, the torque energy is mainly concentrated in the low-frequency range, resulting in a lower centroid; after the driver releases their hands, the signal may contain more high-frequency noise or zero-drift components, and the position of the centroid will change. The centroid of the spectrum can serve as an effective frequency domain feature for distinguishing hand states.
[0235] 3. Time-frequency feature extraction (58 dimensions in total):
[0236] This embodiment combines Mel filter banks to perform time-frequency analysis on the signal, extracting Mel frequency cepstral coefficients (MFCC) features and Mel spectrum features. Figure 3 This is a schematic diagram of the time-domain feature extraction process based on Mel filter bank filtering provided in this application embodiment. The time-frequency feature extraction process in this embodiment can be found in [reference needed]. Figure 3 .
[0237] Mel frequency cepstral coefficients (26 dimensions).
[0238] First, analyze the sample fragments. Pre-emphasis processing is performed to boost the high-frequency components of the signal:
[0239]
[0240] in:
[0241] Original torque signal One sampling point;
[0242] : No. One sampling point;
[0243] 0.97: Pre-weighting coefficient;
[0244] : The signal after pre-emphasis.
[0245] Significance of the feature: Pre-emphasis is used to boost the high-frequency components in the signal, compensate for the attenuation of high-frequency components during signal acquisition and transmission, and enable subsequent Mel filter bank analysis to obtain more stable high-frequency information.
[0246] The pre-emphasized signal is then segmented into frames, and a Hamming window is applied to each frame to reduce spectral leakage. The window function is defined as follows:
[0247]
[0248] in:
[0249] Frame length, which is the number of sampling points contained in each frame;
[0250] Intra-frame sampling point index;
[0251] 0.54 and 0.46: Fixed coefficients for the Hamming window;
[0252] The signal after adding a window.
[0253] Significance of the feature: Framing the pre-emphasized signal and adding a Hamming window to each frame can reduce spectral leakage, make short-time spectral estimation smoother, and improve the stability of MFCC features.
[0254] The power spectrum of each frame of the windowed signal is calculated and then filtered using a Mel filter bank. The conversion relationship between Mel frequency and linear frequency is as follows:
[0255]
[0256] The energy output of the filter bank is denoted as ,in , This represents the number of Mel filters in the filter bank. Where:
[0257] Linear frequency, measured in Hz;
[0258] : The corresponding Mel frequency.
[0259] Significance: The Mel frequency scale simulates the nonlinear perception of frequency by the human ear, offering higher frequency resolution in the low-frequency region. Steering wheel torque signals are primarily composed of low-frequency driver input; mapping the spectrum to the Mel scale allows for more effective extraction of low-frequency features related to hand control actions.
[0260] right After taking the logarithm, perform a Discrete Cosine Transform (DCT) to obtain the MFCC coefficients:
[0261]
[0262] in:
[0263] Number of Mel filters;
[0264] Mel filter index;
[0265] : No. The output energy of a Mel filter;
[0266] : Cepstral coefficient index;
[0267] : No. MFCC coefficient.
[0268] Significance: Performing a discrete cosine transform (FCC) on the log-Mel energy spectrum removes the correlation between dimensions, compressing the energy spectrum into 13-dimensional MFCC coefficients. The MFCC coefficients compactly describe the short-time spectral envelope shape of the torque signal and are widely used time-frequency characteristics of audio / vibration signals.
[0269] This embodiment extracts 13-dimensional static MFCC coefficients and their first-order differences (13 dimensions), resulting in a total of 26-dimensional MFCC features. To characterize the dynamic changes of MFCC features, the first-order differences of the 13-dimensional MFCC coefficients are calculated, forming an additional 13-dimensional feature set. One possible formula for calculating the first-order differences is:
[0270] in:
[0271] : No. MFCC coefficients;
[0272] : No. First-order differences of the MFCC coefficients.
[0273] Significance: The first-order difference reflects the trend of MFCC coefficients over time, i.e., the dynamic evolution of the short-time spectrum of the torque signal. When the driver turns the steering wheel or adjusts their grip, the spectral envelope undergoes regular changes; when the driver releases their hands, the spectrum changes slowly. The static MFCC and the first-order difference together constitute the 26-dimensional MFCC feature.
[0274] Mel spectrum (32 dimensions).
[0275] The average energy of the signal across 32 Mel frequency bands is calculated to obtain the 32-dimensional Mel spectral characteristics. The specific calculation formula is as follows:
[0276]
[0277] in:
[0278] : No. The set of FFT frequency point indices contained in each Mel band;
[0279] The number of frequency points in this set;
[0280] The FFT result of the signal;
[0281] : No. Power spectrum values at each frequency point;
[0282] : No. The average energy of each Mel frequency band.
[0283] Significance: Mel spectrum averaging of the signal power spectrum over 32 Mel bands yields the average energy distribution of each band. Compared to the original spectrum, Mel spectrum reduces dimensionality while preserving perceptually relevant frequency resolution. The energy band distribution characteristics of the torque signal differ between "hand-on" and "hand-off" states; therefore, Mel spectrum can provide effective time-frequency discrimination information.
[0284] In summary, this embodiment extracts 8-dimensional time-domain features, 4-dimensional frequency-domain features, 26-dimensional MFCC features, and 32-dimensional Mel-spectral features for each sample segment, totaling 70-dimensional handcrafted features, which form a handcrafted feature vector. .
[0285] It should be noted that the hand state detection model used in this step can be pre-trained and includes two parallel feature processing paths: a first branch and a second branch. The first branch is used to extract deep features from the steering wheel torque signal to obtain a deep feature vector. The first branch can be implemented using convolutional neural networks, recurrent neural networks, long short-term memory networks, or a combination of these networks to capture fine-grained dynamic information reflecting the driver's control process in the original torque signal. The second branch is used to process the manual features of the steering wheel torque signal to obtain a manual feature vector. Here, manual features refer to statistical features obtained through manually designed feature extraction rules, which can include one or more of time-domain features, frequency-domain features, and time-frequency features. Specifically, time-domain features can include one or more of mean, variance, peak value, peak-to-peak value, skewness, and kurtosis to characterize the statistical characteristics of the torque signal in the time domain; frequency-domain features can include one or more of dominant frequency, spectral energy, bandwidth power, and spectral centroid to characterize the distribution characteristics of the torque signal in the frequency domain; time-frequency features can be obtained through short-time Fourier transform, wavelet transform, or other time-frequency analysis methods to characterize the frequency change attributes of the torque signal during time variation. These handcrafted features can be spliced or combined in a preset order and then input into the second branch. The second branch can be composed of a fully connected network or other feature encoding networks. After further mapping the handcrafted features, it outputs a handcrafted feature vector of the corresponding dimension.
[0286] After obtaining the deep feature vector and the hand-crafted feature vector, the hand state detection model fuses them into a fused feature. The fusion method can be vector concatenation, element-wise addition, weighted summation, or adaptive fusion using an attention mechanism. This embodiment does not limit the specific fusion method. Then, a prediction result is generated based on the fused feature. For example, the fused feature can be processed through several fully connected layers and normalization layers to output a first prediction probability and a second prediction probability. The first prediction probability represents the probability that the driver's hand leaves the steering wheel, and the second prediction probability represents the probability that the driver's hand does not leave the steering wheel. The sum of the two can be normalized to 1. Through the above dual-branch fusion structure, the deep dynamic information in the original torque signal and the explicit state information in the hand-crafted features can converge in the same discrimination link, thereby effectively reducing misjudgments and missed judgments caused by a single feature source and improving the detection generalization ability under different drivers and road conditions.
[0287] In one possible implementation, the hand state detection model provided in this application can be used. Figure 4 This is a schematic diagram of a possible hand state detection process provided in an embodiment of this application, such as... Figure 4As shown, the hand state detection model provided in this application includes a 1DCNN branch to extract depth feature vectors and an MLP branch to extract hand feature vectors. The working principle of the hand state detection model provided in this application is explained in Embodiment 2 of this application, and will not be repeated here.
[0288] Following the above description of acquiring multiple correlated signals, it should be further explained that, in this embodiment, the collaborative analysis of multiple correlated signals can be performed in the following manner:
[0289] (1) Multi-channel input method: The steering wheel torque signal, steering wheel angle signal, vehicle speed signal, and other related signals are timestamped and then fed into the hand state detection model as multi-channel inputs. That is, the original single-channel steering wheel torque signal is expanded into a multi-channel signal, and the input of the first branch of the model is changed from 512×1 to 512×C, where C is the number of channels. The signals of each channel are processed by a 1D CNN convolutional layer to extract features and then fused, so that the model can not only learn the driver's hand state features from the torque signal, but also learn the driving scene context information from the steering angle, vehicle speed and other signals, thereby improving the accuracy of the judgment.
[0290] (2) Cross-validation method: The detection results of torque signals are verified using steering wheel angle signals and vehicle speed signals. For example, when the torque signal indicates a "driver's hands off the steering wheel" state, if both the steering wheel angle signal and the vehicle speed signal show that the vehicle is traveling at high speed in a curve, it indicates that the "driver's hands off the steering wheel" state has a high risk level, and the system can raise the warning level accordingly; conversely, if the vehicle is traveling in a straight line at a low speed, the risk level of the "driver's hands off the steering wheel" state can be appropriately reduced. Through multi-signal cross-validation, misjudgments caused by a single signal can be effectively reduced, and the reliability of the detection results can be enhanced.
[0291] (3) Scene-assisted recognition method: The current driving scene (such as highway cruising, low-speed following in the city, driving on curves, parking in a parking lot, etc.) is identified using signals such as vehicle speed and lateral acceleration, and the judgment threshold output by the detection model is adaptively adjusted according to the scene category. For example, in the high-speed cruising scene, the risk of the driver taking their hands off the steering wheel is high, so the judgment threshold of "driver's hands off the steering wheel" can be appropriately lowered to improve the recall rate; in the low-speed parking scene, the frequency of the driver making slight adjustments to the steering wheel is high, so the judgment threshold can be appropriately increased to reduce false alarms. Through scene perception assistance, the adaptability of the detection method under different driving conditions can be further improved.
[0292] It should be noted that the above-mentioned collaborative analysis of multiple correlated signals is based on the vehicle's existing CAN bus signals, requiring no additional sensor hardware and maintaining the system's low-cost advantage. In practical implementation, those skilled in the art can flexibly choose one or more of the above-mentioned collaborative analysis methods based on the types of signals available for the specific vehicle model and application requirements.
[0293] S103. Based on the prediction result, generate a first result or a second result. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
[0294] In practical implementation, based on the prediction results, a first result or a second result is generated, including:
[0295] Determine the judgment threshold corresponding to the vehicle's status information;
[0296] If the first predicted probability is greater than or equal to the decision threshold, the first result is generated; otherwise, the second result is generated.
[0297] Specifically, firstly, a judgment threshold corresponding to the vehicle's state information is determined. The vehicle's state information reflects its current operating condition and may include one or more of the following: current vehicle speed, steering angle change, current driving mode, and whether the vehicle is in an autonomous driving takeover request phase. This state information can be read directly from the vehicle's controller area network bus, or it can be provided and forwarded to the electronic control unit executing this method by the vehicle controller, domain controller, or other control units. The judgment threshold characterizes the level of the first predicted probability required to determine that the driver's hands have left the steering wheel in the current vehicle state.
[0298] There are several ways to determine the judgment threshold. For example, the correspondence between state information and the judgment threshold can be pre-calibrated before the vehicle leaves the factory or during use, and this correspondence can be stored in the vehicle's onboard memory in the form of a mapping table, lookup table, or calibration file. During real-time detection, the corresponding judgment threshold is determined by looking up the table based on the currently acquired vehicle state information. For example, a threshold calculation function or rule can be pre-set, taking the vehicle state information as input, and the judgment threshold can be calculated in real time. For example, a pre-trained threshold prediction model can be used, inputting the vehicle state information into the model and outputting the corresponding judgment threshold. This application does not limit the specific method for determining the judgment threshold.
[0299] As an example, vehicle status information includes the vehicle's current speed. Optionally, determining the judgment threshold corresponding to the vehicle status information includes:
[0300] When the current vehicle speed is greater than a preset threshold, the first threshold is determined as the judgment threshold; otherwise, the second threshold, which is less than the first threshold, is determined as the judgment threshold.
[0301] Specifically, when the current vehicle speed exceeds a preset speed threshold, a first threshold is set as the judgment threshold; when the current vehicle speed is not greater than the preset speed threshold, a second threshold is set as the judgment threshold, where the second threshold is lower than the first threshold. The preset speed threshold is a speed limit used to distinguish between high-speed and low-speed driving scenarios, and its value can be preset according to vehicle model, road type, and takeover strategy. The first and second thresholds can be stored in the vehicle controller via calibration files, and their specific values can be configured in conjunction with steering wheel torque distribution, driver takeover delay, and scenario risk level. In high-speed driving scenarios, torque signals are more prone to fluctuations due to road surface excitation and minor corrections. Setting the judgment threshold to a higher first threshold can avoid misidentifying normal high-speed handling fluctuations as a hands-off state, thereby reducing the false alarm rate. In low-speed driving scenarios, drivers typically have more direct and stable control of the steering wheel, and the torque signal changes relatively smoothly. Using a lower second threshold can more sensitively capture the true hands-off state, reducing missed detections.
[0302] As another example, vehicle status information includes the vehicle's steering angle change rate. When the steering angle change rate is greater than a preset angle threshold, it indicates that the vehicle is cornering or performing a sharp steering maneuver. In this case, the driver needs to continuously correct the steering wheel, resulting in significant torque signal fluctuations. The judgment threshold can be adjusted to a higher third threshold to avoid misinterpreting normal corrections in corners as hands-off detection. When the steering angle change rate is less than or equal to the preset angle threshold, it indicates that the vehicle is driving in a straight line or in a stable driving state. The judgment threshold can be adjusted to a lower fourth threshold to improve the sensitivity of hands-off detection.
[0303] As another example, vehicle status information includes whether the vehicle is in the autonomous driving takeover request phase. When the vehicle is in autonomous driving mode and issuing a takeover request to the driver, the system needs to quickly confirm whether the driver has already taken their hands on the steering wheel. In this case, the judgment threshold can be adjusted to a lower fifth threshold to more quickly and sensitively identify whether the driver's hands have returned to the steering wheel, thus providing timely evidence for the takeover decision. When the vehicle is not in the takeover request phase, the judgment can be made according to the regular threshold.
[0304] After determining the judgment threshold corresponding to the vehicle's current state information, the first predicted probability output by the hand state detection model is compared with this judgment threshold. If the first predicted probability is greater than or equal to the judgment threshold, it indicates that the confidence level of the driver's hand leaving the steering wheel has reached the recognition standard under the current operating condition, and a first result is generated, which indicates that the driver's hand has left the steering wheel. If the first predicted probability is less than the judgment threshold, a second result is generated, which indicates that the driver's hand has not left the steering wheel.
[0305] In a specific application scenario, assuming the vehicle's current speed is 80 km / h and the preset speed threshold is 60 km / h, the current speed exceeds the preset speed threshold, and the corresponding judgment threshold is the first threshold, for example, 0.7. The hand state detection model outputs a first predicted probability of 0.85. Since 0.85 is greater than 0.7, a first result is generated, indicating that the driver's hand has left the steering wheel. If the output first predicted probability is 0.6, which is less than 0.7, a second result is generated, indicating that the driver's hand has not left the steering wheel. In another specific application scenario, the vehicle's current speed is 40 km / h, which is less than the preset speed threshold, and the corresponding judgment threshold is the second threshold, for example, 0.5. If the output first predicted probability is 0.55, which is greater than 0.5, a first result is generated; if the output first predicted probability is 0.45, which is less than 0.5, a second result is generated.
[0306] By incorporating the vehicle's operating status into the hand-holding status determination process, the system dynamically adjusts the determination threshold based on the operating conditions. Compared to a single fixed threshold approach, this method effectively reduces false alarms caused by normal operation under complex road conditions, while also minimizing missed alarms in low-speed or takeover request scenarios regarding actual hand-holding status. This makes the generation of the first and second results more closely reflect the vehicle's actual operating status, thereby providing more accurate and reliable hand-holding status information for subsequent warnings, alerts, and takeover decisions.
[0307] Figure 1 The method shown has the following technical effects:
[0308] This method determines the driver's hand position based on the steering wheel torque signal on the vehicle controller area network bus. The steering wheel torque signal is a signal already generated by existing components such as the vehicle's electric power steering system, eliminating the need for additional detection hardware such as capacitive sensors or in-vehicle cameras, thus reducing hardware costs. At the same time, since the detection relies on the physical torque signal rather than a visual image, it is not affected by changes in lighting, occlusion, or driver posture, and it does not involve the privacy leakage risks associated with in-vehicle image acquisition. This effectively solves the shortcomings of capacitive sensing solutions and visual monitoring solutions in terms of cost, environmental adaptability, and privacy.
[0309] Building upon this foundation, the hand state detection model in this method does not rely on a single feature or simple threshold for judgment. Instead, it extracts both the depth feature vector and the handcrafted feature vector from the steering wheel torque signal, fuses them into a fused feature, and then generates predicted probabilities for two categories: driver's hands off the steering wheel and hands not off the steering wheel, based on this fused feature. Finally, it outputs a clear detection result based on the prediction results. Because depth features can automatically uncover deep hidden patterns in the signal, and handcrafted features, as artificially constructed feature representations, can provide information with clear physical meaning and interpretability, the two complement each other at the feature level. This allows for a more comprehensive and fuller utilization of the multidimensional effective information related to hand state in the steering wheel torque signal. Therefore, compared to judgment methods based on a single feature or simple threshold, it can effectively improve the accuracy and reliability of driver hand state detection.
[0310] Optionally, the method also includes:
[0311] Based on the first result, determine the current duration for which the driver's hands have been off the steering wheel;
[0312] Determine whether the current duration is greater than or equal to a preset duration threshold;
[0313] If so, a warning will be triggered and / or a vehicle takeover procedure will be initiated.
[0314] Specifically, the first result indicates that the driver's hands have left the steering wheel. When the detection model continuously outputs the first result, it indicates that the driver's hands are continuously off the steering wheel. In a specific implementation, the duration of the first result can be accumulated through a timing module. Optionally, the controller starts timing when it receives the first result and updates the current duration at a fixed period while the first result remains true; when the first result changes from true to false, the timing module resets or restarts timing.
[0315] More specifically, the current duration can be determined by counting results. Optionally, based on the first result, the current duration for which the driver's hands have been off the steering wheel is determined, including:
[0316] When multiple first results are received at preset intervals, the product of the number of first results and the preset duration is used as the current duration.
[0317] For example, the first result is continuously generated by the hand state detection model at preset intervals. The controller reads the prediction result once at each preset interval. If the prediction result corresponds to the first result, the consecutive occurrences of the first result are counted. The current duration is then calculated by multiplying the number of first results by the preset duration. For instance, if the preset duration is 0.2 seconds, and five consecutive first results are received, the current duration is 1.0 second. This statistical method eliminates the need for point-by-point integration of the hand-off duration at each moment; the duration can be obtained simply by counting the results. This results in low computational overhead, fast response, and is more suitable for real-time processing in vehicle control units.
[0318] After determining the current duration, it is compared with a preset duration threshold to determine whether the current duration is greater than or equal to the preset duration threshold. This preset duration threshold is a time limit pre-written into the controller or vehicle control unit, used to characterize the critical point at which the hands-off state continues until a safety response is required. This threshold can be configured according to the vehicle operating scenario, speed range, road grade, and functional safety requirements, and is stored in the onboard parameter table. For different vehicle models or different levels of autonomous driving, this threshold can be set to different values, such as 1 second, 2 seconds, or 3 seconds; this application does not impose any limitations on this. By setting this time threshold, it is possible to effectively distinguish between momentary misjudgments and continuous high-risk states, avoiding unnecessary safety responses triggered by the driver briefly releasing their hands or detecting vibrations.
[0319] If the current duration is greater than or equal to a preset duration threshold, a warning and / or a vehicle takeover procedure is triggered. The warning can be issued via the vehicle's instrument panel, audible alerts, or steering wheel vibration to remind the driver to regain control of the steering wheel as soon as possible. The vehicle takeover procedure can send a takeover request to the steering, braking, or power control modules to initiate subsequent control if the driver fails to regain control in time. Optionally, after a warning is triggered, if the current duration continues to increase and exceeds a higher threshold, the warning level can be further escalated or safety actions such as deceleration or pulling over can be enforced. If the current duration does not reach the preset duration threshold, the system continues to monitor the status of the first result and resets the current duration after the first result disappears, re-entering the normal detection process.
[0320] By employing the above method, the duration of hand-off detection is statistically analyzed based on the initial result, and a warning or takeover procedure is triggered upon reaching a preset duration threshold. This ensures that the hand-off detection results are closely integrated with the vehicle's safety control chain. Consequently, the system can transform instantaneous hand-off detection into a continuous state assessment, outputting a safety response when the risk persistence condition is met, thereby enhancing the safety and reliability of high-level autonomous driving operations.
[0321] Example 2
[0322] This embodiment provides a method for constructing a hand state detection model, which can be executed by a server.
[0323] Figure 5 This is a schematic diagram of the hand state detection model construction method provided in the embodiments of this application, such as... Figure 5 As shown, the method includes:
[0324] S501. Obtain the torque signal of the steering wheel and the corresponding real category. The real category is used to indicate whether the driver's hands have left the steering wheel.
[0325] In practice, this step can first collect steering wheel torque signals of the vehicle under various driving scenarios. These driving scenarios can include different conditions such as high-speed cruising, low-speed urban driving, cornering, short-term correction, and lane keeping. They can also include driving data from different drivers, different road conditions, and different weather conditions, so that the training samples can cover as many diverse control features as possible.
[0326] Torque signals can be obtained by parsing electric power steering system messages on the vehicle controller area network bus, or they can be directly acquired by the steering wheel torque sensor. This application embodiment does not limit the source of the torque signal. The acquired continuous torque data can be segmented according to a preset time window to obtain multiple sample segments, each corresponding to a training sample. To facilitate model training, preprocessing such as interpolation and amplitude normalization can be performed on the sample segments to ensure that samples from different sources have a consistent scale.
[0327] In one possible implementation, CAN messages sent by the EPS controller can be monitored via the vehicle's OBD-II interface or by direct access to the CAN network. The messages are then parsed using a DBC file to extract the physical torque values, forming the original torque time series. Next, the original signal undergoes data cleaning: linear interpolation is used to fill in missing points caused by CAN communication packet loss, and the data is strictly aligned according to timestamps to ensure consistency. Subsequently, the signal is normalized to its minimum and maximum values, scaling the amplitude to the [0,1] interval to eliminate differences in the absolute torque values under different drivers and driving scenarios.
[0328] For the preprocessed continuous torque signal, a sliding time window is used to segment and form model input samples. In this embodiment, the length of the sliding time window can be set to 512 sampling points, corresponding to 5.12 seconds at a sampling rate of 100Hz; the sliding step size is set to 128 sampling points, corresponding to 1.28 seconds. For a signal of length N, M sample segments can be generated, each sample segment being a 512-dimensional vector.
[0329] Simultaneously or subsequently, each sample needs to be labeled with a true class. The true class indicates whether the driver's hands left the steering wheel during the corresponding time period and can be defined as a binary label: Class I (positive) indicates the driver's hands left the steering wheel, and Class II (negative) indicates the driver's hands did not leave the steering wheel. This true class serves as the label for subsequent loss calculation and supervised training. Labeling methods can be determined based on manual annotation, driver operation records, in-vehicle camera images, or a combination of these. For example, a video of the driver's hand area can be recorded simultaneously during data collection, and the labeler can judge whether the driver's hands are in contact with the steering wheel based on the video footage, using the judgment result as the true class of the sample. Alternatively, the driver can perform gripping and releasing actions according to preset instructions during the experiment, recording the action timestamps, and then automatically generating true classes for the samples based on the timestamps. After obtaining the sample segments and their corresponding true classes, the samples can be divided into training and validation sets. The training set is used for model weight updates, and the validation set is used to evaluate model performance. A further test set can be created for final performance evaluation.
[0330] Simultaneously, a 70-dimensional handcrafted feature vector is extracted for each sample segment. In this embodiment, this can specifically include: 8-dimensional time-domain features, 4-dimensional frequency-domain features, 26-dimensional Mel frequency cepstral coefficient features, and 32-dimensional Mel spectrum features. The time-domain features include mean, variance, skewness, kurtosis, peak-to-peak value, root mean square, waveform factor, and impulse factor. The frequency-domain features are obtained by calculating the spectral mean, spectral standard deviation, spectral sum, and spectral centroid after performing a Fast Fourier Transform on the signal. The Mel frequency cepstral coefficient features consist of 13-dimensional static MFCCs and their 13-dimensional first-order differences. The Mel spectrum features represent the average energy of the signal across 32 Mel frequency bands.
[0331] Through the above process, multiple sample fragments and their corresponding 70-dimensional handcrafted feature vectors and true categories are obtained, which serve as training data for the model building phase.
[0332] S502. Model construction is performed based on the initial model including the first branch and the second branch with parallel settings. The model construction includes: extracting the depth feature vector from the torque signal through the first branch, and processing the manual features of the torque signal through the second branch to obtain the manual feature vector; fusing the depth feature vector and the manual feature vector into a fused feature, and generating a prediction result based on the fused feature. The prediction result includes a first prediction probability that the driver's hands leave the steering wheel, and a second prediction probability that the driver's hands do not leave the steering wheel.
[0333] Figure 6 This is a schematic diagram of the initial model workflow provided for embodiments of this application. Figure 6 The initial model shown includes a first branch and a second branch set up in parallel, specifically:
[0334] The first branch is a 1D CNN branch used to extract depth feature vectors from the original torque signal. The input to the first branch is a sample segment of the original torque signal. In this embodiment, the first branch may include 5 convolutional layers, each consisting of one-dimensional convolution, batch normalization, ReLU activation, max pooling, and Dropout operations. The one-dimensional convolution operation can be represented as:
[0335]
[0336] in, Given the input feature sequence, To output the time position of the feature sequence, The width of the convolution kernel. This is the internal index of the convolution kernel, with values ranging from 0 to... ; and The convolutional kernel weights and biases are learnable parameters; these are parameters that the model can learn. It is the output feature sequence at the time position The calculation results at that location.
[0337] The formula for batch normalization can be:
[0338]
[0339] in, This refers to an activation value in a batch of data input into the batch normalization layer. , This represents the mean and standard deviation of the current batch of data on this channel. A very small positive number is used to prevent the denominator from being zero and to ensure numerical stability. : Normalized activation value.
[0340] Further, deep feature vectors are extracted, including:
[0341] The torque signal is converted into a first feature map through the first branch, and channel attention processing and spatial attention processing are performed on the feature map in sequence to obtain a second feature map. The depth feature vector is obtained based on the second feature map.
[0342] Specifically, this embodiment embeds a dual-attention module in the first branch. This module sequentially performs channel attention processing and spatial attention processing on the first feature map output by the convolutional layer to obtain a second feature map. Channel attention generates channel weights by compressing the spatial dimension of the feature map, recalibrating each feature channel to ensure the model focuses on the most important signal channels. Spatial attention compresses along the channel dimension to generate spatial position weights, highlighting the signal periods most critical for determining hand state. Through dual-attention processing, the model can focus on the most discriminative spatiotemporal features in the torque signal.
[0343] Figure 7 This is a schematic diagram of the channel attention workflow in the dual attention mechanism provided in this application embodiment. Figure 7 As shown, the input to the channel attention module is the initial feature map extracted by the first branch (1D CNN). Its size is (in For the number of channels, Spatial height / time length (This refers to the width of the space).
[0344] To aggregate the spatial information of the feature maps, the feature maps are... Two parallel branches are input for global pooling processing:
[0345] Global average pooling is used to extract the global average contextual information of the feature map; global max pooling is used to extract the global maximum response information of the feature map while preserving key local features.
[0346] The outputs of the dual-pooling process are then fed into a shared MLP network for further feature transformation. The dimensionality of this MLP network changes as follows: ,in This is the dimensionality reduction ratio, used to reduce computational load.
[0347] The dual-path features from the shared MLP network output are added element-wise to achieve complementary information fusion. Then, the fused features are input into a Sigmoid activation function, mapping the values to between 0 and 1 to generate channel attention weights. .
[0348] The generated channel attention weights Compared with the original input feature map Perform element-wise multiplication ( Figure 7 Chinese symbol (This represents the process of reweighting each channel of the original feature map and outputting a recalibrated feature map). This process enables the model to automatically focus on the most discriminative feature channel in the torque signal.
[0349] After the channel attention recalibration is completed, the model sequentially performs spatial attention calculation. The spatial attention module is specifically based on the recalibrated feature maps. It further focuses on key spatial regions (i.e. key time segments) in the signal, and finally outputs a second feature map that integrates two levels of attention.
[0350] Next, a deep feature vector is obtained based on the second feature map, including:
[0351] The second feature map is converted into a target feature vector with a preset dimension through an adaptive pooling layer, and a deep feature vector is obtained based on the target feature vector.
[0352] Specifically, an adaptive average pooling layer transforms the second feature map into a target feature vector with a preset dimension. In this embodiment, the adaptive average pooling layer transforms the second feature map, which has a variable size, into a 128×32 feature map, which, after flattening, yields a 4096-dimensional depth feature vector. The formula for calculating adaptive pooling is:
[0353]
[0354] in, For the first The pooling region is a set of elements. Adaptive pooling layers enable the model to accept input signals of arbitrary length and output features of fixed dimensions, thereby enhancing the model's input flexibility and deployment adaptability.
[0355] The second branch is the MLP branch, used to process handcrafted features. Its input is a 70-dimensional handcrafted feature vector. The second branch contains three fully connected layers, each followed by a ReLU activation function and a Dropout operation. The computation of each layer can be represented as:
[0356]
[0357] in, Representation layer index, and The weight matrix and bias are learnable. In this embodiment, the number of neurons in the three fully connected layers are set to 128, 64, and 32 respectively, and the final output is a 32-dimensional handcrafted feature vector.
[0358] It should be noted that the number of neurons mentioned above is only an exemplary configuration, and those skilled in the art can adjust it according to the actual data scale.
[0359] Furthermore, in this embodiment, the 4096-dimensional depth feature vector output from the first branch is concatenated with the 32-dimensional handcrafted feature vector output from the second branch to obtain a 4128-dimensional fused feature vector:
[0360]
[0361] in, To fuse feature vectors, For depth feature vectors, These are handcrafted feature vectors.
[0362] The fused feature vector is then fed into the fused classification head. The fused classification head is a two-layer fully connected network; the last layer outputs the predicted probabilities of the two classes through a Softmax function: the first predicted probability of the driver's hands leaving the steering wheel, and the second predicted probability of the driver's hands not leaving the steering wheel. The Softmax calculation can be expressed as:
[0363]
[0364] in, The fusion features of the input samples For the target category index, in this embodiment =1 means "driver's hands off the steering wheel". =2 indicates that "the driver's hands have not left the steering wheel"; To merge the categories output by the classification head The score; To calculate the summation index, all categories are traversed; in this example, there are two categories. Indicates that given input Under the given conditions, the model predicts the category. The probability of , and the sum of the predicted probabilities of all categories is 1.
[0365] S503. Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct a hand state detection model.
[0366] During model building, the classification loss between the predicted results and the true category is calculated using training samples, and the weight parameters of the initial model are updated based on this classification loss.
[0367] Calculating the classification loss includes:
[0368] Calculate the base loss between the predicted result and the true category;
[0369] The true category indicates when the driver's hands leave the steering wheel, amplifying the base loss to obtain the classification loss.
[0370] Additionally, the product of the easy / difficult sample factor and the base loss is calculated, and the classification loss that is positively correlated with this product is determined. The higher the predicted probability corresponding to the true class in the prediction results, the smaller the easy / difficult sample factor.
[0371] Specifically, first, the basic loss between the predicted result and the true class is calculated. In this embodiment, cross-entropy loss can be used to calculate the basic loss:
[0372]
[0373] in, This is the model's predicted probability of the true category. When the true category is "driver's hands off the steering wheel"... Corresponding to the first predicted probability; when the true category is "driver's hands off the steering wheel" This corresponds to the second predicted probability.
[0374] First and foremost, it's important to note that in real-world driving scenarios, the number of samples where "the driver's hands are off the steering wheel" is far fewer than the number of samples where "the driver's hands are on the steering wheel," resulting in a severe imbalance between the two categories. If the model is directly trained using the aforementioned cross-entropy loss, since the "driver's hands are on the steering wheel" samples constitute the vast majority, the total loss will primarily be contributed by the majority class samples. The model will tend to predict all samples as "driver's hands are on the steering wheel" to achieve a lower overall loss, leading to a low recall rate for this high-risk category. This fails to meet the safety requirements of high-level autonomous driving.
[0375] Therefore, to alleviate the model bias problem caused by the extremely small number of "driver's hands off the steering wheel" samples and class imbalance in real-world scenarios, this embodiment introduces class weights and easy / difficult sample factors for modulation on the basis of the basic loss.
[0376] In this embodiment, the classification loss is calculated using the Focal Loss function, and the calculation formula is as follows:
[0377]
[0378] in, It is the model's predicted probability of the true category, with the same meaning as above;
[0379] Figure 8 This diagram illustrates class imbalance processing based on Focal Loss, as provided in an embodiment of this application. Please refer to the following. Figure 8 Understand the principle behind the Focal Loss function in this embodiment for mitigating class imbalance.
[0380] For category weighting, in this embodiment, when the true category is "driver's hands off the steering wheel", The value can be 3.0; when the actual category is "driver's hands did not leave the steering wheel", The value can be set to 1.0, meaning that for each sample where "the driver's hands are off the steering wheel," its base loss can be amplified by a factor of 3; while the base loss for samples where "the driver's hands are not off the steering wheel" remains unchanged. From the perspective of gradient update, amplifying the loss of samples where "the driver's hands are off the steering wheel" is equivalent to amplifying the gradient contribution of that sample to the model parameter update, thus giving higher attention to samples of the "driver's hands are off the steering wheel" class during training, thereby correcting the tendency of the model to shift towards the "driver's hands are not off the steering wheel" class due to the large difference in the number of samples.
[0381] For the focusing parameter, 2.0 can be used in this embodiment.
[0382] Divide the sample into easy and difficult factors, and predict the probability. The larger the value, the smaller the factor; the predicted probability. The smaller the value, the larger the factor; the role of the easy / difficult sample factor is to dynamically adjust the contribution of different samples to the total loss: when a sample is correctly classified by the model with high confidence, i.e. Approaching 1, at this point When the value approaches 0, the loss for that sample is significantly compressed. These samples are considered "easy to classify" and constitute the majority of the actual collected data. Without suppression, they would dominate the total loss, causing the model training to be driven by a large number of simple samples, making it difficult to further improve the ability to distinguish difficult samples. Conversely, when the sample classification is difficult and the model provides... When the values are small, for example, the "driver's hands off the steering wheel" sample and the "driver's hands on the steering wheel" sample are quite similar in torque signal characteristics. In this case, the "driver's hands off the steering wheel" value is close to 1, and the loss of this sample is fully preserved. In this way, the model focuses on low-confidence, easily confused difficult samples when updating parameters, pushing the decision boundary towards the difficult sample region, thereby improving the recognition rate of difficult "driver's hands off the steering wheel" samples.
[0383] It is the final calculated Focal Loss classification loss value, which is positively correlated with the product of the easy / difficult sample factor and the base loss.
[0384] In another possible implementation, when the true class indicates that the driver's hands have left the steering wheel, amplifying the base loss to obtain the classification loss can be achieved by calculating a weighted loss based on sample weights. Specifically, after calculating the base loss for each sample, a sample weight is assigned to it, which is related to the true class. For example, a weight of 3.0 is set for samples of the "driver's hands left the steering wheel" class, and a weight of 1.0 is set for samples of the "driver's hands did not leave the steering wheel" class. Then, the weighted losses are summed and averaged to obtain the classification loss. This approach amplifies the loss of minority class samples by changing the proportion of each sample's contribution to the total loss.
[0385] In another possible implementation, the product of the easy / difficult sample factor and the base loss is calculated, and the classification loss positively correlated with this product is determined. The higher the predicted probability corresponding to the true class in the prediction result, the smaller the easy / difficult sample factor. This can be implemented in the following way:
[0386] Set a prediction probability threshold, for example, a prediction probability threshold of 0.6, when When the probability is less than or equal to the prediction probability threshold, the difficulty factor for the sample is set to 1, meaning the complete base loss for that sample is retained; when... > When predicting the probability threshold, set the difficulty level of the sample factor to [value]. Or other values less than 1.
[0387] During training, the calculated Focal Loss is used as the total loss. The gradients of the parameters of each layer are calculated through the backpropagation algorithm, and the weight parameters of the initial model are updated using the optimizer.
[0388] Furthermore, this embodiment may also include domain adversarial training to improve the model's generalization ability in different driving scenarios.
[0389] Specifically, a gradient inversion layer is set before feature fusion and connected to a domain classifier. The domain classifier takes the deep feature vector output from the first branch and / or the handcrafted feature vector output from the second branch as input. In this embodiment, the fused feature vector obtained by concatenating the two is used as input to predict the driving scenario category corresponding to the current torque signal. The driving scenario category may include scenario labels such as different drivers, different road conditions, and different driving styles.
[0390] During training, the gradient reversal layer performs an identity mapping during forward propagation and does not affect normal feature calculation; during backpropagation, the gradient reversal layer multiplies the gradient generated by the domain classifier by... Perform sign reversal, where The coefficient is used for weighting. The gradient, after sign reversal, is backpropagated to the first and / or second branches, causing the feature extractor to optimize in the opposite direction to the domain classifier in the gradient update direction. This allows the feature extractor to learn domain-invariant features unaffected by the driving scenario, thus preventing the model from overfitting to specific driving scenarios.
[0391] It should be noted that the number of convolutional layers in the first branch, the number of fully connected layers in the second branch, the number of neurons, the values of the class weights and focusing parameters in Focal Loss, and the gradient reversal layer are all different. The values and other parameters are merely illustrative examples. Those skilled in the art can make corresponding adjustments based on the actual data scale and computing power conditions, and all of these adjustments fall within the scope of protection of this application.
[0392] The hand state detection model construction method provided in this embodiment has the following technical effects:
[0393] 1. A dual-branch parallel architecture is adopted to extract deep features from the original torque signal and abstract features from the handcrafted features. The deep features can capture the implicit temporal patterns in the original signal, while the handcrafted features contain expert knowledge in the time domain, frequency domain, and time-frequency domain. The two features complement each other and are fused together to improve the accuracy and robustness of hand state recognition.
[0394] 2. Focal Loss is employed, combining class weights and easy / easy sample factors, specifically optimized to address the problem of extremely few "driver's hands off the steering wheel" samples and class imbalance. By amplifying the base loss of "driver's hands off the steering wheel" samples and suppressing the loss contribution of easily classified samples, the model can focus on the small but crucial "driver's hands off the steering wheel" samples during training, avoiding model bias towards the majority of "driver's hands on the steering wheel" samples.
[0395] 3. Introduce channel attention and spatial attention mechanisms in the first branch to enable the model to automatically focus on the most discriminative feature channels and key signal periods in the torque signal, thereby further improving the targeting of feature extraction and classification performance.
[0396] 4. Adaptive pooling layers are used, enabling the first branch to receive signal inputs of arbitrary length while outputting feature vectors of fixed dimensions. This enhances the model's adaptability to different sampling durations and signal lengths, facilitating deployment under different vehicle models and sampling configurations.
[0397] 5. Introducing gradient inversion layers and domain classifiers for domain adversarial training enables the model to learn generalization features independent of driving scenarios, reducing performance degradation across different drivers, road conditions, and driving styles, and improving the model's reliability and universality across all scenarios.
[0398] Example 3
[0399] Figure 9 This is a schematic diagram of the driver's hand state detection device provided in the embodiments of this application, as shown below. Figure 9 The hand state detection device 90 shown includes:
[0400] The signal acquisition module 901 is used to acquire the steering wheel torque signal on the vehicle's controller area network bus.
[0401] The detection module 902 is used to input the steering wheel torque signal into the hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through the first branch, and to process the manual features of the steering wheel torque signal through the second branch to obtain the manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and a second prediction probability that the driver's hand does not leave the steering wheel.
[0402] Based on the prediction results, a first result or a second result is generated. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
[0403] Figure 10 This is a schematic diagram of the hand state detection model construction device provided in the embodiments of this application, as shown below. Figure 10 As shown, the hand state detection model construction device 100 includes:
[0404] The sample acquisition module 1001 is used to acquire the torque signal of the steering wheel and the corresponding real category. The real category is used to indicate whether the driver's hands have left the steering wheel.
[0405] Model building module 1002 is used to perform model building based on an initial model including a first branch and a second branch with parallel settings. The model building includes:
[0406] The first branch extracts the depth feature vector from the torque signal, and the second branch processes the handcrafted features of the torque signal to obtain the handcrafted feature vector.
[0407] The deep feature vector and the handmade feature vector are fused into a fused feature. The prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hands leave the steering wheel and a second prediction probability that the driver's hands do not leave the steering wheel.
[0408] Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct a hand state detection model.
[0409] The apparatus provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0410] Figure 11 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 11 As shown, the electronic device 110 provided in this embodiment includes at least one processor 1101 and a memory 1102. Optionally, the device 110 further includes a communication component 1103. The processor 1101, the memory 1102, and the communication component 1103 are connected via a bus 1104.
[0411] In a specific implementation, at least one processor 1101 executes computer execution instructions stored in memory 1102, causing at least one processor 1101 to perform the above-described method.
[0412] The specific implementation process of processor 1101 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0413] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0414] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0415] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0416] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0417] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0418] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0419] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0420] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0421] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0422] In addition, the functional units in the various embodiments of the present invention 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.
[0423] If a function is implemented as 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 technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0424] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0425] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for detecting the state of a driver's hands, characterized in that, include: Acquire the steering wheel torque signal from the vehicle's controller area network bus; The steering wheel torque signal is input into a hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through a first branch, and to process the manual features of the steering wheel torque signal through a second branch to obtain a manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and a second prediction probability that the driver's hand does not leave the steering wheel. Based on the prediction result, a first result or a second result is generated. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
2. The method according to claim 1, characterized in that, Acquiring the steering wheel torque signal includes: Obtain the message sent by the electric power steering system of the vehicle in the controller area network bus; The original torque signal of the vehicle's steering wheel is parsed from the message, and the steering wheel torque signal is obtained based on the original torque signal.
3. The method according to claim 2, characterized in that, The step of obtaining the message sent by the controller of the vehicle's electric power steering system in the controller area network bus includes: The message in the controller area network bus is obtained through the vehicle's fault diagnosis interface.
4. The method according to claim 2, characterized in that, The process of obtaining the steering wheel torque signal based on the original torque signal includes: The missing torque signal sampling points in the original torque signal are filled in using linear interpolation to obtain the first signal; The steering wheel torque signal is obtained by processing the first signal.
5. The method according to claim 4, characterized in that, The process of processing the first signal to obtain the steering wheel torque signal includes: The first signal is subjected to signal amplitude normalization processing to obtain the second signal; The second signal is divided into multiple sample segments, and the multiple sample segments are used as the steering wheel torque signal.
6. The method according to claim 1, characterized in that, Before processing the manual features of the steering wheel torque signal through the second branch to obtain the manual feature vector, the method further includes: The time-domain features, frequency-domain features, and time-frequency features of the steering wheel torque signal are extracted as the manual features.
7. The method according to claim 1, characterized in that, The method further includes: Based on the first result, determine the current duration for which the driver's hands have been off the steering wheel; Determine whether the current duration is greater than or equal to a preset duration threshold; If so, a warning is triggered and / or the vehicle takeover procedure is initiated.
8. The method according to claim 7, characterized in that, Determining the current duration of the driver's hands being off the steering wheel based on the first result includes: When multiple first results are received consecutively at preset time intervals, the product of the number of first results and the preset time interval is taken as the current time interval.
9. The method according to claim 1, characterized in that, The step of generating a first result or a second result based on the prediction result includes: Determine the judgment threshold corresponding to the state information of the vehicle; If the first predicted probability is greater than or equal to the determination threshold, the first result is generated; otherwise, the second result is generated.
10. The method according to claim 9, characterized in that, The status information includes the vehicle's current speed, and the determination of the threshold corresponding to the vehicle's status information includes: When the current vehicle speed is greater than a preset threshold, the first threshold is determined as the determination threshold; otherwise, the second threshold, which is less than the first threshold, is determined as the determination threshold.
11. A method for constructing a hand state detection model, characterized in that, include: Acquire the torque signal of the steering wheel and its corresponding real category, wherein the real category is used to indicate whether the driver's hands have left the steering wheel; Model building is performed based on an initial model that includes a first branch and a second branch with parallel settings. The model building includes: The first branch extracts the depth feature vector from the torque signal, and the second branch processes the manual features of the torque signal to obtain the manual feature vector. The deep feature vector and the handcrafted feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel and a second prediction probability that the driver's hand does not leave the steering wheel. Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct the hand state detection model.
12. The method according to claim 11, characterized in that, Calculating the classification loss includes: Calculate the base loss between the predicted result and the true category; The true category indicates that when the driver's hands leave the steering wheel, the base loss is amplified to obtain the classification loss.
13. The method according to claim 12, characterized in that, Calculating the classification loss includes: Calculate the product of the easy / difficult sample factor and the base loss, and determine the classification loss that is positively correlated with the product. The higher the predicted probability of the true category in the prediction result, the smaller the easy / difficult sample factor.
14. The method according to claim 12, characterized in that, The underlying loss between the predicted result and the true category includes: The underlying loss is calculated using a loss function based on cross-entropy.
15. The method according to claim 11, characterized in that, Extracting the depth feature vector includes: The torque signal is converted into a first feature map through the first branch, and channel attention processing and spatial attention processing are sequentially performed on the feature map to obtain a second feature map. The depth feature vector is obtained based on the second feature map.
16. The method according to claim 15, characterized in that, The process of obtaining the depth feature vector based on the second feature map includes: The second feature map is converted into a target feature vector with a preset dimension by an adaptive pooling layer, and the deep feature vector is obtained based on the target feature vector.
17. The method according to claim 11, characterized in that, The method further includes: The gradient inversion layer is used to invert the sign of the gradients of the domain classifier backpropagated to the first branch and / or the second branch. The domain classifier is used to identify the driving scenario category corresponding to the torque signal based on the deep feature vector and the handcrafted feature vector.
18. A driver's hand status detection device, characterized in that, include: The signal acquisition module is used to acquire the steering wheel torque signal on the vehicle's controller area network bus. The detection module is used to input the steering wheel torque signal into a hand state detection model. The hand state detection model is used to extract the depth feature vector of the steering wheel torque signal through a first branch, and to process the manual features of the steering wheel torque signal through a second branch to obtain a manual feature vector. The depth feature vector and the manual feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel of the vehicle, and a second prediction probability that the driver's hand does not leave the steering wheel. Based on the prediction result, a first result or a second result is generated. The first result is used to indicate that the driver's hands have left the steering wheel, and the second result is used to indicate that the driver's hands have not left the steering wheel.
19. A hand state detection model construction device, characterized in that, include: The sample acquisition module is used to acquire the torque signal of the steering wheel and the corresponding real category, wherein the real category is used to indicate whether the driver's hands have left the steering wheel; A model building module is configured to perform model building based on an initial model including a first branch and a second branch with parallel settings, the model building comprising: The first branch extracts the depth feature vector from the torque signal, and the second branch processes the manual features of the torque signal to obtain the manual feature vector. The deep feature vector and the handcrafted feature vector are fused into a fused feature, and a prediction result is generated based on the fused feature. The prediction result includes a first prediction probability that the driver's hand leaves the steering wheel and a second prediction probability that the driver's hand does not leave the steering wheel. Calculate the classification loss between the predicted result and the true category, and update the weight parameters of the initial model based on the classification loss to construct the hand state detection model.
20. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-10, or to perform the method as described in any one of claims 11-17.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to perform the method as described in any one of claims 1-10, or to perform the method as described in any one of claims 11-17.
22. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to perform the method as described in any one of claims 1-10, or to perform the method as described in any one of claims 11-17.
