Device control method, apparatus, and electronic device

CN122924596APending Publication Date: 2026-10-16GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510439286.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

但是,相关的方式中,还存在对触控的处理不够准确的问题

Benefits of technology

[0009] This application provides a device control method, apparatus, and electronic device. In this method, after acquiring screen capacitance data, a first region can be determined through target nodes in the screen capacitance data. Nodes on the screen are locations where capacitance values ​​can change. Then, a second region can be determined from the first region based on the number of target nodes included in the first region. A first confidence level is obtained based on the number of target nodes in the second region. If the first confidence level is greater than a first confidence threshold, a waterproof mode is entered; otherwise, the waterproof mode is not entered. Thus, by using the above method, after determining the first region based on target nodes (nodes with negative capacitance values) in the screen capacitance data, the second region can be further determined based on the number of target nodes in the first target region. This allows for the acquisition of a first confidence level representing the probability that liquid is covering the screen, so that if the first confidence level is greater than the first confidence threshold, the waterproof mode is entered; otherwise, the waterproof mode is not entered. This helps avoid accidentally entering the waterproof mode and improves the accuracy of touch processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122924596A_ABST
    Figure CN122924596A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a device control method and device, and an electronic device. In the method, after obtaining screen capacitance data, a first area can be determined by a target node in the screen capacitance data, wherein the node in the screen is a position capable of causing a change in a capacitance value. Then, a second area can be determined from the first area by the number of target nodes included in the first area, so as to obtain a first confidence degree by the number of the second area. In a case where the first confidence degree is greater than a first confidence degree threshold, a waterproof mode is entered, otherwise, the waterproof mode is not entered. Thus, it is beneficial to avoid mistakenly entering the waterproof mode, so as to improve the accuracy of touch processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and more specifically, to a device control method, apparatus, and electronic device. Background Technology

[0002] With technological advancements, users can control electronic devices by touching their screens. When a screen is touched, the electronic device first determines the location of the touch and then executes subsequent control operations based on that location. However, this method still suffers from inaccurate touch processing. Summary of the Invention

[0003] In view of the above problems, this application proposes a device control method, apparatus, and electronic device to improve the above problems.

[0004] In a first aspect, this application provides a device control method, the method comprising: after acquiring screen capacitance data, determining a first region through target nodes in the screen capacitance data, wherein nodes in the screen are positions that can generate capacitance value changes, and the target nodes are nodes with negative capacitance values; determining a second region from the first region based on the number of target nodes included in the first region; obtaining a first confidence level based on the number of the second region, the first confidence level representing the probability that the screen of the electronic device is covered with liquid; and entering a waterproof mode if the first confidence level is greater than a first confidence threshold.

[0005] Secondly, this application provides a device control apparatus, the apparatus comprising: a region determination unit, configured to determine a first region by means of target nodes in the screen capacitance data after acquiring screen capacitance data, wherein the nodes in the screen are positions that can generate capacitance value changes, and the target nodes are nodes with negative capacitance values; a region processing unit, configured to determine a second region from the first region by means of the number of target nodes included in the first region; a calculation unit, configured to obtain a first confidence level by means of the number of the second region, the first confidence level representing the probability that the screen of the electronic device is covered with liquid; and a device control unit, configured to enter a waterproof mode if the first confidence level is greater than a first confidence threshold.

[0006] Thirdly, this application provides a touch chip, characterized in that it includes one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the above-described method.

[0007] Fourthly, this application provides an electronic device including a screen, one or more processors, and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the methods described above.

[0008] Fifthly, this application provides a computer-readable storage medium storing processor-executable program code, the computer-readable storage medium including stored program code, wherein the above-described method is executed when the program code is run.

[0009] This application provides a device control method, apparatus, and electronic device. In this method, after acquiring screen capacitance data, a first region can be determined through target nodes in the screen capacitance data. Nodes on the screen are locations where capacitance values ​​can change. Then, a second region can be determined from the first region based on the number of target nodes included in the first region. A first confidence level is obtained based on the number of target nodes in the second region. If the first confidence level is greater than a first confidence threshold, a waterproof mode is entered; otherwise, the waterproof mode is not entered. Thus, by using the above method, after determining the first region based on target nodes (nodes with negative capacitance values) in the screen capacitance data, the second region can be further determined based on the number of target nodes in the first target region. This allows for the acquisition of a first confidence level representing the probability that liquid is covering the screen, so that if the first confidence level is greater than the first confidence threshold, the waterproof mode is entered; otherwise, the waterproof mode is not entered. This helps avoid accidentally entering the waterproof mode and improves the accuracy of touch processing. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A flowchart of a device control method according to an embodiment of this application is shown;

[0012] Figure 2 A schematic diagram illustrating the determination of nodes via a transmission channel and a reception channel in an embodiment of this application is shown;

[0013] Figure 3 A schematic diagram of screen capacitance data in an embodiment of this application is shown;

[0014] Figure 4A schematic diagram of a node and its neighboring nodes in an embodiment of this application is shown;

[0015] Figure 5 A schematic diagram of the reference area in an embodiment of this application is shown;

