Vehicle snakelike driving detection method and device, electronic equipment and storage medium

By using sliding windows to extract key feature points of the steering wheel angle sequence in autonomous driving vehicles, and using vehicle speed information to detect serpentine driving behavior, the accuracy and robustness of serpentine driving detection in autonomous driving vehicles are solved, and efficient detection in different driving environments is achieved.

CN119821415AActive Publication Date: 2025-04-15IFLYTEK CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

Snake-shaped driving detection is difficult, has low accuracy and poor robustness in autonomous driving vehicles. Especially in poor road conditions or inclement weather, the lane lines are blurred or disappear, resulting in an increase in detection error.

Method used

By obtaining the vehicle speed sequence and steering wheel angle sequence, key feature points are extracted based on the sliding window, the sliding window size is dynamically adjusted to adapt to the driving characteristics at different speeds, and the serpentine driving behavior is detected based on the vehicle speed information.

Benefits of technology

It improves the accuracy and adaptability of serpentine driving detection, reduces dependence on image data, avoids interference factors such as light changes, occlusion and poor image quality, thereby maintaining high robustness and stability in various driving environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119821415A_ABST
    Figure CN119821415A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent driving, and provides a vehicle snakelike driving detection method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a vehicle speed sequence and a steering wheel angle sequence; key feature points are extracted from the steering wheel corner sequence based on a sliding window, a corner feature point set is obtained, and the size of the sliding window is obtained through dynamic adjustment based on the vehicle speed sequence; and based on the vehicle speed sequence and the corner feature point set, detecting whether the vehicle has a snakelike driving behavior or not. According to the method, the key feature points in the steering wheel corner sequence are extracted by adopting the dynamic sliding window, the key feature points can be identified more accurately, the detection accuracy is improved, whether the vehicle has a snakelike driving behavior or not can be efficiently detected by combining the vehicle speed sequence and the corner feature point set, and the detection accuracy is improved. Detection does not need to be performed depending on image data, so that the robustness and stability of detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent driving technology, and in particular to a vehicle serpentine driving detection method, device, electronic equipment and storage medium. Background Art

[0002] Snake-like driving refers to the phenomenon of autonomous vehicles swaying back and forth while driving on the road. This phenomenon can be caused by a variety of factors, including perception system errors, imperfect planning algorithms, control strategy deviations, and vehicle hardware failures. To ensure the safety and reliability of autonomous driving technology, the system must detect and suppress snake-like driving in real time to avoid potential harm to drivers and passengers.

[0003] Currently, autonomous vehicles commonly use cameras to detect lane markings and calculate yaw angles to identify snaking. However, in poor road conditions or inclement weather, lane markings can become blurred or disappear entirely, reducing camera perception accuracy and increasing the risk of falsely detecting snaking behavior. Summary of the Invention

[0004] The present invention provides a vehicle serpentine driving detection method, device, electronic device and storage medium, which are used to solve the defects of vehicle serpentine driving detection in autonomous driving, such as difficulty, low accuracy and poor robustness.

[0005] The present invention provides a method for detecting serpentine driving of a vehicle, comprising: Obtain vehicle speed sequence and steering wheel angle sequence; Extracting key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; Based on the vehicle speed sequence and the corner feature point set, it is detected whether the vehicle has serpentine driving behavior.

[0006] According to a vehicle serpentine driving detection method provided by the present invention, the key feature points are extracted from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, including: Extracting key feature points from the steering wheel angle sequence based on a sliding window to obtain an initial feature point set; Performing data enhancement on some key feature points in the initial feature point set to obtain an enhanced feature point set; The enhanced feature point set is integrated into the initial feature point set to obtain the corner feature point set.

[0007] According to a vehicle serpentine driving detection method provided by the present invention, the key feature points are extracted from the steering wheel angle sequence based on a sliding window to obtain an initial feature point set, including: Traversing the steering wheel angle sequence, and during the traversal process, reading corresponding angle data from the steering wheel angle sequence based on the index and size of the current sliding window to obtain a steering wheel angle set within the current sliding window; Determine a maximum angle and a minimum angle from the steering wheel angle set, and use the maximum angle and the minimum angle as candidate feature points; Based on a preset threshold, the candidate feature points are screened to obtain key feature points within the current sliding window; Based on the key feature points in each sliding window, the initial feature point set is obtained.

[0008] According to a vehicle serpentine driving detection method provided by the present invention, detecting whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set includes: Inputting the vehicle speed sequence and the corner feature point set into a detection model to obtain a detection result output by the detection model, wherein the corner feature point set includes a plurality of feature points and time and corner data corresponding to the plurality of feature points; The detection model includes a feature extractor and a classifier. The feature extractor is used to perform feature extraction based on the vehicle speed sequence and the time and angle data corresponding to the multiple feature points to obtain deep features. The classifier is used to perform classification detection based on the deep features and output the detection results.

