Water entry detection method and apparatus, device, storage medium, and program product

By combining a touchscreen and an ultrasonic fingerprint detection device, the problem of detecting underwater terminals has been solved, thereby improving the intelligence and convenience of underwater terminals.

WO2026098432A1PCT designated stage Publication Date: 2026-05-15REALME MOBILE TELECOMM SHENZHEN CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
REALME MOBILE TELECOMM SHENZHEN CO LTD
Filing Date
2025-11-04
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies cannot effectively detect whether a terminal is submerged in water, which prevents improvements in intelligence and convenience when using the terminal underwater.

Method used

The detection signal output by the touch screen determines whether the terminal meets the target conditions. Combined with the detection results of the ultrasonic fingerprint detection device, it is determined whether the terminal has entered the water.

Benefits of technology

It enables effective detection of whether the terminal is submerged in water, improving the intelligence and convenience of using the terminal underwater, and can automatically adjust the working mode or activate safety policies to protect the terminal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025132343_15052026_PF_FP_ABST
    Figure CN2025132343_15052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a water entry detection method and apparatus, a device, a storage medium, and a program product. The method comprises: on the basis of a detection signal outputted by a touch screen of a terminal, determining whether the terminal satisfy a target condition, the target condition being used for representing the possibility that the terminal has entered the water; and if the target condition is satisfied, on the basis of a detection result of a first touch event of a fingerprint recognition area on the screen outputted by an ultrasonic fingerprint detection apparatus of the terminal and a detection result of a second touch event of the screen outputted by the touch screen, determining whether the terminal has entered water. By using the present method, water entry detection of a terminal can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Water ingress detection methods, apparatus, equipment, storage media and procedures

[0001] Related applications

[0002] This application claims priority to Chinese patent application filed on November 5, 2024, application number 2024115731959, entitled "Water Ingress Detection Method, Apparatus, Equipment, Storage Medium and Procedure Product", the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of terminal equipment technology, and in particular to a water ingress detection method, apparatus, device, storage medium, and program product. Background Technology

[0004] With the diversification of people's life scenarios, there is an increasing demand for underwater terminals, such as capturing users' diving footage through the terminal.

[0005] However, in the relevant technologies, the terminal cannot detect water ingress. Summary of the Invention

[0006] This application provides a water ingress detection method, apparatus, equipment, storage medium, and program product capable of detecting whether a terminal is submerged in water.

[0007] In a first aspect, this application provides a water ingress detection method, the method comprising:

[0008] The terminal is determined to meet the target conditions based on the detection signal output by the terminal's touchscreen. The target conditions are used to characterize the possibility that the terminal has entered the water. If the target conditions are met, the terminal is determined to have entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen.

[0009] Secondly, this application provides a water ingress detection device, the device comprising:

[0010] The first determining module is used to determine whether the terminal meets the target conditions based on the detection signal output by the terminal's touch screen. The target conditions are used to characterize the possibility that the terminal has entered the water.

[0011] The second determining module is used to determine whether the terminal has been submerged in water if the target conditions are met, based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

[0012] Thirdly, this application provides a terminal including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps described in the first aspect above.

[0013] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps described in the first aspect above.

[0014] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps described in the first aspect above.

[0015] The aforementioned water immersion detection method, apparatus, device, storage medium, and program product determine whether the terminal meets a target condition based on the detection signal output by the terminal's touchscreen. This target condition characterizes the possibility that the terminal has entered the water. If the terminal meets the target condition, the method determines whether the terminal has entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen. Thus, a method that can effectively detect whether a terminal has entered the water is provided. Attached Figure Description

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

[0017] Figure 1 is a flowchart illustrating a water ingress detection method in one embodiment;

[0018] Figure 2 is a flowchart illustrating the technical process of determining whether a terminal meets the target conditions based on the detection signal output by the touchscreen in one embodiment.

[0019] Figure 3 is a flowchart of a water ingress detection method in another embodiment;

[0020] Figure 4 is a structural block diagram of a water ingress detection device in one embodiment;

[0021] Figure 5 is a structural block diagram of the water ingress detection device in another embodiment;

[0022] Figure 6 is an internal structure diagram of a terminal in one embodiment. Detailed Implementation

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

[0024] Currently, with the diversification of people's life scenarios, there is an increasing demand for underwater terminals, such as capturing users' diving footage through the terminal.

[0025] If we can detect whether a terminal has entered the water (referred to as "water entry"), we can greatly improve the intelligence and convenience of using the terminal underwater.

[0026] For example, in one possible scenario, if the device can detect whether it has entered the water, the screen can automatically light up after immersion, making it convenient for users to use the device underwater. In another possible scenario, if the device can detect whether it has entered the water, its operating mode can be automatically adjusted to adapt to the underwater environment. Yet another possible scenario, if the device can detect whether it has entered the water, appropriate safety policies can be activated after immersion, preventing damage to the device's hardware from the underwater environment.

[0027] It should be noted that the above only provides some examples of possible application scenarios. In actual applications, there may be other application scenarios. These will not be listed one by one in the embodiments of this application. The possible application scenarios mentioned above are not intended to limit the scope of protection of this application.

[0028] Currently, there is no feasible method to detect whether a terminal has entered water, and the terminal cannot perform water immersion detection. In view of this, embodiments of this application provide a water immersion detection method, apparatus, device, storage medium, and program product. In this water immersion detection method, it is possible to determine whether the terminal meets a target condition based on the detection signal output by the terminal's touchscreen. The target condition is used to characterize the possibility that the terminal has entered the water. If the terminal meets the target condition, it is determined whether the terminal has entered the water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touchscreen. In this way, an effective method for detecting whether a terminal has entered the water is provided, thereby improving the intelligence and convenience of the terminal when used underwater.

[0029] This application uses the method applied to a terminal as an example for illustration. It is understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and can be implemented through the interaction between the terminal and the server. The terminal involved in the water immersion detection method provided in this application is a terminal including an ultrasonic fingerprint detection device and a touch screen. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc.

[0030] In order to detect whether a terminal has entered water, this embodiment provides a water ingress detection method, which includes the following process:

[0031] The detection signal output by the terminal's touchscreen is used to determine whether the terminal meets the target conditions, which are used to characterize the possibility that the terminal has entered the water.

[0032] If the target conditions are met, the terminal is determined to have been submerged in water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

