Electronic equipment, state detection method thereof and storage medium

By using the method of comparing voltage values ​​between the detection pin and the first switch in the electronic device, the problem of low reliability of temperature detection and ineffective detection in the prior art is solved, and the accuracy of connecting the socket when the device is inserted is achieved Exception status detection.

CN119166437APending Publication Date: 2024-12-20VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411310115.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing temperature detection scheme is low in reliability, and the humidity detection scheme cannot effectively detect impurities in the connection socket when the equipment is inserted.

Method used

An electronic device is designed, including a connection socket, a detection pin and a first switch, and a voltage is generated by a resistance formed between the detection pin and the power pin. The first switch compares the voltage value and outputs a signal when the threshold value exceeds the threshold value, and controls the The circuit determines the abnormal state of the connection socket based on the signal.

Benefits of technology

When the device is inserted, it can accurately detect impurities in the connection socket, improve detection reliability, and is suitable for detection needs in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166437A_ABST
    Figure CN119166437A_ABST
Patent Text Reader

Abstract

The invention discloses electronic equipment, a state detection method thereof and a storage medium, and belongs to the technical field of detection. The electronic equipment comprises a connection socket which comprises a power supply pin; the detection pin is arranged at the connection socket; the first switch comprises a detection end and an interruption end, the detection end is connected with the detection pin, and the first switch is used for outputting a signal through the interruption end under the condition that a voltage value at the detection end is greater than a first voltage value; the input end of the control circuit is connected with the interruption end, and the control circuit is used for determining the abnormal state of the connection socket according to the signal output by the interruption end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of detection technology, and specifically relates to an electronic device and a state detection method and storage medium thereof. Background Art

[0002] Electronic devices usually have reserved connection sockets for data transmission and charging of the electronic devices. In actual use, dust, liquid and other impurities may enter the connection sockets, and the presence of the impurities may affect the stability of the connection sockets.

[0003] In the related technical solutions, a temperature detection solution or a moisture detection solution is used to determine whether the connection socket has the above-mentioned abnormality, but the above-mentioned detection solutions have low reliability and cannot effectively detect certain scenarios.

[0004] Specifically, for the temperature detection scheme, its working principle is to add a thermistor in the connection socket. In the presence of impurities, the connection socket will generate a lot of heat, which will act on the thermistor and be sensed. However, this detection scheme cannot accurately reflect the actual temperature inside the connection socket and has low reliability; and for the moisture detection scheme, it can only be detected when there is no device plugged into the connection socket. If the device is plugged in and brings impurities into the connection socket, there is no need to effectively detect it. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide an electronic device and a state detection method and storage medium thereof, which can solve the problem that the temperature detection scheme has low reliability and the humidity detection scheme cannot effectively detect certain scenarios.

[0006] In the first aspect, an embodiment of the present application provides an electronic device, comprising: a connection socket, the connection socket comprising a power pin; a detection pin, provided on the connection socket; a first switch, the first switch comprising a detection end and an interrupt end, the detection end being connected to the detection pin, the first switch being used to output a signal through the interrupt end when a voltage value at the detection end is greater than a first voltage value; a control circuit, the input end of the control circuit being connected to the interrupt end, and being used to determine an abnormal state of the connection socket based on a signal output from the interrupt end.

[0007] In a second aspect, an embodiment of the present application provides a state detection method for an electronic device such as any one of the first aspect, the state detection method comprising: acquiring a signal output by an interrupt terminal; and determining an abnormal state of a connection socket according to the signal output by the interrupt terminal.

[0008] In a third aspect, an embodiment of the present application provides a status detection device for use in an electronic device such as any one of the first aspect, the status detection device comprising: an acquisition module for acquiring a signal output by an interrupt terminal; and a processing module for determining an abnormal state of a connection socket based on the signal output by the interrupt terminal.

[0009] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be executed on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the second aspect are implemented.

[0010] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method in the second aspect are implemented.

[0011] In a sixth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the second aspect.

[0012] In a seventh aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the second aspect.

[0013] In an embodiment of the present application, an electronic device is proposed, which includes a connection socket, a detection pin, a first switch and a control circuit. Among them, the connection socket includes a power pin, and the detection pin is provided in the connection socket. Therefore, when the device is inserted into the connection socket and impurities are introduced, the impurities will stay between the power pin and the detection pin. At this time, a resistor is formed between the power pin and the detection pin, and the detection end of the first switch is connected to the detection pin. Therefore, the formed resistance will generate a voltage at the detection end of the first switch. The first switch compares the voltage value at the detection end with the first voltage value, and sends a signal to the control circuit through the interrupt end when the voltage value at the detection end is greater than the first voltage value. At this time, the control circuit can determine the abnormal state of the connection socket according to the signal output by the interrupt end. In this process, when a device is inserted into the connection socket, the connection socket can also be detected, which meets the detection needs in different scenarios while ensuring the reliability of the detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Figure 1 is a schematic diagram of liquid entering into a Type-C socket in a related technical solution;

[0015] Figure 2 is one of the schematic diagrams of an electronic device provided in some embodiments of the present application;

[0016] Figure 3 is a structural schematic diagram of a first switch provided in some embodiments of the present application;

[0017] Figure 4 This is a second schematic diagram of an electronic device provided in some embodiments of the present application;

