A method and device for extracting aggressive riding features based on motorcycle running status

By screening and verifying the riding characteristics in the motorcycle running status data, and using the Transformer model to extract radical riding characteristics, it solves the problem that it is difficult to effectively extract radical riding characteristics of motorcycles in the prior art, and improves the accuracy and safety of riding behavior recognition.

CN119249135BActive Publication Date: 2025-03-18ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411787421.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-18
Estimated Expiration
2044-12-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively extract features that reflect radical riding behavior from the complex operation characteristics of motorcycles, and is affected by the external environment and cannot truly reflect the user's personal riding style.

Method used

By collecting motorcycle operating status data, using the actual engine torque and throttle accelerator opening as reference characteristics, cycling characteristics related to aggressive riding behavior were screened out. Then, the training label is constructed using the sliding window method, and the Transformer model based on the self-attention mechanism is used to calculate the coefficient of influence of each riding feature on the predicted performance, and the features whose influence coefficient is lower than the threshold are discarded to obtain the final aggressive riding feature.

Benefits of technology

It realizes the accurate extraction of radical riding characteristics from motorcycle operation status data, improves the accuracy of recognition of radical riding behavior of motorcycles, promotes the safety of motorcycle riding, and reduces safety accidents caused by radical riding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249135B_ABST
    Figure CN119249135B_ABST
Patent Text Reader

Abstract

The present invention discloses a radical riding feature extraction method and device based on the running state of a motorcycle. The running state data of a motorcycle in the historical riding process is collected as the original data set, and the unlabeled data set is obtained by preprocessing. The actual torque of the engine and the throttle accelerator opening are used as reference features to calculate the correlation between them and various riding features in the unlabeled data set to obtain a potentially useful riding feature data set, and a training label is constructed for its running state data to obtain a labeled data set. The labeled data set is used to train a Transformer model based on a self-attention mechanism to obtain the influence coefficient of various riding features on the model prediction performance, and the riding features with an influence coefficient lower than a set threshold are discarded to obtain the final radical riding features. The present invention can accurately extract radical riding features, which is helpful to improve the accuracy of identifying radical riding behaviors of motorcycles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of motorcycle riding behavior analysis, and in particular to a method and device for extracting aggressive riding features based on a motorcycle running state. Background Art

[0002] With the development of the global economy and the improvement of consumers' living standards, the consumption structure of motorcycles is also changing. In addition to the basic function of transportation, the diversified uses of motorcycles such as leisure, entertainment, and competition are also becoming more and more important. While enjoying the ultimate driving experience, motorcycle users often get into traffic accidents due to dangerous and aggressive driving behaviors. Similar to the automotive field, the motorcycle field has also begun to widely use big data technology to analyze and predict users' aggressive riding behaviors.

[0003] However, the intelligentization of motorcycles started late. At present, most of the research on aggressive riding behaviors is based on relatively simple operation features such as changing lanes and following vehicles, similar to the automobile field. Such features are often affected by the external environment and cannot fully and truly reflect whether the user's personal riding style is aggressive. In addition, motorcycle control has its own unique professionalism, and the data features generated during riding are more complex, but at the same time, they can also imply more information reflecting the user's riding habits and style. Therefore, it is particularly important to establish a feature extraction method that can extract features that can effectively reflect aggressive riding behaviors from the complex operation features of motorcycles. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention proposes a method and device for extracting aggressive riding features based on the running state of a motorcycle.

[0005] The specific technical solutions are as follows:

[0006] A method for extracting aggressive riding features based on a motorcycle running state comprises the following steps:

[0007] S1: Collect the running status data of the motorcycle during the historical riding process to obtain the original data set; the running status data includes multiple riding features; pre-process the original data set to obtain an unlabeled data set;

[0008] S2: taking the actual engine torque and the throttle opening as reference features, calculating the correlation between each riding feature in the unlabeled data set and the reference features, thereby filtering out riding features that are not related to aggressive riding behaviors in the unlabeled data set, and obtaining a potentially useful riding feature data set;

[0009] S3: constructing training labels for the running status data in the potentially useful riding feature dataset using a sliding window method to obtain a labeled dataset;

[0010] S4: Use the labeled data set to train the Transformer model based on the self-attention mechanism to obtain the influence coefficient of each riding feature on the prediction performance of the model, discard the riding features with the influence coefficient lower than the set threshold, and obtain the final aggressive riding features.

