Touch control method based on infrared control and related device
By establishing a dynamic reference benchmark for each detection optical path of the infrared touch device, and updating and calculating the relative change characteristic value in real time, the problem of touch misjudgment and position calculation errors caused by residues in environments such as commercial kitchens is solved, achieving highly accurate and stable touch control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG ARCAIR APPLIANCE CO LTD
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-04
AI Technical Summary
In special environments such as commercial kitchens, the oil, moisture, and other residues accumulated on the surface of infrared touch devices cause local attenuation of the infrared light signal, making it difficult for traditional touch judgment methods based on fixed thresholds to accurately identify touch events, resulting in misjudgments and position calculation errors.
By establishing and updating a dynamic reference benchmark for each detection optical path in real time, calculating its relative change characteristic value, comparing it with a preset trigger threshold, and combining weighted calculation to determine the touch point coordinates, the system can distinguish between real touch signals and environmental interference.
It significantly improves the accuracy and stability of touch recognition, solves the problem of traditional methods failing in complex environments, and ensures the reliability and precision of touch control.
Smart Images

Figure CN122219797B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of touch control technology, and more specifically, to a touch control method and related equipment based on infrared control. Background Technology
[0002] Currently, in the field of human-computer interaction, infrared-based touch technology is widely used in various display devices due to its advantages such as non-contact operation and fast response. This technology typically uses infrared emitters and receivers arranged at the edge of the display area to form an infrared grating covering the entire touch area. When an object touches the screen, it blocks part of the infrared beam. The receiver detects the weakening or disappearance of the light signal, and the system can then determine the touch event and calculate its location. To protect internal components, these devices are usually equipped with transparent protective panels. However, in some special and harsh application environments, such as commercial kitchens, this seemingly mature technology faces unexpected challenges.
[0003] In specialized environments such as commercial kitchens, oil, moisture, and other residues inevitably accumulate on equipment surfaces. These residues form an uneven, semi-transparent film on the protective panel surface, causing localized attenuation of the infrared light signal. This attenuation differs from both a completely blocked touch signal and a completely uninterrupted, non-touch state, making it difficult for traditional touch detection methods based on fixed thresholds to accurately identify the signal. When a user performs a touch operation, the signal attenuation caused by residues is superimposed on the touch signal, potentially leading to the system's inability to reliably identify valid touches, resulting in no touch response or delayed response. Furthermore, due to the uneven distribution of residues and inconsistent signal attenuation levels in adjacent detection optical paths, touch position calculations can be incorrect, even detecting touch events erroneously when no actual physical touch occurs, resulting in false touch detections.
[0004] In existing technologies, infrared touch systems typically use a fixed signal strength threshold to determine touch events. This method cannot adapt to dynamic background attenuation caused by surface residues, resulting in a significant decrease in touch performance in harsh environments. Furthermore, traditional systems lack the ability to dynamically analyze changes in the detection optical path signal, failing to distinguish between rapid interactive touches and slowly changing background interference, further reducing the accuracy of touch recognition.
[0005] There is currently no effective technical solution to the above problems. Summary of the Invention
[0006] The purpose of this invention is to provide a touch control method and related equipment based on infrared control, which aims to solve the problems in special environments such as commercial kitchens where the accumulation of oil, water vapor and other residues on the surface of infrared touch devices causes local attenuation of infrared light signals, making it difficult for traditional touch judgment methods based on fixed thresholds to accurately identify touch events, as well as touch position calculation errors and even misjudgments. This invention significantly improves the accuracy and stability of touch recognition.
[0007] In a first aspect, the present invention provides a touch control method based on infrared control, comprising the following steps: S1. Real-time acquisition of the first received signal strength of each detection optical path within the infrared touch area; S2. For any of the detection optical paths, calculate the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference reference; the dynamic reference reference is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in the non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. S3. By comparing the relative change feature value with a preset trigger threshold, it is determined whether a touch event exists; S4. If a touch event is determined, the relative change feature value corresponding to each of the detection optical paths involved in the touch event is obtained, and a weighted calculation is performed based on the position information of each detection optical path and the corresponding relative change feature value to determine the coordinates of the touch point in order to realize touch control.
[0008] The touch control method based on infrared control provided by this invention can adapt to the background attenuation caused by surface residues in the infrared touch area in real time by introducing a dynamic reference benchmark. This effectively distinguishes between real touch signals and environmental interference, significantly improving the accuracy and stability of touch recognition and solving the problem of failure of traditional fixed threshold methods in complex environments.
[0009] Secondly, the present invention provides a touch control device based on infrared control, comprising: The acquisition module is used to acquire the first received signal strength of each detection optical path within the infrared touch area in real time; The calculation module is used to calculate the relative change characteristic value of the current first received signal strength of any of the detection optical paths relative to its corresponding dynamic reference reference; the dynamic reference reference is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in the non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. The comparison module is used to determine whether a touch event exists by comparing the relative change feature value with a preset trigger threshold. The control module is used to, if a touch event is determined to exist, obtain the relative change feature values corresponding to each of the detection optical paths involved in the touch event, and perform weighted calculations based on the position information of each detection optical path and the corresponding relative change feature values to determine the coordinates of the touch point in order to achieve touch control.
[0010] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps of the infrared-based touch control method provided in the first aspect above.
[0011] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the infrared-based touch control method provided in the first aspect above.
[0012] As can be seen from the above, the infrared-based touch control method provided by this invention can effectively adapt to background attenuation caused by environmental changes through real-time updates of the dynamic reference benchmark, thereby accurately distinguishing between real touch signals and environmental interference, and significantly improving the accuracy and stability of touch recognition. Furthermore, by performing weighted calculations on the detection optical paths involved in touch events, the coordinates of the touch point can be determined more accurately, overcoming the shortcomings of traditional systems where touch performance significantly degrades in complex environments, and achieving stable and reliable touch control in harsh application environments.
[0013] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing embodiments of the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0014] Figure 1 This is a flowchart of a touch control method based on infrared control provided in an embodiment of the present invention.
[0015] Figure 2 This is a schematic diagram of a touch control device based on infrared control provided in an embodiment of the present invention.
[0016] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0017] Label Explanation: 100. Acquisition module; 200. Calculation module; 300. Comparison module; 400. Control module; 13. Electronic device; 1301. Processor; 1302. Memory; 1303. Communication bus. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. 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. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this invention, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] In traditional infrared touchscreen technology, the accumulation of surface residues leads to background attenuation of the infrared light signal. This attenuation is caused by the absorption and scattering of infrared light by the residues, resulting in a non-uniform decrease in the received signal strength when not touched. This attenuation is typically below the touch detection threshold, affecting touch event recognition. Furthermore, the spatial non-uniformity of the attenuation causes differences in signal strength between adjacent detection optical paths, interfering with touch position calculation and reducing system response reliability and positioning accuracy.
[0021] For example, in recipe display equipment applications in commercial kitchens, the surface of the infrared touchscreen often develops an unevenly distributed, semi-transparent film due to oil fumes, food splatter, and detergent residue. When a chef touches the screen, the system cannot reliably detect the touch event due to background signal attenuation, resulting in operation delays or no response. Furthermore, differences in film thickness across different areas of the screen cause inconsistent signal attenuation in adjacent infrared light paths, leading to errors in touch position calculations, such as a misalignment between the actual touch point and the system's recognition point. Additionally, signal fluctuations may be misinterpreted as touch events even when there is no touch input, creating interference points and disrupting the normal operation of the equipment.
[0022] If the aforementioned issues are not addressed, the performance of infrared touch systems will continue to degrade under the influence of residue. The uncertainty in touch event detection will increase, position calculation errors will accumulate, and the overall system reliability will decrease. In applications requiring high precision and real-time response, this performance deficiency may lead to operational failures and reduced device availability. In the long term, the system may require frequent maintenance interventions due to its inability to adapt to environmental changes, increasing the user burden.
[0023] For this, please refer to Figure 1 , Figure 1 This is a flowchart of a touch control method based on infrared control. The infrared-based touch control method includes the following steps: S1. Real-time acquisition of the first received signal strength of each detection optical path within the infrared touch area; S2. For any detection optical path, calculate the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference reference; the dynamic reference reference is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in the non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. S3. By comparing the relative change feature value with a preset trigger threshold, it is determined whether a touch event exists; S4. If a touch event is determined to exist, the relative change feature values corresponding to each detection optical path involved in the touch event (i.e., determined to be effectively blocked) are obtained, and a weighted calculation is performed based on the position information of each detection optical path and the corresponding relative change feature values to determine the coordinates of the touch point in order to achieve touch control.
[0024] For ease of understanding, the following explains some key terms in this embodiment: "First received signal strength" refers to the intensity of the infrared light signal received by the infrared receiver tube in real-time operation of each detection optical path within the infrared touch area. This signal strength is affected by various factors such as touch events, ambient light, and surface residues.
[0025] A "dynamic reference baseline" refers to a baseline value that is independently established and updated in real time for each detection optical path. This baseline value reflects the degree of background attenuation of each detection optical path due to surface residues in a non-touch state. Its purpose is to distinguish between signal changes caused by touch and background signal changes caused by environmental or surface contamination.
[0026] "Second received signal strength" refers to the intensity of the infrared light signal received by each detection optical path in a non-touch state. This signal strength is used to establish and update a dynamic reference benchmark to accurately reflect the background attenuation under the current environment.
[0027] The "relative change characteristic value" refers to the relative change in the strength of the current first received signal relative to its corresponding dynamic reference. This characteristic value can effectively eliminate the influence of background attenuation and more accurately reflect the degree of obstruction of the optical path by the touch event.
[0028] The "trigger threshold" is a preset value used to compare with a relative change feature value to determine whether a touch event has occurred. When the relative change feature value exceeds this threshold, the system will consider that a touch has occurred.
[0029] "Location information" refers to the physical coordinates or spatial position data of each detection optical path within the infrared touch area. This information is the basis for determining the coordinates of the touch point.
[0030] "Weighted calculation" refers to assigning different weights to each detection optical path and its corresponding relative change characteristic value when determining the coordinates of the touch point. Generally, the optical path with the greater signal change has a higher weight, thus locating the touch point more accurately.
[0031] This application proposes a touch control method based on infrared control, which aims to solve the problem of accurately identifying touch events and determining touch positions under the background signal attenuation caused by residues on the surface of infrared touch screens.
[0032] First, the method involves real-time acquisition of the initial received signal strength of each detection optical path within the infrared touch area. The system incorporates a dedicated signal processing unit, which can be specifically an STM32 series microcontroller. This microcontroller continuously and periodically (e.g., every 100 milliseconds) measures the signal strength of the optical paths between all infrared emitters and their corresponding receivers. These measurements are recorded, representing the real-time signal level of each beam with or without obstruction in the current environment. For example, when a user's finger approaches or touches the screen, part of the infrared optical path is blocked, causing a decrease in its initial received signal strength.
[0033] Secondly, for any detection optical path, the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference benchmark is calculated. The dynamic reference benchmark is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in a non-touch state, reflecting the degree of background attenuation caused by surface residues. A signal strength measurement is also triggered when the system detects no touch input on the screen for a period of time (e.g., no touch event detected for 3 consecutive seconds). These measurements are recorded, representing the "background light signal" of each beam in the current environment when there are no obstructions. The system maintains an independent, continuously updated dynamic reference benchmark for each beam. This dynamic reference benchmark value is not a fixed number, but is calculated and updated based on the background light signal collected in the recent period using a smoothing method. Specifically, the exponential moving average method can be used to update the dynamic reference benchmark value: New dynamic reference benchmark value = (smoothing coefficient * current background light signal) + ((1 - smoothing coefficient) * old dynamic reference benchmark value). The smoothing coefficient, a decimal between 0 and 1 (e.g., 0.05), determines the degree to which the newly acquired signal affects the baseline update. A smaller smoothing coefficient means a slower baseline update, less sensitivity to instantaneous fluctuations, and better suited to the slow accumulation of dirt in commercial kitchens. This allows the dynamic reference for each beam to reflect its current "normal" signal level in real time, even if the screen surface experiences light attenuation due to oil, water vapor, or detergent residue, thus adapting to the continuous accumulation of uneven, translucent dirt layers and detergent films on the panel surface. When the system detects that an object (e.g., a finger) may touch the screen, the signal processing unit immediately acquires the current signal intensity of all affected beams. Instead of comparing the current signal intensity to a preset fixed threshold, the system compares it to the value of the dynamic reference for that beam. Only when the current signal intensity decreases relative to its dynamic reference value by more than a preset "relative decrease threshold" is the system considered to have effectively blocked the beam, thus confirming a touch event. Relative decrease = (Dynamic reference value - Current signal intensity) / Dynamic reference value. If the relative decrease exceeds a preset relative decrease threshold (e.g., set to 0.15, or 15%), it is determined to be a touch. This method directly addresses the problem of non-uniform signal attenuation caused by the localized absorption and scattering of infrared light by residual film in commercial kitchen environments. In this way, even if the background signal is generally reduced due to dirt, the system can accurately identify the additional, significant signal drop caused by a finger blocking the light, ensuring that the problem of unresponsive touch is resolved.
[0034] Furthermore, the presence of a touch event is determined by comparing the relative change characteristic value with a preset trigger threshold. For example, when the calculated relative change characteristic value (such as the relative decrease) is greater than the preset trigger threshold, the system determines that a touch event has occurred. This ensures that only significant signal changes are recognized as touches, avoiding misjudgments caused by slight environmental fluctuations or changes in residue.
[0035] Finally, if a touch event is detected, the system acquires the relative change characteristic values of each detection optical path involved in the touch event (i.e., those deemed effectively blocked). Based on the position information of each detection optical path and its corresponding relative change characteristic values, a weighted calculation is performed to determine the coordinates of the touch point for touch control. After confirming a touch event, the system accurately calculates the coordinates of the touch point based on the position information of all beams deemed effectively blocked (including horizontal and vertical beams) and the signal drop magnitude of their values relative to their respective dynamic reference bases. Since each beam has its own independent dynamic reference base, the system can eliminate the influence of background signal differences caused by uneven residue on the panel surface when calculating the touch point position. For example, the system can use a weighted average method to calculate the touch point coordinates. For the horizontal coordinate X, if beams X1, X2, and X3 are blocked, and their signal drop magnitudes relative to the dynamic reference base are D1, D2, and D3 respectively, then the X coordinate can be calculated as: X = (X1*D1 + X2*D2 + X3*D3) / (D1 + D2 + D3). The calculation method for the vertical coordinate Y is similar. This method utilizes a dynamic reference for each beam, enabling the system to accurately calculate the touch point position based on their relative changes even if the light signal is locally attenuated and scattered due to residual film. This avoids coordinate drift and thus provides reliable multi-touch and gesture recognition in high-intensity, fast-paced environments.
[0036] The core of this solution lies in establishing a dynamically updated reference baseline for each infrared beam. This baseline reflects the "normal" signal strength of the beam in the current environment without touch. Touch detection is no longer compared to a fixed ideal value, but rather to this constantly changing "normal" value. Only when the signal significantly decreases relative to this dynamic reference baseline is a valid touch confirmed. This method allows the system to intelligently distinguish between finger touches and signal attenuation caused by environmental dirt, thus maintaining the accuracy and stability of touch recognition even in highly polluted environments.
[0037] The following example will provide a more detailed explanation of the above technical solution: Imagine a recipe display device equipped with an infrared touchscreen operating in a commercial kitchen. Due to prolonged use, uneven accumulation of oil and cleaning agent residue on the screen surface causes background signal intensity to attenuate in some infrared light paths (e.g., light path A, light path B, and light path C), with varying degrees of attenuation.
[0038] First, the system acquires the initial received signal strength of each detection optical path within the infrared touch area in real time. For example, the microcontroller continuously monitors the real-time signal strength of optical paths A, B, C, and all other optical paths. Simultaneously, the system maintains a dynamic reference benchmark for each optical path. For instance, for optical path A, its dynamic reference benchmark is updated using an exponential moving average based on the second received signal strength acquired in a non-touch state. Even if the background signal of optical path A slowly decreases due to dirt, its dynamic reference benchmark will adjust accordingly to reflect the current "normal" background signal level.
[0039] When user A touches a certain area of the screen with their finger, part of the infrared light path within that area (e.g., light path A and light path B) is blocked by the finger, causing a rapid decrease in its initial received signal strength. At this time, the system calculates the relative change characteristic value of the current initial received signal strength of light path A and light path B relative to their respective dynamic reference bases. For example, if the dynamic reference base value for light path A is 700 units, and the current signal strength drops to 500 units, then its relative decrease is (700-500) / 700≈0.286. Similarly, the relative change characteristic value for light path B is calculated.
[0040] The system then compares these relative change characteristic values with a preset trigger threshold. Let's assume the preset trigger threshold is 0.15. If the relative change characteristic values of both optical path A and optical path B are greater than 0.15, the system determines that a touch event has occurred. For optical path C, which has not been touched, its signal strength may fluctuate slightly due to background dirt, but its relative change characteristic value will not exceed the trigger threshold, and therefore it will not be falsely identified as a touch.
[0041] If a touch event is detected, the system acquires the relative change feature values of the optical paths involved in the touch event (i.e., optical path A and optical path B), as well as their respective position information. Then, the system performs a weighted calculation based on this information to determine the precise coordinates of the touch point. For example, if the position coordinates of optical path A are (X_A, Y_A) and the relative change feature value is D_A; and the position coordinates of optical path B are (X_B, Y_B) and the relative change feature value is D_B, the system can use a weighted average method to calculate the horizontal coordinate X and vertical coordinate Y of the touch point: X = (X_A * D_A + X_B * D_B) / (D_A + D_B), Y = (Y_A * D_A + Y_B * D_B) / (D_A + D_B). In this way, even if the background attenuation levels of optical paths A and B are different, because the calculation is based on the relative change relative to their respective dynamic references, it can accurately reflect the true degree of finger obstruction, thereby precisely determining the position of the touch point.
[0042] As can be seen from the above examples, the technical solution of this application effectively solves the problems of inaccurate touch recognition and positioning drift caused by surface residues in traditional infrared touch technology by introducing a dynamic reference benchmark.
[0043] Compared to existing technologies that use fixed thresholds or simple background subtraction, the dynamic reference benchmark of this application can adapt in real time to the uneven attenuation of the background signal on the infrared touchscreen surface caused by factors such as oil, water vapor, or cleaning agent residue. In the example above, even if the background signals of optical paths A and B are attenuated to different degrees due to dirt, the real-time update of the dynamic reference benchmark ensures that each touch judgment is based on the current actual "no-touch" state. This allows the system to accurately distinguish between the significant signal drop caused by finger touch and the slow, uneven signal attenuation caused by background residue, thereby avoiding problems such as touch unresponsiveness or misjudgment.
[0044] Furthermore, by calculating the relative change characteristic value of the first received signal strength relative to a dynamic reference and comparing it with a trigger threshold, this application can more robustly determine touch events. In the example, a touch is only confirmed when the relative change characteristic value exceeds a preset threshold. This effectively suppresses false touch detection caused by slight signal fluctuations due to background residue, improving the accuracy and stability of touch detection.
[0045] Finally, in determining the touch point coordinates, this application utilizes the position information of each detection optical path involved in the touch event and their corresponding relative change feature values for weighted calculation. In this weighted calculation method, D_A and D_B are used as weights in the example, ensuring that the optical path with greater signal change contributes more to the touch point position. This compensates for the impact of residue non-uniformity on signal attenuation, achieving more accurate touch point positioning. Compared to traditional methods that may cause coordinate drift due to uneven background attenuation, this application can continuously provide reliable touch control in high-intensity, fast-paced commercial kitchen environments, significantly improving user experience and device operating efficiency.
[0046] In some embodiments, the step of establishing and updating the dynamic reference benchmark for each detection optical path in real time based on the second received signal strength of each detection optical path in a non-touch state includes: A1. Obtain the strength of the second received signal collected by the detection optical path in a non-touch state; A2. The weighted average of the second received signal strength currently collected is calculated with the multiple historical received signal strengths previously collected by the detection optical path in the non-touch state, and the second received signal strength closer to the current moment is given a higher weight to obtain the weighted average result; A3. Update the dynamic reference benchmark based on the weighted average result.
[0047] This scheme aims to capture the current signal strength of each detection optical path within the infrared touch area in real time when no touch event occurs, i.e., the second received signal strength. This ensures that the system can acquire the latest ambient background light signal, providing real-time data for subsequent dynamic reference benchmark updates. Implementation methods may include: the system periodically measuring the optical path signal strength between all infrared emitters and their corresponding receivers using a built-in signal processing unit, such as a microcontroller; or, triggering a signal strength measurement when the system has not detected any touch input for a period of time, ensuring that the acquired signal strength represents the background signal in the no-touch state. Subsequently, by combining the currently acquired signal strength with historical data, the scheme aims to smooth signal fluctuations and extract a more stable background attenuation trend. Weighted average calculation can effectively reduce the impact of instantaneous noise on benchmark updates while maintaining responsiveness to environmental changes. Specifically, an exponential moving average (EMA) method can be used, where the current signal strength is given a higher weight, while historical signal strengths are given decreasing weights based on their time proximity; or, a custom weighting function can be used to weight and sum historical data within a specific time window, ensuring that recent data has a greater impact on the average result. This feature is key to weighted averaging calculations, aiming to enable the dynamic reference baseline to respond more sensitively to the latest environmental changes without being overly sensitive to instantaneous fluctuations. By assigning a higher weight to the signal strength at the current moment, the system ensures that the dynamic reference baseline can promptly reflect the slow, gradual changes in background attenuation caused by the accumulation of surface residues or the formation of cleaning agent films. For example, in the exponential moving average method, this can be achieved by adjusting the smoothing coefficient; a larger smoothing coefficient will make the current signal have a greater impact on the new baseline. Alternatively, in other weighted averaging algorithms, the most recently acquired signal can be directly assigned a weight value significantly higher than other historical signals. The result of this weighted averaging calculation is the weighted average result, which combines the current and historical signal strengths in the non-touch state, representing a more stable and accurate background signal level for the current detection optical path in the non-touch state. Finally, this weighted average result is applied to the update of the dynamic reference baseline, ensuring that the baseline can reflect the degree of background attenuation of each detection optical path affected by surface residues in real time and adaptively. In this way, the dynamic reference baseline is no longer a fixed value but can be dynamically adjusted according to environmental changes, thus providing an accurate reference point for subsequent touch event determination. Specifically, the weighted average result can be directly set as the new dynamic reference benchmark.
[0048] Through the above steps, the system maintains an independent, continuously updated dynamic reference benchmark for each detection optical path. This benchmark adaptively reflects the degree of background attenuation caused by surface residues in each detection optical path. Therefore, in subsequent touch event determination, the current first received signal strength can be compared with a dynamic reference benchmark that accurately reflects the current background attenuation. This comparison method effectively eliminates background signal differences caused by surface residues, enabling the system to accurately identify additional and significant signal drops caused by fingers blocking light. This ensures the accuracy and reliability of touch event determination and significantly improves touch control performance in complex environments.
[0049] Through the above technical solution, this application effectively solves the problem of misjudgment or missed judgment of touch events caused by the dynamic changes in background attenuation in complex environments using traditional infrared touch control methods. By acquiring the latest signal strength in the non-touch state in real time and performing a weighted average calculation based on historical data, and assigning higher weight to signals closer to the current moment, the dynamic reference benchmark can adaptively and accurately track the slow changes in background attenuation caused by the accumulation of surface residues (such as oil, water vapor, and detergent film). This ensures that when judging touch events, the system can always use a reference benchmark that matches the current background attenuation level, thereby significantly improving the accuracy and reliability of touch event judgment. Especially in environments such as commercial kitchens, even if an uneven layer of translucent dirt and detergent film continuously accumulates on the panel surface, this solution can still guarantee the stability and accuracy of touch control, avoiding problems such as touch unresponsiveness or coordinate drift, improving the user experience and the usability of the device in harsh environments.
[0050] In some embodiments, the step of establishing and updating the dynamic reference benchmark for each detection optical path in real time based on the second received signal strength of each detection optical path in a non-touch state includes: B1. In a non-touch state, when the intensity of the second received signal of any detection optical path is acquired, determine the magnitude of the decrease in the intensity of the second received signal relative to the current dynamic reference of the detection optical path; B2. If the drop rate remains below the preset touch trigger threshold and reaches a certain preset duration, it is determined that there is a foreign object blocking the detection optical path; B3. When it is determined that there is a foreign object obstructing the detection optical path, the use of the second received signal strength currently collected by the detection optical path to update the dynamic reference benchmark is suspended, and the dynamic reference benchmark of the detection optical path before the foreign object obstruction is determined is continued.
[0051] This solution ensures the accuracy and stability of the dynamic reference benchmark by introducing a mechanism for identifying and eliminating "minor and persistent foreign object obstructions." Specifically, in a non-touch state, the system continuously or periodically acquires the second received signal strength of each detection optical path and compares it with the corresponding dynamic reference benchmark to calculate the signal drop. This step aims to monitor the signal strength changes of each detection optical path in real time to promptly detect potential anomalies. For example, the microcontroller can continuously acquire the second received signal strength of each detection optical path at a fixed frequency (e.g., every 100 milliseconds) and immediately calculate the difference between it and the corresponding dynamic reference benchmark, then divide by the dynamic reference benchmark to obtain the drop; alternatively, after detecting no touch input on the screen for a period of time (e.g., 3 consecutive seconds), the system triggers a signal strength measurement and calculates its drop relative to the dynamic reference benchmark.
[0052] The system then further verifies whether this signal drop is persistent to distinguish between brief signal fluctuations and persistent foreign object obstruction. If the detected drop is present but insufficient to trigger a touch event (i.e., less than a preset touch trigger threshold), and this drop persists for a preset period of time, the system intelligently identifies it as foreign object obstruction rather than a normal touch operation. For example, when the detected signal drop meets the condition, the signal processing unit can start a timer and continuously sample the detection optical path at a higher frequency (e.g., every 2 milliseconds) during this period. If all sampled values show that the signal strength remains at the drop level within a preset duration (e.g., 20 milliseconds), it is determined to be foreign object obstruction; alternatively, the system can calculate the signal drop by moving average and combine it with a threshold and a duration counter to determine whether it is foreign object obstruction. Only when the moving average remains below a certain level for a preset time, and the drop corresponding to that level is less than the touch trigger threshold, is it determined to be foreign object obstruction.
[0053] Once a foreign object obstruction is confirmed in a detection optical path, the system will immediately take measures to suspend the use of the currently acquired second received signal strength to update its dynamic reference benchmark. Instead, it will continue to use the dynamic reference benchmark value determined for that optical path before the foreign object obstruction occurred. This step aims to prevent signal attenuation caused by foreign object obstruction from erroneously lowering the dynamic reference benchmark, thereby maintaining the accuracy of the benchmark. For example, the system can maintain a status flag for each detection optical path. When a foreign object obstruction is detected, the flag is set to "foreign object obstruction," and in this state, the benchmark update algorithm (e.g., exponential moving average) is prevented from using the current signal strength. Alternatively, when a foreign object obstruction is detected, the system will save the current dynamic reference benchmark value and force the use of the saved value as the dynamic reference benchmark for that detection optical path during the duration of the foreign object obstruction state, until the foreign object is removed or the state is lifted.
[0054] The solution in this application, through the aforementioned synergistic effect, effectively eliminates interference from non-touch foreign objects on the accuracy of the reference while maintaining the adaptability of the dynamic reference to environmental background attenuation. This allows subsequent touch event recognition to always be based on an accurate and stable background reference, ensuring the sensitivity and reliability of touch recognition even when there are uneven residues on the screen surface, and avoiding touch unresponsiveness or misjudgment caused by reference drift.
[0055] The following example illustrates this concept. Imagine an infrared-controlled touchscreen system where the core processing unit is a microcontroller, such as an STM32 series microcontroller. When the system is running normally and there is no touch input, the microcontroller periodically (e.g., every 100 milliseconds) samples the second received signal strength of each detection optical path within the infrared touch area. For any detection optical path, such as path L1, the currently sampled second received signal strength is S_current. The microcontroller compares this with the current dynamic reference benchmark B_L1 of path L1, calculating the drop amplitude D = (B_L1 - S_current) / B_L1. Assume the preset touch trigger threshold is 15%. If the calculated drop amplitude D is less than 15%, for example, D = 8%, the system will not immediately recognize it as a touch event. At this time, the signal processing unit will initiate a "signal drop persistence verification" process. For path L1, the microcontroller will perform multiple consecutive signal strength measurements over the next 20 milliseconds at a higher sampling frequency (e.g., once every 2 milliseconds, for a total of 10 samples). If all 10 consecutive measurements show that the signal strength of optical path L1 remains at a level corresponding to an 8% decrease, i.e., the decrease lasts for 20 milliseconds, then the system will determine that there is a foreign object obstructing optical path L1. Once the obstruction is determined, the microcontroller will pause using the currently acquired second received signal strength of optical path L1 to update its dynamic reference base B_L1. For example, if B_L1 was 700 units before the obstruction was determined, even if the current signal strength drops to 644 units (an 8% decrease) due to the obstruction, the system will continue to use 700 units as B_L1 until the foreign object is removed, the signal returns to normal, or the obstruction is resolved.
[0056] Through the above technical solution, this application effectively solves the problem that slight and continuous signal attenuation caused by foreign objects such as oil, water vapor, or cleaning agent residue on the screen surface in harsh environments such as commercial kitchens may lead to the dynamic reference benchmark being incorrectly lowered. Specifically, by intelligently identifying foreign objects that obstruct the signal with small drops but long durations and suspending the use of affected signals to update the dynamic reference benchmark, this application ensures the accuracy and stability of the dynamic reference benchmark. This avoids the decrease in sensitivity of subsequent real touch event recognition due to improper reduction of the reference value, and even the possibility of misjudgment. When combined with the basic solution, this solution enables the system to more accurately reflect the degree of background attenuation of each detection optical path affected by surface residue in the non-touch state, thereby more accurately eliminating background interference when calculating relative change feature values. This significantly improves the reliability of touch control and user experience, ensuring accurate response of touch operations even when there are uneven residues on the screen surface, and avoiding problems such as touch unresponsiveness and coordinate drift.
[0057] In some embodiments, the specific steps in step S2 include: S21. Calculate the instantaneous decrease in the strength of the first received signal relative to the dynamic reference, and monitor the rate of change of the instantaneous decrease within a preset time window; S22. Compare the rate of change with a preset rapid interaction threshold to obtain a first comparison result, and determine the relative change characteristic value based on the first comparison result, specifically including: S221 If the rate of change exceeds the rapid interaction threshold, the peak value of the instantaneous decrease within the preset time window will be used as the relative change characteristic value. S222. If the rate of change does not exceed the rapid interaction threshold, and the instantaneous drop amplitude continues to exceed the preset minimum drop level, then the average value of the instantaneous drop amplitude over the preset duration is taken as the relative change characteristic value.
[0058] It should be noted that if the rate of change does not exceed the rapid interaction threshold, but the instantaneous drop does not continuously exceed the preset minimum drop level, it usually indicates that the signal change is insufficient to be regarded as a valid touch event or a persistent foreign object obstruction. In this case, the system will not determine the relative change characteristic value, but will regard such signal fluctuations as environmental noise or insignificant interference, and thus will not trigger the subsequent processing of the touch event.
[0059] In the above technical solution, calculating the instantaneous decrease in the strength of the first received signal relative to the dynamic reference benchmark refers to quantifying the degree of signal attenuation by comparing the currently acquired infrared optical path signal strength with the dynamic reference benchmark established and updated in real time under non-touch conditions. This instantaneous decrease can be expressed as a relative decrease rate, for example, by dividing the difference between the dynamic reference benchmark and the current first received signal strength by the dynamic reference benchmark. This calculation method can effectively eliminate background signal attenuation caused by environmental changes or surface residues, making subsequent touch judgments more accurate.
[0060] Monitoring the rate of change of the instantaneous drop amplitude within a preset time window refers to continuously sampling and recording the values of the instantaneous drop amplitude within a preset time period, and then calculating how quickly these values change over time. This preset time window can be a fixed length, such as 50 milliseconds or 100 milliseconds, or it can be a period dynamically adjusted based on system load or ambient noise levels. The rate of change can be calculated using the difference method, i.e., the difference in instantaneous drop amplitude between adjacent sampling points divided by the sampling time interval, or using a more complex fitting algorithm to smooth the data and calculate the slope.
[0061] A preset fast interaction threshold is a key parameter used to distinguish between fast, brief touch events and slow, continuous touch events. This threshold can be an empirical value, determined through extensive testing and statistical analysis of the signal change rate under different user interaction modes; for example, it can be set as a value where the signal drop amplitude changes by more than a certain percentage per millisecond. Alternatively, this threshold can be adaptive, dynamically adjusted based on ambient noise levels or historical system data to improve adaptability to different interaction scenarios.
[0062] The preset minimum attenuation level refers to the minimum effective signal attenuation that the instantaneous drop must continuously exceed when a slow or continuous touch event is identified. This level can be a relative value, such as 5% or 10% of the dynamic reference baseline, or an absolute value. Its function is to filter out minute signal fluctuations that are insufficient to constitute a valid touch, and to avoid misinterpreting ambient noise or slight interference as touch events.
[0063] The preset duration refers to the length of time during which the instantaneous drop in signal intensity must exceed a preset minimum drop level when the event is determined to be a slow or continuous touch. This duration can be a fixed value, such as 20 milliseconds or 50 milliseconds, to ensure the stability of signal attenuation. By setting this duration, it is possible to effectively distinguish between brief signal fluctuations and genuine continuous touches or obstructions, thus improving the robustness of touch recognition.
[0064] The proposed solution adaptively selects different feature value calculation methods based on the dynamic characteristics of user interaction, specifically the rate of change of signal attenuation. For fast, brief interactions, the system ensures sensitive recognition by capturing the peak of signal attenuation; for slow, continuous interactions, the system ensures stable recognition by calculating the average value of signal attenuation. This dynamic selection mechanism enables the system to effectively distinguish and adapt to signal characteristics under different user interaction modes, thereby improving the accuracy and responsiveness of touch gesture recognition. Specifically, in step S21, the instantaneous attenuation is calculated and its rate of change within a preset time window is monitored. This helps capture the real-time dynamic characteristics of the signal; the rate of change reflects the suddenness or persistence of the touch event, thus providing basic data for subsequent judgment. In step S22, the rate of change is compared with a fast interaction threshold, and a relative change feature value is determined based on the comparison result. This optimizes feature value selection by distinguishing different interaction scenarios: when the rate of change exceeds the fast interaction threshold, the peak value of the instantaneous attenuation is used as the feature value. This is suitable for fast touch events, as the peak value represents the maximum signal attenuation, avoiding missed judgments due to brief changes. When the rate of change does not exceed the threshold but the magnitude of the decrease consistently exceeds the minimum level, the average value is used as the feature value. This is suitable for slow or continuous changes, as the average value smooths signal fluctuations and reduces noise interference. If the condition is not met, it is considered noise and no processing is triggered, preventing invalid signals from being misidentified as touch events. Overall, these features work together to achieve intelligent classification of signal changes, improving the accuracy and robustness of touch recognition.
[0065] In one specific implementation, when the system detects that an object (e.g., a finger) may touch the screen, the signal processing unit immediately acquires the first received signal strength of all affected optical paths. At this time, the system no longer compares the current first received signal strength with a preset fixed threshold, but instead compares it with the dynamic reference value corresponding to that optical path. The instantaneous drop can be calculated as: Instantaneous Drop = (Dynamic Reference Value - First Received Signal Strength) / Dynamic Reference Value. For example, if the dynamic reference value of a certain optical path is 700 units, and the current first received signal strength drops to 595 units, then the instantaneous drop is (700-595) / 700≈0.15, or 15%. The system continuously monitors the change of this instantaneous drop within a preset time window (e.g., 50 milliseconds) and calculates its rate of change. Assume the preset fast interaction threshold changes by 0.005 units per millisecond. If the detected rate of change exceeds 0.005, it indicates a fast, sudden touch event (e.g., a rapid tap). The system will then select the maximum value (peak value) of the instantaneous drop within the 50-millisecond time window as the relative change characteristic value. Conversely, if the rate of change does not exceed 0.005, but the instantaneous drop consistently exceeds a preset minimum drop level (e.g., 5%), and the duration reaches a preset duration (e.g., 20 milliseconds), it indicates a slow or continuous touch event (e.g., a press or swipe). The system will then calculate the average value of the instantaneous drop within that 20 millisecond period as the relative change characteristic value. If the rate of change does not exceed the fast interaction threshold, and the instantaneous drop does not consistently exceed the preset minimum drop level, the system will consider it merely environmental noise or insignificant interference, and will not determine the relative change characteristic value, thus avoiding accidental touch event triggering.
[0066] Through the above technical solution, this application can adaptively select the signal feature value that best reflects touch events based on the dynamic characteristics of user interaction, thereby significantly improving the accuracy and response sensitivity of touch recognition in complex environments such as commercial kitchens. This method effectively solves the problem that due to the large differences in signal features caused by different interaction modes, a single feature value is difficult to accurately identify all touch events, enabling the system to respond to user operations more reliably, avoiding touch non-response or misjudgment, and improving the user experience.
[0067] In some embodiments, the specific steps in step S4 include: S41. For all detection optical paths involved in touch events, based on the position information of the detection optical paths and the corresponding relative change feature values, spatial clustering is used to identify independent touch areas; S42. For each identified touch area, the center coordinates of the touch area are determined by weighting the position information of the detection optical path inside it and the corresponding relative change feature value. S43. Determine the coordinates of one or more touch points based on the number of identified touch areas and the center coordinates of each touch area.
[0068] The "position information of the detection optical path" refers to the geometric position of each detection optical path within the infrared touch area in space, such as the coordinates of its start and end points, or the coordinates of its center line. This position information is pre-configured during system initialization and is used to associate signal changes with specific spatial locations when a touch event occurs. The "relative change characteristic value" is the amount of relative change in the current first received signal strength of any detection optical path relative to its corresponding dynamic reference base, reflecting the degree to which the optical path is blocked. The "spatial clustering" is a data analysis technique designed to group data points with similar spatial attributes or that are close to each other. Its purpose is to classify spatially adjacent detection optical paths affected by the same touch event and with similar relative change characteristic values into one category, thereby identifying independent touch areas. Methods for implementing spatial clustering may include, but are not limited to, density-based clustering algorithms (such as the DBSCAN algorithm), which can discover clusters of arbitrary shapes and effectively handle noise; or grid-based clustering algorithms, which accelerate the clustering process by dividing space into grid cells. The "independent touch area" refers to a region consisting of a set of spatially continuous detection optical paths triggered by the same touch event. The "weighted calculation" is a method of calculating a comprehensive value by assigning different weights to different data points. Here, the weights can be determined based on the relative change characteristic value of the detection optical path; for example, the larger the relative change characteristic value, the more significantly the optical path is affected by the touch, and the greater its weight in calculating the center coordinates of the touch area. The "center coordinates of the touch area" refers to the geometric center or weighted center of each identified independent touch area, representing the average position of that touch area. "Determining the coordinates of a single or multiple touch points" means that, based on the number of identified touch areas, if there is only one touch area, its center coordinates are the coordinates of a single touch point; if there are multiple touch areas, the center coordinates of each touch area correspond to the coordinates of a touch point.
[0069] This application's solution first performs spatial analysis and clustering of all detection optical paths involved in touch events to identify independent touch regions. This method utilizes the positional information of the detection optical paths to achieve spatial grouping and combines relative change feature values (such as signal intensity changes) to distinguish different touch events. This allows for accurate separation of independent touch regions even when interference exists on the panel surface, avoiding misclassification of multiple independent touch events as a single entity. Based on this, for each identified independent touch region, the center coordinates of the touch region are determined by weighting the positional information of its internal detection optical paths and the corresponding relative change feature values. In this weighted calculation, the weights can be based on the relative change feature values; the larger the value, the higher the weight. This ensures that points with significant signal changes are emphasized when calculating the center, thereby improving positional accuracy. Finally, the coordinates of one or more touch points are determined based on the number of identified touch regions and the center coordinates of each touch region. This strategy of calculating by region and point effectively handles complex multi-touch and large-area contact scenarios, ensuring the accuracy of touch point coordinates and providing boundary information for large-area touches. Especially after incorporating the aforementioned dynamic reference benchmark establishment and update mechanism, even if the background signal is generally reduced due to dirt, the system can accurately identify the additional and significant signal drop caused by fingers blocking the light, and accurately calculate the touch point position based on their relative changes, avoiding coordinate drift, thereby continuously providing reliable multi-touch and gesture recognition in high-intensity, fast-paced environments.
[0070] As a specific implementation, when the system detects a touch event, for example, in a commercial kitchen environment where a chef might simultaneously touch the screen with multiple fingers or different parts of their palm, the system acquires all detected optical paths deemed effectively blocked, such as lateral optical paths X1, X2, X3 and longitudinal optical paths Y1, Y2, Y3. The system first performs spatial clustering based on the preset position information of these optical paths and their respective relative change characteristic values (i.e., signal drop amplitudes D1, D2, D3, etc. relative to a dynamic reference). For example, the system can use the DBSCAN algorithm to group spatially adjacent optical paths with similar relative change characteristic values into the same cluster. Assuming that after clustering, the system identifies two independent touch areas: area A contains optical paths X1, X2, and Y1, and area B contains optical paths X3 and Y3. Next, the system performs a weighted calculation for each identified touch area. For area A, the position information of its internal optical paths X1, X2, and Y1 and the corresponding relative change characteristic values D1, D2, and D_Y1 are used for weighted calculation to determine the center coordinates of area A. For example, the horizontal coordinate X_A can be calculated as: X_A = (X1*D1 + X2*D2) / (D1 + D2), and the vertical coordinate Y_A can be calculated as: Y_A = (Y1*D_Y1) / D_Y1. Similarly, weighted calculations are performed on region B to determine its center coordinates X_B and Y_B. Finally, since two independent touch areas are identified, the system determines the coordinates of two touch points, namely (X_A, Y_A) and (X_B, Y_B). This method utilizes the dynamic reference base of each optical path, enabling the system to accurately calculate the touch point position based on their relative changes even if the light signal is locally attenuated and scattered due to residual film, thus avoiding coordinate drift and continuously providing reliable multi-touch and gesture recognition in high-intensity, fast-paced environments.
[0071] Through the above technical solution, this application can effectively handle complex multi-touch and large-area contact scenarios, ensure the accuracy of touch point coordinates, and provide boundary information for large-area touches, thereby improving the recognition accuracy of multi-touch and gesture recognition capabilities. Especially in harsh environments such as commercial kitchens, this solution can effectively cope with signal fluctuations and attenuation caused by uneven residues on the panel surface, avoiding touch point drift or misjudgment of touch, and significantly improving the robustness and response accuracy of the system.
[0072] In some embodiments, the specific steps in step S41 include: S411. Calculate the spatial distance between each detection optical path based on the position information; S412. Calculate the similarity between each detection optical path based on the relative change characteristic value; S413. Compare the spatial distance with a preset distance threshold to obtain a second comparison result. Based on the second comparison result and in combination with similarity, cluster all detection optical paths involved in the touch event, and identify the detection optical paths clustered into the same cluster as independent touch areas.
[0073] "Calculating the spatial distance between each detection optical path based on the location information" refers to quantifying the proximity of the detection optical paths in physical space to provide a geometric basis for subsequent clustering operations. This can be done by treating each detection optical path as a point or a line segment based on the physical layout of the infrared touchscreen and calculating the Euclidean distance between their center points. Alternatively, the system can pre-store the precise coordinate information of all detection optical paths and directly query and calculate the distance between any two optical paths when needed.
[0074] The purpose of "calculating the similarity between the detection optical paths based on the relative change characteristic values" is to assess the correlation between different detection optical paths in terms of signal attenuation modes, thereby reflecting whether they are likely caused by the same touch event. This can be achieved by calculating the absolute or relative difference between the relative change characteristic values of two detection optical paths; the smaller the difference, the higher the similarity. Alternatively, statistical methods, such as cosine similarity or Pearson correlation coefficient, can also be used to assess the similarity between these characteristic values.
[0075] The purpose of "comparing the spatial distance with a preset distance threshold to obtain a second comparison result" is to set an upper limit for physical distance, used to initially filter out detection optical paths that may belong to the same touch area in space. This preset distance threshold can be a fixed value; for example, if the distance between the center points of two optical paths is less than a certain pixel unit or physical size, they are considered sufficiently close in space. This threshold can also be dynamically adjusted based on the touchscreen size, optical path density, and the expected size of the touch object.
[0076] "And based on the second comparison result, and in conjunction with the similarity, clustering all detection optical paths involved in the touch event" refers to grouping related detection optical paths by comprehensively considering physical proximity and signal pattern consistency. This can be achieved using density-based clustering algorithms (such as DBSCAN), where the distance metric considers both spatial distance and similarity. Alternatively, hierarchical clustering or K-means algorithms can be used, grouping the optical paths by defining a composite distance function (e.g., the inverse of the spatial distance multiplied by a similarity weight).
[0077] "And recognizing detection optical paths clustered into the same cluster as independent touch areas" means defining each cluster (i.e., group) output by the clustering algorithm as an independent touch area. All detection optical paths in each cluster are treated as a whole, representing a single touch event. The system assigns a unique identifier to each identified cluster for subsequent processing.
[0078] This application's solution overcomes the limitations of traditional methods that may rely solely on the physical location of optical paths or simple signal attenuation judgments when identifying touch areas by comprehensively considering both "spatial distance" and "relative change feature value similarity" between detection optical paths. Traditional methods, when uneven residues on the panel surface cause inconsistent signal attenuation, easily lead to incorrect segmentation of optical paths belonging to the same touch event or incorrect merging of optical paths from different touch events, resulting in inaccurate touch area identification. This application's solution first acquires all detection optical paths determined to be effectively blocked and calculates their physical spatial distance, ensuring that only physically close optical paths can be classified as the same touch area. Simultaneously, the system also calculates the similarity between the relative change feature values of these optical paths. Since the relative change feature value has eliminated the influence of background attenuation through a dynamic reference benchmark, it more accurately reflects the signal change pattern caused by the actual touch. Therefore, optical paths with high similarity are more likely to be affected by the same touch event. Subsequently, the system compares the spatial distance with a preset distance threshold and, combined with the similarity between optical paths, clusters all detection optical paths involved in the touch event. This dual-criteria clustering method considers not only the physical proximity of optical paths but, more importantly, the consistency of their signal change patterns. Ultimately, detection optical paths clustered into the same group are identified as independent touch regions. This method cleverly utilizes relative change feature values obtained through a dynamic reference benchmark, reflecting real touch events. Within the spatial clustering framework, by combining physical location information with signal change pattern information, the system can more robustly and accurately identify independent touch regions in complex environments (such as uneven residue in a commercial kitchen), effectively avoiding touch region identification errors caused by signal inhomogeneity, thus laying a solid foundation for subsequent accurate calculation of touch point coordinates.
[0079] The following is a concrete example to illustrate this. Suppose that within the touch area, the system detects that optical paths L1, L2, L3, L4, and L5 are effectively blocked, and obtains their position coordinates (e.g., L1 is located at (10,20), L2 at (12,21), L3 at (50,60), L4 at (53,61), and L5 at (30,40)) and their corresponding relative change characteristic values (e.g., L1's characteristic value is 0.85, L2's is 0.82, L3's is 0.70, L4's is 0.73, and L5's is 0.45). The system can first calculate the Euclidean distance between the center points of any two optical paths. For example, the distance between L1 and L2 might be 2.24 units, and the distance between L3 and L4 might be 3.16 units. Simultaneously, the system calculates the similarity between the relative change characteristic values of any two optical paths. For example, the eigenvalues of L1 and L2 (0.85 and 0.82) are very close, and the eigenvalues of L3 and L4 (0.70 and 0.73) are also very close, but the eigenvalues of L1 and L3 differ significantly. The system can set a preset distance threshold, such as 5 units. First, the system can filter out all optical path pairs with a spatial distance of less than 5 units. Then, among these optical path pairs, their relative change eigenvalue similarity is further evaluated. For example, if the spatial distance between L1 and L2 is less than 5 units, and their relative change eigenvalue similarity is higher than the preset similarity threshold (e.g., the difference is less than 0.05), then L1 and L2 may be grouped into the same cluster. If the spatial distance between L3 and L4 is also less than 5 units, and their relative change eigenvalue similarity is also higher than the preset similarity threshold, then L3 and L4 may be grouped into another cluster. If the spatial distance between L5 and any other optical path is greater than 5 units, or although spatially close, the signal similarity is insufficient, then L5 may be identified as a separate cluster, or considered noise. Ultimately, the system identifies L1 and L2 as a single touch area A, and L3 and L4 as another single touch area B.
[0080] Through the above technical solution, this application effectively solves the problem of inaccurate touch area recognition caused by signal non-uniformity due to uneven residue on the panel surface in complex environments. By comprehensively considering the spatial distance between detection optical paths and the similarity of relative change feature values, the system can more accurately distinguish different touch events, avoiding misjudgments or omissions caused by a single criterion in traditional methods. This significantly improves the robustness and accuracy of touch control, especially in harsh environments such as commercial kitchens, ensuring the reliability of multi-touch and gesture recognition, thereby providing users with a more stable and accurate interactive experience.
[0081] In some embodiments, the specific steps in step S42 include: S421. Perform a weighted average calculation on the position information of each detection optical path within the touch area to obtain the weighted average calculation result; wherein, during the weighted average calculation process, the weight is determined according to the relative change characteristic value corresponding to the detection optical path, and the weight increases as the relative change characteristic value increases; S422. Determine the center coordinates of the touch area using the weighted average calculation result.
[0082] Specifically, weighted average calculation is a statistical method designed to synthesize multiple data points to obtain a representative result, where the contribution of each data point to the final result is determined by its corresponding weight. Here, its role is to comprehensively process the positional information of multiple detection optical paths deemed effectively blocked within the touch area to more accurately estimate the actual position of the touch point. This calculation method effectively avoids errors that may arise from relying solely on a single optical path or simple averaging, especially when the touch area is at the edge or has an irregular shape. Besides simple linear weighted averaging, various mathematical models such as Gaussian weighted averaging and exponential weighted averaging can be used to adapt to different signal attenuation characteristics and touch area shapes. Determining the weights is the core of weighted average calculation. Here, the weights are set based on the relative change characteristic values corresponding to each detection optical path. The relative change characteristic value reflects the degree to which the optical path is blocked; the larger the value, the more significantly the optical path is affected by the touch event. Therefore, setting the weights to increase with the increase of the relative change characteristic value means that the optical path more affected by the touch has a greater influence when calculating the touch point coordinates. This weighting mechanism ensures that the system can more accurately identify the center region of the touch even when signal attenuation is uneven, because the optical path with the most significant signal attenuation is usually closer to the actual touch point. The specific functional relationship of the weights can be linear, such as the weight equal to the relative change characteristic value itself; or it can be non-linear, such as the weight being the square or exponential function of the relative change characteristic value, to further amplify the influence of optical paths with significant signal changes. Finally, the comprehensive position result obtained through weighted averaging is directly used as the center coordinates of the identified touch area. This means that through the aforementioned optimized weighted averaging calculation, the system can output a highly accurate and robust touch point position. These center coordinates are the basis for subsequent touch control operations (such as clicking, dragging, etc.), and their accuracy directly affects the user experience and the system's response precision.
[0083] After identifying independent touch areas, this application employs an optimized weighted average calculation method to accurately determine the center coordinates of each touch area. Specifically, the system first acquires the position information of all detection optical paths deemed effectively blocked within the touch area, along with their respective relative change characteristic values. These relative change characteristic values are calculated based on a dynamic reference benchmark updated in real-time for each detection optical path in a non-touch state, accurately reflecting the true degree of influence of touch events on the optical paths and effectively eliminating the background attenuation effect caused by surface residues. In the weighted average calculation, this scheme cleverly uses these relative change characteristic values as weights. The core idea is that the larger the relative change characteristic value of a detection optical path, the more directly and significantly it is affected by touch events; therefore, it should be given greater weight when determining the center coordinates of the touch area. In this way, the system can highlight those optical paths most deeply affected by touch, thus more accurately locating the actual center of the touch. Finally, this weighted average calculation result based on relative change characteristic values is directly determined as the center coordinates of the touch area. This method, combined with the basic scheme that addresses background attenuation through dynamic reference benchmarks and provides accurate relative change feature values, as well as the scheme that identifies independent touch areas through spatial clustering and provides an internal detection optical path set for each area, forms a complete touch control logic. Building upon this, this scheme further optimizes the calculation accuracy of touch point coordinates. By using relative change feature values as weights, this scheme effectively addresses the problem of uneven light signal attenuation caused by surface residues in complex environments such as commercial kitchens. Even if the signal attenuation levels of different optical paths vary within the touch area, this scheme can avoid coordinate drift and inaccurate positioning by assigning higher weights to optical paths with more significant attenuation, thus ensuring the accuracy and reliability of touch control.
[0084] As a specific implementation, suppose that within a identified touch area, three detection optical paths are determined to be effectively blocked, with their position information being (X1, Y1), (X2, Y2), and (X3, Y3), respectively. Simultaneously, the relative change feature values corresponding to these three detection optical paths are D1, D2, and D3, respectively. To determine the center coordinates (X_center, Y_center) of the touch area, the system can use a weighted average method for calculation. The calculation of the horizontal coordinate X_center can be expressed as: X_center = (X1*D1 + X2*D2 + X3*D3) / (D1 + D2 + D3). Similarly, the calculation of the vertical coordinate Y_center can be expressed as: Y_center = (Y1*D1 + Y2*D2 + Y3*D3) / (D1 + D2 + D3). Here, D1, D2, and D3 are the relative change feature values corresponding to each detection optical path, which are directly used as weights in the weighted average calculation. For example, if the relative change characteristic value D1 of detection optical path 1 is 0.8, D2 of detection optical path 2 is 0.5, and D3 of detection optical path 3 is 0.7, then detection optical path 1 will receive the largest weight when calculating the center coordinates because it is most significantly affected by touch. This calculation method ensures that the optical path with the greater signal change contributes more to the final coordinates, thus making the calculated center coordinates closer to the actual touch position.
[0085] Through the above technical solution, this application can significantly improve the accuracy and robustness of touch point positioning. In traditional methods, due to the insufficient consideration of the differences in signal attenuation among various detection optical paths, especially when uneven residues on the surface cause inconsistent local attenuation of the optical signal, the calculation of touch point coordinates is prone to deviation. This solution uses the relative change feature values corresponding to the detection optical paths as the weights in the weighted average calculation, and ensures that the weights increase with the increase of the relative change feature values, so that the optical paths more significantly affected by touch dominate the coordinate calculation. This effectively solves the problem of inaccurate position calculation caused by uneven signal changes. Combined with the establishment and real-time updating of the dynamic reference benchmark in the basic solution, this solution can obtain the relative change feature values that accurately reflect touch events, further enhancing the effectiveness of the weighted calculation. At the same time, after identifying independent touch areas, this solution can perform refined center coordinate calculation for each area, avoiding confusion and misjudgment in multi-touch scenarios. Therefore, this solution not only improves the positioning accuracy of single-point touch, but also provides a more reliable foundation for multi-point touch and complex gesture recognition. In high-intensity, fast-paced application environments such as commercial kitchens, it ensures the accuracy of touch control and the smoothness of user experience, effectively avoiding problems such as coordinate drift and touch unresponsiveness.
[0086] Please refer to Figure 2 , Figure 2This is an infrared-based touch control device according to some embodiments of the present invention (the infrared-based touch control device adopts the infrared-based touch control method of the above embodiments, and the specific process is referred to the corresponding steps above). The infrared-based touch control device is integrated into the back-end control device in the form of a computer program, including: The acquisition module 100 is used to acquire the first received signal strength of each detection optical path within the infrared touch area in real time; The calculation module 200 is used to calculate the relative change characteristic value of the current first received signal strength of any detection optical path relative to its corresponding dynamic reference reference. The dynamic reference reference is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in the non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. The comparison module 300 is used to determine whether a touch event exists by comparing the relative change feature value with a preset trigger threshold. The control module 400 is used to, if a touch event is determined to exist, obtain the relative change feature values corresponding to each detection optical path involved in the touch event, and perform weighted calculation based on the position information of each detection optical path and the corresponding relative change feature values to determine the coordinates of the touch point in order to realize touch control.
[0087] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The present invention provides an electronic device 13, including: a processor 1301 and a memory 1302. The processor 1301 and the memory 1302 are interconnected and communicate with each other via a communication bus 1303 and / or other forms of connection mechanism (not shown). The memory 1302 stores computer-readable instructions executable by the processor 1301. When the electronic device is running, the processor 1301 executes the computer-readable instructions to execute the infrared-based touch control method in any optional implementation of the above embodiments, thereby achieving the following function: real-time acquisition of the first received signal strength of each detection optical path within the infrared touch area. For any detection optical path, calculate the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference benchmark. The dynamic reference benchmark is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in the non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. By comparing the relative change characteristic value with a preset trigger threshold, it is determined whether a touch event exists. If a touch event is determined to exist, the relative change characteristic value corresponding to each detection optical path involved in the touch event is obtained, and the coordinates of the touch point are determined by weighted calculation based on the position information of each detection optical path and the corresponding relative change characteristic value to realize touch control.
[0088] This invention provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it executes an infrared-based touch control method in any optional implementation of the above embodiments to achieve the following functions: real-time acquisition of the first received signal intensity of each detection optical path within the infrared touch area; for any detection optical path, calculation of the relative change characteristic value of its current first received signal intensity relative to its corresponding dynamic reference reference; the dynamic reference reference is established and updated in real time for each detection optical path based on the second received signal intensity of each detection optical path in a non-touch state to reflect the background attenuation degree of each detection optical path affected by surface residues; by comparing the relative change characteristic value with a preset trigger threshold, it is determined whether a touch event exists; if a touch event is determined to exist, the relative change characteristic value corresponding to each detection optical path involved in the touch event is acquired, and a weighted calculation is performed based on the position information of each detection optical path and the corresponding relative change characteristic value to determine the coordinates of the touch point to achieve touch control.
[0089] The computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0090] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0091] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0092] Furthermore, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0093] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0094] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A touch control method based on infrared control, characterized in that, Includes the following steps: S1. Real-time acquisition of the first received signal strength of each detection optical path within the infrared touch area; S2. For any of the detection optical paths, calculate the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference reference; The dynamic reference benchmark is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in a non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. S3. By comparing the relative change feature value with a preset trigger threshold, it is determined whether a touch event exists; S4. If a touch event is determined, the relative change feature value corresponding to each of the detection optical paths involved in the touch event is obtained, and a weighted calculation is performed based on the position information of each detection optical path and the corresponding relative change feature value to determine the coordinates of the touch point in order to realize touch control; The dynamic reference benchmark, based on the second received signal strength of each detection optical path in a non-touch state, includes the following steps for establishing and updating the benchmark in real time for each detection optical path: A1. Obtain the second received signal strength collected by the detection optical path in a non-touch state; A2. The weighted average of the second received signal strength currently collected is calculated with the multiple historical received signal strengths previously collected by the detection optical path in the non-touch state, and the second received signal strength closer to the current moment is given a higher weight to obtain the weighted average result; A3. Update the dynamic reference benchmark based on the weighted average result; The dynamic reference benchmark, based on the second received signal strength of each detection optical path in a non-touch state, includes the following steps for establishing and updating the benchmark in real time for each detection optical path: B1. In a non-touch state, when the intensity of the second received signal of any of the detection optical paths is acquired, the decrease of the intensity of the second received signal relative to the current dynamic reference of the detection optical path is determined; B2. If the decrease rate remains below the preset touch trigger threshold and reaches the preset duration, it is determined that there is a foreign object blocking the detection optical path; B3. When it is determined that there is a foreign object blocking the detection optical path, the dynamic reference benchmark is not updated by the second received signal strength currently collected by the detection optical path, but the dynamic reference benchmark of the detection optical path before the foreign object obstruction is determined is continued to be used.
2. The touch control method based on infrared control according to claim 1, characterized in that, The specific steps in step S2 include: S21. Calculate the instantaneous decrease in the strength of the first received signal relative to the dynamic reference, and monitor the rate of change of the instantaneous decrease within a preset time window; S22. Compare the rate of change with a preset rapid interaction threshold to obtain a first comparison result, and determine the relative change feature value based on the first comparison result, specifically including: S221. If the rate of change exceeds the rapid interaction threshold, the peak value of the instantaneous decrease within the preset time window is taken as the relative change characteristic value; S222. If the rate of change does not exceed the rapid interaction threshold, and the instantaneous drop amplitude continues to exceed the preset minimum drop level, then the average value of the instantaneous drop amplitude over the preset duration is taken as the relative change characteristic value.
3. The touch control method based on infrared control according to claim 1, characterized in that, The specific steps in step S4 include: S41. For all detection optical paths involved in the touch event, based on the position information of the detection optical paths and the corresponding relative change feature values, spatial clustering is used to identify independent touch areas; S42. For each identified touch area, the center coordinates of the touch area are determined by weighting the position information of the detection optical path inside it and the corresponding relative change feature value; S43. Determine the coordinates of one or more touch points based on the number of identified touch areas and the center coordinates of each touch area.
4. The touch control method based on infrared control according to claim 3, characterized in that, The specific steps in step S41 include: S411. Based on the position information, calculate the spatial distance between each of the detection optical paths; S412. Based on the relative change feature values, calculate the similarity between each of the detection optical paths; S413. The spatial distance is compared with a preset distance threshold to obtain a second comparison result. Based on the second comparison result and the similarity, all detection optical paths involved in the touch event are clustered, and detection optical paths clustered into the same cluster are identified as independent touch areas.
5. The touch control method based on infrared control according to claim 3, characterized in that, The specific steps in step S42 include: S421. Perform a weighted average calculation on the position information of each detection optical path within the touch area to obtain a weighted average calculation result; wherein, during the weighted average calculation process, the weight is determined according to the relative change characteristic value corresponding to the detection optical path, and the weight increases as the relative change characteristic value increases; S422. The weighted average calculation result is determined as the center coordinates of the touch area.
6. A touch control device based on infrared control, employing the touch control method based on infrared control as described in any one of claims 1-5, characterized in that, include: The acquisition module is used to acquire the first received signal strength of each detection optical path within the infrared touch area in real time; The calculation module is used to calculate, for any of the detection optical paths, the relative change characteristic value of its current first received signal strength relative to its corresponding dynamic reference reference. The dynamic reference benchmark is established and updated in real time for each detection optical path based on the second received signal strength of each detection optical path in a non-touch state, so as to reflect the background attenuation degree of each detection optical path affected by surface residues. The comparison module is used to determine whether a touch event exists by comparing the relative change feature value with a preset trigger threshold. The control module is used to, if a touch event is determined to exist, obtain the relative change feature values corresponding to each of the detection optical paths involved in the touch event, and perform weighted calculations based on the position information of each detection optical path and the corresponding relative change feature values to determine the coordinates of the touch point in order to achieve touch control.
7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions, which, when executed by the processor, perform the steps of the touch control method based on infrared control as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it performs the steps of the touch control method based on infrared control as described in any one of claims 1-5.