[0018] Figure 5 This is a third schematic diagram of an electronic device provided by some embodiments of the present application;

[0019] Figure 6 This is a fourth schematic diagram of an electronic device provided by some embodiments of the present application;

[0020] Figure 7 This is one of the schematic diagrams of a 16-pin Type-C socket in some embodiments of the present application;

[0021] Figure 8 This is the second schematic diagram of a 16-pin Type-C socket in some embodiments of the present application;

[0022] Fig. 9 This is the third schematic diagram of a 16-pin Type-C socket in some embodiments of the present application;

[0023] Fig.10 It is one of the schematic diagrams of the detection pin setting positions in some embodiments of the present application;

[0024] Fig.11 This is a second schematic diagram of the detection pin arrangement position in some embodiments of the present application;

[0025] Fig.12 This is a third schematic diagram of the detection pin arrangement position in some embodiments of the present application;

[0026] Fig.13 It is one of the schematic diagrams of a 24-pin Type-C socket in the related technical solution;

[0027] Fig.14 This is the second schematic diagram of a 24-pin Type-C socket in the related technical solution;

[0028] Fig.15 This is the third schematic diagram of a 24-pin Type-C socket in the related technical solution;

[0029] Fig.16 This is a fourth schematic diagram of the detection pin arrangement position of some embodiments of the present application;

[0030] Fig.17 This is a fifth schematic diagram of the detection pin arrangement position of some embodiments of the present application;

[0031] Fig.18 This is the sixth schematic diagram of the detection pin arrangement position in some embodiments of the present application;

[0032] Fig.19 is a flowchart of a state detection method provided in some embodiments of the present application;

[0033] Fig. 20 is a schematic block diagram of a state detection device provided in some embodiments of the present application;

[0034] Fig.21 is a schematic block diagram of an electronic device in an embodiment of the present application;

[0035] Fig. 22 It is a schematic diagram of the hardware structure of the electronic device in the embodiment of the present application.

[0036] Attached Figure 2 , Figure 3 , Figure 4 , Figure 5 , Figure 6 , Fig.10 , Fig.11 , Fig.12 , Fig.16 , Fig.17 , Fig.18 Markings:

[0037] 102 connection socket, 1022 power pin, 1022A fixed end, 1022B extension end, LSD detection pin, 104 first switch, 1042 detection end, 1044 interrupt end, 1046 first switching end, 1048 enable end, 1050 selection end, R1 first resistor, R2 second resistor, 1052 second switching end, R3 third resistor, 106 control circuit. DETAILED DESCRIPTION

[0038] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0039] The term "first" or "second" in the specification and claims of this application may include one or more of the features explicitly or implicitly. In the description of this application, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the objects connected before and after are in an "or" relationship.

[0040] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0041] Figure 1 A schematic diagram showing liquid entering into a Type-C socket in a related technical solution is shown.

[0042] Type-C is a Universal Serial Bus (USB) interface standard. Figure 1 The Type-C socket shown is a 24-pin socket.

[0043] like Figure 1 As shown, the Type-C socket includes two sides, the front side is represented by A and the back side is represented by B. In the 24-pin socket, the front side A has 12 pins, namely A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11 and A12. Similarly, the back side B has 12 pins, namely B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11 and B12.

[0044] Each pin has its own pin function. Specifically, GND indicates grounding, TX1+ indicates ultra-high-speed differential signal 1TX positive, TX1- indicates ultra-high-speed differential signal 1TX negative, and V BUSIndicates the power pin, CC1 and CC2 are configuration channels, D+ indicates USB differential signal 1 positive, D- indicates USB differential signal 1 negative, SBU1 is used to transmit audio, video, data and control signals, RX2- indicates super-speed differential signal 2 RX negative, RX2+ indicates super-speed differential signal 2 RX positive, TX2+ indicates super-speed differential signal 2 TX positive, TX2- indicates super-speed differential signal 2 TX negative, RX1- indicates super-speed differential signal 1 RX negative, RX1+ indicates super-speed differential signal 1 RX positive, where RX indicates receiving and TX indicates sending.

[0045] Among them, the spacing between pins of different functions in the Type-C socket is shown in Table 1.

[0046] Table 1

[0047] GND <![CDATA[V BUS ]]> CC D+ D- SBU GND <![CDATA[V BUS ]]> 1.25 CC 1.75 0.25 D+ 2.25 0.75 0.25 D- 2.25 0.75 0.75 0.25 SBU 1.75 0.25 1.25 0.75 0.25

[0048] The electronic device, state detection method thereof, and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.

[0049] In some embodiments of the present application, Figure 2 , Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown, an electronic device is proposed, including: a connection socket 102, the connection socket 102 includes a power pin 1022; a detection pin LSD, which is arranged on the connection socket 102; a first switch 104, the first switch 104 includes a detection end 1042 and an interrupt end 1044, the detection end 1042 is connected to the detection pin LSD, and the first switch 104 is used to output a signal through the interrupt end 1044 when the voltage value at the detection end 1042 is greater than the first voltage value; a control circuit 106, the input end of the control circuit 106 is connected to the interrupt end 1044, and is used to determine the abnormal state of the connection socket 102 according to the signal output by the interrupt end 1044.

[0050] In some embodiments of the present application, the power pin 1022 is also a pin for providing power.

[0051] Illustratively, the power pin 1022 is as follows Figure 1 The A4 pin inside the Type-C socket shown.