[0033] In one implementation, determining whether the terminal meets the target condition based on the detection signal output by the terminal's touchscreen may include:

[0034] The short-circuit region of the touch screen is determined based on the detection signal output by the touch screen, and the current in the short-circuit region is greater than a preset current threshold.

[0035] Whether the terminal meets the target condition is determined based on the area ratio of the short-circuit region.

[0036] In one implementation, determining whether the terminal meets the target condition based on the area ratio of the short-circuit region may include:

[0037] If the area of ​​the short-circuit region in the touch screen is greater than a preset percentage threshold, then the terminal is determined to meet the target condition.

[0038] In one embodiment, determining whether the terminal has been submerged in water based on the detection result of a first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection result of a second touch event on the screen output by the touchscreen may include:

[0039] If the detection result output by the ultrasonic fingerprint detection device indicates the existence of the first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water.

[0040] If the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for the first preset duration, and the detection result output by the touch screen indicates the existence of a second touch event lasting for the first preset duration, then it is determined that the terminal has not been submerged in water.

[0041] In one implementation, the absence of the second touch event during the continuous first preset duration includes any of the following:

[0042] No second touch event occurs within the first preset time period;

[0043] Within the first preset duration, the second touch event changes from present to absent.

[0044] In one embodiment, the method further includes:

[0045] If the target conditions are met, the ultrasonic fingerprint detection device is controlled to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device operates underwater.

[0046] In one embodiment, the method further includes:

[0047] The ultrasonic fingerprint detection device is controlled to display a press prompt animation on the fingerprint recognition area of ​​the screen.

[0048] In one embodiment, the method further includes:

[0049] If it is determined that the terminal has entered water, then control the target application installed on the terminal to start.

[0050] If it is determined that the terminal has not entered the water, the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0051] In one implementation, the underwater working mode and the above-water working mode employ different image construction algorithms.

[0052] In one embodiment, before determining whether the terminal has been submerged in water based on the detection result of a first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection result of a second touch event on the screen output by the touchscreen, the method further includes:

[0053] If the terminal is in a locked screen state, the ultrasonic fingerprint detection device is controlled to perform fingerprint detection on the fingerprint recognition area;

[0054] The screen unlocking process is executed based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0055] In one embodiment, controlling the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area includes:

[0056] Control the ultrasonic fingerprint detection device to emit ultrasonic signals toward the fingerprint recognition area;

[0057] The ultrasonic fingerprint detection device is controlled to construct a fingerprint image based on the echo signal of the ultrasonic signal.

[0058] In one embodiment, the method further includes:

[0059] If the detection result output by the ultrasonic fingerprint detection device indicates the presence of the first touch event, and the duration of the first touch event is less than the first preset duration, then return to re-execute the water immersion detection step.

[0060] The water immersion detection step includes: determining whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touch screen.

[0061] In one embodiment, if the detection result output by the ultrasonic fingerprint detection device indicates the presence of the first touch event, and the duration of the first touch event is less than the first preset duration, then the water immersion detection step is re-executed, including:

[0062] If the detection result output by the ultrasonic fingerprint detection device indicates the existence of the first touch event, and the duration of the first touch event is less than the first preset duration, then the cumulative execution time of the water entry detection step after determining that the terminal meets the target condition is obtained.

[0063] If the cumulative execution time is less than the second preset time, then return to re-execute the water ingress detection step.

[0064] In one embodiment, the method further includes:

[0065] If the cumulative execution time is greater than or equal to the second preset time, the water entry detection step is stopped, and the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device works on the water surface.

[0066] This embodiment also provides a water ingress detection device, including:

[0067] The first determining module is used to determine whether the terminal meets the target conditions based on the detection signal output by the terminal's touch screen. The target conditions are used to characterize the possibility that the terminal has entered the water.

[0068] The second determining module is used to determine whether the terminal has been submerged in water if the target conditions are met, based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

[0069] In one embodiment, the first determining module is specifically used to: determine a short-circuit region of the touchscreen based on the detection signal output by the touchscreen, wherein the current in the short-circuit region is greater than a preset current threshold; and determine whether the terminal meets the target condition based on the area ratio of the short-circuit region.

[0070] In one implementation, the first determining module is specifically used to: determine that the terminal meets the target condition if the area ratio of the short-circuit region in the touch screen is greater than a preset ratio threshold.

[0071] In one embodiment, the second determining module is specifically used to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then determine that the terminal has been submerged in water; if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is a second touch event within the first preset duration, then determine that the terminal has not been submerged in water.

[0072] In one implementation, the absence of the second touch event during the continuous first preset duration includes any of the following:

[0073] No second touch event occurs within the first preset time period;

[0074] Within the first preset duration, the second touch event changes from present to absent.

[0075] In one embodiment, the second determining module is further configured to: if the terminal is in a screen-locked state, control the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area; and execute the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0076] In one embodiment, the second determining module is further configured to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then return to re-execute the water immersion detection step; wherein the water immersion detection step includes: determining whether the terminal has been immersed in water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touch screen.

[0077] In one embodiment, the second determining module is specifically used to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then obtain the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions; if the cumulative execution time is less than a second preset duration, then return to re-execute the water immersion detection step.

[0078] In one embodiment, the second determining module is further configured to: if the cumulative execution time is greater than or equal to the second preset time, stop executing the water entry detection step and control the ultrasonic fingerprint detection device to enter the water surface working mode, the water surface working mode being the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0079] In one embodiment, the above-mentioned water ingress detection device further includes:

[0080] The control module is used to control the ultrasonic fingerprint detection device to enter the underwater working mode if the target conditions are met. The underwater working mode is the mode in which the ultrasonic fingerprint detection device operates underwater.

[0081] In one embodiment, the control module is further configured to control the ultrasonic fingerprint detection device to display a press prompt animation on the fingerprint recognition area of ​​the screen.

[0082] In one embodiment, the control module is further configured to, if it is determined that the terminal has entered water, control the target application installed on the terminal to start; if it is determined that the terminal has not entered water, control the ultrasonic fingerprint detection device to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0083] In one implementation, the underwater working mode and the above-water working mode employ different image construction algorithms.

[0084] In one embodiment, the control module is further configured to control the ultrasonic fingerprint detection device to emit ultrasonic signals toward the fingerprint recognition area; and to control the ultrasonic fingerprint detection device to construct a fingerprint image based on the echo signal of the ultrasonic signal.