[0011] Furthermore, in S1, the riding characteristics of the running status data include: reporting time, frame number, instantaneous fuel consumption, speed, engine speed, actual engine torque, throttle opening, x-axis angle, and total mileage.

[0012] Furthermore, in S1, the preprocessing is specifically implemented through the following sub-steps:

[0013] S1.1: Performing statistical analysis on the original data set to obtain statistical analysis results; the statistical analysis includes the mean value, maximum value, minimum value, standard deviation and quartile of each riding feature; the statistical analysis results include the central tendency, distribution form, dispersion degree measure and concentrated distribution range of the data corresponding to each riding feature;

[0014] S1.2. Data cleaning is performed based on the statistical analysis results: first, the entire reporting record containing missing values ​​in the running status data is deleted, and the entire reporting record is all data uploaded by all motorcycle vehicle-side sensors at a time; outliers are captured and deleted;

[0015] S1.3: Perform timestamp processing on the cleaned operating status data obtained in S1.2 to obtain an unlabeled data set that is arranged and grouped in order of priority according to the motorcycle frame number and reporting time.

[0016] Furthermore, in S1.2, the expression of the outlier M is as follows:

[0017] ;

[0018] ;

[0019] In the formula, Q1 is the data at the 25% position after the quartiles are sorted from small to large, Q3 is the data at the 75% position after the quartiles are sorted from small to large, and IQR is the interquartile range.

[0020] Furthermore, the S1.3 specifically includes the following steps:

[0021] S1.3.1, data sorting: sort the cleaned running status data in descending order according to the frame number. If there are identical frame numbers, sort them in ascending order according to the reporting time;

[0022] S1.3.2, data grouping: calculate the reporting time difference between adjacent running status data after sorting; set a time difference threshold to determine whether the difference between adjacent running status data exceeds the time difference threshold, if so, divide the two running status data into different groups, if not, divide the two running status data into the same group.

[0023] Furthermore, in S2, the correlation between each riding feature in the unlabeled data set and the reference feature is reflected by the Pearson correlation coefficient: the Pearson correlation coefficient between the actual engine torque and each riding feature, and the Pearson correlation coefficient between the throttle accelerator opening and each riding feature are calculated respectively, and the aggressive behavior comprehensive index of each riding feature is obtained by weighted summation of the Pearson correlation coefficients with the actual engine torque and the throttle accelerator opening; if the absolute value of the aggressive behavior comprehensive index is between 0 and 0.2, it is determined that the riding feature is weakly correlated with the reference feature, and it is screened out from the unlabeled data set.

[0024] Furthermore, in S3, a labeled data set is constructed by a sliding window method, which is specifically implemented by the following sub-steps:

[0025] S3.1: Construct a data set and label set for each riding feature data and initialize them to empty; determine the size of the sliding window and the sliding step size;

[0026] S3.2: The sliding window starts from index 0 on the data sequence of each riding feature and slides with the set sliding step size. After each slide, the data in the sliding window is obtained from the data sequence and added to the data set; the next data point after the sliding window is obtained through the index, and it is used as the label of the data in the current sliding window and added to the label set;

[0027] S3.3: Repeat S3.1-S3.2 until all riding features have been added to the dataset and label set;

[0028] S3.4: Collect all data sets and label sets to obtain a labeled data set.

[0029] Furthermore, in S4, the influence coefficient of each riding feature on the prediction performance of the model is obtained by the following sub-steps:

[0030] S4.1: Initialize the Transformer model, input the labeled dataset into the Transformer model for training, obtain a basic model that contains all potentially useful cycling features, and use the root mean square error of the basic model as the performance indicator benchmark;

[0031] S4.2: Traverse the labeled dataset, remove individual riding features one by one, retrain the Transformer model using the updated labeled dataset, and calculate the root mean square error after each removal of the riding feature; until all riding features have been excluded once;

[0032] S4.3: Determine whether the change in the root mean square error of the Transformer model before and after removing each riding feature exceeds the set change threshold. If so, it is considered that the riding feature has a large influence coefficient on the prediction performance of the Transformer model. Otherwise, it is considered that the riding feature has a small influence coefficient. Exclude the riding features with a small influence coefficient to obtain the final aggressive riding features.

