Touch device, touch anti-interference method and storage medium
Patent Information
- Application Number
- CN202410905758.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2044-07-08
AI Technical Summary
[0005]本申请实施例提供一种触控设备、触控抗干扰方法及存储介质,可用以解决相关技术中,因干扰因素的影响,导致触控设备容易发生书写断线、触屏跳点等,使得用户触摸体验较差的问题
[0021]This application provides a touch device, a touch anti-interference method, and a storage medium. The touch device includes a touchscreen and a processor. The touchscreen includes an infrared emitter and an infrared receiver. The light beam emitted by the infrared emitter is received by at least one infrared receiver to form an optical path. The processor performs a frame scan to determine if a real touch point exists and acquires the number of state changes in the optical path within a detection interval. If a real touch point exists, historical touch points are acquired, and the real touch point and historical touch points are matched to determine the distance between the real touch point and its matched historical touch point. Based on the number of real touch points, the distance between the real touch point and its matched historical touch point, and the number of state changes in the optical path within the detection interval, it is determined whether the touchscreen is in an interfered state. If the touchscreen is not in an interfered state, a next frame scan is performed based on the baseline value of the optical path, which characterizes the reference light intensity of the optical path when the touchscreen is not in an interfered state. If the touchscreen is in an interfered state, an initial value of the optical path is acquired, and a next frame scan is performed based on this initial value. Since this initial value can characterize the reference light intensity of the current optical path when the touch screen is in an interference state, that is, the reference light intensity of the optical path when there are interference factors, subsequent touch detection based on this initial value eliminates the influence of interference factors, effectively avoids disconnection and skipping point problems caused by interference factors, and improves the user touch experience.
Smart Images

