Water entry detection method and device, equipment and storage medium

By combining the size parameters of the target area for short-circuit status on the electronic device's touchscreen with environmental data for dual detection, the accuracy problem of water immersion detection for electronic devices is solved, improving the reliability and safety of the equipment.

CN121995513AInactive Publication Date: 2026-05-08REALME MOBILE TELECOMM SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
REALME MOBILE TELECOMM SHENZHEN CO LTD
Filing Date
2024-11-05
Publication Date
2026-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies are insufficient to accurately detect whether electronic devices have been submerged in water, leading to potential safety incidents and reduced reliability.

Method used

By combining the size parameters of the target area of ​​the short-circuit state of the electronic device's touch screen with the target data of the surrounding environment, a pre-trained recognition model is used for dual detection to determine whether the electronic device has entered the water.

Benefits of technology

This improves the accuracy of water immersion detection, avoids false detections, and enhances the reliability and safety of electronic equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995513A_ABST
    Figure CN121995513A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a water entry detection method and device, equipment and a storage medium, the method is applied to electronic equipment, the method comprises the steps that a first detection result and a second detection result of the electronic equipment are obtained, and the first detection result and the second detection result are both used for indicating that the electronic equipment enters water or does not enter water; the first detection result is a detection result of a touch screen of the electronic equipment, the second detection result is a detection result determined according to acquired target data, and the target data is data used for reflecting the surrounding environment of the electronic equipment; and under the condition that the first detection result and the second detection result are that the electronic equipment enters the water, determining that the electronic equipment enters the water. Therefore, whether the electronic equipment enters water or not can be accurately detected, and the use reliability of the electronic equipment is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to information processing technology, and to, but is not limited to, a water ingress detection method, apparatus, device, and storage medium. Background Technology

[0002] Electronic devices have been widely used in users' daily lives, greatly changing their lifestyles and improving their quality of life and work efficiency.

[0003] Electronic devices may encounter water immersion during use, making automatic water detection a crucial requirement. Accurate automatic water immersion detection can prevent potential safety incidents and improve the reliability and durability of electronic devices.

[0004] Therefore, how to accurately detect whether electronic devices have been submerged in water is an urgent problem to be solved. Summary of the Invention

[0005] In view of this, the water ingress detection method, apparatus, device, and storage medium provided in this application can accurately detect whether electronic devices have been submerged in water, thereby improving the reliability of electronic devices. The water ingress detection method, apparatus, device, and storage medium provided in this application are implemented as follows:

[0006] In a first aspect, embodiments of this application provide a water ingress detection method, including:

[0007] A first detection result and a second detection result are obtained for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data, which is data used to reflect the surrounding environment of the electronic device.

[0008] If both the first and second detection results indicate that the electronic device is submerged in water, then the electronic device is determined to be submerged in water.

[0009] Secondly, embodiments of this application provide a water ingress detection device, comprising:

[0010] The acquisition module is used to acquire a first detection result and a second detection result for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data reflecting the surrounding environment of the electronic device.

[0011] The processing module is used to determine that the electronic device has been submerged in water if both the first detection result and the second detection result indicate that the electronic device has been submerged in water.

[0012] Thirdly, embodiments of this application provide a computer device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the program to implement the method described in embodiments of this application.

[0013] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the methods described in embodiments of this application.

[0014] The water immersion detection method, apparatus, computer equipment, and computer-readable storage medium provided in this application obtain a first detection result of the touch screen of an electronic device and a second detection result determined based on target data of the surrounding environment of the electronic device. When both the first and second detection results indicate that the electronic device is in water, the device is confirmed to be in water. This avoids false detection, improves the accuracy of water immersion detection of electronic devices, and thus enhances the reliability of electronic devices. Attached Figure Description

[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0016] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0017] Figure 2 A schematic diagram illustrating the implementation process of the water ingress detection method provided in this application embodiment;

[0018] Figure 3 A schematic diagram illustrating the implementation process for obtaining the first detection result and the second detection result provided in an embodiment of this application;

[0019] Figure 4 This is a schematic diagram illustrating the effect of a touchscreen of an electronic device being submerged in water, as provided in an embodiment of this application.

[0020] Figure 5 This is a schematic diagram illustrating the effect of large-area pressing on an electronic device provided in an embodiment of this application;

[0021] Figure 6 A schematic diagram illustrating the implementation process of the water ingress detection method provided in this application embodiment;

