Water detection method and device for touch screen, terminal equipment and storage medium
By updating a confidence value using self-capacitance and mutual capacitance data, the method addresses touch screen inaccuracies caused by water and sweaty hands, reducing misrecognition rates and improving user experience.
Patent Information
- Application Number
- CN202310731769.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
Capacitive touch screens are affected by water and sweaty hands, leading to inaccurate touch recognition and high misrecognition rates due to interference with coupling capacitance values, which existing methods like water domain filtering and touch stabilization filtering exacerbate rather than solve.
A method and device that update a confidence value based on self-capacitance and mutual capacitance data to determine the presence of water on the screen, using multiple scanning frames and threshold comparisons to accurately judge the need for a waterproof mode.
Reduces misrecognition rates and improves the accuracy of touch recognition by effectively distinguishing between touch and water on the screen, enhancing user experience.
Smart Images

Figure CN119165991A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of touch screens, and in particular to a method, device, terminal equipment and storage medium for detecting water on a touch screen. Background Art
[0002] Capacitive touch screens can identify touches and determine touch positions by measuring changes in multiple coupling capacitances between fingers and the screen. It is widely used in consumer electronics such as smartphones for its fast response, sensitivity, high light transmittance and stability, and support for multi-touch. However, in actual use, users generally report that water on the screen surface or sweaty hands will cause the touch screen to be insensitive, affecting the user experience. This is because the conductivity of water will interfere with the coupling capacitance value, making it impossible for the screen controller to accurately calculate the touch position, which will lead to problems such as coordinate offset and touch ghost points. Touching with water / wet hands is a current industry problem. In order to solve the above problems, researchers have tried to use methods such as water connected domain filtering, water connected domain merging, and touch point stabilization filtering to suppress touch ghost points and stabilize coordinates. Although these methods can optimize the touch experience with water, indiscriminate use will also interfere with normal touch operations, resulting in a relatively high misrecognition rate. Summary of the invention
[0003] The embodiments of the present application provide a water detection method, apparatus, terminal device and storage medium for a touch screen, which are used to update a confidence value according to capacitance data of a current scanning frame, reduce the misrecognition rate of interference scenes, and increase the rate of entering a waterproof mode.
[0004] In a first aspect, the present application provides a water detection method for a touch screen, which may include: obtaining capacitance data of the touch screen in a current scanning frame, the capacitance data including at least one of self-capacitance data and mutual capacitance data; updating a confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, the confidence value being used to characterize the degree of confidence that water exists on the surface of the touch screen; and judging whether to enter or exit a waterproof mode according to the confidence value of the current scanning frame.
[0005] A second aspect of the present application provides a water detection device for a touch screen, which may include:
[0006] An acquisition module, used to acquire capacitance data of the touch screen in a current scanning frame, wherein the capacitance data includes at least one of self-capacitance data and mutual capacitance data;
[0007] The processing module is used to update the confidence value according to the capacitance data to obtain the confidence value of the current scanning frame, wherein the confidence value is used to characterize the credibility of the presence of water on the touch screen surface; and determine whether to enter or exit the waterproof mode according to the confidence value of the current scanning frame.
[0008] A sixth aspect of the present application provides a terminal device, which may include:
[0009] A memory storing executable program code;
[0010] a processor coupled to the memory;
[0011] The processor is used to execute the method described in the first aspect of the present application.
[0012] Another aspect of an embodiment of the present application provides a computer-readable storage medium, comprising instructions, which, when executed on a processor, enables the processor to execute the method described in the first aspect of the present application.
[0013] Yet another aspect of an embodiment of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the method described in the first aspect of the present application.
[0014] Another aspect of an embodiment of the present application discloses an application publishing platform, which is used to publish a computer program product. When the computer program product runs on a computer, the computer executes the method described in the first aspect of the present application.
[0015] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0016] In the embodiment of the present application, the capacitance data of the touch screen in the current scanning frame is obtained, and the capacitance data includes at least one of self-capacitance data and mutual capacitance data; the confidence value is updated according to the capacitance data to obtain the confidence value of the current scanning frame, and the confidence value is used to characterize the credibility of the presence of water on the surface of the touch screen; according to the confidence value of the current scanning frame, it is judged to enter or exit the waterproof mode. According to the capacitance data of the current scanning frame, the confidence value corresponding to the waterproof mode is updated to reduce the misrecognition rate of the interference scene and increase the speed of entering the waterproof mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments and the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and other drawings can be obtained based on these drawings.
[0018] Figure 1A This is a system architecture diagram used in the embodiments of the present application;
[0019] Figure 1B This is a software structure block diagram of the terminal device in the embodiment of the present application;
[0020] Figure 2 A schematic diagram of an embodiment of a water detection method for a touch screen in an embodiment of the present application;
[0021] Figure 3A A schematic diagram of a negative pit connected domain existing in typical mutual capacitance data in an embodiment of the present application;
[0022] Figure 3B A schematic diagram of a single water area detection in an embodiment of the present application;
[0023] Figure 3C A schematic diagram of a multi-peak touch area in an embodiment of the present application;
[0024] Figure 3D A schematic diagram of residual touch in an embodiment of the present application;
[0025] Figure 3E A schematic diagram of the existence of two-finger coaxial interference in an embodiment of the present application;
[0026] Figure 3F This is a schematic diagram of the results of water tailing detection in an embodiment of the present application;
[0027] Figure 3G A schematic diagram of a flow chart of a water touch recognition module in an embodiment of the present application;
[0028] Figure 4 This is a schematic diagram of an embodiment of a water detection device for a touch screen in an embodiment of the present application;
[0029] Figure 5 This is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application;
[0030] Figure 6 This is another schematic diagram of a terminal device in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The embodiments of the present application provide a water detection method, device, terminal device and storage medium for a touch screen, which are used to update the confidence value corresponding to the waterproof mode according to the capacitance data of the current scanning frame, reduce the misrecognition rate of interference scenes, and increase the rate of entering the waterproof mode.
[0032] In order to make the technical personnel in the technical field better understand the scheme of the present application, the technical scheme in the embodiment of the present application will be described below in conjunction with the drawings in the embodiment of the present application. Obviously, the described embodiment is only a part of the embodiment of the present application, not all of the embodiments. Based on the embodiments in the present application, they should all fall within the scope of protection of the present application.
[0033] In one implementation, in order to realize water detection of the touch screen, a normal touch scan frame and a water detection scan frame are added in the scan cycle to obtain two different self-capacitance data, and the two data are cross-validated to determine whether to enter the water mode. The specific principle is as follows: set the touch reference value of the normal touch scan frame and the water detection scan frame, and compare the change between the normal touch scan frame data and the water detection scan frame data of each scan cycle and the respective touch reference values; wherein, the normal touch scan frame is a touch scan performed on all sub-channels, and the water detection scan frame is an interval scan performed on the sub-channels, that is, in two adjacent sub-channels, one sub-channel performs a normal touch scan and the other sub-channel is grounded. During normal touch, the change between the normal touch scan frame data and the water detection scan frame data and their respective touch reference values exceeds the threshold; when there are isolated water droplets, the change between the normal touch scan frame data of the sub-channel covered by water and the set touch reference value is less than the change between the water detection scan frame data and the set touch reference value.
[0034] In essence, the above solution is heavily dependent on the support and cooperation of hardware, which not only increases the design and manufacturing costs of the equipment, but the additional scanning frames will also lead to increased power consumption and reduced scanning frame rate to a certain extent.
[0035] The present application provides a water detection method for a touch screen based on a confidence value. After normal startup, if water drops fall on the touch screen, the self-capacitance data and mutual capacitance data of the corresponding area will appear negative, and when a finger touches the touch screen, the self-capacitance data and mutual capacitance data of the corresponding area will appear positive. Therefore, the self-capacitance water threshold and mutual capacitance water threshold mentioned in the present application are a threshold judgment for whether there is water on the touch; the self-capacitance touch threshold and mutual capacitance touch threshold are a threshold judgment for whether there is a touch on the touch screen. The self-capacitance water threshold, the mutual capacitance water threshold, the self-capacitance touch threshold and the mutual capacitance touch threshold are all empirical values. In the present application, the size relationship between the self-capacitance water threshold and the mutual capacitance water threshold is not limited, and the size relationship between the self-capacitance touch threshold and the mutual capacitance touch threshold is not limited. But generally speaking, the self-capacitance touch threshold and the mutual capacitance touch threshold are positive values, and the self-capacitance water threshold and the mutual capacitance water threshold are negative values, so there will be a self-capacitance touch threshold greater than the self-capacitance water threshold, and the mutual capacitance touch threshold greater than the mutual capacitance water threshold.
[0036] When there is no water on the touch screen, the self-capacitance data is greater than the self-capacitance water threshold, and when there is water on the touch screen, the self-capacitance data is less than the self-capacitance water threshold; when there is no water on the touch screen, the mutual capacitance data is greater than the mutual capacitance water threshold, and when there is water on the touch screen, the mutual capacitance data is less than the mutual capacitance water threshold.
[0037] When the touch screen is touched, the self-capacitance data is greater than the self-capacitance touch threshold, and when the touch screen is not touched, the self-capacitance data is less than the self-capacitance touch threshold; when the touch screen is touched, the mutual capacitance data is greater than the mutual capacitance touch threshold, and when the touch screen is not touched, the mutual capacitance data is less than the mutual capacitance touch threshold.
[0038] Based on this, the technical solution of the present application calculates the confidence value (waterConfidenceValues, WCVs), referred to as the confidence value, for entering or exiting the waterproof mode in real time according to the self-capacitance data and mutual capacitance data characteristics of the target area (such as the water area or the touch area), constructs the corresponding entry / exit mechanism of the waterproof mode, and finally determines the current state of the touch screen.
[0039] like Figure 1A The system architecture diagram shown in FIG. Figure 1A As shown, the following five modules are included: abnormal data detection module, touch water recognition module, no touch water recognition module, counter module and entry / exit waterproof mode module. Among them, the first four modules (abnormal data detection module, touch water recognition module, no touch water recognition module, counter module) are responsible for jointly and in real time updating the confidence value (WCVs) according to at least one of the self-capacitance data and mutual capacitance data to obtain the confidence value of the current scan frame, and the last module (enter / exit waterproof mode module) determines whether to enter or exit the waterproof mode according to the confidence value (WCVs) of the current scan frame.
[0040] The abnormal data detection module is responsible for determining whether there is an abnormality in the self-capacitance data of the current scan frame of the touch screen. If there is an abnormality, the confidence value is adjusted down to obtain the confidence value of the current scan frame. If there is no abnormality, a touch check is performed based on the self-capacitance data; in the case of no touch, the no touch (notouch) water recognition module performs suspected water area detection and single water (wateronly) area detection, updates the confidence value, and obtains the confidence value of the current scan frame; in the case of touch, the touch (touch) water recognition module can perform two-finger coaxial detection, suspected water area detection, water interference detection (including at least one of multi-peak touch recognition and residual touch recognition), weight value calculation, real water area detection (which may include touch tail recognition, water tail recognition, or single water area detection), update the confidence value, and obtain the confidence value of the current scan frame. The counter module is used to add 1 to the counter when the absolute value of the difference between the confidence values of two consecutive scanning frames is less than the minimum preset difference, otherwise, clear or reduce the value of the counter; when the value of the counter reaches the preset value, reduce the confidence value of the current scanning frame to obtain the adjusted confidence value of the current scanning frame. Finally, the module for entering / exiting the waterproof mode can determine whether to enter or exit the waterproof mode based on the confidence value or adjusted confidence value of the current scanning frame. The technical solution of the present application can calculate the confidence value (WCVs) of the current scanning frame in different scenarios based on self-capacitance data and / or mutual capacitance data, accurately detect whether there is water on the screen, and thus determine whether to enter / exit the waterproof mode.
[0041] Optionally, there are touch water recognition modules and no touch water recognition modules, which can be considered as a water recognition module as a whole. Multi-peak touch recognition and residual touch recognition can be considered as water interference recognition as a whole. Touch tail recognition, water tail recognition and separate water area detection are ultimately to determine whether the suspected water area is a real water area after the suspected water area or the water-like area is excluded, so they can be summarized as real water area detection. The counter module is an optional module.
[0042] like Figure 1B The figure shows a software structure block diagram of the terminal device in an embodiment of the present application.
[0043] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.
[0044] It should be noted that if Figure 1AThe system architecture diagram shown can be understood as the corresponding program framework layer, Android runtime and system library, and kernel layer improvements. The main functions of each layer are described in detail below.
[0045] The application layer can include a series of application packages.
[0046] like Figure 1B As shown, the application package may include camera, gallery, calendar, call, map, navigation, wireless local area network (Wireless Local Area Network, WLAN), Bluetooth, music, video, short message and other applications.
[0047] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0048] like Figure 1B As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.
[0049] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0050] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0051] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0052] The phone manager is used to provide communication functions for terminal devices, such as the management of call status (including answering, hanging up, etc.).
[0053] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0054] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0055] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.
[0056] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0057] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0058] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0059] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0060] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0061] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0062] A 2D graphics engine is a drawing engine for 2D drawings.
[0063] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0064] The technical solution of the present application is further described below by way of embodiments. Figure 2FIG. 1 is a schematic diagram of an embodiment of a method for detecting water on a touch screen in an embodiment of the present application, which may include:
[0065] 201. Acquire capacitance data of a touch screen in a current scanning frame, where the capacitance data includes at least one of self-capacitance data and mutual capacitance data.
[0066] It is understandable that the self-capacitance data and / or the mutual capacitance data of the touch screen in the current scanning frame can be obtained, for example, through an analog-to-digital converter, a capacitance sensor, a capacitance amplifier, and the like.
[0067] 202. Update a confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, where the confidence value is used to characterize the degree of confidence that water exists on the surface of the touch screen.
[0068] Optionally, when there is a confidence value of the previous scanning frame, the confidence value is the confidence value of the previous scanning frame; when there is no confidence value of the previous scanning frame, the confidence value is initially 0.
[0069] Confidence value: used to characterize the credibility of the presence of water (water droplets, water mist, sweat stains, etc.) on the touch screen surface. The confidence value can be updated in real time based on the characteristics of the screen's continuous scanning frame data (self-capacitance data and mutual capacitance data), and the larger the confidence value, the higher the credibility of the current screen having water.
[0070] 1. Abnormal Data Detection
[0071] Optionally, updating the confidence value according to the capacitance data to obtain the confidence value of the current scanning frame may include: detecting whether there is an abnormality in the capacitance data; if there is an abnormality, reducing the confidence value, and using the reduced confidence value as the confidence value of the current scanning frame.
[0072] Optionally, detecting whether there is an abnormality in the self-capacitance data may include: determining whether there is data in the self-capacitance data whose absolute value of the difference is greater than a first specific threshold; if so, determining that there is an abnormality in the self-capacitance data; if not, determining that there is no abnormality in the self-capacitance data.
[0073] Optionally, detecting whether there is an abnormality in the self-capacitance data may include: determining whether there is data in the mutual capacitance data whose absolute value of the difference is greater than a second specific threshold; if so, determining that there is an abnormality in the mutual capacitance data; if not, determining that there is no abnormality in the self-capacitance data.
[0074] It is understandable that the abnormal data detection module can be responsible for determining whether there is an abnormality in the self-capacitance data of the current scan frame. If there is an abnormality, the confidence value (WCVs) is adjusted down. If there is no abnormality, the touch screen is judged whether it is touched according to the self-capacitance data, and the no-touch water recognition module or the touch water recognition module is entered. Exemplarily, if the other data in the self-capacitance data is relatively large, and there are one or more relatively small data, it is considered that there is an abnormality; if the other data in the self-capacitance data is relatively small, and there are one or more relatively large data, it is considered that there is an abnormality. The abnormal judgment of mutual capacitance data is similar, which will not be repeated here.
[0075] Optionally, if an abnormality exists, reducing the confidence value may include: if an abnormality exists, reducing the confidence value according to a first preset step length, that is, subtracting the first preset step length from the confidence value to obtain a confidence value minus the first preset step length, which can be considered as the confidence value of the current scan frame.
[0076] 2. Whether there is touch judgment
[0077] Optionally, the method may also include: if there is no abnormality, determining whether the touch screen is touched based on the self-capacitance data or the mutual capacitance data; when the touch screen is not touched, performing suspected water area and single water area detection, updating the confidence value, and obtaining the confidence value of the current scanning frame; when the touch screen is touched, performing two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection, updating the confidence value, and obtaining the confidence value of the current scanning frame.
[0078] 1. No-touch water recognition
[0079] Optionally, when the touch screen is not touched, performing suspected water area detection may include: when the touch screen is not touched, obtaining eight connected domains in the mutual capacitance data that are smaller than the mutual capacitance water threshold; excluding connected domains in the eight connected domains whose areas are larger than a first preset threshold and smaller than a second preset threshold to obtain remaining connected domains, and determining an external matrix of the remaining connected domains; when there is positive mutual capacitance data in the external matrix, taking the remaining connected domains as the first suspected water area;
[0080] Performing separate water region detection may include: determining whether there is self-capacitance data less than a self-capacitance water threshold in the first suspected water region; if so, determining that the first suspected water region is a real water region; otherwise, determining that the first suspected water region is not a real water region;
[0081] The updating of the confidence value to obtain the confidence value of the current scanning frame may include:
[0082] When the first suspected water area is a real water area, the confidence value is increased and the increased confidence value is used as the confidence value of the current scanning frame; when the first suspected water area is not a real water area, the confidence value is decreased and the decreased confidence value is used as the confidence value of the current scanning frame.
[0083] Optionally, when the first suspected water region is a real water region, increasing the confidence value may include: when the first suspected water region is a real water region, increasing the confidence value according to a second preset step length. That is, adding the second preset step length to the confidence value to obtain a confidence value with the second preset step length added thereto may be considered as the confidence value of the current scan frame.
[0084] Optionally, when the first suspected water region is not a real water region, reducing the confidence value may include: when the first suspected water region is not a real water region, reducing the confidence value according to a first preset step length. That is, subtracting the first preset step length from the confidence value to obtain a confidence value minus the first preset step length, which can be considered as the confidence value of the current scan frame.
[0085] Optionally, the first preset step length and the second preset step length may be the same or different, which is not limited here.
[0086] Optionally, determining whether there is self-capacitance data less than the self-capacitance water threshold in the first suspected water area may include: determining whether there are rows or columns of tx (transmitting electrode) and rx (receiving electrode) data of the self-capacitance data in the first suspected water area that are less than the self-capacitance water threshold.
[0087] Optionally, when the touch screen is not touched, suspected water area and separate water area detection are performed, which may include: when the touch screen is not touched, after suspected water area detection and water-like area exclusion according to the mutual capacitance data, determining whether it is a real water area according to separate water area detection.
[0088] Optionally, when the touch screen is not touched, after performing suspected water area detection and excluding water-like areas according to the mutual capacitance data, determining whether it is a real water area based on a separate water area detection may include: when the touch screen is not touched, after performing suspected water area detection according to the mutual capacitance data, a first suspected water area is obtained, and after excluding water-like areas from the first suspected water area, a first suspected water area is obtained after the water-like areas are excluded.
[0089] It is understandable that the touch-free water identification module includes suspected water area detection, water-like area exclusion and water-only area detection submodules, wherein the water-like area exclusion submodule is optional.
[0090] The specific process of suspected water area detection is as follows: obtain all eight connected domains that are smaller than the mutual capacitance water threshold in the mutual capacitance data, exclude the connected domains that are too large or too small in the eight connected domains, and obtain the remaining connected domains; obtain the external matrix of the remaining connected domains. If there is positive mutual capacitance data in the external matrix, the remaining connected domains can be used as suspected water areas. The purpose of excluding water-like areas is to exclude the negative pit connected domains generated by water-like objects such as copper pillars in the suspected water area, and obtain the suspected water area with higher accuracy. Figure 3A , which is a schematic diagram of a negative pit connected domain in typical mutual capacitance data in an embodiment of the present application. Figure 3A As shown, there is a hollow annular negative pit connected domain.
[0091] The purpose of Wateronly detection is to determine whether there is self-capacitance data less than the self-capacitance water threshold in the first suspected water area (or the first suspected water area after the water-like area is excluded) without touching; if so, the first suspected water area (or the first suspected water area after the water-like area is excluded) is determined to be a real water area, and the confidence value is increased; if not, the first suspected water area (or the first suspected water area after the water-like area is excluded) is determined not to be a real water area, and the confidence value is decreased. Figure 3B Shown is a schematic diagram of separate water area detection in an embodiment of the present application.
[0092] 2. With touch water recognition
[0093] Optionally, when the touch screen is touched, performing two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection, updating the confidence value, and obtaining the confidence value of the current scanning frame may include: when the touch screen is touched, performing two-finger coaxial detection according to the mutual capacitance data to determine whether there is no two-finger coaxial interference; when it is determined that there is no two-finger coaxial interference, performing suspected water area detection according to the mutual capacitance data to obtain a second suspected water area; judging whether there is water interference in the touch area, performing real water area detection, and determining whether the second suspected water area is a real water area; when it is determined that the second suspected water area is a real water area, updating the confidence value to obtain the confidence value of the current scanning frame.
[0094] Optionally, the second suspected water region may be subjected to water-like region exclusion to obtain the second suspected water region after the water-like region is excluded. The subsequent second suspected water region may be described as the second suspected water region after the water-like region is excluded.
[0095] Optionally, when the touch screen is touched, two-finger coaxial detection is performed to determine whether there is no two-finger coaxial interference, which may include: when the touch screen is touched, if there are at least two target areas in the mutual capacitance data of the touch area that are greater than the mutual capacitance touch threshold, and the areas of the at least two target areas are greater than the area threshold, and the same row or column exists in the at least two target areas, then it is determined that there is two-finger coaxial interference in the touch area; otherwise, it is determined that there is no two-finger coaxial interference in the touch area.
[0096] Optionally, the judging whether there is water interference in the touch area, performing real water area detection, and determining whether the second suspected water area is a real water area may include: judging whether there is water interference in the touch area according to the mutual capacitance data; if there is water interference, performing touch tail detection to determine whether the second suspected water area is a real water area;
[0097] When it is determined that the second suspected water area is a real water area, updating the confidence value to obtain the confidence value of the current scanning frame may include: when it is determined that the second suspected water area is a real water area, updating the confidence value according to the current weight value to obtain the confidence value of the current scanning frame.
[0098] Optionally, judging whether water interference exists in the touch area according to the mutual capacitance data may include: performing at least one of multi-peak touch recognition and residual touch recognition on the mutual capacitance data to judge whether water interference exists in the touch area.
[0099] Optionally, performing at least one of multi-peak touch recognition and residual touch recognition on the mutual capacitance data to determine whether there is water interference in the touch area may include: if there are multiple peaks in the mutual capacitance data, it is determined that there is water interference in the touch area; and / or, among the areas greater than the mutual capacitance threshold in the mutual capacitance data, there is an area less than a first area threshold, and there is an area greater than a second area threshold, it is determined that there is water interference in the touch area.
[0100] Optionally, after multi-peak touch recognition is performed on the mutual capacitance data, it is determined that there is no water interference in the touch area, and then residual touch recognition is performed to determine whether there is water interference in the touch area. Alternatively, residual touch recognition can be performed on the mutual capacitance data first, and after determining that there is no water interference in the touch area, multi-peak touch recognition can be performed to determine whether there is water interference in the touch area.
[0101] The purpose of multi-peak touch recognition and residual touch recognition is to determine whether there is water interference in the touch area when there is touch, which causes the touch area to have multiple peaks (multi-peaks) and residuals in the area where the finger has passed. Figure 3C, which is a schematic diagram of a multi-peak touch area in an embodiment of the present application. Figure 3C As shown in the figure, the data around 637 and 619 are smaller than them, so 637 and 619 can be considered as two peaks. Figure 3D , which is a schematic diagram of residual touch in an embodiment of the present application. Figure 3D As shown, among the areas greater than the mutual capacitance threshold, there are areas greater than the second area threshold and there are areas less than the first area threshold, which indicates that water interference exists.
[0102] Optionally, if there is water interference, performing touch tail detection to determine whether the second suspected water area is a real water area may include: if there is water interference, determining whether there is a positive value greater than the mutual capacitance touch threshold, and a negative value less than the mutual capacitance water threshold in the first mutual capacitance data, the first mutual capacitance data being the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance touch threshold in the second suspected water area (i.e., determining whether there is a positive value greater than the mutual capacitance touch threshold, and a negative value less than the mutual capacitance water threshold in the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance touch threshold in the second suspected water area); if so, determining that the second suspected water area is a real water area.
[0103] It can be understood that the touch tail detection part can determine whether there is water on the current screen surface. Exemplarily, first obtain the rows or columns of self-capacitance data whose tx and rx are less than the self-capacitance touch threshold, then obtain the corresponding mutual capacitance row data or mutual capacitance column data, and finally determine whether each mutual capacitance row data or mutual capacitance column data simultaneously contains a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold; if so, the second suspected water area is determined to be a real water area, and the confidence value WCVs is updated according to the first formula.
[0104] Optionally, the method may further include: calculating the current weight value based on the number of fingers on the touch screen in the screen-on state; updating the confidence value based on the current weight value to obtain the confidence value of the current scanning frame may include: updating the confidence value based on the current weight value and a preset step size to obtain the confidence value of the current scanning frame.
[0105] Optionally, the current weight value is negatively correlated with the number of fingers on the touch screen in the bright screen state, that is, the more fingers on the touch screen, the smaller the current weight value, and the fewer fingers on the touch screen, the larger the current weight value.
[0106] For example, a mapping table of the number of fingers and weight values may be stored locally. When the number of fingers on the touch screen is detected, the corresponding weight value may be searched according to the number of fingers as the current weight value.
[0107] Optionally, updating the confidence value according to the current weight value and the preset step size to obtain the confidence value of the current scan frame may include: updating the confidence value according to a first formula to obtain the confidence value of the current scan frame;
[0108] The first formula is: V2 = V1 + a*B;
[0109] Among them, V2 is the confidence value of the current scanning frame, V1 is the confidence value of the previous scanning frame, B is the preset step size, that is, the second preset step size mentioned above, and a is the current weight value.
[0110] It can be understood that the purpose of the touch water recognition module is to determine whether there is water on the touch screen when there is touch, and it mainly includes eight sub-modules: two-finger coaxial detection, suspected water area detection, weight value calculation, multi-peak touch recognition, residual touch recognition, touch tail detection, water tail detection and water only area detection sub-module.
[0111] In the suspended state, the coaxial interference of two thumbs will cause the screen mutual capacitance data to produce a negative pit connected domain similar to water, which is easy to mistakenly enter the waterproof mode. Therefore, the two-finger coaxial detection is to identify whether there is coaxial two-thumb interference (referred to as two-finger coaxial interference) on the current screen based on the area size of the mutual capacitance data greater than the touch threshold when the two fingers touch the screen, the size of the mutual capacitance data, and the overlap of the two fingers. Figure 3E As shown, it is a schematic diagram of the existence of two-finger coaxial interference in the embodiment of the present application. If there is no two-finger coaxial interference, suspected water area detection can be further performed, and the suspected water area detection is consistent with the suspected water area detection in the notouch water recognition module, which will not be repeated here. The weight value calculation part calculates the weight value (touchAccRate) of the current scan frame according to the number of fingers (touch number) on the screen in the bright screen state, and the value is 0.0-1.0. Generally speaking, the fewer the number of fingers, the more reliable the screen self-capacitance data and mutual capacitance data, the more accurate the recognition result, and the larger the weight value, the greater the amplitude of the confidence value WCVs adjustment.
[0112] Exemplarily, the first formula can also be expressed as:
[0113] waterConfidenceValue+=touchAccRate *waterTouchBase (Formula 1)
[0114] Among them, waterTouchBase is the second preset step length for increasing the confidence value when the touch water recognition module satisfies the single water recognition, and touchAccRate is the weight for increasing the second preset step length.
[0115] Optionally, the method may further include: if there is no water interference, determining whether the second suspected water area and the touch area have the same row or column;
[0116] If they have the same row or column, water tail detection is performed to determine whether the second suspected water region is a real water region; when the second suspected water region is determined to be a real water region, updating the confidence value to obtain the confidence value of the current scan frame may include: when the second suspected water region is determined to be a real water region, updating the confidence value according to the current weight value;
[0117] If there are no identical rows or columns, a separate water area detection is performed to determine whether the second suspected water area is a real water area; when the second suspected water area is determined to be a real water area, the confidence value is updated to obtain the confidence value of the current scanning frame, which may include: when the second suspected water area is determined to be a real water area, increasing the confidence value; when the second suspected water area is determined not to be a real water area, decreasing the confidence value.
[0118] Optionally, when determining that the second suspected water region is a real water region, increasing the confidence value may include: when determining that the second suspected water region is a real water region, increasing the confidence value according to a second preset step length. That is, adding the second preset step length to the confidence value to obtain the confidence value with the second preset step length added, which can be considered as the confidence value of the current scan frame.
[0119] Optionally, when it is determined that the second suspected water region is not a real water region, reducing the confidence value may include: when it is determined that the second suspected water region is not a real water region, reducing the confidence value according to a first preset step length. That is, the confidence value minus the first preset step length is obtained by subtracting the first preset step length from the confidence value, which can be considered as the confidence value of the current scan frame.
[0120] Optionally, the first preset step length and the second preset step length may be the same or different, which is not limited here.
[0121] Optionally, if they have the same rows or columns, water trailing detection is performed to determine whether the second suspected water area is a real water area, which may include: if they have the same rows or columns, determining whether there is a positive value greater than the mutual capacitance touch threshold, and a negative value less than the mutual capacitance water threshold in the second mutual capacitance data, the second mutual capacitance data being the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance water threshold in the second suspected water area (i.e., determining whether there is a positive value greater than the mutual capacitance touch threshold, and a negative value less than the mutual capacitance water threshold in the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance water threshold in the second suspected water area); if so, determining that the second suspected water area is a real water area.
[0122] Optionally, if they do not have the same rows or columns, performing a separate water area detection to determine whether the second suspected water area is a real water area may include: if they do not have the same rows or columns, determining whether there is self-capacitance data less than a self-capacitance water threshold in the second suspected water area; if so, determining that the second suspected water area is a real water area; otherwise, determining that the second suspected water area is not a real water area.
[0123] It is understandable that if multi-peak touch recognition and residual touch recognition determine that there is no water interference, further judgment is made based on whether the second suspected water area and the touch area in the mutual capacitance data have the same rows and columns. If there are no identical rows and columns, wateronly detection is performed. The specific steps are consistent with the wateronly detection part in the notouch recognition module and will not be repeated here; if there are identical rows and columns, watertail detection is performed. The purpose of watertail detection is to determine, in the case of touch, whether there are rows or columns of tx and rx data of the self-capacitance data of the second suspected water area that are less than the self-capacitance water threshold, and whether the mutual capacitance data of the corresponding rows or columns simultaneously have positive values greater than the mutual capacitance touch threshold and negative values less than the mutual capacitance water threshold; if so, the area is identified as a real water area, and then the confidence value is updated according to the first formula. Figure 3F , which is a schematic diagram of the results of water tailing detection in an embodiment of the present application. Figure 3F As shown in the figure, in the rectangular area, assuming that the mutual capacitance touch threshold is 260, there is a positive value "301" greater than the mutual capacitance touch threshold; assuming that the mutual capacitance water threshold is -200, there are negative values "-333 and -274" less than the mutual capacitance water threshold. Therefore, the second suspected water area can be considered as a real water area.
[0124] For example, Figure 3G As shown, it is a flow chart of a touch water recognition module in an embodiment of the present application. Figure 3GAs shown, two-finger coaxial detection can be performed, and in the case where there is no two-finger coaxial interference, suspected water area detection is performed. When it is determined that it is a suspected water area, a weight value is calculated, and then multi-peak touch recognition is performed to determine that there is water interference, and touch tail detection is performed; when multi-peak touch recognition determines that there is no water interference, residual touch recognition is performed to determine that there is water interference, and touch tail detection is performed; when residual touch recognition determines that there is no water interference, it is determined whether the suspected water area and the touch area have the same row or column, and if the same row or column exists, water tail detection is performed; otherwise, water only area detection is performed; when the touch tail detection, or, water tail detection, or, water only area detection, determines that the suspected water area is a real water area, the confidence value is updated according to the first formula above.
[0125] 3. Counter module
[0126] Optionally, the method may also include: obtaining the confidence value of the previous scanning frame; calculating the absolute value of the difference between the confidence value of the previous scanning frame and the confidence value of the current scanning frame; when the absolute value of the difference is less than the minimum preset difference, adding 1 to the counter; otherwise, clearing or reducing the value of the counter; when the value of the counter reaches the preset value, reducing the confidence value of the current scanning frame to obtain the adjusted confidence value of the current scanning frame.
[0127] It is understandable that the confidence value will not be reduced during the touch process. However, in actual situations, there will be a small number of special scanning frames (occasional scanning frames) that will satisfy touch water recognition, thereby increasing the confidence value. The occasional scanning frames accumulated over a long period of time will inevitably gradually increase the confidence value, causing the entry / exit waterproof mode module to mistakenly enter the waterproof mode. Since these occasional scanning frames are basically small and discontinuous, the counter module can solve the problem of mistakenly entering the waterproof mode due to the accumulation of occasional scanning frames based on this feature. The general idea is as follows: calculate the absolute value of the difference between the confidence value of the previous scanning frame and the confidence value of the current scanning frame; if the absolute value of the difference is less than the minimum preset difference, the current scanning frame is considered to be a continuous scanning frame, and the counter can be added by 1; otherwise, it is cleared, or the value of the counter is reduced. Further, assuming that the waterproof mode is not currently entered and the counter reaches the preset value, the confidence value of the current scanning frame is adjusted down to obtain the adjusted confidence value of the current scanning frame.
[0128] 203. Determine whether to enter or exit a waterproof mode according to the confidence value of the current scan frame.
[0129] Optionally, judging whether to enter or exit the waterproof mode based on the confidence value of the current scanning frame may include: when the confidence value of the current scanning frame is greater than a first waterproof threshold, setting the confidence value of the current scanning frame to the first waterproof threshold and entering the waterproof mode; when the confidence value of the current scanning frame is less than a second waterproof threshold, setting the confidence value of the current scanning frame to the second waterproof threshold and exiting the waterproof mode; wherein the first waterproof threshold is greater than the second waterproof threshold.
[0130] It is understandable that the module for entering / exiting the waterproof mode is updated in real time to obtain the confidence value of the current scan frame, and truncation processing can also be performed (if the updated confidence value WCVs is greater than the first waterproof threshold (WaterInThd), the confidence value of the current scan frame is set to WaterInThd, and similarly, if the updated confidence value is less than the second waterproof threshold (WaterOutThd), the confidence value of the current scan frame is set to WaterOutThd). Then, according to the confidence value of the current scan frame, it is judged to enter (≥WaterInThd) or exit the waterproof mode (≤WaterInThd).
[0131] Optionally, the method may further include: if the confidence value of the current scan frame is neither greater than the first waterproof threshold nor less than the second waterproof threshold, keeping the current state unchanged.
[0132] Compared with the prior art, the technical solution of this application calculates the confidence value (WCVs) of the current scanning frame of the waterproof mode in different scenarios based on at least one of the self-capacitance data and mutual capacitance data of the current scanning frame, thereby increasing the rate of entering the waterproof mode; constructs a reasonable abnormal data processing and entry / exit mechanism to reduce the misrecognition rate of interference scenes and accurately detect whether there is water on the screen. The traditional solution requires additional scanning frames, while the technical solution of this application provides a universal algorithm recognition strategy that does not require hardware cooperation, which can reduce the power consumption of hardware scanning and increase the scanning frame rate in principle.
[0133] Different from the traditional solution, this solution introduces an abnormal data detection module, a counter module and an entry / exit update module. By adjusting the confidence value in real time, it effectively eliminates abnormal data, identifies interference scenes, reduces the misentry rate of interference scenes, and improves the normal touch experience. In touch recognition and notouch recognition, the technical solution of this application can adaptively set different confidence values according to the credibility differences of different scenes, so that the recognition algorithm can quickly enter the waterproof mode and reduce the response delay.
[0134] In an embodiment of the present application, the capacitance data of the touch screen in the current scanning frame is obtained, and the capacitance data includes at least one of self-capacitance data and mutual capacitance data; the confidence value is updated according to the capacitance data to obtain the confidence value of the current scanning frame, and the confidence value is used to characterize the degree of credibility of the presence of water on the surface of the touch screen; according to the confidence value of the current scanning frame, it is determined whether to enter or exit the waterproof mode. According to at least one of the self-capacitance data and mutual capacitance data of the current frame, the confidence value (WCVs) corresponding to the waterproof mode is updated to reduce the false recognition rate of the interference scene, accurately detect whether there is water on the screen, and increase the speed of entering the waterproof mode.
[0135] like Figure 4 FIG. 1 is a schematic diagram of an embodiment of a water detection device for a touch screen in an embodiment of the present application, which may include:
[0136] An acquisition module 401 is used to acquire capacitance data of the touch screen in a current scanning frame, where the capacitance data includes at least one of self-capacitance data and mutual capacitance data;
[0137] Processing module 402 is used to update the confidence value according to the capacitance data to obtain the confidence value of the current scanning frame, and the confidence value is used to characterize the degree of confidence that water exists on the touch screen surface; update the confidence value according to the capacitance data to obtain the confidence value of the current scanning frame, and the confidence value is used to characterize the degree of confidence that water exists on the touch screen surface.
[0138] Optionally, the processing module 402 is specifically used to detect whether there is an abnormality in the capacitance data; if there is an abnormality, the confidence value is reduced, and the reduced confidence value is used as the confidence value of the current scanning frame.
[0139] Optionally, the processing module 402 is also used to determine whether the touch screen is touched based on the self-capacitance data or the mutual capacitance data if no abnormality exists; when the touch screen is not touched, perform suspected water area and single water area detection, update the confidence value, and obtain the confidence value of the current scanning frame; when the touch screen is touched, perform two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection, update the confidence value, and obtain the confidence value of the current scanning frame.
[0140] Optionally, the processing module 402 is specifically used to obtain eight connected domains in the mutual capacitance data that are smaller than the mutual capacitance water threshold when the touch screen is not touched; exclude the connected domains in the eight connected domains whose area is greater than the first preset threshold and less than the second preset threshold to obtain the remaining connected domains, and determine the external matrix of the remaining connected domains; when there is positive mutual capacitance data in the external matrix, use the remaining connected domains as the first suspected water area; determine whether there is self-capacitance data less than the self-capacitance water threshold in the first suspected water area; if so, determine that the first suspected water area is a real water area; otherwise, determine that the first suspected water area is not a real water area; when the first suspected water area is a real water area, increase the confidence value and use the increased confidence value as the confidence value of the current scanning frame; when the first suspected water area is not a real water area, reduce the confidence value and use the reduced confidence value as the confidence value of the current scanning frame.
[0141] Optionally, the processing module 402 is specifically used to perform two-finger coaxial detection based on the mutual capacitance data to determine whether there is no two-finger coaxial interference when the touch screen is touched; when it is determined that there is no two-finger coaxial interference, perform suspected water area detection based on the mutual capacitance data to obtain a second suspected water area; determine whether there is water interference in the touch area, perform real water area detection to determine whether the second suspected water area is a real water area; when it is determined that the second suspected water area is a real water area, update the confidence value to obtain the confidence value of the current scanning frame.
[0142] Optionally, the processing module 402 is specifically used to determine whether there is water interference in the touch area based on the mutual capacitance data; if there is water interference, perform touch tail detection to determine whether the second suspected water area is a real water area; when it is determined that the second suspected water area is a real water area, update the confidence value according to the current weight value to obtain the confidence value of the current scanning frame.
[0143] Optionally, the processing module 402 is specifically configured to perform at least one of multi-peak touch recognition and residual touch recognition on the mutual capacitance data to determine whether water interference exists in the touch area.
[0144] Optionally, the processing module 402 is specifically used to determine that there is water interference in the touch area if there are multiple peaks in the mutual capacitance data; and / or, if, among the areas greater than the mutual capacitance threshold in the mutual capacitance data, there is an area less than a first area threshold, and there is an area greater than a second area threshold, then it is determined that there is water interference in the touch area.
[0145] Optionally, the processing module 402 is specifically used to determine whether there is a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold in the first mutual capacitance data if water interference exists, and the first mutual capacitance data is the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance touch threshold in the second suspected water area; if so, it is determined that the second suspected water area is a real water area.
[0146] Optionally, the processing module 402 is also used to calculate the current weight value according to the number of fingers on the touch screen in the bright screen state; specifically, it is used to update the confidence value according to the current weight value and a preset step size to obtain the confidence value of the current scanning frame.
[0147] Optionally, the processing module 402 is specifically configured to update the confidence value according to a first formula to obtain the confidence value of the current scanning frame; the first formula is: V2=V1+a*B;
[0148] Among them, V2 is the confidence value of the current scanning frame, V1 is the confidence value of the previous scanning frame, a is the current weight value, and B is the preset step size.
[0149] Optionally, the processing module 402 is also used to determine whether the second suspected water area and the touch area have the same rows or columns if there is no water interference; if they have the same rows or columns, perform water tail detection to determine whether the second suspected water area is a real water area; specifically, when it is determined that the second suspected water area is a real water area, update the confidence value according to the current weight value; if they do not have the same rows or columns, perform a separate water area detection to determine whether the second suspected water area is a real water area; specifically, when it is determined that the second suspected water area is a real water area, increase the confidence value; when it is determined that the second suspected water area is a real water area, reduce the confidence value.
[0150] Optionally, the processing module 402 is specifically used to determine whether there is a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold in the second mutual capacitance data if they have the same rows or columns, and the second mutual capacitance data is the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance water threshold in the second suspected water area; if so, it is determined that the second suspected water area is a real water area.
[0151] Optionally, the processing module 402 is specifically used to determine whether there is self-capacitance data less than the self-capacitance water threshold in the second suspected water area if they do not have the same rows or columns; if so, determine that the second suspected water area is a real water area; otherwise, determine that the second suspected water area is not a real water area.
[0152] Optionally, the processing module 402 is also used to obtain the confidence value of the previous scanning frame; calculate the absolute value of the difference between the confidence value of the previous scanning frame and the confidence value of the current scanning frame; when the absolute value of the difference is less than the minimum preset difference, add 1 to the counter; otherwise, clear or reduce the value of the counter; when the value of the counter reaches the preset value, reduce the confidence value of the current scanning frame to obtain the adjusted confidence value of the current scanning frame.
[0153] Optionally, the processing module 402 is specifically used to set the confidence value of the current scanning frame to the first waterproof threshold and enter the waterproof mode when the confidence value of the current scanning frame is greater than the first waterproof threshold; and to set the confidence value of the current scanning frame to the second waterproof threshold and exit the waterproof mode when the confidence value of the current scanning frame is less than the second waterproof threshold; wherein the first waterproof threshold is greater than the second waterproof threshold.
[0154] like Figure 5 As shown, it is a schematic diagram of an embodiment of a terminal device in an embodiment of the present application, which may include: Figure 4 The water detection device of the touch screen is shown.
[0155] In the embodiment of the present application, the terminal device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc.
[0156] As an example but not limitation, in the embodiments of the present application, the terminal device may also be a wearable device. Wearable devices may also be referred to as wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also powerful functions achieved through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include full-featured, large-sized, and fully or partially independent of smartphones, such as smart watches or smart glasses, as well as devices that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various types of smart bracelets and smart jewelry for vital sign monitoring.
[0157] like Figure 6 As shown, it is a schematic diagram of another embodiment of the terminal device in the embodiment of the present application, which may include:
[0158] Combine the following Figure 6 A detailed introduction to the various components of the mobile phone in the terminal device:
[0159] The RF circuit 610 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 680 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 610 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the RF circuit 610 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.
[0160] The memory 620 can be used to store software programs and modules. The processor 680 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 620. The memory 620 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 620 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0161] The input unit 630 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 630 may include a touch panel 631 and other input devices 632. The touch panel 631, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 631 or near the touch panel 631 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 631 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 680, and can receive and execute commands sent by the processor 680. In addition, the touch panel 631 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 631, the input unit 630 may also include other input devices 632. Specifically, the other input devices 632 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.
[0162] The display unit 640 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 640 may include a display panel 641. Optionally, the display panel 641 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 631 may cover the display panel 641. When the touch panel 631 detects a touch operation on or near it, it is transmitted to the processor 680 to determine the type of touch event. Subsequently, the processor 680 provides a corresponding visual output on the display panel 641 according to the type of touch event. Although in Figure 6 In the embodiment, the touch panel 631 and the display panel 641 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 631 and the display panel 641 can be integrated to realize the input and output functions of the mobile phone.
[0163] The mobile phone may also include at least one sensor 650, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 641 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 641 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.
[0164] The audio circuit 660, the speaker 661, and the microphone 662 can provide an audio interface between the user and the mobile phone. The audio circuit 660 can transmit the received audio data to the speaker 661 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 662 converts the collected sound signal into an electrical signal, which is received by the audio circuit 660 and converted into audio data, and then the audio data is output to the processor 680 for processing, and then sent to another mobile phone through the RF circuit 610, or the audio data is output to the memory 620 for further processing.
[0165] Wi-Fi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the Wi-Fi module 670, which provides users with wireless broadband Internet access. Figure 6A Wi-Fi module 670 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0166] The processor 680 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 620, and calling data stored in the memory 620, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 680 may include one or more processing units; preferably, the processor 680 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 680.
[0167] The mobile phone also includes a power supply 690 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 680 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions.
[0168] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0169] In the embodiment of the present application, the processor 680 is configured to perform the following steps:
[0170] Acquire capacitance data of the touch screen in a current scanning frame, wherein the capacitance data includes at least one of self-capacitance data and mutual capacitance data; update a confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, wherein the confidence value is used to characterize the degree of confidence that water exists on the surface of the touch screen; update the confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, wherein the confidence value is used to characterize the degree of confidence that water exists on the surface of the touch screen.
[0171] Optionally, the processor 680 is specifically used to detect whether there is an abnormality in the capacitance data; if there is an abnormality, the confidence value is reduced, and the reduced confidence value is used as the confidence value of the current scanning frame.
[0172] Optionally, the processor 680 is also used to determine whether the touch screen is touched based on the self-capacitance data or the mutual capacitance data if no abnormality exists; when the touch screen is not touched, perform suspected water area and single water area detection, update the confidence value, and obtain the confidence value of the current scanning frame; when the touch screen is touched, perform two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection, update the confidence value, and obtain the confidence value of the current scanning frame.
[0173] Optionally, processor 680 is specifically used to obtain eight connected domains in the mutual capacitance data that are smaller than the mutual capacitance water threshold when the touch screen is not touched; exclude the connected domains in the eight connected domains whose area is greater than the first preset threshold and less than the second preset threshold to obtain the remaining connected domains, and determine the external matrix of the remaining connected domains; when there is positive mutual capacitance data in the external matrix, use the remaining connected domains as the first suspected water area; determine whether there is self-capacitance data less than the self-capacitance water threshold in the first suspected water area; if so, determine that the first suspected water area is a real water area; otherwise, determine that the first suspected water area is not a real water area; when the first suspected water area is a real water area, increase the confidence value and use the increased confidence value as the confidence value of the current scanning frame; when the first suspected water area is not a real water area, reduce the confidence value and use the reduced confidence value as the confidence value of the current scanning frame.
[0174] Optionally, processor 680 is specifically used to perform two-finger coaxial detection based on the mutual capacitance data to determine whether there is no two-finger coaxial interference when the touch screen is touched; when it is determined that there is no two-finger coaxial interference, perform suspected water area detection based on the mutual capacitance data to obtain a second suspected water area; determine whether there is water interference in the touch area, perform real water area detection to determine whether the second suspected water area is a real water area; when it is determined that the second suspected water area is a real water area, update the confidence value to obtain the confidence value of the current scanning frame.
[0175] Optionally, the processor 680 is specifically used to determine whether there is water interference in the touch area based on the mutual capacitance data; if there is water interference, perform touch tail detection to determine whether the second suspected water area is a real water area; when it is determined that the second suspected water area is a real water area, update the confidence value according to the current weight value to obtain the confidence value of the current scanning frame.
[0176] Optionally, the processor 680 is specifically configured to perform at least one of multi-peak touch recognition and residual touch recognition on the mutual capacitance data to determine whether water interference exists in the touch area.
[0177] Optionally, the processor 680 is specifically used to determine that there is water interference in the touch area if there are multiple peaks in the mutual capacitance data; and / or, if, among the areas greater than the mutual capacitance threshold in the mutual capacitance data, there is an area less than a first area threshold, and there is an area greater than a second area threshold, then determine that there is water interference in the touch area.
[0178] Optionally, processor 680 is specifically used to determine whether there is a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold in the first mutual capacitance data if water interference exists, and the first mutual capacitance data is the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance touch threshold in the second suspected water area; if so, it is determined that the second suspected water area is a real water area.
[0179] Optionally, the processor 680 is further used to calculate the current weight value according to the number of fingers on the touch screen in the bright screen state; specifically, it is used to update the confidence value according to the current weight value and a preset step size to obtain the confidence value of the current scanning frame.
[0180] Optionally, the processor 680 is specifically configured to update the confidence value according to a first formula to obtain the confidence value of the current scan frame; the first formula is: V2=V1+a*B;
[0181] Among them, V2 is the confidence value of the current scanning frame, V1 is the confidence value of the previous scanning frame, a is the current weight value, and B is the preset step size.
[0182] Optionally, processor 680 is further used to determine whether the second suspected water area and the touch area have the same rows or columns if there is no water interference; if they have the same rows or columns, perform water tail detection to determine whether the second suspected water area is a real water area; specifically, when it is determined that the second suspected water area is a real water area, update the confidence value according to the current weight value; if they do not have the same rows or columns, perform a separate water area detection to determine whether the second suspected water area is a real water area; specifically, when it is determined that the second suspected water area is a real water area, increase the confidence value; when it is determined that the second suspected water area is a real water area, reduce the confidence value.
[0183] Optionally, processor 680 is specifically used to determine whether there is a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold in the second mutual capacitance data if they have the same rows or columns, and the second mutual capacitance data is the mutual capacitance data corresponding to the self-capacitance data less than the self-capacitance water threshold in the second suspected water area; if so, it is determined that the second suspected water area is a real water area.
[0184] Optionally, the processor 680 is specifically used to determine whether there is self-capacitance data less than the self-capacitance water threshold in the second suspected water area if they do not have the same rows or columns; if so, determine that the second suspected water area is a real water area; otherwise, determine that the second suspected water area is not a real water area.
[0185] Optionally, processor 680 is also used to obtain the confidence value of the previous scanning frame; calculate the absolute value of the difference between the confidence value of the previous scanning frame and the confidence value of the current scanning frame; when the absolute value of the difference is less than the minimum preset difference, add 1 to the counter; otherwise, clear or reduce the value of the counter; when the value of the counter reaches the preset value, reduce the confidence value of the current scanning frame to obtain the adjusted confidence value of the current scanning frame.
[0186] Optionally, processor 680 is specifically used to set the confidence value of the current scanning frame to the first waterproof threshold and enter the waterproof mode when the confidence value of the current scanning frame is greater than the first waterproof threshold; and set the confidence value of the current scanning frame to the second waterproof threshold and exit the waterproof mode when the confidence value of the current scanning frame is less than the second waterproof threshold; wherein the first waterproof threshold is greater than the second waterproof threshold.
[0187] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (Digital Subscriber Line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server, data center, etc. that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).
[0188] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0189] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0190] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0191] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0192] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.
[0193] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A water detection method for a touch screen, characterized in that: include: Acquire capacitance data of the touch screen in a current scanning frame, where the capacitance data includes at least one of self-capacitance data and mutual capacitance data; updating a confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, wherein the confidence value is used to characterize the degree of confidence that water exists on the surface of the touch screen; Entering or exiting the waterproof mode is determined according to the confidence value of the current scanning frame.
2. The method according to claim 1, characterized in that The updating of the confidence value according to the capacitance data to obtain the confidence value of the current scanning frame includes: Detecting whether the capacitance data is abnormal; If there is an abnormality, the confidence value is reduced, and the reduced confidence value is used as the confidence value of the current scanning frame.
3. The method according to claim 2, characterized in that The method further comprises: If there is no abnormality, determining whether the touch screen is touched according to the self-capacitance data or the mutual capacitance data; When the touch screen is not touched, performing suspected water area and separate water area detection, updating the confidence value, and obtaining the confidence value of the current scan frame; When the touch screen is touched, two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection are performed, and the confidence value is updated to obtain the confidence value of the current scanning frame.
4. The method according to claim 3, characterized in that When the touch screen is not touched, suspected water area detection is performed, including: When the touch screen is not touched, acquiring eight connected domains in the mutual capacitance data that are less than a mutual capacitance water threshold; Eliminate the connected domains whose areas are greater than a first preset threshold and less than a second preset threshold in the eight connected domains to obtain remaining connected domains, and determine the circumscribed matrix of the remaining connected domains; When there is positive mutual capacitance data in the external matrix, taking the remaining connected domain as a first suspected water region; Conduct individual water area inspections including: Determining whether there is self-capacitance data less than a self-capacitance water threshold in the first suspected water area; If so, determining the first suspected water area to be a real water area; Otherwise, determining that the first suspected water area is not a real water area; The updating of the confidence value to obtain the confidence value of the current scanning frame includes: In the case where the first suspected water area is a real water area, increasing the confidence value, and using the increased confidence value as the confidence value of the current scanning frame; In the case that the first suspected water region is not a real water region, the confidence value is reduced, and the reduced confidence value is used as the confidence value of the current scanning frame.
5. The method according to claim 3, characterized in that: When the touch screen is touched, performing two-finger coaxial interference, suspected water area detection, weight value calculation, water interference detection and real water area detection, updating the confidence value, and obtaining the confidence value of the current scan frame includes: When the touch screen is touched, performing two-finger coaxial detection according to the mutual capacitance data to determine whether there is no two-finger coaxial interference; When it is determined that there is no two-finger coaxial interference, performing suspected water area detection according to the mutual capacitance data to obtain a second suspected water area; Determine whether there is water interference in the touch area, perform real water area detection, and determine whether the second suspected water area is a real water area; When it is determined that the second suspected water region is a real water region, the confidence value is updated to obtain the confidence value of the current scanning frame.
6. The method according to claim 5, characterized in that The determining whether there is water interference in the touch area, performing real water area detection, and determining whether the second suspected water area is a real water area includes: determining whether there is water interference in the touch area according to the mutual capacitance data; If water interference exists, touch tail detection is performed to determine whether the second suspected water area is a real water area; When determining that the second suspected water region is a real water region, updating the confidence value to obtain the confidence value of the current scanning frame includes: When it is determined that the second suspected water region is a real water region, the confidence value is updated according to the current weight value to obtain the confidence value of the current scanning frame.
7. The method according to claim 6, characterized in that The determining, according to the mutual capacitance data, whether there is water interference in the touch area includes: At least one of multi-peak touch recognition and residual touch recognition is performed on the mutual capacitance data to determine whether water interference exists in the touch area.
8. The method according to claim 7, characterized in that The performing at least one of multi-peak touch recognition and residual touch recognition on the mutual capacitance data to determine whether there is water interference in the touch area includes: If there are multiple peaks in the mutual capacitance data, it is determined that there is water interference in the touch area; and / or, If, among the areas greater than the mutual capacitance threshold in the mutual capacitance data, there is an area less than a first area threshold and there is an area greater than a second area threshold, it is determined that water interference exists in the touch area.
9. The method according to claim 6, characterized in that If water interference exists, performing touch tail detection to determine whether the second suspected water area is a real water area includes: If water interference exists, determining whether there is a positive value greater than a mutual capacitance touch threshold and a negative value less than a mutual capacitance water threshold in the first mutual capacitance data, the first mutual capacitance data being mutual capacitance data corresponding to self capacitance data less than the self capacitance touch threshold in the second suspected water area; If so, the second suspected water region is determined to be a real water region.
10. The method according to claim 6, characterized in that The method further comprises: Calculate the current weight value according to the number of fingers on the touch screen in the bright screen state; The updating of the confidence value according to the current weight value to obtain the confidence value of the current scan frame includes: The confidence value is updated according to the current weight value and the preset step size to obtain the confidence value of the current scanning frame.
11. The method according to claim 10, characterized in that The updating of the confidence value according to the current weight value and the preset step size to obtain the confidence value of the current scanning frame includes: According to the first formula, the confidence value is updated to obtain the confidence value of the current scanning frame; The first formula is: V2 = V1 + a*B; Among them, V2 is the confidence value of the current scanning frame, V1 is the confidence value of the previous scanning frame, a is the current weight value, and B is the preset step size.
12. The method according to claim 6, characterized in that The method further comprises: If there is no water interference, determining whether the second suspected water area and the touch area have the same row or column; If they have the same row or column, water tail detection is performed to determine whether the second suspected water area is a real water area; When the second suspected water region is determined to be a real water region, updating the confidence value to obtain the confidence value of the current scan frame includes: when the second suspected water region is determined to be a real water region, updating the confidence value according to the current weight value; If they do not have the same row or column, performing a separate water region detection to determine whether the second suspected water region is a real water region; When it is determined that the second suspected water area is a real water area, the confidence value is updated to obtain the confidence value of the current scanning frame, including: when it is determined that the second suspected water area is a real water area, the confidence value is increased; when it is determined that the second suspected water area is not a real water area, the confidence value is decreased.
13. The method according to claim 12, characterized in that If the rows or columns are the same, water tail detection is performed to determine whether the second suspected water area is a real water area, including: If they have the same row or column, determining whether there is a positive value greater than the mutual capacitance touch threshold and a negative value less than the mutual capacitance water threshold in the second mutual capacitance data, the second mutual capacitance data being mutual capacitance data corresponding to the self capacitance data less than the self capacitance water threshold in the second suspected water area; If so, the second suspected water region is determined to be a real water region.
14. The method according to claim 12, characterized in that If the suspected water region does not have the same row or column, performing a separate water region detection to determine whether the suspected water region is a real water region includes: If they do not have the same row or column, determining whether there is self-capacitance data less than a self-capacitance water threshold in the second suspected water region; If so, determining the second suspected water area as a real water area; Otherwise, it is determined that the second suspected water region is not a real water region.
15. The method according to any one of claims 1 to 14, characterized in that The method further comprises: Get the confidence value of the previous scan frame; Calculating the absolute value of the difference between the confidence value of the previous scanning frame and the confidence value of the current scanning frame; If the absolute value of the difference is less than the minimum preset difference, the counter is incremented by 1; otherwise, the counter is reset to zero or the value of the counter is decreased; When the value of the counter reaches a preset value, the confidence value of the current scanning frame is reduced to obtain an adjusted confidence value of the current scanning frame.
16. The method according to any one of claims 1 to 14, characterized in that The step of determining, according to the confidence value of the current scan frame, entering or exiting the waterproof mode comprises: When the confidence value of the current scan frame is greater than the first waterproof threshold, the confidence value of the current scan frame is set as the first waterproof threshold, and the waterproof mode is entered; When the confidence value of the current scan frame is less than the second waterproof threshold, the confidence value of the current scan frame is set as the second waterproof threshold, and the waterproof mode is exited; The first waterproof threshold is greater than the second waterproof threshold.
17. A water detection device for a touch screen, characterized in that: include: An acquisition module, used to acquire capacitance data of the touch screen in a current scanning frame, wherein the capacitance data includes at least one of self-capacitance data and mutual capacitance data; A processing module, used for updating a confidence value according to the capacitance data to obtain a confidence value of the current scanning frame, wherein the confidence value is used to characterize the credibility of the presence of water on the touch screen surface; Entering or exiting the waterproof mode is determined according to the confidence value of the current scanning frame.
18. A terminal device, characterized in that: include: A memory storing executable program code; a processor coupled to the memory; The processor is used to execute the method according to any one of claims 1 to 16.
19. A computer-readable storage medium comprising instructions, which, when executed on a processor, causes the processor to perform the method according to any one of claims 1 to 16.
Citation Information
Cited By
Optimization method of touch display screen integrated with On-cell technology and touch display screen
CN120295507A
Optimization method of touch display screen integrated with on-cell technology and touch display screen
CN120295507B
Water entry detection method and electronic equipment
CN120428337A
Method and system for controlling capacitive touch screen
CN121029027A
A control method and system for a capacitive touch screen
CN121029027B