[0009] According to a vehicle serpentine driving detection method provided by the present invention, the training step of the detection model includes: Obtain vehicle speed history data and steering wheel angle history data; Preprocessing the vehicle speed history data and the steering wheel angle history data to obtain a sample speed sequence and a sample angle sequence; Extracting key feature points from the sample corner sequence based on a sample sliding window to obtain a sample initial feature point set, wherein the size of the sample sliding window is dynamically adjusted based on the sample speed sequence; Performing data enhancement on some key feature points in the sample initial feature point set to obtain a sample enhanced feature point set, and integrating the sample enhanced feature point set into the sample initial feature point set to obtain a sample corner feature point set; Based on the vehicle speed sequence, the sample corner feature point set and the corresponding sample detection results, an initial model is trained to obtain the detection model.

[0010] According to a vehicle serpentine driving detection method provided by the present invention, obtaining a vehicle speed sequence and a steering wheel angle sequence includes: Real-time collection of vehicle speed data and steering wheel angle data; The collected vehicle speed data and steering wheel angle data are preprocessed to obtain the vehicle speed sequence and the steering wheel angle sequence.

[0011] According to a vehicle serpentine driving detection method provided by the present invention, the preprocessing step of the steering wheel angle data includes: Fourier transform technology is applied to filter and eliminate noise on the steering wheel angle data to obtain the steering wheel angle sequence.

[0012] The present invention also provides a vehicle serpentine driving detection device, comprising: an acquisition unit, configured to acquire a vehicle speed sequence and a steering wheel angle sequence; an extraction unit, configured to extract key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; A detection unit is used to detect whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, any of the above-mentioned vehicle serpentine driving detection methods is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting serpentine driving of a vehicle as described above is implemented.

[0015] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the above-mentioned methods for detecting serpentine driving of a vehicle.

[0016] The vehicle serpentine behavior detection method, device, electronic device, and storage medium provided by the present invention utilize a sliding window whose size is dynamically adjusted based on the vehicle speed sequence to extract key feature points from the steering wheel angle sequence. This dynamic adjustment mechanism enables the present invention to more accurately identify key feature points based on driving characteristics at different speeds, thereby improving detection accuracy and adaptability. By combining the vehicle speed sequence and the set of corner feature points, the presence of serpentine behavior can be efficiently detected without relying on image data for detection. This avoids interference factors such as illumination changes, occlusion, and poor image quality caused by image detection, thereby ensuring that the method maintains high robustness and stability in various driving environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 1 is a flow chart of a method for detecting serpentine driving of a vehicle provided by the present invention; Figure 2 It is the original waveform diagram of the vehicle steering wheel angle data provided by the present invention; Figure 3 It is a waveform diagram of the vehicle steering wheel angle data after filtering provided by the present invention; Figure 4 is a schematic diagram of the steering wheel angle feature points provided by the present invention; Figure 5 It is a flow chart of the detection model training provided by the present invention; Figure 6 1 is a flow chart of a method for detecting vehicle serpentine driving based on steering wheel angle provided by the present invention; Figure 7 It is a structural schematic diagram of the vehicle serpentine driving detection device provided by the present invention; Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0019] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0020] Currently, autonomous vehicles' snaking behavior is primarily detected using technology that uses cameras to detect lane markings and calculate yaw angles. However, existing snaking detection technology has significant limitations. Firstly, it relies heavily on the camera's clear perception of lane markings. However, in poor road conditions or weather, lane markings can become blurred or even disappear completely, significantly reducing the camera's perception accuracy. In these cases, the system may misidentify the vehicle as snaking, triggering unnecessary safety alerts or interventions, impacting driving comfort and safety. Secondly, even when lane markings are clearly visible, the accuracy and stability of snaking detection can be compromised by the camera's limited perception range and interference from ambient lighting, shadows, and other factors.

[0021] To address this issue, the present invention provides a steering wheel angle-based vehicle snaking detection method. By utilizing the vehicle's steering wheel angle information and extracting the peak and trough characteristic points of the steering wheel angle waveform, combined with vehicle speed information, this method can accurately determine whether the vehicle is snaking. This method not only solves the problem of the system's self-detection of vehicle snaking during autonomous driving, but also relies solely on low-cost hardware such as the vehicle's steering wheel angle and speed sensors, avoiding the high cost and lack of robustness associated with image-based snaking detection methods.

[0022] Figure 1 FIG. 1 is a flow chart of the vehicle serpentine driving detection method provided by the present invention, as shown in FIG. Figure 1 As shown, the method includes: Step 110: Acquire a vehicle speed sequence and a steering wheel angle sequence.

[0023] Specifically, a vehicle speed sequence refers to a series of speed values ​​that change over time while the vehicle is in motion. These speed values ​​can be collected in real time by the vehicle's speed sensor. The speed sensor can measure the vehicle's instantaneous speed at different points in time and record this data as a sequence. A steering wheel angle sequence refers to a series of values ​​of the steering wheel angle that change over time when the driver or autonomous driving system controls the steering wheel. These values ​​can be collected by a steering wheel angle sensor. The steering wheel angle sensor can monitor the steering wheel's rotation angle in real time and record this data as a sequence.

[0024] Specifically, vehicles are typically equipped with appropriate sensors, including speed sensors and steering wheel angle sensors. During driving, these sensors collect real-time data on vehicle speed and steering wheel angle. This data is typically output as digital signals and transmitted to a data processing unit via the vehicle's data bus (such as the CAN bus). The data processing unit receives the sensor data and records it as a sequence. This sequence data is then used for subsequent serpentine behavior detection. After recording, the data can be preprocessed, including cleaning, filtering, and denoising, to improve its accuracy and reliability.

