Switch control method, electronic equipment and storage medium

By combining historical data and environmental compensation with a tri-modal sensor, the acquisition frequency and sensing threshold are dynamically adjusted, solving the problem of unresponsive operation of smart door lock systems in low-temperature and humid environments, and achieving high-accuracy operation intention recognition and response.

CN121849079APending Publication Date: 2026-04-14GREAT WALL MOTOR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-09
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In smart door lock systems, single sensing mechanisms are easily interfered with in low temperature, humid conditions or when wearing gloves, resulting in insensitive unlocking and locking operations, false triggering or delayed response, and difficulty in distinguishing between valid operations and unintentional contact.

Method used

By employing a three-modal sensor combined with historical control data, the target sensing threshold is dynamically determined. The current sensing value is calculated through the fusion of multi-dimensional sensor data, and the acquisition frequency is dynamically adjusted by combining environmental drift compensation and vibration detection to improve the accuracy of operation intention recognition.

Benefits of technology

It improves the recognition accuracy of switching operations in complex environments, suppresses false triggering, ensures timely and reliable response, reduces power consumption, and extends equipment life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121849079A_ABST
    Figure CN121849079A_ABST
Patent Text Reader

Abstract

The invention provides a switch control method, electronic equipment and a storage medium, the method is applied to the field of vehicles, and the method comprises the following steps: obtaining historical control data, current capacitance data, current pressure data and current vibration data of a to-be-controlled switch; determining a target sensing threshold according to the historical control data, and calculating a current sensing value of the to-be-controlled switch according to at least two of the current capacitance data, the current pressure data and the current vibration data; in response to the fact that the current induction value is larger than the target induction threshold value, the to-be-controlled switch is controlled to be switched from the current state to the next state, and the method can solve the problem that the unlocking and locking operation is prone to being insensitive when the switch is in a complex environment; and the operation intention identification accuracy of the switch in complex scenes such as low temperature, wet hand, glove wearing or rapid light touch can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicles, and more specifically, to methods for controlling switches, electronic devices, and storage media in the field of vehicles. Background Technology

[0002] In smart door lock systems, the electronic switch module plays a crucial role in sensing user intent and triggering lock / unlock commands. This module must accurately recognize valid interactive behaviors such as gripping, rotating, and pressing, and maintain high reliability and response speed under complex usage scenarios.

[0003] Most switches in related technologies employ a single sensing mechanism, primarily capacitive proximity sensing or pressure / strain tactile sensing technology. Capacitive sensing determines the user's grip state by detecting changes in the electric field caused by human proximity, while pressure sensing relies on electrical signals generated by mechanical deformation to identify pressing or force application actions.

[0004] However, in real-world applications, the switch may become unresponsive in low temperatures, humid conditions, or when wearing gloves. Furthermore, the system may fail to respond promptly when the user touches it lightly or grips it quickly, resulting in delays or no response at all. Additionally, unintentional contact (such as friction from clothing) can easily lead to false triggering or disable effective operation.

[0005] In summary, in scenarios such as low temperature environments, wet hands, wearing gloves, or rapid light touches, a single sensor is easily interfered with, causing valid operating signals to be misjudged as noise or completely missed. In addition, the relevant technologies have not established an effective unintentional contact filtering model, making it difficult to distinguish invalid interactions such as clothing friction and accidental touches, resulting in false triggers or response delays, which seriously affect user experience and system security. Summary of the Invention

[0006] This application provides a control method, electronic device, and storage medium for a switch. This method can solve the problem that the switch is prone to insensitivity in unlocking and locking operations in complex environments, and effectively improve the accuracy of switch operation intention recognition in complex scenarios such as low temperature, wet hands, wearing gloves, or rapid light touch.

[0007] Firstly, a method for controlling a switch is provided, the method comprising:

[0008] Acquire historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled; The target sensing threshold is determined based on the historical control data, and the current sensing value of the switch to be controlled is calculated based on at least two of the current capacitance data, the current pressure data, and the current vibration data. In response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is switched from the current state to the next state.

[0009] The above technical solution acquires historical control data and current multi-dimensional sensor data of the switch to be controlled. Based on historical successful operation modes, the target sensing threshold is dynamically determined, and the current sensing value is calculated by fusing current multi-source signals. A state switch is triggered only when this sensing value exceeds the adaptive threshold. Since the target sensing threshold originates from historical data of actual effective operation, it can be adjusted as devices age or the environment changes, avoiding sensitivity mismatch caused by a fixed threshold. Simultaneously, multi-dimensional sensor fusion improves the ability to distinguish between real operation and interference. Therefore, while ensuring timely user operation response, it effectively suppresses false triggering and improves the reliability and robustness of switch control.

[0010] In conjunction with the first aspect, in some possible implementations, calculating the current sensing value of the switch to be controlled based on at least two of the current capacitance data, the current pressure data, and the current vibration data includes: The current capacitance change rate is calculated based on the current capacitance data, the current pressure change rate is calculated based on the current pressure data, and the current vibration change rate is calculated based on the current vibration data. If any one of the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration is greater than the corresponding preset rate of change, the target dataset is determined based on the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration. The current sensing value of the switch to be controlled is calculated based on the target dataset.

[0011] The above technical solution avoids interference from static or low-activity signals in the judgment, and improves the sensitivity to valid operation events while retaining the redundancy of multi-source information, thereby enhancing the ability of switch control to distinguish between real triggers and random noise.

[0012] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the target dataset based on the current capacitance change rate, the current pressure change rate, and the current vibration change rate includes: Identify whether the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are all greater than the corresponding preset rate of change; If the current capacitance change rate, the current pressure change rate, and the current vibration change rate are all greater than the corresponding preset change rate, then the target dataset is constructed based on the current capacitance data, the current pressure data, and the current vibration data; otherwise, it is determined whether any two of the current capacitance change rate, the current pressure change rate, and the current vibration change rate are greater than the corresponding preset change rate. If any two of the stated rates of change are greater than the corresponding preset rates of change, then a target dataset is constructed based on the data corresponding to the two stated rates of change.

[0013] By employing the above technical solutions, based on the dynamic characteristics of the data, the contribution of high-rate-of-change data is amplified and the noise impact of low-activity dimensions is suppressed, so that the current sensing value more accurately reflects the essence of the dominant event.

