A method and system for pin protection control of a vehicle window
Patent Information
- Application Number
- CN202610938011.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]有鉴于此,本发明实施例提供了一种车窗防夹控制方法及系统,以解决现有车窗防夹技术的控制策略固化,难以随车辆使用过程中的状态变化进行自适应调整的问题
本申请实施例提供的方法车端通过实时获取车端在车窗升降行程中采集到的感知数据,能够及时取得车窗运动过程中的多维状态信息,为后续智能决策提供数据基础;通过利用云端基于海量历史升窗数据训练并经知识蒸馏生成并部署至车端的轻量化目标车端模型,对实时感知数据进行分析并输出夹持风险概率及车窗控制参数,既继承了云端大模型的高精度识别能力,又满足了车端低算力与实时推理的要求,实现了防夹判断的精准化与轻量化统一;当夹持风险概率表征存在异物夹持风险时,利用所述车窗控制参数执行相应的防夹控制操作,实现了根据当前实际工况自适应动态调整控制输出。
Smart Images

Figure CN122589288A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle technology, and specifically to a method and system for preventing window pinching. Background Technology
[0002] With the deepening development of vehicle electrification and intelligence, automatic windows have become a standard feature in vehicles, and their anti-pinch function is crucial for ensuring passenger safety. Currently, mainstream anti-pinch technologies are based on preset current threshold monitoring, Hall pulse counting, or force-displacement curve models embedded in the window control unit. The preset thresholds or models are calibrated based on the condition of a new vehicle in a laboratory environment, and basic anti-pinch functionality is achieved by writing fixed judgment logic into the window control software.
[0003] However, the factory-fixed control strategy cannot adaptively adjust to the changes in the vehicle's condition during use. The anti-pinch judgment benchmark gradually deviates from the actual working conditions, making it difficult to continuously guarantee the reliability of the anti-pinch function throughout its entire life cycle. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and system for controlling anti-pinch windows, in order to solve the problem that the control strategy of existing anti-pinch window technologies is fixed and difficult to adaptively adjust to changes in the state of the vehicle during use.
[0005] In a first aspect, embodiments of the present invention provide a window anti-pinch control, applied to a vehicle, the method comprising: Acquire real-time sensing data collected by the vehicle during the window raising and lowering stroke; The real-time perception data is analyzed using the target vehicle-side model to obtain anti-pinch decision results. The anti-pinch decision results include the probability of pinching risk and the window control parameters. The target vehicle-side model is generated and deployed to the vehicle by knowledge distillation after training the target cloud model based on the vehicle's historical window raising data. When the probability of clamping risk indicates that there is a risk of foreign object clamping during the window lifting stroke, the corresponding anti-pinch control operation is performed using the window control parameters.
[0006] Furthermore, after acquiring real-time sensing data collected by the vehicle during the window lifting and lowering stroke, the method further includes: Construct a sliding window according to the preset time window length and sliding step size; Extract the time-series data corresponding to the sliding window from the real-time sensing data; Anomaly detection is performed on the time series data based on preset data indicators to obtain anomaly values corresponding to at least one data indicator. The data indicators include at least one of the following: current indicator, voltage indicator, Hall pulse indicator, position indicator, temperature indicator, tilt angle indicator, and battery voltage indicator. The interpolation value is determined based on the adjacent data values of the outlier, and the outlier is replaced with the interpolation value to obtain the replaced real-time sensing data.
[0007] Furthermore, the step of performing the corresponding anti-pinch control operation using the window control parameters includes: The speed adjustment parameters are parsed from the window control parameters, wherein the speed adjustment parameters include a speed change factor and a deceleration start position; A time-varying PWM duty cycle sequence is generated based on the speed change factor; When the window reaches the deceleration start position, the speed of the window motor is adjusted according to the PWM duty cycle sequence.
[0008] Furthermore, the method also includes: Obtain the actual clamping label at the vehicle end after the window lifting / lowering stroke is completed; The real-time perception data, the clamping risk probability and window control parameters output by the target vehicle-side model, and the actual clamping labels are used as incremental learning samples and stored in the circular buffer of the vehicle-side. When the number of accumulated samples in the circular buffer reaches a preset threshold, the incremental learning samples are read from the circular buffer, and the model parameters of the target vehicle model are updated based on the incremental learning samples to obtain the updated target vehicle model.
[0009] Secondly, embodiments of the present invention provide a vehicle window anti-pinch control method, applied in a cloud environment, the method comprising: Receive historical window-raising data uploaded from different vehicle terminals, wherein the historical window-raising data includes historical sensing data and historical anti-pinch decision results corresponding to the historical sensing data; Based on the mapping relationship between the historical sensing data and the historical anti-pinch decision results, a target cloud model is constructed; The target cloud model is used to generate the corresponding target vehicle model, and the target vehicle model is deployed to the corresponding vehicle.
[0010] Furthermore, the step of generating the corresponding target vehicle model using the target cloud model includes: The training perception data is input into the target cloud model so that the target cloud model outputs a soft label after forward inference. The soft label is used to characterize the predicted anti-pinch decision result obtained by the target cloud model after analyzing the training perception data. Obtain the hard labels corresponding to the training perception data, wherein the hard labels are used to characterize the actual anti-pinch decision results corresponding to the training perception data; Based on the training perception data, the soft labels, and the hard labels, construct the target vehicle-side model corresponding to the target cloud model.
[0011] Furthermore, the step of constructing the target vehicle-side model corresponding to the target cloud model based on the training perception data, the soft labels, and the hard labels includes: Construct an initial student model based on the network architecture of the target cloud model; The training perception data is input into the initial student model to obtain a prediction label, wherein the prediction label is used to characterize the predicted anti-pinch decision result obtained by the initial student model after analyzing the training perception data; The target loss function is calculated based on the soft label, the predicted label, and the hard label; The parameters of the initial student model are updated using the target loss function to obtain a candidate student model. When the target loss function meets the convergence condition and the model parameters of the candidate student model meet the preset deployment conditions, the candidate student model is used as the target vehicle model.
[0012] Furthermore, the step of calculating the target loss function based on the soft label, the predicted label, and the hard label includes: Calculate the distillation loss function based on the predicted label and the soft label, and calculate the task loss function based on the predicted label and the hard label; Calculate the feature alignment loss function between the target cloud model and the initial student model; The target loss function is obtained by weighted summing of the feature alignment loss function, the distillation loss function, and the task loss function.
[0013] Furthermore, calculating the feature alignment loss function between the target cloud model and the initial student model includes: At least one intermediate layer is selected in both the target cloud model and the initial student model; The training perception data is forward-propagated to the target cloud model and the initial student model respectively to obtain the first output feature map of the intermediate layer corresponding to the target cloud model and the second output feature map of the intermediate layer corresponding to the initial student model. The second output feature map is adapted and transformed according to the first output feature map to obtain the adapted second output feature map. The feature alignment loss function is calculated based on the first output feature map and the adapted second output feature map.
[0014] Thirdly, embodiments of the present invention provide a vehicle window anti-pinch control system, the system comprising: a cloud terminal and a vehicle terminal; The cloud is used to receive historical window-raising data uploaded by different vehicle terminals. The historical window-raising data includes historical perception data and historical anti-pinch decision results corresponding to the historical perception data. Based on the mapping relationship between the historical perception data and the historical anti-pinch decision results, a target cloud model is constructed. The target cloud model is used to generate a corresponding target vehicle terminal model, and the target vehicle terminal model is deployed to the vehicle terminal. The vehicle-side device is used to acquire real-time sensing data collected during the window lifting stroke. The target vehicle-side model is used to analyze the real-time sensing data to obtain an anti-pinch decision result. The anti-pinch decision result includes the probability of pinching risk and window control parameters. The target vehicle-side model is generated and deployed to the vehicle-side device after knowledge distillation of a target cloud model trained on the vehicle-side based on historical window lifting data. When the probability of pinching risk indicates that there is a risk of foreign object pinching during the window lifting stroke, the corresponding anti-pinch control operation is executed using the window control parameters.
[0015] Fourthly, embodiments of the present invention provide a computer device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method described in the first aspect or any corresponding embodiment thereof.
[0016] Fifthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the first aspect or any corresponding embodiment thereof.
[0017] The method provided in this application has the following beneficial effects: The method provided in this application allows the vehicle-side to acquire real-time sensing data collected during the window's lifting and lowering stroke, enabling timely acquisition of multi-dimensional state information during window movement and providing a data foundation for subsequent intelligent decision-making. By utilizing a lightweight target vehicle-side model trained on massive historical window-raising data in the cloud, generated through knowledge distillation, and deployed to the vehicle, the real-time sensing data is analyzed, and the probability of pinching risk and window control parameters are output. This approach inherits the high-precision recognition capabilities of the large cloud model while meeting the requirements of low computing power and real-time inference on the vehicle-side, achieving a balance between precision and lightweight anti-pinch judgment. When the pinching risk probability indicates a risk of foreign object pinching, the corresponding anti-pinch control operation is executed using the window control parameters, achieving adaptive dynamic adjustment of the control output based on the current actual working conditions.
[0018] The method provided in this application provides a cloud-based system that receives historical windowing data uploaded from different vehicle terminals and aggregates massive amounts of sensor time series and event tags collected by vehicles under real-world conditions to construct a large-scale, diverse training sample library. By constructing a target cloud model based on the mapping relationship between historical perception data and historical anti-pinch decision results, and utilizing deep neural networks to learn the relationship between complex and subtle clamping features and optimal control curves from big data, the model's generalization ability to diverse operating conditions is significantly improved. Furthermore, by using the target cloud model to generate a corresponding target vehicle terminal model and deploying it to the corresponding vehicle terminal, the adaptive adjustment capability learned from multiple samples in the cloud is transferred to the lightweight vehicle terminal model. This enables the vehicle terminal model to output control parameters adapted to the current operating conditions based on the current real-time perception data, thereby solving the problem that factory-fixed strategies cannot adaptively adjust with state changes. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a schematic flowchart of the anti-pinch control of vehicle windows according to some embodiments of the present invention; Figure 2 This is a schematic diagram of another window anti-pinch control process according to some embodiments of the present invention; Figure 3 This is a schematic diagram illustrating the process of preparing and deploying a target vehicle-side model according to some embodiments of the present invention; Figure 4 This is a structural block diagram of a predictive labeling system according to an embodiment of the present invention; Figure 5This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] According to an embodiment of the present invention, a method and system for preventing vehicle window pinching are provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0023] This embodiment provides a window anti-pinch control, applied to the vehicle end. Figure 1 This is a flowchart of the anti-pinch control for vehicle windows according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain real-time sensing data collected by the vehicle during the window lifting and lowering stroke.
[0024] In this embodiment, "vehicle terminal" refers to the domain controller deployed on the vehicle, which is responsible for real-time processing of sensor data and model inference related to window control; "window lifting stroke" refers to the complete process of the window glass moving from the starting position (fully open or fully closed) to the target position; "real-time sensing data" refers to the multi-dimensional sensor time-series data collected by the vehicle terminal at a fixed sampling rate during the window lifting process, including but not limited to motor current, voltage, Hall pulse frequency, window position, ambient temperature, door tilt angle, and battery voltage.
[0025] During the window motor-driven window closing process, the vehicle-side domain controller continuously collects data from the aforementioned multiple sensors at a fixed sampling rate of 1kHz. At each sampling moment, it records the current timestamp, current value (A), voltage value (V), Hall pulse count (used to calculate position change), absolute window position (mm, obtained through Hall pulse accumulation or a position sensor), ambient temperature (°C), door tilt angle (°), and battery voltage (V). This data is temporarily stored in the domain controller's circular buffer in its raw time sequence form, with each sampling point forming an 8-dimensional feature vector. When the window moves from the starting point to complete closure or triggers the anti-pinch reversal termination, the continuous sampling sequence of this lifting stroke constitutes complete real-time sensing data for subsequent steps.
[0026] Step S102: Analyze the real-time perception data using the target vehicle-side model to obtain the anti-pinch decision result. The anti-pinch decision result includes the probability of pinching risk and the window control parameters. The target vehicle-side model is generated and deployed to the vehicle by knowledge distillation after training the target cloud model based on the vehicle's historical window raising data.
[0027] In this embodiment, the target vehicle-side model refers to a lightweight neural network model (such as a lightweight convolutional neural network or a fully connected network) generated from the target cloud model using knowledge distillation technology. It has few parameters and fast inference speed, and is deployed to the vehicle-side domain controller via OTA for real-time anti-pinch risk assessment and control parameter generation. The anti-pinch decision result includes two outputs: the probability of pinching risk (ranging from 0 to 1, representing whether there is a risk of foreign object pinching the window) and window control parameters (such as the target PWM duty cycle, deceleration start position, etc., used to guide smooth motor speed adjustment). The cloud refers to a big data platform deployed on a remote server cluster, responsible for storing massive amounts of de-identified vehicle data and training complex models; historical upgrades... Window data refers to the time-series data of sensors uploaded by each vehicle, including motor current, voltage, Hall pulse frequency, window position, ambient temperature, door tilt angle, battery voltage, etc., along with corresponding event labels (whether clamping has occurred). The target cloud model is a large-scale deep neural network (such as a deep residual network ResNet or Transformer model) trained in the cloud using historical windowing data. It is used to learn the mapping from multi-dimensional sensor time-series data to accurate anti-pinch decisions and optimal control curves. Knowledge distillation is a model compression technique that allows a lightweight student model to learn the soft labels (softened probability distribution) and intermediate layer features output by the teacher model, thereby significantly reducing the number of model parameters while maintaining high accuracy.
[0028] The vehicle-side domain controller first acquires real-time sensing data and performs preprocessing: outliers in continuous signals such as current and voltage are removed using the 3σ principle and filled with linear interpolation; for lost Hall pulses, a strategy of preserving the previous effective value is adopted; then, numerical features are Z-score standardized based on historical statistics from the cloud (making the mean 0 and the variance 1); physical quantities such as temperature and tilt angle are normalized to their actual range using Min-Max normalization; finally, all data are resampled to a unified time axis based on the rising edge of the Hall pulse. After preprocessing, an input tensor with dimensions of 200×8 (8 sensor channels) is constructed according to preset sliding window parameters (window length 200ms corresponding to 200 sampling points, step size 100ms, 50% overlap between adjacent windows). The tensor is input into the target vehicle model already deployed in the domain controller. The model performs forward inference: a lightweight neural network computes layer by layer, and the final output layer produces two branches: a classification head outputs the pinch risk probability value (mapped to the 0~1 range via a Sigmoid function), and a regression head outputs recommended window control parameters (such as target PWM duty cycle, speed change factor, deceleration start position, etc.). The entire inference process is optimized using pipelined parallelism (data acquisition, model inference, and control output are executed asynchronously in three stages), ensuring that the time for a single inference is within 10~50 milliseconds, meeting real-time requirements. The pinch risk probability obtained from the inference, together with the window control parameters, constitutes the anti-pinch decision result.
[0029] Furthermore, the vehicle-side employs the following lightweight AI model inference optimization strategy: Model computation is decomposed into multiple subtasks such as feature extraction, classification head, and regression head; a three-stage pipeline parallelism is achieved using the multi-core heterogeneous resources of the domain controller (data acquisition core, model inference core, and control output core execute asynchronously); inference is triggered every 100ms (sliding step), and the inference result takes effect in the next control cycle, forming a sliding window inference + predictive control mode, eliminating the impact of computational latency on real-time performance. Model parameters are stored using INT8 quantization and dequantized to FP32 for computation at runtime, reducing memory usage by approximately 75%; the input buffer uses a circular queue, retaining only the most recent 500ms of data to avoid unlimited memory growth; gradient checkpoints are used during online learning, retaining only key intermediate activation values to reduce backpropagation memory overhead.
[0030] Step S103: When the probability of clamping risk indicates that there is a risk of foreign object clamping during the window lifting stroke, the corresponding anti-pinch control operation is executed using the window control parameters.
[0031] In the embodiment of the present application, the risk of foreign object clamping refers to a dangerous state in which the window encounters an obstacle (such as a human body part or an object) during the ascending process, resulting in a squeezing injury that may exceed the limit value (clamping force ≤ 100N). The vehicle-end domain controller compares the clamping risk probability P obtained from the target vehicle-end model with the preset safety threshold T_safe. The reference value of T_safe is 0.9, which is based on vehicle calibration: on a standard new vehicle, a force sensor is used to measure the actual clamping force under different clamping conditions, establish a probability-clamping force mapping relationship, and determine that the critical point corresponding to 0.9 has a clamping force close to 100N. At the same time, T_safe supports adaptive adjustment: when the ambient temperature is lower than 0°C, due to the hardening of the sealing strip, the clamping force response is faster, and T_safe is dynamically adjusted down to 0.85; when the temperature is higher than 35°C, it is adjusted up to 0.92; in addition, the vehicle-end online learning model continuously monitors the degree of system aging. If it detects a decrease in the baseline of the window closing resistance, T_safe is adjusted up by about 0.02 - 0.05 to reduce unnecessary reversals. When comparing, an anti-shake logic needs to be added: if P ≥ T_safe (the current threshold after adaptive adjustment) and this state lasts for ≥ 10ms, it is determined that "there is a risk of foreign object clamping", and then the anti-pinch control operation is triggered; if P < T_safe but is higher than the comfort threshold T_comfort (0.3), it is not determined that there is a clamping risk, and instead, comfort optimization (smooth deceleration) is performed: the comfort optimization module dynamically adjusts the PWM control signal of the motor according to the recommended control parameters (such as the speed change factor and the deceleration start position) output by the model: when the risk probability is lower than 0.3, it closes quickly with a high-speed S-shaped curve; when it is between 0.3 and 0.7, it decelerates in advance for a smooth transition; at the same time, the current ripple is monitored in real time to perform active damping compensation, suppress mechanical vibration and noise, and avoid abrupt stops and starts; if P is lower than T_comfort, the window is closed quickly. This determination process is executed once in each sliding window inference cycle (every 100ms) to ensure real-time response.
[0032] When it is determined that there is a risk of foreign object clamping and the anti-pinch reversal is triggered, the following specific logic is executed: The target speed is set to the maximum speed and achieved through PID closed-loop control; the reverse duration is at least 300ms and at most 1s. If the window descends a distance of ≥ 100mm within this time, it stops in advance; if it does not descend due to mechanical jamming, it is forced to stop after 500ms and a fault is reported.
[0033] During the execution of the reverse, if the risk probability output by the model drops below 0.2 and the window has descended more than 50mm, the reverse is ended in advance, allowing the user to close the window again; after the reverse ends, the system enters the cooling lock state: automatic window closing is prohibited within 5 seconds, and only manual (long press) window closing by the user is allowed to prevent continuous accidental touches.
[0034] If the Hall sensor does not detect a change in position (the window does not descend) within 200ms after the reversal command is issued, the reversal is deemed a failure. The motor power supply is immediately cut off, the window stops moving, and the user is alerted via the instrument panel. If the motor current is detected to be rising continuously (>30A for more than 50ms), it is deemed a jam. An emergency power cut is performed and the relay is disconnected to prevent the motor from burning out. At the same time, the fault code (DTC) is recorded and uploaded to the cloud for remote diagnosis.
[0035] In this embodiment of the application, the corresponding anti-pinch control operation is performed using the window control parameters, including: Step A1: Extract the speed adjustment parameters from the window control parameters. The speed adjustment parameters include the speed change factor and the deceleration start position.
[0036] Specifically, the speed adjustment parameters refer to a set of control variables extracted from the window control parameters to smoothly adjust the speed of the window motor. These include the speed change factor and the deceleration start position. The speed change factor is a dimensionless coefficient (usually ranging from 0 to 1) used to define the shape characteristics of the speed curve during the window closing process. A larger factor indicates a smoother speed change (such as an S-shaped curve), while a smaller factor indicates a steeper speed change (such as linear deceleration). The deceleration start position is a window position threshold in millimeters, indicating when the window rises to this position and the speed adjustment operation begins to be executed to achieve early deceleration and avoid sudden stops.
[0037] After receiving the window control parameters output by the target vehicle model, the vehicle-side domain controller first parses these parameters. The window control parameters are structured data containing multiple fields, including two key fields: speed change factor and deceleration start position. These two values are extracted through field indexing or protocol decoding: the speed change factor is usually stored as a floating-point number (e.g., 0.6), which can be read directly; the deceleration start position is stored as an integer (e.g., 380, in mm), representing the current distance or absolute position of the window from the fully closed position (usually defined as 0mm or the top stop). After parsing, these two parameters are stored in their corresponding variables. If parameters are found to be missing or outside the valid range during parsing (e.g., speed change factor > 1 or < 0), the system will revert to preset default values (e.g., speed change factor = 0.5, deceleration start position = 100mm from the top) to ensure safety.
[0038] Step A2: Generate a time-varying PWM duty cycle sequence based on the speed change factor.
[0039] Specifically, the PWM duty cycle sequence refers to a list of duty cycle values of a pulse width modulation (PWM) signal that varies with time or the position of the car window. Each value corresponds to the effective proportion of the motor drive voltage within a control cycle (range 0~100%). The duty cycles in the sequence are output sequentially according to preset time intervals or position intervals to achieve continuous and smooth adjustment of the motor speed.
[0040] The vehicle-side comfort optimization module dynamically generates a time-varying PWM duty cycle sequence based on the speed variation factor. The generation method is as follows: First, the speed curve type for the window closing process is determined, with the speed variation factor determining the curve's shape: an S-shaped curve (smooth transitions between acceleration and deceleration) is used when the factor is close to 1, and a linear curve (constant deceleration slope) is used when the factor is close to 0. Then, using the deceleration start position as a reference point, the deceleration phase is divided into several equally spaced control cycles (each cycle is typically 10ms). In each control cycle, the target speed at the current moment is calculated based on the speed curve function, and then converted into the corresponding PWM duty cycle value using a motor speed-duty cycle mapping table (a pre-calibrated linear or non-linear relationship). The sequence length is determined by the time required from the deceleration start position to complete window closing; for example, if the remaining travel is 300ms, 30 duty cycle values are generated every 10ms. The generated sequence is stored in a circular buffer in chronological order. If the speed variation factor is 0.6, the generated duty cycle sequence exhibits an S-shaped characteristic of "gradual descent followed by a steep descent," avoiding abrupt speed jumps.
[0041] Step A3: When the window reaches the deceleration start position, adjust the speed of the window motor according to the PWM duty cycle sequence.
[0042] Specifically, the window position refers to the displacement distance of the window glass relative to the fully closed position (top dead center), which is obtained in real time through Hall pulse counting or position sensors, and is measured in millimeters. Typically, the position is 0mm or the maximum travel value when fully closed. The window motor refers to the DC permanent magnet motor that drives the window glass to rise and fall, and its speed is adjusted by changing the PWM duty cycle. The speed refers to the rotational speed of the window motor, usually expressed in revolutions per minute (RPM) or equivalent linear velocity (mm / s). Stepless speed regulation can be achieved by adjusting the PWM duty cycle.
[0043] The vehicle-side domain controller continuously monitors pulse signals from Hall effect sensors, calculating the absolute position of the window in real time through pulse counting and direction determination. The real-time position is compared to the deceleration start position: when the window position has not yet reached the deceleration start position, the original rapid window closing control (usually at maximum PWM duty cycle) is maintained. Once the real-time position is detected to be greater than or equal to the deceleration start position (judged by absolute position, e.g., position ≥ 380mm), the speed adjustment process is immediately triggered. At this time, the comfort optimization module reads the next duty cycle value from the PWM duty cycle sequence in steps of each control cycle (e.g., 10ms) and writes it to the PWM comparison register of the motor driver. The driver adjusts the on-time ratio of the MOSFET switching transistors accordingly, changing the average voltage across the motor windings, thereby achieving a continuous and smooth reduction in speed. During deceleration, active damping compensation is simultaneously performed through current feedback: the motor current ripple is monitored, and if speed fluctuations exceed limits, the PWM duty cycle is fine-tuned (±2%~5%) to suppress mechanical vibration and noise. When the window reaches the fully closed position (Hall pulse count reaches the preset threshold or stall current characteristic is detected), the PWM output stops, and the window is closed.
[0044] By analyzing the speed change factor and the deceleration start position, the model output is transformed into executable speed regulation parameters; by generating a time-varying PWM duty cycle sequence, S-shaped or linear smooth speed regulation is achieved, avoiding abrupt sudden stops; by adjusting the motor speed in sequence at the deceleration start position, graded speed regulation is achieved, which allows for early deceleration in low-risk areas and rapid closing in safe areas, thereby shortening window closing time, reducing impact noise, and improving smoothness and comfort.
[0045] In this embodiment of the application, after acquiring the real-time sensing data collected by the vehicle end during the window lifting and lowering stroke, the method further includes: Step B1: Construct a sliding window according to the preset time window length and sliding step size.
[0046] Specifically, after the vehicle-side domain controller begins receiving real-time sensing data, it first allocates a circular buffer in memory to store sensor sampling values for the most recent period. A sliding window mechanism is constructed according to a preset time window length of 200ms and a sliding step size of 100ms: data is continuously collected at a fixed sampling rate of 1kHz, and each sampling point records a timestamp and 8-dimensional sensor values. The starting point of the sliding window moves forward every 100ms. After each move, the current window covers all sampling points within a 200ms range from the new starting point. A 50% overlap between windows ensures that the model can capture the temporal dependencies between consecutive windows, avoiding the loss of key features due to window boundary cutting. When constructing the sliding window, it checks whether there is enough data in the buffer (at least 200 sampling points) to fill the current window; if the data is insufficient (e.g., within the first 200ms after window closing), it waits for the data to accumulate to the window length before constructing the first window. After each window is constructed, it is marked as "pending processing".
[0047] Step B2: Extract the time-series data corresponding to the sliding window from the real-time sensing data.
[0048] Specifically, time-series data refers to a sequence of continuous sensor sample values arranged in chronological order within the time range covered by the sliding window. Each sample point contains a timestamp and values from multiple sensor channels. The time-series data dimension of each window is 200 (time step) × 8 (sensor channels). The specific channels include motor current, voltage, Hall pulse frequency, window position, ambient temperature, door tilt angle, battery voltage, and timestamp normalized value.
[0049] After constructing the sliding window, the original sampled data corresponding to that window is read from the circular buffer. Based on the window's start and end times (start time + 200ms), the corresponding data index range in the buffer is calculated. Since the buffer uses a circular structure, a wraparound process is involved; the actual storage address is located using modulo operations. Then, in ascending time order, the eight sensor values for each sampling point are extracted sequentially and organized into a two-dimensional array (200 rows × 8 columns). The original sampling order is maintained during extraction to ensure the integrity of the temporal sequence. If there are missing sampling points within the window (e.g., due to communication delays causing some sampling points to not be stored in time), linear interpolation is used to fill the gaps based on the preceding and following valid sampling points, so that each window ultimately outputs a complete 200×8 temporal data matrix. This matrix serves as the input data for subsequent anomaly detection steps.
[0050] Step B3: Perform anomaly detection on the time series data based on preset data indicators to obtain anomaly values corresponding to at least one data indicator. The data indicators include at least one of the following: current indicator, voltage indicator, Hall pulse indicator, position indicator, temperature indicator, tilt angle indicator, and battery voltage indicator.
[0051] Specifically, preset data indicators refer to the types of sensor data that need to be monitored in advance, including current indicators (motor current value, unit A), voltage indicators (motor drive voltage or battery voltage, unit V), Hall pulse indicators (pulse count or frequency output by Hall sensor), position indicators (absolute position of window, unit mm), temperature indicators (ambient temperature, unit °C), tilt angle indicators (door tilt angle, unit °), and battery voltage indicators (vehicle battery voltage, unit V). Outliers refer to data points in the above indicators that deviate significantly from the normal statistical distribution. For example, the 3σ principle is used for judgment: values that exceed the historical mean of the indicator by ±3 times the standard deviation are considered outliers.
[0052] First, for each indicator, the global mean μ and standard deviation σ of that indicator, obtained from cloud statistics (calculated based on massive historical data), are pre-stored. Then, the 200 sampling points within the current window are traversed, and for each indicator value x at each sampling point, its standardized score z = |x-μ| / σ is calculated. If z > 3, the value is determined to be an outlier. For continuous signal indicators (such as current and voltage), outliers are usually caused by transient sensor interference or communication noise; for Hall pulse indicators, anomalies manifest as pulse loss or jumps (such as the difference in pulse counts between adjacent sampling points exceeding the normal range). After detecting an outlier, its position (row and column) and value are recorded. Additionally, for the specific case of Hall pulse loss, extra detection logic is used: if the current Hall pulse value changes more than a preset threshold compared to the previous valid value (such as a sudden change exceeding 20%), it is also determined to be an outlier.
[0053] Step B4: Determine the interpolation value based on the adjacent data values of the outlier, and replace the outlier with the interpolation value to obtain the replaced real-time sensing data.
[0054] Specifically, first, the row index *i* and column index *j* of the outlier in the time-series data matrix (corresponding to a specific sensor indicator) are located. Then, the nearest valid data point (row index *i_before*, value *v_before*) is searched forward within that column, and the nearest valid data point (row index *i_after*, value *v_after*) is searched backward. For continuous signal indicators (current, voltage, position, temperature, tilt angle, battery voltage), the interpolation value is calculated using the linear interpolation formula: *v_interp* = *v_before* + (*v_after* - *v_before*) × (*i* - *i_before*) / (*i_after* - *i_before*). For Hall pulse indicators, if a pulse loss or jump is detected, a previous valid value preservation strategy is adopted: *v_interp* = *v_before* (i.e., the previous valid value is kept unchanged to prevent abrupt changes in the model input). After calculating the interpolation value, the original outlier is replaced with the interpolation value, and the corresponding elements in the matrix are updated. If an outlier appears at the beginning of the sequence (without a valid forward value), it is filled using a valid backward value; if it appears at the end (without a valid backward value), it is extrapolated using a valid forward value. After all outliers have been processed, the replaced real-time sensing data is obtained.
[0055] By constructing a sliding window, the continuity and integrity of temporal features are ensured, improving the accuracy of anti-pinch judgment; by extracting temporal data from the window, standardized structured input is provided to the model; through anomaly detection, anomalies such as sensor outliers and pulse loss are effectively identified, avoiding model misjudgment; by replacing abnormal data with interpolated values, the integrity of the input is restored, thereby improving the robustness of model inference and the reliability of anti-pinch.
[0056] In this embodiment of the application, the method further includes: Step C1: Obtain the actual clamping label obtained by the vehicle end after the window lifting stroke is completed.
[0057] Specifically, the actual clamping label refers to the binary annotation information (e.g., "1" indicates that clamping actually occurred, and "0" indicates that clamping did not occur) obtained through manual confirmation or auxiliary sensor determination after the window lifting and lowering stroke is fully completed. This label is used for ground truth comparison in subsequent incremental learning to help the model correct output bias.
[0058] After each window lift stroke (i.e., a complete window closing process), the vehicle-side domain controller obtains the actual clamping status of this stroke. This is achieved through several methods: if an anti-pinch reversal is triggered during window closing, the reversal event is recorded and initially marked as suspected clamping; however, to obtain an accurate actual clamping label, other information is also considered for comprehensive judgment: for example, if the user manually closes the window again after the reversal occurs and encounters no resistance, it indicates that the previous trigger was likely false; or additional optical / pressure sensors can be used to confirm the presence of a clamped object. Additionally, the actual clamping label can also be indirectly obtained through the driver's confirmation behavior: if the vehicle stops due to anti-pinch reversal and the driver attempts to close the window again within a short period (e.g., within 5 seconds) without encountering resistance, this event is marked as a false alarm (actual clamping label = 0); conversely, if the driver gets out of the vehicle to clear the obstacle and then successfully closes the window, or if the vehicle's instrument panel receives clamping feedback from the user, it is marked as actual clamping (actual clamping label = 1). The final determined actual clamping label is stored as a Boolean value.
[0059] Step C2 involves using real-time perception data, the clamping risk probability and window control parameters output by the target vehicle-side model, and actual clamping labels as incremental learning samples, and storing them in the vehicle-side circular buffer.
[0060] Specifically, an incremental learning sample refers to a complete data record used for online retraining of the target vehicle-side model. This record contains three components: real-time perception data of the current window closing process (preprocessed multi-dimensional time-series data), the clamping risk probability and window control parameters output by the target vehicle-side model, and the actual clamping label. The circular buffer is a fixed-size circular storage area in the memory of the vehicle-side domain controller, used to cyclically store incremental learning samples in chronological order. When the buffer is full, the new sample will overwrite the oldest sample.
[0061] The real-time sensing data, the clamping risk probability and window control parameters output by the target vehicle model, and the actual clamping label are serialized according to a predefined format (e.g., using Protocol Buffers or MessagePack) to form a fixed-size binary record. This record is then written to a circular buffer: each slot in the buffer can store one sample, and the write pointer moves sequentially, automatically wrapping back to the beginning when it reaches the end of the buffer, overwriting the oldest sample. Simultaneously, a counter is maintained to record the number of valid samples in the current buffer. This buffer is independent of the real-time control flow, and write operations do not affect the real-time performance of window closing.
[0062] Step C3: When the number of accumulated samples in the circular buffer reaches a preset threshold, incremental learning samples are read from the circular buffer, and the model parameters of the target vehicle model are updated based on the incremental learning samples to obtain the updated target vehicle model.
[0063] Specifically, during vehicle idle periods (e.g., 5 minutes after the engine is turned off, with sufficient battery power and no real-time control tasks running), the vehicle-side domain controller checks whether the number of valid samples in the circular buffer has reached a preset threshold (e.g., 100 samples). If it has not reached the threshold, it continues to wait; if it has, it initiates the online learning process. The learning process is as follows: First, all valid samples are sequentially read from the circular buffer (or sampled according to time weights), obtaining the input (real-time sensing data) and output target (actual clamping label, and optional ideal control parameters) for each sample. Then, based on the current target vehicle-side model parameters, incremental training is performed using the elastic weight consolidation method: the loss function consists of two parts: the task loss for the new data (e.g., cross-entropy loss) plus a regularization term λ*Σ(F_i*(θ_i-θ_i_old)^2), where F_i is the diagonal element of the Fisher information matrix, representing the importance of the i-th parameter to the old task, and θ_i_old is the parameter value before the update. The model parameters are iteratively updated through backpropagation and an optimizer (such as Adam) for several rounds (typically 10-50 rounds) until the loss on the new data converges or the preset training time limit is reached (e.g., 30 minutes). After training, the updated model parameters are temporarily stored and used to replace the original target vehicle model, resulting in the "updated target vehicle model". If a decrease in model safety metrics is detected during the learning process (e.g., an increase in false positive rate in known non-clamping scenarios), the process is immediately paused and rolled back to the previous stable version. After training is complete, the used samples can be cleared or retained to avoid relearning.
[0064] It should be noted that Elastic Weight Consolidation (EWC) is an incremental learning method used in this embodiment. It protects parameters that are important to the old task by adding a regularization term to the loss function, thereby avoiding catastrophic forgetting when learning new data.
[0065] During online learning, the termination conditions for learning completion include: the model's clamping recognition accuracy and recall on the local validation set reach the preset localization target threshold, and the loss function no longer decreases significantly (convergence) for multiple consecutive training cycles; the amount of data used for this learning is sufficient and covers the typical operating conditions of the vehicle (such as different temperatures and battery voltage ranges), and the model's performance improvement on new data has become saturated (performance improvement is less than 0.1% for multiple consecutive iterations); and the preset maximum number of training rounds or the longest training time is reached (e.g., learning for 30 minutes only when the vehicle is parked and charging).
[0066] The termination conditions for learning pause (safety or resource interruption) include: if a decrease in model output safety is detected during the learning process (such as a significant increase in the false alarm rate in known non-clamping scenarios, or an abnormal response to standard test sequences), learning will be immediately paused and automatically rolled back to the previous stable version; if the domain controller needs to prioritize the allocation of computing resources to higher-priority real-time tasks (such as collision warning, power control), the learning task will be automatically suspended; if the vehicle exits a learnable state (such as ignition start, door unlocking, or windows being operated by the user), the learning process will be immediately paused; if a large amount of low-quality or abnormal data is continuously collected (such as sensor fault signals), the learning process will be paused and a diagnostic log will be reported.
[0067] By acquiring actual clamping labels, the model is provided with real feedback to correct output deviations. A local training dataset is constructed by storing the perception data, model output, and labels in a circular buffer. When the sample size reaches a threshold, the model parameters are updated based on incremental learning. EWC and other methods are used to adapt to the characteristics of the vehicle and prevent catastrophic forgetting, thereby dynamically tracking vehicle aging and environmental changes to achieve lifelong adaptive anti-pinch protection.
[0068] This embodiment provides a window anti-pinch control system, applied in the cloud. Figure 2 This is a flowchart of the anti-pinch control for vehicle windows according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Receive historical window raising data uploaded by different vehicle terminals, wherein the historical window raising data includes historical perception data and historical anti-pinch decision results corresponding to the historical perception data.
[0069] In this embodiment, historical window raising data refers to complete data records related to window raising and lowering recorded by each vehicle terminal over a past period. It includes two parts: historical sensing data (i.e., multi-dimensional sensor time-series data collected during window raising and lowering, such as motor current, voltage, Hall pulses, window position, ambient temperature, door tilt angle, battery voltage, etc.) and the corresponding historical anti-pinch decision results (i.e., the probability of pinching risk and window control parameters output by the vehicle terminal model at that time, as well as the event label indicating whether pinching actually occurred). The historical sensing data in the historical window raising data may also include real-time speed and acceleration information, i.e., timestamps, current, Hall pulse changes, window position, real-time speed, acceleration, and power supply voltage at each stage of the window closing process.
[0070] The cloud server cluster continuously receives historical window-raising data uploaded from different vehicles via the vehicle-to-everything (V2X) communication link. After each window-closing trip, each vehicle packages its complete perception data (a pre-processed 200×8 time-series matrix or compressed feature sequence), along with the anti-pinch decision results generated by the vehicle-side model (pinch risk probability sequence and control parameters), and the final actual pinch label (confirmed by driver behavior or auxiliary sensors) into a single data record. This record is then anonymized (removing vehicle VIN, timestamps, and other privacy information) and encrypted before being uploaded to the cloud-based big data warehouse. The cloud uses a message queue (such as Kafka) to asynchronously receive this data and performs format verification, deduplication, and storage. The data is stored in buckets according to dimensions such as vehicle type, ambient temperature, and window position, constructing a large-scale training sample library. The input to each sample is historical perception data (multi-dimensional time-series), and the output label is the historical anti-pinch decision result (including classification labels and regression targets), forming a supervision signal for subsequent model training.
[0071] Step S202: Construct a target cloud model based on the mapping relationship between historical perception data and historical anti-pinch decision results.
[0072] In the embodiments of this application, the target cloud model refers to a large-scale deep neural network (such as a deep residual network ResNet or Transformer model) trained in the cloud using massive historical windowing data. It has a large number of parameters and high accuracy, and is used to learn the complex mapping from multi-dimensional sensor time series data to accurate anti-pinch decision (pinch risk probability and optimal control curve).
[0073] The cloud-based model training platform reads historical windowing data from a big data warehouse and divides it into training, validation, and test sets according to a preset ratio. Then, a large deep neural network is built as a candidate architecture for the target cloud model (e.g., ResNet-50 or a Transformer encoder). The input layer accepts multi-dimensional time-series data (200×8) within a fixed time window (e.g., 200ms). The output layer contains two branches: a classification head (outputting the probability of clamping risk, using Sigmoid activation) and a regression head (outputting window control parameters, such as the target PWM duty cycle sequence or speed change factor, using linear activation). During training, historical sensing data is used as input, and the corresponding historical anti-pinch decision results (e.g., actual clamping labels as classification targets, ideal control parameters as regression targets) are used as supervision signals. End-to-end training is performed using a multi-task loss function (classification cross-entropy loss + regression mean squared error loss). The optimizer is Adam, and a cosine annealing strategy is used for the learning rate. Training continues until the validation set performance converges (clamping accuracy, recall, and other metrics no longer significantly improve) or reaches a preset high-precision threshold (e.g., 99.9%). The final model is the target cloud model, which can accurately predict whether there is a clamping risk and how to adjust the motor control parameters based on the input sensor timing.
[0074] When training the target cloud model, the loss function includes classification loss (cross-entropy, used to determine whether gripping occurs) and regression loss (mean squared error, used to control parameter prediction), which are weighted and summed. The training termination conditions are: validation set performance convergence (loss no longer decreases significantly, or accuracy / F1 score tends to stabilize); prevention of overfitting (early stopping is triggered when validation set performance declines); or reaching a preset performance threshold (gripping recognition accuracy and recall ≥99.9%).
[0075] Step S203: Generate the corresponding target vehicle model using the target cloud model, and deploy the target vehicle model to the corresponding vehicle.
[0076] The process of creating and deploying the target vehicle model, such as Figure 3 As shown, the process begins with the aggregation of perception data uploaded from different vehicles. It then proceeds through data preprocessing (cleaning, normalization, and constructing a sliding window), training a large deep neural network as the target cloud model, and evaluating the model. After passing the evaluation, the process enters the knowledge distillation stage, where soft labels are generated using the target cloud model, and an initial student model is constructed. The student model is obtained through joint training (loss function Ltotal=αLhard+βLsoft+γLfeat). After passing the evaluation, the model is quantized, encrypted, and digitally signed, and finally deployed to the vehicle via OTA.
[0077] In this embodiment of the application, generating a corresponding target vehicle model using the target cloud model includes: Step D1: Input the training perception data into the target cloud model so that the target cloud model outputs soft labels after forward inference. The soft labels are used to characterize the predicted anti-pinch decision results obtained by the target cloud model after analyzing the training perception data.
[0078] Specifically, training sensing data refers to unlabeled or labeled raw sensor data samples used for knowledge distillation training. These are typically selected from cloud-based big data warehouses and contain multi-dimensional time-series data (current, voltage, Hall pulse, position, etc., 8 channels) within a fixed time window (200ms), but do not include corresponding anti-pinch decision labels. The target cloud model is the constructed large-scale deep neural network (teacher model) with high-precision recognition capabilities. Forward inference refers to the process of calculating the input data layer by layer from the model's input layer to the output layer, without involving backpropagation. Soft labels refer to the probability distribution or continuous control value output by the target cloud model after performing forward inference on the training sensing data, softened by the temperature parameter T. It is not directly equivalent to a hard classification of whether or not the object is pinched, but rather a smooth output containing information about the similarity between categories (e.g., a pinch probability of 0.85 instead of 0 or 1), used to convey the knowledge of the teacher model.
[0079] The cloud-based knowledge distillation platform selects a batch of training perception data (which can be a large amount of unlabeled data, such as random sampling from the window closing time series uploaded by a large number of vehicles) from a big data warehouse. For each training perception data (a 200×8 tensor), it is input into the target cloud model that has been trained and whose parameters are frozen. The model performs forward inference: the data passes through convolutional layers, residual blocks, fully connected layers, etc., and finally produces the original prediction results (such as the probability of clamping risk and control parameters) at the output layer. In order to generate soft labels, a temperature parameter T (usually T>1, such as T=3 or T=5) is introduced to soften the logits of the output layer: for the classification branch, the logits are divided by T and then passed through the Softmax function to obtain a smoother probability distribution (for example, the original output [0.9,0.1] becomes [0.7,0.3]); for the regression branch, Gaussian noise can also be applied to continuous values or the original values can be directly output as soft labels. The softened output is the soft label, which retains the teacher model's judgment on the subtle differences between categories (such as boundary samples that are close to clamping but not clamped). Soft labels are stored along with the training perception data and serve as one of the supervision signals for subsequent training of the student model.
[0080] Step D2: Obtain the hard labels corresponding to the training perception data, whereby the hard labels are used to characterize the actual anti-pinch decision results corresponding to the training perception data.
[0081] Specifically, hard labels refer to the actual anti-pinch decision results corresponding to the training sensor data. They are typically derived from manual annotation or reliable sensor confirmation and are deterministic labels rather than probability distributions. For classification tasks, hard labels are binary values (e.g., 1 indicates actual pinching, 0 indicates no pinching); for regression tasks, hard labels are the ideal control parameters measured in reality (e.g., the optimal velocity change factor derived through optimization algorithms). Hard labels are objective, true values used to supervise model training.
[0082] Retrieve real-world annotation information paired with and stored in a cloud-based big data warehouse. Acquisition methods include: For classification labels, during the data collection phase, when the vehicle experiences anti-pinch reversal, auxiliary sensors (such as photoelectric sensors or force sensors installed in the window frame) are used to confirm whether there is a foreign object present, or the driver can provide the true label afterward through feedback from the vehicle system (such as the "false alarm" button); for the window closing process that does not trigger reversal, the default true label is 0 (no clamping).
[0083] For regression labels (control parameters), they are obtained through offline optimization: under the same operating conditions, using a high-precision simulation model or real vehicle calibration, the optimal speed curve parameters (such as speed change factor, deceleration start position) that make the window closing process both safe and smooth are searched, and these parameters are used as hard labels. The hard labels, in a defined numerical form (e.g., classification: 1; regression: 0.65), are associated with the corresponding training sensing data and stored in the cloud. During distillation training, the training sensing data and corresponding hard labels are synchronously read through a data index, serving as another supervisory signal for the student model training.
[0084] Step D3: Construct the target vehicle-side model corresponding to the target cloud model based on the training perception data, soft labels, and hard labels.
[0085] By outputting soft labels from the target cloud model, the teacher model's detailed judgment on the similarity between categories is conveyed, providing students with rich supervisory information. By acquiring hard labels, real ground truth values are introduced to ensure that the learning of objective and correct decision boundaries is achieved. Based on the soft and hard labels, the target vehicle-side model is constructed, integrating knowledge transfer and real-world correction, so that the lightweight model maintains high accuracy while significantly reducing the number of parameters, achieving a balance between accuracy and efficiency.
[0086] In this embodiment of the application, the target vehicle-side model corresponding to the target cloud model is constructed based on training perception data, soft labels, and hard labels, including: Step D31: Construct the initial student model based on the network architecture of the target cloud model.
[0087] Specifically, the initial student model refers to a lightweight neural network (such as the lightweight convolutional neural network MobileNet or a fully connected network) built for deployment on the vehicle. Its network architecture is usually based on the target cloud model but is significantly compressed (such as reducing the number of layers and using depthwise separable convolutions), and the number of parameters is generally reduced by more than 80%.
[0088] The cloud-based knowledge distillation platform first acquires the complete network architecture description file (such as a model definition script or ONNX format) of the trained target cloud model. It then analyzes the components crucial for the anti-pinch task within this architecture: the input layer receives 200×8 temporal data; the middle layer contains multiple convolutional blocks or Transformer layers for extracting temporal features; and the output layer is divided into a classification head (pinch risk probability) and a regression head (control parameters). Next, based on the hardware constraints of the vehicle-side domain controller (such as computing power limitations, memory capacity, and inference latency requirement ≤10ms), the platform designs a streamlined student network architecture. Design strategies include reducing network depth (e.g., from 50 layers to 10 layers), using depthwise separable convolutions instead of standard convolutions, reducing the number of channels, and using smaller convolutional kernels. Finally, a neural network with randomly initialized weights is instantiated; this network serves as the initial student model. This model has the same input (200×8 tensors) and output (classification probability + regression parameters) as the teacher model, but with significantly reduced internal computational cost.
[0089] Step D32: Input the training perception data into the initial student model to obtain the prediction label, where the prediction label is used to characterize the prediction anti-pinch decision result obtained by the initial student model after analyzing the training perception data.
[0090] Specifically, the predicted label refers to the output of the initial student model after performing forward inference on the input training perception data, including the clamping risk probability (a value between 0 and 1) and window control parameters (such as speed change factor, deceleration start position, etc.). This output is used to compare with soft labels and hard labels to calculate the loss.
[0091] During knowledge distillation training, the cloud platform simultaneously inputs the same batch of training sensory data (which can be unlabeled or hard-labeled) into the initial student model. The initial student model performs forward inference: the data passes through its streamlined network layers, performing calculations layer by layer, ultimately producing two branches in the output layer: the classification head outputs the clamping risk probability (activated by a sigmoid function), and the regression head outputs control parameters (linear output). This output is the predicted label. For example, for a given input data point, the student model might output a clamping probability of 0.72, a velocity change factor of 0.58, and a deceleration initiation position of 390mm. The dimensionality of the predicted label is completely consistent with the soft label output by the teacher model, facilitating subsequent calculation of the distillation loss.
[0092] Step D33: Calculate the target loss function based on the soft label, predicted label, and hard label.
[0093] In this embodiment of the application, the target loss function is calculated based on soft labels, predicted labels, and hard labels, including: Step d331: Calculate the distillation loss function based on the predicted label and the soft label, and calculate the task loss function based on the predicted label and the hard label.
[0094] Specifically, the distillation loss function measures the difference between the predicted label and the soft label. In this embodiment, KL divergence is used for the classification part, and mean squared error (MSE) is used for the regression part, so that the student model can imitate the output distribution of the teacher model. The task loss function measures the difference between the predicted label and the hard label. Cross-entropy loss is used for the classification task, and mean squared error loss is used for the regression task, so as to ensure that the student model learns the true ground truth.
[0095] After obtaining the predicted labels, soft labels, and hard labels corresponding to the same batch of training sensory data, the cloud-based knowledge distillation platform calculates two types of loss functions. First, the distillation loss function is calculated: for the classification branch, the clamping risk probability in the predicted label (student output) is compared with the clamping probability in the soft label (teacher softened output), using the KL divergence formula. Alternatively, cross-entropy can be used to measure the difference between two probability distributions; for regression branches (such as velocity change factor, deceleration start position, etc.), mean squared error is used. The control parameters predicted by students are compared item by item with the control parameters in the teacher's soft labels. Then, the distillation losses from classification and regression are weighted and summed to obtain the total distillation loss. Next, the task loss function is calculated: for the classification branch, the cross-entropy loss is calculated by comparing the gripping probabilities in the predicted labels with the true gripping labels (0 or 1) in the hard labels. For the regression branch, the mean square error is calculated between the control parameters in the predicted labels and the true optimal control parameters in the hard labels. Similarly, a weighted sum is used to obtain the total task loss. The two types of loss functions are used for weighted combination in subsequent steps.
[0096] Step d332: Calculate the feature alignment loss function between the target cloud model and the initial student model.
[0097] Specifically, the feature alignment loss function between the target cloud model and the initial student model is calculated, including: Step d3321: Select at least one intermediate layer in both the target cloud model and the initial student model.
[0098] Specifically, intermediate layers refer to the hidden layers located between the input and output layers in a deep neural network, such as the output of a convolutional block or the activation value of a fully connected layer in a convolutional neural network. The feature maps of these layers contain feature information at different levels of abstraction extracted from the original input. The target cloud model, i.e., the large teacher model, has a deep network structure; the initial student model is a lightweight neural network with a more streamlined structure. By selecting intermediate layers that correspond in function between the two, the student model can be forced to learn the internal feature representations of the teacher model.
[0099] The cloud platform first analyzes the network structure of the target cloud model (teacher), identifying several hidden layers with representative semantic information. For example, for the ResNet architecture, the outputs of the 2nd, 4th, and 7th residual blocks are typically selected as key intermediate layers. Then, in the initial student model's (student's) network structure, intermediate layers corresponding to its semantic level are selected based on its depth and width. For example, if the student model has 6 convolutional blocks, the outputs of the 2nd, 4th, and 6th blocks are selected to correspond to the 2nd, 4th, and 7th blocks of the teacher model, respectively. The selection principle is to align layers in the teacher and student models that are at similar abstraction levels (such as low-level edge features, mid-level texture features, and high-level semantic features). Each selected intermediate layer will be used to subsequently calculate the feature alignment loss.
[0100] Step d3322: The training perception data is forward propagated to the target cloud model and the initial student model respectively to obtain the first output feature map of the intermediate layer corresponding to the target cloud model and the second output feature map of the intermediate layer corresponding to the initial student model.
[0101] Specifically, the first output feature map refers to the multidimensional tensor (containing three dimensions: height, width, and number of channels) output by the selected intermediate layer when the training perception data is forward propagated through the target cloud model (teacher); the second output feature map refers to the multidimensional tensor output by the corresponding intermediate layer when the same training perception data is forward propagated through the initial student model (student).
[0102] The cloud platform inputs the same batch of training sensory data into both the target cloud model and the initial student model. For the teacher model, the data starts from the input layer and performs convolution, batch normalization, activation, and other operations layer by layer. When calculating the first selected intermediate layer, the forward propagation is paused and the output tensor of that layer is copied, which becomes the first output feature map. The forward propagation then continues to the next selected intermediate layer, and the feature map is extracted again. This process is repeated until all selected teacher intermediate layer feature maps have been extracted. For the student model, independent forward propagation is performed using the exact same data. The forward propagation is also paused at the selected corresponding intermediate layer, and the output tensor is extracted to obtain the second output feature map. All feature maps are stored in their corresponding layer order, and each feature map retains information on batch size, spatial dimensions, and number of channels.
[0103] Step d3323: Adapt and transform the second output feature map according to the first output feature map to obtain the adapted second output feature map.
[0104] Specifically, adaptation refers to adjusting the spatial dimensions and number of channels of the student model's second output feature map to match the first output feature map of the teacher model in order to calculate the differences between the two. Since the student model is typically shallower and has fewer channels than the teacher model, the dimensions of its output feature map may differ. Common adaptation methods include adaptive pooling (uniform spatial dimensions) and 1×1 convolutional projection (uniform number of channels).
[0105] For each pair of corresponding feature maps (Teacher's first output feature map F_t, Student's second output feature map F_s), the spatial dimensions (height H and width W) of the two are first compared. If the H_s and W_s of F_s are inconsistent with the H_t and W_t of F_t, an adaptive average pooling layer is used to pool the spatial dimensions of F_s to H_t×W_t. Then, the number of channels C_s and C_t are compared. If C_s≠C_t, a 1×1 convolutional layer (called the adaptation layer) is added to the student feature map to map the number of channels from C_s to C_t. The weights of this adaptation layer are trainable and are optimized along with the model parameters during the distillation process. After adaptation, F_s is transformed to have the exact same spatial dimensions and number of channels as F_t, resulting in the adapted second output feature map. If the original dimensions and number of channels are already matched (e.g., in a well-designed student network), the pooling and convolution operations can be omitted, and the original feature map can be used directly.
[0106] Step d3324: Calculate the feature alignment loss function based on the first output feature map and the adapted second output feature map.
[0107] Specifically, after the adaptation and conversion are completed, for each group of corresponding feature maps (the teacher's first output feature map) The adapted student's second output feature map ), calculate the mean square error between the two. The specific formula is: , where N is the total number of elements in the feature map (batch size × height × width × channels). If multiple intermediate layers are selected (e.g., K layers), the feature alignment loss for each layer is calculated separately, and then they are weighted and summed to obtain the total feature alignment loss function: ,in The preset weights for the k-th layer are (usually, the weights for each layer are equal, or they are allocated according to the importance of the layer, for example, higher layers have slightly larger weights). This total feature alignment loss will be weighted and summed with the distillation loss and the task loss.
[0108] By selecting intermediate layers, the student model learns the teacher's complete features from the bottom to the top in a hierarchical manner; by extracting the feature maps of the corresponding layers through forward propagation, the internal activation values are obtained for comparison; by adapting transformations (pooling and 1×1 convolution), the dimensionality mismatch caused by the differences in the teacher and student network structures is eliminated; by calculating the feature alignment loss (mean squared error), the student is driven to approximate the teacher's internal feature distribution, thereby significantly improving the distillation efficiency and the generalization performance of the final model.
[0109] Step d333 involves weighted summation of the feature alignment loss function, distillation loss function, and task loss function to obtain the target loss function.
[0110] Specifically, after calculating the task loss function (L_hard), distillation loss function (L_soft), and feature alignment loss function (L_feat) respectively, the cloud-based knowledge distillation platform applies preset weight coefficients... , , The three factors are then weighted and summed. The weighting coefficients are typically determined using a combination of grid search and 5-fold cross-validation. The overall performance of the student model (including anti-pinch accuracy, control parameter prediction error, and model inference time) is evaluated on a cloud-based validation set, and the optimal weight combination is selected. Generally, a higher weighting is set initially. (e.g., 0.6~0.7) to emphasize the guiding role of soft labels, gradually increasing in the medium term. (e.g., 0.3~0.4) to use hard labels to correct deviations, which are then introduced later. (e.g., around 0.1) to enhance feature alignment. The specific formula for weighted summation is: The calculated L_total is the target loss function. This value will serve as the optimization objective for backpropagation, updating the parameters of the initial student model using gradient descent. Simultaneously, the cloud can dynamically adjust the weight coefficients based on metrics such as false positive rate and false negative rate reported from the vehicle terminal to achieve closed-loop optimization.
[0111] The weight coefficients range as follows: α (hard label loss weight) ∈ [0.2, 0.5], β (soft label loss weight) ∈ [0.4, 0.7], γ (feature alignment loss weight) ∈ [0.05, 0.2], and satisfy α + β + γ = 1. The adjustment strategy is as follows: in the initial stage, β is set to a relatively high value (0.6~0.7), focusing on letting soft labels guide the student model to learn the decision boundary; in the mid-stage, α is gradually increased (0.3~0.4), and hard labels are introduced to correct the bias; in the later stage, γ is fine-tuned (around 0.1) to further improve the representation ability of the student model through feature alignment.
[0112] By calculating the distillation loss, the student model is made to imitate the teacher's output distribution and learn fine discrimination ability; by calculating the task loss, the student model is made to fit the real labels to ensure compliance with safety regulations; by calculating the feature alignment loss, the student's intermediate layer is forced to move closer to the teacher, improving generalization representation; by calculating the weighted summation to obtain the target loss function, the three types of supervision signals are optimized in a coordinated manner, compressing the model while retaining the teacher's knowledge to the greatest extent.
[0113] Step D34: Update the parameters of the initial student model using the target loss function to obtain the candidate student model. When the target loss function meets the convergence condition and the model parameters of the candidate student model meet the preset deployment conditions, the candidate student model is used as the target vehicle model.
[0114] Specifically, the candidate student model refers to the intermediate model state obtained after one or more parameter updates to the initial student model. It may not yet meet the final deployment requirements. Convergence conditions include convergence of the comprehensive loss function (i.e., the loss no longer decreases significantly on the validation set or there is no significant improvement for multiple consecutive training cycles) and validation set performance meeting the standards (e.g., anti-pinch accuracy and recall reach the preset safety threshold, usually slightly lower than the teacher model but far exceeding the basic regulatory standards). The preset deployment conditions mean that the model parameters of the candidate student model must meet the vehicle-side hardware limitations: the number of parameters or file size does not exceed the specified capacity of the domain controller's flash memory, and the inference time meets the real-time requirements on the target chip (usually within 10~50 milliseconds). The target vehicle-side model is the lightweight model that can be deployed to the vehicle after it has passed the validation and meets all convergence and deployment conditions.
[0115] The cloud platform uses the target loss function Ltotal to calculate the gradient of each trainable parameter in the initial student model through backpropagation. Then, an optimizer (such as Adam, with a learning rate typically set to 0.001) is used to update the model parameters, resulting in candidate student models. After one or more iterations, the performance of the candidate student models is evaluated on a cloud validation set: whether the comprehensive loss function converges (e.g., a loss decrease of less than 0.001 over 10 consecutive epochs), and whether the anti-pinch accuracy and recall on the validation set reach preset safety thresholds (e.g., accuracy ≥ 99.5%, recall ≥ 99%). Simultaneously, it checks whether the candidate student models meet preset deployment conditions: whether the number of model parameters is ≤ a preset upper limit (e.g., 1.5M), whether the model file size is ≤ the domain controller's flash memory capacity, and whether the actual single inference time on the target chip (e.g., ARM Cortex-M7) is ≤ 10ms (obtainable through simulation or actual testing). If both the convergence and deployment conditions are met, the candidate student model is selected as the final target vehicle-side model. It is then prepared for quantization (e.g., INT8), encryption, and signing before being distributed and deployed to the domain controllers of each vehicle via OTA. If the conditions are not met but the loss has not yet converged, iterative training continues. If the model accuracy meets the target but the deployment conditions are not met (e.g., inference timeout), the network structure needs to be adjusted (e.g., further pruning or quantization), and the model needs to be re-distilled. If the conditions cannot be met simultaneously even after reaching the preset maximum number of training epochs, the candidate model closest to the conditions is selected as the target vehicle-side model.
[0116] It's important to note that the termination conditions for the target cloud model (teacher model) and the target vehicle-side model (student model) are fundamentally different: the teacher model, operating in the cloud, aims for maximum accuracy, and its training terminates when the validation set performance converges or reaches a preset high accuracy threshold (e.g., 99.9%). In contrast, the student model's termination conditions require not only convergence of the comprehensive loss function but also simultaneous satisfaction of deployment constraints (model size, inference speed) and an acceptable safety threshold in accuracy (typically slightly lower than the teacher model but far exceeding regulatory requirements). When performance conflicts with deployment constraints, satisfying the deployment constraints takes precedence as the termination condition.
[0117] The meanings and value ranges of each parameter are shown in the table below:
[0118] By constructing an initial student model, the number of network parameters is significantly reduced, laying the foundation for low-computing-power deployment on the vehicle side. Predicted labels are obtained by inputting training perception data, providing a benchmark for loss calculation. Multi-objective joint optimization is achieved by calculating the target loss function based on soft labels, predicted labels, and hard labels. Candidate models are obtained through parameter updates, and when the convergence and deployment conditions are met, they are used as the target vehicle-side model, ensuring high model accuracy while meeting hardware constraints, thus completing the closed loop from cloud distillation to vehicle-side deployment.
[0119] This embodiment also provides a window anti-pinch control system, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0120] This embodiment provides a vehicle window anti-pinch control system, such as Figure 4 As shown, the system includes: cloud and vehicle terminals; Cloud 100 includes: The receiving module 101 is used to receive historical window raising data uploaded by different vehicle terminals, wherein the historical window raising data includes historical sensing data and historical anti-pinch decision results corresponding to the historical sensing data; Module 102 is used to construct a target cloud model based on the mapping relationship between historical sensing data and historical anti-pinch decision results; Deployment module 103 is used to generate a corresponding target vehicle-side model using the target cloud model and deploy the target vehicle-side model to the vehicle. Vehicle-side 200 includes: The acquisition module 201 is used to acquire real-time sensing data collected by the vehicle end during the window lifting and lowering stroke; Analysis module 202 is used to analyze real-time perception data using the target vehicle-side model to obtain anti-pinch decision results. The anti-pinch decision results include the probability of pinching risk and the window control parameters. The target vehicle-side model is generated and deployed to the vehicle-side after knowledge distillation of the target cloud model trained on the vehicle-side historical window raising data. The execution module 203 is used to perform corresponding anti-pinch control operations using the window control parameters when the probability of clamping risk indicates that there is a risk of foreign object clamping during the window lifting stroke.
[0121] In this embodiment, the cloud 100 further includes: a replacement module, configured to construct a sliding window according to a preset time window length and sliding step size; extract time-series data corresponding to the sliding window from the real-time sensing data; perform anomaly detection on the time-series data based on preset data indicators to obtain anomaly values corresponding to at least one data indicator, wherein the data indicators include at least one of current indicator, voltage indicator, Hall pulse indicator, position indicator, temperature indicator, tilt angle indicator, and battery voltage indicator; determine interpolation values based on adjacent data values of the anomaly values, and replace the anomaly values with the interpolation values to obtain the replaced real-time sensing data.
[0122] In this embodiment, the execution module 203 is specifically used to parse speed adjustment parameters from the window control parameters, wherein the speed adjustment parameters include a speed change factor and a deceleration start position; generate a PWM duty cycle sequence that changes over time based on the speed change factor; and adjust the speed of the window motor according to the PWM duty cycle sequence when the window position reaches the deceleration start position.
[0123] In this embodiment, the cloud 100 further includes: an update module, used to obtain the actual clamping tag obtained by the vehicle end after the window lifting stroke ends; to use real-time sensing data, the clamping risk probability and window control parameters output by the target vehicle end model, and the actual clamping tag as incremental learning samples, and to store them in the circular buffer of the vehicle end; when the number of samples accumulated in the circular buffer reaches a preset threshold, to read the incremental learning samples from the circular buffer, and to update the model parameters of the target vehicle end model based on the incremental learning samples, so as to obtain the updated target vehicle end model.
[0124] In this embodiment, the deployment module 103 is specifically used to input training perception data into the target cloud model so that the target cloud model outputs soft labels after forward inference, wherein the soft labels are used to characterize the predicted anti-pinch decision results obtained by the target cloud model after analyzing the training perception data; to obtain hard labels corresponding to the training perception data, wherein the hard labels are used to characterize the actual anti-pinch decision results corresponding to the training perception data; and to construct the target vehicle-side model corresponding to the target cloud model based on the training perception data, soft labels, and hard labels.
[0125] In this embodiment, the deployment module 103 is specifically used to construct an initial student model based on the network architecture of the target cloud model; input training perception data into the initial student model to obtain prediction labels, wherein the prediction labels are used to characterize the predicted anti-pinch decision results obtained by the initial student model after analyzing the training perception data; calculate the target loss function based on the soft labels, prediction labels, and hard labels; update the parameters of the initial student model using the target loss function to obtain candidate student models; when the target loss function meets the convergence condition and the model parameters of the candidate student models meet the preset deployment conditions, the candidate student models are used as the target vehicle-side models.
[0126] In this embodiment, the deployment module 103 is specifically used to calculate the distillation loss function based on the predicted label and the soft label, and to calculate the task loss function based on the predicted label and the hard label; to calculate the feature alignment loss function between the target cloud model and the initial student model; and to perform a weighted summation of the feature alignment loss function, the distillation loss function, and the task loss function to obtain the target loss function.
[0127] In this embodiment, the deployment module 103 is specifically used to select at least one intermediate layer in the target cloud model and the initial student model respectively; to forward propagate the training perception data to the target cloud model and the initial student model respectively, to obtain a first output feature map of the intermediate layer corresponding to the target cloud model and a second output feature map of the intermediate layer corresponding to the initial student model; to adapt and transform the second output feature map according to the first output feature map, to obtain an adapted second output feature map; and to calculate a feature alignment loss function based on the first output feature map and the adapted second output feature map.
[0128] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system).
[0129] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0130] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0131] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device as shown by a landing page for an app. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, which can be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0132] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0133] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0134] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0135] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for preventing window pinching, applied to the end of a vehicle, characterized in that, The method includes: Acquire real-time sensing data collected by the vehicle during the window raising and lowering stroke; The real-time perception data is analyzed using the target vehicle-side model to obtain anti-pinch decision results. The anti-pinch decision results include the probability of pinching risk and the window control parameters. The target vehicle-side model is generated and deployed to the vehicle by knowledge distillation after training the target cloud model based on the vehicle's historical window raising data. When the probability of clamping risk indicates that there is a risk of foreign object clamping during the window lifting stroke, the corresponding anti-pinch control operation is performed using the window control parameters.
2. The method according to claim 1, characterized in that, After acquiring real-time sensing data collected by the vehicle during the window lifting and lowering stroke, the method further includes: Construct a sliding window according to the preset time window length and sliding step size; Extract the time-series data corresponding to the sliding window from the real-time sensing data; Anomaly detection is performed on the time series data based on preset data indicators to obtain anomaly values corresponding to at least one data indicator. The data indicators include at least one of the following: current indicator, voltage indicator, Hall pulse indicator, position indicator, temperature indicator, tilt angle indicator, and battery voltage indicator. The interpolation value is determined based on the adjacent data values of the outlier, and the outlier is replaced with the interpolation value to obtain the replaced real-time sensing data.
3. The method according to claim 1, characterized in that, The step of performing the corresponding anti-pinch control operation using the window control parameters includes: The speed adjustment parameters are parsed from the window control parameters, wherein the speed adjustment parameters include a speed change factor and a deceleration start position; A time-varying PWM duty cycle sequence is generated based on the speed change factor; When the window reaches the deceleration start position, the speed of the window motor is adjusted according to the PWM duty cycle sequence.
4. The method according to claim 1, characterized in that, The method further includes: Obtain the actual clamping label at the vehicle end after the window lifting / lowering stroke is completed; The real-time perception data, the clamping risk probability and window control parameters output by the target vehicle-side model, and the actual clamping labels are used as incremental learning samples and stored in the circular buffer of the vehicle-side. When the number of accumulated samples in the circular buffer reaches a preset threshold, the incremental learning samples are read from the circular buffer, and the model parameters of the target vehicle model are updated based on the incremental learning samples to obtain the updated target vehicle model.
5. A method for preventing car window pinching, applied in a cloud-based manner, characterized in that, The method includes: Receive historical window-raising data uploaded from different vehicle terminals, wherein the historical window-raising data includes historical sensing data and historical anti-pinch decision results corresponding to the historical sensing data; Based on the mapping relationship between the historical sensing data and the historical anti-pinch decision results, a target cloud model is constructed; The target cloud model is used to generate the corresponding target vehicle model, and the target vehicle model is deployed to the corresponding vehicle.
6. The method according to claim 5, characterized in that, The step of generating the corresponding target vehicle model using the target cloud model includes: The training perception data is input into the target cloud model so that the target cloud model outputs a soft label after forward inference. The soft label is used to characterize the predicted anti-pinch decision result obtained by the target cloud model after analyzing the training perception data. Obtain the hard labels corresponding to the training perception data, wherein the hard labels are used to characterize the actual anti-pinch decision results corresponding to the training perception data; Based on the training perception data, the soft labels, and the hard labels, construct the target vehicle-side model corresponding to the target cloud model.
7. The method according to claim 6, characterized in that, The construction of the target vehicle-side model corresponding to the target cloud model based on the training perception data, the soft labels, and the hard labels includes: Construct an initial student model based on the network architecture of the target cloud model; The training perception data is input into the initial student model to obtain a prediction label, wherein the prediction label is used to characterize the predicted anti-pinch decision result obtained by the initial student model after analyzing the training perception data; The target loss function is calculated based on the soft label, the predicted label, and the hard label; The parameters of the initial student model are updated using the target loss function to obtain a candidate student model. When the target loss function meets the convergence condition and the model parameters of the candidate student model meet the preset deployment conditions, the candidate student model is used as the target vehicle model.
8. The method according to claim 7, characterized in that, The calculation of the target loss function based on the soft label, the predicted label, and the hard label includes: Calculate the distillation loss function based on the predicted label and the soft label, and calculate the task loss function based on the predicted label and the hard label; Calculate the feature alignment loss function between the target cloud model and the initial student model; The target loss function is obtained by weighted summing of the feature alignment loss function, the distillation loss function, and the task loss function.
9. The method according to claim 8, characterized in that, The calculation of the feature alignment loss function between the target cloud model and the initial student model includes: At least one intermediate layer is selected in both the target cloud model and the initial student model; The training perception data is forward-propagated to the target cloud model and the initial student model respectively to obtain the first output feature map of the intermediate layer corresponding to the target cloud model and the second output feature map of the intermediate layer corresponding to the initial student model. The second output feature map is adapted and transformed according to the first output feature map to obtain the adapted second output feature map. The feature alignment loss function is calculated based on the first output feature map and the adapted second output feature map.
10. A vehicle window anti-pinch control system, characterized in that, The system includes: cloud-based and vehicle-based components; The cloud is used to receive historical window-raising data uploaded by different vehicle terminals. The historical window-raising data includes historical perception data and historical anti-pinch decision results corresponding to the historical perception data. Based on the mapping relationship between the historical perception data and the historical anti-pinch decision results, a target cloud model is constructed. The target cloud model is used to generate a corresponding target vehicle terminal model, and the target vehicle terminal model is deployed to the vehicle terminal. The vehicle-side device is used to acquire real-time sensing data collected during the window lifting stroke. The target vehicle-side model is used to analyze the real-time sensing data to obtain an anti-pinch decision result. The anti-pinch decision result includes the probability of pinching risk and window control parameters. The target vehicle-side model is generated and deployed to the vehicle-side device after knowledge distillation of a target cloud model trained on the vehicle-side based on historical window lifting data. When the probability of pinching risk indicates that there is a risk of foreign object pinching during the window lifting stroke, the corresponding anti-pinch control operation is executed using the window control parameters.