[0052] In some embodiments of the present application, the first switch 104 can be understood as a switching device with an integrated switch detection function, which detects the voltage value of the detection pin LSD as the voltage value at the detection terminal 1042 through the connection relationship between the detection terminal 1042 and the detection pin LSD, and compares the detected voltage value at the detection terminal 1042 with the first voltage value, thereby outputting the comparison result using the interrupt terminal 1044.

[0053] In some embodiments of the present application, the detection terminal 1042 can be understood as the input terminal of the first switch 104, and the interrupt terminal 1044 can be understood as a port for outputting a comparison result between the voltage value at the detection terminal 1042 and the first voltage value. The first switch 104 can compare the voltage value input by the input terminal with the first voltage value, and output a signal through the interrupt terminal 1044 when the voltage value at the detection terminal 1042 is greater than the first voltage value.

[0054] In some embodiments of the present application, the control circuit 106 may be a microcontroller unit (MCU), or may be other chips that are connected to the first switch 104 and have a control function.

[0055] In some embodiments of the present application, the first switch 104 may be a switch with an overvoltage protection function.

[0056] The first voltage value is also a voltage threshold of the switch with an overvoltage protection function.

[0057] In an embodiment of the present application, an electronic device is provided, which includes a connection socket 102, a detection pin LSD, a first switch 104 and a control circuit 106. The connection socket 102 includes a power pin 1022, and the detection pin LSD is provided in the connection socket 102. Therefore, when the device is inserted into the connection socket 102 and impurities are introduced, the impurities will stay between the power pin 1022 and the detection pin LSD. At this time, a resistor RL is formed between the power pin 1022 and the detection pin LSD, and the detection end 1042 of the first switch 104 is connected to the detection pin LSD. Therefore, the formed resistor RL generates a voltage at the detection end 1042 of the first switch 104. The first switch 104 compares the voltage value at the detection end 1042 with the first voltage value, and sends a signal to the control circuit 106 through the interrupt end 1044 when the voltage value at the detection end 1042 is greater than the first voltage value. At this time, the control circuit 106 can determine the abnormal state of the connection socket 102 according to the signal output by the interrupt end 1044. In this process, when a device is plugged into the connection socket 102, the connection socket 102 can also be tested, thereby ensuring the reliability of the test and meeting the test needs in different scenarios.

[0058] In some embodiments of the present application, the control circuit 106 is specifically used to: when the signal output from the interrupt terminal 1044 is a first signal, determine that the abnormal state of the connection socket 102 is a first abnormal state; when the signal output from the interrupt terminal 1044 is a second signal, determine that the abnormal state of the connection socket 102 is a second abnormal state; when the signal output from the interrupt terminal 1044 is a third signal, determine that the abnormal state of the connection socket 102 is a third abnormal state; wherein the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are moisture states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

[0059] In this embodiment, when the signal outputted by the interrupt terminal 1044 is different, the abnormal state of the connection socket 102 is also different.

[0060] Specifically, the abnormal state of the connection socket 102 is divided into a first abnormal state, a second abnormal state and a third abnormal state. At the same time, the three abnormal states are identified in combination with the signal output by the interrupt terminal 1044. Obviously, in this process, the abnormal state of the connection socket 102 can be divided in more detail, so as to accurately know the abnormal state of the connection socket 102.

[0061] In some embodiments of the present application, the humidity state corresponding to the first abnormal state may be mild humidity, the humidity state corresponding to the second abnormal state may be moderate humidity, and the humidity state corresponding to the third abnormal state may be moderate humidity. Based on this, the risk level corresponding to the first abnormal state is low, the risk level corresponding to the second abnormal state is medium, and the risk level corresponding to the third abnormal state is high.

[0062] In some embodiments of the present application, the first switch 104 also includes a first switching terminal 1046, an enable terminal 1048 and a selection terminal 1050, and the electronic device also includes: a first resistor R1, a first end of the first resistor R1 is connected to the first switching terminal 1046, and a second end of the first resistor R1 is grounded; the control circuit 106 is also used to: when receiving the first signal, send a fourth signal to the first switch 104 through the enable terminal 1048, and send a fifth signal to the first switch 104 through the selection terminal 1050; the first switch 104 is also used to: when receiving the fourth signal, respond to the received fifth signal, connect the detection terminal 1042 to the first switching terminal 1046; and when the voltage value at the updated detection terminal 1042 is greater than the first voltage value, output a second signal through the interrupt terminal 1044.

[0063] In this embodiment, the first switch 104 also has a first switching terminal 1046, an enable terminal 1048 and a selection terminal 1050, wherein the enable terminal 1048 can be understood as a port for activating the function of the first switch 104 to connect the detection terminal 1042 with the first switching terminal 1046. When the enable terminal 1048 receives the fourth signal, the function of the first switch 104 to connect the detection terminal 1042 with the first switching terminal 1046 is activated. If the fourth signal is not received or other signals except the fourth signal are received, the function of the first switch 104 to connect the detection terminal 1042 with the first switching terminal 1046 is turned off.

[0064] In some embodiments of the present application, the fourth signal is a high level signal or a rising edge signal.

[0065] In some embodiments of the present application, the fifth signal is a signal for connecting the detection terminal 1042 to the first switching terminal 1046 , wherein the first switching terminal 1046 can be understood as an output terminal of the first switch 104 that can be connected to the detection terminal 1042 .