[0022] Figure 7 The implementation flow of the water ingress detection method provided in the embodiments of this application;

[0023] Figure 8 A schematic diagram illustrating the implementation process of training the recognition model provided in the embodiments of this application;

[0024] Figure 9 This is a schematic diagram of the water ingress detection device provided in the embodiments of this application;

[0025] Figure 10 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0028] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0029] It should be noted that the terms "first, second, third" used in the embodiments of this application are used to distinguish similar or different objects and do not represent a specific order of objects. It can be understood that "first, second, third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0030] Electronic devices may come into contact with water during use, and the ability to automatically detect when electronic devices are submerged in water has become a requirement.

[0031] As the demand for underwater photography by electronic devices increases, the ability to detect the entry of electronic devices into water would facilitate underwater photography and greatly demonstrate the technological capabilities of these devices.

[0032] By automatically and accurately detecting water immersion in electronic devices, potential safety accidents can be avoided, and the reliability and durability of electronic devices can be improved.

[0033] Therefore, how to accurately detect whether electronic devices have been submerged in water is an urgent problem to be solved.

[0034] In view of this, embodiments of this application provide a water ingress detection method, which is applied to electronic devices.

[0035] The electronic devices involved in the embodiments of the present invention may include general handheld electronic terminals, such as mobile phones, smartphones, portable terminals, terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), laptops, notebooks, wireless broadband (Wibro) terminals, tablet computers (PCs), smart PCs, point of sale (POS) terminals, in-vehicle computers, and wearable devices, etc.

[0036] In some embodiments, electronic devices can communicate with other electronic devices or servers via a communication network. The communication network can be a wired network or a wireless network. For example, the communication network can be a local area network (LAN) or a wide area network (WAN), such as the Internet. When the communication network is a LAN, for example, it can be a short-range communication network such as a wireless fidelity (WiFi) hotspot network, a WiFi P2P network, a Bluetooth network, a Zigbee network, or a near-field communication (NFC) network. When the communication network is a WAN, for example, it can be a 3rd generation wireless telephone technology (3G) network, a 4th generation mobile communication technology (4G) network, a 5th generation mobile communication technology (5G) network, a future public land mobile network (PLMN), or the Internet.

[0037] In some embodiments, an electronic device may install one or more applications (APPs). An APP, often shortened to application, is a software program capable of performing one or more specific functions. Examples include instant messaging applications, video applications, audio applications, image capture applications, cloud desktop applications, drawing applications, and so on. The applications mentioned in this application embodiment may be system applications pre-installed on the electronic device at the factory, or third-party applications downloaded by the user from the network or obtained from other electronic devices during the use of the electronic device. Electronic devices include, but are not limited to, those running Windows or other operating systems.

[0038] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0039] For example, such as Figure 1 As shown, the electronic device 10 may include a processor 101, an external memory interface 102, an internal memory 103, and a universal serial bus (USB) interface 104.

[0040] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0041] Processor 101 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 101 may be a smart terminal CPU, such as a Snapdragon series processor. In some embodiments, processor 101 may include one or more interfaces. Interfaces may include integrated circuit (I2C) interfaces, integrated circuit sound (I2S) interfaces, pulse code modulation (PCM) interfaces, universal asynchronous receiver / transmitter (UART) interfaces, mobile industry processor interfaces (MIPI) interfaces, general purpose input / output (GPIO) interfaces, subscriber identity module (SIM) interfaces, and / or universal serial bus (USB) interfaces, etc.

[0042] The external storage interface 102 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 101 through the external storage interface 102 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0043] The internal memory 103 can be used to store computer executable program code, which includes instructions. The internal memory 103 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the electronic device 10 (such as audio data, phonebook, etc.).

[0044] Figure 2 This is a schematic diagram illustrating the implementation flow of the water ingress detection method provided in an embodiment of this application. Figure 2 As shown, the method may include the following steps 201 to 202:

[0045] Step 201: Obtain a first detection result and a second detection result for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data, which is data used to reflect the surrounding environment of the electronic device.

[0046] The water immersion detection method for electronic devices provided in this application embodiment can be determined by combining two detection results of the electronic device. That is, by detecting the touch screen of the electronic device, a first detection result is obtained, which indicates whether the electronic device is submerged in water or not; and, based on target data reflecting the surrounding environment of the electronic device, the electronic device is detected to obtain a second detection result, which also indicates whether the electronic device is submerged in water or not; and then, the first detection result and the second detection result are used together to determine whether the electronic device is submerged in water.