[0025] It's understandable that the present invention relies solely on the vehicle's steering wheel angle sensor and speed sensor, both of which are typically standard features on vehicles. Therefore, no additional, costly hardware investment is required. Compared to approaches relying on image detection, the present invention significantly reduces costs while avoiding the complexity and lack of robustness that image detection can bring.

[0026] Step 120 : extracting key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points. The size of the sliding window is dynamically adjusted based on the vehicle speed sequence.

[0027] Specifically, for a steering wheel angle sequence acquired over a period of time, a sliding window approach can be used to extract key feature points from the steering wheel angle sequence, thereby reducing the amount of data. Sliding windows are a common data processing technique that slides a fixed or dynamically sized window over a data sequence to analyze the data within the window. In vehicle snaking behavior detection, sliding windows are used to analyze steering wheel angle sequences to identify possible snaking behavior.

[0028] In the embodiment of the present invention, the size of the sliding window is not fixed, but is dynamically adjusted based on the vehicle speed sequence. This is because the driving characteristics of a vehicle at different speeds are different. For example, when driving at high speeds, the vehicle's handling becomes more sensitive, and a small turn of the steering wheel may cause a significant change in the vehicle's driving direction and trajectory. However, when driving at low speeds, the vehicle's operation is relatively less sensitive, and a small steering wheel rotation angle will not have a significant impact on the vehicle's driving direction and trajectory.

[0029] To dynamically adjust the sliding window size, the vehicle speed sequence can be traversed, and the sliding window size can be adjusted based on each traversed vehicle speed value. For example, a base window size can be set and the window size can be adjusted linearly or nonlinearly based on changes in speed. When the vehicle speed is low, the sliding window size is increased to smooth out minor fluctuations in the steering wheel angle data; when the vehicle speed is high, the sliding window size is decreased to more sensitively capture changes in the steering wheel angle. It should be understood that a dynamic sliding window can more accurately identify key feature points than a fixed-size window.

[0030] After determining the size of the sliding window, we can use it to extract key feature points from the steering wheel angle sequence. Specifically, we slide the sliding window across the steering wheel angle sequence, calculating the statistical features (such as maximum and minimum values) of the data within the window with each slide. Key feature points are then determined based on these statistical features.

[0031] It's understood that in vehicle snaking behavior detection, key feature points are specifically identified points in the steering wheel angle sequence, such as peaks and troughs. The corner feature point set is a collection of these key feature points, encompassing all peaks and troughs identified in the steering wheel angle sequence. A peak represents a point where the steering wheel angle increases sharply and then decreases within a short period of time, while a trough represents a point where the steering wheel angle decreases sharply and then increases within a short period of time. These peaks and troughs may represent unstable states during vehicle driving and are important features for detecting snaking behavior.

[0032] Step 130 : Detect whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set.

[0033] Specifically, after extracting a set of corner feature points, the vehicle speed sequence and the set of corner feature points can be analyzed to detect whether the vehicle exhibits serpentine driving behavior. Specifically, analyzing the vehicle speed sequence can first provide insights into the vehicle's driving state. If the vehicle speed remains relatively stable, it can be determined that the vehicle is in normal driving. However, if the vehicle speed fluctuates frequently, especially when these fluctuations show a correlation with changes in the steering wheel angle, it may indicate that the vehicle is exhibiting serpentine driving behavior. Next, the set of corner feature points can be analyzed, namely the peaks and troughs in the steering wheel angle sequence. These feature points represent sudden steering wheel turns and may reflect frequent adjustments to the vehicle's driving direction by the autonomous driving system. For example, the distance between adjacent feature points (i.e., peaks or troughs) can be calculated. If the distance between adjacent feature points is very short, it indicates that the steering wheel has been turned frequently in a short period of time, which may indicate that the vehicle is exhibiting serpentine driving behavior. For example, the angular changes of feature points can be analyzed, that is, the angular difference between adjacent feature points can be calculated to understand the direction and degree of steering wheel rotation. If the angular difference between adjacent feature points is large, it means that the steering wheel has turned significantly in a short period of time, which may also indicate that the vehicle has serpentine driving behavior.

[0034] Finally, the analysis results of the vehicle speed sequence and the set of corner feature points can be combined. If the vehicle speed fluctuates frequently and these fluctuations are correlated with sharp steering wheel angle changes (i.e., speed fluctuations are accompanied by frequent steering wheel turns), then it can be determined that the vehicle is exhibiting serpentine driving behavior.

[0035] It should be noted that the detection method described above is only one possible implementation. In another embodiment, the vehicle speed sequence and corner feature point set can be directly input into a neural network model, which then analyzes and detects the vehicle and outputs corresponding detection results. Based on these detection results, it can be determined whether the vehicle exhibits serpentine driving behavior. Here, the neural network model can be pre-trained using a large amount of sample data.