[0085] In an exemplary embodiment, as shown in FIG1, a water ingress detection method is provided, which includes the following steps:

[0086] Step 101: Determine whether the terminal meets the target conditions based on the detection signal output by the terminal's touch screen.

[0087] The target condition is used to characterize the possibility that the terminal has entered the water. In other words, if the terminal meets the target condition, it means that the terminal may have entered the water. It should be noted that "entered the water" can be understood as all parts of the terminal entering the water, or it can be understood as part of the terminal entering the water while the other part is still on the surface.

[0088] A touchpad (TP) is an important medium for human-computer interaction, a device that can detect touch events. Currently, most touchpads use capacitive touch detection technology. Capacitive touch detection technology is further divided into two types: self-capacitance and mutual capacitance.

[0089] Self-capacitance detection uses an electrode. When a finger is placed on the touchscreen, the capacitance Cx between the electrode and ground increases. Based on this principle, it can be determined whether a finger is touching the touchscreen and the location of the finger touch.

[0090] Mutual capacitance detection uses two electrodes, one called the driving electrode TX and the other called the sensing electrode RX. A digital voltage can be applied to the driving electrode TX. After the digital voltage is applied, the sensing electrode RX can receive a charge. When a finger is placed between the driving electrode TX and the sensing electrode RX, the capacitance Cx between the driving electrode TX and the sensing electrode RX will decrease. Therefore, the charge received on the sensing electrode RX will also decrease. Based on this principle, it is possible to determine whether a finger is touching the touchscreen and the location of the finger touch.

[0091] In an optional embodiment of this application, the detection signal output by the touch screen may be a capacitance detection signal, a charge detection signal, or a current detection signal obtained by converting capacitance or charge into current through a conversion circuit, etc. This application does not specifically limit this.

[0092] Due to the special underwater environment, the detection signal output by the touch screen will exhibit certain characteristics (hereinafter referred to as underwater characteristics) after the terminal enters the water. In the optional embodiment of this application, the underwater characteristics can be determined in advance through experiments or prior experience. During the actual water entry detection process, it can be detected whether the detection signal currently output by the touch screen conforms to the underwater characteristics.

[0093] Furthermore, considering that in certain special usage scenarios on the water surface, the detection signal output by the touchscreen may also conform to the underwater characteristics—for example, when a user's palm or other body parts press the touchscreen over a large area—the detection signal output by the touchscreen may also conform to the underwater characteristics. Therefore, if it is determined that the current detection signal output by the touchscreen conforms to the underwater characteristics, it is not directly determined that the terminal has entered the water. Instead, it is determined that the terminal meets the target condition, that is, it is determined that the terminal has the possibility of entering the water, and further steps are taken to determine whether the terminal has actually entered the water. In this way, on the one hand, the accuracy of water entry detection can be guaranteed and false alarms can be avoided. On the other hand, since the subsequent steps to determine whether the terminal has actually entered the water are only executed when the target condition is determined, instead of executing the subsequent steps to determine whether the terminal has actually entered the water indiscriminately in all scenarios, the computational load of the terminal can be reduced, thereby reducing the terminal's power consumption.

[0094] It should be noted that, in this embodiment of the application, if it is determined from the detection signal output by the touch screen that the terminal does not meet the target condition, the process can be terminated.

[0095] Step 102: If the terminal meets the target condition, then based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touch screen, determine whether the terminal has been submerged in water.

[0096] An ultrasonic fingerprint detection device can include an ultrasonic sensor that emits ultrasonic signals. Typically, a fingerprint recognition area can be set in the terminal, which can be a region of the terminal screen. The ultrasonic sensor can emit ultrasonic signals towards this fingerprint recognition area. When a user's finger touches this area, the finger reflects the ultrasonic signals, generating an echo signal. The ultrasonic fingerprint detection device can construct a fingerprint image based on this echo signal, thereby detecting and recognizing the fingerprint. A major advantage of ultrasonic fingerprint detection compared to optical fingerprint detection is that it supports underwater detection.

[0097] In an optional embodiment of this application, the terminal's operating system can monitor the ultrasonic fingerprint detection device and the touch screen. By monitoring, it can obtain the detection results of the first touch event output by the ultrasonic fingerprint detection device and the detection results of the second touch event output by the touch screen, thereby determining whether the terminal has been submerged in water based on the detection results of the first touch event and the second touch event.

[0098] When the ultrasonic fingerprint detection device detects the first touch event, it can only perform the fingerprint image construction process without performing fingerprint detection or fingerprint recognition on the fingerprint image. If a fingerprint image can be constructed, the ultrasonic fingerprint detection device determines that the first touch event exists (that is, it can determine the ultrasonic fingerprint detection area where the user is pressing the screen). Otherwise, the ultrasonic fingerprint detection device determines that the first touch event does not exist.

[0099] As mentioned above, most touchscreens currently use capacitive touch detection technology, which is further divided into two types: self-capacitance and mutual capacitance. Regardless of the type of capacitance detection, when a user touches the screen with their finger, the capacitance corresponding to the electrode at the touched location on the touchscreen will change. The detection circuit on the periphery of the touchscreen can detect the change in capacitance corresponding to the electrode, thereby determining whether the screen has been touched (that is, determining whether a second touch event has occurred), and can determine the location of the touch based on the setting position of the electrode where the capacitance changes.

[0100] In practical applications, if a user wants to use the terminal underwater, they will typically touch the screen to turn it on or control the terminal to perform certain operations. Underwater, the ultrasonic detection device functions normally, meaning it can detect and report the first touch event. However, the touchscreen cannot function properly, meaning it cannot report the touch event (and therefore cannot report the second touch event). Above water, both the ultrasonic detection device and the touchscreen function normally. In other words, underwater, the detection capabilities of the ultrasonic fingerprint detection device and the touchscreen differ. Based on the user's underwater usage habits and the differences in detection capabilities between the ultrasonic fingerprint detection device and the touchscreen, after confirming that the terminal meets the target conditions, the detection results of the first touch event output by the ultrasonic fingerprint detection device and the detection results of the second touch event output by the touchscreen can be used to determine whether the terminal has indeed entered the water.