[0047] In this embodiment of the application, the order of obtaining the first detection result and obtaining the second detection result is not limited.

[0048] In some embodiments, a first detection result may be obtained first, and a second detection result may be obtained if the first detection result indicates that the electronic device has been submerged in water.

[0049] For example, Figure 3 A schematic diagram illustrating the implementation process for obtaining the first and second detection results is provided. Figure 3 As shown, the steps 301 to 302 may be included as follows:

[0050] Step 301: Obtain the size parameters of the target area in the touch screen of the electronic device. The target area is the area in a short-circuit state. If the size parameters are greater than or equal to the parameter threshold, determine the first detection result to indicate that the electronic device has entered water.

[0051] Understandably, touchscreens in electronic devices typically consist of a conductive layer, an insulating layer, and a sensing layer. When a finger or other conductive object touches the screen, it changes the electric field distribution on the touchscreen surface, which is then detected by the controller within the touchscreen and converted into corresponding touch information. Touchscreens in electronic devices can be categorized into resistive touchscreens and capacitive touchscreens.

[0052] For resistive touchscreens, pressure is used to detect whether a touch has occurred. The screen can consist of two conductive layers. When the touchscreen is touched, these two conductive layers come into contact, thereby changing the resistance value. The touchscreen controller determines the touch location based on the change in resistance.

[0053] Unlike resistive touchscreens, capacitive touchscreens do not rely on pressure to change voltage values ​​to detect coordinates. Capacitive screens work with any object carrying an electrical charge, including human skin. When a user taps the screen, a small current is drawn from the contact point, causing a voltage drop at the corner electrodes. This sensing of the weak current from the human body achieves the purpose of touch control.

[0054] When a user presses a large area of ​​a touchscreen with their palm or other limbs, the conductors within the touchscreen will come into direct contact, potentially forming a conductive layer between the touchscreen's conductive layers and creating a short circuit. Alternatively, when other conductive objects, such as water or other conductive liquids, apply pressure to the touchscreen, the conductors within the touchscreen may come into direct contact due to water pressure or other factors, also creating a short circuit.

[0055] Based on the above principle, in some embodiments, it can be determined whether the electronic device has entered water by obtaining whether the size parameter of the target area in the short-circuit state on the touch screen of the electronic device is greater than a parameter threshold.

[0056] If the size parameter of the target area is greater than or equal to the parameter threshold, the electronic device is determined to be submerged in water; if the size parameter of the target area is less than the parameter threshold, the electronic device is determined not to be submerged in water.

[0057] In this embodiment, the value of the parameter threshold is not limited. For example, to improve recognition sensitivity, the parameter threshold can be set to a relatively small value; or, to avoid more false recognitions disturbing the user, the parameter threshold can be set to a relatively large value, etc.

[0058] In some embodiments, to improve the accuracy of initially determining whether an electronic device has entered water based on the size parameters of the target area, it is possible to comprehensively consider the area, duration, and current changes of the target area in a short-circuit state to jointly determine whether the electronic device has entered water.

[0059] In the embodiments of this application, the type of dimensional parameters is not limited.

[0060] In some embodiments, the size parameter may include area, i.e., determining whether an electronic device is submerged in water by detecting the area of ​​a target region in the touchscreen of the electronic device that is in a short-circuit state.

[0061] For example, such as Figure 4 The diagram illustrates the effect of a touchscreen on an electronic device being submerged in water. Figure 4 As shown, if a large area of ​​the touchscreen is submerged in water, it can be indicated that the area of ​​the touchscreen in a short-circuit state is greater than a threshold, thus determining whether the electronic device has been submerged in water.

[0062] Therefore, in this situation, if it is necessary to detect the area of ​​a target region in a short-circuit state on the touchscreen of an electronic device, the area can be calculated by statistically analyzing the coordinates of the touch areas located at the edge of the touchscreen and in a short-circuit state, and then calculating the area of ​​the target region based on multiple coordinates. Alternatively, the size of each touch area in a short-circuit state on the touchscreen can be obtained, and the area of ​​the target region can be calculated by combining the results.

[0063] Understandably, if the area in the touchscreen that is in a short-circuit state is caused by the user's palm or other limbs pressing the touchscreen, the touch area in the short-circuit state may not be continuous, since there may be pressing methods such as the palm being suspended in the air or the fingers being spread apart.