[0066] In the above embodiment, if there are impurities in the connection socket 102, after the detection end 1042 is connected to the first switching end 1046, the path between the power pin 1022 and the ground will change, and the changed path is power pin 1022-impurity-detection end 1042-first switching end 1046-first resistor R1-ground.

[0067] Due to the change in the path between the power pin 1022 and the ground, the voltage value at the detection end 1042 will also change. In this process, when the first switch 104 is in working state, it is possible to detect whether the connection socket 102 is abnormal, thereby ensuring the accuracy of the detection.

[0068] In some embodiments of the present application, the fifth signal may be a low level signal or a falling edge signal.

[0069] In this embodiment, when the abnormal state of the connection socket 102 is the first abnormal state, a secondary abnormality determination can be performed on the connection socket 102 to determine whether it is the second abnormal state, thereby achieving a more accurate determination and improving the reliability of abnormality detection.

[0070] In some embodiments of the present application, the first switch 104 also includes a second switching terminal 1052, and the electronic device also includes: a second resistor R2, a first end of the second resistor R2 is connected to the second switching terminal 1052, and a second end of the second resistor R2 is grounded; the control circuit 106 is also used to: when the second signal is received, send a fourth signal to the first switch 104 through the enable terminal 1048, and send a sixth signal to the first switch 104 through the selection terminal 1050; the first switch 104 is also used to: when the fourth signal is received, respond to the received sixth signal, connect the detection terminal 1042 with the second switching terminal 1052; and when the voltage value at the updated detection terminal 1042 is greater than the first voltage value, output a third signal through the interrupt terminal 1044.

[0071] In this technical solution, the second switching end 1052 can be understood as another output end of the first switch 104 that can be connected to the detection end 1042 .

[0072] In some embodiments of the present application, the sixth signal may be a high level signal or a rising edge signal.

[0073] In this embodiment, when the abnormal state of the connection socket 102 is the second abnormal state, the connection socket 102 can be judged as abnormal again to determine whether it is the third abnormal state, thereby achieving more accurate judgment and improving the reliability of abnormality detection.

[0074] In some embodiments of the present application, the electronic device further includes: a third resistor R3, a first end of the third resistor R3 is connected to the detection end 1042, and a second end of the third resistor R3 is grounded; or the third resistor R3 is integrated in the first switch 104; wherein the resistance value of the third resistor R3 is greater than the resistance value of the first resistor R1, and the resistance value of the first resistor R1 is greater than the resistance value of the second resistor R2.

[0075] In this embodiment, by limiting the resistance value of the third resistor R3 to be greater than the resistance value of the first resistor R1, and the resistance value of the first resistor R1 to be greater than the resistance value of the second resistor R2, when the voltage output by the power pin 1022 is fixed, the voltage value at the detection terminal 1042 is lowered by reducing the pull-down resistance.

[0076] In the above embodiment, if Figure 4 As shown, when the voltage value VA at the detection end 1042 is greater than the first voltage value, it is considered that the abnormal state of the connection socket 102 is the first abnormal state.

[0077] like Figure 5 As shown, when the abnormal state of the connection socket 102 is the first abnormal state, a new voltage divider circuit can be formed by connecting the detection end 1042 to the first switching end 1046 to lower the voltage value at the detection end 1042. If the updated voltage value BV at the detection end 1042 is still greater than the first voltage value, it can be understood that the moisture condition of the connection socket 102 is relatively serious and has reached the second abnormal state.

[0078] Similarly, if Figure 6 As shown, by connecting the detection terminal 1042 with the second switching terminal 1052, a new voltage-dividing circuit can be formed to lower the voltage value at the detection terminal 1042 again. If the updated voltage value VC at the detection terminal 1042 is still greater than the first voltage value, it can be understood that the moisture condition of the connection socket 102 is relatively serious and has reached the third abnormal state.

[0079] Obviously, in the above embodiment, when the abnormal state of the connection socket 102 is determined to be the first abnormal state, the detection end 1042 can be connected to different switching ends to make a refined judgment on the abnormal state of the connection socket 102, thereby improving the accuracy of the abnormal judgment.

[0080] In some embodiments of the present application, the detection pin LSD is located on one side of the power pin 1022; or the power pin 1022 has a fixed end and an extension end, the extension end extends from the fixed end along the plug-in and unplugging direction of the connection socket 102, and the detection pin LSD is located on one side of the fixed end.

[0081] In some embodiments of the present application, the connection socket 102 is a Type-C socket, wherein Type-C is a Universal Serial Bus (USB) interface form factor standard.

[0082] In some embodiments of the present application, Figure 7 , Figure 8 and Fig. 9 As shown, the connection socket is a 16-pin Type-C socket, wherein, specifically, V BUS Located on pins A4, A9, B4, and B9.

[0083] If the detection pin is located on one side of the power pin, Fig.10 , Fig.11 and Fig.12 As shown, the detection pins can be set on one side of A4, A9, B4 and B9, such as being set at the positions of A3, A10, B3 and B10 pins.

[0084] In some embodiments of the present application, Fig.13 , Fig.14 and Fig.15 As shown, the connection socket is a 24-pin Type-C socket, wherein, specifically, VBUS is located at pins A4, A9, B4 and B9.