[0036] The method provided by an embodiment of the present invention extracts key feature points from a steering wheel angle sequence by employing a sliding window whose size is dynamically adjusted based on the vehicle speed sequence. This dynamic adjustment mechanism enables the present invention to more accurately identify key feature points based on driving characteristics at different speeds, thereby improving detection accuracy and adaptability. By combining the vehicle speed sequence and the set of corner feature points, it is possible to efficiently detect whether a vehicle exhibits serpentine driving behavior without relying on image data for detection. This avoids interference factors such as illumination changes, occlusions, and poor image quality that can occur during image detection, ensuring that the method maintains high robustness and stability in various driving environments.

[0037] Based on the above embodiment, step 110 specifically includes: Step 111, collecting vehicle speed data and steering wheel angle data in real time; Step 112 : pre-processing the collected vehicle speed data and steering wheel angle data to obtain the vehicle speed sequence and the steering wheel angle sequence.

[0038] Specifically, during vehicle travel, vehicle speed and steering wheel angle data can be collected in real time using the vehicle's speed sensor and steering wheel angle sensor. Vehicle speed data refers to the speed value measured and output by the speed sensor during the vehicle's current travel. Steering wheel angle data refers to the rotation angle value measured by the steering wheel angle sensor when the driver or autonomous driving system is manipulating the steering wheel.

[0039] The collected vehicle speed and steering wheel angle data can be preprocessed to ensure data quality and improve the accuracy of subsequent analysis. The preprocessing process can include data cleaning (such as removing outliers and filling missing values), data smoothing, and data standardization.

[0040] Furthermore, the pre-processing step of the steering wheel angle data includes: Fourier transform technology is applied to filter and eliminate noise on the steering wheel angle data to obtain the steering wheel angle sequence.

[0041] Specifically, Fourier transform technology can be used to filter and eliminate noise from the collected digital steering wheel angle data to improve the signal-to-noise ratio. Fourier transform technology is a mathematical method that converts signals from the time domain to the frequency domain to identify different frequency components in the signal, thereby achieving signal filtering and noise elimination.

[0042] Using Fourier transform technology to filter and remove noise from steering wheel angle data can be achieved through the following steps: First, a Fourier transform is performed on the steering wheel angle data, converting it from the time domain to the frequency domain. This yields a frequency-domain signal representation containing the amplitude and phase information of different frequency components. Then, in the frequency domain, certain frequency components can be selectively retained or removed based on the signal's frequency characteristics. For example, high-frequency noise components can be removed from steering wheel angle data, as these components are often caused by sensor noise or other external interference. Finally, an inverse Fourier transform is performed on the filtered frequency-domain signal, converting it back to the time domain to obtain the filtered and noise-removed steering wheel angle data.

[0043] Figure 2 is the original waveform of the vehicle steering wheel angle data provided by the present invention, such as Figure 2 As shown, the steering wheel angle sensor installed on the vehicle can collect and store the steering wheel angle data in real time. The data is output in the form of digital signals, and the original waveform is as shown in Figure 2 shown. Figure 3 is a waveform diagram of the vehicle steering wheel angle data after filtering provided by the present invention, such as Figure 3 As shown, by using Fourier transform technology through the filter, the steering wheel angle data is filtered and noise eliminated, and the following can be obtained: Figure 3 The signal waveform after filtering is shown in the figure. It should be noted that Figure 2 and Figure 3 In the figure, the horizontal axis represents time and the vertical axis represents the steering wheel angle.

[0044] Based on any of the above embodiments, step 120 specifically includes: Step 121 : extract key feature points from the steering wheel angle sequence based on a sliding window to obtain an initial feature point set.

[0045] Specifically, a dynamically resized sliding window is slid across the steering wheel angle sequence. Each slide calculates statistical features (such as maximum and minimum values) of the data within the window. Key feature points are then identified based on these features. An initial feature point set is formed based on the key feature points identified within each window. Here, the initial feature point set refers to the preliminary set of key feature points extracted from the steering wheel angle sequence using the sliding window during the vehicle serpentine behavior detection process. These feature points primarily consist of peaks and troughs, representing significant locations where the steering wheel angle changes.

[0046] Furthermore, step 121 specifically includes: Step 1211: traverse the steering wheel angle sequence. During the traversal process, based on the index and size of the current sliding window, read the corresponding angle data from the steering wheel angle sequence to obtain a steering wheel angle set within the current sliding window. Step 1212: determining a maximum angle and a minimum angle from the steering wheel angle set, and using the maximum angle and the minimum angle as candidate feature points; Step 1213: Screen the candidate feature points based on a preset threshold to obtain key feature points within the current sliding window; Step 1214: Obtain the initial feature point set based on the key feature points in each sliding window.

[0047] Specifically, a basic window size can be set and dynamically adjusted based on the corresponding speed values ​​in the vehicle speed sequence. A sliding step size is also set, which determines the frequency with which the window moves across the steering wheel angle sequence. For example, the step size can be set to 1, meaning the window moves one data point at a time. This can also be adjusted based on analysis requirements, though this is not specifically limited in this embodiment of the present invention. An index variable is also set to track the current position of the sliding window within the steering wheel angle sequence. Next, a loop structure is used to traverse the entire steering wheel angle sequence, incrementing the index by the sliding step size with each iteration. Within each iteration, the corresponding data point (i.e., angle data) is read from the steering wheel angle sequence based on the current index and window size, forming a set of steering wheel angles within the current sliding window. Subsequently, statistical analysis is performed on all the steering wheel angle data within the current sliding window to determine the maximum angle (i.e., maximum value) and the minimum angle (i.e., minimum value).