[0064] For example, such as Figure 5 The diagram shows the effect of pressing a large area of ​​an electronic device. Figure 5 (1) is a schematic diagram showing the effect of the pressed area (i.e., the touch area in a short-circuit state) being a continuous area. Figure 5 (2) in the figure is a schematic diagram of the effect of the pressed area (i.e. the touch area in a short-circuit state) being a discontinuous area. It can be seen that there may be multiple ways to determine the area of ​​the short-circuit state in the touch screen.

[0065] Based on this, in some embodiments, in order to determine the area of ​​the target area in the short-circuit state of the touch screen of the electronic device, the circuit state of each touch area in the touch screen can be obtained first, including the short-circuit state or the normal state; then, based on the circuit state of each touch area, the total area of ​​the touch areas in the touch screen with the circuit state of short circuit can be determined.

[0066] In other words, the touchscreen can detect whether the circuit state of each touch area is currently in a short-circuit state or a normal state, and count the number or area of ​​touch areas in the short-circuit state. Thus, the area of ​​the target area can be determined based on the total number of touch areas in the short-circuit state, or the total area of ​​touch areas in the short-circuit state can be determined as the area of ​​the target area.

[0067] As can be seen, by utilizing the size parameters of the target area in a short-circuit state on the touchscreen of an electronic device, water immersion detection can be performed on the device. This method of identifying whether an electronic device is submerged in water has low power consumption and is easy to use.

[0068] Step 302: If the first detection result is that the electronic device is submerged in water, acquire target data, and perform water entry identification processing on the electronic device based on the target data and the pre-trained recognition model to obtain the second detection result. The recognition model is trained based on environmental data collected by the electronic device on the water and environmental data collected by the electronic device underwater during historical periods.

[0069] As can be seen from the above analysis, when using the size parameters of the target area in the short-circuit state of the electronic device's touch screen to perform water immersion identification, although the power consumption required is low, there may be behaviors such as the user's palm pressing, which can also cause the size parameters of the target area in the short-circuit state of the touch screen to meet expectations, thus leading to false identification of whether the electronic device has been immersed in water.

[0070] Based on this, in this embodiment of the application, when it is determined that the electronic device may be submerged in water by the size parameters of the target area in the short-circuit state on the touch screen of the electronic device, target data reflecting the current surrounding environment of the electronic device can be acquired. Based on the acquired target data and the pre-trained recognition model, the electronic device is re-identified to determine whether the electronic device has entered the water.

[0071] In this way, by detecting the touch screen of electronic devices, the power consumption required for detection can be effectively saved, and by using the recognition model to identify water immersion in electronic devices, the accuracy of water immersion identification can be improved.

[0072] It should be noted that, in the embodiments of this application, detecting whether an electronic device is submerged in water includes detecting whether the electronic device is in contact with water, as well as detecting whether the electronic device is in contact with other liquids with conductive properties, and there is no limitation on this.

[0073] In this application embodiment, the type of target data is not limited.

[0074] In some embodiments, the target data may be ultrasonic data, and the pre-trained recognition model is trained based on ultrasonic reflection signals collected by the electronic device on the water surface and underwater. Thus, based on the target data and the pre-trained recognition model, the electronic device undergoes water immersion detection processing to obtain a second detection result. Whether the electronic device has entered the water can be identified by performing the following steps 601 to 602:

[0075] Step 601: An ultrasonic signal is emitted through the ultrasonic transmitting module of the electronic device, and the reflected signal corresponding to the ultrasonic signal is received through the ultrasonic receiving module of the electronic device.

[0076] It should be noted that when electronic devices emit ultrasonic waves near the ground, these sound waves primarily propagate through the air. Air is a relatively rarefied medium with low density and elastic modulus, resulting in relatively slow propagation speed and rapid attenuation of ultrasonic waves. Furthermore, factors such as air temperature and humidity can also influence the propagation of ultrasonic waves.

[0077] When electronic devices emit ultrasonic waves in water, the waves travel much faster than in air because water is a denser medium than air, with both a higher density and a higher elastic modulus. Furthermore, due to water's high density, ultrasonic waves attenuate less, allowing them to travel greater distances. Additionally, water exhibits less absorption and scattering of ultrasonic waves, resulting in better directionality and penetrating power when propagating in water.