[0033] Furthermore, in S4, the optimization of the self-attention mechanism in the Transformer model is as follows:

[0034] For each data point in the calculation sequence, the data sequence corresponding to each riding feature is x i Its neighboring data points x j The attention score between score ij Then, an attention optimization parameter is used m ij ,Will x i The attention is limited to the 2k adjacent elements, where k is set manually;

[0035] m ij The optimized expression for the model attention mechanism is as follows:

[0036] ;

[0037] ;

[0038] Where opt_score ij is the optimized attention score.

[0039] An aggressive riding feature extraction device based on the running state of a motorcycle, used to implement the aggressive riding feature extraction method based on the running state of a motorcycle, comprising: a data acquisition unit, a data processing unit, a feature screening unit, and a feature verification unit;

[0040] The data acquisition unit is used to acquire the collected motorcycle running status data during driving;

[0041] The data processing unit is used to perform statistical analysis, data cleaning and time stamp processing on the data according to the set rules;

[0042] The feature screening unit screens out riding features irrelevant to aggressive riding behavior from other riding features based on the input reference features;

[0043] The feature verification unit first constructs training labels for the data, then uses a self-attention mechanism-based learning model built into the unit to verify and screen the features extracted by the feature extraction unit, and finally outputs key features reflecting aggressive riding behavior.

[0044] The beneficial effects of the present invention are:

[0045] The present invention proposes a method and device for extracting aggressive riding features from motorcycle operating status data, which can accurately extract aggressive riding features and solve the problems of complexity and professionalism unique to motorcycle control data; at the same time, it helps to improve the accuracy of identifying aggressive riding behaviors of motorcycles, expand the field of feature parameters that can be used for analysis, promote the safety of motorcycle riding, and reduce the occurrence of safety accidents caused by aggressive riding. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 4 is a flow chart of a method for extracting aggressive riding features based on a motorcycle running state in an embodiment of the present invention.

[0047] Figure 2 This is a flowchart of timestamp processing in S1.3 of an embodiment of the present invention.

[0048] Figure 3 Schematic diagram of a sliding window method for constructing training labels for operating status data in S3 of an embodiment of the present invention.

[0049] Figure 4 It is a flowchart of verifying the importance of extracted features by the Transformer model based on the self-attention mechanism in S4 of an embodiment of the present invention.

[0050] Figure 5 Schematic diagram of the structure of an aggressive riding feature extraction device based on a motorcycle running state in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention will be described in detail below according to the accompanying drawings and preferred embodiments, and the purpose and effect of the present invention will become more clear. The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0052] like Figure 1 As shown, a method for extracting aggressive riding features based on the running state of a motorcycle specifically includes the following steps:

[0053] S1: Collect the running status data of the motorcycle during the historical riding process to obtain the original data set; pre-process the original data set to obtain a structured, ordered, unlabeled data set. Specifically, the running status data of the motorcycle during the riding process includes: reporting time, frame number, instantaneous fuel consumption, speed, engine speed, actual engine torque, throttle accelerator opening, x-axis angle (i.e., the x-axis angle of the motorcycle's onboard gyroscope, which can reflect the degree of roll of the motorcycle. The larger the angle, the greater the roll), total mileage, and other riding characteristic parameters of the running status data of the motorcycle during the user's riding process. Each riding feature includes multiple data.

[0054] The preprocessing of the original data set is implemented through the following sub-steps:

[0055] S1.1: Perform statistical analysis on the original data set and extract the data distribution pattern. Specifically, calculate the statistical characteristics such as the mean, maximum, minimum, standard deviation and quartile of each riding feature collected, so as to obtain the central trend, distribution form, measure of dispersion and concentrated distribution range of the data corresponding to each riding feature as the statistical analysis result. Among them, the concentrated distribution range and outliers are reflected by the maximum, minimum and quartile of each riding feature.

[0056] S1.2: Clean the data based on the statistical analysis results and professional knowledge in the motorcycle field to improve the data quality. This is achieved through the following sub-steps:

[0057] S1.2.1: Process missing values ​​in the running status data. Since the frequency of data collection and uploading by the motorcycle vehicle-side sensors is high and the original data set is large, this embodiment adopts the method of deleting the entire reporting record containing missing values ​​in the running status data. The entire reporting record is all the data uploaded by all motorcycle vehicle-side sensors at a time. This strategy is based on the consideration of data integrity and aims to ensure that the accuracy of subsequent analysis is not affected by the deviation that may be introduced by missing data.

[0058] S1.2.2: Capture and delete outliers. Quartiles refer to the three data that are arranged at the 25% position (denoted as Q1), 50% position (denoted as Q2), and 75% position (denoted as Q3) after the data are sorted from small to large; and outliers refer to values ​​that are far away from the concentrated distribution range. In this embodiment, outliers are defined as values ​​less than Q1-1.5*IQR or greater than Q3+1.5*IQR, where IQR is the interquartile range, that is, the difference between Q3 and Q1.

[0059] It is worth noting that the capture of outliers also needs to be combined with the actual situation of the motorcycle. Taking the x-axis angle as an example, the x-axis angle range collected in this embodiment is -150 degrees to 150 degrees. In actual situations, the x-axis angle of a motorcycle is unlikely to reach such an extreme value. Under normal road driving conditions, ideally the x-axis angle of the motorcycle's gyroscope should be close to 0 degrees, indicating that the vehicle remains level with the ground, and may reach 30 to 45 degrees when turning; extreme roll angles, such as close to 90 degrees, usually only appear in stunt performances or certain specific motorcycle designs (such as three-wheeled motorcycles), so data greater than 90 degrees and less than -90 degrees in the original data set can be deleted.

[0060] S1.3: Perform timestamp processing on the cleaned operation status data obtained in S1.2. Since the operation status data recorded in the original data set is not arranged in chronological order but presents a discontinuous and disordered distribution state, it is necessary to perform timestamp processing on it in the following steps. Figure 2 As shown, the timestamp processing specifically includes the following steps:

[0061] S1.3.1: Data sorting: The cleaned running status data is first sorted in descending order according to the "encrypted vehicle frame number". If there is a same vehicle frame number, it is further sorted in ascending order according to the "reporting time". This step ensures that the data under the same vehicle frame number is arranged in chronological order.

[0062] S1.3.2: Data grouping: Take a single start and stop as the basis for data grouping, calculate the difference in "reporting time" between adjacent running status data after sorting; set a time difference threshold as the standard for distinguishing each start, if the difference between adjacent running status data exceeds the time difference threshold, the two running status data are divided into different groups, otherwise, the two running status data are divided into the same group. In this embodiment, the time difference threshold is 120 seconds, that is, the maximum time for stopping and waiting for the traffic light is 120 seconds.

[0063] After processing, a structured, ordered, unlabeled dataset is returned, which can be used for further processing.

[0064] S2: The actual engine torque and throttle opening, two characteristic parameters representing the user's driving aggressiveness, are used as reference features. The correlation between each riding feature in the unlabeled dataset and the reference feature is calculated. Based on this, riding features in the unlabeled dataset that are not related to aggressive riding behavior are screened out to obtain a potentially useful riding feature dataset.

[0065] Furthermore, the correlation between each riding feature in the unlabeled dataset and the reference feature is reflected by the Pearson correlation coefficient. Specifically, the Pearson correlation coefficient is a statistic that measures the strength and direction of the linear relationship between two riding features. The value range is between -1 and 1. The calculation formula of the Pearson correlation coefficient is:

[0066] ;

[0067] Among them, r is the Pearson correlation coefficient, X i is the observed value of the riding feature, For X i The average value of Y i is the observed value of a reference feature, Y i The average value of .

[0068] The actual engine torque and throttle opening are taken as Y, and the Pearson correlation coefficients between them and other feature parameters are calculated, and weighted summation is performed to obtain the comprehensive index of aggressive behavior of the feature. If the absolute value of the comprehensive index of aggressive behavior of a feature parameter and the reference feature is between 0 and 0.2, the feature parameter is considered to be weakly correlated with the reference feature; if the absolute value of the comprehensive index of aggressive behavior of a feature parameter and the reference feature is between 0.2 and 0.6, the feature parameter is considered to be moderately correlated with the reference feature; if the absolute value of the comprehensive index of aggressive behavior of a feature parameter and the reference feature is between 0.6 and 1, the feature parameter is considered to be strongly correlated with the reference feature. Features that are weakly correlated with the reference feature are considered to be unrelated to aggressive riding behavior and are screened out from the unlabeled dataset.

[0069] In this embodiment, a driving behavior feature correlation table as shown in Table 1 is obtained, and the correlation between other feature parameters in the comprehensive table and the actual engine torque and throttle accelerator opening is considered, and the gyroscope x-axis angle, the current riding time, and the total mileage are screened out from the unlabeled data set.

[0070] Table 1

[0071]

[0072] S3: Use the sliding window method to construct training labels for the running status data in the potentially useful riding feature dataset obtained in S2 to obtain a labeled dataset.

[0073] Since the collected motorcycle operation data is unlabeled data, we use the following method before inputting the model: Figure 3 The sliding window method shown constructs a data set and a label set for each riding feature data. The data set and label set are presented in a list form. It mainly includes the following sub-steps:

[0074] S3.1: Initialize the dataset and label set, and determine the size of the sliding window and the sliding step size.

[0075] S3.2: The sliding window starts from index 0 and slides with the set sliding step size on the data sequence of each riding feature. After each slide, the data in the sliding window is obtained from the data sequence by slicing and added to the data set. Then, the next data point after the sliding window is obtained by indexing, and it is used as the label of the data in the current sliding window and added to the label set.

[0076] S3.3: Repeat S3.1-S3.2 until all riding features have been added to the dataset and label set.

[0077] S3.4: Collect all data sets and label sets to obtain a labeled data set.

[0078] In this embodiment, Figure 3 As shown in the figure, the window size can accommodate four data, the step length is one data, and the window starts sliding from index 0. At the initial position, the data in the window form sequence 1 {x1, x2, x3, x4}, and sequence 1 is added to the data set. The label 1 corresponding to this sequence 1 is x5. This label 1 is added to the label set, and the storage of a set of data sequences and corresponding labels is completed. The window slides a step length, and the data in the window now forms sequence 2 {x2, x3, x4, x5}, and the corresponding label 2 is x6. Sequence 2 is added to the data set, and label 2 is added to the label set; the storage of subsequent sequences and labels is similar.

[0079] S4: Using the Transformer model based on the self-attention mechanism, the riding features in the labeled data set obtained in S3 are verified, that is, the influence coefficient of each riding feature on the prediction performance of the model is evaluated by using the performance index of the model, and the riding features with an influence coefficient lower than the set threshold are discarded to obtain the final aggressive riding features. In this embodiment, the data set and label set constructed by S3 are input into the Transformer model, the label value is predicted by learning the data in the data set, and the root mean square error (RMSE) between the predicted label value and the actual label value is calculated, which is used as the performance index of the model.

[0080] Specifically, Figure 4 As shown, the verification of riding characteristics is implemented through the following sub-steps:

[0081] S4.1: First, initialize the Transformer model, then input the labeled dataset into the Transformer model for training, establish a basic model that contains all potentially useful riding features, and use the RMSE of the basic model as the performance indicator benchmark.

[0082] S4.2: Traverse the labeled dataset, remove individual riding features one by one, retrain the Transformer model using the updated labeled dataset, and calculate the RMSE after each removal of the riding feature; this process will be repeated until all riding features have been excluded once individually, that is, the one-by-one exclusion test of all riding features is completed.

[0083] S4.3: By comparing the RMSE changes of the Transformer model before and after removing each riding feature, the impact of each riding feature on the prediction performance of the Transformer model is evaluated, that is, the influence coefficient of each riding feature on the prediction performance of the model is obtained. If the RMSE change of the Transformer model is not significant after removing a riding feature (i.e., less than the set change threshold), this indicates that the riding feature contributes little to the prediction of the Transformer model and can be considered unimportant, that is, the influence coefficient is lower than the set threshold; the unimportant riding features are excluded, thereby obtaining the final aggressive riding features.

[0084] Furthermore, the attention mechanism in the Transformer model is optimized as follows:

[0085] For each data point in the calculation sequence, the data sequence corresponding to each riding feature is x i Its neighboring data points x j The attention score between score ij Then, an attention optimization parameter is used m ij ,Will x i The attention is limited to the 2k (k is a fixed value set manually) elements adjacent to it, which can reduce the dimensionality of long-sequence motorcycle riding data and reduce the computational burden of the model while maintaining key information.

[0086] Specifically, m ij The optimization of the model attention mechanism is achieved through the following formula:

[0087] ;

[0088] ;

[0089] Where opt_score ij is the optimized attention score.

[0090] like Figure 5As shown, in order to implement the above-mentioned aggressive riding feature extraction method based on the running state of a motorcycle, an embodiment of the present invention proposes an aggressive riding feature extraction device based on the running state of a motorcycle, including: a data acquisition unit, a data processing unit, a feature screening unit, and a feature verification unit.

[0091] The data acquisition unit is used to obtain the running status data of the motorcycle during the historical riding process and construct the original data set.

[0092] The data processing unit is used to perform statistical analysis, data cleaning and timestamp processing on the original data set according to the set rules.

[0093] The feature screening unit is used to screen out riding features irrelevant to aggressive riding behaviors from other riding features according to input reference features.

[0094] The feature verification unit is used to construct training labels for the data, and uses the Transformer model based on the self-attention mechanism built into the unit to verify and screen the features extracted by the feature screening unit, discarding the riding features whose influence coefficients are lower than the set threshold, and obtaining the final aggressive riding features.

[0095] In summary, the present invention extracts aggressive riding features reflecting aggressive riding behavior from the running status data of a motorcycle based on two characteristic parameters, namely, the actual engine torque and the throttle opening, which can represent the aggressiveness of the user's riding. The aggressive riding features can be used to determine whether the user's riding behavior is aggressive, which contributes to the technical development in the field of motorcycle riding behavior analysis, improves the safety of motorcycle riding, and reduces the occurrence of traffic accidents.

[0096] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0097] Those skilled in the art will understand that the above are only preferred examples of the invention and are not intended to limit the invention. Although the invention is described in detail with reference to the above examples, those skilled in the art can still modify the technical solutions recorded in the above examples or replace some of the technical features therein with equivalents; various modifications to these embodiments will be obvious to those skilled in the art. The present invention will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features of the invention. Any modifications, equivalent replacements, etc. made within the spirit and principles of the invention shall be included in the scope of protection of the invention.