[0048] It's important to note that, in the actual signal acquisition process, the collected steering wheel angle data often contains a certain amount of noise due to various factors (such as sensor accuracy, environmental factors, and electromagnetic interference). This noise can cause local maxima or minima in the data, which do not represent true peaks or troughs. Therefore, directly using the maximum and minimum values ​​within each window as peaks and troughs (i.e., key feature points) can lead to a large number of false positives. To accurately identify peaks and troughs, in each loop, the maximum and minimum values ​​within the current window are used as candidate feature points. These candidate feature points are further screened to obtain valid key feature points.

[0049] Since real peaks and troughs are usually significant feature points of signal changes over a period of time, they have a certain degree of smoothness and continuity, while local maxima or minima caused by noise often appear as sudden jumps and lack this smoothness. Therefore, to avoid misidentifying local maxima or minima caused by noise as peaks or troughs, a threshold can be set to filter candidate feature points. For example, a threshold for corner change can be set. When the difference between the maximum or minimum value and the corresponding value of the adjacent window exceeds this threshold, it is considered a key feature point. Figure 4 is a schematic diagram of the steering wheel angle feature points provided by the present invention, such as Figure 4 As shown in the figure, the characteristic points marked in red are the peaks, and the characteristic points marked in green are the troughs.

[0050] It's understood that the key feature points within the current sliding window are the significant locations of steering wheel angle changes identified after screening within the current sliding window, namely, the actual peaks and troughs. After traversing the steering wheel angle sequence, the initial feature point set is obtained based on the key feature points identified within each sliding window.

[0051] Step 122 : performing data enhancement on some key feature points in the initial feature point set to obtain an enhanced feature point set.

[0052] Specifically, after obtaining an initial set of feature points, key feature points can be randomly selected from this set and data augmentation performed on these key feature points to address the potential shortage of serpentine detection data, thereby increasing the robustness and generalization of the model. Data augmentation is a technique used to increase data diversity by adding noise, transforming data, and so on. In the context of serpentine behavior detection, data augmentation can be used to improve the model's generalization capabilities, enabling it to better handle various complex driving situations.

[0053] Data enhancement for some key feature points can be achieved by adding Gaussian noise to the steering wheel angle data of these feature points. Specifically, first, the mean and standard deviation of the Gaussian noise are set, and then a certain proportion (such as 40%) of feature points are randomly selected from the initial feature point set for enhancement to maintain the authenticity of the data distribution. For each selected feature point, random noise that conforms to the Gaussian distribution can be generated, and the generated Gaussian noise is added to the steering wheel angle value of the selected feature point. After completing the enhancement processing of all selected feature points, the enhanced feature point set can be obtained. Here, the enhanced feature point set is the feature point set obtained after data enhancement. These feature points contain the information of the original feature points, and also add changes such as noise, thereby increasing the diversity of the data.

[0054] Step 123 : Integrate the enhanced feature point set into the initial feature point set to obtain the corner feature point set.

[0055] Specifically, after obtaining the enhanced feature point set, each enhanced feature point in the enhanced feature point set can be merged with each original feature point in the initial feature point set to form a new feature point set, namely the corner feature point set. This new set contains information about both the original feature points and the feature points after data enhancement, thereby improving the diversity of feature points and the generalization ability of the model.

[0056] Based on any of the above embodiments, step 130 specifically includes: Step 131: Input the vehicle speed sequence and the corner feature point set into a detection model to obtain a detection result output by the detection model, wherein the corner feature point set includes a plurality of feature points and time and corner data corresponding to the plurality of feature points; The detection model includes a feature extractor and a classifier. The feature extractor is used to perform feature extraction based on the vehicle speed sequence and the time and angle data corresponding to the multiple feature points to obtain deep features. The classifier is used to perform classification detection based on the deep features and output the detection results.

[0057] Specifically, when detecting serpentine behavior based on a vehicle speed sequence and a set of corner feature points, the speed sequence and corner feature point set can be directly input into the detection model to obtain the model's output detection results. Here, the corner feature point set includes multiple feature points and the corresponding time and angle data (i.e., steering wheel angle data) for each feature point. The multiple feature points here refer to the extracted key feature points (including peaks and troughs) as well as some key feature points after data enhancement.

[0058] It can be understood that the detection model is a trained machine learning or deep learning model used to detect whether the vehicle has serpentine driving behavior. It receives the vehicle speed sequence and the corner feature point set as input and outputs the detection results. The detection model mainly includes a feature extractor and a classifier, wherein the feature extractor is used to extract useful feature information from the input vehicle speed sequence and the corner feature point set, that is, to obtain deep features, which can better reflect the driving state of the vehicle. The classifier is used to receive the deep features output by the feature extractor and perform classification detection based on these features. Its goal is to determine whether the input data belongs to the category of serpentine driving behavior. It should be understood that deep features refer to high-level, abstract features extracted from the original input data by the feature extractor.