[0078] Based on this, in the embodiments of this application, when it is determined that the size parameter of the target area in the short-circuit state is greater than the parameter threshold, the ultrasonic transmitting module of the electronic device is controlled to transmit ultrasonic signals, and the ultrasonic receiving module of the electronic device is controlled to receive the reflected signal reflected back by the ultrasonic signal transmitted by the ultrasonic transmitting module.

[0079] There are no restrictions on the type of ultrasonic transmitting module; it can be an audio output module or an ultrasonic fingerprint module, etc.

[0080] There are no restrictions on when the ultrasonic transmitting and receiving modules will operate. For example, the ultrasonic transmitting and receiving modules in the electronic device can always be turned on. Thus, when the processor in the electronic device determines that the size parameter of the target area in a short-circuit state is greater than a parameter threshold, the ultrasonic transmitting and receiving modules can be directly activated. Alternatively, the ultrasonic transmitting and receiving modules in the electronic device can also receive a call signal and then activate their operating mode after the processor in the electronic device determines that the size parameter of the target area in a short-circuit state is greater than a parameter threshold.

[0081] In this embodiment, the duration of ultrasonic data acquisition is not limited. It can be set according to specific needs. For example, the ultrasonic data acquisition duration can be selected as 10 seconds, and the ultrasonic signal transmission function in the electronic device can be automatically turned off after 10 seconds, thereby reducing the power consumption of the electronic device and protecting the electronic device.

[0082] Step 602: Using a pre-trained recognition model, extract the feature vector corresponding to the reflected signal from the reflected signal, and perform recognition processing on the feature vector corresponding to the reflected signal to obtain the second detection result.

[0083] In this embodiment of the application, after collecting ultrasonic data over a period of time, the processor can extract the corresponding feature vector from the acquired reflected signal using a pre-trained recognition model. The feature vector of the reflected signal may include the propagation speed, attenuation rate, etc. of the reflected signal.

[0084] The identification model can determine whether the reflected signal is emitted in water or on land by processing the feature vector, thus determining whether the electronic device has entered the water.

[0085] By implementing this embodiment, by combining the size parameters of the target area in a short-circuit state on the touch screen of the electronic device with the acquired ultrasonic data, the detection power consumption can be reduced and the accuracy of identifying whether the electronic device has entered water can be improved.

[0086] In other embodiments, the target data may also be image data, and the pre-trained recognition model is trained based on image data collected by the electronic device on the water and image data collected underwater. Thus, based on the target data and the pre-trained recognition model, the electronic device undergoes water entry identification processing to obtain a second detection result. Whether the electronic device has entered the water can be identified by performing the following steps 701 to 702:

[0087] Step 701: Acquire multiple images to be identified.

[0088] Understandably, water strongly absorbs and scatters light, especially short wavelengths (such as red and orange), while longer wavelengths (such as blue and violet) are absorbed more easily. Therefore, underwater images often appear bluish or greenish, and warm-toned objects like red may appear dull or distorted. In contrast, images taken on land have richer and more realistic colors.

[0089] Furthermore, the refraction of light by water makes objects appear larger and closer in underwater photographs, affecting the composition and proportions of objects in underwater images taken by electronic devices. In contrast, the effect of light refraction is less pronounced when electronic devices capture images on land, resulting in a more accurate perception of object size and distance.

[0090] Furthermore, underwater environments often contain a large number of suspended particles and microparticles, which scatter light and affect the clarity of images captured by electronic devices. On land, however, the relatively clean environment typically results in clearer images from electronic devices.

[0091] Based on this, in the embodiments of this application, when the size parameter of the target area in the short-circuit state is determined to be greater than the parameter threshold, the camera module of the electronic device can be controlled to capture an image to be identified, so as to determine whether the electronic device has entered the water based on the image to be identified.

[0092] There are no limitations on the number of images to be captured or the duration of the capture; these can be set according to actual needs.

[0093] Step 702: Using a pre-trained recognition model, extract features from the image to be recognized to obtain a feature vector corresponding to the image to be recognized; perform recognition processing on the feature vector corresponding to the image to be recognized to obtain a second detection result.

[0094] In the embodiments of this application, the feature vector corresponding to the image to be identified may include the color features, sharpness features, etc. of the image to be identified, and there is no limitation thereto.

[0095] The recognition model can determine whether the reflected signal is emitted in water or on land by processing the feature vector corresponding to the image to be recognized, thereby determining whether the electronic device has entered the water.