Claims

1. A method for extracting aggressive riding features based on motorcycle running status, characterized in that: The following steps are involved: S1: Collecting the running status data of the motorcycle during historical riding to obtain an original data set; the running status data includes multiple riding characteristics; Preprocess the original data set to obtain an unlabeled data set; S2: taking the actual engine torque and the throttle opening as reference features, calculating the correlation between each riding feature in the unlabeled data set and the reference features, thereby filtering out riding features that are not related to aggressive riding behaviors in the unlabeled data set, and obtaining a potentially useful riding feature data set; S3: constructing training labels for the running status data in the potentially useful riding feature dataset using a sliding window method to obtain a labeled dataset; S4: Using the labeled data set to train the Transformer model based on the self-attention mechanism, the influence coefficient of each riding feature on the prediction performance of the model is obtained, and the riding features with the influence coefficient lower than the set threshold are discarded to obtain the final aggressive riding features; In S4, the influence coefficient of each riding feature on the prediction performance of the model is obtained by the following sub-steps: S4.1: Initialize the Transformer model, input the labeled dataset into the Transformer model for training, obtain a basic model that contains all potentially useful cycling features, and use the root mean square error of the basic model as the performance indicator benchmark; S4.2: Traverse the labeled dataset, remove individual riding features one by one, retrain the Transformer model using the updated labeled dataset, and calculate the root mean square error after each removal of the riding feature; until all riding features have been excluded once; S4.3: Determine whether the change in the root mean square error of the Transformer model before and after removing each riding feature exceeds the set change threshold. If so, it is considered that the riding feature has a large influence coefficient on the prediction performance of the Transformer model. Otherwise, it is considered that the riding feature has a small influence coefficient. Exclude the riding features with a small influence coefficient to obtain the final aggressive riding features.