[0101] The water immersion detection method provided in this embodiment determines whether the terminal meets a target condition based on the detection signal output by the terminal's touchscreen. The target condition is used to characterize the possibility that the terminal has entered the water. If the terminal meets the target condition, the method determines whether the terminal has entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen. Thus, a method that can effectively detect whether a terminal has entered the water is provided.

[0102] In an optional embodiment of this application, if the terminal meets the target conditions, the ultrasonic fingerprint detection device can also be controlled to enter an underwater working mode, wherein the underwater working mode can be a mode in which the ultrasonic fingerprint detection device works underwater.

[0103] In terminals that support underwater use, an underwater working mode and a surface working mode can be set for the ultrasonic fingerprint detection device according to the environmental characteristics of the underwater and surface environments. The surface working mode can be the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0104] Optionally, the underwater working mode and the surface working mode can employ different algorithm logics. For example, the underwater working mode and the surface working mode can employ different image construction algorithms. For instance, the image construction algorithm in the underwater working mode can include filtering algorithms for image elements such as water ripples and foam, thereby ensuring the accuracy of fingerprint image construction.

[0105] Under the condition that the target is met, the ultrasonic fingerprint detection device can be controlled to enter the underwater working mode, thereby ensuring the accuracy of subsequent detection of the first touch event.

[0106] Of course, in some cases, the ultrasonic fingerprint detection device may already be in underwater working mode when the target conditions are met, or in some cases, the ultrasonic fingerprint detection device may not support underwater working mode. In such cases, the step of "controlling the ultrasonic fingerprint detection device to enter underwater working mode" may not be performed.

[0107] Please refer to Figure 2, which illustrates an exemplary alternative technical process for determining whether a terminal meets target conditions based on detection signals output by a touchscreen. As shown in Figure 2, this technical process includes the following steps:

[0108] Step 201: Determine the short-circuit area of ​​the touch screen based on the detection signal output by the touch screen.

[0109] As described above, the detection signal output by the touchscreen can be a capacitance detection signal, a charge detection signal, or a current detection signal obtained by converting capacitance or charge into current through a conversion circuit. The short-circuit region of the touchscreen can be determined based on the detection signal output by the touchscreen, wherein the current in the short-circuit region is greater than a preset current threshold. In an optional embodiment of this application, the preset current threshold can be set according to actual conditions, and this application does not impose specific limitations on it.

[0110] In an optional embodiment of this application, the current in the short-circuit region refers to the current of the electrodes in the short-circuit region. It can be the current directly measured by the current detection circuit, or it can be the current indirectly calculated by measuring the capacitance, charge, etc. This application does not specifically limit this.

[0111] Step 202: Determine whether the terminal meets the target conditions based on the area ratio of the short-circuit region.

[0112] In an optional embodiment of this application, if the area of ​​the short-circuit region in the touchscreen accounts for a proportion greater than a preset proportion threshold, the terminal is determined to meet the target condition. In other words, if a large area of ​​the touchscreen is short-circuited, the terminal is determined to meet the target condition. In an optional embodiment of this application, the preset proportion threshold can be set according to actual conditions, and this application does not impose specific limitations on it.

[0113] Extensive experiments have revealed that underwater, the terminal's touchscreen exhibits large short-circuit areas. Therefore, in an optional embodiment of this application, the terminal can be determined to meet the target condition if the area of ​​the short-circuit region is greater than a preset percentage threshold.

[0114] Meanwhile, since the touchscreen may have a large short circuit area if the user's palm or other body parts come into contact with it while it is on the water, in order to prevent false alarms, in this embodiment of the application, if the area of ​​the short circuit area in the touchscreen is determined to be greater than a preset percentage threshold, it is only determined that the terminal meets the target condition, and it is not directly determined that the terminal has entered the water. Instead, it is determined based on subsequent steps to further determine whether the terminal has actually entered the water, which can increase the accuracy of water entry detection.

[0115] In addition, since the determination of whether the terminal meets the target conditions is based on the detection signal output by the touch screen, and the touch screen needs to output detection signals to realize its existing functions, this method of determining whether the target conditions are met does not require the addition of additional detection circuits or changes to the original workflow of the touch screen, and its cost is low.

[0116] As described above, after determining that the terminal meets the target conditions, a water immersion detection step can be performed. This water immersion detection step includes: determining whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device, and the detection results of the second touch event on the screen output by the touchscreen.

[0117] Optionally, after determining that the terminal meets the target conditions, but before executing the water immersion detection step, it can be checked whether the terminal is in a locked screen state. If the terminal is in a locked screen state, the ultrasonic fingerprint detection device can be controlled to detect fingerprints in the fingerprint recognition area, and the screen unlocking process can be executed based on the fingerprint detected by the ultrasonic fingerprint detection device. If the terminal is in a unlocked screen state, the water immersion detection step can be executed directly.

[0118] The process of fingerprint detection in the ultrasonic fingerprint detection device can include: an ultrasonic sensor emitting an ultrasonic signal into the fingerprint recognition area; the ultrasonic sensor receiving the echo signal formed by the reflection of the ultrasonic signal from the finger; and then constructing a fingerprint image based on the echo signal. The screen unlocking process can include: comparing the constructed fingerprint image with a pre-set valid fingerprint; if they match, the screen unlocks; if they do not match, the screen unlocks.

[0119] Furthermore, the embodiments of this application will briefly describe the water ingress detection steps below:

[0120] In practical applications, if a large area of ​​the touchscreen is short-circuited, it will not report a touch event. Reporting a touch event means sending a second touch event to the operating system. Therefore, when the device is submerged in water, the touchscreen will not report a second touch event because of the large short circuit. However, if the device is not submerged, the touchscreen will report a second touch event to the operating system if a finger touches it. Ultrasonic fingerprint detection devices, on the other hand, can report the first detection event to the operating system whether underwater or above water.

[0121] Based on this principle, in an optional embodiment of this application, if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touchscreen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water. Conversely, if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touchscreen indicates that there is a second touch event within the first preset duration, then it is determined that the terminal has not been submerged in water.

[0122] Understandably, if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, it means that the current user has touched the fingerprint recognition area on the screen. When the user is on the water surface, the touch screen can report the touch. Therefore, the touch screen should also detect the user's touch and report a second touch event. If the touch screen does not report a second touch event, it means that the touch screen is currently underwater and will not report the touch event. Therefore, it can be determined that the terminal has entered the water.