[0014] In combination with the first aspect and the above implementation methods, in some possible implementation methods, calculating the current sensing value of the switch to be controlled based on the target dataset includes: The weight of each target data point is determined based on the rate of change corresponding to each target data point in the target dataset. The current sensing value is obtained by weighting the data based on the weight of each target data.

[0015] The above technical solution dynamically allocates weights based on the rate of change of each target data, and performs weighted calculations on the target data to obtain the current sensing value. This makes the sensing dimensions with more significant changes contribute more to the fusion result, thereby improving the sensitivity of the current sensing value to effective operational events and its ability to suppress weakly correlated or noisy signals.

[0016] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the target sensing threshold based on the historical control data includes: Based on the historical control data, historical capacitance data, historical pressure data, and historical vibration data are filtered according to preset optimization conditions; The target sensing value sequence is obtained by fusing the historical capacitance data, the historical pressure data, and the historical vibration data, and the target sensing threshold is determined from the target sensing value sequence.

[0017] The above technical solution involves filtering historical capacitance, pressure, and vibration data that meet preset optimization conditions, fusing them to generate a target sensing value sequence, and determining the target sensing threshold accordingly. This ensures that the threshold is based on high-quality, representative historical operation samples, avoiding interference from abnormal or invalid data and improving the accuracy of the threshold.

[0018] Combining the first aspect and the above implementation methods, in some possible implementation methods, obtaining the current capacitance data and current pressure data of the switch to be controlled includes: Acquire the initial capacitance data, initial pressure data, current temperature, and current humidity of the switch to be controlled; In response to the initial capacitance data and the initial pressure data satisfying preset correction conditions, the capacitance reference drift and the pressure zero point drift are determined based on the current temperature and the current humidity. The initial capacitance data is corrected based on the capacitance reference drift to obtain the current capacitance data, and the initial pressure data is corrected based on the pressure zero-point drift to obtain the current pressure data.

[0019] The above technical solutions effectively suppress sensor drift caused by temperature and humidity changes, and improve the accuracy and environmental adaptability of capacitance and pressure measurements.

[0020] In combination with the first aspect and the above implementation, in some possible implementations, before determining the capacitance reference drift and pressure zero-point drift based on the current temperature and the current humidity in response to the initial capacitance data and the initial pressure data satisfying a preset correction condition, the method further includes: Identify whether the current temperature is within a preset temperature range, or whether the current humidity is greater than a preset humidity threshold; If the current temperature is not within the preset temperature range, or if the current humidity is greater than the preset humidity threshold, then the initial capacitance data and the initial pressure data are determined to meet the preset correction conditions.

[0021] The above technical solution determines whether to perform environmental drift correction by first checking if the current temperature is within a preset temperature range or if the current humidity exceeds a preset humidity threshold. If either condition is met, the compensation process is triggered. This mechanism ensures that compensation calculations are only enabled in scenarios where temperature and humidity may significantly affect sensor accuracy, thus improving the accuracy of capacitance and pressure data while avoiding unnecessary compensation costs, balancing reliability and efficiency.

[0022] In combination with the first aspect and the above implementation methods, in some possible implementation methods, before acquiring the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, the following steps are also included: In response to the vibration detection unit within the switch to be controlled detecting a vibration signal, the data acquisition frequency of the switch to be controlled is increased from the current acquisition frequency to a preset acquisition frequency.

[0023] With the above technical solution, before acquiring historical and current multi-dimensional sensing data, the built-in vibration detection unit first monitors whether a vibration event has occurred; once a vibration signal is detected, the data acquisition frequency is dynamically increased to a preset higher value, which ensures that enough details are captured while avoiding the power consumption and resource waste caused by continuous high-frequency sampling.

[0024] Secondly, a control device for a switch is provided, the device comprising: The acquisition module is used to acquire historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled. The determination module is used to determine the target sensing threshold based on the historical control data, and to calculate the current sensing value of the switch to be controlled based on at least two of the current capacitance data, the current pressure data, and the current vibration data. The control module is used to control the switch to be controlled to switch from the current state to the next state in response to the current sensing value being greater than the target sensing threshold.

[0025] In conjunction with the first aspect, in some possible implementations, the determining module includes: The first calculation unit is used to calculate the current capacitance change rate based on the current capacitance data, the current pressure change rate based on the current pressure data, and the current vibration change rate based on the current vibration data. The second calculation unit is used to determine the target dataset based on the current capacitance change rate, the current pressure change rate, and the current vibration change rate when any one of the current capacitance change rate, the current pressure change rate, and the current vibration change rate is greater than the corresponding preset change rate; The third calculation unit is used to calculate the current sensing value of the switch to be controlled based on the target dataset.

[0026] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the second computing unit includes: The identification unit is used to identify whether the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are all greater than the corresponding preset rate of change; The first determining unit is configured to construct the target dataset based on the current capacitance data, the current pressure data, and the current vibration data when the current capacitance change rate, the current pressure change rate, and the current vibration change rate are all greater than the corresponding preset change rate; otherwise, it determines whether any two of the current capacitance change rate, the current pressure change rate, and the current vibration change rate are greater than the corresponding preset change rate. The second determining unit is used to construct a target dataset based on the data corresponding to any two rates of change when there are any two rates of change greater than the corresponding preset rates of change.

[0027] In combination with the first aspect and the above implementation methods, in some possible implementations, the third computing unit includes: Determine sub-units to determine the weight of each target data based on the rate of change corresponding to each target data in the target dataset; The calculation subunit is used to perform a weighted calculation based on the weight of each target data to obtain the current sensing value.

[0028] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the determining module includes: The filtering unit is used to filter historical capacitance data, historical pressure data, and historical vibration data based on the historical control data and preset optimization conditions. The fusion unit is used to fuse the historical capacitance data, the historical pressure data, and the historical vibration data to obtain a target sensing value sequence, and to determine the target sensing threshold from the target sensing value sequence.

[0029] In combination with the first aspect and the above implementation methods, in some possible implementation methods, the acquisition module includes: The acquisition unit is used to acquire the initial capacitance data, initial pressure data, current temperature, and current humidity of the switch to be controlled; The third determining unit is used to determine the capacitance reference drift and the pressure zero point drift based on the current temperature and the current humidity in response to the initial capacitance data and the initial pressure data satisfying a preset correction condition. The correction unit is used to correct the initial capacitance data according to the capacitance reference drift to obtain the current capacitance data, and to correct the initial pressure data according to the pressure zero-point drift to obtain the current pressure data.