[0085] like Fig.16 , Fig.17 and Fig.18 As shown, the power pin has a fixed end 1022A and an extended end 1022B, the extended end 1022B extends from the fixed end 1022A along the plugging direction of the connection socket, and the detection pin is located on one side of the fixed end 1022A, such as between A4 and A5.

[0086] In some embodiments of the present application, Fig.19 As shown, a state detection method is proposed, which is used for any electronic device as described above, and the state detection method includes:

[0087] Step 1902, obtaining the signal output by the interrupt terminal.

[0088] Step 1904: determine the abnormal state of the connection socket according to the signal output by the interrupt terminal.

[0089] In this embodiment, the connection socket includes a power pin, and the detection pin is provided in the connection socket. Therefore, when a device is inserted into the connection socket and impurities are introduced, the impurities will stay between the power pin and the detection pin. At this time, a resistor is formed between the power pin and the detection pin, and the detection end of the first switch is connected to the detection pin. Therefore, the formed resistor will generate a voltage at the detection end of the first switch. The first switch compares the voltage value at the detection end with the first voltage value, and sends a signal through the interrupt end when the voltage value at the detection end is greater than the first voltage value. At this time, the abnormal state of the connection socket is determined according to the signal output by the interrupt end. In this process, when a device is inserted into the connection socket, the connection socket can also be detected, which ensures the reliability of the detection and meets the detection needs in different scenarios.

[0090] In some embodiments of the present application, after determining the abnormal state of the connection socket according to the signal output by the interrupt terminal, the state detection method further includes: executing an operation corresponding to the abnormal state of the connection socket.

[0091] In this embodiment, an operation corresponding to the abnormal state of the connection socket is performed to protect the electronic device, thereby improving the reliability of the electronic device.

[0092] In some embodiments of the present application, the abnormal state of the connection socket includes a first abnormal state, a second abnormal state and a third abnormal state, and operations corresponding to the abnormal state of the connection socket are performed, specifically including: when the abnormal state of the connection socket is the first abnormal state, an operation of stopping boosting is performed; when the abnormal state of the connection socket is the second abnormal state, an operation of reducing the charging voltage is performed; when the abnormal state of the connection socket is the third abnormal state, an operation of stopping charging is performed.

[0093] In the above embodiment, the operation of stopping the boosting can be understood as, in the process of charging using the connecting socket, it is first necessary to establish communication between the electronic device and other devices based on the connecting socket, and when the communication is established, the charging power is increased by increasing the transmission voltage in the connecting socket, and executing the operation of stopping the boosting means not increasing the transmission voltage in the connecting socket. In this process, the charging safety of the electronic device can be ensured while ensuring the charging of the electronic device.

[0094] In the above embodiment, the operation of reducing the charging voltage is to establish communication between the electronic device and other devices based on the connection socket, and when the communication is established, the operation of reducing the transmission voltage in the connection socket. In this process, the charging safety of the electronic device can be ensured while sacrificing the charging speed.

[0095] In the above embodiment, the operation of stopping charging is performed, that is, communication between the electronic device and other devices is established based on the connection socket, and when the communication is established, the power transmission in the connection socket is stopped. In this process, charging can be stopped autonomously when the connection interface is relatively wet, thereby ensuring the charging safety of the electronic device.

[0096] In some embodiments of the present application, after executing the operation of stopping charging, the status detection method also includes: displaying a reminder message, the reminder message is used to remind the user that charging has stopped; receiving a first input to the reminder message, the first input is used to close the reminder message; and in response to the first input, ending the operation of stopping charging.

[0097] In this embodiment, a reminder message is output to inform the user of the actual charging status of the electronic device, and the user is given the right to decide whether to charge. At this time, the user can close the reminder message according to actual usage needs and continue to charge the electronic device. In this process, the user's charging needs can be prioritized to reduce the occurrence of situations such as the inability to charge the electronic device due to moisture in the connection socket.

[0098] In some embodiments of the present application, the reminder information can be a sound reminder, such as playing a prompt tone, or a text reminder, such as using an electronic device to display "Charging has stopped because the connection socket is wet", or it can be an image of "the connection socket is wet" to inform the user.

[0099] In some embodiments of the present application, when the reminder information is a sound reminder, the first input may be a long press operation on the power button of the electronic device, or a press operation on the volume up button and the volume down button.

[0100] In some embodiments of the present application, when the reminder information is a text reminder, the first input may be an operation of closing a page for displaying the text reminder.

[0101] In some embodiments of the present application, when the reminder information is an image showing “the connection socket is wet”, the first input may be a selection operation on a first control displayed synchronously with the image showing “the connection socket is wet”.

[0102] The first control is used to indicate that the user ignores "the connection socket is wet".

[0103] In some embodiments of the present application, the abnormal state of the connection socket is determined according to the signal output by the interrupt end, specifically including: when the signal output by the interrupt end is a first signal, determining that the abnormal state of the connection socket is a first abnormal state; when the signal output by the interrupt end is a second signal, determining that the abnormal state of the connection socket is a second abnormal state; when the signal output by the interrupt end is a third signal, determining that the abnormal state of the connection socket is a third abnormal state; wherein the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are moisture states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

[0104] In this embodiment, when the signal outputted by the interrupt terminal is different, the abnormal state of the connection socket is also different.