Figure CN121300647B_ABST
Abstract
Description
Technical Field
[0001] This application relates to touch technology. More specifically, it relates to a touch device, a touch anti-interference method, and a storage medium. Background Technology
[0002] A touchscreen is an electronic system that can detect the presence and location of a touch within a display area, simplifying human-computer interaction. Among current touch technologies, infrared touch technology has advantages such as strong environmental adaptability, long lifespan, and the ability to recognize a greater number of touch points.
[0003] In some related technologies, touch devices based on infrared touch technology can use a logical polygon overlay algorithm to calculate touch point information through an obscured light path and respond based on the calculation results.
[0004] However, during the use of touch devices, various interference factors may occur, such as insects falling in, dust falling, sunlight, ambient light, or power interference. These factors can cause the light path to jitter or flicker, which can easily lead to problems such as broken writing lines and touch screen skipping, resulting in a poor user touch experience. Summary of the Invention
[0005] This application provides a touch device, a touch anti-interference method, and a storage medium, which can be used to solve the problem in the related art that touch devices are prone to writing line breaks, touch screen jumps, etc. due to the influence of interference factors, resulting in a poor user touch experience.
[0006] In a first aspect, embodiments of this application provide a touch device, the touch device comprising:
[0007] The touch screen includes an infrared emitter and an infrared receiver, wherein the light beam emitted by the infrared emitter is received by at least one infrared receiver to form an optical path;
[0008] A processor connected to the touchscreen is configured to:
[0009] Perform a frame scan to determine whether there is a real touch point and obtain the number of optical path state changes within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame;
[0010] If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches.
[0011] The presence of the touchscreen in an interference state is determined based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval.
[0012] If the touch screen is in an interfered state, the initial value of the optical path is obtained, and the next frame scan is performed based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interfered state.
[0013] If the touchscreen is not in an oscillating state, a scan of the next frame is performed based on the baseline value of the optical path, which is used to characterize the reference light intensity of the optical path when the touchscreen is not in an oscillating state.
[0014] Secondly, embodiments of this application provide a touch anti-interference method, the method comprising:
[0015] Perform a frame scan to determine whether there is a real touch point and obtain the number of optical path state changes within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame;
[0016] If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches.
[0017] The determination of whether the touchscreen is in an interference state is based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval.
[0018] If the touch screen is in an interfered state, the initial value of the optical path is obtained, and the next frame scan is performed based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interfered state.
[0019] If the touchscreen is not in an oscillating state, a scan of the next frame is performed based on the baseline value of the optical path, which is used to characterize the reference light intensity of the optical path when the touchscreen is not in an oscillating state.
[0020] Thirdly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the method described in any of the second aspects.
[0021] This application provides a touch device, a touch anti-interference method, and a storage medium. The touch device includes a touchscreen and a processor. The touchscreen includes an infrared emitter and an infrared receiver. The light beam emitted by the infrared emitter is received by at least one infrared receiver to form an optical path. The processor performs a frame scan to determine if a real touch point exists and acquires the number of state changes in the optical path within a detection interval. If a real touch point exists, historical touch points are acquired, and the real touch point and historical touch points are matched to determine the distance between the real touch point and its matched historical touch point. Based on the number of real touch points, the distance between the real touch point and its matched historical touch point, and the number of state changes in the optical path within the detection interval, it is determined whether the touchscreen is in an interfered state. If the touchscreen is not in an interfered state, a next frame scan is performed based on the baseline value of the optical path, which characterizes the reference light intensity of the optical path when the touchscreen is not in an interfered state. If the touchscreen is in an interfered state, an initial value of the optical path is acquired, and a next frame scan is performed based on this initial value. Since this initial value can characterize the reference light intensity of the current optical path when the touch screen is in an interference state, that is, the reference light intensity of the optical path when there are interference factors, subsequent touch detection based on this initial value eliminates the influence of interference factors, effectively avoids disconnection and skipping point problems caused by interference factors, and improves the user touch experience. Attached Figure Description
[0022] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0023] Figure 1 This is a schematic diagram of the structure of an infrared touchscreen;
[0024] Figure 2 A schematic diagram of one scanning direction corresponding to the longer side when it is a 1-to-2 pair;
[0025] Figure 3 A schematic diagram of the other scanning direction corresponding to the longer side when it is a 1-to-2 pair;
[0026] Figure 4 A schematic diagram of a scanning direction corresponding to the shorter side when there is a 1-to-2 relationship;
[0027] Figure 5 A schematic diagram of the other scanning direction corresponding to the shorter side when it is 1 to 2;
[0028] Figure 6 This is a schematic diagram of the scanning area corresponding to a specific scanning direction.
[0029] Figure 7 This is a schematic diagram of the structure of a touch device provided in an embodiment of this application;
[0030] Figure 8 A schematic diagram illustrating a scenario where a mosquito falls into an object and blocks the light path, creating a real touch point, as provided in an embodiment of this application.
[0031] Figure 9 This application provides a schematic diagram illustrating a scenario where dust falls onto the bottom of a touchscreen, generating a real touch point.
[0032] Figure 10 This is a schematic diagram illustrating a scenario where multiple light routes in a touchscreen change from an unobstructed state to an obstructed state based on light interference or power interference, thereby generating a real touch point, as provided in an embodiment of this application.
[0033] Figure 11 This application provides an embodiment of a scenario where multiple light routes in a touchscreen are switched from an obstructed state to an unobstructed state due to light interference or power interference, resulting in the disappearance of actual touch points.
[0034] Figure 12 This is a schematic diagram illustrating how to determine whether a touchscreen is in an interfered state when a real touch point exists, as provided in an embodiment of this application.
[0035] Figure 13 This application provides a schematic diagram illustrating the state changes of the optical path within a detection range when there are no actual touch points.
[0036] Figure 14 A flowchart illustrating a touch anti-interference method provided in this application embodiment. Figure 1 ;
[0037] Figure 15 A flowchart illustrating a touch anti-interference method provided in this application embodiment. Figure 2 ;
[0038] Figure 16 This is a schematic diagram of a touch anti-interference device provided in an embodiment of this application. Detailed Implementation
[0039] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.
[0040] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0041] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that includes a series of components is not necessarily limited to those that are explicitly listed, but may include other components that are not explicitly listed or that are inherent to such product or device.
[0042] Figure 1 This is a schematic diagram of the structure of an infrared touchscreen, such as... Figure 1 As shown, the infrared touchscreen has a rectangular structure consisting of a long transmitting side, a long receiving side, a short transmitting side, and a short receiving side. There are several transmitting LEDs on the transmitting side, and corresponding receiving LEDs on the receiving side. A one-to-many scanning method is typically used, meaning that when one transmitting LED emits light, multiple receiving LEDs on the opposite side simultaneously receive it, thus forming an optical network. Touch behavior is determined based on the different shapes of the optical network under touch and non-touch conditions.
[0043] In some related technologies, logical polygon overlay algorithms can be used to calculate touch point information through the blocked light path and respond accordingly based on the calculation results.
[0044] Because the relevant technology does not take into account the effects of multiple interference factors such as mosquitoes falling in, dust obstructing the light tube, sunlight or ambient light interference, and light path jitter or flicker caused by power supply interference, touch usage problems such as skipping points and broken writing lines are prone to occur, resulting in a poor user experience.
[0045] Based on this, this application provides a touch device, a touch anti-interference method, and a storage medium. For the touch device of this application, it is possible to determine whether the touchscreen is in an interfered state based on the characteristics generated on the touchscreen by interference factors. Specifically, it determines whether the touchscreen is currently in an interfered state based on various characteristics such as changes in the number of actual touch points, changes in the position of actual touch points (i.e., the distance between the actual touch point and its matching historical touch point), and the number of state changes in the optical path within the detection interval. When it is determined that the touchscreen is in an interfered state, the initial value of each optical path is promptly obtained. Since this initial value includes the influence of interference factors, subsequent touch detection based on this initial value can eliminate the influence of interference factors, thereby avoiding issues such as skipped touches and broken writing lines caused by interference, enabling the touch device to function normally and improving the user's touch experience.
[0046] To facilitate a better understanding of the contents of this application by those skilled in the art, the following definitions are given for the concepts involved in the scheme of this application before describing the embodiments of this application.
[0047] Scanning Direction: In a 1-to-n (n≥1) scanning method, each optical path has a different angle for a specific lamp. For a specific emitting lamp, each angle of its corresponding n optical paths can be called a scanning direction. Therefore, a 1-to-n scanning method will have n scanning directions. Each scanning direction consists of a set of parallel optical paths with the same slope. See the reference for details. Figures 2 to 5 As shown, where, Figure 2 This is a schematic diagram showing one scanning direction corresponding to the longer side when the ratio is 1 to 2. Figure 3 A schematic diagram showing the other scanning direction corresponding to the longer side when it's a 1-to-2 configuration. Figure 4 This is a schematic diagram showing one scanning direction corresponding to the shorter side when the ratio is 1 to 2. Figure 5 This is a schematic diagram of the other scanning direction corresponding to the shorter side when it is a 1-to-2 pair.
[0048] Touch area: A specific scanning direction corresponds to a set of parallel scanning optical paths. When a touch occurs, each touch point blocks several consecutive lines of these parallel optical paths. These consecutively blocked optical paths can be called a scanning area under this scanning direction, such as... Figure 6 As shown, Figure 6 This is a schematic diagram of the scanning area corresponding to a specific scanning direction. The dashed lines represent the blocked light paths. In the case of consecutively blocked light paths, the first blocked light path can be defined as the starting boundary of this touch area, and the last blocked light path is the ending boundary. The order can be customized, and this application does not limit it.
[0049] The touch device provided in this application can have various implementation forms, such as a television, smart television, laser projection device, monitor, electronic bulletin board, electronic table, etc., that has touch function.
[0050] The technical solution of this application will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0051] Figure 7 This is a schematic diagram of the structure of a touch device provided in an embodiment of this application, with reference to... Figure 7 As shown, the touch device includes:
[0052] The touch screen 701 includes an infrared emitter and an infrared receiver, wherein the light beam emitted by the infrared emitter is received by at least one infrared receiver to form an optical path;
[0053] The processor 702, connected to the touchscreen 701, is configured to:
[0054] Perform a frame scan to determine whether there is a real touch point and obtain the number of optical path state changes within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame;
[0055] If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches.
[0056] The determination of whether the touch screen 701 is in an interference state is based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval.
[0057] If the touch screen 701 is in an interfered state, the initial value of the optical path is obtained, and the next frame scan is performed based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen 701 is in an interfered state.
[0058] If the touchscreen is not in an oscillating state, a scan of the next frame is performed based on the baseline value of the optical path, which is used to characterize the reference light intensity of the optical path when the touchscreen is not in an oscillating state.
[0059] In one implementation scenario, the number of scanning directions and the specific angle of each scanning direction can be determined before the scan is performed.
[0060] In some embodiments, when performing a frame scan to determine whether a real touch point exists, the processor 702 can acquire the touch area corresponding to each scanning direction and the obstructed optical path associated with the touch area; determine the position information of candidate touch points based on the touch area; and remove false touch points from the candidate touch points based on the position information of the touch points and the obstructed optical path associated with the touch area to obtain the real touch point. After obtaining the real touch point, the coordinates of the real touch point can be transformed and output to the host computer.
[0061] The location information of the candidate touch point includes, but is not limited to, the coordinates and area of the candidate touch point.
[0062] In one implementation scenario, candidate touch points include both fake touch points and real touch points. After removing fake touch points, the remaining candidate touch points are real touch points, meaning that real touch points exist, and the number of real touch points can be one or more. In another implementation scenario, all candidate touch points are fake touch points, meaning that no real touch points exist in this case.
[0063] In one implementation scenario, when a real touch point exists, it is necessary to obtain historical touch points. These historical touch points include at least the historical touch points from the previous frame compared to the current frame.
[0064] Trajectory tracking is performed on the real touch points and historical touch points in the current frame, i.e., matching is performed to determine the historical touch points corresponding to the real touch points. Furthermore, based on the number of real touch points, the distance between the real touch points and their matched historical touch points, and the number of optical path state changes within the detection interval, it is determined whether the touch screen 701 is in an interference state.
[0065] In the touchscreen 701, the light beam emitted by the infrared emitting device is received by at least one infrared receiving device, thus forming a corresponding optical path between the infrared emitting device and its corresponding infrared receiving device. The optical path has two states: blocked and unblocked. If an optical path changes from blocked to unblocked in two adjacent frames, the optical path state can be considered to have changed once. Alternatively, if an optical path changes from unblocked to blocked in two adjacent frames, the optical path state can also be considered to have changed once.
[0066] This application obtains the number of optical path state changes within a certain detection interval. This detection interval can be the time period corresponding to the current frame, or it can be the time period of the current frame and at least one historical frame compared to the current frame.
[0067] In another implementation scenario, the processor 702 is also used to: if there is no real touch point, determine whether the touch screen 701 is in an interfered state based on the number of state changes of the optical path within the detection interval.
[0068] Since there are no actual touch points, the number of actual touch points and the distance between actual touch points and historical touch points that match actual touch points are not involved. Only the state changes of the optical path are involved. Therefore, it is sufficient to determine whether the touch screen 701 is in an interfered state based on the number of state changes of the optical path between the detection areas.
[0069] When the touch screen 701 is in a state of interference, the interference factors include, but are not limited to: insects falling in, dust falling in, power interference or light interference, etc. Among them, light interference can be sunlight or ambient light interference.
[0070] Figure 8 This is a schematic diagram illustrating a scenario where a mosquito falls into an object and blocks the light path, creating a real touch point, according to an embodiment of this application. Figure 9This application provides a schematic diagram illustrating a scenario where dust falls onto the bottom of a touchscreen, creating a real touch point. Figure 8 and Figure 9 It is known that the problem of touch points being skipped arises because mosquitoes and dust create real touch points when they fall in.
[0071] Figure 10 This is a schematic diagram illustrating a scenario where multiple light routes in a touchscreen change from an unobstructed state to an obstructed state based on light interference or power interference, thus generating real touch points, according to an embodiment of this application. Because real touch points are generated, a jump point problem may occur. Figure 11 This is a schematic diagram illustrating a situation where multiple light routes in a touchscreen change from an obstructed state to an unobstructed state due to light interference or power interference, causing the actual touch points to disappear. The disappearance of the actual touch points results in a writing line breakage problem.
[0072] exist Figures 8 to 11 In the diagram, dashed lines indicate that the optical path is unobstructed, while solid lines indicate that the optical path is obstructed.
[0073] In some embodiments, when the processor 702 is used to obtain the initial value of the optical path if the touch screen 701 is in an interference state, it is specifically used for:
[0074] If the touch screen 701 is in an interference state, the touch screen reset flag is set as target information, so as to obtain the initial value of the optical path based on the target information.
[0075] In one implementation scenario, the touch screen reset flag can be represented by a flag. A preset flag value of 0 indicates that the touch device does not need to be reset, while a preset flag value of 1 indicates that the touch device needs to be reset to obtain the initial value of the optical path; at this point, the target information is 1. Before performing the scan, the flag can be initialized to 0.
[0076] When the touch screen 701 is in an interference state, set flag=1. At this time, obtain the initial value of each optical path. Alternatively, trigger the touch screen 701 to perform a soft reset to obtain the initial value of each optical path. After completion, set flag=0.
[0077] Since the initial value obtained at this time can be used to characterize the reference light intensity of each light path when the touch screen 701 is in an interfered state, the reference light intensity includes the influence of interference factors. Further, based on the reference light intensity, the light path that is blocked in the subsequent touch process is determined to determine the real touch point. This can eliminate the influence of interference factors, effectively avoid the problem of skipping points and writing lines broken due to interference factors, and improve the user touch experience.
[0078] In another implementation scenario, if the touchscreen 701 is not in an undisturbed state, a scan of the next frame is performed based on the baseline value of the optical path. The baseline value characterizes the reference light intensity of the optical path when the touchscreen 701 is not in an undisturbed state.
[0079] In one implementation scenario, the reference value of the optical path can be stored in memory. If the touchscreen 701 is not in an interference-prone state, this reference value can be retrieved. At the same time, to ensure the accuracy of the optical path reference value, the reference value of the touchscreen 701 can be retrieved again every certain time period or frame period to update the stored original reference value.
[0080] This application provides a touch device including a touchscreen 701 and a processor 702 connected to the touchscreen 701. The processor 702 performs a frame scan to determine if a real touch point exists and acquires the number of state changes in the optical path within a detection interval, wherein the detection interval includes at least the time period corresponding to the current frame. If a real touch point exists, historical touch points are acquired, and the real touch point and historical touch points are matched to determine the distance between the real touch point and the matched historical touch point. Based on the number of real touch points, the distance between the real touch point and the matched historical touch point, and the number of state changes in the optical path within the detection interval, it is determined whether the touchscreen 701 is in an interfered state. If the touchscreen 701 is not in an interfered state, a next frame scan is performed based on a baseline value of the optical path, which characterizes the reference light intensity of the optical path when the touchscreen 701 is not in an interfered state. If the touchscreen 701 is in an interfered state, an initial value of the optical path is acquired, and a next frame scan is performed based on this initial value. Since the initial value of the optical path obtained at this time can characterize the reference light intensity of the current optical path of the touch screen 701 under the state of interference, that is, the reference light intensity of the optical path under the presence of interference factors, the subsequent touch detection is performed based on this initial value, which eliminates the influence of interference factors, effectively avoids the problems of disconnection and skipping caused by interference factors, and improves the user touch experience.
[0081] In one or more embodiments of this application, when the processor 702 determines whether the touchscreen 701 is in an interfered state based on the number of real touch points, the distance between the real touch points and historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval, it is specifically used for:
[0082] If the number of real touch points is the same as the number of target historical touch points, and the distance between the real touch point and the target historical touch point that matches the real touch point is less than the movement distance threshold, and the number of state changes of the optical path within the detection interval is less than the first quantity threshold, and the detection interval is greater than the first duration threshold or the detection interval is a fixed duration, then the touch screen 701 is determined to be in an interference state.
[0083] The target historical touch point is the historical touch point of the previous frame compared to the current frame.
[0084] When a user touches the touchscreen 701, the number of actual touch points generated by the touch operation changes within a relatively short period of time, and the positions of the actual touch points also change to some extent, which also leads to changes in the state of more optical paths.
[0085] When the touchscreen 701 is in a state of interference, let's take dust as an example of the interference factor. If the user does not operate the touchscreen 701, when dust falls onto a certain position of the touchscreen 701, a corresponding real touch point is generated. At this time, the number of real touch points generated by dust will not change over a relatively long period of time. Similarly, the position of the dust does not change or changes only slightly, which will also make the state of the optical path basically unchanged.
[0086] Therefore, it is possible to determine whether the touch screen 701 is in an interfered state based on the changes in the number of real touch points, the changes in the distance between the real touch points and their matching target historical touch points, and the number of changes in the state of the optical path within the detection interval.
[0087] Figure 12 This application provides a schematic diagram illustrating how to determine whether a touchscreen is under interference when a real touch point is present, as shown in the embodiments of this application. Figure 12 As shown, the left and right sides correspond to the start and end of the detection interval, respectively. Within the detection interval, the number of actual touch points remains unchanged, while the movement distance threshold is determined by... Figure 12 The right-hand window S represents the target historical touch point, and 2 represents the actual touch point that matches 1. Compared to the target historical touch point 1, the actual touch point 2 moves a shorter distance and remains within window S. Solid lines represent obstructed light paths, while dashed lines represent jittery light paths. Jittery light paths are those whose states are constantly changing, thus allowing us to obtain the number of state changes of the light path within the detection range.
[0088] In this method, the distance between the actual touch point and the target historical touch point is determined based on a movement distance threshold. In another implementation scenario, the movement distance threshold can be set to 0. In this case, it is determined whether the distance between the actual touch point and its matched target historical touch point is 0, i.e., whether their positions are the same. When their positions are the same, it indicates that the actual touch point is stationary.
[0089] The detection interval can be the time period corresponding to the current frame, or it can be the time period of the current frame and at least one historical frame relative to the current frame.
[0090] In one implementation scenario, if the detection interval is the time period corresponding to the current frame, it can be the duration between the start time of the current frame and the start time of the next frame, or the duration between the end time of the current frame and the end time of the next frame. Therefore, the detection interval is a fixed duration, and the number of optical path state changes within the time period corresponding to the current frame is the number of optical path state changes between two adjacent frames.
[0091] In another implementation scenario, if the detection interval includes the current frame and at least one historical frame relative to the current frame, the detection interval can be determined by a certain number of frames, or the duration corresponding to the detection interval can be obtained by a timer. When obtaining the duration corresponding to the detection interval based on the timer, the processor 702 is further configured to: initialize the timer and start the timer to obtain the duration corresponding to the detection interval.
[0092] In one implementation scenario, the initial value of the timer can be preset to 0. The timer is then initialized and starts counting, meaning it starts counting from 0, thereby obtaining the duration corresponding to the detection interval. The duration corresponding to the detection interval can be the time between the start of the timer and its next reset.
[0093] In one implementation scenario, if the touchscreen 701 is not in an interfered state, the timer is reset and the timer is started to begin counting.
[0094] In some embodiments, if the number of real touch points is different from the number of target historical touch points, or if the distance between the real touch point and the target historical touch point that matches the real touch point is greater than or equal to the movement distance threshold, or if the number of state changes of the optical path within the detection interval is greater than or equal to the first quantity threshold, it is determined that the touch screen 701 is not in an interfered state.
[0095] In one implementation scenario, when determining whether the distance between a real touch point and its matched target historical touch point is greater than or equal to a movement distance threshold, if multiple real touch points exist, and the distance between one real touch point and its matched target historical touch point is greater than or equal to the movement distance threshold, it indicates that the user is performing a touch operation, and the touchscreen 701 can be considered to be in an uninterrupted state. When the distance between each real touch point and its matched target historical touch point is less than the movement distance threshold, it can be determined that the touchscreen 701 is in an interrupted state.
[0096] In some embodiments, if no real touch point exists, when the processor 702 determines whether the touch screen 701 is in an interfered state based on the number of state changes of the optical path within the detection interval, it is specifically used for:
[0097] If the number of optical path state changes within the detection interval is less than the second quantity threshold, and the detection interval is greater than the second duration threshold, it is determined that the touch screen 701 is in an interfered state.
[0098] If the number of changes in the state of the optical path within the detection interval is greater than or equal to the second threshold, it is determined that the touch screen 701 is not in an interfered state.
[0099] Figure 13 This application provides a schematic diagram illustrating the state changes of the optical path within a detection range in the absence of a real touch point, as shown in the embodiments of this application. Figure 13 As shown, the left and right sides correspond to the start and end times of the detection interval, respectively, and the dashed line represents the jitter optical path.
[0100] Similar to the case where a real touch point exists, if it is determined that the touchscreen 701 is in a state of interference, the initial value of each optical path is obtained, and the next frame scan is performed. If it is determined that the touchscreen 701 is not in a state of interference, the timer is reset, and the next frame scan is performed.
[0101] The movement distance threshold, first quantity threshold, first duration threshold, second quantity threshold, and second duration threshold in this application embodiment can all be set according to actual needs.
[0102] In summary, when real touch points are present, the processor 702 can determine whether the touchscreen 701 is in an interfered state based on the number of real touch points, the distance between the real touch points and their matched target historical touch points, and the number of state changes in the optical path within the detection interval. When no real touch points are present, the processor 702 determines whether the touchscreen 701 is in an interfered state based on the number of state changes in the optical path within the detection interval. This application can accurately determine whether the touchscreen 701 is in an interfered state regardless of whether real touch points are present or not, and further, when the touchscreen 701 is in an interfered state, obtain the initial values of the optical path to achieve the effect of eliminating jump points and broken writing lines caused by interference factors.
[0103] Figure 14 A flowchart illustrating a touch anti-interference method provided in this application embodiment. Figure 1 This method can be executed by the touch device or the processor of the touch device provided in the above embodiments. For example... Figure 14 As shown, the method includes the following steps:
[0104] S1401: Perform a frame scan to determine whether there is a real touch point and obtain the number of state changes of the optical path within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame.
[0105] In one implementation scenario, after performing a frame scan, the touch areas corresponding to each scanning direction and the obstructed light paths associated with the touch areas can be obtained. Candidate touch points are determined based on each touch area, including fake touch points and real touch points. Fake touch points can be removed based on the obstructed light paths associated with the touch areas, thereby obtaining the real touch points.
[0106] S1402: If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches.
[0107] Historical touch points can be historical touch points from the previous frame relative to the current frame, or they can be historical touch points corresponding to multiple historical frames relative to the current frame.
[0108] In one implementation scenario, when matching real touch points and historical touch points, for any real touch point, if the distance between the real touch point and a certain historical touch point is less than a preset distance threshold, it can be determined that the real touch point matches the historical touch point, that is, the real touch point and the historical touch point are located on the same trajectory.
[0109] S1403: Determine whether the touch screen is in an interference state based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval.
[0110] In one implementation scenario, a movement distance threshold, a first quantity threshold, and a first duration threshold can be preset. If the number of actual touch points is the same as the number of target historical touch points, and the distance between an actual touch point and its matched target historical touch point is less than the movement distance threshold, and the number of optical path state changes within the detection interval is less than the first quantity threshold, and the detection interval is greater than the first duration threshold or the detection interval is a fixed duration, then the touchscreen is determined to be in an interfered state.
[0111] In another implementation scenario, if the number of actual touch points is different from the number of target historical touch points, or the distance between an actual touch point and its matched target historical touch point is greater than or equal to the movement distance threshold, or the number of optical path state changes within the detection interval is less than or equal to the first quantity threshold, then it is determined that the touch screen is not in an interfered state.
[0112] In some embodiments, if there is no real touch point, the touch screen is determined to be in an interfered state based on the number of changes in the state of the optical path within the detection interval.
[0113] S1404: If the touch screen is in an interference state, obtain the initial value of the optical path, and perform a next frame scan based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interference state.
[0114] S1405: If the touch screen is not in an oscillating state, perform a scan of the next frame relative to the current frame based on the baseline value of the optical path. The baseline value is used to characterize the reference light intensity of the optical path when the touch screen is not in an oscillating state.
[0115] After the current frame is processed, S1401-S1405 can be repeated to continue scanning the next frame.
[0116] This application provides a touch anti-interference method. It performs a frame scan to determine the presence of a real touch point and acquires the number of state changes in the optical path within the detection interval. If a real touch point exists, historical touch points are acquired, and the real and historical touch points are matched to determine the distance between the real touch point and its matched historical touch point. Based on the number of real touch points, the distance between the real touch point and its matched historical touch point, and the number of state changes in the optical path within the detection interval, it is determined whether the touchscreen is in an interfered state. If not, a next frame scan is performed based on the baseline value of the optical path, where the baseline value represents the reference light intensity of the optical path when the touchscreen is not in an interfered state. If yes, an initial value of the optical path is acquired, and a next frame scan is performed based on this initial value. Since the initial value acquired at this time is the reference light intensity of the current optical path when the touchscreen is in an interfered state, i.e., the reference light intensity of the optical path when interference exists, subsequent touch detection based on this initial value eliminates the influence of interference factors, thereby effectively avoiding disconnection and skipping issues caused by interference factors and improving the user touch experience.
[0117] Figure 15 A flowchart illustrating a touch anti-interference method provided in this application embodiment. Figure 2 ,like Figure 15 As shown, the method is as follows:
[0118] S1501: Initialize the timer to 0 and start timing to obtain the duration corresponding to the detection interval.
[0119] S1502: Perform a scan of one frame to obtain the touch area in each scan direction, as well as the obstructed light path associated with the touch area.
[0120] S1503: Determine candidate touch points based on the touch area, remove false touch points from the candidate touch points, and determine whether there are real touch points. If yes, proceed to steps S1504-S1506; if no, proceed to step S1508.
[0121] S1504: Transform the coordinates of the actual touch point and output them to the host computer.
[0122] S1505: Obtain historical touch points and match the actual touch points with the historical touch points.
[0123] S1506: Determine whether the number of actual touch points and target historical touch points are the same, whether the distance between the actual touch point and its matched historical touch point is less than the movement distance threshold, and whether the number of optical path state changes within the detection interval is less than the first quantity threshold. If yes, proceed to step S1507; otherwise, proceed to step S1510.
[0124] S1507: Determine whether the detection interval is greater than the first duration threshold. If yes, proceed to step S1511; otherwise, proceed to steps S1502-S1503.
[0125] S1508: Determine whether the number of optical path state changes within the detection interval is less than the second quantity threshold. If yes, proceed to step S1509; if no, proceed to step S1510.
[0126] S1509: Determine whether the detection interval is greater than the second duration threshold. If yes, proceed to step S1511; otherwise, proceed to steps S1502-S1503.
[0127] S1510: Reset the timer to 0. Execute steps S1502-S1503.
[0128] S1511: Set flag=1 to trigger a soft reset of the touchscreen or obtain the initial value of each optical path, and set flag=0 after completion.
[0129] In this embodiment, when real touch points exist, the presence of an interfering touchscreen can be determined based on the number of real touch points, the distance between a real touch point and its matching target historical touch point, and the state changes of the optical path within the detection interval. When no real touch points exist, the state changes of the optical path within the detection interval determine whether the touchscreen is in an interfering state. If the touchscreen is determined to be in an interfering state, a quick soft reset or re-acquiring of the initial values for each optical path can be performed to perform subsequent touch detection based on the current initial values. This eliminates the influence of interference factors, avoids issues such as skipped touches and broken writing lines caused by interference, and improves the user experience.
[0130] Figure 16 This is a schematic diagram of a touch anti-interference device provided in an embodiment of this application. Figure 16 As shown, the device includes: a processing module 1601.
[0131] The processing module 1601 is used to perform a frame scan, determine whether there is a real touch point, and obtain the number of state changes of the optical path within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame;
[0132] The processing module 1601 is further configured to, if a real touch point exists, acquire historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches.
[0133] The processing module 1601 is further configured to determine whether the touch screen is in an interference state based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval.
[0134] The processing module 1601 is further configured to, if the touch screen is in an interference state, obtain the initial value of the optical path, and perform a next frame scan based on the initial value of the optical path compared to the current frame, wherein the initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interference state.
[0135] The processing module 1601 is further configured to perform a next frame scan based on the baseline value of the optical path if the touch screen is not in an oscillating state. The baseline value is used to characterize the reference light intensity of the optical path when the touch screen is not in an oscillating state.
[0136] The touch anti-interference device provided in this application embodiment can execute the touch anti-interference method in the above method embodiment. Its implementation principle and technical effects are similar, and will not be repeated here. It should be noted that the above... Figure 16 The division of modules shown is merely illustrative. This application does not limit the division of modules or the naming of modules.
[0137] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the methods described in the above embodiments.
[0138] The computer-readable storage medium may include various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0139] This application also provides a program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0141] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A touch device, characterized in that, The touch device includes: The touch screen includes an infrared emitter and an infrared receiver, wherein the light beam emitted by the infrared emitter is received by at least one infrared receiver to form an optical path; A processor connected to the touchscreen is configured to: Perform a frame scan to determine whether there is a real touch point and obtain the number of optical path state changes within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame; If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches. The presence of the touchscreen in an interference state is determined based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval. If the touch screen is in an interfered state, the initial value of the optical path is obtained, and the next frame scan is performed based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interfered state. If the touch screen is not in an oscillating state, the next frame scan is performed based on the baseline value of the optical path, which is used to characterize the reference light intensity of the optical path when the touch screen is not in an oscillating state. When the processor determines whether the touchscreen is in an interfered state based on the number of real touch points, the distance between the real touch points and historical touch points that match the real touch points, and the number of optical path state changes within the detection interval, it is specifically used for: If the number of real touch points is the same as the number of target historical touch points, and the distance between the real touch point and the target historical touch point that matches the real touch point is less than the movement distance threshold, and the number of state changes of the optical path within the detection interval is less than the first quantity threshold, and the detection interval is greater than the first duration threshold or the detection interval is a fixed duration, then the touch screen is determined to be in an interfered state. The target historical touch point is the historical touch point of the previous frame compared to the current frame.
2. The touch device according to claim 1, characterized in that, When the processor determines whether the touchscreen is in an interfered state based on the number of real touch points, the distance between the real touch points and historical touch points that match the real touch points, and the number of optical path state changes within the detection interval, it is specifically used for: If the number of real touch points is different from the number of target historical touch points, or if the distance between a real touch point and a target historical touch point that matches the real touch point is greater than or equal to the movement distance threshold, or if the number of state changes of the optical path within the detection interval is greater than or equal to the first quantity threshold, it is determined that the touch screen is not in an interfered state.
3. The touch device according to claim 1, characterized in that, The processor is also used for: If no real touch point exists, the number of changes in the state of the optical path within the detection interval determines whether the touch screen is in an interfered state.
4. The touch device according to claim 3, characterized in that, When the processor is used to determine whether the touchscreen is in an interfered state based on the number of state changes of the optical path within the detection interval, it is specifically used for: If the number of optical path state changes within the detection interval is less than the second quantity threshold, and the detection interval is greater than the second duration threshold, it is determined that the touch screen is in an interfered state. If the number of optical path state changes within the detection interval is greater than or equal to the second quantity threshold, it is determined that the touch screen is not in an interfered state.
5. The touch device according to claim 1, characterized in that, Before performing a frame scan, the processor is also used to: The timer is initialized and started to begin timing in order to obtain the duration corresponding to the detection interval.
6. The touch device according to claim 5, characterized in that, The processor is also configured to: if the touchscreen is not in an oscillating state, reset the timer and start the timer to begin counting.
7. The touch device according to claim 1, characterized in that, When the processor is used to obtain the initial value of the optical path if the touchscreen is in an interfered state, it is specifically used for: If the touchscreen is in an interference state, the touchscreen reset flag is set as the target information, so as to obtain the initial value of the optical path based on the target information.
8. A touchscreen anti-interference method, characterized in that, The method includes: Perform a frame scan to determine whether there is a real touch point and obtain the number of optical path state changes within the detection interval, wherein the detection interval includes at least the time period corresponding to the current frame; If a real touch point exists, obtain historical touch points, match the real touch point and the historical touch point, and determine the distance between the real touch point and the historical touch point that the real touch point matches. The determination of whether the touchscreen is in an interference state is based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of state changes of the optical path within the detection interval. If the touch screen is in an interfered state, the initial value of the optical path is obtained, and the next frame scan is performed based on the initial value of the optical path compared to the current frame. The initial value is used to characterize the reference light intensity of the current optical path when the touch screen is in an interfered state. If the touch screen is not in an oscillating state, the next frame scan is performed based on the baseline value of the optical path, which is used to characterize the reference light intensity of the optical path when the touch screen is not in an oscillating state. The method of determining whether the touchscreen is in an interfered state based on the number of real touch points, the distance between the real touch points and the historical touch points that match the real touch points, and the number of optical path state changes within the detection interval includes: If the number of real touch points is the same as the number of target historical touch points, and the distance between the real touch point and the target historical touch point that matches the real touch point is less than the movement distance threshold, and the number of state changes of the optical path within the detection interval is less than the first quantity threshold, and the detection interval is greater than the first duration threshold or the detection interval is a fixed duration, then the touch screen is determined to be in an interfered state. The target historical touch point is the historical touch point of the previous frame compared to the current frame.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, implement the method of claim 8.
Citation Information
Patent Citations
Touch point interference processing method and device, computer equipment and storage medium
CN117908696A
Infrared touch device and method for determining touch state
CN118192823A