[0030] In conjunction with the first aspect and the above implementation, in some possible implementations, before determining the capacitance reference drift and pressure zero-point drift based on the current temperature and the current humidity in response to the initial capacitance data and the initial pressure data satisfying preset correction conditions, the third determining unit further includes: The identification subunit is used to identify whether the current temperature is within a preset temperature range, or whether the current humidity is greater than a preset humidity threshold. The determination subunit is used to determine whether the initial capacitance data and the initial pressure data meet the preset correction conditions when the current temperature is not within the preset temperature range or the current humidity is greater than the preset humidity threshold.

[0031] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, before acquiring the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, the acquisition module further includes: The boosting unit is used to boost the data acquisition frequency of the switch to be controlled from the current acquisition frequency to a preset acquisition frequency in response to the vibration detection unit in the switch to be controlled detecting a vibration signal.

[0032] Thirdly, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the switch control method described above.

[0033] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0034] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0035] Figure 1 This is a flowchart of a switch control method provided according to an embodiment of this application.

[0036] Figure 2 This is a block diagram of a control device for a switch provided according to an embodiment of this application.

[0037] Figure 3 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0038] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0039] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0040] The following describes the control method, electronic device, and storage medium of the switch according to embodiments of this application with reference to the accompanying drawings. Addressing the problems mentioned in the background art above, namely: (1) the sensitivity of a single sensor decreases significantly under environmental changes, making it unable to stably acquire effective signals; (2) the static response threshold cannot adapt to dynamic variables such as temperature, humidity, and individual user differences, leading to signals being misjudged as noise; (3) the lack of a multimodal signal fusion mechanism makes it impossible to distinguish between genuine operational intent and interference signals; and (4) the fixed sampling period, without adaptive adjustment based on operational dynamic characteristics, results in a large response delay. This application provides a control method for a switch. In this method, historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled are acquired. A target sensing threshold is determined based on the historical control data. The current sensing value of the switch to be controlled is calculated based on at least two of the current capacitance data, current pressure data, and current vibration data. In response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is controlled to switch from the current state to the next state. This solves the problem that the switch is prone to insensitivity in unlocking and locking operations in complex environments, and effectively improves the accuracy of the switch in recognizing the operation intention in complex scenarios such as low temperature, wet hands, wearing gloves, or rapid light touch.

[0041] Figure 1 This is a schematic flowchart of a switch control method provided in an embodiment of this application.

[0042] For example, such as Figure 1 As shown, the method includes the following steps: In step S101, the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled are acquired.

[0043] Among them, historical control data is a complete event log recorded during past operations. Each log includes historical capacitance data, historical pressure data, historical vibration data, and the corresponding switch control result, which are collected synchronously with a switch control action. Current capacitance data is the capacitance value collected by the relevant capacitance sensor during the current sampling period. Current pressure data is the pressure value collected by the relevant pressure sensor during the current sampling period. Current vibration data is the vibration value collected by the relevant vibration sensor during the current sampling period.

[0044] Specifically, the switch control method of this application embodiment can employ a switch integrating three-modal sensors. The switch embeds a high-precision capacitive sensing array for detecting hand proximity and grip area, a piezoresistive pressure sensor for detecting grip force and duration, and a micro-MEMS micro-motion vibration sensor for capturing hand tremors and initial rotational movements. The three sensors are sampled synchronously and output raw data streams to determine the switch state intended by the user through data collected by multiple sensors, thereby improving control reliability and effectively avoiding malfunctions or missed controls caused by misjudgment of a single signal.

[0045] The three-modal sensors in this embodiment can be arranged collaboratively inside the switch housing in a ring shape to ensure full-circumferential sensing coverage. Furthermore, this embodiment can employ a filtering engine to preprocess the collected current capacitance, pressure, and vibration data to reduce data noise. The filtering engine uses a hardware-accelerated FIR filter and state machine logic, controlling the response latency to within 100ms, meeting the real-time requirements of human-machine interaction. In practical implementation, in the case of a vehicle application, the switch to be controlled can be a vehicle door handle. The door handle can integrate the three-modal sensors as a trigger switch for KESSY (Keyless Entry Start and Stop System). When a user's hand approaches the door handle, the capacitive sensing module detects the approach motion, the pressure sensing module identifies the grip strength and duration, and the micro-vibration detection module distinguishes subtle operation patterns such as tapping, sliding, or rotating. Among them, the capacitive sensing module can be arranged inside the door handle to detect the proximity and gripping area of ​​the hand; the pressure sensing module can be embedded in the handle pressing contact point to detect the gripping force; and the micro-vibration detection module can be installed on the handle base to capture the vibration characteristics of hand tremors and pressing actions.

[0046] Optionally, in one embodiment of this application, obtaining the current capacitance data and current pressure data of the switch to be controlled includes: obtaining the initial capacitance data, initial pressure data, current temperature, and current humidity of the switch to be controlled; in response to the initial capacitance data and initial pressure data satisfying preset correction conditions, determining the capacitance reference drift and pressure zero-point drift based on the current temperature and current humidity; correcting the initial capacitance data based on the capacitance reference drift to obtain the current capacitance data, and correcting the initial pressure data based on the pressure zero-point drift to obtain the current pressure data.

[0047] Furthermore, in one embodiment of this application, before determining the capacitance reference drift and pressure zero-point drift based on the current temperature and current humidity in response to the initial capacitance data and initial pressure data satisfying a preset correction condition, the method further includes: identifying whether the current temperature is within a preset temperature range, or whether the current humidity is greater than a preset humidity threshold; if the current temperature is within the preset temperature range, or the current humidity is greater than the preset humidity threshold, then it is determined that the initial capacitance data and initial pressure data satisfy the preset correction condition.

[0048] Among them, the current temperature and current humidity are the temperature value collected by the temperature sensor and the humidity value collected by the humidity sensor at the current sampling time; the capacitance reference drift is the offset of the capacitance sensor reference value caused by the change in temperature or humidity, which is used to correct the initial capacitance data to eliminate environmental interference; the pressure zero point drift is the offset of the pressure sensor zero point caused by the change in temperature and humidity, which is used to correct the initial pressure data; the preset correction condition is that the current temperature is not in the preset temperature range or the current humidity is greater than the preset humidity threshold. The preset temperature range and preset humidity threshold can be preset by the user, obtained through a limited number of experiments, or obtained through a limited number of computer simulations, and are not specifically limited here.