2. The aggressive riding feature extraction method based on the motorcycle running state according to claim 1 is characterized in that: In S1, the riding characteristics of the running status data include: reporting time, frame number, instantaneous fuel consumption, speed, engine speed, actual engine torque, throttle opening, x-axis angle, and total mileage.

3. The aggressive riding feature extraction method based on motorcycle running state according to claim 1 is characterized in that: In S1, the preprocessing is specifically implemented through the following sub-steps: S1.1: Performing statistical analysis on the original data set to obtain statistical analysis results; the statistical analysis includes the mean value, maximum value, minimum value, standard deviation and quartile of each riding feature; the statistical analysis results include the central tendency, distribution form, dispersion degree measure and concentrated distribution range of the data corresponding to each riding feature; S1.

2. Data cleaning is performed based on the statistical analysis results: first, the entire reporting record containing missing values ​​in the running status data is deleted, and the entire reporting record is all data uploaded by all motorcycle vehicle-side sensors at a time; outliers are captured and deleted; S1.3: Perform timestamp processing on the cleaned operating status data obtained in S1.2 to obtain an unlabeled data set that is arranged and grouped in order of priority according to the motorcycle frame number and reporting time.

4. The aggressive riding feature extraction method based on motorcycle running state according to claim 3 is characterized in that: In S1.2, the expression of the outlier value M is as follows: ; ; In the formula, Q1 is the data at the 25% position after the quartiles are sorted from small to large, Q3 is the data at the 75% position after the quartiles are sorted from small to large, and IQR is the interquartile range.