[0059] Specifically, the feature extractor can use deep learning techniques such as Transformer, LSTM (Long Short-Term Memory), GRU (Gated Recurrent Unit), etc. to automatically extract useful features from the input data. The classifier can use MLP (Multilayer Perceptron) and Softmax to receive deep features and perform classification to output detection results. It should be understood that in the detection of vehicle serpentine driving behavior, the detection result can be a binary classification result, that is, whether the vehicle is serpentine driving behavior. If the detection result is "yes", it means that the vehicle is serpentine driving behavior; if the detection result is "no", it means that the vehicle is not serpentine driving behavior.

[0060] Based on any of the above embodiments, Figure 5 This is a flow chart of the detection model training process provided by the present invention, such as Figure 5 As shown, the training steps of the detection model include: Step 510: Acquire vehicle speed history data and steering wheel angle history data.

[0061] Specifically, historical vehicle speed data refers to the recorded data of a vehicle's speed over a period of time. Historical steering wheel angle data refers to the changes in steering wheel angle caused by the driver or the autonomous driving system operating the steering wheel over a period of time. Historical vehicle speed and steering wheel angle data can be obtained from vehicle sensors or recording systems and used as sample data for model training. This data is typically stored in a time series format, containing vehicle speed and steering wheel angle information at different points in time.

[0062] Step 520 : Preprocess the vehicle speed history data and the steering wheel angle history data to obtain a sample speed sequence and a sample angle sequence.

[0063] Specifically, the acquired historical vehicle speed and steering wheel angle data undergoes preprocessing, such as cleaning, denoising, and normalization, to produce cleaner, more easily analyzed data. The preprocessed data is then organized into sample speed sequences and sample steering wheel angle sequences for subsequent feature extraction and model training.

[0064] Step 530 : extracting key feature points from the sample corner sequence based on a sample sliding window to obtain a sample initial feature point set. The size of the sample sliding window is dynamically adjusted based on the sample speed sequence.

[0065] Specifically, key feature points can be extracted from the sample angle sequence using a sample sliding window. The size of the sample sliding window is dynamically adjusted based on the sample speed sequence to better capture changes in steering wheel angle. The extracted key feature points are organized into a sample initial feature point set. Here, the sample sliding window is a window that slides across the sample angle sequence and is used to extract key feature points (including peaks and troughs) from the angle data.

[0066] Step 540 , performing data enhancement on some key feature points in the sample initial feature point set to obtain a sample enhanced feature point set, and integrating the sample enhanced feature point set into the sample initial feature point set to obtain a sample corner feature point set.

[0067] Specifically, we can randomly select some key feature points from the sample's initial feature point set and perform data augmentation on these key feature points, such as adding Gaussian noise, to increase data diversity and the model's generalization ability. The augmented feature points are then integrated into the sample's initial feature point set to form the sample corner feature point set.

[0068] Step 550 : Based on the vehicle speed sequence, the sample corner feature point set, and the corresponding sample detection results, the initial model is trained to obtain the detection model.

[0069] Specifically, the initial model is trained using preprocessed vehicle speed sequences, a set of sample corner feature points, and corresponding sample detection results (i.e., whether the vehicle exhibits serpentine driving behavior) as training data. During training, the model continuously adjusts its parameters to minimize the discrepancy between predicted and actual detection results. Ultimately, the resulting trained model becomes the detection model, which can be used to monitor the vehicle's driving state and driver behavior in real time.

[0070] Based on any of the above embodiments, Figure 6 FIG. 1 is a flow chart of a vehicle serpentine driving detection method based on steering wheel angle provided by the present invention, as shown in FIG. Figure 6 As shown in the figure, the process shown by the dotted line is the model training stage, and the process shown by the solid line is the model inference stage. The implementation process of this method is as follows: Step S1: Collect and store vehicle speed sequences and steering wheel angle sequences.

[0071] Step S2: Using Fourier transform technology, the steering wheel angle sequence is filtered and noise eliminated to improve the signal-to-noise ratio.

[0072] In step S3, a dynamic sliding window is designed based on the vehicle speed sequence to identify key feature points in the steering wheel angle sequence, including peaks and troughs, so as to reduce the amount of data and subsequently extract deep features.

[0073] In step S4, Gaussian noise is added to some of the key feature points extracted in step S3 through the data enhancement module to solve the problem of serpentine driving; the amount of data may be small, and the robustness and generalization of the model are increased.

[0074] Step S5: Build a deep neural network model, including a feature extractor and a classifier. The feature extractor takes as input information the speed values ​​in the vehicle speed sequence, the times corresponding to the peaks and troughs (i.e., key feature points) in the steering wheel angle sequence, and other information, and outputs deep features. These deep features are then fed into the classifier, which ultimately outputs whether the vehicle exhibits serpentine driving behavior.

[0075] Step S6: Divide the preprocessed dataset into a training set and a test set. Use the training set to train the model, and use the test set to evaluate the model's performance. During the training process, strategies such as cross-validation and early stopping can be used to prevent overfitting.