[0096] By implementing this embodiment, by combining the size parameters of the target area in a short-circuit state on the touch screen of the electronic device with the acquired image to be identified, the detection power consumption can be reduced and the accuracy of identifying whether the electronic device has entered water can be improved.

[0097] In some embodiments, the target data may further include light data. Thus, if the size parameter of the target area in a short-circuit state is greater than a parameter threshold, and the first detection result is determined to be that the electronic device has entered the water, light data can be collected by the light sensor in the electronic device. Features are then extracted from the light data using a pre-trained recognition model (which is trained based on light data collected by the electronic device above and below water) to obtain a feature vector corresponding to the light data. This feature vector is then processed to obtain the second detection result.

[0098] It should be noted that the light intensity collected by electronic devices through light sensors on land and in water will vary greatly. Compared to land, the light intensity value collected by electronic devices in water will be lower.

[0099] Furthermore, after the light sensor of the electronic device is submerged in water, the ambient light intensity around it weakens, so the value of the light intensity it collects will be smaller.

[0100] For example, suppose the light intensity value collected by the light sensor of an electronic device on the ground is A, and the unit of light intensity is lux. When the electronic device is immersed in water, the light intensity value collected by the light sensor will be weaker compared to the light intensity value on the ground. Here, we can consider different water qualities, such as seawater, swimming pool water, and tap water, and assume that the light intensity value collected by the light sensor will decrease by a%, b%, and c% respectively when the electronic device enters these three liquids.

[0101] Based on the above principle, when performing feature extraction processing on light data, the extracted feature vector may include the light intensity value.

[0102] In this way, the pre-trained recognition model can process the light data based on the feature vectors corresponding to the light data to determine whether the electronic device is on land or underwater.

[0103] Considering that in practical applications, the light sensor of an electronic device may be suddenly blocked, causing a sudden change in the light intensity value it collects, rather than a decrease in light intensity value due to the electronic device entering water, some embodiments, in order to reduce the false positive rate of water immersion detection, can also determine the duration of the light intensity value collected by the electronic device. If it is determined that the light intensity value and the duration of the light intensity value meet expectations, then it can be determined whether the electronic device is on land or underwater.

[0104] The expected value of the duration can be set according to actual needs. For example, the preset time limit can be set to 10 seconds.

[0105] By implementing this embodiment, the accuracy of identifying whether an electronic device has entered water can be effectively improved by combining the size parameters of the target area in a short-circuit state on the touch screen of the electronic device with the collected light data.

[0106] When performing water entry identification processing on electronic devices based on target data and pre-trained recognition models, one of the various target data provided above can be selected, or two or more of the various target data provided above can be selected for implementation. This application embodiment does not limit this.

[0107] Before executing the above-mentioned identification model and target data to identify whether an electronic device has entered the water, the identification model needs to be trained so that a suitable identification model can be used for identification in the future.

[0108] In some embodiments, the recognition model can be trained by performing the following steps 801 to 802 to obtain a trained recognition model:

[0109] Step 801: Obtain a first target dataset collected by the electronic device on the water and a second target dataset collected by the electronic device under different collection conditions underwater. The collection conditions include one or more of water temperature, water quality, and turbidity. The target dataset includes an ultrasonic dataset.

[0110] In this embodiment of the application, a first target dataset can be obtained in advance by the electronic device on water (land). When collecting the first target dataset, the collection results under different conditions such as temperature and time period can be considered, and the data in the first target dataset can be labeled according to different collection labels.

[0111] When acquiring the second target dataset collected by electronic devices underwater, target data can be collected under different water temperatures, different water qualities (such as seawater, tap water, swimming pool water, etc.), and different turbidity, and the data in the second target dataset can be labeled according to different collection expressions.

[0112] Step 802: Train the recognition model using the first target dataset and the second target dataset to obtain the trained recognition model.

[0113] In this embodiment, the type of recognition model is not limited, and the recognition model can be selected according to the application scenario and specific data. For example, the recognition model can be a CRNN (Convolutional Recurrent Neural Network), CTC (Connectionist Temporal Classification), Transformers, or other models.

[0114] After selecting the type of recognition model, the recognition model can be trained based on the obtained labeled first target dataset and second target dataset. For example, the model parameters can be adjusted through forward propagation and backpropagation algorithms so that the model can gradually learn the recognition ability, thereby obtaining a trained recognition model.

[0115] It should be noted that, depending on the type of target data, a corresponding recognition model can be trained for each type of target data.