[0105] Specifically, the abnormal state of the connection socket is divided into a first abnormal state, a second abnormal state and a third abnormal state. At the same time, the three abnormal states are identified in combination with the signal output by the interrupt end. Obviously, in this process, the abnormal state of the connection socket can be divided in more detail, so as to accurately know the abnormal state of the connection socket.

[0106] In some embodiments of the present application, the state detection method also includes: when the first signal is received, sending a fourth signal to the first switch through the enable end, and sending a fifth signal to the first switch through the selection end; wherein, when the first switch receives the fourth signal, it responds to the received fifth signal and connects the detection end with the first switching end; and when the voltage value at the updated detection end is greater than the first voltage value, outputting the second signal through the interrupt end.

[0107] In the above embodiment, if there are impurities in the connection socket, after the detection end is connected to the first switching end, the path between the power pin and the ground will change, and the changed path is power pin-impurity-detection end-first switching end-first resistor-ground.

[0108] Due to the change in the path between the power pin and the ground, the voltage value at the detection end will also change. In this process, when the first switch is in working state, it is possible to detect whether the connection socket is abnormal, thereby ensuring the accuracy of the detection.

[0109] In some embodiments of the present application, the state detection method also includes: when the second signal is received, sending a fourth signal to the first switch through the enable end, and sending a sixth signal to the first switch through the selection end; wherein, when the first switch receives the fourth signal, it responds to the received sixth signal and connects the detection end with the second switching end; and when the voltage value at the updated detection end is greater than the first voltage value, outputting a third signal through the interrupt end.

[0110] In this embodiment, when the abnormal state of the connection socket is the second abnormal state, the connection socket can be re-determined to determine whether it is the third abnormal state, thereby achieving more accurate judgment and improving the reliability of abnormality detection.

[0111] The state detection method provided in the embodiment of the present application can be executed by a state detection device. In the embodiment of the present application, the state detection device provided in the embodiment of the present application is described by taking the state detection method executed by the state detection device as an example.

[0112] In some embodiments of the present application, Fig. 20 As shown, a state detection device 2000 is proposed, which is used for any electronic device as described above. The state detection device 2000 includes: an acquisition module 2002, which is used to acquire the signal output by the interrupt terminal; and a processing module 2004, which is used to determine the abnormal state of the connection socket according to the signal output by the interrupt terminal.

[0113] In this embodiment, the connection socket includes a power pin, and the detection pin is provided in the connection socket. Therefore, when a device is inserted into the connection socket and impurities are introduced, the impurities will stay between the power pin and the detection pin. At this time, a resistor is formed between the power pin and the detection pin, and the detection end of the first switch is connected to the detection pin. Therefore, the formed resistor will generate a voltage at the detection end of the first switch. The first switch compares the voltage value at the detection end with the first voltage value, and sends a signal through the interrupt end when the voltage value at the detection end is greater than the first voltage value. At this time, the abnormal state of the connection socket is determined according to the signal output by the interrupt end. In this process, when a device is inserted into the connection socket, the connection socket can also be detected, which ensures the reliability of the detection and meets the detection needs in different scenarios.

[0114] In some embodiments of the present application, after determining the abnormal state of the connection socket according to the signal output by the interrupt terminal, the processing module 2004 is further used to: execute an operation corresponding to the abnormal state of the connection socket.

[0115] In some embodiments of the present application, the abnormal state of the connection socket includes a first abnormal state, a second abnormal state and a third abnormal state, and the processing module 2004 is specifically used to: when the abnormal state of the connection socket is the first abnormal state, perform an operation of stopping boosting; when the abnormal state of the connection socket is the second abnormal state, perform an operation of reducing the charging voltage; when the abnormal state of the connection socket is the third abnormal state, perform an operation of stopping charging.

[0116] In some embodiments of the present application, after executing the operation of stopping charging, the processing module 2004 is also used to: display a reminder message, the reminder message is used to remind the user that charging has stopped; receive a first input to the reminder message, the first input is used to close the reminder message; and in response to the first input, end the operation of stopping charging.

[0117] In some embodiments of the present application, the processing module 2004 is specifically used to: when the signal output from the interrupt end is the first signal, determine that the abnormal state of the connection socket is the first abnormal state; when the signal output from the interrupt end is the second signal, determine that the abnormal state of the connection socket is the second abnormal state; when the signal output from the interrupt end is the third signal, determine that the abnormal state of the connection socket is the third abnormal state; wherein the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are moisture states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

[0118] In some embodiments of the present application, the processing module 2004 is also used to: when the first signal is received, send a fourth signal to the first switch through the enable end, and send a fifth signal to the first switch through the selection end; wherein, when the first switch receives the fourth signal, it responds to the received fifth signal and connects the detection end with the first switching end; and when the voltage value at the updated detection end is greater than the first voltage value, output the second signal through the interrupt end.

[0119] In some embodiments of the present application, the processing module 2004 is also used to: send a fourth signal to the first switch through the enable end and send a sixth signal to the first switch through the selection end when the second signal is received; wherein, when the first switch receives the fourth signal, it responds to the received sixth signal and connects the detection end with the second switching end; and when the voltage value at the updated detection end is greater than the first voltage value, output a third signal through the interrupt end.

[0120] The state detection device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0121] The state detection device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0122] The state detection device provided in the embodiment of the present application can achieve Fig.19 The various processes implemented in the state detection method embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.

