Water entry detection method and electronic equipment
Through the capacitive touch screen detection of the screen capacitive value characteristics, the problem that electronic devices cannot detect the incoming water status in time is solved, and the rapid and accurate judgment of incoming water and outlet water status is achieved, and the efficiency of users' operation in water is improved.
Patent Information
- Application Number
- CN202411998996.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-08-05
AI Technical Summary
Currently, electronic equipment cannot detect the incoming water status in time, which affects the efficiency of users' operation in the water.
The capacitive touch screen detects the screen capacitive value characteristics, judges the change in the contact area between the screen and water, and sets the inlet and water outlet detection conditions to achieve fast and accurate judgment of the inlet and water outlet status.
It improves the efficiency of electronic equipment operating in water, improves the speed and accuracy of incoming and oozing water detection, and improves the user experience.
Smart Images

Figure CN120428337A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a water entry detection method and electronic equipment. Background Art
[0002] With the advancement of technology, the use cases of electronic devices such as mobile phones, tablets, and personal computers (PCs) are becoming increasingly complex, and users are demanding a higher quality experience from their devices. Beyond everyday use, more and more users are looking to use their devices underwater, for example, to take photos and capture beautiful moments.
[0003] However, current electronic devices are unable to detect their own submersion status in a timely manner, which in turn affects the efficiency of electronic devices operating in water and affects the user experience. Summary of the Invention
[0004] The embodiments of the present application provide a water entry detection method and an electronic device, which can improve the speed of detecting water entry of an electronic device and improve the efficiency of operating the electronic device in water.
[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a water intrusion detection method is provided for an electronic device including a capacitive touch screen. The method comprises: obtaining, by the electronic device, a screen capacitance value, wherein the screen of the electronic device includes a plurality of unit areas, each unit area corresponding to a capacitance value. The electronic device first determines whether a capacitance characteristic corresponding to the screen capacitance value satisfies a water intrusion detection condition. If the capacitance characteristic corresponding to the screen capacitance value satisfies the water intrusion detection condition, the electronic device may be determined to be in a submerged state based on a first change state of the capacitance characteristic.
[0007] In the above technical solution, the above water entry detection condition is a preliminary detection condition. After determining that the capacitance characteristic meets the water entry detection condition, the electronic device determines the change amount, and then determines whether it has entered water based on the change amount, which can improve the accuracy of water entry detection. The electronic device can judge the water entry status by the change state of the obtained capacitance characteristic. Since the change in the value of the capacitance characteristic can represent the change in the contact area between the screen and water, the change in the characteristic value of the capacitance of the screen can determine the change in the contact area between the screen and water. It can be determined that the electronic device is in a state of being submerged in water during the change in the contact area between the screen and water, thereby being able to determine that the electronic device is in a state of being submerged in water during the process of submersion in water. There is no need to wait until the electronic device is completely submerged in water to detect the water entry status. The detection of the water entry status of the electronic device is faster, thereby improving the user experience.
[0008] In a possible implementation of the first aspect, the water entry detection condition includes a first conditional threshold corresponding to the capacitance characteristic. When the capacitance characteristic corresponding to the screen capacitance satisfies the water entry detection condition, the electronic device is determined to be in a state of being submerged in water based on a first change state of the capacitance characteristic. This includes: when the value of the capacitance characteristic corresponding to the screen capacitance is greater than the first conditional threshold, if the change in the capacitance characteristic is positive, the electronic device can determine that the electronic device is in a state of being submerged in water. Thus, after the electronic device determines that the value of the capacitance characteristic is greater than the first conditional threshold, it indicates that the capacitance characteristic value is large and the screen may be in contact with water. If the change is further detected to be a positive value, it can be indicated that the contact area of the screen is increasing. At this time, it can be considered that the electronic device is in the process of being submerged in water, thereby realizing that the water entry state can be identified when a portion of the body is submerged in water, thereby improving the efficiency of water entry detection.
[0009] In a possible implementation of the first aspect, if the change in the capacitance characteristic is a positive value, determining that the electronic device is in a state of being submerged in water includes: if the change in the capacitance characteristic is a positive value, and the value of the capacitance characteristic is greater than a second condition threshold, determining that the electronic device is in a state of being submerged in water. The second condition threshold is greater than the first condition threshold. Thus, during the change in the capacitance characteristic detected by the electronic device, if the capacitance characteristic of the screen capacitance of the electronic device meets the water entry detection condition, after the electronic device determines that the change in the capacitance characteristic is a positive value, it can be considered that the contact area between the screen of the electronic device and the water is getting larger and larger. After further determining that the capacitance characteristic meets the set second condition threshold and the second condition threshold is greater than the first condition threshold, it can be considered that the contact area between the screen of the electronic device and the water has reached a certain level and is not an accidental touch, and thus it can be accurately determined that the electronic device is in the process of being submerged in water. Therefore, the submerged state of the electronic device can be determined without waiting until the entire body of the electronic device is submerged in water, thereby improving the detection speed of the submerged state.
[0010] In one possible implementation of the first aspect, the screen capacitance feature includes a full-screen capacitance feature and / or a target connected area capacitance feature; wherein the capacitance of a unit area within the target connected area is greater than a first threshold, and the number of unit areas included in the target connected area is greater than a first number. The electronic device can determine that the electronic device has been submerged by simply determining that, after satisfying a home entry detection condition, the value of at least one of the capacitance features changes by a positive value and further satisfies a second water entry condition.
[0011] In a possible implementation of the first aspect, when the capacitance characteristic of the screen includes a full-screen capacitance characteristic, the capacitance characteristic includes at least one of the following: a maximum value among the first capacitances, or the number of first larger values included in the first capacitances, or the total value of the first capacitances. The first capacitance is the capacitance corresponding to a unit area within the full-screen range, and the first larger value is greater than a second threshold. During the immersion process, changes in the maximum capacitance of the full screen, the number of larger capacitance values of the full screen, and the total value of the capacitance of the full screen can all represent changes in the contact area between the screen and water. The electronic device can determine changes in the contact area between the screen and water by detecting the characteristic values of the full-screen capacitance.
[0012] In one possible implementation of the first aspect, when the capacitance characteristic of the screen includes a target connected area capacitance characteristic, the capacitance characteristic includes at least one of the following: the number of second larger values included in the second capacitance, or the sum of the second capacitance values, or the number of unit areas included in the target connected area; wherein the second capacitance value is the capacitance corresponding to a unit area within the target connected area, and the second larger value is greater than a third threshold. During submersion, changes in the number of unit areas included in the target connected area, the number of larger values of the number of unit areas included in the target connected area, and the sum of the capacitance values of the target connected areas can all represent changes in the contact area between the screen and the water. By detecting the characteristic values of the capacitance values of the target connected areas, the electronic device can determine the change in the contact area between the screen and the water.
[0013] In one possible implementation of the first aspect, after determining that the electronic device is submerged based on the first change state of the capacitance characteristic, the method further includes triggering a water entry notification event. This allows the electronic device to promptly notify a user of changes in the submerged state, thereby improving the user's underwater operation efficiency.
[0014] In a possible implementation of the first aspect, triggering a water entry prompt event includes: opening a preset application of the electronic device, the preset application including a camera application; or, executing a preset operation based on the preset application; or, displaying a first prompt message, the first prompt message being used to prompt that the device is in a state of entering water; or, triggering a motor vibration to prompt that the electronic device is in a state of entering water. Thus, the electronic device can promptly open the preset application when it is determined to be in a state of entering water, without the user having to manually open the preset application, thereby improving the efficiency of operating the preset application in water. Alternatively, the electronic device can further execute the preset operation, without the user having to manually perform the preset operation, thereby improving the user experience. Alternatively, the electronic device promptly prompts the user of the change in the water entry status of the electronic device through a prompt message or motor vibration, reminding the user to take out the mobile phone or perform subsequent operations.
[0015] In a possible implementation of the first aspect, the method further includes: when the capacitance characteristic corresponding to the screen capacitance satisfies a water outflow detection condition, determining that the electronic device is in a water outflow state based on a second change state of the capacitance characteristic. Thus, the water outflow detection condition is a preliminary detection condition. After determining that the capacitance characteristic satisfies the water outflow detection condition, the electronic device determines the change state of the capacitance characteristic, and then determines whether water outflow is occurring based on the change state, thereby improving the accuracy of water outflow detection. The electronic device can determine the water outflow state based on the acquired change state of the capacitance characteristic. Since the change in the value of the capacitance characteristic can represent the change in the contact area between the screen and water, the change in the characteristic value of the screen capacitance can determine the change in the contact area. Therefore, it can be determined that the electronic device is in a water outflow state during the change in the contact area. Thus, it can be determined that the electronic device is in a water outflow state during the water outflow process, without having to wait until the electronic device is completely out of water to detect the water outflow state. This makes water outflow detection of the electronic device faster, thereby improving the user experience.
[0016] In one possible implementation of the first aspect, the water exposure detection condition includes a third condition threshold corresponding to the capacitance characteristic. When the capacitance characteristic corresponding to the screen capacitance satisfies the water exposure detection condition, determining that the electronic device is in a water exposure state based on a second change state of the capacitance characteristic includes: if the value of the capacitance characteristic corresponding to the screen capacitance in a first frame (previous detection frame) (the value of the historical capacitance characteristic) is greater than the third condition threshold, and the value of the capacitance characteristic in a current frame (the current detection frame) is less than the third condition threshold, then if the change in the capacitance characteristic is negative, determining that the electronic device is in a water exposure state; the first frame refers to the frame before the current frame. The third condition threshold is greater than the first condition threshold. Thus, if the electronic device determines that the historical value of the capacitance characteristic in the first frame is greater than the third condition threshold, and the value of the capacitance characteristic in the current frame is less than the third condition threshold, it indicates that the capacitance characteristic value is decreasing, and the screen may be in water exposure. If the change is further detected to be negative, it can be indicated that the contact area between the screen and the water is decreasing. In this case, it can be considered that the electronic device is in water exposure. This allows the water exposure state to be identified when a portion of the device is in water, thereby improving the efficiency of water exposure detection.
[0017] In a possible implementation of the first aspect, if the change in the capacitance characteristic is a negative value, determining that the electronic device is in a state of discharging water includes: if the change in the capacitance characteristic is a negative value and the value of the capacitance characteristic is less than a fourth condition threshold, determining that the electronic device is in a state of discharging water; wherein the fourth condition threshold is less than the third condition threshold, and the fourth condition threshold is less than the second condition threshold. Thus, during the change in the capacitance characteristic detected by the electronic device, if the capacitance characteristic of the electronic device's screen capacitance satisfies the water discharge detection condition, and the electronic device determines that the change in the capacitance characteristic is a negative value, it can be considered that the contact area between the electronic device's screen and the water is decreasing. If it is further determined that the capacitance characteristic satisfies the set fourth condition threshold and the fourth condition threshold is less than the third condition threshold, it can be considered that the contact area between the electronic device's screen and the water has decreased to a certain extent, and it can be determined that the electronic device is in the process of discharging water. Therefore, the water discharge state of the electronic device can be determined without waiting for the entire body of the electronic device to be out of water, thereby improving the detection speed of the water discharge state.
[0018] In a possible implementation manner of the first aspect, the third condition threshold may be equal to the second condition threshold, and the fourth condition threshold may be equal to the first condition threshold.
[0019] In a possible implementation of the first aspect, after determining that the electronic device is discharging water based on the second change state of the capacitance characteristic, the method further includes triggering a water discharge prompt event. Thus, the electronic device can promptly notify a user of changes in the water discharge state of the electronic device.
[0020] In one possible implementation of the first aspect, triggering a water outlet reminder event includes: closing a preset application of the electronic device, the preset application including a camera application; or displaying a second pop-up window message, the second pop-up window message being used to prompt that the electronic device is in a water outlet state; or triggering a motor to stop vibrating, used to prompt that the electronic device is in a water outlet state. Thus, the electronic device can promptly close the preset application when it is determined to be in a water outlet state, eliminating the need for the user to manually close the preset application, thereby improving the user experience. Alternatively, the electronic device promptly notifies the user of changes in the electronic device's submerged state through a reminder message. Alternatively, the electronic device stops vibrating the motor, saving power consumption.
[0021] In one possible implementation of the first aspect, the capacitance value is the absolute value of the difference between the total capacitance value collected by the electronic device and the capacitance reference value. By defining the capacitance value as the absolute value of the difference, subsequent comparison of the capacitance feature value with various conditional thresholds and determination of the change amount are more accurate.
[0022] In a second aspect, the present application provides an electronic device, comprising: a touch-sensitive capacitive screen, a memory, and one or more processors; the touch-sensitive capacitive screen, the memory, and the processor are coupled; wherein the memory stores computer program code, the computer program code comprising computer instructions, and when the computer instructions are executed by the processor, the electronic device executes any one of the methods described in the first aspect above.
[0023] In a third aspect, the present application provides a computer-readable storage medium having instructions stored therein, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect.
[0024] In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any one of the methods described in the first aspect.
[0025] It can be understood that the electronic device described in the second aspect provided above, the computer-readable storage medium described in the third aspect, and the computer program product described in the fourth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of an underwater photography scene provided in an embodiment of the present application;
[0027] Figure 2 A schematic diagram of determining a target connected area provided in an embodiment of the present application;
[0028] Figure 3 A schematic diagram of another embodiment of the present application for determining a target connected area;
[0029] Figure 4 A schematic diagram of capacitance of a finger touching a screen provided in an embodiment of the present application;
[0030] Figure 5 A schematic diagram of the state of an electronic device provided in an embodiment of the present application;
[0031] Figure 6 A schematic diagram of the change in capacitance of a mobile phone when immersed in water, provided in an embodiment of the present application;
[0032] Figure 7 A schematic diagram of a flow chart of an electronic device determining a water entry state according to an embodiment of the present application;
[0033] Figure 8A schematic diagram of a flow chart of an electronic device determining a water entry state according to an embodiment of the present application;
[0034] Figure 9 A schematic diagram of the overall process of a water intrusion detection method provided in an embodiment of the present application;
[0035] Figure 10 A software structure block diagram of an electronic device provided in an embodiment of the present application;
[0036] Figure 11 A schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of the present application;
[0037] Figure 12 A schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0039] It should be noted that the terms "first", "second", etc. below are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0040] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0041] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0042] With the development of electronic devices, in order to further enhance user experience, the usage scenarios of various electronic devices are becoming more and more complex. For example, usage scenarios may include daily usage scenarios such as communication, learning, and work, or may also include usage scenarios in water such as swimming and diving.
[0043] For underwater use, it is generally to use electronic devices to take photos and videos in water. Figure 1 A schematic diagram of an underwater photography scenario is provided, in which a user uses a mobile phone to take photos while swimming. However, current electronic devices cannot detect their own submersion in water in a timely manner, which affects the user's efficiency in operating electronic devices in water and the user experience.
[0044] To address the aforementioned issues, embodiments of the present application provide a water intrusion detection method. Taking the electronic device described above as a device including a capacitive touch screen as an example, the electronic device can detect the screen capacitance. If the capacitance characteristic corresponding to the screen capacitance meets the water intrusion detection condition, the electronic device can promptly determine that the electronic device is in a water intrusion state based on the change in the capacitance characteristic. In the above method, the water intrusion detection condition is set as a preliminary detection condition. After determining that the capacitance characteristic meets the water intrusion detection condition, the electronic device then determines the change in the capacitance characteristic, and then determines whether water intrusion has occurred based on the change in the capacitance characteristic, thereby improving the accuracy of water intrusion detection. The electronic device can determine the water intrusion state based on the obtained change in the capacitance characteristic. Since the change in the capacitance characteristic value can represent the change in the contact area between the screen and water, the change in the capacitance characteristic value can determine the change in the contact area between the screen and water. Therefore, the electronic device can determine that the electronic device is in a water intrusion state during the change in the contact area between the screen and water. Therefore, the water intrusion state can be determined during the water intrusion process, eliminating the need to wait until the electronic device is completely submerged in water to detect the water intrusion. This makes water intrusion detection faster, thereby improving the user experience.
[0045] A capacitive touch screen is a four-layer composite glass screen that uses capacitive touch technology. Its working principle is mainly based on locating the touch point based on the current induction of the human body. Specifically, when the user touches the screen, due to the effect of the human body's electric field, a coupling capacitor will be formed between the user's finger and the working surface of the touch screen. This coupling capacitor is equivalent to a conductor that can allow a small current to pass through. This current will start from the touch point and flow to the electrodes at the four corners of the touch screen. The magnitude of the current flowing through these four electrodes is inversely proportional to the distance from the touch point to the electrode (that is, the closer the distance, the greater the current; the farther the distance, the smaller the current). Furthermore, the controller inside the touch screen can calculate the location of the touch point by measuring the magnitude of these four currents and the proportional relationship between the currents. Therefore, when the user touches the screen, the controller inside the touch screen can accurately identify the location of the touch point and perform the corresponding operation.
[0046] Capacitive touch screens have a baseline capacitance value, which represents the screen's capacitance state when there's no touch or external interference. When a finger or other conductive object touches the screen, an additional capacitor forms at the touch point. This additional capacitance is added to the baseline capacitance value, causing the total capacitance at the touch point to change.
[0047] In the embodiments of this application, the electronic device generally uses a differential measurement method, that is, measuring the difference or relative change between the total capacitance value of the screen and a reference value. Therefore, the capacitance value (also called capacitance value) obtained by the electronic device in subsequent embodiments actually refers to the difference between the total capacitance value and the capacitance reference value.
[0048] It is understandable that when the user's finger or water touches the screen of the electronic device, the capacitance value of the touch point obtained by the electronic device is greater than the capacitance value of other areas not touched by the finger or water. Among them, the difference or relative change between the total capacitance value and the reference value may be a positive value or a negative value. Then, the above-mentioned capacitance value may refer to the absolute value of the capacitance value, that is, the absolute value of the capacitance value of the touch point is greater than the absolute value of the capacitance value of other areas not touched by the finger or water. Among them, by defining the capacitance value obtained by the electronic device as the absolute value of the difference between the total capacitance value and the reference value, it is more accurate to compare the value of the capacitance feature with each condition threshold and to judge the change amount.
[0049] The present application provides a water intrusion detection method, which is applied to an electronic device, wherein the electronic device includes a capacitive touch screen. The method specifically includes steps S101 to S103, as follows:
[0050] Step S101: The electronic device obtains a screen capacity value.
[0051] Capacitive touch screens use grid lines arranged in a grid pattern inside the screen to form multiple independent sensing cells (also called unit areas). These sensing cells can be rectangular, diamond-shaped, or other shapes, depending on the grid line arrangement and density. Each sensing cell corresponds to a capacitance value.
[0052] In this embodiment, taking a rectangular unit area as an example, the electronic device obtains the screen capacitance, that is, the electronic device obtains the capacitance corresponding to the multiple matrices included in the screen. The electronic device can determine the number and size of the rectangles included in the screen based on the screen size. Generally speaking, the size of the rectangles is fixed, and different screen sizes correspond to different numbers of rectangles.
[0053] Step S102: The electronic device determines whether the capacitance characteristic corresponding to the screen capacitance satisfies a water entry detection condition.
[0054] In some embodiments of the present application, the screen capacitance feature may be a full-screen capacitance feature and / or a target connected area capacitance feature. The capacitance of the rectangles within the target connected area is within a preset capacitance range, and the number of unit areas is greater than a first number. In this embodiment, after obtaining the full-screen capacitance, the electronic device may determine the target connected area based on the full-screen capacitance.
[0055] The electronic device may determine the target connected area using the following two methods:
[0056] Method 1: The electronic device may preset a threshold value A (also referred to as a first threshold value), where the preset capacitance range is greater than threshold value A. First, the electronic device searches for capacitance values on the entire screen whose absolute values fall within the preset capacitance range. Then, the electronic device determines at least one candidate connected region based on the screen areas corresponding to the capacitance values within the preset capacitance range. Finally, the electronic device determines the candidate connected region with the largest area from among the at least one candidate connected region as the target connected region. The largest area of the candidate connected region means that the candidate connected region contains the largest number of rectangles, which is greater than the first number.
[0057] See also Figure 2 , Figure 2 This is a schematic diagram of determining a target connected area provided by an embodiment of the present application. Taking the electronic device as a mobile phone as an example, the preset threshold value A is 100, and the preset tolerance range is a tolerance value greater than 100. Figure 2 As shown, after obtaining the full-screen capacitance value, the mobile phone determines the candidate connected area 1 (201), the candidate connected area 2 (202), and the candidate connected area 3 (203) based on the screen areas corresponding to the capacitance values greater than 100 found. The mobile phone selects the candidate connected area 1 (201) with the largest area as the target connected area.
[0058] The second method: The electronic device can preset thresholds A and B, where threshold A is smaller than threshold B. The electronic device then determines capacitance A from the capacitance values corresponding to the entire screen (referred to as the first capacitance), where the absolute value of capacitance A is greater than threshold B. Starting from the rectangle containing capacitance A, the electronic device expands outward, selecting capacitance B whose absolute value is greater than threshold A. The screen area corresponding to capacitance A and capacitance B is then the target connected area.
[0059] See also Figure 3 , Figure 3 This is another schematic diagram of determining the target connected area provided by the embodiment of the present application. Taking the electronic device as a mobile phone as an example, the preset threshold A is 100 and the threshold B is 1000. Figure 3 As shown in (a), after obtaining the full-screen capacitance value, the mobile phone determines capacitance value A (301) from the capacitance values greater than 1000. The mobile phone takes the rectangle where capacitance value A (301) is located as the starting point, expands to the surrounding area, and selects capacitance values B that are interconnected and have an absolute value greater than 100. The screen area corresponding to capacitance value A and capacitance value B is the target connected area 302. The values of the above thresholds A and B are only examples and can be customized according to needs.
[0060] It should be noted that in the second method, if the capacitance value A is not selected appropriately, a small connected area will appear, and the electronic device needs to reselect the capacitance value A. Figure 3 As shown in (b), if the capacitance 303 is used as the capacitance A, the area of the connected region 304 is smaller, and the capacitance A is reselected.
[0061] In some embodiments, the target connected region capacity characteristics include but are not limited to one or more of the following: the area of the target connected region (the number of rectangles included), or the number of larger values contained in the capacity of the target connected region, or the sum of the capacity values of the target connected region.
[0062] The full-screen capacity value feature includes but is not limited to one or more of the following: the maximum value of the full-screen capacity value, or the total value of the full-screen capacity value, or the number of larger values included in the full-screen capacity value.
[0063] The electronic device may preset a threshold value and regard a capacitance value greater than the threshold value as a larger value. Threshold 1 (also referred to as the third threshold value) set by the electronic device for determining the larger value within the target connected area and threshold 2 (also referred to as the second threshold value) used to determine the larger value of the full screen may be the same value or different values.
[0064] In other embodiments, the capacity feature includes, but is not limited to, one or more of the following: the maximum value of the capacity of the entire screen, or the total value of the capacity of the entire screen, or the number of larger values included in the capacity of the entire screen, the area of the target connected region (the number of rectangles included), or the number of larger values included in the capacity of the target connected region, or the total value of the capacity of the target connected region. The embodiments of the present application do not limit the specific feature type of the capacity feature.
[0065] In this embodiment, the electronic device can preset a water entry detection condition (also called a first water entry condition), and the first water entry condition can include a first condition threshold corresponding to the capacitance feature. Taking the capacitance feature as the number of rectangles included in the target connected area as an example, assuming that the first condition threshold corresponding to the number of rectangles included in the target connected area is number C, if the number of rectangles included in the target connected area is greater than number C, then the capacitance feature of the target connected area meets the first water entry condition. If the capacitance feature of the target connected area obtained above does not meet the first water entry condition, the change state of the capacitance feature will not be further judged. Therefore, by setting the water entry detection condition, subsequent useless judgments can be reduced and the resources of the electronic device can be saved.
[0066] In addition, since the electronic device has set the initial water intrusion detection conditions, the electronic device will continue to perform water intrusion detection only after the value of the capacitance characteristic reaches a certain threshold, avoiding the misjudgment of situations such as fingers touching the screen or water drops falling on the screen as the electronic device being submerged in water.
[0067] See also Figure 4 , Figure 4 A schematic diagram of the capacitance of a finger touching a screen provided in an embodiment of the present application. Figure 4 As shown, the finger's touch area is relatively small, resulting in a smaller area of connected region 401, a smaller number of rectangles within connected region 401, and a smaller number of large capacitance values within connected region 401. Consequently, the capacitance characteristics of connected region 401 do not meet the first water entry condition. Therefore, the electronic device will not mistakenly identify a finger touching the screen as water entry, improving the accuracy of water entry detection.
[0068] In some possible implementations, when determining whether the capacitance characteristic satisfies the water intrusion detection condition, the electronic device only needs to determine whether at least one characteristic of the capacitance characteristic satisfies the water intrusion detection condition, which means that the capacitance characteristic satisfies the water intrusion detection condition. Specifically, if the capacitance characteristic of the screen includes the full-screen capacitance characteristic, the electronic device determines at least one characteristic of the full-screen capacitance characteristic, for example, if the sum of the capacitance values of the full screen satisfies the water intrusion detection condition, then the capacitance characteristic satisfies the water intrusion detection condition. Alternatively, if the capacitance characteristic of the screen includes the target connected area capacitance characteristic, the electronic device determines at least one characteristic of the target connected area capacitance characteristic, for example, if the area of the target connected area satisfies the water intrusion detection condition, then the capacitance characteristic satisfies the water intrusion detection condition. Alternatively, if the capacitance characteristic of the screen includes the full-screen capacitance characteristic and the target connected area capacitance characteristic, the electronic device determines at least one characteristic of the full-screen capacitance characteristic and the target connected area capacitance characteristic, for example, if the area of the target connected area satisfies the water intrusion detection condition, then the capacitance characteristic satisfies the water intrusion detection condition.
[0069] In some possible implementations, when determining whether a capacitance characteristic satisfies a water intrusion detection condition, the electronic device determines that all characteristics of the capacitance characteristic satisfy the water intrusion detection condition, thereby indicating that the capacitance characteristic satisfies the water intrusion detection condition. For example, if the capacitance characteristic of the screen includes a full-screen capacitance characteristic, assuming that the full-screen capacitance characteristic includes a maximum capacitance value of the full screen, a number of maximum capacitance values of the full screen, and a total capacitance value of the full screen, the electronic device determines that the maximum capacitance value of the full screen satisfies the water intrusion detection condition, the number of maximum capacitance values of the full screen satisfies the water intrusion detection condition, and the total capacitance value of the full screen satisfies the water intrusion detection condition, then the capacitance characteristic satisfies the water intrusion detection condition.
[0070] After determining that the capacitance characteristic corresponding to the screen capacitance meets the water entry detection condition, step S103 is executed.
[0071] Step S103: When the capacitance characteristic corresponding to the screen capacitance satisfies the water entry detection condition, the electronic device determines that the electronic device is in a state of being submerged in water based on a first change state of the capacitance characteristic.
[0072] It is understandable that, in general, when water contacts the screen of an electronic device, the capacitance value at the contact point is greater than the capacitance value of other areas that are not in contact with water. Therefore, when the electronic device is immersed in water, as the contact area between the screen and water changes, the capacitance characteristics of the screen capacitance will also change accordingly; and after being completely immersed in water, the capacitance characteristics and the contact area are relatively stable and basically unchanged. Therefore, the change in the characteristic value of the screen capacitance can characterize the change in the contact area between the screen and water. The larger the characteristic value of the screen capacitance, the larger the contact area between the screen and water. By judging the change in the contact area based on the change in the characteristic value of the above-mentioned screen capacitance, it is possible to judge that the electronic device is in a state of being immersed in water during the change in the contact area, thereby being able to accurately and timely judge the state of being immersed in water during the process of being immersed in water, without having to wait for it to be completely immersed in water before judging the state of the electronic device being immersed in water.
[0073] Specifically, when the electronic device is submerged in water, the target connected region's area increases, the number of large capacitance values in the target connected region increases, the total capacitance value of the target connected region increases, the maximum capacitance value of the entire screen increases, the total capacitance value of the entire screen increases, and the number of large capacitance values of the entire screen increases. These changes in capacitance characteristics can all represent changes in the contact area between the screen and water. By detecting these characteristic values of the full-screen capacitance, the electronic device can determine changes in the contact area between the screen and water.
[0074] Taking the mobile phone as an example, please refer to Figure 5 , Figure 5 This is a schematic diagram of a scenario where a mobile phone enters or exits water, as provided in an embodiment of the present application. Figure 5 As shown in (a), the phone is completely out of water. Figure 5 As shown in (b), a portion of the mobile phone is in water, and the capacitance characteristic of the screen capacitance of the mobile phone meets the first water entry condition, and the state of the electronic device can be determined based on the change state of the capacitance characteristic. Figure 5 As shown in (c), mobile phones are Figure 5 For the mobile phone shown in (b), the body of the phone has been submerged in water for a longer period of time, but it is not completely submerged. At this point, the phone can determine that the electronic device is being submerged in water based on the change in capacitance characteristics. Figure 5 As shown in (d), the mobile phone is completely submerged in water.
[0075] In this embodiment, the first change state of the capacitance characteristic may refer to a positive change in the capacitance characteristic.
[0076] See also Figure 6 , Figure 6 This is a schematic diagram of the change in capacitance of a mobile phone when it is immersed in water, provided in an embodiment of the present application. Figure 6(a) to Figure 6 As shown in (b), the target connected area of the mobile phone changes from target connected area 601 to target connected area 602. The area of the target connected area of the mobile phone is significantly increased, and at this time, the change in the area of the target connected area of the mobile phone is a positive value.
[0077] Alternatively, compared with the target connected area 601, the target connected area 602 has an increasing number of larger values and an increasing total value of the capacity values, and both the change in the number of larger values and the change in the total value of the capacity values are positive.
[0078] In one possible implementation, the electronic device does not need to determine that the changes in all the characteristics of the capacitance characteristics are positive before making a subsequent water immersion judgment. Instead, it can make a subsequent water immersion judgment after determining that some of the characteristics of the capacitance characteristics are positive. For example, after the electronic device detects that the change in the number of larger capacitance values in the full screen is positive, it can make a subsequent water immersion judgment. Or, for another example, after the electronic device detects that the change in the number of larger capacitance values in the full screen is positive, and the change in the maximum capacitance value in the full screen is positive, it can make a subsequent water immersion judgment.
[0079] In another possible implementation, the electronic device determines that all changes in the capacitance characteristics are positive before determining whether the device has been submerged in water. For example, if the electronic device detects that the change in the number of larger capacitance values across the entire screen is positive, the change in the number of larger capacitance values across the entire screen is positive, and the change in the maximum capacitance value across the entire screen is positive, then the electronic device determines whether the device has been submerged in water.
[0080] Therefore, after the electronic device determines that the value of the capacitance characteristic is greater than the first condition threshold, it means that the capacitance characteristic value is large and the screen may be in contact with water. If it is further detected that the change is a positive value, it can be indicated that the contact area of the screen is increasing. At this time, it can be considered that the electronic device is in the process of being submerged in water.
[0081] In this embodiment, after determining that the change in the capacitance characteristic is a positive value, the electronic device further sets a second water immersion condition, wherein the second water immersion condition includes a second condition threshold value that the capacitance characteristic must satisfy.
[0082] Taking the capacitance characteristic of the target connected area as an example, in the first water entry condition, each capacitance characteristic corresponds to a first condition threshold, wherein the value of the capacitance characteristic is greater than the first condition threshold, indicating that the capacitance characteristic satisfies the first water entry condition. For example, the area of the target connected area is greater than the first area threshold, or the number of large capacitance values in the target connected area is greater than the first number threshold, or the sum of the capacitance values in the target connected area is greater than the first sum threshold. In the second water entry condition, the capacitance characteristic corresponds to a second condition threshold, wherein the value of the capacitance characteristic is greater than the second condition threshold, indicating that the capacitance characteristic satisfies the second water entry condition. For example, the area of the target connected area is greater than the second area threshold, or the number of large capacitance values in the target connected area is greater than the second number threshold, or the sum of the capacitance values in the target connected area is greater than the second sum threshold.
[0083] Since the change in the capacitance characteristic of the aforementioned electronic device during the water immersion process is a positive value, it can be seen that the first condition threshold is less than the second condition threshold.
[0084] Therefore, if the capacitance characteristic of the screen capacitance of the electronic device meets the first water immersion condition, and the electronic device determines that the change in the capacitance characteristic is a positive value, it can be considered that the contact area between the screen of the electronic device and the water is getting larger and larger. After further determining that the capacitance characteristic meets the second water immersion condition, it can be considered that the contact area between the screen of the electronic device and the water has reached a certain level, and it is not an accidental touch. It can be determined that the electronic device is in the process of being immersed in water, and therefore it can be determined that the current electronic device is in the state of being immersed in water.
[0085] In this embodiment, after determining that the electronic device is currently in a state of being submerged in water, the electronic device triggers a water entry prompt event.
[0086] Among them, triggering the water entry prompt event may include: opening a preset application, performing a preset operation based on the preset application, displaying prompt information, motor vibration, etc. The preset application may be a camera application, and the preset operation may be opening a video recording operation, etc. Displaying prompt information may refer to displaying a pop-up window message. The above-mentioned water entry prompt events can be set according to user needs and are not listed here one by one. Figure 5 As shown in (c), when the mobile phone determines that it is in the state of being submerged in water, the camera application can be directly opened.
[0087] In summary, after detecting that an electronic device is submerged in water, it can promptly trigger a water entry prompt. For example, the device can automatically open a camera application to facilitate the user's next photo-taking operation. Another example is the vibration of the electronic device's motor, prompting the user to promptly remove the electronic device from the water. Another example is the display of a pop-up window containing a prompt indicating that the electronic device has been submerged, thereby prompting the user to perform subsequent operations, or prompting the user that the current electronic device's components will be waterproofed. Thus, when the electronic device detects that the capacitance characteristic corresponding to the screen capacitance meets the water entry detection condition, it can promptly detect that the device is submerged in water based on the changing state of the capacitance characteristic, thereby achieving the effect of promptly responding to user needs without increasing any cost.
[0088] In this embodiment, after executing step S101: obtaining the screen capacitance value of the electronic device, the water outflow state of the electronic device may be detected, that is, executing step S104.
[0089] Step S104: The electronic device determines whether the capacitance characteristic corresponding to the screen capacitance satisfies the water outflow detection condition.
[0090] For electronic devices, water exposure detection begins only when the device detects a decrease in capacitance. These water exposure detection conditions are preliminary. Once the device determines that the capacitance characteristic meets the water exposure detection conditions, it determines the capacitance characteristic's change state and, based on this change state, determines whether water has been released. This improves the accuracy of water exposure detection.
[0091] In this embodiment, the electronic device can set a water outflow detection condition (also called a first water outflow condition). In the first water outflow condition, the capacitance feature corresponds to a third condition threshold. Taking the capacitance feature as the number of rectangles included in the target connected area as an example, assuming that the third condition threshold corresponding to the number of rectangles included in the target connected area is number D, if the number of rectangles included in the target connected area in the previous frame is greater than number D, and the number of rectangles included in the current frame is less than number D, then the connected area meets the first water outflow condition.
[0092] If the capacitance feature includes the larger capacitance value in the target signal connected area, the corresponding third conditional threshold is the third quantity threshold; if the capacitance feature includes the sum of the capacitance values in the target connected area, the corresponding third conditional threshold is the third sum threshold.
[0093] In some embodiments, when the electronic device is completely submerged in water, the capacitance characteristic of the screen capacitance is greater than a third condition threshold. Then, the third condition threshold may be equal to the second condition threshold.
[0094] After determining that the capacitance characteristic corresponding to the screen capacitance meets the water discharge detection condition, step S105 is executed.
[0095] Step S105: When the capacitance characteristic corresponding to the screen capacitance meets the water outlet detection condition, the electronic device determines that the electronic device is in the water outlet state based on the second change state of the capacitance characteristic.
[0096] When detecting the submerged state of an electronic device, the capacitance characteristics of the screen will also change during the submerged state. Specifically, during the submerged state, the area of the target signal connectivity region decreases, the number of maximum capacitance values in the target signal connectivity region decreases, the total capacitance value of the target connectivity region decreases, the maximum capacitance value of the entire screen decreases, the total capacitance value of the entire screen decreases, and the number of maximum capacitance values in the entire screen decreases.
[0097] See also Figure 5 The schematic diagram of the scene of the mobile phone entering or exiting the water is as follows: Figure 5 As shown in (d), the phone is completely submerged in water. Figure 5 As shown in (c), a part of the mobile phone body is exposed to water. At this time, the capacitance characteristic of the screen capacitance of the mobile phone meets the first water condition, and the state of the electronic device can be determined based on the change state of the capacitance characteristic. Figure 5 As shown in (b), compared with Figure 5 For the mobile phone shown in (c), the part of the mobile phone body that is exposed to water is larger. At this time, the mobile phone can determine that the electronic device is in the state of being exposed to water. Figure 5 As shown in (a), the mobile phone is completely out of water.
[0098] In this embodiment, the second change state of the capacitance characteristic may refer to a negative change in the capacitance characteristic. Thus, if the electronic device determines that the historical value of the capacitance characteristic in the previous frame is greater than the third condition threshold, and the value of the capacitance characteristic in the current frame is less than the third condition threshold, it indicates that the capacitance characteristic value is decreasing, and the screen may be in the process of being submerged in water. If the change is further detected to be a negative value, it may indicate that the contact area between the screen and the water is decreasing, and the electronic device can be considered to be in the process of being submerged in water.
[0099] In this embodiment, after determining that the change in the capacitance characteristic is a negative value, the electronic device further sets a second water outlet condition, wherein the second water outlet condition includes a fourth condition threshold value that the capacitance characteristic must satisfy.
[0100] Taking the capacitance characteristic of the target connected area as an example, in the second water-emission condition, each capacitance characteristic corresponds to a fourth condition threshold. A capacitance characteristic value less than the fourth condition threshold indicates that the capacitance characteristic satisfies the second water-emission condition. For example, the area of the target signal connected area may be less than the fourth area threshold, or the number of capacitance values with larger values in the target signal connected area may be less than the fourth number threshold, or the total capacitance value in the target signal connected area may be less than the fourth total threshold.
[0101] It is understood that when the electronic device is fully submerged, the characteristic value of the screen capacitance is less than the fourth condition threshold. Therefore, the fourth condition threshold can be equal to the first condition threshold. Since the characteristic change in capacitance is negative during the submerged state of the electronic device, or the second condition threshold is greater than the first condition threshold, it can be seen that the third condition threshold is greater than the fourth condition threshold.
[0102] Therefore, if the capacitance characteristic of the screen capacitance of the electronic device meets the first water outlet condition, and the electronic device determines that the change in the capacitance characteristic is a negative value, it can be considered that the contact area between the screen of the electronic device and the water is getting smaller and smaller. After further determining that the capacitance characteristic meets the second water outlet condition, it can be considered that the contact area between the screen of the electronic device and the water has been reduced to a certain extent, and then it can be determined that the electronic device is in the process of discharging water. Therefore, it can be determined that the current electronic device is in the state of discharging water.
[0103] In this embodiment, after the electronic device determines that it is currently in a water discharging state, it triggers a water discharging prompt event, wherein triggering the water discharging prompt event may include: closing a preset application, displaying a prompt message, stopping the motor from vibrating, etc.
[0104] In summary, when the electronic device detects that the above-mentioned capacitance characteristic meets the water outlet detection condition, it can timely judge the water outlet state according to the changing state of the electronic device. Since the change in the value of the capacitance characteristic can characterize the change in the contact area between the screen and the water, the change in the characteristic value of the above-mentioned screen capacitance can judge the change in the contact area, and can judge that the electronic device is in a state of discharging water during the change in the contact area, thereby being able to judge that the electronic device is in a state of discharging water during the water outlet process. There is no need to wait until the electronic device is completely out of water before detecting the water outlet state. The detection of the water outlet state of the electronic device is faster, thereby improving the user experience. Moreover, after quickly judging the water outlet state of the electronic device, the electronic device can make a water outlet response (water outlet prompt event) in a timely manner. For example, turning off the camera, turning off the pop-up display, stopping vibration, etc. can save the power consumption of the electronic device. Alternatively, a pop-up window can be displayed to prompt that the current electronic device is in a water outlet state.
[0105] Next, we will explain in detail the process by which an electronic device determines whether it is in a water-in or water-out state by detecting the capacitance characteristics of the target connected area. Figure 7 , Figure 7 The present invention provides a flow chart of an electronic device determining whether it is in water or not. Figure 7 As shown, it specifically includes steps S701 to S712, as follows:
[0106] Step S701: The electronic device determines a target connected area.
[0107] In this embodiment, the specific process of determining the target connected area can refer to the description of the above embodiment and will not be repeated here.
[0108] Step S702: The electronic device counts the characteristics of the capacitance of the target connected area: area, number of larger values, and total capacitance value.
[0109] With reference to the description of the aforementioned embodiment, the electronic device may set a first condition threshold and a second condition threshold. If the electronic device detects that the value of the capacitance feature of the target connected area is greater than the first condition threshold, the value of the capacitance feature becomes larger and larger, and the electronic device detects that the value of the capacitance feature is greater than the second condition threshold, then the electronic device is in a state of entering water. If the electronic device detects that the value of the capacitance feature of the target connected area is greater than the second condition threshold in the previous frame (previous detection frame), and the current frame (current detection frame) is less than the second condition threshold, the value of the capacitance feature becomes smaller and smaller, and the electronic device detects that the value of the capacitance feature is less than the first condition threshold, then the electronic device is in a state of emerging from water.
[0110] For example, the target connected region capacity features include area, number of maximum values, and total capacity value. Each capacity feature corresponds to a first condition threshold and a second condition threshold. The area of the target connected region may refer to the number of rectangles contained in the target connected region.
[0111] In this embodiment, the first condition threshold and the second condition threshold can be determined according to the screen size of the electronic device. Take the screen including 40*18=720 capacitance nodes CNT as an example. Here, the capacitance node refers to the number of rectangles. Then, the first condition threshold can include a first area threshold CNT*1 / 10 corresponding to the area, a first quantity threshold CNT*1 / 12 corresponding to the number of larger values, and a first total threshold 55000 corresponding to the sum of capacitance values. The second condition threshold can include a second area threshold > CNT* / 2 corresponding to the area, a second quantity threshold CNT*1 / 3 corresponding to the number of larger values, and a second total threshold > 300000 for the sum of capacitance values.
[0112] After calculating the value of each characteristic in the capacitance characteristic, the electronic device may execute step S703 or step S708.
[0113] Step S703: Determine whether the value of at least one feature is greater than a first condition threshold.
[0114] After determining that the value of at least one feature is greater than the first condition threshold, the electronic device executes step S704. For example, the electronic device detects that the area of the target connected area is greater than the first area threshold.
[0115] After determining that the value of at least one feature is not greater than the first condition threshold, the electronic device executes step S707.
[0116] Step S704: Determine whether the value of at least one feature is increasing.
[0117] After determining that the value of at least one characteristic is increasing, the electronic device executes step S705. After determining that the value of at least one characteristic is not increasing, the electronic device executes step S707.
[0118] Step S705: Determine whether the value of at least one feature is greater than a second condition threshold.
[0119] After determining that the value of at least one characteristic is greater than the second condition threshold, the electronic device executes step S706. After determining that the value of at least one characteristic is not greater than the second condition threshold, the electronic device executes step S707.
[0120] Step S706: Change the state to the state of entering the water.
[0121] In this embodiment, the electronic device determines the current state as being submerged in water, and may trigger a water entry prompt event, such as opening a camera application, motor vibration, and the like.
[0122] Step S707: Keep the original state unchanged.
[0123] Step S708: Determine whether the value of the previous frame of at least one feature is greater than the second condition threshold, and whether the value of the current frame is less than the second condition threshold.
[0124] After the electronic device determines that the value of the at least one feature in the previous frame is greater than the second condition threshold and the value of the current frame is less than the second condition threshold, it executes step S709. After the electronic device determines that the value of the at least one feature in the previous frame is not greater than the second condition threshold, or that the value of the at least one feature in the previous frame is greater than the second condition threshold and the value of the current frame is not less than the second condition threshold, it executes step S712.
[0125] Step S709: Determine whether the value of at least one feature is decreasing.
[0126] After determining that the value of at least one characteristic is decreasing, the electronic device executes step S710. After determining that the value of at least one characteristic is not decreasing, the electronic device executes step S712.
[0127] Step S710: Determine whether the value of at least one feature is less than a first condition threshold.
[0128] After determining that the value of at least one feature is less than the first condition threshold, the electronic device executes step S711. After determining that the value of at least one feature is not less than the first condition threshold, the electronic device executes step S712.
[0129] Step S711: Change the state to the water outlet state.
[0130] In this embodiment, the electronic device determines the current state as a water-discharging state and can respond to the water-discharging in a timely manner, such as closing the camera application, stopping the motor vibration, etc.
[0131] Step S712: Keep the original state unchanged.
[0132] In summary, since the change in the value of the target connected area capacitance characteristic can represent the change in the contact area between the screen and the water, the larger the value of the target connected area capacitance characteristic is, the larger the contact area between the screen and the water is. During the immersion process, the electronic device can determine the change in the contact area by detecting the change in the target connected area capacitance characteristic, and can determine that the electronic device is in a state of being immersed in water during the change in the contact area. Therefore, the electronic device can detect the immersion state during the immersion process, that is, when part of the body is in water, thereby achieving the purpose of quickly detecting the immersion state. The electronic device does not need to wait until it is completely in water to switch to the immersion state, and can allow the user to operate the electronic device in time after the electronic device is detected to be in the water state, so that the electronic device can respond to user operations more quickly, improving the user experience.
[0133] Furthermore, during the water exit process, the electronic device can determine the change in contact area by detecting the change in the capacitance characteristic of the target connected area. As the value of the capacitance characteristic of the target connected area becomes smaller and smaller, the contact area between the screen and the water becomes smaller and smaller. The electronic device can be determined to be in the water exit state during the change in contact area. Therefore, the electronic device can detect the water exit state during the water entry process, that is, when part of the body is in the water, thereby achieving the purpose of quickly detecting the water exit state. The electronic device does not need to wait until it is completely in the air to switch to the water exit state. The electronic device can respond to the water exit state in a timely manner after detecting the water exit state, for example, by turning off the camera, closing the pop-up display, stopping vibration, etc., thereby saving power consumption of the electronic device.
[0134] Next, we will explain in detail the process by which electronic devices detect whether they have entered or exited water by detecting the full-screen capacitance characteristics. Figure 8 , Figure 8 The present application provides a flow chart of an electronic device determining whether it is in water or not. Figure 8 As shown, it specifically includes steps S801 to S811, as follows:
[0135] Step S801: The electronic device counts full-screen capacitance characteristics: maximum value, number of larger values, and total capacitance value.
[0136] With reference to the description of the aforementioned embodiment, the electronic device may set a first conditional threshold and a second conditional threshold. If the electronic device detects that the value of the full-screen capacitance feature is greater than the first conditional threshold, and the value of the full-screen capacitance feature becomes larger and larger, and the electronic device detects that the value of the full-screen capacitance feature is greater than the second conditional threshold, then the electronic device is in a state of entering water. If the electronic device detects that the value of the full-screen capacitance feature is greater than the second conditional threshold in the previous frame, and the value of the full-screen capacitance feature is less than the second conditional threshold in the current frame, and the value of the full-screen capacitance feature becomes smaller and smaller, and the electronic device detects that the value of the full-screen capacitance feature is less than the first conditional threshold, then the electronic device is in a state of emerging from water.
[0137] For example, the full-screen capacitance feature includes the maximum value, the number of larger values, and the total capacitance value. Each feature in the full-screen capacitance feature corresponds to a first condition threshold and a second condition threshold. The maximum capacitance value also corresponds to a first numerical threshold and a second numerical threshold.
[0138] After calculating the value of each feature in the full-screen capacitance feature, the electronic device may execute step S802 or step S807.
[0139] Step S802: Determine whether the value of at least one feature is greater than a first condition threshold.
[0140] Step S803: Determine whether the value of at least one feature is increasing.
[0141] Step S804: Determine whether the value of at least one feature is greater than a second condition threshold.
[0142] Step S805: Change the state to the state of entering the water.
[0143] Step S806: Keep the original state unchanged.
[0144] Step S807: Determine whether the value of the previous frame of at least one feature is greater than the second condition threshold, and whether the value of the current frame is less than the second condition threshold.
[0145] Step S808: Determine whether the value of at least one feature is decreasing.
[0146] Step S809: Determine whether the value of at least one feature is less than a first condition threshold.
[0147] Step S810: Change the state to the state of discharging water.
[0148] Step S811: Keep the original state unchanged.
[0149] In this embodiment, the specific process of step S802 to step S811 can refer to the detailed description of step S703 to step S712 in the above embodiment, and will not be repeated here.
[0150] In summary, since the change in the value of the full-screen capacitance characteristic can represent the change in the contact area between the screen and water, the larger the value of the full-screen capacitance characteristic is, the larger the contact area between the screen and water is. The electronic device can compare the value of the full-screen capacitance characteristic with the first condition threshold and the second condition threshold through the obtained full-screen capacitance, and judge the change in the contact area according to the change state of the full-screen capacitance characteristic. It can judge that the electronic device is in a state of being submerged in water during the change of the contact area. Therefore, the electronic device can detect the state of being submerged in water when part of the body is in water during the process of being submerged in water, that is, it can achieve the purpose of quickly detecting the state of being submerged in water. In addition, the electronic device can prompt the user to operate the electronic device in time after detecting the state of being submerged in water, so that the electronic device can respond to user operations more quickly, thereby improving the user experience.
[0151] In addition, the electronic device can also compare the value of the full-screen capacitance feature with the first condition threshold and the second condition threshold through the obtained full-screen capacitance value, and judge the change of the contact area according to the change state of the full-screen capacitance feature. As the value of the capacitance feature of the target connected area becomes smaller and smaller, the contact area between the screen and the water becomes smaller and smaller. It can be judged that the electronic device is in a state of emerging from water during the change of the contact area. Therefore, the electronic device can detect that it is in a state of emerging from water during the process of entering water, that is, when part of the body is in water, thereby achieving the purpose of quickly detecting the state of emerging from water.
[0152] In this embodiment, the electronic device can also determine whether it is in a submerged state or a submerged state by detecting the full-screen capacitance characteristic and the target connected area capacitance characteristic. The electronic device can calculate the full-screen capacitance characteristic and the target connected area capacitance characteristic, and determine whether it is in a submerged state or a submerged state by determining changes in at least one of the above capacitance characteristics. The specific process for determining the capacitance characteristic can be referred to the description in the previous embodiment and will not be repeated here.
[0153] In this embodiment, the above-mentioned water intrusion detection method may specifically include five steps: capacitance data acquisition, capacitance feature extraction, feature judgment, status reporting, and upper layer response. Figure 9 , Figure 9 This is a schematic diagram of the overall process of a water intrusion detection method provided in an embodiment of the present application. Figure 9 As shown, it specifically includes steps S901 to S905, as follows:
[0154] Step S901: Capacitance data acquisition.
[0155] Specifically, the electronic device can obtain capacitance data from the touch chip based on a fixed number of rectangles. The number of rectangles used can be determined based on the screen size. The capacitance data refers to the capacitance corresponding to each rectangle on the electronic device's screen. The touch sensor of the electronic device then transmits the obtained capacitance data to upper-layer software via a driver.
[0156] Step S902: Capacitance feature extraction.
[0157] In this embodiment, the electronic device can extract features for determining the water entry state or the water exit state from the capacitance data acquired in step S901.
[0158] Step S903: Feature judgment.
[0159] Specifically, the electronic device can use the extracted capacitance characteristics to determine whether the preset water entry condition or the preset water exit condition is met. The specific determination steps can be referred to the description of the above embodiment and will not be repeated here.
[0160] Step S904: reporting status.
[0161] The electronic device reports the water entry or exit status to the input subsystem in the framework layer. The input subsystem is responsible for managing input device events and converting them into information that the system can understand and process.
[0162] Step S905: Upper layer responds.
[0163] After receiving the water entry status, the system can trigger a water entry prompt event, or after receiving the water exit status, the system can respond to the water exit in a timely manner.
[0164] Therefore, when the electronic device is immersed in water, it can judge the change in the contact area between the screen and water by detecting the change in the capacitance characteristics, and detect the water immersion status when part of the body is in water, thereby achieving the purpose of quickly detecting the water immersion status. It allows the user to operate the electronic device in time after the electronic device is detected to be in the water state, so that the electronic device can respond to user operations more quickly, improve the efficiency of the electronic device's operation in water, and further improve the user experience.
[0165] In this embodiment, the software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. This embodiment of the application takes the Android system of the layered architecture as an example to illustrate the software structure of the electronic device.
[0166] See also Figure 10 , Figure 10 : is a software structure diagram of the electronic device of the embodiment of the present application. Figure 10 As shown, the layered architecture divides software into several layers, each with clear roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers: from top to bottom, the application layer (also known as the application layer), the framework layer (also known as the application framework layer), and the kernel layer.
[0167] The application layer can include a series of application packages.
[0168] like Figure 10 As shown, the application package may include a camera application.
[0169] The framework layer provides an application programming interface (API) and programming framework for the application layer's applications. The framework layer includes some predefined functions.
[0170] like Figure 10 As shown, the framework layer may include a data acquisition module, a feature extraction module, a feature judgment module, and a status reporting module.
[0171] The data acquisition module receives capacitance data detected by the touch sensor. The feature extraction module extracts capacitance feature values from the data acquisition module for use in determining state characteristics. The feature determination module determines whether the extracted capacitance features meet preset water entry or exit conditions, thereby determining the current state. The state reporting module reports the water exit or water entry status to the application layer.
[0172] The kernel layer is the layer between hardware and software. The kernel layer contains at least the camera driver and sensor driver.
[0173] The following illustrates the software and hardware workflow of an electronic device, using a water intrusion detection scenario as an example. When the touch sensor detects capacitance data in a preset area, it reports it to the sensor driver, which in turn reports it to the data acquisition module in the framework layer. Then, after processing by the feature extraction and feature determination modules, the status reporting module reports the determined water intrusion status to the camera application in the application layer. The camera application calls an interface in the application framework layer to launch the camera application, which then calls the kernel layer to launch the camera driver, allowing the camera to capture still images or video.
[0174] For example, the electronic device in the embodiments of the present application may include at least one of a mobile phone with a capacitive touch screen, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device.
[0175] In this embodiment, if the water entry prompt event includes opening a camera application, then the electronic device is provided with a capacitive touch screen and a camera.
[0176] The following will describe the implementation of the embodiment of the present application in detail with reference to the accompanying drawings. Taking the above-mentioned electronic device as a mobile phone as an example, the hardware structure of the electronic device 100 will be introduced. Figure 11 , Figure 11 A schematic diagram of the hardware structure of the electronic device 100 is shown. Figure 11 As shown, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, an antenna 1, an antenna 2, a sensor module 180, a motor 191, a camera module 193, a display screen 194, etc.
[0177] In this embodiment, the sensor module 180 may include a touch sensor 180K.
[0178] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0179] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0180] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0181] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 may be a cache memory. This memory can store instructions or data that have been used or are frequently used by processor 110. When processor 110 needs to use the instruction or data, it can directly access it from this memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0182] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface. The processor 110 may be connected to modules such as a touch sensor, an audio module, a wireless communication module, a display, and a camera through at least one of the above interfaces.
[0183] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0184] Electronic device 100 can implement display functions using a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0185] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or more display screens 194.
[0186] In this embodiment, the display screen may display a pop-up message to prompt the user that the user is in the state of entering the water or exiting the water.
[0187] The electronic device 100 can realize the camera function through the camera module 193, ISP, video codec, GPU, display screen 194, application processor AP, neural network processor NPU, etc.
[0188] The camera module 193 can be used to collect color image data and depth data of the subject. The ISP can be used to process the color image data collected by the camera module 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then transmitted to the ISP for processing and converted into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be provided in the camera module 193.
[0189] In some embodiments, the electronic device 100 may include one or more camera modules 193. Specifically, the electronic device 100 may include one front camera module 193 and one rear camera module 193. The front camera module 193 may generally be used to capture color image data and depth data of the photographer facing the display screen 194, while the rear camera module may be used to capture color image data and depth data of the subject (e.g., a person, scenery, etc.) facing the photographer.
[0190] The internal memory 121 can be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, 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 during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional methods or data processing of the electronic device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0191] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0192] In this embodiment, the touch screen is a capacitive touch screen.
[0193] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0194] In this embodiment, the water entry prompt event may include motor vibration. When the electronic device detects that the device is entering water, the motor vibration is triggered.
[0195] The methods in the above embodiments can all be implemented in an electronic device having the above hardware structure.
[0196] The present application also provides a chip system. Figure 12As shown, the chip system 1200 includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected through lines. For example, the interface circuit can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instructions are executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiments of the present application.
[0197] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the mobile phone in the above-mentioned method embodiment.
[0198] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.
[0199] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0200] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0201] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0202] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0203] 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 readable storage medium. Based on this understanding, the technical solution of the embodiment 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, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute 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 magnetic disk or an optical disk.
[0204] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A water entry detection method, characterized in that: Applied to an electronic device, the electronic device including a capacitive touch screen, the method comprising: Obtaining a screen capacitance value of the electronic device, wherein the screen includes a plurality of unit areas, and each unit area corresponds to a capacitance value; When the capacitance characteristic corresponding to the screen capacitance satisfies a water entry detection condition, it is determined that the electronic device is in a state of being submerged in water based on a first change state of the capacitance characteristic.
2. The method according to claim 1, characterized in that The water entry detection condition includes a first condition threshold corresponding to the capacitance feature, and when the capacitance feature corresponding to the screen capacitance satisfies the water entry detection condition, determining that the electronic device is in a state of being submerged in water based on a first change state of the capacitance feature includes: When the value of the capacitance characteristic corresponding to the screen capacitance is greater than the first condition threshold, if the change in the capacitance characteristic is a positive value, it is determined that the electronic device is in a state of being submerged in water.
3. The method according to claim 2, characterized in that If the change in the capacitance characteristic is a positive value, determining that the electronic device is in a state of being submerged in water includes: If the change in the capacitance characteristic is positive and the value of the capacitance characteristic is greater than a second condition threshold, it is determined that the electronic device is in a state of being submerged in water; wherein the second condition threshold is greater than the first condition threshold.
4. The method according to claim 1, wherein The capacity feature of the screen includes a full-screen capacity feature and / or a target connected area capacity feature; wherein the capacity of a unit area in the target connected area is greater than a first threshold, and the number of unit areas included in the target connected area is greater than a first number.
5. The method according to claim 4, characterized in that In the case where the capacity feature of the screen includes a full-screen capacity feature, the capacity feature includes at least one of the following: The maximum value among the first capacitance values, or the number of first larger values included in the first capacitance values, or the total value of the first capacitance values; wherein the first capacitance value is the capacitance value corresponding to a unit area within the full screen range, and the first larger value is greater than the second threshold value.
6. The method according to claim 4, characterized in that In a case where the capacity value feature of the screen includes the capacity value feature of the target connected area, the capacity value feature includes at least one of the following: The number of second larger values included in the second capacitance, or the sum of the second capacitance values, or the number of unit areas included in the target connected area; wherein the second capacitance is the capacitance corresponding to the unit area in the target connected area, and the second larger value is greater than the third threshold.
7. The method according to any one of claims 1 to 6, characterized in that After determining that the electronic device is being submerged in water based on the first change state of the capacitance characteristic, the method further includes: Trigger the water entry prompt event.
8. The method according to claim 7, characterized in that The water entry prompting event includes: Opening a preset application of the electronic device, wherein the preset application includes a camera application; or Execute a preset operation based on the preset application; or Displaying a first prompt message, wherein the first prompt message is used to prompt that the electronic device is in a state of being submerged in water; or The motor is triggered to vibrate, so as to indicate that the electronic device is being submerged in water.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: When the capacitance characteristic corresponding to the screen capacitance satisfies a water outlet detection condition, it is determined that the electronic device is in a water outlet state based on a second change state of the capacitance characteristic.
10. The method according to claim 9, characterized in that The water outflow detection condition includes a third condition threshold corresponding to the capacitance feature. When the capacitance feature corresponding to the screen capacitance satisfies the water outflow detection condition, determining that the electronic device is in a water outflow state based on a second change state of the capacitance feature includes: When the value of the capacitance feature corresponding to the current detection frame is less than the third condition threshold, and the value of the historical capacitance feature corresponding to the previous detection frame is greater than the third condition threshold, if the change in the capacitance feature is a negative value, it is determined that the electronic device is in a water discharge state.
11. The method according to claim 10, characterized in that If the change in the capacitance characteristic is a negative value, determining that the electronic device is in a water discharge state includes: If the change in the capacitance characteristic is a negative value and the value of the capacitance characteristic is less than a fourth condition threshold, it is determined that the electronic device is in a water discharge state; wherein the fourth condition threshold is less than the third condition threshold.
12. The method according to any one of claims 9 to 11, characterized in that After determining that the electronic device is in a water outlet state based on the second change state of the capacitance characteristic, the method further includes: Trigger the water outflow prompt event.
13. The method according to claim 12, characterized in that The event of triggering the water outlet prompt includes: Close a preset application of the electronic device, wherein the preset application includes a camera application; or Display a second prompt message, where the second prompt message is used to prompt that the electronic device is in a water discharge state; or The motor is triggered to stop vibrating, so as to indicate that the electronic device is in a state of discharging water.
14. The method according to any one of claims 1 to 13, characterized in that The capacitance value is the absolute value of the difference between the total capacitance value collected by the electronic device and the capacitance reference value.
15. An electronic device, characterized in that: The electronic device includes: a capacitive touch screen, a memory, and one or more processors; the capacitive touch screen, the memory, and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the electronic device, the electronic device executes the method as described in any one of claims 1 to 14.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed in an electronic device, the electronic device executes the method according to any one of claims 1 to 14.
17. A computer program product, characterized in that The computer program product includes instructions, and when the instructions are executed in a communication device, the communication device is caused to perform the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Intelligent waterproof method and system for mobile handheld device
CN104217181A
Method and device for identifying immersionstate, and electronic device
CN109407871A
Electronic device and water entry detection method thereof
CN109655921A
Intelligent equipment soaking detection method and wearable intelligent equipment
CN114812659A
Water detection method and device for touch screen, terminal equipment and storage medium
CN119165991A