Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
< hardware configuration >
Fig. 1 is a schematic diagram of a configuration of an electronic device capable of implementing a control method of the electronic device according to an embodiment of the present disclosure.
In one embodiment, the electronic device 1000 may be as shown in fig. 1, including a processor 1100, a memory 1200, aninterface device 1300, acommunication device 1400, adisplay device 1500, aninput device 1600, a sensor 1700, andelectrodes 1800. The processor 1100 may include, but is not limited to, a central processing unit CPU, a microprocessor MCU, or the like. The memory 1200 includes, for example, a ROM (read only memory), a RAM (random access memory), a nonvolatile memory such as a hard disk, and the like. Theinterface device 1300 includes, for example, various bus interfaces such as a serial bus interface (including a USB interface), a parallel bus interface, and the like.Communication device 1400 is capable of wired or wireless communication, for example. Thedisplay device 1500 is, for example, a liquid crystal display, an LED display, a touch display, or the like. Theinput device 1600 may include, for example, a touch screen, keyboard, mouse, somatosensory input, and the like. The sensor 1700 may be, for example, an electrocardiograph sensor, an air pressure sensor, an infrared sensor, a laser sensor, a gyro sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, an ambient light sensor, a fingerprint sensor, a touch sensor, a temperature sensor, or the like, and theelectrode 1800 may be used to detect electrocardiographic data of a user.
In one embodiment, the electronic device 1000 may be an electronic device with communication functionality, service processing capabilities. The electronic device 1000 may be, for example, a mobile terminal, a wearable device, or the like.
In this embodiment, the memory 1200 of the electronic device 1000 is configured to store instructions for controlling the processor 1100 to operate to implement or support implementation of the camera-based control method according to any of the embodiments. The skilled person can design the instructions according to the solution disclosed in the present specification. How the instructions control the operation of the processor is well known in the art and will not be described in detail herein.
It should be understood by those skilled in the art that although a plurality of devices of the electronic apparatus 1000 are illustrated in fig. 1, the electronic apparatus 1000 of the embodiments of the present specification may refer to only some of the devices, for example, only the processor 1100, the memory 1200, the sensor 1700, theelectrode 1800, and the like.
The electronic device 1000 shown in fig. 1 is merely illustrative and is in no way intended to limit the description, its applications, or uses.
< first embodiment of the apparatus >
Fig. 2 shows a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. The electronic device may be a mobile terminal, a wearable device. More specifically, the electronic device may be a smart bracelet, a smart watch, or the like.
As shown in fig. 2, the electronic device includes an electrode assembly 101, a transfer switch 102, anelectrocardiograph sensor 103, a sampling circuit 104, and a main control chip 105. The electrode assembly 101 is connected to anelectrocardiograph sensor 103 and a sampling circuit 104 via a changeover switch 102. The main control chip 105 is respectively connected with the change-over switch 102, theelectrocardio sensor 103 and the sampling circuit 104.
The electrode assembly 101 may include electrodes for electrocardiographic detection.
An Electrocardiograph (ECG)sensor 103 detects electrocardiographic data of the user through the electrode module 101.
The sampling circuit 104 is configured to receive a voltage signal output by the electrode assembly 101, and output the received voltage signal to the main control chip 105, so that the main control chip 105 determines whether the electronic device is in a water inlet state according to the voltage signal.
The transfer switch 102 includes a first path and a second path. The first path communicates the electrode assembly 101 with the sampling circuit 104, and the second path communicates the electrode assembly 101 with theelectrocardiograph sensor 103.
In this embodiment, when the switch 102 is switched to the first path, the sampling circuit 104 is in communication with the electrode assembly 101, so as to obtain a voltage signal output by the electrode assembly 101, and output the obtained voltage signal to the main control chip 105, so that the main control chip 105 can determine whether the electronic device is in a water inlet state according to the voltage signal. When the switch 102 is switched to the second path, theelectrocardiograph sensor 103 communicates with the electrode assembly 101, and theelectrocardiograph sensor 103 can detect electrocardiograph data of the user via the electrode assembly 101.
In one embodiment, the main control chip 105 is configured to obtain a control instruction, and control the switch 102 to switch between the first path and the second path according to the control instruction. The control command may be, for example, an electrocardiographic detection start command or an electrocardiographic detection end command.
In a more specific example, in the initial state, the first path of the switch 102 is in a conducting state and the second path is in a non-conducting state. When the main control chip 105 receives the electrocardiograph detection starting instruction, the main control chip 105 controls the change-over switch 102 to switch to the second channel according to the electrocardiograph detection starting instruction, so that theelectrocardiograph sensor 103 is communicated with the electrode assembly 101, and electrocardiograph data of a user is detected through the electrode assembly 101. When the detection of theelectrocardiograph sensor 103 is completed, theelectrocardiograph sensor 103 sends an electrocardiograph detection ending instruction to the main control chip 105, and when the main control chip 105 receives the electrocardiograph detection ending instruction, the main control chip 105 controls the change-over switch 102 to be switched to the first channel according to the electrocardiograph detection ending instruction, so that the sampling circuit 104 is communicated with the electrode assembly 101, and the main control chip 105 can determine whether the electronic equipment is in a water entering state or not according to the voltage signal collected by the sampling circuit 104. That is, when the user does not turn on the electrocardiographic detection function of the electronic device, the electrode assembly of the electronic device can be used to detect water entry into the electronic device, and when the user turns on the electrocardiographic detection function of the electronic device, the electrode assembly of the electronic device can be used to detect electrocardiographic data of the user.
The electronic equipment provided by the embodiment of the disclosure can use the original electrode for performing electrocardiographic detection on the electronic equipment as a water inlet detection terminal, can realize two functions of electrocardiographic detection and water inlet detection, can perform water inlet detection without adding a special water inlet detection device, can save space, reduce hardware cost, and is beneficial to reducing the overall size of the electronic equipment and improving the portability of the electronic equipment. In addition, the embodiment of the present disclosure may also be applied to an electronic device not configured with a peripheral interface.
In one embodiment, as shown in FIG. 3, the electronic device also includes a barometric pressure sensor 106. The air pressure sensor 106 is disposed within the electronic device. The barometric sensor 106 may be used to detect altitude, for example, to detect a user climbing a building or mountain. The air pressure sensor 106 may also be used to detect the presence of water in the electronic device.
In one embodiment, as shown in FIG. 2, the electronic device further comprises a touch screen 107. The touch screen 107 may be used to detect a touch operation by a user. The touch screen 107 may also be used for water ingress detection for the electronic device.
The electronic equipment provided by the embodiment of the disclosure can detect the water entering of the electronic equipment according to the electrode assembly, the air pressure sensor and the touch screen, and can accurately identify the water entering position of the electronic equipment according to the setting positions of the electrode assembly, the air pressure sensor and the touch screen, so that the electronic equipment is controlled to execute corresponding operation according to the water entering position, the service life of the electronic equipment is prolonged, and the user experience is improved.
In one embodiment, as shown in fig. 3, the electronic device further includes amotor 108, thedrainage mechanism 108 is disposed in the electronic device, and thedrainage mechanism 108 is connected to the main control chip 105 and is configured to operate under the control of the main control chip 105 to drain water in the electronic device. Illustratively, when the water inlet level of the electronic device reaches a preset level, the main control chip 105 sends a control signal to thedrainage mechanism 108 to start the drainage operation. Thedrainage mechanism 108 may be, for example, a motor, a fan, or the like. According to the embodiment of the disclosure, the drainage mechanism arranged in the electronic equipment can start drainage operation when the electronic equipment is determined to be in a water inlet state, so that the electronic equipment is prevented from being damaged, and the service life of the electronic equipment is prolonged.
In one embodiment, as shown in fig. 2, the electronic device further includes an acceleration sensor 109 and a gyro sensor 110. The acceleration sensor 109 and the gyro sensor 110 are used to detect the motion state of the user. In a more specific example, when it is determined that the electronic device is in the water entry state, the detection data of the acceleration sensor 109 and the gyroscope sensor 110 are acquired, the motion state of the user is determined according to the detection data, and when the user performs water sports such as swimming, the water entry detection function of the electronic device is turned off, so that the power consumption of the electronic device can be reduced, and the user experience can be improved.
In one embodiment, as shown in fig. 2, the electronic device further includes a power module 111 and a rechargeable battery 112. The power module 111 and the rechargeable battery 112 are used to supply power to the electronic device.
In one embodiment, as shown in fig. 3, the electronic device further includes a communication module 113, and the communication module 113 is configured to establish a communication connection with other devices. The communication module 113 may be, for example, a bluetooth module, a WIFI module, or the like.
< second device embodiment >
Fig. 4 and 5 show a schematic structural diagram of an electronic device provided by another embodiment of the present disclosure. The electrode assembly in this embodiment comprises two electrodes.
The electrode assembly 101 includes afirst electrode 1011 and asecond electrode 1012. Thefirst electrode 1011 may be, for example, an LA electrode, and thesecond electrode 1012 may be, for example, an RA electrode.
In one embodiment, as shown in FIG. 4, an electronic device has a first side and a second side. The second side is the side that contacts with the user's arm. Thefirst electrode 1011 is disposed at the second side, and thesecond electrode 1012 is disposed at the second side. Thesecond electrode 1012 may be disposed at a bezel or a key of the electronic device, for example.
Referring to fig. 5, both the output terminal of thefirst electrode 1011 and the output terminal of thesecond electrode 1012 are connected to the first input terminal of the changeover switch 102. A first input end and a second input end of the sampling circuit 104 are respectively connected with a first output end and a second output end of the change-over switch 102, a third input end of the sampling circuit 104 is connected with a power module of the electronic device, and a first output end of the sampling circuit 104 is connected with a first input end of the main control chip 105. A sixth output end and a seventh output end of the change-over switch 102 are respectively connected with a first input end and a second input end of theelectrocardio sensor 103, and an output end of theelectrocardio sensor 103 is connected with the main control chip 105.
In a more specific example, as shown in fig. 5, the sampling circuit 104 includes a first resistor R1 and a second resistor R2 connected in series. One end of the first resistor R1 is connected to the first output terminal of the switch 102, and the other end of the first resistor R1 is connected to the second output terminal of the switch 102 and the first input terminal of the main control chip 105. One end of the second resistor R2 is connected with the other end of the first resistor R1, and the other end of the second resistor R2 is connected with the power management module of the electronic device.
In this embodiment, when the electronic device is not in the water inlet state, that is, thefirst electrode 1011 and thesecond electrode 1012 are not turned on, the voltage output from the sampling circuit to the main control chip is the voltage across the first resistor R1, that is, VOutput of=VInput device(R1/(R1+ R2)), wherein VInput deviceInput sampling circuit 104 for power management moduleThe voltage of (c). When the electronic device is in a water-entering state, thefirst electrode 1011 and thesecond electrode 1012 are conducted by water, that is, a seventh resistor R7 exists between thefirst electrode 1011 and thesecond electrode 1012, and at this time, the voltage output by the sampling circuit to the main control chip is the resistance at two ends of the first resistor R1 and the seventh resistor R7 after being connected in parallel, that is, VOutput of’=VInput device(R1 '/(R1 ' + R2)), wherein R1 ' ═ R1 × R7/(R1+ R7), VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. Based on this, when the change-over switch 102 is switched to the first path, the main control chip 105 may determine whether the electronic device enters water according to the voltage value of the first voltage signal output by the sampling circuit 102.
When the electronic device is in a wearing state, thefirst electrode 1011 is attached to the skin of one arm of the user, and when the user starts the electrocardiographic detection function, the other hand of the user can be attached to thesecond electrode 1012. When the electrocardiograph detection function is turned on, the changeover switch 102 is switched to the second path, that is, thefirst electrode 1011 and thesecond electrode 1012 are connected to theelectrocardiograph sensor 103, so that thefirst electrode 1011, theelectrocardiograph sensor 103, thesecond electrode 1012 and the body of the user form a detection circuit, and further electrocardiograph data of the user can be acquired.
The electronic equipment provided by the embodiment of the disclosure can use the original electrode for performing electrocardiographic detection on the electronic equipment as a water inlet detection terminal, can realize two functions of electrocardiographic detection and water inlet detection, can perform water inlet detection without adding a special water inlet detection device, can save space, reduce hardware cost, and is beneficial to reducing the overall size of the electronic equipment and improving the portability of the electronic equipment.
< third device example >
Fig. 6 and 7 show a schematic structural diagram of an electronic device provided in another embodiment of the present disclosure. The third embodiment is different from the second embodiment in that the electrode assembly includes three electrodes.
The electrode assembly 101 includes afirst electrode 1011, asecond electrode 1012, and athird electrode 1013. Thefirst electrode 1011 may be, for example, an LA electrode, thesecond electrode 1012 may be, for example, an RA electrode, and thethird electrode 1013 may be, for example, an RLD electrode.
In one embodiment, an electrode assembly is shown in fig. 6, an electronic device having a first side and a second side. The second side is the side that contacts with the user's arm. Thefirst electrode 1011 and thethird electrode 1013 are provided on the second side, and thesecond electrode 1012 is provided on the second side. The first side may be, for example, a bottom surface of the electronic device. Thesecond electrode 1012 may be disposed at a bezel or a key of the electronic device, for example.
Referring to fig. 7, the output terminals of thefirst electrode 1011, thesecond electrode 1012 and thethird electrode 1013 are all connected to the second input terminal of the change-over switch 102. A fourth input end, a fifth input end and a sixth input end of the sampling circuit 104 are respectively connected with a third output end, a fourth output end and a fifth output end of the change-over switch 102, a seventh input end of the sampling circuit 104 is connected with a power module of the electronic device, and a second output end and a third output end of the sampling circuit 104 are respectively connected with a second input end and a third input end of the main control chip 105. An eighth output end, a ninth output end and a tenth output end of the change-over switch 102 are respectively connected with a third input end, a fourth input end and a fifth input end of theelectrocardio sensor 103, and an output end of theelectrocardio sensor 103 is connected with the main control chip 105.
In a more specific example, as shown in fig. 7, the sampling circuit 104 includes a third resistor R3 and a fourth resistor R4 connected in series. One end of the third resistor R3 is connected to the third output terminal of the switch 102, and the other end of the third resistor R3 is connected to the fourth output terminal of the switch 102 and the second input terminal of the main control chip 105. One end of the fourth resistor R4 is connected to the other end of the third resistor R3, and the other end of the fourth resistor R4 is connected to the power management module of the electronic device.
The sampling circuit 104 further includes a fifth resistor R5 and a sixth resistor R6 connected in series. One end of the fifth resistor R5 is connected to the third output terminal of the switch 102, and the other end of the fifth resistor R5 is connected to the fifth output terminal of the switch 102 and the third input terminal of the main control chip 105, respectively. One end of the sixth resistor R6 is connected to the other end of the fifth resistor R5, and the other end of the sixth resistor R6 is connected to the power management module of the electronic device.
In this embodiment, when the first side (bottom shell) of the electronic device is not in the water entering state, that is, thefirst electrode 1011 and thethird electrode 1013 are not turned on, at this time, the voltage output from the second output terminal of the sampling circuit to the main control chip is the voltage across the third resistor R3, that is, VOutput of=VInput device(R3/(R3+ R4)), wherein VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. When the first side (bottom shell) of the electronic device is in the water-entering state, thefirst electrode 1011 and thethird electrode 1013 are conducted by water, that is, an eighth resistor R8 exists between thefirst electrode 1011 and thethird electrode 1013, at this time, the voltage output by the sampling circuit to the main control chip is the resistor between the third resistor R3 and the eighth resistor R8 after being connected in parallel, that is, VOutput of’=VInput device(R3 '/(R3 ' + R4)), wherein R3 ' ═ R3 × R8/(R3+ R8), VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. Based on this, when the switch 102 is switched to the first path, the main control chip 105 may determine whether the bottom case of the electronic device is submerged according to the voltage value of the second voltage signal output by the second output terminal of the sampling circuit 102.
When the second side (key) of the electronic device is not in the water inlet state, that is, thesecond electrode 1012 and thethird electrode 1013 are not turned on, at this time, the voltage output from the third output terminal of the sampling circuit to the main control chip is the voltage across the fifth resistor R5, that is, VOutput of=VInput device(R5/(R5+ R6)), wherein VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. When the second side (key) of the electronic device is in the water-entering state, thesecond electrode 1012 and thethird electrode 1013 are conducted by water, that is, a ninth resistor R9 exists between thesecond electrode 1012 and thethird electrode 1013, at this time, the voltage output by the third output terminal of the sampling circuit 104 to the main control chip 105 is the resistor between the fifth resistor R5 and the ninth resistor R9 after being connected in parallel, that is, VOutput of’=VInput device(R5 '/(R5 ' + R6)), wherein R5 ' ═ R5 × R9/(R5+ R9), VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. Based on this, the switch 102 is switchedWhen the first channel is switched, the main control chip 105 may determine whether the key of the electronic device enters water according to the voltage value of the third voltage signal output by the third output terminal of the sampling circuit 102.
When the electronic device is in a wearing state, thefirst electrode 1011 is attached to the skin of one arm of the user, and when the user starts the electrocardiographic detection function, the other hand of the user can be attached to thesecond electrode 1012. When the electrocardiograph detection function is turned on, the changeover switch 102 is switched to the second path, that is, thefirst electrode 1011 and thesecond electrode 1012 are connected to theelectrocardiograph sensor 103, so that thefirst electrode 1011, theelectrocardiograph sensor 103, thesecond electrode 1012 and the body of the user form a detection circuit, and further electrocardiograph data of the user can be acquired.
The electronic equipment provided by the embodiment of the disclosure can use the original electrode for electrocardio detection on the electronic equipment as a water inlet detection terminal, and can realize two functions of electrocardio detection and water inlet detection. Furthermore, the electronic equipment can be subjected to water inlet detection according to the three electrodes arranged at different positions, the water inlet position of the electronic equipment can be accurately identified, and the detection accuracy is improved.
< fourth example of the apparatus >
Referring to fig. 8, an embodiment of the present disclosure further provides an electronic device 800. The electronic device 800 may be, for example, the electronic device 1000 shown in fig. 1.
The electronic device comprises a processor 810, a memory 820, a sampling circuit 830, a first electrode 840, a second electrode 850.
The memory 820 is used to store executable computer programs.
The processor 810 is configured to execute a control method of an electronic device according to any one of the following method embodiments, under control of the executable computer program.
In an embodiment, the sampling circuit 830 may be as described in the foregoing device embodiments, and is not described herein again.
In one embodiment, the electronic device 800 may be an electronic device with communication functionality, service processing capabilities. The electronic device 800 may be, for example, a mobile terminal, a wearable device, or the like. More specifically, the electronic device 800 may be, for example, a smart watch, a smart bracelet, or the like.
The electronic equipment provided by the embodiment of the disclosure can use the original electrode for electrocardio detection on the electronic equipment as a water inlet detection terminal, and can realize two functions of electrocardio detection and water inlet detection.
< method examples >
One embodiment of the present disclosure provides a control method of an electronic device, which may be implemented by, for example, an electronic device 1000 as shown in fig. 1. The control method may also be implemented by, for example, the electronic device described in any of the device embodiments above.
In this embodiment, when the change-over switch is switched to the first path, the voltage signal output by the electrode may be obtained by the sampling circuit, and it is determined whether the electronic device is in the water inlet state according to the voltage signal. The following describes a control process of an electronic device in various embodiments.
Taking the electronic device described in the second embodiment of the device as an example, as shown in fig. 9, the method for controlling an electronic device according to this embodiment may include the following steps S1100 to S1300.
Step S1100, acquiring a first voltage signal between the first electrode and the second electrode acquired by the sampling circuit.
The first electrode may be, for example, a LA electrode and the second electrode may be, for example, a RA electrode.
In one embodiment, the first voltage signal between the first electrode and the second electrode can be collected at a preset first time interval, and the power consumption of the electronic device can be reduced.
As shown in fig. 5, in this embodiment, the sampling circuit 104 includes a first resistor R1 and a second resistor R2 connected in series. When the electronic device is not in the water inlet state, that is, thefirst electrode 1011 and thesecond electrode 1012 are not turned on, at this time, the voltage output by the sampling circuit to the main control chip is the voltage across the first resistor R1, that is, VOutput of=VInput device(R1/(R1+ R2)), wherein VInput deviceFor power management module transmissionInto the voltage of the sampling circuit 104. When the electronic device is in a water-entering state, thefirst electrode 1011 and thesecond electrode 1012 are conducted by water, that is, a seventh resistor R7 exists between thefirst electrode 1011 and thesecond electrode 1012, and at this time, the voltage output by the sampling circuit to the main control chip is the resistance at two ends of the first resistor R1 and the seventh resistor R7 after being connected in parallel, that is, VOutput of’=VInput device(R1 '/(R1 ' + R2)), wherein R1 ' ═ R1 × R7/(R1+ R7), VInput deviceThe voltage of the sampling circuit 104 is input to the power management module. Based on this, when the change-over switch 102 is switched to the first path, the main control chip 105 may determine whether the electronic device enters water according to the voltage value of the first voltage signal output by the sampling circuit 102.
Step S1200, comparing the voltage value of the first voltage signal with a preset first threshold.
The first threshold may be set according to the experimental simulation results.
In step S1300, when the voltage value of the first voltage signal is smaller than a preset first threshold, it is determined that the electronic device is in a water inlet state.
When the voltage value of the first voltage signal is smaller than a preset first threshold value, that is, the voltage value V of the first voltage signalOutput ofV when the electronic device is not in waterOutput ofThe difference value of (2) is greater than the safety margin of the voltage change, and at this time, it is determined that the electronic device is in the water inlet state.
The electronic equipment provided by the embodiment of the disclosure can use the original electrode for performing electrocardiographic detection on the electronic equipment as a water inlet detection terminal, can realize two functions of electrocardiographic detection and water inlet detection, can perform water inlet detection without adding a special water inlet detection device, can save space, reduce hardware cost, and is beneficial to reducing the overall size of the electronic equipment and improving the portability of the electronic equipment. In addition, the embodiment of the present disclosure may also be applied to an electronic device not configured with a peripheral interface.
After the electronic equipment is determined to be in the water inlet state, the water inlet level of the electronic equipment can be further determined, so that the electronic equipment is controlled to execute corresponding operation according to the water inlet level.
In one embodiment, the control method of the electronic device may further include: steps S2100-S2400.
In step S2100, a pressure signal output by the air pressure sensor is acquired.
In this embodiment, when the electronic device is in the water entry state, the air pressure in the electronic device increases. For example, when the electronic device is dropped into water with a depth of 1 cm, the air pressure inside the electronic device increases by 98 Pa. Based on this, whether the electronic device is in the water inlet state can be determined according to the pressure signal output by the air pressure sensor.
It should be noted that, in this embodiment, the placement position of the air pressure sensor may be set as needed to detect whether the corresponding position of the electronic device is in the water entering state. For example, the air pressure sensor and the second electrode are respectively arranged on the left side and the right side of the electronic device, and water entering on the left side or the right side of the electronic device can be respectively detected.
For example, the pressure signal output by the air pressure sensor may be acquired at a preset second time interval, so that power consumption of the electronic device may be reduced.
In a more specific example, the pressure value of the pressure signal is compared with a preset second threshold value, and when the pressure value of the pressure signal is greater than the preset second threshold value, the electronic equipment is determined to be in the water inlet state.
In a more specific example, in order to improve the detection accuracy, a current pressure signal is acquired, when the pressure value of the current pressure signal is greater than a preset second threshold value, a next pressure signal is acquired, and when the next pressure signal is greater than the preset second threshold value, the electronic device is determined to be in the water inlet state. Thus, the electronic equipment can be prevented from being mistaken for the water entering state due to the air pressure change caused by the change of the motion state of the user.
In step S2200, a capacitance signal output by the touch screen is obtained.
In this embodiment, when the electronic device is in the water-entering state, the capacitance value of the capacitance signal output by the touch screen changes. Based on the water level, the electronic equipment can be determined by combining the electrode and the air pressure sensor.
For example, the capacitance signal output by the touch screen can be acquired at a preset second time interval, so that the power consumption of the electronic device can be reduced.
In a more specific example, the capacitance value of the capacitance signal is compared with a preset third threshold value, and when the capacitance value of the capacitance signal is greater than the preset third threshold value, it is determined that the electronic device is possibly in the water-entering state.
And step S2300, determining the water inlet grade of the electronic equipment according to the first voltage signal, the pressure signal and the capacitance signal.
Because the first electrode, the second electrode, the air pressure sensor and the touch screen are respectively arranged at different positions of the electronic equipment, the water inlet position of the electronic equipment can be determined according to the first voltage signal, the pressure signal and the capacitance signal, and therefore the water inlet grade of the electronic equipment can be determined. For example, the first electrode is located on a bottom shell of the electronic device, the air pressure sensor is arranged close to one side of the electronic device, the touch screen is arranged on the upper surface of the electronic device, and the water inlet position of the electronic device can be determined according to the electrode, the air pressure sensor and the touch screen, so that the water inlet level of the electronic device can be determined. According to the embodiment of the disclosure, the detection accuracy can be improved, the electronic equipment is controlled to execute corresponding operation according to the water inlet level, and the use by a user is facilitated.
In a more specific example, the step of determining the water ingress level of the electronic device based on the first voltage signal, the pressure signal, and the capacitance signal may further comprise: steps S2310-S2340.
In step S2310, a first detection result is determined according to a comparison result of the voltage value of the first voltage signal and the first threshold.
For example, when the voltage value of the first voltage signal is smaller than a preset first threshold, it is determined that the electronic device is in the water inlet state, and the first detection result is "1". When the voltage value of the first voltage signal is greater than or equal to a preset first threshold value, it is determined that the electronic equipment is not in the water inlet state, and the first detection result is '0'.
Step S2320, determining a second detection result according to a comparison result between the pressure value of the pressure signal and a preset second threshold.
For example, when the pressure value of the pressure signal is greater than a preset second threshold value, it is determined that the electronic device is in the water inlet state, and the first detection result is "1". When the pressure value of the pressure signal is smaller than or equal to a preset second threshold value, it is determined that the electronic equipment is not in the water inlet state, and the first detection result is '0'.
In step S2330, a third detection result is determined according to a comparison result between the capacitance value of the capacitance signal and a preset third threshold.
For example, when the capacitance value of the capacitance signal is greater than the preset third threshold value, it is determined that the electronic device is in the water inlet state, and the first detection result is "1". When the capacitance value of the capacitance signal is smaller than or equal to a preset third threshold value, it is determined that the electronic device is not in the water inlet state, and the first detection result is '0'.
Step S2340, determining the water inlet level of the electronic equipment according to the first detection result, the second detection result, the third detection result and the weight coefficient corresponding to the detection result.
And S2400, controlling the electronic equipment to output prompt information, controlling the electronic equipment to power off, and/or controlling the electronic equipment to start a drainage function according to the water inlet level of the electronic equipment.
Illustratively, the total weight factor W of the water entering the electronic devicekCan be determined by the following formula:
Wk=W1*T1+W2*T2+W3*T3
wherein, WkIs the total weight coefficient, W, of the water entering the electronic device1As a first detection result, T1Is the weight coefficient corresponding to the first detection result, W2As a second detection result, T2Is the weight coefficient corresponding to the second detection result, W3As a third detection result, T3And the weight coefficient is corresponding to the third detection result.
Further, the water inlet grade of the electronic equipment is determined according to the total weight coefficient of the water inlet of the electronic equipment and the numerical value corresponding to the preset water inlet grade.
Illustratively, the higher the entry level of the electronic device, the more serious the electronic device enters water. In particular, the amount of the solvent to be used,
at 0 < WkIf < L1, the water inlet level of the electronic equipment is determined to be level 1. That is, the electronic device is in a local water, for example, the bottom case is stained with water stain, and the like, and at this time, the electronic device outputs a first prompt to the user to prompt the user to clean the water drops and the dirt.
At L1 < WkIf < L2, the water inlet level of the electronic equipment is determined to be level 2. That is to say, the electronic device is in the large tracts of land and soaks, and at this moment, the electronic device outputs the second and reminds to the user to remind the user to clean the water droplet, and control the electronic device outage.
At L2 < WkIf < L3, the water inlet level of the electronic equipment is determined to be 3 level. That is, the electronic device is in a state where the whole machine is immersed in water, for example, the electronic device falls into water. At this time, the control electronics activate the drainage mechanism to perform a drainage operation, e.g., the main control chip controls the motor to vibrate at different frequencies with a maximum amount of vibration to drain water within the electronics.
According to the embodiment of the disclosure, the detection accuracy can be improved, the electronic equipment is controlled to execute corresponding operation according to the water inlet level, and corresponding treatment can be timely performed when the electronic equipment is in the water inlet state, so that the electronic equipment is prevented from being damaged, and the electronic equipment is convenient for a user to use.
Taking the electronic device described in the third embodiment of the device as an example, as shown in fig. 10, the method for controlling an electronic device according to this embodiment may include the following steps S3100 to S3300.
In step S3100, a second voltage signal between the first electrode and the third electrode collected by the sampling circuit is acquired.
Step S3200, acquiring a third voltage signal between the second electrode and the third electrode acquired by the sampling circuit.
Illustratively, the first electrode may be, for example, a LA electrode, the second electrode may be, for example, a RA electrode, and the third electrode may be, for example, a RLD electrode. The first electrode and the third electrode are arranged on a bottom shell of the electronic equipment, and the second electrode is arranged on a key on the side face of the electronic equipment.
And step S3300, determining that the electronic device is in a water inlet state when the voltage value of the second voltage signal is smaller than a preset first threshold value and/or the voltage value of the third voltage signal is smaller than the preset first threshold value.
And comparing the voltage value of the second voltage signal with the first threshold, and determining that the first electrode and the third electrode are conducted when the voltage value of the second voltage signal is smaller than the preset first threshold, namely determining that the bottom shell of the electronic equipment is in a water inlet state.
And comparing the voltage value of the third voltage signal with the first threshold, and determining that the second electrode and the third electrode are conducted when the voltage value of the third voltage signal is smaller than the preset first threshold, namely determining that the bottom shell and the keys of the electronic equipment are in a water inlet state.
After the electronic equipment is determined to be in the water inlet state, the water inlet level of the electronic equipment can be further determined, so that the electronic equipment is controlled to execute corresponding operation according to the water inlet level.
In one embodiment, the control method of the electronic device may further include: steps S4100-S4400.
In step S4100, a pressure signal output from the air pressure sensor is acquired.
In step S4200, a capacitance signal output by the touch screen is acquired.
And step S4300, determining the water inlet grade of the electronic equipment according to the second voltage signal, the third voltage signal, the pressure signal and the capacitance signal.
Because the first electrode, the second electrode, the third electrode, the air pressure sensor and the touch screen are respectively arranged at different positions of the electronic equipment, the water inlet position of the electronic equipment can be determined according to the second voltage signal, the third voltage signal, the force signal and the capacitance signal, and therefore the water inlet grade of the electronic equipment can be determined. For example, the first electrode and the third electrode are located on a bottom shell of the electronic device, the second electrode is located on a key on a side face of the electronic device, the air pressure sensor is arranged close to the surface of the electronic device, the touch screen is arranged on the surface of the electronic device, and the water inlet position of the electronic device can be determined according to the second voltage signal, the third voltage signal, the force signal and the capacitance signal, so that the water inlet level of the electronic device can be determined. According to the embodiment of the disclosure, the detection accuracy can be improved, the electronic equipment is controlled to execute corresponding operation according to the water inlet level, and the use by a user is facilitated.
In a more specific example, the step of determining the water entry level of the electronic device based on the second voltage signal, the third voltage signal, the pressure signal, and the capacitance signal may further comprise: steps S4310-S4350.
Step S4310, determining a first detection result according to a comparison result of the voltage value of the second voltage signal and the first threshold.
Step S4320, determining a second detection result according to a comparison result of the voltage value of the third voltage signal and the first threshold.
Step S4330, determining a third detection result according to a comparison result between the pressure value of the pressure signal and a preset second threshold.
Step S4340, determining a fourth detection result according to a comparison result between the capacitance value of the capacitance signal and a preset third threshold.
Step S4350, determining the water inlet grade of the electronic equipment according to the first detection result, the second detection result, the third detection result, the fourth detection result and the weight coefficient corresponding to the detection result.
Illustratively, the total weight factor W of the water entering the electronic devicekCan be determined by the following formula:
Wk=W1*T1+W2*T2+W3*T3+W4*T4
wherein, WkIs the total weight coefficient, W, of the water entering the electronic device1As a first detection result, T1Is the weight coefficient corresponding to the first detection result, W2As a second detection result, T2Is the weight coefficient corresponding to the second detection result, W3As a third detection result, T3Is the weight coefficient corresponding to the third detection result, W4As a fourth detection result, T4Is a fourth detectionThe result is the corresponding weight coefficient.
Further, the water inlet grade of the electronic equipment is determined according to the total weight coefficient of the water inlet of the electronic equipment and the numerical value corresponding to the preset water inlet grade.
Illustratively, the higher the entry level of the electronic device, the more serious the electronic device enters water. In particular, the amount of the solvent to be used,
at 0 < WkIf < L1, the water inlet level of the electronic equipment is determined to be level 1.
At L1 < WkIf < L2, the water inlet level of the electronic equipment is determined to be level 2.
At L2 < WkIf < L3, the water inlet level of the electronic equipment is determined to be 3 level.
And step S4400, controlling the electronic equipment to output prompt information, controlling the electronic equipment to power off, and/or controlling the electronic equipment to start a drainage function according to the water inlet level of the electronic equipment.
According to the embodiment of the disclosure, the detection accuracy can be improved, the electronic equipment is controlled to execute corresponding operation according to the water inlet level, and corresponding treatment can be timely performed when the electronic equipment is in the water inlet state, so that the electronic equipment is prevented from being damaged, and the electronic equipment is convenient for a user to use.
In still another embodiment of the present disclosure, the control method of the electronic device further includes: and S5100-S5200.
Step S5100, an electrocardio detection starting instruction is obtained.
Step S5200, in response to the electrocardiographic detection start instruction, controls the changeover switch to switch so that the electrocardiographic sensor is connected to the first electrode and the second electrode, respectively, and acquires electrocardiographic data of the user via the first electrode and the second electrode.
In this embodiment, in an initial state, the sampling circuit responds to an electrocardiograph detection start instruction through the transfer switch and the first electrode and the second electrode, and controls the transfer switch to switch so that the electrocardiograph sensor is connected to the first electrode and the second electrode respectively.
In still another embodiment of the present disclosure, the control method of the electronic device further includes: steps S6100 to S6200.
Step S6100, an electrocardiographic detection end instruction is acquired.
And S6200, responding to the electrocardio detection ending instruction, controlling a change-over switch to be switched so as to enable a sampling circuit to be respectively connected with the first electrode and the second electrode, and determining whether the electronic equipment is in a water inlet state or not according to a voltage signal between the first electrode and the second electrode.
According to the control method of the electronic equipment, the original electrode used for performing the electrocardio detection on the electronic equipment can be used as the water inlet detection terminal, two functions of the electrocardio detection and the water inlet detection can be realized, the electronic equipment can perform the water inlet detection without additionally arranging a special water inlet detection device, the space can be saved, and the hardware cost can be reduced.
< computer-readable storage Medium >
The embodiment of the present disclosure also provides a computer-readable storage medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the method for controlling an electronic device provided by the embodiment of the present disclosure is executed.
The embodiments in the present disclosure are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments, but it should be clear to those skilled in the art that the embodiments described above can be used alone or in combination with each other as needed. In addition, for the device embodiment, since it corresponds to the method embodiment, the description is relatively simple, and for relevant points, refer to the description of the corresponding parts of the method embodiment. The system embodiments described above are merely illustrative, in that modules illustrated as separate components may or may not be physically separate.
The present invention may be a system, method and/or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied therewith for causing a processor to implement various aspects of the present invention.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
Computer program instructions for carrying out operations of the present invention may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "like" programming languages, or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, aspects of the present invention are implemented by personalizing an electronic circuit, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA), with state information of computer-readable program instructions, which can execute the computer-readable program instructions.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, by software, and by a combination of software and hardware are equivalent.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the invention is defined by the appended claims.