[0123] As mentioned above, when detecting the first touch event, the ultrasonic fingerprint detection device can continuously or periodically emit ultrasonic signals to the fingerprint recognition area and construct a fingerprint image based on the received echo signals. If a fingerprint is determined to exist based on the fingerprint image, then the existence of the first touch event is determined.

[0124] In optional embodiments of this application, the first preset duration can be set according to actual needs. For example, the first preset duration can be 1 second. This application does not limit the first preset duration. In the embodiments of this application, by setting the first preset duration, it is determined whether the detection result output by the ultrasonic fingerprint detection device indicates that a continuous first touch event (commonly understood as a long press event) exists within the first preset duration, and whether the detection result output by the touch screen indicates whether a second touch event does not exist within the continuous first preset duration. This can avoid misjudgment caused by short-term accidental touches by the user, and can also avoid misjudgment caused by accidental factors, thereby increasing the accuracy of water immersion detection.

[0125] It should be noted that the absence of a second touch event within the first preset duration can mean one of the following: 1. No second touch event occurs at all within the first preset duration (the terminal is fully submerged in water during the water immersion detection); 2. A second touch event occurs at the beginning of the first preset duration, but no second touch event occurs thereafter (the terminal is in the process of being submerged in water during the water immersion detection).

[0126] In addition, in an optional embodiment of this application, if the detection result output by the ultrasonic fingerprint detection device indicates the presence of a first touch event, and the duration of the first touch event is less than a first preset duration, the water immersion detection step can be re-executed.

[0127] Optionally, if the detection result output by the ultrasonic fingerprint detection device indicates the presence of a first touch event, and the duration of the first touch event is less than a first preset duration, the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions can also be obtained. Then, if the cumulative execution time is less than a second preset duration, the water immersion detection step can be re-executed.

[0128] Optionally, if the cumulative execution time is greater than or equal to the second preset time, the terminal stops executing the water entry detection step and controls the ultrasonic fingerprint detection device to enter the water-based working mode.

[0129] In optional embodiments of this application, the second preset duration can be set according to actual needs. For example, the second preset duration can be 20 seconds. This application does not limit the second preset duration. In the embodiments of this application, by setting the second preset duration, the terminal can avoid performing water immersion detection for a long time, thus avoiding waste of terminal computing resources and power consumption.

[0130] In an optional embodiment of this application, if it is determined that the terminal has entered water, the target application installed on the terminal is started; if it is determined that the terminal has not entered water, the ultrasonic fingerprint detection device is controlled to enter the water-based working mode.

[0131] The target application could be, for example, a camera app. Once the device is confirmed to be submerged, activating the camera app simplifies the underwater shooting process, reduces operational complexity, and enhances the intelligence of underwater photography. Furthermore, if the camera app has an underwater shooting mode, it can be controlled to switch to that mode, thereby ensuring optimal shooting quality.

[0132] To enable readers to understand the technical solutions provided by the embodiments of this application, the technical solutions provided by the embodiments of this application will be briefly described below with reference to the accompanying drawings shown in FIG3.

[0133] Step 301: Determine the short-circuit area of ​​the touch screen based on the detection signal output by the terminal's touch screen.

[0134] Step 302: Determine whether the terminal meets the target conditions based on the area ratio of the short-circuit region. If the target conditions are met, proceed to step 303. If the target conditions are not met, the process ends.

[0135] Step 303: The ultrasonic fingerprint detection device of the control terminal enters the underwater working mode.

[0136] Step 304: Detect whether the terminal is in a locked screen state. If the terminal is in a locked screen state, proceed to step 305. If the terminal is in a unlocked screen state, display an instruction message on the screen. This instruction message is used to instruct the user to touch the fingerprint recognition area, and then proceed to step 306.

[0137] Step 305: Control the ultrasonic fingerprint detection device to detect fingerprints in the fingerprint recognition area, and execute the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device. If the unlocking is successful, proceed to step 306; if the unlocking fails, end the process.

[0138] Step 306: Based on the detection results of the first touch event output by the ultrasonic fingerprint detection device and the detection results of the second touch event output by the touch screen, determine whether the terminal has been submerged in water. If the terminal has been submerged in water, proceed to step 307; if the terminal has not been submerged in water, proceed to step 308.

[0139] Optionally, if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touchscreen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water. Conversely, if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touchscreen indicates that there is a second touch event within the first preset duration, then it is determined that the terminal has not been submerged in water.

[0140] In addition, if the detection result output by the ultrasonic fingerprint detection device indicates the presence of a first touch event, and the duration of the first touch event is less than a first preset duration, the water immersion detection step can be re-executed. Optionally, before re-executing the water immersion detection step, the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions can be obtained. Then, if the cumulative execution time is less than a second preset duration, the water immersion detection step can be re-executed. Optionally, if the cumulative execution time is greater than or equal to the second preset duration, the terminal stops executing the water immersion detection step and controls the ultrasonic fingerprint detection device to enter the water-based operating mode.

[0141] Step 307: Start the target application installed in the control terminal.

[0142] Step 308: Control the ultrasonic fingerprint detection device to enter the waterborne working mode.

[0143] To enable readers to understand the technical solutions provided in the embodiments of this application, the technical solutions provided in the embodiments of this application will be briefly described below in conjunction with different usage scenarios.

[0144] Use Case 1: With the device screen locked, the user submerges it in water. Upon entering the water, the user discovers the screen remains locked. Following established usage habits, the user presses their finger on the fingerprint recognition area on the screen. After pressing and holding the fingerprint recognition area for 1 second, the device directly launches the camera application, allowing the user to take underwater photos. The specific process includes:

[0145] Step A: With the terminal screen locked, the user wants to use the terminal underwater. At this time, the user holds the terminal and enters the water.

[0146] Step B: During or after water immersion, the terminal determines, based on the detection signal output by the touchscreen, that the area ratio of the short-circuit region of the touchscreen is greater than the preset ratio threshold. At this time, the terminal determines that it meets the target condition, that is, it determines that it has the possibility of water immersion.

[0147] Step C: Once the terminal determines that it meets the target conditions, the terminal controls its ultrasonic fingerprint detection device to enter underwater working mode.

[0148] Step D: After the terminal is submerged in water, the user wants to use the terminal underwater and finds that the terminal screen is locked. Therefore, the user presses the fingerprint recognition area on the screen with their finger according to their established usage habits.