[0076] Step S7: Use the test set to evaluate the trained model. Based on the evaluation results, the structure and parameters of the model can be adjusted and optimized to improve the performance of the model.

[0077] Step S8 deploys the trained model to real-world applications, enabling real-time detection of serpentine behavior. For example, the model can be integrated into a vehicle's intelligent driving system, collecting real-time steering wheel angle and speed data and feeding it into the model for detection. Based on the model's output, appropriate warning or control strategies can be triggered to improve driving safety and comfort.

[0078] The method provided by an embodiment of the present invention uses steering wheel angle information to extract peaks and troughs from a steering wheel angle waveform. This information, combined with vehicle speed information, is then fed into a deep neural network to determine if snaking occurs. This method not only addresses the challenge of the autonomous driving system's self-detection of vehicle snaking, but also relies solely on low-cost hardware such as the vehicle's built-in steering wheel angle sensor and speed sensor, avoiding the high cost and lack of robustness associated with image-based snaking detection methods.

[0079] Based on any of the above embodiments, Figure 7 FIG. 1 is a schematic structural diagram of a vehicle serpentine driving detection device provided by the present invention. Figure 7 As shown, the device includes: An acquisition unit 710 is configured to acquire a vehicle speed sequence and a steering wheel angle sequence; an extraction unit 720 configured to extract key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; The detection unit 730 is used to detect whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set.

[0080] The device provided by an embodiment of the present invention extracts key feature points from a steering wheel angle sequence by employing a sliding window whose size is dynamically adjusted based on the vehicle speed sequence. This dynamic adjustment mechanism enables the present invention to more accurately identify key feature points based on driving characteristics at different speeds, thereby improving detection accuracy and adaptability. By combining the vehicle speed sequence and the set of corner feature points, it is possible to efficiently detect whether a vehicle exhibits serpentine driving behavior without relying on image data for detection. This avoids interference factors such as illumination changes, occlusions, and poor image quality that can occur with image detection, thereby ensuring that the method maintains high robustness and stability in various driving environments.

[0081] Based on any of the above embodiments, the extraction unit 720 includes: a feature point extraction subunit, configured to extract key feature points from the steering wheel angle sequence based on a sliding window to obtain an initial feature point set; A data enhancement subunit, configured to perform data enhancement on some key feature points in the initial feature point set to obtain an enhanced feature point set; The feature point merging subunit is used to integrate the enhanced feature point set into the initial feature point set to obtain the corner feature point set.

[0082] Based on any of the above embodiments, the feature point extraction subunit is specifically configured to: Traversing the steering wheel angle sequence, and during the traversal process, reading corresponding angle data from the steering wheel angle sequence based on the index and size of the current sliding window to obtain a steering wheel angle set within the current sliding window; Determine a maximum angle and a minimum angle from the steering wheel angle set, and use the maximum angle and the minimum angle as candidate feature points; Based on a preset threshold, the candidate feature points are screened to obtain key feature points within the current sliding window; Based on the key feature points in each sliding window, the initial feature point set is obtained.

[0083] Based on any of the above embodiments, the detection unit 730 is specifically configured to: Inputting the vehicle speed sequence and the corner feature point set into a detection model to obtain a detection result output by the detection model, wherein the corner feature point set includes a plurality of feature points and time and corner data corresponding to the plurality of feature points; The detection model includes a feature extractor and a classifier. The feature extractor is used to perform feature extraction based on the vehicle speed sequence and the time and angle data corresponding to the multiple feature points to obtain deep features. The classifier is used to perform classification detection based on the deep features and output the detection results.

[0084] Based on any of the above embodiments, the device further includes a model training unit, which is configured to: Obtain vehicle speed history data and steering wheel angle history data; Preprocessing the vehicle speed history data and the steering wheel angle history data to obtain a sample speed sequence and a sample angle sequence; Extracting key feature points from the sample corner sequence based on a sample sliding window to obtain a sample initial feature point set, wherein the size of the sample sliding window is dynamically adjusted based on the sample speed sequence; Performing data enhancement on some key feature points in the sample initial feature point set to obtain a sample enhanced feature point set, and integrating the sample enhanced feature point set into the sample initial feature point set to obtain a sample corner feature point set; Based on the vehicle speed sequence, the sample corner feature point set and the corresponding sample detection results, an initial model is trained to obtain the detection model.

[0085] Based on any of the above embodiments, the acquiring unit 710 includes: Data acquisition subunit, used to collect vehicle speed data and steering wheel angle data in real time; The preprocessing subunit is used to preprocess the collected vehicle speed data and steering wheel angle data to obtain the vehicle speed sequence and the steering wheel angle sequence.

[0086] Based on any of the above embodiments, the preprocessing subunit is specifically configured to: Fourier transform technology is applied to filter and eliminate noise on the steering wheel angle data to obtain the steering wheel angle sequence.

[0087] Figure 8 An example of a physical structure diagram of an electronic device is shown below. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to execute a vehicle serpentine driving detection method, which includes: obtaining a vehicle speed sequence and a steering wheel angle sequence; extracting key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; and detecting whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the set of corner feature points.