5. The aggressive riding feature extraction method based on motorcycle running state according to claim 3 is characterized in that: The S1.3 specifically includes the following steps: S1.3.1, data sorting: sort the cleaned running status data in descending order according to the frame number. If there are identical frame numbers, sort them in ascending order according to the reporting time; S1.3.2, data grouping: calculate the reporting time difference between adjacent running status data after sorting; set a time difference threshold to determine whether the difference between adjacent running status data exceeds the time difference threshold, if so, divide the two running status data into different groups, if not, divide the two running status data into the same group.

6. The aggressive riding feature extraction method based on motorcycle running state according to claim 1 is characterized in that: In S2, the correlation between each riding feature in the unlabeled data set and the reference feature is reflected by the Pearson correlation coefficient: the Pearson correlation coefficient between the actual engine torque and each riding feature, and the Pearson correlation coefficient between the throttle accelerator opening and each riding feature are calculated respectively, and the aggressive behavior comprehensive index of each riding feature is obtained by weighted summing the Pearson correlation coefficients with the actual engine torque and the throttle accelerator opening; if the absolute value of the aggressive behavior comprehensive index is between 0 and 0.2, it is determined that the riding feature is weakly correlated with the reference feature, and it is screened out from the unlabeled data set.

7. The aggressive riding feature extraction method based on motorcycle running state according to claim 1 is characterized in that: In S3, a labeled data set is constructed by a sliding window method, which is specifically implemented through the following sub-steps: S3.1: Construct a data set and label set for each riding feature data and initialize them to empty; determine the size of the sliding window and the sliding step size; S3.2: The sliding window starts from index 0 on the data sequence of each riding feature and slides with the set sliding step size. After each slide, the data in the sliding window is obtained from the data sequence and added to the data set; the next data point after the sliding window is obtained through the index, and it is used as the label of the data in the current sliding window and added to the label set; S3.3: Repeat S3.1-S3.2 until all riding features have been added to the dataset and label set; S3.4: Collect all data sets and label sets to obtain a labeled data set.

8. The aggressive riding feature extraction method based on motorcycle running state according to claim 1 is characterized in that: In S4, the optimization of the self-attention mechanism in the Transformer model is as follows: For each data point in the calculation sequence, the data sequence corresponding to each riding feature is x i Its neighboring data points x j The attention score between score ij Then, an attention optimization parameter is used m ij ,Will x i The attention is limited to the 2k adjacent elements, where k is set manually; m ij The optimized expression for the model attention mechanism is as follows: ; ; Where opt_score ij is the optimized attention score.

9. An aggressive riding feature extraction device based on the running state of a motorcycle, used to implement the aggressive riding feature extraction method based on the running state of a motorcycle according to any one of claims 1 to 8, characterized in that: include: Data acquisition unit, data processing unit, feature screening unit, feature verification unit; The data acquisition unit is used to acquire the collected motorcycle running status data during driving; The data processing unit is used to perform statistical analysis, data cleaning and time stamp processing on the data according to the set rules; The feature screening unit screens out riding features irrelevant to aggressive riding behavior from other riding features based on the input reference features; The feature verification unit first constructs training labels for the data, then uses a self-attention mechanism-based learning model built into the unit to verify and screen the features extracted by the feature extraction unit, and finally outputs key features reflecting aggressive riding behavior.

Citation Information

Patent Citations

  • Motorcycle driving mode recommendation method and system

    CN117708438A

  • Systems and methods for label generation for unlabelled machine learning model training data

    US20240202443A1