[0149] Step E: The terminal controls the ultrasonic fingerprint detection device to emit ultrasonic signals to the fingerprint recognition area. The ultrasonic signals are reflected by the user's finger in the fingerprint recognition area to form an echo signal. The ultrasonic fingerprint detection device constructs a fingerprint image based on the echo signal and compares the fingerprint image with a preset legitimate fingerprint. If the comparison matches, the screen can be unlocked.

[0150] Step F: The user continues to press the fingerprint recognition area on the screen for 1 second. Since the ultrasonic fingerprint detection device can be used normally underwater, while the touch screen cannot report points underwater, the ultrasonic fingerprint detection device in the terminal detects the first touch event that lasts for 1 second on the fingerprint recognition area, while the touch screen cannot detect the second touch event on the screen. In this case, the terminal determines that it has indeed entered the water.

[0151] Step G: After confirming that it has indeed entered the water, the terminal starts the camera application.

[0152] Step H: The user uses a camera app to take underwater photos.

[0153] Use Case 2: With the device's screen unlocked, the user submerges it in water. After submersion, a pressing prompt animation appears on the fingerprint recognition area of ​​the screen. Following this animation, the user presses their finger on the fingerprint recognition area and holds it for 1 second. The device then directly launches the camera app, allowing the user to take underwater photos. The specific process includes:

[0154] Step A: With the terminal screen unlocked, if the user wants to use the terminal underwater, the user holds the terminal and enters the water.

[0155] Step B: During or after water immersion, the terminal determines, based on the detection signal output by the touchscreen, that the area ratio of the short-circuit region of the touchscreen is greater than the preset ratio threshold. At this time, the terminal determines that it meets the target condition, that is, it determines that it has the possibility of water immersion.

[0156] Step C: When the terminal determines that it meets the target conditions, the terminal controls the ultrasonic fingerprint detection device in its own body to enter the underwater working mode, and displays a press prompt animation on the fingerprint recognition area of ​​the screen, for example, the press prompt animation is a swirling circle.

[0157] Step D: The user observes the pressing prompt animation on the screen and, guided by the pressing prompt animation, presses the fingerprint recognition area on the screen for 1 second. Since the ultrasonic fingerprint detection device can be used normally underwater, while the touch screen cannot report points underwater, the ultrasonic fingerprint detection device in the terminal detects the first touch event that lasts for 1 second on the fingerprint recognition area, while the touch screen cannot detect the second touch event on the screen. In this case, the terminal determines that it has indeed entered the water.

[0158] Step E: After confirming that it has indeed entered the water, the terminal starts the camera application.

[0159] Step F: The user uses a camera app to take underwater photos.

[0160] Use Case 3: With the device screen locked, the user submerges it in water. Upon entering the water, the user notices the screen is still locked. Following their usual practice, the user presses their finger on the fingerprint sensor area on the screen, holding it for less than one second before stopping. Finding no immediate action, the user presses the fingerprint sensor area again, holding it for one second. The device then directly launches the camera app, allowing the user to take underwater photos. The specific process includes:

[0161] Step A: With the terminal screen locked, the user wants to use the terminal underwater. At this time, the user holds the terminal and enters the water.

[0162] Step B: During or after water immersion, the terminal determines, based on the detection signal output by the touchscreen, that the area ratio of the short-circuit region of the touchscreen is greater than the preset ratio threshold. At this time, the terminal determines that it meets the target condition, that is, it determines that it has the possibility of water immersion.

[0163] Step C: Once the terminal determines that it meets the target conditions, the terminal controls its ultrasonic fingerprint detection device to enter underwater working mode.

[0164] Step D: After the terminal is submerged in water, the user wants to use the terminal underwater and finds that the terminal screen is locked. Therefore, the user presses the fingerprint recognition area on the screen with their finger according to their established usage habits.

[0165] Step E: The terminal controls the ultrasonic fingerprint detection device to emit ultrasonic signals to the fingerprint recognition area. The ultrasonic signals are reflected by the user's finger in the fingerprint recognition area to form an echo signal. The ultrasonic fingerprint detection device constructs a fingerprint image based on the echo signal and compares the fingerprint image with a preset legitimate fingerprint. If the comparison matches, the screen can be unlocked.

[0166] Step F: The user stops pressing the fingerprint recognition area. If the duration of the press is less than 1 second when the press is stopped, the ultrasonic fingerprint detection device detects a first touch event with a press duration of less than 1 second on the fingerprint recognition area, and the terminal does not respond.

[0167] Step G: The user finds that the terminal has not performed the corresponding action. Therefore, the user presses the fingerprint recognition area again and holds it for 1 second. The terminal checks whether the cumulative duration of the water immersion detection has reached 20 seconds. If it has not reached 20 seconds, and the ultrasonic fingerprint detection device in the terminal detects the first touch event that lasts for 1 second on the fingerprint recognition area, while the touch screen does not detect the second touch event on the screen, then the terminal determines that it has indeed been submerged in water.

[0168] Step H: After confirming that it has indeed entered the water, the terminal starts the camera application.

[0169] Step 1: The user uses a camera app to take underwater photos.

[0170] Use Case 4: When the screen is locked, a large area of ​​the user's body is in contact with the screen. In this scenario, the following steps are included:

[0171] Step A: When a large area of ​​the user's body is in contact with the screen, the terminal determines that the area of ​​the short-circuit region of the touch screen is greater than a preset threshold based on the detection signal output by the touch screen. At this time, the terminal determines that it meets the target condition, that is, it determines that there is a possibility that it has entered the water.

[0172] Step B: Once the terminal determines that it meets the target conditions, the terminal controls its ultrasonic fingerprint detection device to enter underwater working mode.

[0173] Step C: The terminal controls the ultrasonic fingerprint detection device to emit ultrasonic signals to the fingerprint recognition area. If the user's body part touches the fingerprint recognition area, the ultrasonic fingerprint detection device can construct an image. However, this image is not a fingerprint image, so the screen cannot be unlocked, and the process ends.

[0174] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0175] Based on the same inventive concept, this application also provides a water ingress detection device for implementing the water ingress detection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the water ingress detection device provided below can be found in the limitations of the water ingress detection method described above, and will not be repeated here.

[0176] In an exemplary embodiment, as shown in FIG4, a water ingress detection device 400 is provided, including: a first determining module 401 and a second determining module 402.

