A control method for hot plug of a touch key
By defining the sampling value, reference value, signal value, and noise threshold, the touch button control method solves the problems of hot-swapping and accidental touch of touch buttons, achieving stability and flexibility, and is suitable for home appliances and industrial control equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINAN JIANGSU ELECTRIC APPLIANCE CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technology cannot support hot-swapping of touch buttons, which can cause buttons to freeze due to accidental touches. Furthermore, the automatic sensitivity update cannot be controlled, resulting in a poor tactile experience.
By defining sampling values, reference values, signal values, touch thresholds, and noise thresholds, hot-swappable control of touch buttons is achieved, the reference values are dynamically updated to adapt to environmental changes, and numerical filtering is used to eliminate accidental touches and noise interference.
It supports hot-swapping of touch buttons to prevent jamming and accidental touches, improves recognition accuracy, adapts to the touch haptic needs of different scenarios, and is suitable for home appliances and industrial control equipment.
Smart Images

Figure CN122309422A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of touch button status determination technology, specifically a control method for hot-swapping touch buttons. Background Technology
[0002] Touch control refers to the control method of operating a display device by touching the screen. A touchscreen is a positioning device that allows users to directly input coordinate information to the host computer using their hands. Like a mouse and keyboard, it is an input device. Touchscreens have many advantages, such as durability, fast response speed, space saving, and ease of communication. Using this technology, users can operate the host computer simply by lightly touching the icons or text on the display screen, making human-computer interaction more direct. Touch buttons are widely used in home appliances, industrial equipment, and other scenarios. The true state of a button is often determined by changes in the touch signal of the button.
[0003] The defects and shortcomings of existing technologies are as follows: hot-swapping is not supported, and the buttons need to be installed before powering on. If power is not available, the buttons can be installed and uninstalled and used normally. Accidental touches can occur due to residual substances (water droplets, oil stains, etc.), which may cause the buttons to be mistakenly pressed and remain in the pressed state, resulting in the buttons becoming stuck. Some technologies that can automatically update sensitivity cannot control the update time, resulting in poor tactile feedback after pressing. Summary of the Invention
[0004] The purpose of this invention is to provide a control method for hot-swapping touch buttons, in order to solve the problems in the prior art that do not support hot-swapping, require installation before powering on to use the buttons, and require installation and uninstallation of the buttons to use normally when power is off; accidental touches, such as residual substances (water droplets, oil stains, etc.) causing buttons to be mistakenly touched and continuously recognized as pressed, resulting in the buttons being stuck; and some technologies that can automatically update sensitivity cannot control the update time, resulting in poor tactile feedback after pressing.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a control method for hot-swapping touch buttons, defining sampling values, reference values, signal values, touch thresholds, and noise thresholds; Sampled value: The real-time value obtained by the touch button through chip sampling; Reference value: The environmental sampling value when the button is not pressed, used as a reference for touch recognition; Signal value: The difference between the current sampled value and the reference value, used to quantify the magnitude of the change in the sampled value; Touch threshold: The critical value for determining whether a button is pressed or released. When the signal value is greater than the threshold, it is determined that the button is pressed; when the signal value is less than the threshold, it is determined that the button is released. Noise threshold: The critical value for noise determination and baseline value update. When the signal value is less than this threshold, it is determined to be environmental noise, triggering a baseline value update. When the signal value is greater than this threshold, the baseline value remains unchanged. Its control method includes the following steps: S1. Real-time acquisition of the sampled values of the touch buttons and calculation of the current signal value; S2. Determine if the signal value is greater than the touch threshold: If the signal value is not greater than the touch threshold, maintain the current baseline value and keep the timing and sampling value records empty; If the signal value is greater than the touch threshold, start timing and record the current sample value at a fixed interval of 100ms; S3. Continuously determine the relationship between the timing period and the set press time: If the timing time exceeds the set press time, perform numerical filtering on all recorded sample values, that is, remove the maximum and minimum values and calculate the average value, update the average value as the new reference value, and then clear the timing data and recorded sample values. If the timing time is less than the set press time and the signal value becomes less than the touch threshold, immediately clear the timing data and the recorded sample value, and terminate the current sampling and timing process.
[0006] Preferably, the numerical filtering is truncated mean filtering, which optimizes the noise reduction of the sampled data by removing outliers.
[0007] Preferably, by adjusting the specific value of the set press time, the update frequency of the reference value can be flexibly adjusted to adapt to the touch haptic needs of different usage scenarios.
[0008] Preferably, the touch buttons are applied to home appliances or industrial control equipment. The home appliances include refrigerators, air conditioners, washing machines, etc., and the industrial control equipment includes control panels, operating terminals, etc.
[0009] Preferably, the home appliance is a refrigerator, and the control method enables the live installation, removal, and accidental touch control of the refrigerator's touch buttons.
[0010] Preferably, the dynamic update of the reference value is used to adapt to environmental changes in hot-swappable scenarios and to eliminate interference from residual substances such as water droplets and oil stains on touch recognition, thereby avoiding button jamming or continuous accidental touches.
[0011] Compared with the prior art, the beneficial effects of the present invention are: 1. Supports hot-swapping and adapts to flexible installation scenarios: By dynamically updating the baseline value, it can adapt to environmental changes after the button is installed / uninstalled while powered on, eliminating the need to install before powering on. This solves the pain point that existing technologies cannot support hot-swapping and improves the convenience of device maintenance and use.
[0012] 2. Prevents accidental touches and jamming, with strong stability: The baseline value can be updated through noise judgment and effective long press filtering, which can eliminate the interference of residual substances such as water droplets and oil stains on touch recognition, avoid the jamming problem caused by the continuous misjudgment of the button as "pressed", and greatly improve the recognition accuracy of touch buttons.
[0013] 3. Adjustable touch sensitivity to adapt to multiple scenarios: By adjusting the specific value of "set press time", the update frequency of the baseline value can be flexibly controlled, which can meet the needs of fast response and adapt to the scenarios that require stable triggering, thus solving the defect of some automatic sensitivity update technology that cannot control the update time.
[0014] 4. Wide range of applications and high practicality: It is suitable for household appliances such as refrigerators, air conditioners, and washing machines, as well as industrial control equipment such as control panels and operating terminals. Its advantages are particularly prominent in scenarios such as refrigerators where residual substances are easily encountered in daily life and where buttons may need to be maintained or replaced. Attached Figure Description
[0015] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0016] 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 a part of the embodiments of the present invention, not all of them. 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. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention.
[0017] Please see Figure 1 In this embodiment of the invention, a control method for hot-swapping touch buttons is provided, defining sampling value, reference value, signal value, touch threshold and noise threshold; Sampled value: The real-time value obtained by the touch button through chip sampling; Reference value: The environmental sampling value when the button is not pressed, used as a reference for touch recognition; Signal value: The difference between the current sampled value and the reference value, used to quantify the magnitude of the change in the sampled value; Touch threshold: The critical value for determining whether a button is pressed or released. When the signal value is greater than the threshold, it is determined that the button is pressed; when the signal value is less than the threshold, it is determined that the button is released. Noise threshold: The critical value for noise determination and baseline value update. When the signal value is less than this threshold, it is determined to be environmental noise, triggering a baseline value update. When the signal value is greater than this threshold, the baseline value remains unchanged. Its control method includes the following steps: S1. Real-time acquisition of the sampled values of the touch buttons and calculation of the current signal value; S2. Determine if the signal value is greater than the touch threshold: If the signal value is not greater than the touch threshold, maintain the current baseline value and keep the timing and sampling value records empty; If the signal value is greater than the touch threshold, start timing and record the current sample value at a fixed interval of 100ms; S3. Continuously determine the relationship between the timing period and the set press time: If the timing time exceeds the set press time, perform numerical filtering on all recorded sample values, that is, remove the maximum and minimum values and calculate the average value, update the average value as the new reference value, and then clear the timing data and recorded sample values. If the timing time is less than the set press time and the signal value becomes less than the touch threshold, immediately clear the timing data and the recorded sample value, and terminate the current sampling and timing process.
[0018] The numerical filtering is a truncated mean filtering, which optimizes the noise reduction of the sampled data by removing outliers.
[0019] By adjusting the specific value of the press time setting, the update frequency of the baseline value can be flexibly adjusted to adapt to the touch haptic needs of different usage scenarios.
[0020] The touch buttons are used in home appliances or industrial control equipment. The home appliances include refrigerators, air conditioners, washing machines, etc., and the industrial control equipment includes control panels, operating terminals, etc.
[0021] The home appliance is a refrigerator, and the control method enables the live installation, removal, and accidental touch control of the refrigerator's touch buttons.
[0022] The dynamic update of the benchmark value is used to adapt to environmental changes in hot-swappable scenarios and to eliminate interference from residual substances such as water droplets and oil stains on touch recognition, thereby preventing buttons from getting stuck or continuously being accidentally touched.
[0023] When the signal value is greater than the touch threshold (button pressed), timing begins, and the current sample value is recorded every 100ms. When the timing time is greater than the set press time, the maximum and minimum values of the recorded sample values are removed, and the average value is taken (numerical filtering), and the value is updated to the reference value. If the timing time is less than the set press time, the signal value is less than the touch threshold (button released), the timing is reset to 0, and the recorded sample value is reset to 0.
[0024] Touch recognition is dynamically updated by manually updating the baseline value, thus supporting hot-swapping of touch buttons and preventing button jamming and accidental triggering caused by residual material. Furthermore, the interval between baseline value updates can be determined by modifying the press time setting.
[0025] The following is an example of a refrigerator product: Touch control logic (such as) Figure 1 ): When the signal value is greater than the touch threshold, timing begins, and the current sample value is recorded every 100ms. Determine if the timing time is greater than the set press time. If it is, remove the maximum and minimum values from the recorded sample values, take the average value (truncated mean filtering), and update the value to the reference value. If the timing period is less than the set press time and the signal value is less than the touch threshold, the timing is reset to 0 and the recorded value is cleared.
[0026] The working principle of this invention is as follows: real-time acquisition of sampled values and calculation of signal values, continuous judgment of the relationship between signal values and touch thresholds: when the threshold is not reached, the baseline value remains unchanged and timing and sampling recording are not started; when the threshold is reached, it is determined that the button is pressed, timing is started and a sampled value is recorded every 100ms.
[0027] Continuously compare the timing time with the set press time: If the timing exceeds the set value, it means that the button was effectively pressed and held. Perform truncation mean filtering on the recorded sample values (remove the maximum and minimum values and take the average) to filter out abnormal data. Update the filtering result to a new reference value to adapt to the current environment or the state after hot-plugging. If the timing does not reach the set value and the signal value falls below the touch threshold, it is determined to be a mis-touch or invalid short press operation. Clear the timing and sampling records to avoid incorrectly updating the reference value.
[0028] When the signal value is less than the noise threshold, it is determined to be environmental noise, triggering a baseline value update to ensure that the baseline value always matches the current environment and avoids recognition deviations caused by noise or residual substances.
[0029] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A control method for hot-swapping touch buttons, characterized in that, Define the sampled value, reference value, signal value, touch threshold, and noise threshold; Sampled value: The real-time value obtained by the touch button through chip sampling; Reference value: The environmental sampling value when the button is not pressed, used as a reference for touch recognition; Signal value: The difference between the current sampled value and the reference value, used to quantify the magnitude of the change in the sampled value; Touch threshold: The critical value for determining whether a button is pressed or released. When the signal value is greater than the threshold, it is determined that the button is pressed; when the signal value is less than the threshold, it is determined that the button is released. Noise threshold: The critical value for noise determination and baseline value update. When the signal value is less than this threshold, it is determined to be environmental noise, triggering a baseline value update. When the signal value is greater than this threshold, the baseline value remains unchanged. Its control method includes the following steps: S1. Real-time acquisition of the sampled values of the touch buttons and calculation of the current signal value; S2. Determine if the signal value is greater than the touch threshold: If the signal value is not greater than the touch threshold, maintain the current baseline value and keep the timing and sampling value records empty; If the signal value is greater than the touch threshold, start timing and record the current sample value at a fixed interval of 100ms; S3. Continuously determine the relationship between the timing period and the set press time: If the timing time exceeds the set press time, perform numerical filtering on all recorded sample values, that is, remove the maximum and minimum values and calculate the average value, update the average value as the new reference value, and then clear the timing data and recorded sample values. If the timing time is less than the set press time and the signal value becomes less than the touch threshold, immediately clear the timing data and the recorded sample value, and terminate the current sampling and timing process.
2. The control method for hot-swapping touch buttons according to claim 1, characterized in that, The numerical filtering is a truncated mean filtering, which optimizes the noise reduction of the sampled data by removing outliers.
3. The control method for hot-swapping touch buttons according to claim 1, characterized in that, By adjusting the specific value of the press time setting, the update frequency of the baseline value can be flexibly adjusted to adapt to the touch haptic needs of different usage scenarios.
4. A control method for hot-swapping touch buttons according to any one of claims 1-3, characterized in that, The touch buttons are used in home appliances or industrial control equipment. The home appliances include refrigerators, air conditioners, and washing machines, and the industrial control equipment includes control panels and operating terminals.
5. The control method for hot-swapping touch buttons according to claim 4, characterized in that, The home appliance is a refrigerator, and the control method enables the live installation, removal, and accidental touch control of the refrigerator's touch buttons.
6. The control method for hot-swapping touch buttons according to claim 1, characterized in that, The dynamic update of the benchmark value is used to adapt to environmental changes in hot-swappable scenarios and to eliminate interference from water droplets and oil residues on touch recognition, thereby preventing buttons from getting stuck or continuously being accidentally touched.