[0016] Figure 6 A schematic diagram of the first region in an embodiment of this application is shown;

[0017] Figure 7 A schematic diagram of the edge region in an embodiment of this application is shown;

[0018] Figure 8 A flowchart of a device control method according to another embodiment of this application is shown;

[0019] Figure 9 A flowchart of a device control method according to another embodiment of this application is shown;

[0020] Figure 10 A flowchart of a device control method according to another embodiment of this application is shown;

[0021] Figure 11 This paper shows a structural block diagram of a device control apparatus according to an embodiment of the present application;

[0022] Figure 12 This invention illustrates a structural block diagram of an electronic device for performing a device control method according to an embodiment of the present invention;

[0023] Figure 13 This is a storage unit in this application embodiment for storing or carrying program code that implements the device control method according to this application embodiment. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0025] With the rapid development of science and technology, electronic devices are playing an increasingly important role in people's lives and work. Today, users can control electronic devices by touching their screens. Under this touch operation mechanism, when the screen of an electronic device receives a user's touch action, its internal sensing system and related software algorithms immediately initiate a series of processing procedures. First, the electronic device uses built-in touch sensors and positioning algorithms to determine the location of the touch. These touch sensors can sense changes in physical quantities such as pressure, electric field, or capacitance on the screen surface, determining the specific coordinates of the user's finger or stylus on the screen.

[0026] The electronic device then performs subsequent control operations based on the determined touch location. For example, if the touch location is on an application icon, the device will open the corresponding application; if the touch location is on the scroll bar area, the device will scroll the screen content in the corresponding direction; if the touch location is on an operation button, the device will execute the function corresponding to that button, such as play, pause, or save.

[0027] However, despite the immense convenience this touch operation method has brought to users, some problems still need to be addressed in existing technologies and methods, the most prominent being the inaccuracy of touch processing. For example, in some methods, electronic devices can suppress touch points at the screen edges (e.g., the bottom of the screen) in waterproof mode to avoid ghosting issues caused by rain. However, in some cases, electronic devices may mistakenly enter waterproof mode, leading to incorrect suppression. Consequently, the accuracy of touch processing may suffer (for example, a swipe-up gesture triggered by the bottom of the screen may not be responded to).

[0028] Therefore, the inventors have proposed a device control method, apparatus, and electronic device as described in this application. In this method, after acquiring screen capacitance data, a first region can be determined using target nodes in the screen capacitance data. Nodes on the screen are locations where capacitance values ​​can change. Then, a second region can be determined from the first region based on the number of target nodes included in the first region. A first confidence level is obtained based on the number of target nodes in the second region. If the first confidence level is greater than a first confidence threshold, a waterproof mode is entered; otherwise, the waterproof mode is not entered. Thus, by using the above method, after determining the first region based on target nodes (nodes with negative capacitance values) in the screen capacitance data, the second region can be further determined based on the number of target nodes in the first target region. This allows for the acquisition of a first confidence level representing the probability that liquid is covering the screen, so that if the first confidence level is greater than the first confidence threshold, the waterproof mode is entered; otherwise, the waterproof mode is not entered. This helps avoid accidentally entering the waterproof mode and improves the accuracy of touch processing.

[0029] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0030] Please see Figure 1 This application provides a device control method applied to electronic devices, the method comprising:

[0031] S110: After acquiring the screen capacitance data, a first region is determined by the target node in the screen capacitance data, wherein the node in the screen is a position that can generate a change in capacitance value, and the target node is a node with a negative capacitance value.

[0032] In this embodiment, multiple nodes can be distributed on the screen, and each node can generate a change in capacitance value. As one approach, the nodes in this embodiment can be the intersection of a transmitting channel and a receiving channel on the screen. Optionally, the transmitting channel can be a transmitter, and the receiving channel can be a receiver. The screen can include multiple transmitting channels and multiple receiving channels, with the multiple transmitting channels arranged sequentially along a first direction and the multiple receiving channels arranged sequentially along a second direction, and the first and second directions being perpendicular. For example, as shown... Figure 2 As shown, multiple transmitting channels are arranged sequentially along the vertical or horizontal direction of the screen (a first direction), and multiple receiving channels are arranged sequentially along the horizontal or vertical direction of the screen (a second direction). The intersection of any transmitting channel and any receiving channel is a node capable of generating capacitance changes, thus allowing the nodes on the screen to be distributed in an array on the screen.

[0033] In this scenario, when an object is applied to the screen, some nodes on the screen will experience changes in capacitance. In this embodiment, the screen capacitance data represents the capacitance value of each node. For example, when a user touches the screen using a touch object (e.g., a finger or stylus), the touch will cause some nodes on the screen to experience changes in capacitance. Similarly, when a liquid (e.g., water) falls onto the screen, the liquid will also cause some nodes on the screen to experience changes in capacitance.

[0034] For example, screen capacitance data involved in the embodiments of this application can be as follows: Figure 3 As shown. Figure 3 As shown, in Figure 3 Each value in the data represents a capacitance value, meaning each value represents the location of a node. Screen capacitance data can contain both positive and negative values. In this embodiment, the capacitance value corresponding to each node can be either mutual capacitance or self-capacitance. Mutual capacitance is a physical quantity describing the electric field interaction and charge accumulation between two conductors. Self-capacitance is a physical quantity describing the capacitance of a conductor relative to ground.