[0177] The first determining module 401 is used to determine whether the terminal meets the target condition based on the detection signal output by the terminal's touch screen. The target condition is used to characterize the possibility that the terminal has entered the water.

[0178] The second determining module 402 is used to determine whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

[0179] In one embodiment, the first determining module 401 is specifically used to: determine the short-circuit region of the touch screen based on the detection signal output by the touch screen, wherein the current in the short-circuit region is greater than a preset current threshold; and determine whether the terminal meets the target conditions based on the area ratio of the short-circuit region.

[0180] In one embodiment, the second determining module 402 is specifically configured to: determine that the terminal has been submerged in water if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration; and determine that the terminal has not been submerged in water if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is a second touch event within the first preset duration.

[0181] In one embodiment, the second determining module 402 is further configured to: if the terminal is in a screen-locked state, control the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area; and execute the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0182] In one embodiment, the second determining module 402 is further configured to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then return to re-execute the water immersion detection step; wherein the water immersion detection step includes: determining whether the terminal has been immersed in water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touch screen.

[0183] In one embodiment, the second determining module 402 is specifically used to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then obtain the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions; if the cumulative execution time is less than a second preset duration, then return to re-execute the water immersion detection step.

[0184] In one embodiment, the second determining module 402 is further configured to: if the cumulative execution time is greater than or equal to the second preset time, stop executing the water entry detection step and control the ultrasonic fingerprint detection device to enter the water surface working mode, the water surface working mode being the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0185] Please refer to Figure 5, which shows another water ingress detection device 500. In addition to the modules included in the water ingress detection device 400, the water ingress detection device 500 may optionally include a control module 403.

[0186] The control module 403 is used to: if the target conditions are met, control the ultrasonic fingerprint detection device to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device works underwater.

[0187] In one embodiment, the control module 402 is further configured to: if it is determined that the terminal has entered the water, control the target application installed in the terminal to start; if it is determined that the terminal has not entered the water, control the ultrasonic fingerprint detection device to enter the water surface working mode, the water surface working mode being the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0188] Each module in the aforementioned water ingress detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the terminal in hardware form or independent of it, or stored in the memory of the terminal in software form, so that the processor can call and execute the corresponding operations of each module.

[0189] In an exemplary embodiment, a terminal is provided, the internal structure of which can be shown in Figure 6. The terminal includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a water entry detection method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the terminal can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the terminal shell, or external keyboards, touchpads, or mice, etc.

[0190] Those skilled in the art will understand that the structure shown in Figure 6 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal to which the present application is applied. A specific terminal may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.

[0191] In one exemplary embodiment, a terminal is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:

[0192] The terminal determines whether it meets the target conditions based on the detection signal output by the terminal's touchscreen. The target conditions are used to characterize the possibility that the terminal has entered the water. If the target conditions are met, the terminal is determined to have entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen.

[0193] In one embodiment, when the processor executes the computer program, it further performs the following steps: determining the short-circuit region of the touch screen based on the detection signal output by the touch screen, wherein the current in the short-circuit region is greater than a preset current threshold; and determining whether the terminal meets the target condition based on the area ratio of the short-circuit region.

[0194] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water; if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is a second touch event within the first preset duration, then it is determined that the terminal has not been submerged in water.

[0195] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the target conditions are met, it controls the ultrasonic fingerprint detection device to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device operates underwater.

[0196] In one embodiment, when the processor executes the computer program, it further implements the following steps: if it is determined that the terminal has entered the water, it controls the target application installed on the terminal to start; if it is determined that the terminal has not entered the water, it controls the ultrasonic fingerprint detection device to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0197] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the terminal is in a screen-locked state, it controls the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area; and executes the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0198] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the water immersion detection step is re-executed; wherein, the water immersion detection step includes: determining whether the terminal has been immersed in water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touch screen.

[0199] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions is obtained; if the cumulative execution time is less than a second preset duration, then the water immersion detection step is re-executed.

[0200] In one embodiment, when the processor executes the computer program, it further implements the following steps: if the cumulative execution time is greater than or equal to a second preset time, the water entry detection step is stopped, and the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device works on the water surface.

[0201] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0202] The terminal determines whether it meets the target conditions based on the detection signal output by the terminal's touchscreen. The target conditions are used to characterize the possibility that the terminal has entered the water. If the target conditions are met, the terminal is determined to have entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen.

[0203] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the short-circuit region of the touch screen based on the detection signal output by the touch screen, wherein the current in the short-circuit region is greater than a preset current threshold; and determining whether the terminal meets the target condition based on the area ratio of the short-circuit region.

[0204] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water; if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is a second touch event within the first preset duration, then it is determined that the terminal has not been submerged in water.

[0205] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the target conditions are met, the ultrasonic fingerprint detection device is controlled to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device operates underwater.

[0206] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if it is determined that the terminal has entered the water, it controls the target application installed on the terminal to start; if it is determined that the terminal has not entered the water, it controls the ultrasonic fingerprint detection device to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0207] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the terminal is in a screen-locked state, it controls the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area; and executes the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0208] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the water immersion detection step is re-executed; wherein, the water immersion detection step includes: determining whether the terminal has been immersed in water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touch screen.

[0209] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions is obtained; if the cumulative execution time is less than a second preset duration, then the water immersion detection step is re-executed.

[0210] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the cumulative execution time is greater than or equal to a second preset time, the water entry detection step is stopped, and the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device works on the water surface.

[0211] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:

[0212] The terminal determines whether it meets the target conditions based on the detection signal output by the terminal's touchscreen. The target conditions are used to characterize the possibility that the terminal has entered the water. If the target conditions are met, the terminal is determined to have entered the water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the terminal's ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen.

[0213] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: determining the short-circuit region of the touch screen based on the detection signal output by the touch screen, wherein the current in the short-circuit region is greater than a preset current threshold; and determining whether the terminal meets the target condition based on the area ratio of the short-circuit region.

[0214] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water; if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is a second touch event within the first preset duration, then it is determined that the terminal has not been submerged in water.

[0215] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the target conditions are met, the ultrasonic fingerprint detection device is controlled to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device operates underwater.

[0216] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if it is determined that the terminal has entered the water, it controls the target application installed on the terminal to start; if it is determined that the terminal has not entered the water, it controls the ultrasonic fingerprint detection device to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

[0217] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the terminal is in a screen-locked state, it controls the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area; and executes the screen unlocking process based on the fingerprint detected by the ultrasonic fingerprint detection device.