[0123] like Fig.21 As shown, an embodiment of the present application also provides an electronic device 2100, including a processor 2102 and a memory 2104, wherein the memory 2104 stores programs or instructions that can be executed on the processor 2102, and when the program or instructions are executed by the processor 2102, the various steps of the above-mentioned state detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.

[0124] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0125] Fig. 22 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0126] like Fig. 22As shown, the electronic device 2200 includes but is not limited to: a radio frequency unit 2201, a network module 2202, an audio output unit 2203, an input unit 2204, a sensor 2205, a display unit 2206, a user input unit 2207, an interface unit 2208, a memory 2209, and a processor 2210 and other components.

[0127] Those skilled in the art will appreciate that the electronic device 2200 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 2210 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig. 22 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0128] In some embodiments of the present application, the processor 2210 is used to obtain a signal output by the interrupt terminal; and determine the abnormal state of the connection socket according to the signal output by the interrupt terminal.

[0129] In some embodiments of the present application, after determining the abnormal state of the connection socket according to the signal output by the interrupt terminal, the processor 2210 is further configured to execute an operation corresponding to the abnormal state of the connection socket.

[0130] In some embodiments of the present application, the abnormal state of the connection socket includes a first abnormal state, a second abnormal state and a third abnormal state, and the processor 2210 is specifically used to, when the abnormal state of the connection socket is the first abnormal state, execute an operation of stopping boosting; when the abnormal state of the connection socket is the second abnormal state, execute an operation of reducing the charging voltage; when the abnormal state of the connection socket is the third abnormal state, execute an operation of stopping charging.

[0131] In some embodiments of the present application, after the operation of stopping charging is executed, the display unit 2206 is used to display a reminder message, and the reminder message is used to remind the user that charging has stopped; the user input unit 2207 is used to receive a first input to the reminder message, and the first input is used to close the reminder message; the processor 2210 is also used to terminate the operation of stopping charging in response to the first input.

[0132] In some embodiments of the present application, the processor 2210 is specifically used to determine that the abnormal state of the connection socket is a first abnormal state when the signal output from the interrupt end is a first signal; determine that the abnormal state of the connection socket is a second abnormal state when the signal output from the interrupt end is a second signal; and determine that the abnormal state of the connection socket is a third abnormal state when the signal output from the interrupt end is a third signal; wherein the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are humid states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

[0133] In some embodiments of the present application, the processor 2210 is also used to send a fourth signal to the first switch through the enable end and a fifth signal to the first switch through the selection end when the first signal is received; wherein, when the first switch receives the fourth signal, it responds to the received fifth signal and connects the detection end with the first switching end; and when the updated voltage value at the detection end is greater than the first voltage value, the second signal is output through the interrupt end.

[0134] In some embodiments of the present application, the processor 2210 is also used to send a fourth signal to the first switch through the enable end and send a sixth signal to the first switch through the selection end when the second signal is received; wherein, when the first switch receives the fourth signal, it responds to the received sixth signal and connects the detection end with the second switching end; and when the updated voltage value at the detection end is greater than the first voltage value, the third signal is output through the interrupt end.

[0135] In this embodiment, the connection socket includes a power pin, and the detection pin is provided in the connection socket. Therefore, when a device is inserted into the connection socket and impurities are introduced, the impurities will stay between the power pin and the detection pin. At this time, a resistor is formed between the power pin and the detection pin, and the detection end of the first switch is connected to the detection pin. Therefore, the formed resistor will generate a voltage at the detection end of the first switch. The first switch compares the voltage value at the detection end with the first voltage value, and sends a signal through the interrupt end when the voltage value at the detection end is greater than the first voltage value. At this time, the abnormal state of the connection socket is determined according to the signal output by the interrupt end. In this process, when a device is inserted into the connection socket, the connection socket can also be detected, which ensures the reliability of the detection and meets the detection needs in different scenarios.

[0136] It should be understood that in the embodiment of the present application, the input unit 2204 may include a graphics processor (Graphics Processing Unit, GPU) 22041 and a microphone 22042, and the graphics processor 22041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 2206 may include a display panel 22061, and the display panel 22061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 2207 includes a touch panel 22071 and at least one of other input devices 22072. The touch panel 22071 is also called a touch screen. The touch panel 22071 may include two parts: a touch detection device and a touch controller. Other input devices 22072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0137] The memory 2209 can be used to store software programs and various data. The memory 2209 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 2209 may include a volatile memory or a non-volatile memory, or the memory 2209 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 2209 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0138] The processor 2210 may include one or more processing units; optionally, the processor 2210 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 2210.

[0139] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned state detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0140] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0141] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned state detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0142] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0143] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned state detection method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "including one" do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the embodiments of the present application are essentially or partly contributed to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.