[0035] As mentioned earlier, the target node can be a node with a negative capacitance value. Therefore, after obtaining the screen capacitance data, the target node can be obtained from the screen capacitance data, and then the first region can be obtained from the target node. It should be noted that when liquid falls on the screen, because liquid is conductive, it will change the electric field coupling between the two sensing modules (e.g., the transmitting channel and the receiving channel), but this change is in the opposite direction to the signal change generated by a finger touching the screen. For example, when liquid falls on the screen, the resulting capacitance value can be negative.

[0036] As a method for determining the first region, determining the first region through target nodes in screen capacitance data may include: obtaining multiple reference regions, wherein the multiple reference regions include a first reference region and / or a second reference region, wherein the first reference region is a reference region including a node, and the node included in the first reference region is the target node, and any two adjacent nodes in the second reference region are also target nodes; determining the first region by the area covered by the minimum bounding rectangle of each of the multiple reference regions. Optionally, the target node is a node with a negative capacitance value and a capacitance value less than a preset capacitance threshold. For example, the preset capacitance threshold can be -10.

[0037] In this embodiment, each node is surrounded by other nodes (e.g., at least three other nodes), or it can be understood that each node is surrounded by other nodes. For example, as shown... Figure 4 As shown, for the node with a capacitance value of -19 in the dashed box, it is surrounded by 8 nodes (including 3 nodes with a capacitance value of 2, a node with a capacitance value of 4, a node with a capacitance value of -4, a node with a capacitance value of -6, a node with a capacitance value of 84, and a node with a capacitance value of -82). These 8 nodes can be understood as the nodes adjacent to the node with a capacitance value of -19.

[0038] One approach is to detect the capacitance value of each node after obtaining the screen capacitance data, following a predetermined method. If a target node is detected, a search is initiated based on this target node to determine if any adjacent target nodes exist. If no target node is found among the adjacent nodes, the area containing that target node is directly used as a reference area. If a target node is found among the adjacent nodes, it is then used as a new reference to further search for target nodes in its adjacent nodes. This process continues until no target node is found among the adjacent nodes of the latest determined reference. A reference area is then determined based on the target nodes found in this method. Target nodes that have already been searched are not included in subsequent search processes, and target nodes already existing within a reference area are also excluded from subsequent reference area determination processes.

[0039] For example, taking a target node as an example where the capacitance value is less than -10, such as... Figure 5As shown, if the first detected target node is a node with a capacitance value of -19, then this node can be used as a baseline to search for target nodes among its neighboring nodes, thus detecting a node with a capacitance value of -82. Furthermore, this node can be used as a new baseline to search for target nodes among its neighboring nodes, thus detecting a node with a capacitance value of -134. Further, this search can continue, leading to the detection of a node with a capacitance value of -233. The search proceeds by first checking the neighboring nodes of the node with a capacitance value of -233 for a target node, thus detecting a node with a capacitance value of -47. Further, the search continues, checking the neighboring nodes of the node with a capacitance value of -47 for a target node, thus detecting a node with a capacitance value of -36. Using the node with a capacitance value of -36 as the new reference, it is found that only the node with a capacitance value of -47 among its neighboring nodes is a target node. However, the node with a capacitance value of -47 has already been searched and will not participate in the subsequent search process. Therefore, the search is considered complete, and reference region 20 is determined based on the target node found above. The subsequent reference region determination process is no longer considered for the target node in reference region 20. Next, a node with a capacitance value of -77 is detected. However, no target node exists among the neighboring nodes of the node with a capacitance value of -77. Therefore, the determined reference region 21 contains only this one node with a capacitance value of -77.

[0040] After determining multiple reference regions, the first region corresponding to each reference region can be determined based on the minimum bounding rectangle. For example, such as... Figure 6 As shown, for Figure 5 Reference region 20 in the middle corresponds to the first region 30, for Figure 5 Reference region 21 corresponds to the first region 31. (Comparison) Figure 5 and Figure 6 It can be observed that when the reference region includes only one node, the range of the first region corresponding to the reference region is the same as the reference region itself. When the reference region includes multiple nodes, the determined first region may include non-target nodes, and thus the range of the included region may be larger than the reference region. Specifically, when the target node is a negative value node, non-target nodes can be understood as nodes with a capacitance value greater than 0. When the target node is a node with a capacitance value less than -10, the target node can be understood as a node with a capacitance value greater than -10.

[0041] S120: Determine a second region from the first region based on the number of target nodes included in the first region.

[0042] One approach is to determine a second region after identifying the first region, based on the proportion of target nodes within that region. Several methods can be used to determine the second region. Optionally, for a given first region, if the proportion of target nodes in that region is greater than a certain threshold, then that first region can be designated as the second region. This threshold can be 0.5, 0.6, or higher. Optionally, for a given first region, if the proportion of negative-value nodes in that region is greater than a certain threshold, then that first region can be designated as the second region. Negative-value nodes can be understood as nodes with negative capacitance values.