[0116] Therefore, for target datasets that are image datasets or light datasets, the training process of the corresponding recognition model is the same as that for target datasets that are ultrasound datasets, and will not be repeated here.

[0117] In some embodiments, if the first detection result indicates that the electronic device has not been submerged in water, it is not necessary to obtain a second detection result; instead, the electronic device can be directly determined to have not been submerged in water, thereby reducing detection power consumption.

[0118] Step 202: If both the first and second test results indicate that the electronic device has been submerged in water, then it is determined that the electronic device has been submerged in water.

[0119] In some embodiments, if the first detection result indicates that the electronic device is submerged in water, and the second detection result indicates that the electronic device is not submerged in water, it can be determined that the electronic device is not submerged in water.

[0120] In some embodiments, if it is determined that the electronic device has been submerged in water, a target operation may also be performed, including turning off the electronic device or activating a vibration mode.

[0121] Thus, by promptly shutting down electronic devices after water is detected, the risk of short circuits and further damage can be reduced. By activating the vibration mode after water is detected, the internal moisture can be expelled to some extent, preventing further damage to the electronic devices.

[0122] In some embodiments, if it is determined that the electronic device has entered water and the electronic device detects an unlocking operation, the camera application can also be activated to facilitate underwater shooting for the user.

[0123] In other words, if an electronic device detects that the user has initiated an unlocking operation when it is submerged in water, it can respond to the unlocking operation by opening the camera application, so as to realize the user's intention to take pictures underwater.

[0124] In this embodiment of the application, by acquiring a first detection result of the touch screen of the electronic device and a second detection result determined based on target data of the surrounding environment of the electronic device, if both the first and second detection results indicate that the electronic device is submerged in water, it is determined that the electronic device is submerged in water. In this way, false detection can be avoided, the accuracy of identifying that the electronic device is submerged in water can be improved, thereby improving the reliability of the electronic device.

[0125] It should be understood that although the steps in the above flowcharts 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 above flowcharts may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0126] Based on the foregoing embodiments, this application provides a water ingress detection device, which includes various modules and units included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.

[0127] Figure 9 This is a schematic diagram of the water ingress detection device provided in the embodiments of this application, as shown below. Figure 9 As shown, the device 900 includes an acquisition module 901 and a processing module 902, wherein:

[0128] The acquisition module 901 is used to acquire a first detection result and a second detection result for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data reflecting the surrounding environment of the electronic device.

[0129] The processing module 902 is used to determine that the electronic device has been submerged in water if both the first detection result and the second detection result indicate that the electronic device has been submerged in water.

[0130] In some embodiments, the acquisition module 901 is specifically used to acquire the size parameters of a target area in the touch screen of the electronic device, wherein the target area is an area in a short-circuit state; if the size parameters are greater than or equal to a parameter threshold, the first detection result is determined to indicate that the electronic device has entered water; if the first detection result indicates that the electronic device has entered water, the target data is acquired, and the electronic device is subjected to water entry recognition processing based on the target data and a pre-trained recognition model to obtain the second detection result, wherein the recognition model is trained based on environmental data collected by the electronic device on the water surface and environmental data collected by the electronic device underwater during historical periods.

[0131] In some embodiments, the size parameter includes area. The acquisition module 901 is used to acquire the circuit state of each touch area in the touch screen, the circuit state including short circuit state or normal state; and to determine the total area of ​​touch areas in the touch screen whose circuit state is short circuit state according to the circuit state of each touch area.

[0132] In some embodiments, the target data includes ultrasonic data, and the pre-trained recognition model is trained based on ultrasonic reflection signals collected by the electronic device on the water surface and underwater. The processing module 902 is specifically used to transmit ultrasonic signals through the ultrasonic transmitting module of the electronic device and receive the reflected signals corresponding to the ultrasonic signals through the ultrasonic receiving module of the electronic device. Through the pre-trained recognition model, the feature vector corresponding to the reflected signals is extracted from the reflected signals, and the feature vector corresponding to the reflected signals is processed to obtain the second detection result.

[0133] In some embodiments, the target data includes image data, and the pre-trained recognition model is trained based on image data collected by the electronic device on the water and image data collected underwater; the processing module 902 is specifically used to acquire multiple images to be recognized; to extract features from the images to be recognized using the pre-trained recognition model to obtain feature vectors corresponding to the images to be recognized; and to perform recognition processing on the feature vectors corresponding to the images to be recognized to obtain the second detection result.