[0088] Furthermore, the logic instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the relevant art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the vehicle serpentine driving detection method provided by the above-mentioned methods, which includes: obtaining a vehicle speed sequence and a steering wheel angle sequence; based on a sliding window, extracting key feature points from the steering wheel angle sequence to obtain a set of corner feature points, and the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; based on the vehicle speed sequence and the set of corner feature points, detecting whether the vehicle has serpentine driving behavior.

[0090] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the vehicle serpentine driving detection method provided by the above-mentioned methods, the method comprising: obtaining a vehicle speed sequence and a steering wheel angle sequence; based on a sliding window, extracting key feature points from the steering wheel angle sequence to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; based on the vehicle speed sequence and the set of corner feature points, detecting whether the vehicle has serpentine driving behavior.

[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0092] Through the description of the above embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting serpentine driving of a vehicle, characterized in that: include: Obtain vehicle speed sequence and steering wheel angle sequence; Extracting key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; Based on the vehicle speed sequence and the corner feature point set, it is detected whether the vehicle has serpentine driving behavior.

2. The vehicle serpentine driving detection method according to claim 1, characterized in that: The method extracts key feature points from the steering wheel angle sequence based on the sliding window to obtain a set of corner feature points, including: Based on a sliding window, key feature points are extracted from the steering wheel angle sequence to obtain an initial feature point set; Performing data enhancement on some key feature points in the initial feature point set to obtain an enhanced feature point set; The enhanced feature point set is integrated into the initial feature point set to obtain the corner feature point set.

3. The vehicle serpentine driving detection method according to claim 2, characterized in that: The method of extracting key feature points from the steering wheel angle sequence based on the sliding window to obtain an initial feature point set includes: The steering wheel angle sequence is traversed, and during the traversal process, corresponding angle data is read from the steering wheel angle sequence based on the index and size of the current sliding window to obtain a steering wheel angle set in the current sliding window; Determine a maximum angle and a minimum angle from the steering wheel angle set, and use the maximum angle and the minimum angle as candidate feature points; Based on a preset threshold, the candidate feature points are screened to obtain key feature points in the current sliding window; Based on the key feature points in each sliding window, the initial feature point set is obtained.

4. The vehicle serpentine driving detection method according to claim 1, characterized in that: The detecting whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set includes: Inputting the vehicle speed sequence and the corner feature point set into a detection model to obtain a detection result output by the detection model, wherein the corner feature point set includes a plurality of feature points and time and corner data corresponding to the plurality of feature points; The detection model includes a feature extractor and a classifier. The feature extractor is used to perform feature extraction based on the vehicle speed sequence and the time and angle data corresponding to the multiple feature points to obtain deep features. The classifier is used to perform classification detection based on the deep features and output the detection results.

5. The vehicle serpentine driving detection method according to claim 4, characterized in that: The training steps of the detection model include: Obtain vehicle speed history data and steering wheel angle history data; Preprocessing the vehicle speed history data and the steering wheel angle history data to obtain a sample speed sequence and a sample angle sequence; Based on a sample sliding window, key feature points are extracted from the sample turning angle sequence to obtain a sample initial feature point set, wherein the size of the sample sliding window is dynamically adjusted based on the sample speed sequence; Performing data enhancement on some key feature points in the sample initial feature point set to obtain a sample enhanced feature point set, and integrating the sample enhanced feature point set into the sample initial feature point set to obtain a sample corner feature point set; Based on the vehicle speed sequence, the sample corner feature point set and the corresponding sample detection results, the initial model is trained to obtain the detection model.

6. The vehicle serpentine driving detection method according to any one of claims 1 to 5, characterized in that: The step of acquiring the vehicle speed sequence and the steering wheel angle sequence comprises: Collect vehicle speed data and steering wheel angle data in real time; The collected vehicle speed data and steering wheel angle data are preprocessed to obtain the vehicle speed sequence and the steering wheel angle sequence.

7. The vehicle serpentine driving detection method according to claim 6, characterized in that: The preprocessing step of the steering wheel angle data comprises: The steering wheel angle data is filtered and subjected to noise elimination processing by applying Fourier transform technology to obtain the steering wheel angle sequence.

8. A vehicle serpentine driving detection device, characterized in that: include: An acquisition unit, used for acquiring a vehicle speed sequence and a steering wheel angle sequence; An extraction unit, configured to extract key feature points from the steering wheel angle sequence based on a sliding window to obtain a set of corner feature points, wherein the size of the sliding window is dynamically adjusted based on the vehicle speed sequence; The detection unit is used to detect whether the vehicle has serpentine driving behavior based on the vehicle speed sequence and the corner feature point set.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the vehicle serpentine driving detection method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the vehicle serpentine driving detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Drift-assessment device

    CN104246850A

  • Method for detecting fatigue status of driver through steering wheel rotation angle information

    CN104688252A

  • Abnormal driving state intelligent pre-judgment method and Internet of things intelligent terminal

    CN110442113A

  • Steering wheel angle statistical feature fusion method for fatigue state recognition

    CN112233276A

  • Method, device and equipment for detecting dragon drawing behavior of automatic driving vehicle and storage medium

    CN114644000A

Cited By

  • Driving style recognition model training method, electronic equipment and storage medium

    CN121682252A