[0043] S130: A first confidence level is obtained by the number of the second regions, the first confidence level representing the probability that the screen of the electronic device is covered with liquid.

[0044] In obtaining the first confidence level based on the number of second regions, the more second regions identified, the higher the obtained first confidence level. In this application embodiment, there can be multiple ways to obtain the first confidence level.

[0045] One approach is to establish a first correspondence that represents the relationship between the second region and the confidence level. In this case, after determining the number of second regions, the corresponding first confidence level can be directly obtained through this first correspondence.

[0046] For example, the first correspondence can be shown in the following table:

[0047] Number of regions Confidence T1 Z1 T2 Z2 T3 Z3 T4 Z4

[0048] As shown in the table above, when the number of determined second regions is T1, the first confidence level is Z1; when the number of determined second regions is T2, the first confidence level is Z2; when the number of determined second regions is T3, the first confidence level is Z3; and when the number of determined second regions is T4, the first confidence level is Z4.

[0049] Alternatively, the initial confidence level can be increased by increasing the number of second regions to obtain a first confidence level. The number of times the initial confidence level is increased is the same as the number of second regions, and the magnitude of each increase is the first magnitude. For example, if the number of second regions is N, then the initial confidence level is also increased N times.

[0050] In the process of increasing the initial confidence level by increasing the number of second regions, if it is the first increase, the increase is based on the initial confidence level; otherwise, it is based on the confidence level obtained from the previous increase. For example, assuming the initial confidence level is Z0 and the increment is n, the confidence level obtained after the first increase is Z0+n, the confidence level obtained after the second increase is Z0+2n, and so on. If the number of second regions is 3, the final initial confidence level is Z0+3n.

[0051] S140: If the first confidence level is greater than the first confidence level threshold, then enter the waterproof mode.

[0052] Once a first confidence level is obtained, it can be compared with a first confidence threshold. If the first confidence level is greater than the first confidence threshold, it indicates that the change in the capacitance data of the current node on the screen is caused by liquid (e.g., water), which in turn indicates that the screen is currently covered with liquid, and the electronic device will enter waterproof mode.

[0053] It should be noted that, in this embodiment, when the electronic device enters waterproof mode, it can determine whether to suppress the detected touch point by first determining the suppression processing conditions. In this embodiment, suppressing a touch point can be understood as ignoring it or not reporting it. Conversely, if the touch point does not meet the suppression processing conditions, it can be treated as a normal touch point (or identified as a touch point triggered by the user), and can then be responded to or reported.

[0054] Reporting touch points can be understood as passing the detected touch points to downstream processing modules for processing. For example, in one scenario, the electronic device includes a screen, a touch chip, and a processor. In this case, the touch chip detects touch activity on the screen and generates corresponding touch points when a touch occurs. The touch chip then transmits the detected touch points to the processor for processing. The processor can be understood as a downstream module of the touch chip. When the device control method is executed by the touch chip, if the touch chip detects a touch point that meets the suppression processing conditions, it can ignore the touch point and not transmit it to the processor, thus suppressing the touch point. Conversely, if the touch point does not meet the suppression processing conditions, it will transmit the touch point to the processor.

[0055] In one embodiment of this application, when the electronic device is in waterproof mode, the processing steps for the touch point can be as follows: in response to detecting a touch point, acquiring candidate nodes corresponding to the touch point, wherein the candidate nodes are at least a portion of the nodes within the effective area of ​​the touch point. The candidate nodes are used to determine whether to suppress the touch point. In this embodiment, nodes whose capacitance values ​​change due to touch (e.g., the touch that generates the touch point) can be understood as candidate nodes. Optionally, candidate nodes may include nodes whose capacitance value changes by a magnitude greater than 25. For example, candidate nodes may include nodes with capacitance values ​​greater than 25, and may also include nodes with capacitance values ​​less than -25.

[0056] Optionally, when the waterproof mode is activated, the electronic device can also determine whether detected touch points need to be suppressed under specific conditions. These specific conditions include at least one of the following: the touch point is the first touch point detected during the current touch operation; the touch point is located in the edge area of ​​the screen.

[0057] The current touch process can be understood as the process from when an object (e.g., a touch-sensitive object) comes into contact with the screen until the object leaves the screen. During the current touch process, because the object remains in contact with the screen, and the electronic device detects touch points at a certain frequency, with each detection generating a capacitance data frame, the first detected touch point during the current touch process can be understood as the touch point detected in the first capacitance data frame after the start of the current touch.

[0058] It should be noted that, in this embodiment, the screen can be divided into edge regions and non-edge regions. The edge region can be understood as the area relatively closer to the side of the screen, while the non-edge region can be understood as the area relatively closer to the center of the screen. For example, the screen may include a top edge, a bottom edge, a left edge, and a right edge. In this case, the edge regions of the screen may include the edge regions near the top edge, the edge regions near the bottom edge, the edge regions near the left edge, and the edge regions near the right edge.