[0049] It is understandable that in low-temperature or humid environments, capacitive and pressure sensors may experience zero-point drift, leading to inaccurate data and affecting switch sensing. This embodiment first acquires the initial capacitance and pressure data of the switch to be controlled, and simultaneously acquires the current temperature and humidity. Subsequently, the system determines whether the current environment triggers compensation logic: if the current temperature is not within a preset temperature range (e.g., high or low temperature environment), or if the current humidity exceeds a preset humidity threshold, then the preset correction conditions are met. Under these conditions, the system calculates the corresponding capacitance reference drift and pressure zero-point drift based on a pre-calibrated temperature-humidity-drift mapping relationship. Finally, by subtracting or adding the capacitance reference drift to the initial capacitance data, the current capacitance data after environmental compensation is obtained; similarly, pressure zero-point drift correction is applied to the initial pressure data to obtain accurate current pressure data.

[0050] In practical implementation, this embodiment can be equipped with an environmental adaptive calibration module on the vehicle. Through temperature and humidity sensors, environmental parameters are collected in real time, and the capacitance reference value and pressure sensitivity coefficient are dynamically corrected to ensure signal stability within the range of -20℃ to 50℃ and 10%–95%RH. The environmental calibration module can be located next to the main control chip, reading temperature and humidity data in real time via the I²C bus. Calibration parameters are written to the sensor driver layer to achieve hardware-level compensation. For example, a preset temperature range of 5℃ to 35℃ and a preset humidity threshold of 70%RH are used. If the current temperature is -10℃, exceeding the preset range, the correction conditions are met. Based on the temperature-humidity-drift mapping table, the capacitance reference drift is calculated to be 8pF, and the pressure zero-point drift is calculated to be 0.2N. The initial data is corrected using the drift amounts: current capacitance data = initial capacitance data - 8pF; current pressure data = initial pressure data - 0.2N.

[0051] Therefore, by introducing a dynamic drift compensation mechanism based on temperature and humidity sensing, the embodiments of this application effectively eliminate the interference of environmental factors on capacitance and pressure sensing signals, significantly improve the accuracy and stability of sensing data, avoid misjudgments caused by sensor drift, and thus improve the reliability of switch status assessment.

[0052] Optionally, in one embodiment of this application, before acquiring the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, the method further includes: in response to the vibration detection unit in the switch to be controlled detecting a vibration signal, increasing the data acquisition frequency of the switch to be controlled from the current acquisition frequency to a preset acquisition frequency.

[0053] The vibration detection unit is a sensor module, such as an accelerometer or MEMS vibration sensor, integrated inside the switch to be controlled, used to collect vibration signals; the preset acquisition frequency is a higher sampling frequency enabled under specific triggering conditions, used to acquire denser and more detailed state data to support accurate diagnosis or rapid response; the data acquisition frequency refers to the number of times the switch-related physical quantities (capacitance, pressure, vibration, etc.) are sampled and recorded per unit time.

[0054] Specifically, in this embodiment, the vibration detection unit built into the switch to be controlled continuously monitors environmental or structural vibrations. When the unit detects a valid vibration signal (e.g., the vibration amplitude exceeds a preset threshold), the system immediately triggers a frequency boosting mechanism: dynamically adjusting the originally low current sampling frequency to a higher preset sampling frequency. In this high-frequency mode, the system accelerates the acquisition of current capacitance data, current pressure data, and current vibration data. For example, when the initial movement signal of the micro-motion sensor is detected, the sampling frequency is immediately increased from 50Hz to 200Hz, shortening the response delay to <120ms and significantly improving operational smoothness.

