Vehicle window mistaken clamping prevention method and device, electronic equipment and storage medium
Through the analysis and prediction of window operation data by the support vector machine model, the problems of high false alarm rate and slow response speed of traditional window anti-clip system are solved, and higher detection accuracy and intelligence are achieved, and the system is improved. Reliability and user experience.
Patent Information
- Application Number
- CN202411551167.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-01-07
AI Technical Summary
Traditional window anti-clip system has high false alarm rate, slow response speed and poor adaptability, making it difficult to meet the high requirements of modern cars for safety and intelligence, especially under changes in complex working conditions and environmental factors, which affects the reliability and stability of the system. sex.
By obtaining window operation data, building a data training set and using the support vector machine model for training, identifying window operation modes and abnormal situations, real-time early warning and fault prediction, and improving detection accuracy and response speed.
It improves the prediction accuracy and intelligence of the window anti-clip system, reduces vehicle downtime caused by failures, optimizes maintenance and user experience, and enhances data-driven decision-making.
Smart Images

Figure CN119272055A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device, and computer-readable storage medium for preventing accidental pinching of vehicle windows. Background Art
[0002] With the rapid development of the automobile industry and the increasing demand for automobile safety and comfort, the window anti-pinch system, as an important part of the automobile safety system, has received widespread attention. The main function of the window anti-pinch system is to prevent the window from pinching passengers or damaging objects during the closing process, thereby ensuring the safety of passengers and the normal operation of the window. However, traditional window anti-pinch systems mainly rely on simple mechanical structures or single sensor signals, and have problems such as high false alarm rate, slow response speed, and poor adaptability, which makes it difficult to meet the high requirements of modern automobiles for safety and intelligence.
[0003] In practical applications, the window anti-pinch system faces the influence of many complex working conditions and environmental factors, such as the window running speed, acceleration, motor current, ambient temperature and vehicle speed. Changes in these factors may lead to false alarms and missed alarms of the window anti-pinch system, affecting the reliability and stability of the system. Therefore, how to improve the detection accuracy, response speed and adaptability of the window anti-pinch system is an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the embodiments of the present application provide a method and device for preventing accidental pinching of vehicle windows, an electronic device, a computer-readable storage medium, and a computer program product.
[0005] According to one aspect of an embodiment of the present application, a method for preventing accidental pinching of a vehicle window is provided, comprising: obtaining operating data of the vehicle window, and constructing a data training set based on the operating data; dividing the data training set into a feature set and a target variable set, and training a support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model; if the trained support vector machine model passes a preset performance assessment, using the trained support vector machine model as a target support vector machine model; obtaining real-time operating data of the vehicle window, and processing the real-time operating data based on the target support vector machine model to obtain a target event type corresponding to the vehicle window.
[0006] According to one aspect of an embodiment of the present application, before training the support vector machine model based on the feature set and the target variable set, the method also includes: determining the kernel function of the support vector machine model based on the linear relationship between the data in the data training set; determining the target kernel function parameters corresponding to the kernel function and the target penalty parameters corresponding to the support vector machine model based on a preset parameter optimization strategy.
[0007] According to one aspect of an embodiment of the present application, the training of the support vector machine model based on the feature set and the target variable set includes: determining the initial support vector machine model based on the target kernel function parameters and the target penalty parameters; and training the initial support vector machine model based on the feature set and the target variable set.
[0008] According to one aspect of an embodiment of the present application, the feature set includes multiple samples, the target variable set includes multiple target event types, and the training of the initial support vector machine model based on the feature set and the target variable set includes: determining target samples corresponding to each of the multiple target event types based on a target classifier; and training the initial support vector machine model based on the multiple target event types and the target samples corresponding to each of the multiple target event types.
[0009] According to one aspect of an embodiment of the present application, the method of determining target samples corresponding to each of multiple target event types based on a classifier includes: determining a target classifier for the target event type based on the target penalty parameter, the target kernel function, and a bias corresponding to the target event type, wherein the bias is used to determine a boundary of the target event type; and classifying the multiple samples based on the target classifier to determine the target event type corresponding to each of the multiple samples.
[0010] According to one aspect of an embodiment of the present application, the method also includes: obtaining real-time operating data of the vehicle window, and constructing an updated data set based on the real-time operating data, wherein the updated data set has a data format consistent with that of the training data set; and updating the target support vector machine model based on the updated data set to obtain an updated target support vector machine model.
[0011] According to one aspect of an embodiment of the present application, the operating data includes: multiple items of window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data, and the method further includes:
[0012] Collecting at least one operation data of the window position, the window speed, the window acceleration, the window motor current, the ambient temperature and the vehicle speed data corresponding to each target event type;
[0013] Extracting the vehicle window operation feature corresponding to each target type based on the at least one operation data;
[0014] A mapping relationship between the window position, the window speed, the window acceleration, the window motor current, the ambient temperature and the vehicle speed data and each target event type is established based on the window operation characteristics.
[0015] According to one aspect of an embodiment of the present application, a vehicle window anti-mis-pinch device is provided, including: an acquisition module, used to acquire operating data of the vehicle window, and construct a data training set based on the operating data; a training module, used to divide the data training set into a feature set and a target variable set, and train a support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model; an assessment module, used to use the trained support vector machine model as a target support vector machine model if the trained support vector machine model passes a preset performance assessment; a processing module, used to acquire real-time operating data of the vehicle window, and process the real-time operating data based on the target support vector machine model to obtain a target event type corresponding to the vehicle window.
[0016] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the vehicle window anti-mis-pinching method as described above.
[0017] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the vehicle window anti-mis-pinching method as described above.
[0018] According to one aspect of an embodiment of the present application, a computer program product is also provided, including a computer program, which implements the steps in the vehicle window anti-mis-pinching method as described above when executed by a processor.
[0019] In the technical solution provided in the embodiment of the present application, by collecting detailed operation data of the vehicle window and constructing a data training set, various modes and features of the vehicle window operation can be captured. Using these rich data to train the support vector machine model can improve the model's prediction accuracy for the vehicle window operation and related events. By analyzing the real-time operation data of the vehicle window, the target support vector machine model can identify abnormal operation modes, thereby early warning of potential failures, which helps to take timely measures to reduce the vehicle downtime caused by window failures. Therefore, in this embodiment, by using the operation data of the vehicle window to train the support vector machine model and making real-time predictions based on the model, not only the accuracy and intelligence of the prediction are improved, but also it helps to warn of faults, optimize maintenance, enhance user experience and data-driven decision-making.
[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0022] Figure 1 is a schematic diagram of an implementation environment for preventing vehicle windows from being accidentally clamped, shown in an exemplary embodiment of the present application;
[0023] Figure 2 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in an exemplary embodiment of the present application;
[0024] Figure 3 is a flow chart showing preprocessing of operating data of a vehicle window according to an exemplary embodiment;
[0025] Figure 4 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0026] Figure 5 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0027] Figure 6 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0028] Figure 7 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0029] Figure 8 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0030] Fig. 9 is a flow chart of a method for preventing accidental clamping of a vehicle window shown in another exemplary embodiment of the present application;
[0031] Fig.10 It is a brief schematic diagram of the process of preventing accidental pinching of vehicle windows in an exemplary application scenario;
[0032] Fig.11 is a block diagram of a vehicle window anti-mis-pinching device shown in an exemplary embodiment of the present application;
[0033] Fig.12 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0035] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0036] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0037] The term "multiple" as used in this application refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0038] First of all, it should be noted that the support vector machine is a supervised learning algorithm, and its basic model is a linear classifier with the largest margin defined in the feature space. Its learning strategy is to maximize the margin, which can be formalized as a problem of solving convex quadratic programming. The learning algorithm of the support vector machine is the optimal algorithm for solving convex quadratic programming. When the training data is linearly separable, the support vector machine learns a linearly separable support vector machine by maximizing the hard margin. In this case, the support vector machine can find a hyperplane that completely separates data points of different categories and maximizes the distance (i.e., the margin) between the two types of data points and the hyperplane. When the training data is linearly inseparable, the support vector machine is processed by introducing kernel techniques (such as Gaussian kernel, polynomial kernel, etc.) and soft margin maximization. The kernel technique allows the support vector machine to map the input data from the original space to the high-dimensional feature space, thereby achieving linear separability in the high-dimensional space. Soft margin maximization allows some sample points to be within the maximum margin, or even on the wrong side, to improve the generalization ability of the model.
[0039] Characteristics of support vector machines: powerful classification capabilities: support vector machines can handle linearly separable and linearly inseparable classification problems, and have good processing capabilities for nonlinear problems; good robustness: support vector machines only care about the support vectors closest to the hyperplane and are insensitive to other data, so they have strong anti-interference capabilities for noisy data; perfect mathematical theory: support vector machines have very perfect mathematical theories, including convex optimization, kernel function theory, etc.
[0040] Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a vehicle window anti-mis-pinch method according to an exemplary embodiment of the present application. Figure 1 As shown, during the operation of the vehicle, the operation data of the vehicle window is obtained through the smart terminal 110, and the operation data is sent to the server 120. The server 120 constructs a data training set with the operation data of the vehicle window, and then the server 120 divides the data training set into a feature set and a target variable set according to the training requirements, and then the support vector machine model can be trained based on the feature set and the target variable set to obtain a trained support vector machine model. The server 120 performs a preset performance assessment on the trained support vector machine model, and after passing the performance assessment, the trained support vector machine model is determined as the target support vector machine model, and then after receiving the real-time operation data of the vehicle window reported by the smart terminal 110, the real-time operation data can be processed based on the target support vector machine model to obtain the target event type corresponding to the vehicle window. In this way, accurate detection of the vehicle window anti-pinch system is achieved.
[0041] in, Figure 1 The smart terminal 110 shown can be any terminal device that supports the installation of navigation map software, such as a smart phone, a car computer, a tablet computer, a laptop computer, or a wearable device, but is not limited thereto. Figure 1 The server 120 shown, for example, can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, which are not limited here. The smart terminal 110 can communicate with the server 120 through wireless networks such as 3G (third generation mobile information technology), 4G (fourth generation mobile information technology), and 5G (fifth generation mobile information technology), which are not limited here.
[0042] With the rapid development of the automobile industry and the increasing demand for automobile safety and comfort, the window anti-pinch system, as an important part of the automobile safety system, has received widespread attention. The main function of the window anti-pinch system is to prevent the window from pinching passengers or damaging objects during the closing process, thereby ensuring the safety of passengers and the normal operation of the window. However, traditional window anti-pinch systems mainly rely on simple mechanical structures or single sensor signals, and have problems such as high false alarm rate, slow response speed, and poor adaptability, which makes it difficult to meet the high requirements of modern automobiles for safety and intelligence.
[0043] In practical applications, the window anti-pinch system is subject to the influence of a variety of complex working conditions and environmental factors, such as the window running speed, acceleration, motor current, ambient temperature and vehicle speed, etc. Changes in these factors may lead to false alarms or missed alarms of the window anti-pinch system, affecting the reliability and stability of the system.
[0044] The above-mentioned problems are generally applicable in common vehicle window operation scenarios. In order to solve these problems, the embodiments of the present application respectively propose a vehicle window anti-mis-pinch method, a vehicle window anti-mis-pinch device, an electronic device, a computer-readable storage medium and a computer program product, which will be described in detail below.
[0045] See also Figure 2 , Figure 2 is a flow chart of a method for preventing accidental clamping of vehicle windows shown in an exemplary embodiment of the present application. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the server 120 in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0046] like Figure 2 As shown, in an exemplary embodiment, the vehicle window anti-mis-pinch method includes at least steps S210 to S240, which are described in detail as follows:
[0047] Step S210, obtaining the operating data of the vehicle window, and constructing a data training set based on the operating data.
[0048] Specifically, the vehicle's operating data can be collected. For example, important data related to the anti-pinch function of the window system include window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed. The position sensor records the position information of the window to determine whether it has reached the predetermined position within the expected time; the speed sensor monitors the moving speed of the window. Abnormal changes in speed may be a sign of anti-pinch phenomenon; the acceleration sensor detects the acceleration of the window movement to identify whether there is a sudden stop or deceleration; the current sensor monitors the current of the window motor. A sudden increase in current may mean that the motor encounters additional resistance, such as clamping an object; temperature changes will affect the movement performance of the window and the accuracy of the sensor; the vehicle speed will affect the normal operation of the window and the response of the anti-pinch system. When collecting data, it is also necessary to mark the normal operation events of the window, anti-pinch events and false anti-pinch events.
[0049] For example, Figure 3 As shown, the operating data of the window includes parameters such as window position, window speed, window acceleration, vehicle speed, window motor current and ambient temperature. For the window position, window speed, window acceleration and vehicle speed, outliers can be removed and the moving average algorithm can be used to preprocess the data. Among them, the window motor current can be preprocessed by removing outliers and using a weighted moving average method, and the ambient temperature can be preprocessed by removing outliers and using a sliding median method. The preprocessed window position, window speed, window acceleration, vehicle speed, window motor current and ambient temperature are normalized to obtain normalized new values, and then data segmentation is performed to divide the data set into a training set and a test set.
[0050] Optionally, in some achievable embodiments, it is necessary to perform data preprocessing on the collected window operation data, wherein the preprocessing is to improve the quality of the collected window operation data, and then, the data preprocessing process includes removing outliers, data smoothing, data normalization, and data segmentation. The Z-score method is used to remove outliers, that is, Z-score, also known as standard score, is a statistical concept used to describe the position of a value relative to the average value of the entire data set. This method identifies outliers by calculating the standard deviation distance of each data point from the mean, and data points with a Z-score greater than 3 or -3 are considered outliers. Data smoothing aims to reduce noise in the data, make the data smoother and more continuous, and the smoothed data can better reflect the real trend. For window position, window speed, window acceleration and vehicle speed, these data are generally time series data, containing noise and short-term fluctuations, and a moving average method is used to smooth the data. Moving average is a simple and commonly used data smoothing method that smoothes the data by calculating the average value of the data in the window. For the window motor current, the data contains instantaneous spikes and noise. Weighted moving average is used to smooth the data. Weighted moving average is a variant of moving average. It gives different weights to different data points in the window and is suitable for smoothing spikes and noise in the data. For the ambient temperature, the data usually changes relatively smoothly, but may contain some noise. In order to smooth this data, the sliding median is used to smooth the data. The sliding median is a median-based smoothing method that smoothes the data by calculating the median of the data in the window. It is suitable for smoothing outliers and noise in the data. Min-Max normalization is used for data normalization to scale the data to the range of [0,1]. This method first determines the minimum value (Min) and maximum value (Max) of a set of data. For each value X in the data set, the normalized new value X'=(X-Min) / (Max-Min) is calculated, thereby scaling each value in the data set to the range of [0,1]. Data segmentation divides the data set into a training set and a test set, and splits them in a ratio of 8:2. The training set is used to train the model, and the test set is used to evaluate the final performance of the model.
[0051] Step S220, dividing the data training set into a feature set and a target variable set, and training the support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model.
[0052] Specifically, after preprocessing the window operation data, the processed data training set can be divided into a feature set and a target variable set, wherein different features can obtain different target variables, that is, the target variable is determined by the feature data. Among them, the model adopts the support vector machine (SVM). The core idea of the support vector machine is to separate data points of different categories by finding an optimal classification hyperplane. It performs well in multidimensional data and can handle data sets with a large number of features. It can effectively handle nonlinear classification problems by using kernel functions. Since the data has multiple dimensions (window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed), and the target is a multi-class task (window normal operation event, anti-pinch event and mis-anti-pinch event), the support vector machine model can be well applied to this problem. Then, the support vector machine model can be trained based on the feature set and the target variable set to obtain a trained support vector machine model.
[0053] Exemplarily, the data training set is divided into a feature set (also called independent variables or input variables) and a target variable set (also called dependent variables or output variables). The feature set contains all the input information used to train the model, such as multiple attributes or features of an object. The target variable set is the value that the model needs to predict, such as the category label or continuous value of an object. Select SVM as the model to be trained. Select the appropriate SVM type according to the nature of the problem (such as classification or regression), and configure the parameters of the model (such as kernel function, regularization parameter, etc.). Use the preprocessed feature set and target variable set to train the SVM model. During the training process, SVM will try to find an optimal hyperplane (or decision boundary) to maximize the interval between different categories in the feature space. For nonlinear problems, SVM can use kernel functions to map features to high-dimensional space to find more complex decision boundaries.
[0054] Step S230: If the trained support vector machine model passes the preset performance assessment, the trained support vector machine model is used as the target support vector machine model.
[0055] Specifically, after the training of the support vector machine model is completed, it is necessary to perform a model evaluation on the trained support vector machine model to evaluate the performance of the trained support vector machine model on new data. If the trained support vector machine model passes the preset performance assessment, the trained support vector machine model can be used as the target support vector machine model to process the operating data of the new vehicle window.
[0056] For example, in model evaluation, accuracy, precision, recall and F1 score are four commonly used performance indicators. Accuracy refers to the proportion of samples predicted correctly by the model to the total number of samples; precision refers to the proportion of samples predicted by the model to be positive that are actually positive; precision refers to the proportion of samples predicted by the model to be positive that are actually positive; F1 score is the harmonic mean of precision and recall, which is used to comprehensively evaluate the performance of the model.
[0057] Step S240, acquiring real-time operation data of the vehicle window, and processing the real-time operation data based on the target support vector machine model to obtain the target event type corresponding to the vehicle window.
[0058] Specifically, real-time operating data of the vehicle window can be obtained, wherein the real-time operating data includes the current window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed, etc. The collected data are preprocessed to ensure that their format is consistent with the data used when training the model, and the preprocessed data is input into the trained target support vector machine model. The target support vector machine model will analyze the data in real time and give a prediction result on whether there is an anti-pinch risk.
[0059] In this embodiment, by collecting detailed operation data of the vehicle window and constructing a data training set, various modes and features of the vehicle window operation can be captured. Using these rich data to train the support vector machine model can improve the model's prediction accuracy for the vehicle window operation and related events. By analyzing the real-time operation data of the vehicle window, the target support vector machine model can identify abnormal operation modes, thereby early warning of potential failures, which helps to take timely measures and reduce the vehicle downtime caused by window failures. Therefore, in this embodiment, by using the operation data of the vehicle window to train the support vector machine model and making real-time predictions based on the model, not only the accuracy and intelligence of the prediction are improved, but also it helps to early warning of failures, optimize maintenance, enhance user experience and data-driven decision-making.
[0060] Further, based on the above embodiments, please refer to Figure 4 In one of the exemplary embodiments provided in the present application, before the support vector machine model is trained based on the feature set and the target variable set, the specific implementation process of the vehicle window anti-mis-pinch method may further include steps S410 and S420, which are described in detail as follows:
[0061] Step S410, determining a kernel function of a support vector machine model based on a linear relationship between data in a data training set.
[0062] Specifically, the kernel function of the support vector machine model can be selected based on the linear relationship between the data in the training data set, where the kernel function is a mapping function that maps a low-dimensional space to a high-dimensional space, and is defined as K(x,y)=φ(x)Tφ(y), where φ(x) and φ(y) are functions that map the original feature vectors x and y to a high-dimensional feature space. The characteristic of the kernel function is that it calculates the similarity between two vectors through the inner product without explicitly calculating their coordinates in the high-dimensional space. This feature enables the kernel function to implicitly express the relationship between data without explicitly constructing the feature space, thereby improving the flexibility and efficiency of the algorithm.
[0063] In this embodiment, the kernel function of the support vector machine model can be selected as a radial basis function (RBF) kernel, and the mathematical expression of the RBF kernel function is:
[0064]
[0065] x i and x j are two data points in the input space, ||x i -x j || 2 is the square of the Euclidean distance between two data points, and γ is the parameter of the kernel function, which controls the width of the RBF kernel. The RBF kernel function maps data from low-dimensional space to high-dimensional space nonlinearly, making the problem that is nonlinearly separable in low-dimensional space become linearly separable in high-dimensional space. There are complex nonlinear relationships between the data of normal window operation events, anti-pinch events, and mis-pinch events. The RBF kernel function can well capture the nonlinear relationship in the data. In addition, the RBF kernel function has locality, that is, the closer the distance between two data points, the larger the value of the kernel function; the farther the distance, the smaller the value of the kernel function. This characteristic enables the RBF kernel function to capture the local structure of the data. For example, the operating state of the window may be affected by factors such as local ambient temperature and vehicle speed, and the RBF kernel function can effectively capture these local patterns. The RBF kernel function has high flexibility and can adapt to different data distributions and patterns. By adjusting the parameter γ, the width of the RBF kernel can be controlled, thereby adjusting the complexity and fitting ability of the model.
[0066] Step S420, determining the target kernel function parameters corresponding to the kernel function and the target penalty parameters corresponding to the support vector machine model based on the preset parameter optimization strategy.
[0067] Specifically, after determining the kernel function of the support vector machine model, it is necessary to set the penalty parameter C of the support vector machine model and the kernel function parameter γ corresponding to the kernel function. The penalty parameter C controls the smoothness of the classification hyperplane and the degree of penalty for misclassification. A larger C value has a greater penalty for misclassification and tends to fit the training data better, but may lead to overfitting. A smaller C value has a smaller penalty for misclassification, allowing more misclassifications, tending to have a smoother decision boundary, but may lead to underfitting. The kernel function parameter γ controls the width of the radial basis function (RBF) kernel. A larger γ value fits the training data better, but may lead to overfitting. A smaller γ value will result in a smoother model with stronger generalization ability, but may lead to underfitting.
[0068] Therefore, a grid search method can be used to implement the process of hyperparameter optimization, where grid search (GridSearch) is a systematic hyperparameter optimization method that is widely used in the tuning process of machine learning models. It searches for the optimal model parameter combination within the specified parameter value range through exhaustive search to improve the performance of the model. That is, the optimal hyperparameter can be selected by exhaustively searching all possible combinations in the specified parameter space. Its implementation process is: define the candidate value range of C and γ values, select a set of possible values C = [0.1, 1, 10, 100, 1000] and γ = [1, 0.1, 0.01, 0.001, 0.0001] based on experience; use GridSearchCV for grid search and cross validation. GridSearchCV searches for all possible parameter combinations in the parameter grid and uses cross validation to evaluate the performance of each combination. Then after the grid search is completed, the optimal C and γ values are output.
[0069] In this embodiment, according to the linear relationship between the data in the data training set, kernel functions such as linear kernel, polynomial kernel, Gaussian kernel, etc. can be flexibly selected to meet the classification requirements of different data characteristics. By optimizing the kernel function parameters and penalty parameters, the complexity and generalization ability of the model can be further adjusted, so that the model can better adapt to the characteristics of the data set and improve the accuracy and stability of classification.
[0070] Further, based on the above embodiment, please refer to Figure 5 In one of the exemplary embodiments provided in the present application, the specific implementation process of training the support vector machine model based on the feature set and the target variable set may also include step S510 and step S520, which are described in detail as follows:
[0071] Step S510, determining an initial support vector machine model based on target kernel function parameters and target penalty parameters;
[0072] Step S520: training the initial support vector machine model based on the feature set and the target variable set.
[0073] Following the above embodiment, after determining the target kernel function and target penalty parameter of the support vector machine model, the support vector machine uses the kernel function to map the input data to a high-dimensional space so as to better find the separation boundary of the data. Commonly used kernel functions include linear kernels, polynomial kernels, radial basis function (RBF) kernels, etc. The target kernel function parameters refer to the specific parameters of these kernel functions, such as the γ parameter of the RBF kernel. The penalty parameter (usually expressed as C) is used to control the degree of penalty for classification errors. A higher C value means that the model will minimize classification errors as much as possible, but may cause overfitting; a lower C value may increase classification errors, but help reduce overfitting, and then based on these parameters, a support vector machine model can be initialized, and then, feature set: This is the feature part of the data set used to train the model, that is, the input variable. The feature set contains multiple features, each of which is a description of one aspect of the data. Target variable set: This is the target part of the data set, that is, the output variable or label. In classification problems, the target variable is the label of the category; in regression problems, the target variable is a continuous value. Using the feature set and the target variable set, the initial support vector machine model can be trained. The training process involves using an optimization algorithm (such as the Sequential Minimum Optimization algorithm SMO) to find the optimal separating hyperplane (or decision boundary) to classify (or fit) the data points as accurately as possible. After training, a trained support vector machine model is obtained. This model has learned how to predict the target variable based on the input features. It can be used to make predictions on new, unseen window operation data.
[0074] In this embodiment, by selecting the target kernel function parameters that match the characteristics of the target data set, it is possible to ensure that the support vector machine model has higher efficiency and accuracy when processing specific types of data. The determination of the target penalty parameters helps to find the optimal balance between the complexity and generalization ability of the model, avoiding overfitting or underfitting.
[0075] Further, based on the above embodiments, please refer to Figure 6 In one of the exemplary embodiments provided in the present application, the feature set includes multiple samples, the target variable set includes multiple target event types, and the specific implementation process of training the initial support vector machine model based on the feature set and the target variable set may also include step S610 and step S620, which are described in detail as follows:
[0076] Step S610, determining target samples corresponding to each of a plurality of target event types based on a target classifier;
[0077] Step S620: training the initial support vector machine model based on the multiple target event types and the target samples corresponding to the multiple target event types.
[0078] Specifically, the data training set constructed based on the operating data of the vehicle windows includes multiple samples and multiple target event types, wherein the features in the feature set include vehicle window position, vehicle window speed, vehicle window acceleration, vehicle window motor power, ambient temperature, and vehicle speed, etc., wherein the target event types include vehicle window normal operation event types, vehicle window anti-pinch event types, and vehicle window anti-mis-pinch event types, etc., and then the target samples corresponding to the multiple target event types can be determined through the target classifier, and the initial support vector machine model is trained based on the multiple target event types and the target samples corresponding to the multiple target event types to obtain a trained support vector machine model.
[0079] Exemplarily, the feature set: contains multiple samples, each of which has a series of features. These features are used to describe the attributes or characteristics of the samples, and they will be provided as input information to the support vector machine model. The target variable set: contains multiple target event types, which represent the results that the model is expected to predict or classify. Use a target classifier (this classifier may be based on rules, other machine learning models, or manual annotations) to determine the target samples corresponding to each target event type. In simple terms, it is to find out which samples belong to which target event type. With the target event type and its corresponding target sample, you can start training the initial support vector machine model. The training process involves inputting the features of the target sample into the model and telling the model the target event type corresponding to each sample. The model will try to find a hyperplane (or a set of hyperplanes, in multi-classification problems) that can separate samples of different categories. During the training process, the model will also adjust its parameters (such as the weights and biases of the support vectors) to minimize the classification error and maximize the interval between different categories.
[0080] In this embodiment, each target event type is identified through the target classifier, and corresponding target samples are collected for each type, which can ensure that the support vector machine model receives training data that is closely related to the task. This targeted training method helps the model better learn the characteristics of different event types, thereby improving the accuracy of classification, which helps the model show higher performance and accuracy in subsequent classification tasks.
[0081] Further, based on the above embodiments, please refer to Figure 7 In one of the exemplary embodiments provided in the present application, the specific implementation process of determining the target samples corresponding to the multiple target event types based on the classifier may also include step S710 and step S720, which are described in detail as follows:
[0082] Step S710, determining a target classifier of the target event type based on the target penalty parameter, the target kernel function, and the offset corresponding to the target event type, where the offset is used to determine the boundary of the target event type;
[0083] Step S720: classify the multiple samples based on the target classifier to determine the target event type corresponding to each of the multiple samples.
[0084] Specifically, in a support vector machine, each category (or target event type) usually has a bias (or intercept term) associated with it. This bias, together with the weight of the support vector, defines the position of the classification hyperplane. The specific value of the bias is determined by an optimization algorithm during the model training process. After the training is completed, the target classifier can be used to classify new or unknown samples. This usually involves inputting the features of the sample into the model and calculating their distances to each category classification hyperplane (or decision function value). Then, based on these distances (or decision function values) and the bias, the model can determine which category (or target event type) the sample belongs to. Specifically, if a sample has the largest distance to the classification hyperplane of a category (or the largest decision function value), and this distance (or value) exceeds the distances (or values) of all other categories, then the sample is classified as this category. In practical applications, due to the presence of factors such as noise and uncertainty, a threshold or decision boundary is usually set to determine the attribution of the sample. This threshold or boundary can be adjusted according to the performance of the model, the characteristics of the data, and the specific application scenario.
[0085] Exemplarily, in this embodiment, the support vector machine model trains three binary classifiers through a one-to-many method, wherein the goal of the first binary classifier is to distinguish category 1 from the remaining categories, the positive class is all samples belonging to category 1; the negative class is all samples belonging to category 2 and category 3; the goal of the second binary classifier is to distinguish category 2 from the remaining categories, the positive class is all samples belonging to category 2; the negative class is all samples belonging to category 1 and category 3; the goal of the third binary classifier is to distinguish category 3 from the remaining categories, the positive class is all samples belonging to category 3; the negative class is all samples belonging to category 1 and category 2.
[0086] For example, the mathematical expression of the first binary classifier decision function is:
[0087]
[0088] α 1i is the Lagrange multiplier of the first binary classifier. The value range of the Lagrange multiplier is [0, C], C is the penalty parameter, y 1iis the label of the first binary classifier, b1 is the bias of the first binary classifier, and K(x,xi) is the RBF kernel function.
[0089] The mathematical expression of the second binary classifier decision function is:
[0090]
[0091] The mathematical expression of the decision function of the third binary classifier is:
[0092]
[0093] Similarly, α 2i ,y 2i and b2 are the Lagrange multiplier, label and bias of the second binary classifier, respectively. 3i ,y 3i and b3 are the Lagrange multipliers, labels, and biases of the third binary classifier, respectively. Each binary classifier is trained using the training data set. Since the training data of each binary classifier is different, the Lagrange multipliers, labels, and biases calculated during the training will be different. In the prediction stage, for a sample x to be classified, each binary classifier will output a decision value f1(x), f2(x), and f3(x). The maximum decision value is used to determine which category the sample x belongs to. If f1(x) is the largest, the sample x belongs to category 1, which is the normal operation event of the window.
[0094] In this embodiment, by setting a specific bias for the target event type, the decision boundary of the classifier can be further refined so that it can more accurately identify the characteristics of different event types, which helps to reduce classification errors, improve classification accuracy, enhance model generalization capabilities, improve training efficiency and resource utilization, and promote model iteration and optimization.
[0095] Further, based on the above embodiments, please refer to Figure 8 In one of the exemplary embodiments provided in the present application, the specific implementation process of the above-mentioned vehicle window anti-mis-pinch method may also include step S810 and step S820, which are described in detail as follows:
[0096] Step S810, acquiring real-time operating data of the vehicle window, and constructing an updated data set based on the real-time operating data, wherein the data format of the updated data set is consistent with that of the training data set;
[0097] Step S820: updating the target support vector machine model based on the updated data set to obtain an updated target support vector machine model.
[0098] Specifically, the trained support vector machine model can be used to analyze the collected data in real time to determine whether there is an anti-pinch risk for the window. The real-time analysis module is installed on the window control system to collect window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data in real time. The collected data is pre-processed to ensure that their format is consistent with the data used when training the model. The pre-processed data is input into the trained support vector machine model, which will analyze the data in real time and give a prediction result on whether there is an anti-pinch risk.
[0099] Exemplarily, the collected real-time operation data needs to be organized into the same data format as the training dataset. This includes ensuring that the fields of the data (such as feature columns and label columns) are consistent with the training dataset, and that the encoding, unit, and range of the data are also kept uniform. The updated dataset may also require data cleaning and preprocessing to remove noise, outliers, or duplicate data, and feature engineering may be required to extract or transform features that are useful to the model. Once the updated dataset is ready, it can be used to update the target support vector machine model. This usually involves using incremental learning or online learning algorithms, which allow the model to gradually update its parameters as new data is received, rather than retraining from scratch. For the support vector machine model, the update process may include adjusting the weights and biases of the support vectors, and possibly recalculating the decision boundary. This depends on the specific SVM algorithm and update strategy used. The updated model should be able to more accurately reflect the latest operating status of the car window and be better able to handle new situations that may arise in the future. After the update process, you will get an updated target support vector machine model. This model has been adjusted and optimized based on the latest real-time operation data, so it should have better prediction performance and generalization ability. The updated model can be deployed to the window control system or other related applications to provide real-time window status prediction and monitoring functions.
[0100] It should be noted that model updating is an ongoing process. As new real-time data is continuously collected and processed, the model may need to be updated regularly or irregularly to maintain its accuracy and reliability.
[0101] In this embodiment, by obtaining the real-time operating data of the vehicle windows, it can be ensured that the model can receive the latest data input, thereby reflecting the current actual state of the vehicle windows, which helps the model to be more accurate in prediction and classification and reduce errors caused by data lag. Using an updated data set to update the target support vector machine model can enable it to learn more about the operating characteristics of the vehicle windows, which helps the model to better identify the different states of the vehicle windows and improve the accuracy of classification.
[0102] Further, based on the above embodiments, please refer to Fig. 9In one of the exemplary embodiments provided in the present application, the above-mentioned operating data includes: multiple items of window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data. The specific implementation process of the above-mentioned window anti-mis-pinch method may also include the following steps, which are described in detail as follows:
[0103] Step S910, collecting at least one operation data of the window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data corresponding to each target event type;
[0104] Step S920, extracting the vehicle window operation characteristics corresponding to each target type based on at least one operation data;
[0105] Step S930, based on the window operation characteristics, a mapping relationship between the window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data and each target event type is established. Specifically, a data set containing the above characteristics is collected from the window system, sensor network or related data source, and it is ensured that the data set contains enough samples to cover various possible window operation states and environmental conditions, and the meaning and measurement unit of each feature are clarified. For example, the window position may be expressed as a percentage or an absolute position, and the window speed may be expressed as a distance moved per second. The features are preprocessed as necessary, such as denoising, normalization or standardization, to ensure that their effects on model training are consistent. Determine the target event type that the model is expected to predict or classify. These types may be defined based on the failure mode of the window system, the user behavior pattern or other related factors, such as the window normal operation event type, the window anti-pinch event type and the window mis-pinch event type, etc., and a unique label or identifier is assigned to each target event type. Statistical methods, data mining techniques, or machine learning algorithms are then used to explore potential associations between features and target event types. This may involve calculating correlation coefficients between features and target event types, using decision trees or random forests to identify important features, or applying cluster analysis to discover natural groupings in feature space.
[0106] In some cases, it may be necessary to manually establish a mapping relationship between features and target event types based on physical principles or engineering experience, use a portion of the data set (usually a validation set or test set) to verify the accuracy of the mapping relationship, adjust the feature selection, preprocessing steps, or the definition of the mapping relationship based on the verification results, and repeat this process until a mapping relationship that performs well on the validation set is found. Once a reliable mapping relationship is established, it can be used to train a support vector machine model (or other type of classifier). After training, the model can be deployed to the car window system for real-time prediction or classification of new data samples.
[0107] In this embodiment, by establishing a detailed mapping relationship, refined classification of vehicle window-related events can be achieved. The establishment of a mapping relationship enables the system to monitor various data of the vehicle windows in real time and issue timely warnings when the data is abnormal. This helps to promptly discover and deal with potential safety hazards and improve the reliability and stability of the trained support vector machine model.
[0108] Fig.10 The present invention is a simple flow chart of preventing car windows from being accidentally clamped in an exemplary application scenario. In the application scenario shown in 10, the operation data of the car window is obtained, and a data training set is constructed based on the operation data; the data training set is divided into a feature set and a target variable set; the kernel function of the support vector machine model is determined based on the linear relationship between the data in the data training set; the target kernel function parameters corresponding to the kernel function and the target penalty parameters corresponding to the support vector machine model are determined based on the preset parameter optimization strategy, and the initial support vector machine model is determined based on the target kernel function parameters and the target penalty parameters; the target classifier of the target event type is determined based on the target penalty parameters and the target kernel function and the offset corresponding to the target event type, and the offset is used to determine the boundary of the target event type; multiple samples are classified based on the target classifier to determine the target event type corresponding to each of the multiple samples. The initial support vector machine model is trained based on multiple target event types and target samples corresponding to each of the multiple target event types. A trained support vector machine model is obtained; if the trained support vector machine model passes the preset performance assessment, the trained support vector machine model is used as the target support vector machine model; real-time operation data of the vehicle window is obtained, and the target event type corresponding to the vehicle window is obtained by processing the real-time operation data based on the target support vector machine model. For the detailed implementation process, please refer to the records in the above embodiments, which will not be described in detail here.
[0109] Fig.11 is a block diagram of a vehicle window anti-mis-pinch device shown in an exemplary embodiment of the present application. The device can be applied to Figure 1 The implementation environment shown in the figure is specifically configured in the server 120. The device can also be applied to other exemplary implementation environments and specifically configured in other devices. This embodiment does not limit the implementation environment to which the device is applied.
[0110] like Fig.11As shown, the exemplary vehicle window anti-mis-pinch device includes: an acquisition module 1110, used to acquire the operating data of the vehicle window, and construct a data training set based on the operating data; a training module 1120, used to divide the data training set into a feature set and a target variable set, and train the support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model; an assessment module 1130, used to use the trained support vector machine model as a target support vector machine model if the trained support vector machine model passes a preset performance assessment; a processing module 1040, used to acquire the real-time operating data of the vehicle window, and process the real-time operating data based on the target support vector machine model to obtain a target event type corresponding to the vehicle window.
[0111] According to one aspect of an embodiment of the present application, the above-mentioned vehicle window anti-mis-pinch device also specifically includes: a determination module, used to determine the kernel function of the support vector machine model based on the linear relationship between the data in the data training set; determine the target kernel function parameters corresponding to the kernel function and the target penalty parameters corresponding to the support vector machine model based on a preset parameter optimization strategy.
[0112] According to one aspect of an embodiment of the present application, the training module 1120 is also used to determine an initial support vector machine model based on target kernel function parameters and target penalty parameters; and train the initial support vector machine model based on a feature set and a target variable set.
[0113] According to one aspect of an embodiment of the present application, the above-mentioned training module 1120 is also used to determine the target samples corresponding to each of the multiple target event types based on the target classifier; and train the initial support vector machine model based on the multiple target event types and the target samples corresponding to each of the multiple target event types.
[0114] According to one aspect of an embodiment of the present application, the above-mentioned training module 1120 is also used to determine a target classifier for a target event type based on a target penalty parameter, a target kernel function, and a bias corresponding to the target event type, wherein the bias is used to determine the boundary of the target event type; and classify multiple samples based on the target classifier to determine the target event type corresponding to each of the multiple samples.
[0115] According to one aspect of an embodiment of the present application, the above-mentioned vehicle window anti-mis-pinch device also includes: an update module, used to obtain real-time operating data of the vehicle window, and construct an updated data set based on the real-time operating data, and the data format of the updated data set is consistent with that of the training data set; based on the updated data set, the target support vector machine model is updated to obtain an updated target support vector machine model.
[0116] According to one aspect of an embodiment of the present application, the above-mentioned window anti-mis-pinch device also includes: an establishment module, which is used to collect at least one operating data of the window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data corresponding to each target event type; based on the at least one operating data, the window operating characteristics corresponding to each target type are extracted, and based on the window operating characteristics, a mapping relationship between the window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data and each target event type is established.
[0117] It should be noted that the vehicle window anti-mis-pinch device provided in the above embodiment and the vehicle window anti-mis-pinch method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment, and will not be repeated here. In actual application, the vehicle window anti-mis-pinch device provided in the above embodiment can distribute the above functions to different functional modules as needed, that is, divide the internal structure of the device into different functional modules to complete all or part of the functions described above, and this is not limited here.
[0118] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, and when the one or more programs are executed by one or more processors, the electronic device implements the vehicle window anti-mis-pinching method provided in the above-mentioned embodiments.
[0119] Fig.12 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.12 The computer system 1200 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0120] like Fig.12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1202 or the program loaded from the storage part 1208 to the random access memory (RAM) 1203, such as executing the method in the above embodiment. In the RAM 1203, various programs and data required for system operation are also stored. The CPU 1201, the ROM 1202 and the RAM 1203 are connected to each other through the bus 1204. The input / output (I / O) interface 1205 is also connected to the bus 1204.
[0121] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0122] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by a central processing unit (CPU) 1201, various functions defined in the system of the present application are executed.
[0123] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0124] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0126] Another aspect of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the vehicle window anti-mis-pinch method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0127] Another aspect of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the vehicle window anti-mis-pinch method provided in each of the above embodiments.
[0128] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. A method for preventing accidental clamping of vehicle windows, characterized in that: include: Acquire operating data of the vehicle window, and construct a data training set based on the operating data; Dividing the data training set into a feature set and a target variable set, and training a support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model; If the trained support vector machine model passes the preset performance assessment, the trained support vector machine model is used as the target support vector machine model; Real-time operation data of the vehicle window is acquired, and the target event type corresponding to the vehicle window is obtained by processing the real-time operation data based on the target support vector machine model.
2. The method according to claim 1, characterized in that Before training the support vector machine model based on the feature set and the target variable set, the method further includes: Determine the kernel function of the support vector machine model based on the linear relationship between the data in the data training set; The target kernel function parameters corresponding to the kernel function and the target penalty parameters corresponding to the support vector machine model are determined based on a preset parameter optimization strategy.
3. The method according to claim 2, characterized in that The training of the support vector machine model based on the feature set and the target variable set includes: Determine an initial support vector machine model based on the target kernel function parameter and the target penalty parameter; An initial support vector machine model is trained based on the feature set and the target variable set.
4. The method according to claim 3, characterized in that The feature set includes a plurality of samples, the target variable set includes a plurality of target event types, and the training of the initial support vector machine model based on the feature set and the target variable set includes: Determine target samples corresponding to each of multiple target event types based on a target classifier; The initial support vector machine model is trained based on the multiple target event types and target samples corresponding to each of the multiple target event types.
5. The method according to claim 1, characterized in that The step of determining target samples corresponding to each of the plurality of target event types based on the classifier includes: Determining a target classifier of the target event type based on the target penalty parameter, the target kernel function, and a bias corresponding to the target event type, wherein the bias is used to determine a boundary of the target event type; The multiple samples are classified based on the target classifier to determine the target event type corresponding to each of the multiple samples.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Acquire real-time operating data of the vehicle window, and construct an updated data set based on the real-time operating data, wherein the updated data set has a data format consistent with that of the training data set; The target support vector machine model is updated based on the update data set to obtain an updated target support vector machine model.
7. The method according to claim 1, characterized in that The operating data includes: multiple items of window position, window speed, window acceleration, window motor current, ambient temperature and vehicle speed data. The method further includes: Collecting at least one operation data of the window position, the window speed, the window acceleration, the window motor current, the ambient temperature and the vehicle speed data corresponding to each target event type; extracting the window operation feature corresponding to each target type based on the at least one operation data; A mapping relationship between the window position, the window speed, the window acceleration, the window motor current, the ambient temperature and the vehicle speed data and each target event type is established based on the window operation characteristics.
8. A vehicle window anti-mis-pinching device, characterized in that: The device comprises: An acquisition module, used for acquiring operating data of the vehicle window and constructing a data training set based on the operating data; A training module, used for dividing the data training set into a feature set and a target variable set, and training a support vector machine model based on the feature set and the target variable set to obtain a trained support vector machine model; An assessment module, configured to use the trained support vector machine model as a target support vector machine model if the trained support vector machine model passes a preset performance assessment; A processing module is used to obtain real-time operation data of the vehicle window, and process the real-time operation data based on the target support vector machine model to obtain a target event type corresponding to the vehicle window.
9. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the electronic device to implement the vehicle window anti-mis-pinching method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is enabled to execute the vehicle window anti-mis-pinching method according to any one of claims 1 to 7.
Citation Information
Cited By
Part anti-pinch control method and system, vehicle and electronic equipment
CN119928753A