[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. An electronic device, characterized in that: include: A connection socket, the connection socket comprising a power pin; A detection pin, provided at the connection socket; a first switch, the first switch comprising a detection end and an interrupt end, the detection end being connected to the detection pin, and the first switch being used to output a signal through the interrupt end when a voltage value at the detection end is greater than a first voltage value; A control circuit, wherein an input end of the control circuit is connected to the interrupt end, and is used to determine an abnormal state of the connection socket according to a signal output by the interrupt end.

2. The electronic device according to claim 1, characterized in that: The control circuit is specifically used for: When the signal output by the interrupt terminal is the first signal, determining that the abnormal state of the connection socket is the first abnormal state; When the signal output by the interrupt terminal is the second signal, determining that the abnormal state of the connection socket is the second abnormal state; When the signal output by the interrupt terminal is the third signal, determining that the abnormal state of the connection socket is the third abnormal state; Among them, the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are humidity states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

3. The electronic device according to claim 2, characterized in that: The first switch further includes a first switching terminal, an enabling terminal and a selecting terminal, and the electronic device further includes: A first resistor, wherein a first end of the first resistor is connected to the first switching end, and a second end of the first resistor is grounded; The control circuit is also used for: In case of receiving the first signal, sending a fourth signal to the first switch through the enable terminal, and sending a fifth signal to the first switch through the select terminal; The first switch is also used for: In case of receiving the fourth signal, responding to the received fifth signal, connecting the detection end with the first switching end; and When the updated voltage value at the detection end is greater than the first voltage value, the second signal is output through the interrupt end.

4. The electronic device according to claim 3, characterized in that: The first switch further includes a second switching end, and the electronic device further includes: a second resistor, wherein a first end of the second resistor is connected to the second switching end, and a second end of the second resistor is grounded; The control circuit is also used for: In case of receiving the second signal, sending a fourth signal to the first switch through the enable terminal, and sending a sixth signal to the first switch through the select terminal; The first switch is also used for: In case of receiving the fourth signal, responding to the received sixth signal, connecting the detection end with the second switching end; and When the updated voltage value at the detection end is greater than the first voltage value, the third signal is output through the interrupt end.

5. The electronic device according to claim 4, characterized in that: The electronic device further comprises: a third resistor, wherein a first end of the third resistor is connected to the detection end, and a second end of the third resistor is grounded; or the third resistor is integrated in the first switch; The resistance value of the third resistor is greater than the resistance value of the first resistor, and the resistance value of the first resistor is greater than the resistance value of the second resistor.

6. The electronic device according to any one of claims 1 to 4, characterized in that: The detection pin is located at one side of the power pin; or The power pin has a fixed end and an extending end, the extending end extends from the fixed end along the plugging and unplugging direction of the connecting socket, and the detection pin is located at one side of the fixed end.

7. A state detection method, used for the electronic device according to any one of claims 1 to 6, characterized in that: include: Get the signal output by the interrupt terminal; The abnormal state of the connection socket is determined according to the signal output by the interrupt terminal.

8. The state detection method according to claim 7, characterized in that: After determining the abnormal state of the connection socket according to the signal output by the interrupt terminal, the state detection method further includes: An operation corresponding to the abnormal state of the connection socket is performed.

9. The state detection method according to claim 8, characterized in that: The abnormal state of the connection socket includes a first abnormal state, a second abnormal state and a third abnormal state, and the performing of the operation corresponding to the abnormal state of the connection socket specifically includes: When the abnormal state of the connection socket is the first abnormal state, performing an operation of stopping the voltage boost; When the abnormal state of the connection socket is the second abnormal state, performing an operation of reducing the charging voltage; When the abnormal state of the connection socket is the third abnormal state, an operation of stopping charging is performed.

10. The state detection method according to claim 9, characterized in that: After the operation of stopping charging is performed, the state detection method further includes: Displaying a reminder message, wherein the reminder message is used to remind the user that charging has stopped; receiving a first input for the reminder information, wherein the first input is used to close the reminder information; In response to the first input, the operation of stopping charging is terminated.

11. The state detection method according to claim 7, characterized in that: The determining the abnormal state of the connection socket according to the signal output by the interrupt terminal specifically includes: When the signal output by the interrupt terminal is the first signal, determining that the abnormal state of the connection socket is the first abnormal state; When the signal output by the interrupt terminal is the second signal, determining that the abnormal state of the connection socket is the second abnormal state; When the signal output by the interrupt terminal is the third signal, determining that the abnormal state of the connection socket is the third abnormal state; Among them, the first signal, the second signal and the third signal are different voltage signals, the voltage value of the first signal is greater than the voltage value of the second signal, the voltage value of the second signal is greater than the voltage value of the third signal, the first abnormal state, the second abnormal state and the third abnormal state are humidity states of different risk levels, the risk level corresponding to the first abnormal state is lower than the risk level corresponding to the second abnormal state, and the risk level corresponding to the second abnormal state is lower than the risk level corresponding to the third abnormal state.

12. The state detection method according to claim 11, characterized in that: The state detection method further includes: In case of receiving the first signal, sending a fourth signal to the first switch through the enable terminal, and sending a fifth signal to the first switch through the select terminal; When the first switch receives the fourth signal, it responds to the received fifth signal by connecting the detection end with the first switching end; and when the updated voltage value at the detection end is greater than the first voltage value, it outputs the second signal through the interrupt end.

13. The state detection method according to claim 11, characterized in that: The state detection method further includes: In case of receiving the second signal, sending a fourth signal to the first switch through the enable terminal, and sending a sixth signal to the first switch through the select terminal; When the first switch receives the fourth signal, it responds to the received sixth signal and connects the detection end with the second switching end; and when the updated voltage value at the detection end is greater than the first voltage value, it outputs the third signal through the interrupt end.

14. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the state detection method according to any one of claims 7 to 13 are implemented.

15. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the state detection method according to any one of claims 7 to 13 are implemented.