[0055] In actual operation, when the vehicle is parked, the door lock switch defaults to collecting sensor data at a low frequency of 50Hz. When the vibration sensing module detects a vibration signal at the handle (such as a micro-motion caused by the user's touch), it immediately increases the collection frequency to 200Hz and enters a high-sensitivity monitoring mode, simultaneously collecting initial capacitance data, initial pressure data, and the current temperature and humidity from the temperature and humidity sensors.

[0056] Therefore, the embodiments of this application can rapidly increase the sampling rate when abnormal vibration is detected, providing data support for subsequent switch status identification, while avoiding unnecessary energy consumption and data redundancy caused by continuous high-frequency sampling, extending the service life of battery-powered smart switches, and reducing communication and storage burdens.

[0057] In step S102, the target sensing threshold is determined based on historical control data, and the current sensing value of the switch to be controlled is calculated based on at least two of the current capacitance data, current pressure data, and current vibration data.

[0058] Among them, the target sensing threshold is a dynamic benchmark for determining whether the current switch state is within the normal operating range.

[0059] Specifically, the system first analyzes historical control data to establish or update the target sensing threshold. Then, the system acquires current capacitance, pressure, and vibration data from sensors, and selects at least two dimensions—for example, capacitance and pressure, pressure and vibration, capacitance and vibration, or all three—for fusion calculation to obtain the current sensing value. This value represents the comprehensive response intensity of the current multi-physics field signal and is used to compare with the dynamically generated target sensing threshold, providing a basis for determining whether to execute a switching action.

[0060] Furthermore, in one embodiment of this application, determining the target sensing threshold based on historical control data includes: filtering historical capacitance data, historical pressure data, and historical vibration data with preset optimization conditions based on historical control data; fusing historical capacitance data, historical pressure data, and historical vibration data to obtain a target sensing value sequence; and determining the target sensing threshold from the target sensing value sequence.

[0061] The preset optimization conditions are control data of successful switch control within the target time period, such as control data of successful switch control within 24 hours. The target sensing value sequence is a series of scalar values ​​obtained by fusing and calculating (such as weighted average, principal component analysis, or model inference) historical capacitance, pressure, and vibration data that meet the preset optimization conditions. Each value represents the comprehensive sensing intensity of a valid historical operation. The historical capacitance data, historical pressure data, and historical vibration data are the capacitance values, pressure values, and vibration parameters synchronously collected in each switch control event. The target sensing threshold is the critical value determined from the target sensing value sequence through statistical methods (such as taking the mean ± standard deviation, quantiles, or cluster centers).

[0062] Specifically, in this embodiment, high-quality historical samples are selected from all historical control data based on preset optimization conditions, such as control data of successful switch control within 24 hours. Subsequently, historical capacitance data, historical pressure data, and historical vibration data in each selected sample are fused from multiple sources, for example, using linear weighting, nonlinear mapping, or machine learning models, to generate a corresponding target sensing value. All such values ​​are arranged in chronological or event order to form a target sensing value sequence. Next, a target sensing threshold is selected from the target sensing value sequence as a judgment criterion, thereby learning the sensing characteristics of normal operation based on reliable historical behavior, thus significantly improving the threshold discrimination accuracy.

[0063] For example, for each operation, the normalized capacitance (0-1), pressure (0-1), and vibration (0-1) are weighted. , , Integration, in which, , and It can be preset to obtain 100 sensing values. And calculate the sequence. The The percentile is used to obtain the target sensing threshold. Alternatively, it can be pre-set; for example, 100 valid samples of successful unlocking and de-locking within a target time period can be selected from the vehicle's historical control data, including historical capacitance, pressure, and vibration data under different environments and operating habits. Each sample is then weighted and fused: Si = 0.4Ci + 0.3Pi + 0.3Vi (Ci is the normalized capacitance value, Pi is the normalized pressure value, and Vi is the normalized vibration value), generating a target sensing value sequence. The 70th percentile of this sequence is then used to determine the target sensing threshold.

[0064] Furthermore, in one embodiment of this application, calculating the current sensing value of the switch to be controlled based on at least two of the current capacitance data, current pressure data, and current vibration data includes: calculating the current capacitance change rate based on the current capacitance data, calculating the current pressure change rate based on the current pressure data, and calculating the current vibration change rate based on the current vibration data; if any one of the current capacitance change rate, current pressure change rate, and current vibration change rate is greater than a corresponding preset change rate, determining a target dataset based on the current capacitance change rate, current pressure change rate, and current vibration change rate; and calculating the current sensing value of the switch to be controlled based on the target dataset.

[0065] Among them, the current capacitance / pressure / vibration change rate refers to the rate of change of the current capacitance data, current pressure data, and current vibration data per unit time (such as first-order difference, derivative, or sliding window slope), which is used to quantify the dynamic activity level of the switch state, such as contact area, pressing acceleration, or impact intensity; the preset change rate is the threshold set for the three types of signals: capacitance, pressure, and vibration.

[0066] Specifically, this embodiment calculates the current capacitance change rate, current pressure change rate, and current vibration change rate based on continuously collected current capacitance, pressure, and vibration data. The system then compares these three rates with their respective preset rates. If any rate exceeds its preset threshold, a sensing mode is triggered, and a target dataset is determined from the current capacitance change rate, current pressure change rate, and current vibration change rate. For example, if only the vibration and capacitance change rates exceed the limits, but the pressure change is stable, the vibration and capacitance change rates can be combined to determine if the operation is valid; if multiple rates exceed the limits simultaneously, all are included. Finally, based on these target data, a preset fusion algorithm is used to calculate the current sensing value.

[0067] Therefore, the embodiments of this application only activate multi-dimensional fusion calculation when abnormal dynamics are detected, which ensures a highly sensitive response to sudden events while avoiding unnecessary computational overhead in stable conditions. Furthermore, constructing a target dataset to participate in the final sensing value calculation enhances the robustness of the criterion and avoids situations where a single sensor can easily generate noise that triggers false judgments.

[0068] Optionally, in one embodiment of this application, determining and calculating at least two target data based on the current capacitance change rate, the current pressure change rate, and the current vibration change rate includes: identifying whether the current capacitance change rate, the current pressure change rate, and the current vibration change rate are all greater than corresponding preset change rates; if the current capacitance change rate, the current pressure change rate, and the current vibration change rate are all greater than corresponding preset change rates, then a target dataset is constructed based on the current capacitance data, the current pressure data, and the current vibration data; otherwise, determining whether any two of the current capacitance change rate, the current pressure change rate, and the current vibration change rate are greater than corresponding preset change rates; if any two change rates are greater than corresponding preset change rates, then a target dataset is constructed based on the data corresponding to any two change rates.

[0069] Specifically, in this embodiment, the system first calculates the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration, and compares them with their respective preset rates of change.

[0070] If all three rates of change are greater than their respective preset rates of change, the system considers the original sensing data to have high discriminative value and thus constructs a target dataset based on the current capacitance data, current pressure data, and current vibration data.

[0071] If the above conditions are not met, the system further checks whether there are exactly two rates of change greater than their preset rates of change (e.g., only capacitance and pressure change, vibration is stable). In this case, the system constructs the target dataset based on the data corresponding to the two rates of change. In addition, if only a single rate of change exceeds its corresponding preset rate of change, the system takes the one of the remaining two that is closest to its corresponding preset rate of change and constructs the target dataset based on the data corresponding to the two.

[0072] Finally, the current sensing value is calculated based on the constructed target dataset using fusion algorithms (such as weighted average, feature concatenation, etc.).

[0073] Optionally, in one embodiment of this application, calculating the current sensing value of the switch to be controlled based on the target dataset includes: determining the weight of each target data based on the rate of change corresponding to each target data in the target dataset; and performing a weighted calculation based on the weight of each target data to obtain the current sensing value.

[0074] Specifically, in this embodiment, after determining the target dataset, the weight of each target data in the target dataset can be determined. For example, after constructing the target dataset based on the current capacitance data, current pressure data, and current vibration data, the sum of the three target data is calculated, and the ratio of each target data to the sum is calculated to obtain the weight of each target data. If any two of the change rates are greater than the corresponding preset change rate, the sum of the two target data is calculated, and the ratio of each target data to the sum is calculated to obtain the weight of each target data. That is, the larger the change rate, the more active the signal in that dimension is, and the more likely it is to reflect the real operation event, and its weight is increased accordingly. Finally, the system multiplies each target data with its weight and sums them to obtain the final current sensing value. Thus, in complex operation scenarios, the response intensity of different physical quantities is often inconsistent (e.g., pressure changes are small but capacitance changes are significant when lightly touched, while all three are strong when heavily struck). Fixed weight fusion is easily affected by weak signal interference or ignores key features. This embodiment can automatically amplify the contribution of high dynamic signals and suppress the noise influence of low-activity dimensions, making the current sensing value more realistically reflect the essence of the dominant event. This not only improves the sensitivity to identify effective operations, but also enhances robustness against anomalies from a single sensor.

[0075] In step S103, in response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is switched from the current state to the next state.

[0076] Among them, the current state and the next state refer to the state of the switch to be controlled before the control command is executed (such as "open") and the target state after the switch is switched (such as "closed").

[0077] Specifically, in this embodiment, the current sensed value is compared with a dynamically generated target sensed threshold in real time. If the current sensed value is greater than the target sensed threshold, the operation is determined to be a valid and reliable control intention. Subsequently, the controller sends an execution command to the drive unit of the switch to be controlled, driving it to switch from the current state (e.g., open) to the next state (e.g., closed).

[0078] For example, based on the vehicle's current capacitance data, current pressure data, and current vibration data, the current capacitance change rate (15pF / s), pressure change rate (0.5N / s), and vibration change rate (0.8g / s) are calculated. All three are greater than the preset change rates (capacitance 8pF / s, pressure 0.3N / s, vibration 0.5g / s). The current capacitance, pressure, and vibration data are used as target data, and weights are assigned according to the change rate: capacitance weight 0.5, pressure weight 0.3, and vibration weight 0.2. The weighted calculation yields the current sensing value = 0.75. Since the current sensing value (0.75) > the target sensing threshold (0.62), it is determined to be a valid unlocking intention, and the door lock is controlled to switch from the locked state to the unlocked state.

[0079] Therefore, the embodiment of this application will only trigger the state switch when the current sensing value is greater than the target sensing threshold, which effectively suppresses common false triggering sources such as electrostatic interference, mechanical vibration, and temperature and humidity drift, and greatly reduces the risk of false control while ensuring sensitive response of user operation.

[0080] As another embodiment of this application, the switching of the switch state can be realized by establishing a preset operation intention recognition model.

[0081] Before switching between on / off states by establishing a preset operation intent recognition model, it is necessary to train the preset operation intent recognition model. The training method of the preset operation intent recognition model is introduced below.

[0082] Data Collection and Labeling: In real-world usage scenarios, a large amount of user operation data was collected, covering the raw data of the "grip-pressure-micro-motion" triplet under different ages, hand shapes, operating habits, and environmental conditions (temperature, humidity). Each data segment was manually labeled to distinguish between "effective operations" (such as the intention to open a door) and "ineffective interference" (such as unintentional touches, vibration noise), forming a labeled training sample set.

[0083] Feature engineering: Extract time-domain and statistical features from raw sensor data, including: grip area change slope, pressure rise time constant, micro-motion signal spectral energy, time alignment delay of three-mode signals, pressure-capacitance correlation coefficient, etc., to construct a high-dimensional feature vector.

[0084] Model selection and architecture design: A lightweight temporal classification model (such as a 1D-CNN + LSTM hybrid architecture or an XGBoost ensemble tree model) is adopted. The input is a trimodal feature sequence within a sliding window (200ms), and the output is a binary classification result (valid / invalid operation). The model structure needs to balance real-time inference efficiency and generalization ability.

[0085] Training and Optimization: Supervised training was performed using a labeled dataset. The loss function employed was weighted cross-entropy (balancing positive and negative samples). Dropout and early stopping mechanisms were introduced to prevent overfitting. Hyperparameters (window size, learning rate, number of layers) were adjusted using grid search and Bayesian optimization, and cross-validation was used to evaluate the model's stability across different user groups.

[0086] Adaptive online learning: After deployment, the model continuously receives new user operation data, manually reviews low-confidence samples (predicted probability <0.7) and feeds them back to the training pool, triggering incremental training every 24 hours, so that the threshold model dynamically evolves with individual usage habits and achieves personalized adaptation.

[0087] Boundary condition verification: Extreme environment (-20℃, 95%RH) and abnormal operation (wearing gloves, wet hands, rapid shaking) samples are forcibly added during training to ensure that the model remains robust across the entire operating range and avoid threshold drift caused by sudden environmental changes.

[0088] After obtaining the preset operation intention recognition model, the capacitance data, pressure data, and vibration data are acquired and input into the preset operation intention recognition model to obtain the intention result. For example, if the intention result is a valid operation, the switch to be controlled is switched from the current state to the next state.

[0089] In practical use, the embodiments of this application embed a high-precision capacitive sensing array (for detecting hand proximity and grip area), a piezoresistive pressure sensor (for detecting grip force and duration), and a micro MEMS micro-motion vibration sensor (for capturing hand tremors and initial rotational movements) inside the switch. The three are sampled synchronously and the raw data stream is output.

[0090] A user operation feature library is trained based on a machine learning model to establish an operation intent recognition model with a joint response threshold of "grip-pressure-micro-motion" triplets. In this model, the threshold is adaptively adjusted according to the environment and usage habits to avoid missed detections or false triggers caused by fixed thresholds. For example, a sliding window and pattern matching algorithm are used to identify combined features with a duration ≥80ms, pressure change rate >0.3N / s, capacitance increment >15pF, and accompanied by micro-motion signals, which are judged as valid operations; single-modal abrupt changes or interference signals with a duration <30ms are excluded. Preferably, the model runs on a low-power DSP coprocessor, uses a lightweight LSTM network, and the model parameters are updated locally every 24 hours without cloud support.

[0091] The preset operation intent recognition model in this application embodiment supports the learning of users' personalized operation habits and can adapt to user groups of different ages, hand shapes and usage habits. The switch module is compatible with the existing door lock mechanical structure, does not require modification of the door body, and can be deployed as an independent upgrade kit.

[0092] Therefore, by integrating a three-modal sensor of capacitive sensing, pressure sensing and micro-vibration detection, combined with environmental temperature and humidity adaptive calibration and dynamic response threshold algorithm, multi-dimensional operation signals are fused in real time and interference noise is filtered out, so as to achieve highly robust recognition of the user's true intention, thereby solving the problem of occasional insensitivity of the switch in unlocking and locking under complex environments.

[0093] In summary, this application's embodiments introduce micro-vibration sensing into switch operation recognition, breaking through the limitations of traditional single capacitance / pressure sensing and significantly improving the recognition capability for subtle operations such as light touches and rapid grips. Furthermore, it implements an environmental adaptive calibration and dynamic threshold linkage mechanism, maintaining high accuracy even under extreme temperature and humidity conditions. Additionally, the three-modal signal fusion algorithm effectively suppresses unintentional interference (such as clothing friction, raindrop impact, and vibration transmission), reducing the false trigger rate. Finally, the response acceleration mechanism enables the system to achieve millisecond-level response in scenarios where the system opens with a light grip, enhancing the user experience.

[0094] To enable those skilled in the art to further understand the switch control method of the embodiments of this application, the following description is provided in conjunction with specific embodiments.

[0095] In vehicle applications, the switch to be controlled can be a vehicle door handle. The door handle integrates three modal sensors: a capacitive sensing array, a piezoresistive pressure sensor, and a MEMS vibration sensor, along with a temperature and humidity sensor for environmental calibration. In practical use, the response sensitivity is dynamically adjusted by combining the in-vehicle temperature and humidity sensor with real-time calibration thresholds. For example, in low-temperature environments, the capacitive sensitivity is increased to compensate for reduced static electricity from the human body; in high-humidity environments, false triggering by water droplets is suppressed. The corresponding three modal signals are determined based on the historical control data of the vehicle door handle. When the three-modal signal meets the preset timing logic (e.g., approaching, holding for ≥0.5 seconds, and then gently rotating 20°), the system determines it as a legitimate unlocking intention, triggers the electronic door lock actuator to unlock, and simultaneously wakes up the BCM (Body Control Module) to prepare for authorization. If atypical operations are detected (e.g., clothing friction, raindrop impact, or child hitting), the system uses a dynamic noise filtering algorithm to suppress false triggers, ensuring that unlocking and closing actions are only performed under the user's true intention, completely solving the problem of occasional malfunction of traditional electromagnetic induction door handles in rain, snow, low temperature, or strong electromagnetic interference environments. According to the control method of the switch in the embodiment of this application, the historical control data, current capacitance data, current pressure data and current vibration data of the switch to be controlled are obtained, a target sensing threshold is determined based on the historical control data, and the current sensing value of the switch to be controlled is calculated based on at least two of the current capacitance data, current pressure data and current vibration data. In response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is controlled to switch from the current state to the next state. This method can solve the problem that the unlocking and locking operation of the switch is prone to insensitivity in complex environments, and effectively improve the accuracy of the switch in recognizing the operation intention in complex scenarios such as low temperature, wet hands, wearing gloves or rapid light touch.

[0096] Figure 2 This is a schematic diagram of the structure of a vehicle control device provided in an embodiment of this application.

[0097] For example, such as Figure 2 As shown, the device may include: an acquisition module 100, a determination module 200, and a control module 300.

[0098] The acquisition module 100 is used to acquire historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled.

[0099] The determination module 200 is used to determine the target sensing threshold based on historical control data, and to calculate the current sensing value of the switch to be controlled based on at least two of the current capacitance data, current pressure data, and current vibration data.

[0100] The control module 300 is used to control the switch to be controlled to switch from the current state to the next state in response to the current sensing value being greater than the target sensing threshold.

[0101] Optionally, in some embodiments, the determining module 200 includes: a first computing unit, a second computing unit, and a third computing unit.

[0102] The first calculation unit is used to calculate the current capacitance change rate based on the current capacitance data, the current pressure change rate based on the current pressure data, and the current vibration change rate based on the current vibration data.

[0103] The second calculation unit is used to determine the target dataset based on the current rate of change of capacitance, current rate of change of pressure, and current rate of change of vibration when any one of these rates of change is greater than the corresponding preset rate of change.

[0104] The third calculation unit is used to calculate the current sensing value of the switch to be controlled based on the target dataset.

[0105] Optionally, in some embodiments, the second calculation unit includes: an identification unit, a first determination unit, and a second determination unit.

[0106] The identification unit is used to identify whether the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are all greater than the corresponding preset rate of change.

[0107] The first determining unit is used to construct a target dataset based on the current capacitance data, current pressure data, and current vibration data when the current capacitance change rate, current pressure change rate, and current vibration change rate are all greater than the corresponding preset change rates; otherwise, it determines whether any two of the current capacitance change rate, current pressure change rate, and current vibration change rate are greater than the corresponding preset change rate. The second determining unit is used to construct a target dataset based on the data corresponding to any two rates of change when there are any two rates of change greater than the corresponding preset rates of change.

[0108] Optionally, in some embodiments, the third calculation unit includes: a determination subunit and a calculation subunit.

[0109] Among them, the determined sub-unit is used to determine the weight of each target data based on the rate of change corresponding to each target data in the target dataset.

[0110] The calculation subunit is used to perform weighted calculations based on the weight of each target data to obtain the current sensing value.

[0111] Optionally, in some embodiments, the determining module 200 includes a filtering unit and a fusion unit.

[0112] The filtering unit is used to filter historical capacitance data, historical pressure data, and historical vibration data based on historical control data and preset optimization conditions.

[0113] The fusion unit is used to fuse historical capacitance data, historical pressure data, and historical vibration data to obtain a target sensing value sequence, and to determine the target sensing threshold from the target sensing value sequence.

[0114] Optionally, in some embodiments, the acquisition module 100 includes: an acquisition unit, a third determination unit, and a correction unit.

[0115] The acquisition unit is used to acquire the initial capacitance data, initial pressure data, current temperature, and current humidity of the switch to be controlled.

[0116] The third determining unit is used to determine the capacitance reference drift and pressure zero-point drift based on the current temperature and current humidity in response to the initial capacitance data and initial pressure data meeting preset correction conditions.

[0117] The correction unit is used to correct the initial capacitance data based on the capacitance reference drift to obtain the current capacitance data, and to correct the initial pressure data based on the pressure zero-point drift to obtain the current pressure data.

[0118] Optionally, in some embodiments, before determining the capacitance reference drift and pressure zero-point drift based on the current temperature and current humidity in response to the initial capacitance data and initial pressure data satisfying preset correction conditions, the third determining unit further includes: an identification subunit and a determination subunit.

[0119] The identification subunit is used to identify whether the current temperature is within a preset temperature range, or whether the current humidity is greater than a preset humidity threshold.

[0120] The determination subunit is used to determine whether the initial capacitance data and initial pressure data meet the preset correction conditions when the current temperature is not within the preset temperature range or the current humidity is greater than the preset humidity threshold.

[0121] Optionally, in some embodiments, before acquiring the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, the acquisition module 100 further includes a lifting unit.

[0122] The lifting unit is used to increase the data acquisition frequency of the switch to be controlled from the current acquisition frequency to a preset acquisition frequency in response to the vibration detection unit inside the switch being controlled detecting a vibration signal.

[0123] It should be noted that the foregoing explanation of the control embodiment of the switch also applies to the control device of the switch in this embodiment, and will not be repeated here.

[0124] In summary, the control device for the switch according to the embodiments of this application acquires historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, determines a target sensing threshold based on the historical control data, and calculates the current sensing value of the switch to be controlled based on at least two of the current capacitance data, current pressure data, and current vibration data. In response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is controlled to switch from the current state to the next state. This method can solve the problem that the switch is prone to insensitivity in unlocking and locking operations in complex environments, and effectively improves the accuracy of switch operation intention recognition in complex scenarios such as low temperature, wet hands, wearing gloves, or rapid light touch.

[0125] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: The memory 301, the processor 302, and the computer program stored on the memory 301 and capable of running on the processor 302.

[0126] When the processor 302 executes the program, it implements the switch control method provided in the above embodiments.

[0127] Furthermore, electronic devices also include: Communication interface 303 is used for communication between memory 301 and processor 302.

[0128] The memory 301 is used to store computer programs that can run on the processor 302.

[0129] The memory 301 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0130] If the memory 301, processor 302, and communication interface 303 are implemented independently, then the communication interface 303, memory 301, and processor 302 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 3 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0131] Optionally, in a specific implementation, if the memory 301, processor 302, and communication interface 303 are integrated on a single chip, then the memory 301, processor 302, and communication interface 303 can communicate with each other through an internal interface.