[0059] In one approach, regions whose distance from the side edge (top, bottom, left, or right edge) is less than a first distance threshold can be defined as edge regions. Optionally, regions whose distance from the bottom edge is less than the first distance threshold can be defined as the bottom of the screen. For example, when the first distance threshold is h, the defined edge regions and non-edge regions can be as follows: Figure 7 As shown. Among them, Figure 7 The shaded areas represent the non-edge regions of the screen.

[0060] This embodiment provides a device control method that, through the above-described manner, after determining a first region based on target nodes (nodes with negative capacitance values) in the screen capacitance data, can further determine a second region based on the number of target nodes in the first target region. This allows for the determination of a first confidence level representing the probability that the screen is covered with liquid based on the number of the second region. If the first confidence level is greater than a first confidence level threshold, the device enters a waterproof mode; otherwise, it does not enter a waterproof mode. This helps to avoid accidentally entering a waterproof mode and improves the accuracy of touch processing.

[0061] Please see Figure 8 This application provides a device control method applied to electronic devices, the method comprising:

[0062] S210: After acquiring the screen capacitance data, a first region is determined by the target node in the screen capacitance data, wherein the node in the screen is a position that can generate a change in capacitance value, and the target node is a node with a negative capacitance value.

[0063] S220: Determine a second region from the first region based on the number of target nodes included in the first region. The second region is a first region in which the proportion of target nodes included is greater than a first proportion threshold.

[0064] S230: A first confidence level is obtained by the number of the second regions, the first confidence level representing the probability that the screen of the electronic device is covered with liquid.

[0065] S240: If the first confidence level is greater than the first confidence threshold, then a third region is determined from the first region based on the number of target nodes included in the first region. The third region is a first region in which the proportion of target nodes included is greater than a second proportion threshold, and the second proportion threshold is greater than the first proportion threshold.

[0066] S250: Obtain the second confidence level by the number of the third region.

[0067] In the embodiments of this application, there are multiple ways to obtain the second confidence level.

[0068] One approach is to establish a second correspondence, which represents the relationship between the third region and the confidence level. In this case, after determining the number of third regions, the corresponding second confidence level can be directly obtained through this second correspondence. A specific example of obtaining the corresponding second confidence level through this second correspondence can be found in the aforementioned example of obtaining the corresponding first confidence level through the first correspondence.

[0069] Alternatively, a second initial confidence level can be obtained by increasing the number of second regions to obtain a second confidence level. The number of times the second initial confidence level is increased is the same as the number of third regions, and the magnitude of each increase is the second magnitude. For example, if the determined number of third regions is M, then the number of times the second initial confidence level is increased is also M.

[0070] In the process of increasing the second initial confidence level by increasing the number of third regions, if it is the first increase, the increase is based on the second initial confidence level; otherwise, the increase is based on the confidence level obtained from the previous increase. For example, assuming the first initial confidence level is Z0 and the increment is m, the confidence level obtained after the first increase is Z0+m, the confidence level obtained after the second increase is Z0+2m, and so on. If the number of second regions is 3, then the final first confidence level obtained is Z0+3m.

[0071] S260: If the second confidence level is greater than the second confidence threshold, then enter waterproof mode.

[0072] In this embodiment, the second confidence level is also used to characterize whether the screen is covered with liquid. Wherein, if liquid is detected on the screen using the first confidence level, the second confidence level can be understood as a further confirmation of whether the screen is covered with liquid.

[0073] In one manner, obtaining the first confidence level based on the number of the second regions includes: increasing the first initial confidence level by the number of the second regions to obtain the first confidence level, wherein the number of times the first initial confidence level is increased is the same as the number of the second regions, and the magnitude of each increase is a first magnitude. In this manner, obtaining the second confidence level based on the number of the third regions may include: increasing the second initial confidence level by the number of the third regions to obtain the second confidence level, wherein the number of times the second initial confidence level is increased is the same as the number of the third regions, and the magnitude of each increase is a second magnitude, which is smaller than the first magnitude.

[0074] In this embodiment, the increase in confidence level can be a fixed value or a fixed percentage. For example, the first increase can be a fixed value of m, and the second increase can be a fixed value of n, where m is greater than n. As another example, the first increase can be 10% of the currently obtained confidence level, and the second increase can be 2% of the currently obtained confidence level. Wherein, if this is the first increase, the currently obtained confidence level can be either a first initial confidence level or a second initial confidence level; if this is not the first increase, the currently obtained confidence level can be the confidence level obtained after at least one previous increase.

[0075] Optionally, the method further includes: if the electronic device is in noise mode, the second amplitude is less than the first amplitude; if the electronic device is not in noise mode, the second amplitude is equal to the first amplitude. In this embodiment, the noise mentioned may include mains noise or common-mode noise. It should be noted that when the charger of the electronic device is working, high-frequency components in the AC power supply will remain as ripple through the rectifier circuit. This ripple may carry common-mode noise components, which can be coupled to the internal circuitry of the electronic device through the charging cable. Therefore, as a method, if the electronic device detects that it is currently in a charging state, it determines that it is in noise mode.