[0218] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the water immersion detection step is re-executed; wherein, the water immersion detection step includes: determining whether the terminal has been immersed in water based on the detection result of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device and the detection result of the second touch event on the screen output by the touch screen.

[0219] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event, and the duration of the first touch event is less than a first preset duration, then the cumulative execution time of the water immersion detection step after determining that the terminal meets the target conditions is obtained; if the cumulative execution time is less than a second preset duration, then the water immersion detection step is re-executed.

[0220] In one embodiment, when the computer program is executed by the processor, it further implements the following steps: if the cumulative execution time is greater than or equal to a second preset time, the water entry detection step is stopped, and the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device works on the water surface.

[0221] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0222] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0223] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for detecting water ingress, characterized in that, The method includes: The detection signal output by the terminal's touchscreen is used to determine whether the terminal meets the target conditions, which are used to characterize the possibility that the terminal has entered the water. If the target conditions are met, the terminal is determined to have been submerged in water based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

2. The method according to claim 1, characterized in that, Determining whether the terminal meets the target conditions based on the detection signal output by the terminal's touchscreen includes: The short-circuit region of the touch screen is determined based on the detection signal output by the touch screen, and the current in the short-circuit region is greater than a preset current threshold. Whether the terminal meets the target condition is determined based on the area ratio of the short-circuit region.

3. The method according to claim 2, characterized in that, Determining whether the terminal meets the target condition based on the area ratio of the short-circuit region includes: If the area of ​​the short-circuit region in the touch screen is greater than a preset percentage threshold, then the terminal is determined to meet the target condition.

4. The method according to claim 1, characterized in that, The step of determining whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen includes: If the detection result output by the ultrasonic fingerprint detection device indicates the existence of the first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then it is determined that the terminal has been submerged in water. If the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for the first preset duration, and the detection result output by the touch screen indicates the existence of a second touch event lasting for the first preset duration, then it is determined that the terminal has not been submerged in water.

5. The method according to claim 4, characterized in that, The absence of the second touch event during the first preset duration includes any of the following: No second touch event occurs within the first preset time period; Within the first preset duration, the second touch event changes from present to absent.

6. The method according to claim 1, characterized in that, The method further includes: If the target conditions are met, the ultrasonic fingerprint detection device is controlled to enter the underwater working mode, which is the mode in which the ultrasonic fingerprint detection device operates underwater.

7. The method according to claim 6, characterized in that, The method further includes: The ultrasonic fingerprint detection device is controlled to display a press prompt animation on the fingerprint recognition area of ​​the screen.

8. The method according to claim 6, characterized in that, The method further includes: If it is determined that the terminal has entered water, then control the target application installed on the terminal to start. If it is determined that the terminal has not entered the water, the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device operates on the water surface.

9. The method according to claim 8, characterized in that, The underwater working mode and the above-water working mode use different image construction algorithms.

10. The method according to any one of claims 1 to 9, characterized in that, Before determining whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touchscreen, the method further includes: If the terminal is in a locked screen state, the ultrasonic fingerprint detection device is controlled to perform fingerprint detection on the fingerprint recognition area; The screen unlocking process is executed based on the fingerprint detected by the ultrasonic fingerprint detection device.

11. The method according to claim 10, characterized in that, The control of the ultrasonic fingerprint detection device to perform fingerprint detection on the fingerprint recognition area includes: Control the ultrasonic fingerprint detection device to emit ultrasonic signals toward the fingerprint recognition area; The ultrasonic fingerprint detection device is controlled to construct a fingerprint image based on the echo signal of the ultrasonic signal.

12. The method according to claim 4, characterized in that, The method further includes: If the detection result output by the ultrasonic fingerprint detection device indicates the presence of the first touch event, and the duration of the first touch event is less than the first preset duration, then return to re-execute the water immersion detection step. The water immersion detection step includes: determining whether the terminal has been submerged in water based on the detection results of the first touch event on the fingerprint recognition area of ​​the screen output by the ultrasonic fingerprint detection device and the detection results of the second touch event on the screen output by the touch screen.

13. The method according to claim 12, characterized in that, If the detection result output by the ultrasonic fingerprint detection device indicates the presence of the first touch event, and the duration of the first touch event is less than the first preset duration, then the water immersion detection step is re-executed, including: If the detection result output by the ultrasonic fingerprint detection device indicates the existence of the first touch event, and the duration of the first touch event is less than the first preset duration, then the cumulative execution time of the water entry detection step after determining that the terminal meets the target condition is obtained. If the cumulative execution time is less than the second preset time, then return to re-execute the water ingress detection step.

14. The method according to claim 13, characterized in that, The method further includes: If the cumulative execution time is greater than or equal to the second preset time, the water entry detection step is stopped, and the ultrasonic fingerprint detection device is controlled to enter the water surface working mode, which is the mode in which the ultrasonic fingerprint detection device works on the water surface.

15. A water ingress detection device, characterized in that, The device includes: The first determining module is used to determine whether the terminal meets the target conditions based on the detection signal output by the terminal's touch screen. The target conditions are used to characterize the possibility that the terminal has entered the water. The second determining module is used to determine whether the terminal has been submerged in water if the target conditions are met, based on the detection results of the first touch event on the fingerprint recognition area on the screen output by the ultrasonic fingerprint detection device of the terminal and the detection results of the second touch event on the screen output by the touch screen.

16. The water ingress detection device according to claim 15, characterized in that, The first determining module is specifically used for: determining the short-circuit region of the touch screen based on the detection signal output by the touch screen, wherein the current in the short-circuit region is greater than a preset current threshold; and determining whether the terminal meets the target condition based on the area ratio of the short-circuit region.

17. The water ingress detection device according to claim 15, characterized in that, The second determining module is specifically used to: if the detection result output by the ultrasonic fingerprint detection device indicates the existence of the first touch event lasting for a first preset duration, and the detection result output by the touch screen indicates that there is no second touch event within the first preset duration, then determine that the terminal has entered water; If the detection result output by the ultrasonic fingerprint detection device indicates the existence of a first touch event lasting for the first preset duration, and the detection result output by the touch screen indicates the existence of a second touch event lasting for the first preset duration, then it is determined that the terminal has not been submerged in water.

18. A terminal comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 14.

19. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 14.

20. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 14.