[0132] Processor 302 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0133] Furthermore, embodiments of this application also protect an apparatus that may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to perform the switch control method provided in embodiments of this application.

[0134] Furthermore, the device also includes a communication interface for communication between the memory and the processor.

[0135] This embodiment can divide the device into functional modules based on the above method example. For example, each module can correspond to a separate function, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0136] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0137] It should be understood that the device provided in this embodiment is used to execute the above-described control method for a switch, and therefore can achieve the same effect as the above-described implementation method.

[0138] When using integrated units, the device may include a processing module and a storage module. When applied to an automobile, the processing module can be used to control and manage the vehicle's movements. The storage module can be used to support the vehicle in executing program code, etc.

[0139] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be memory 301.

[0140] In addition, the device provided in the embodiments of this application may specifically be a chip, component or module. The chip may include a connected processor and a memory. The memory is used to store instructions. When the processor calls and executes the instructions, the chip can execute the switch control method provided in the above embodiments.

[0141] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a switch control method provided in the above embodiment.

[0142] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a switch control method provided in the above embodiment.

[0143] In this embodiment, the device, computer-readable storage medium, computer program product, or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0144] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0145] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0146] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for controlling a switch, characterized in that, Includes the following steps: Acquire historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled; The target sensing threshold is determined based on the historical control data, and the current sensing value of the switch to be controlled is calculated based on at least two of the current capacitance data, the current pressure data, and the current vibration data. In response to the current sensing value being greater than the target sensing threshold, the switch to be controlled is switched from the current state to the next state.