[0076] In the case of an electronic device in a noisy mode, the presence of noise may increase the number of negative nodes in the screen capacitance area. In order to reduce this interference, the second amplitude can be made lower than the first amplitude, so as to reduce the increase in the second confidence level.

[0077] This embodiment provides a device control method that, after determining a first region based on target nodes (nodes with negative capacitance values) in screen capacitance data, can further determine a second region based on the number of target nodes in the first target region. This allows for the determination of a first confidence level representing the probability of liquid covering the screen based on the number of nodes in the second region. If the first confidence level is greater than a first confidence threshold, a waterproof mode is entered; otherwise, it is not. This helps avoid unintended entry into waterproof mode and improves the accuracy of touch processing. Furthermore, in this embodiment, if the first confidence level is greater than the first confidence threshold, a third region can be further determined to determine a second confidence level, further improving the accuracy of touch processing. Moreover, obtaining the second confidence level ensures that the second amplitude is smaller than the first amplitude, which also further enhances the accuracy of touch processing.

[0078] Please see Figure 9 This application provides a device control method applied to electronic devices, the method comprising:

[0079] S310: After acquiring the screen capacitance data, a first region is determined by the target node in the screen capacitance data, wherein the node in the screen is a position that can generate a change in capacitance value, and the target node is a node with a negative capacitance value.

[0080] S320: If the electronic device is in noise mode, determine the remaining area from the first region after removing the isolated point region, wherein the number of target nodes included in the isolated point region is one.

[0081] An isolated region can be understood as a region containing only one node, and that included node is the first region of the target node. For example, such as... Figure 5 As shown, the first region 31 is an isolated point region.

[0082] S321: Determine a second region from the remaining regions.

[0083] S330: If the electronic device is not in noise mode, determine the second region from the first region by the number of target nodes included in the first region.

[0084] S340: A first confidence level is obtained by the number of the second regions, the first confidence level representing the probability that the screen of the electronic device is covered with liquid.

[0085] S350: If the first confidence level is greater than the first confidence level threshold, then enter the waterproof mode.

[0086] This embodiment provides a device control method that, after determining a first region based on target nodes (nodes with negative capacitance values) in the screen capacitance data, can further determine a second region based on the number of target nodes in the first target region. This allows for the determination of a first confidence level representing the probability of liquid covering the screen based on the number of nodes in the second region. If the first confidence level is greater than a first confidence threshold, a waterproof mode is entered; otherwise, the waterproof mode is not entered. This helps avoid erroneous entry into the waterproof mode and improves the accuracy of touch processing. Furthermore, in this embodiment, isolated pixel regions can be excluded first when the electronic device is in noise mode, thereby preventing isolated pixel regions from interfering with the final detection results.

[0087] Next, we will proceed through... Figure 10 The following describes the flow of a device control method according to an embodiment of this application.

[0088] like Figure 10As shown, after obtaining the screen capacitance data, it can be first determined whether the electronic device is in noise mode. If it is in noise mode, the presence of isolated areas can be detected. In noise mode, isolated areas may be caused by noise, thus allowing the removal of isolated areas from the first region. Conversely, if the first region is not an isolated area, it can be retained. Determining whether each first region conforms to water characteristics can be understood as identifying the second region from the first region. Regions conforming to water characteristics can be identified as the second region.

[0089] Before adjusting the percentage threshold of the target node, the percentage threshold can be 0.2, and after adjustment, the percentage threshold can be 0.5.

[0090] Please see Figure 11 This application provides a device control apparatus 400, which operates in an electronic device. The apparatus 400 includes:

[0091] The region determination unit 410 is used to determine a first region by means of target nodes in the screen capacitance data after obtaining the screen capacitance data, wherein the nodes in the screen are the positions that can generate changes in capacitance value, and the target nodes are the nodes with negative capacitance values.

[0092] The region processing unit 420 is used to determine a second region from the first region based on the number of target nodes included in the first region.

[0093] The calculation unit 430 is used to obtain a first confidence level by the number of the second regions, the first confidence level representing the probability that the screen of the electronic device is covered with liquid.

[0094] The device control unit 440 is configured to enter a waterproof mode if the first confidence level is greater than the first confidence level threshold.

[0095] In one approach, the second region is a first region in which the proportion of included target nodes is greater than a first proportion threshold. In this approach, the device control unit 440 is specifically configured to, if the first confidence level is greater than the first confidence threshold, determine a third region from the first region based on the number of target nodes included in the first region. The third region is a first region in which the proportion of included target nodes is greater than a second proportion threshold, where the second proportion threshold is greater than the first proportion threshold. A second confidence level is obtained based on the number of the third region. If the second confidence level is greater than the second confidence threshold, a waterproof mode is entered.

[0096] Optionally, the device control unit 440 is specifically configured to increase the first initial confidence level by the number of the second regions to obtain the first confidence level, wherein the number of times the first initial confidence level is increased is the same as the number of the second regions, and the magnitude of each increase is a first magnitude. It is also configured to increase the second initial confidence level by the number of the third regions to obtain the second confidence level, wherein the number of times the second initial confidence level is increased is the same as the number of the third regions, and the magnitude of each increase is a second magnitude, which is smaller than the first magnitude.