[0134] In some embodiments, the processing module 902 is further configured to activate the camera application when it is determined that the electronic device has entered water and the electronic device has detected an unlocking operation.

[0135] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0136] It should be noted that, in the embodiments of this application... Figure 9 The module division of the water ingress detection device shown is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit with two or more units. The integrated units can be implemented in hardware, as software functional units, or a combination of both.

[0137] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware and software combination.

[0138] This application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements the methods described above.

[0139] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method provided in the above embodiments.

[0140] This application provides a computer program product containing instructions that, when run on a computer, cause the computer to perform the steps in the method provided in the above-described method embodiments.

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

[0142] In one embodiment, the water ingress detection device provided in this application can be implemented as a computer program, and the computer program can be implemented as follows: Figure 10 The device operates on the computer device shown. The memory of the computer device can store the various program modules that make up the above-described apparatus. The computer program, composed of the various program modules, causes the processor to execute the steps of the methods in the various embodiments of this application described in this specification.

[0143] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.

[0144] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.

[0145] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.

[0146] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0147] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.

[0148] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0149] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.

[0150] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.

[0151] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0152] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0153] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0154] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0155] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for detecting water ingress, characterized in that, Applied to electronic devices, the method includes: A first detection result and a second detection result are obtained for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data, which is data used to reflect the surrounding environment of the electronic device. If both the first and second detection results indicate that the electronic device has been submerged in water, then the electronic device is determined to have been submerged in water.

2. The method according to claim 1, characterized in that, The acquisition of the first detection result and the second detection result of the electronic device includes: Obtain the size parameters of a target area in the touchscreen of the electronic device, wherein the target area is a region in a short-circuit state; If the size parameter is greater than or equal to the parameter threshold, the first detection result is determined to indicate that the electronic device has entered water; If the first detection result indicates that the electronic device has entered the water, the target data is acquired, and the electronic device is subjected to water entry identification processing based on the target data and a pre-trained recognition model to obtain the second detection result. The recognition model is trained based on the environmental data collected by the electronic device on the water and the environmental data collected by the electronic device underwater.

3. The method according to claim 2, characterized in that, The size parameter includes area, and obtaining the size parameter of the target area in the touch screen of the electronic device includes: Obtain the circuit state of each touch area in the touch screen, including short circuit state or normal state; Based on the circuit state of each of the touch areas, the total area of ​​the touch areas in the touch screen whose circuit state is short-circuited is determined.

4. The method according to claim 2, characterized in that, The target data includes ultrasonic data, and the pre-trained recognition model is trained based on ultrasonic reflection signals collected by the electronic device on the water and ultrasonic reflection signals collected underwater. The step of performing water entry identification processing on the electronic device based on the target data and the pre-trained recognition model to obtain the second detection result includes: The electronic device emits ultrasonic signals through its ultrasonic transmitting module and receives the reflected signals corresponding to the ultrasonic signals through its ultrasonic receiving module. The pre-trained recognition model is used to extract the feature vector corresponding to the reflected signal from the reflected signal, and the feature vector corresponding to the reflected signal is processed to obtain the second detection result.

5. The method according to claim 2, characterized in that, The target data includes image data, and the pre-trained recognition model is trained based on image data collected by the electronic device on the water and image data collected underwater. The step of performing water entry identification processing on the electronic device based on the target data and the pre-trained recognition model to obtain the second detection result includes: Acquire multiple captured images to be identified; The image to be identified is subjected to feature extraction using the pre-trained recognition model to obtain a feature vector corresponding to the image to be identified. The feature vector corresponding to the image to be identified is processed to obtain the second detection result.

6. The method according to any one of claims 1 to 5, characterized in that, The method further includes: Once it is determined that the electronic device has entered water and the electronic device detects an unlocking operation, the camera application is activated.

7. A water ingress detection device, characterized in that, include: The acquisition module is used to acquire a first detection result and a second detection result for the electronic device. Both the first detection result and the second detection result are used to indicate whether the electronic device is submerged in water or not. The first detection result is the detection result of the touch screen of the electronic device, and the second detection result is the detection result determined based on the acquired target data reflecting the surrounding environment of the electronic device. The processing module is used to determine that the electronic device has been submerged in water if both the first detection result and the second detection result indicate that the electronic device has been submerged in water.

8. A computer device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 6.

9. 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 method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.