2. The method according to claim 1, characterized in that, The step of calculating the current sensing value of the switch to be controlled based on at least two of the current capacitance data, the current pressure data, and the current vibration data includes: The current capacitance change rate is calculated based on the current capacitance data, the current pressure change rate is calculated based on the current pressure data, and the current vibration change rate is calculated based on the current vibration data. If any one of the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration is greater than the corresponding preset rate of change, the target dataset is determined based on the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration. The current sensing value of the switch to be controlled is calculated based on the target dataset.

3. The method according to claim 2, characterized in that, The step of determining the target dataset based on the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration includes: Identify whether the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are all greater than the corresponding preset rate of change; If the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are all greater than the corresponding preset rate of change, then the target dataset is constructed based on the current capacitance data, the current pressure data, and the current vibration data; otherwise, it is determined whether any two of the current rate of change of capacitance, the current rate of change of pressure, and the current rate of change of vibration are greater than the corresponding preset rate of change. If any two of the stated rates of change are greater than the corresponding preset rates of change, then a target dataset is constructed based on the data corresponding to the two stated rates of change.

4. The method according to claim 3, characterized in that, The step of calculating the current sensing value of the switch to be controlled based on the target dataset includes: The weight of each target data point is determined based on the rate of change corresponding to each target data point in the target dataset. The current sensing value is obtained by weighting the data based on the weight of each target data.