[0097] In one manner, the region processing unit 420 is specifically configured to, if the electronic device is in a noise mode, determine the remaining region from the first region after removing the isolated point region, wherein the number of target nodes included in the isolated point region is one; and determine a second region from the remaining region.

[0098] In one approach, the region determination unit 410 is specifically used to obtain multiple reference regions, wherein the multiple reference regions include a first reference region and / or a second reference region, wherein the first reference region is a reference region including a node, and the node included in the first reference region is a target node, and any two adjacent nodes in the second reference region are target nodes; the first region is determined by the area covered by the minimum bounding rectangle of each of the multiple reference regions.

[0099] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific implementation principles of each unit in the device embodiments are similar to those in the aforementioned method embodiments. The specific content in the device embodiments can be found in the method embodiments, but will not be repeated in the device embodiments.

[0100] The following will combine Figure 12 This application describes an electronic device.

[0101] Please see Figure 12 Based on the aforementioned device control methods and apparatus, this application also provides an electronic device 1000 capable of executing the aforementioned device control methods. The electronic device 1000 includes one or more (only one shown in the figure) processors 105, a memory 104, an audio playback module 106, and an audio acquisition device 108 coupled together. The memory 104 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 105 can execute the programs stored in the memory 104.

[0102] The processor 105 may include one or more processing cores. The processor 105 connects to various parts within the electronic device 1000 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and by calling data stored in the memory 104. Optionally, the processor 105 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 105 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 105 and may be implemented separately using a communication chip.

[0103] The memory 104 may include random access memory (RAM) or read-only memory (ROM). The memory 104 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below.

[0104] Furthermore, in addition to the aforementioned devices, the electronic device 1000 may also include a network module 110, a sensor module 112, a touch screen system 114, and a touch-enabled screen.

[0105] The network module 110 is used to enable information interaction between the electronic device 1000 and other devices. For example, it can establish connections with other audio playback devices or other electronic devices and interact with information based on the established connections. As one approach, the network module 110 of the electronic device 1000 is a radio frequency (RF) module. This RF module is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby enabling communication with communication networks or other devices. The RF module may include various existing circuit elements used to perform these functions, such as antennas, RF transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. For example, this RF module can interact with external devices through transmitted or received electromagnetic waves.

[0106] Sensor module 112 may include at least one sensor. Specifically, sensor module 112 may include, but is not limited to, pressure sensors, motion sensors, acceleration sensors, and other sensors.

[0107] The pressure sensor is a sensor that detects pressure generated by pressing on the electronic device 1000. That is, the pressure sensor detects pressure generated by contact or pressing between the user and the electronic device 1000, such as pressure generated by contact or pressing between the user's ear and the electronic device 1000. Therefore, the pressure sensor can be used to determine whether contact or pressing has occurred between the user and the electronic device 1000, and the magnitude of the pressure.

[0108] The accelerometer can detect the magnitude of acceleration in various directions (generally three axes), and when stationary, it can detect the magnitude and direction of gravity. It can be used for applications such as identifying the posture of the electronic device 1000 (e.g., screen orientation switching, related games, magnetometer posture calibration), and vibration recognition functions (e.g., pedometer, tapping). Additionally, the electronic device 1000 can also be equipped with other sensors such as a gyroscope, barometer, hygrometer, and thermometer, which will not be elaborated upon here.

[0109] The touchscreen system 114 is used for displaying content and responding to touch operations performed by the user. For example, the touchscreen system can detect multi-touch operations. The touchscreen system 114 communicates with the processor 105 via SPI (Serial Peripheral interface). Alternatively, the touchscreen system 114 can be understood as the aforementioned touch chip. The device control method provided in this embodiment can be executed by either the processor 105 or the touchscreen system 114.

[0110] The audio acquisition device 108 is used to acquire audio signals. Optionally, the audio acquisition device 108 includes multiple audio acquisition devices, which may be microphones.

[0111] Please refer to Figure 13 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 1100 stores program code that can be called by a processor to execute the methods described in the above method embodiments.

[0112] The computer-readable storage medium 1100 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1100 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1100 has storage space for program code 1110 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 1110 may, for example, be compressed in a suitable form.

[0113] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0114] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0115] In summary, the device control method, apparatus, and electronic device provided in this application, after acquiring screen capacitance data, can determine a first region through target nodes in the screen capacitance data, wherein nodes in the screen are locations that can generate capacitance value changes. Then, a second region can be determined from the first region based on the number of target nodes included in the first region, and a first confidence level can be obtained based on the number of the second region. If the first confidence level is greater than a first confidence level threshold, a waterproof mode is entered; otherwise, the waterproof mode is not entered. Thus, by the above method, after determining the first region based on target nodes (e.g., nodes with negative capacitance values) in the screen capacitance data, the second region can be further determined based on the number of target nodes in the first target region. This allows for the acquisition of a first confidence level representing the probability that the screen is covered with liquid, so that if the first confidence level is greater than the first confidence level threshold, the waterproof mode is entered; otherwise, the waterproof mode is not entered. This helps avoid accidentally entering the waterproof mode and improves the accuracy of touch processing.