5. The method according to claim 1, characterized in that, Determining the target sensing threshold based on the historical control data includes: Based on the historical control data, historical capacitance data, historical pressure data, and historical vibration data are filtered according to preset optimization conditions; The target sensing value sequence is obtained by fusing the historical capacitance data, the historical pressure data, and the historical vibration data, and the target sensing threshold is determined from the target sensing value sequence.

6. The method according to claim 1, characterized in that, Obtain the current capacitance and pressure data of the switch to be controlled, including: Acquire the initial capacitance data, initial pressure data, current temperature, and current humidity of the switch to be controlled; In response to the initial capacitance data and the initial pressure data satisfying preset correction conditions, the capacitance reference drift and the pressure zero point drift are determined based on the current temperature and the current humidity. The initial capacitance data is corrected based on the capacitance reference drift to obtain the current capacitance data, and the initial pressure data is corrected based on the pressure zero-point drift to obtain the current pressure data.

7. The method according to claim 6, characterized in that, Before determining the capacitance reference drift and pressure zero-point drift based on the current temperature and the current humidity in response to the initial capacitance data and the initial pressure data satisfying preset correction conditions, the method further includes: Identify whether the current temperature is within a preset temperature range, or whether the current humidity is greater than a preset humidity threshold; If the current temperature is within an unpreset temperature range, or if the current humidity is greater than the preset humidity threshold, then the initial capacitance data and the initial pressure data are determined to meet the preset correction conditions.

8. The method according to claim 1, characterized in that, Before acquiring the historical control data, current capacitance data, current pressure data, and current vibration data of the switch to be controlled, the following steps are also included: In response to the vibration detection unit within the switch to be controlled detecting a vibration signal, the data acquisition frequency of the switch to be controlled is increased from the current acquisition frequency to a preset acquisition frequency.

9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the control method for a switch as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the control method of the switch as described in any one of claims 1-8.