[0116] In one approach, the method provided in this application can solve the problem of slow response caused by accidental water damage when a user operates an electronic device while plugged in a charger, thus ensuring more efficient touch control.

[0117] In one approach, the method provided in this application proposes to intercept the problem of mistakenly entering waterproof mode under noise by optimizing the water detection process in noisy conditions. Additionally, the method provided in this application optimizes scenarios where negative values ​​are detected in non-liquid environments (e.g., non-rainy environments). Noisy environments can cause negative values ​​due to interference, similar to finger touch in rainy environments, leading to mistaken entry. This can be extended to correct capacitance data. For example, in noisy environments, data correction is performed for isolated negative value nodes. When an isolated negative value node is detected, it is forcibly assigned a value of 0, thus preventing the backend water detection module from mistakenly entering a water state due to the detection of isolated negative values.

[0118] In a given case, if a node has a negative capacitance value and none of the surrounding nodes have negative values, the node is identified as an isolated negative value node. When performing data correction, the device control method provided in this application can proceed as follows: after acquiring screen capacitance data, perform data correction on the isolated negative value nodes to obtain corrected screen capacitance data, and determine a first region using the target node in the corrected screen capacitance data.

[0119] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical feature diagrams. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A device control method, characterized in that, Applied to electronic devices, the method includes: After acquiring the screen capacitance data, a first region is determined by the target node in the screen capacitance data, wherein the node in the screen is the position that can generate a change in capacitance value, and the target node is the node with a negative capacitance value. The second region is determined from the first region based on the number of target nodes included in the first region; The first confidence level is obtained by the number of the second region, and the first confidence level represents the probability that the screen of the electronic device is covered with liquid; If the first confidence level is greater than the first confidence level threshold, then enter waterproof mode.

2. The method according to claim 1, characterized in that, The second region is the first region in which the proportion of the included target nodes is greater than the first proportion threshold.

3. The method according to claim 2, characterized in that, The step of entering waterproof mode if the first confidence level is greater than the first confidence threshold includes: If the first confidence level is greater than the first confidence threshold, then a third region is determined from the first region based on the number of target nodes included in the first region. The third region is the first region in which the proportion of target nodes included is greater than the second proportion threshold, and the second proportion threshold is greater than the first proportion threshold. The second confidence level is obtained by measuring the number of the third region; If the second confidence level is greater than the second confidence threshold, then enter waterproof mode.

4. The method according to claim 3, characterized in that, The step of obtaining the first confidence level by the number of the second regions includes: increasing the first initial confidence level by the number of the second regions to obtain the first confidence level, wherein the number of times the first initial confidence level is increased is the same as the number of the second regions, and the magnitude of each increase is the first magnitude; The step of obtaining the second confidence level by the number of the third regions includes: increasing the second initial confidence level by the number of the third regions to obtain the second confidence level, wherein the number of times the second initial confidence level is increased is the same as the number of the third regions, and the magnitude of each increase is a second magnitude, which is smaller than the first magnitude.

5. The method according to claim 4, characterized in that, The method further includes: If the electronic device is in noise mode, the second amplitude is less than the first amplitude; if the electronic device is not in noise mode, the second amplitude is equal to the first amplitude.

6. The method according to claim 1, characterized in that, Determining the second region from the first region based on the number of target nodes included in the first region includes: If the electronic device is in noise mode, determine the remaining area from the first region after removing the isolated point region, wherein the number of target nodes included in the isolated point region is one; Determine the second region from the remaining regions.

7. The method according to claim 1, characterized in that, Determining the first region through target nodes in the screen capacitance data includes: Multiple reference regions are obtained, including a first reference region and / or a second reference region. The first reference region is a reference region that includes one node, and the node included in the first reference region is the target node. Any two adjacent nodes in the second reference region are target nodes. The first region is determined by the area covered by the smallest bounding rectangle of each of the multiple reference regions.

8. The method according to any one of claims 1-7, characterized in that, The target node is a node with a negative capacitance value and a capacitance value less than a preset capacitance threshold.

9. A device control apparatus, characterized in that, Operating in an electronic device, the device includes: The region determination unit is used to determine a first region by means of target nodes in the screen capacitance data after obtaining the screen capacitance data, wherein the nodes in the screen are the positions that can generate capacitance value changes, and the target nodes are the nodes with negative capacitance values. A region processing unit is configured to determine a second region from the first region based on the number of target nodes included in the first region; A calculation unit is configured to obtain a first confidence level based on the number of the second regions, wherein the first confidence level characterizes the probability that the screen of the electronic device is covered with liquid; The device control unit is configured to enter waterproof mode if the first confidence level is greater than the first confidence level threshold.

10. A touch chip, characterized in that, It includes one or more processors and memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any one of claims 1-8.

11. An electronic device, characterized in that, It includes a screen, one or more processors, and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs being configured to perform the method of any one of claims 1-8.

12. A computer-readable storage medium storing processor-executable program code, characterized in that, The computer-readable storage medium includes stored program code, wherein the method of any one of claims 1-8 is executed when the program code is run.