Interface detection method and device, electronic equipment and storage medium
By performing insertion detection and liquid intrusion detection in the interface of electronic equipment, and using the impedance changes of the audio pins to determine the liquid intrusion status, the problem of interface corrosion in harsh environments is solved, the service life of the interface is extended and power consumption is reduced.
Patent Information
- Application Number
- CN202310194320.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
The physical interface of electronic equipment can easily cause pin corrosion in harsh environments, resulting in limited functionality and reduced service life.
Provide an interface detection method that uses the impedance change of the audio pin to determine the liquid inlet status through insertion detection and liquid inlet detection, and performs liquid inlet detection when the insertion detection is turned off, reducing the number of live pins, reducing corrosion risks and performance Consumption.
It effectively improves the corrosion problem of the interface in harsh environments, extends the life of the interface, reduces the scenarios where insertion detection and liquid intrusion detection occur at the same time, and reduces corrosion risks and power consumption.
Smart Images

Figure CN118549722A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of electronic technology, and in particular to an interface detection method, device, electronic device and storage medium. Background Art
[0002] Electronic devices are generally equipped with physical interfaces, which are used to implement the hardware interface between the electronic device and the plug-in module to achieve data exchange between the electronic device and the plug-in module. At present, the external physical interface (hereinafter referred to as the interface) has many functions and many application scenarios. If these interfaces are in harsh environments (such as moisture, oil, foreign matter, etc.), they are prone to corrosion between the pins and other problems, which limits the function of the electronic device. In serious cases, it will make the electronic device stop working and reduce the service life of the electronic device. Summary of the invention
[0003] The present disclosure provides an interface detection method, device, electronic device and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an interface detection method, the method comprising:
[0005] Performing insertion detection on the interface in the electronic device;
[0006] In response to detecting that an insertion module is inserted into the interface, shutting down the insertion detection;
[0007] When the insertion detection state is closed, the interface is subjected to a liquid inflow detection to obtain a detection result; wherein the detection result includes liquid inflow or no liquid inflow.
[0008] In some embodiments, the performing liquid inflow detection on the interface to obtain the detection result includes:
[0009] The liquid ingress detection is performed using the audio pin of the interface to obtain the detection result; wherein the audio pin is used to transmit audio data.
[0010] In some embodiments, the step of performing the liquid ingress detection using the audio pin of the interface to obtain the detection result includes:
[0011] Detecting the impedance of the audio pin;
[0012] The detection result is determined according to the impedance of the audio pin.
[0013] In some embodiments, the audio pins include a first audio pin and a second audio pin;
[0014] The detecting the impedance of the audio pin comprises:
[0015] Detecting the impedance of the first audio pin with a first time interval as a detection period;
[0016] In response to the impedance of the first audio pin being less than the first impedance threshold a number of times greater than or equal to a first preset number within a unit time, detecting the impedance of the second audio pin with a second time interval as a detection period;
[0017] The step of determining the detection result according to the impedance of the audio pin includes:
[0018] In response to the number of times that the impedance of the second audio pin is less than a second impedance threshold within a unit time is greater than or equal to a second preset number of times, it is determined that the detection result is liquid inflow.
[0019] In some embodiments, determining the detection result according to the impedance of the audio pin includes:
[0020] In response to the impedance of the first audio pin being less than the first impedance threshold being less than the first preset number of times within a unit time, determining that the detection result is that no liquid has entered; or,
[0021] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is less than the second preset number of times, it is determined that the detection result is that no liquid has entered.
[0022] In some embodiments, the method further comprises:
[0023] Detect notification information; wherein the notification information is used to switch an audio switch, and the audio switch is connected to the audio pin;
[0024] In response to detecting the notification information, determining a liquid inlet detection state for the interface;
[0025] In response to the liquid ingress detection being performed on the interface, the liquid ingress detection is terminated.
[0026] In some embodiments, the method further comprises:
[0027] In response to obtaining the detection result, detecting a connection state of the insertion module;
[0028] In response to the connection status being: the plug-in module has been unplugged from the interface, performing the insertion detection again; or,
[0029] In response to the connection status being: the plug-in module is not unplugged from the interface, the connection status of the plug-in module is detected again.
[0030] In some embodiments, the method further comprises:
[0031] In response to obtaining the detection result, determining an application scenario of the interface;
[0032] In response to the application scenario belonging to a preset scenario, the liquid inlet detection is terminated.
[0033] In some embodiments, the method further comprises:
[0034] Detecting the connection status of the plug-in module;
[0035] In response to the application scenario not belonging to the preset scenario, and the connection state is: the insertion module and the interface are still in a connection state, the liquid inlet detection is performed again; or,
[0036] In response to the application scenario belonging to the preset scenario, and the connection status is: the plug-in module and the interface are still in a connection state, the application scenario of the interface is determined again.
[0037] In some embodiments, the performing insertion detection on the interface includes:
[0038] In a state where a configuration channel pin is turned off, insert detection is performed on the interface; wherein the configuration channel pin is used to transmit non-audio data;
[0039] In response to detecting that a connection device is plugged into the interface, the configuration channel pin is turned on.
[0040] In some embodiments, the performing insertion detection on the interface in a state where the configuration channel pin is closed includes:
[0041] When the configuration channel pin is closed, the insertion detection is performed on the interface using a preset pin; wherein the voltage of the preset pin in the working state is lower than the voltage of the configuration channel pin in the working state.
[0042] In some embodiments, the method further comprises:
[0043] In response to the detection result being liquid ingress, a liquid ingress warning is issued.
[0044] In some embodiments, the performing insertion detection on the interface in the electronic device includes:
[0045] The insertion detection is performed on the interface in the electronic device with a third time interval as a detection period.
[0046] A second aspect of the present disclosure provides an interface, wherein the interface includes:
[0047] substrate;
[0048] Insertion detection pin, the interface detection method of the first aspect performs insertion detection through the insertion detection pin;
[0049] A liquid inlet detection pin, through which the interface detection method described in the first aspect performs liquid inlet detection;
[0050] The insertion detection pin and the liquid inlet pin are respectively located at different positions of the substrate.
[0051] In some embodiments, the insertion detection pin includes: a non-configuration channel pin; and / or,
[0052] The liquid inlet detection pin includes: an audio pin for transmitting audio data.
[0053] A third aspect of the present disclosure provides an interface detection device, the device comprising:
[0054] A first detection module, used for performing insertion detection on the interface in the electronic device;
[0055] A processing module, configured to close the insertion detection in response to detecting that an insertion module is inserted into the interface;
[0056] The second detection module is used to perform liquid inflow detection on the interface to obtain a detection result when the insertion detection is turned off; wherein the detection result includes liquid inflow or no liquid inflow.
[0057] According to some optional embodiments, the second detection module is further used to:
[0058] The liquid ingress detection is performed using the audio pin of the interface to obtain the detection result; wherein the audio pin is used to transmit audio data.
[0059] According to some optional embodiments, the second detection module is further used to:
[0060] Detecting the impedance of the audio pin;
[0061] The detection result is determined according to the impedance of the audio pin.
[0062] According to some optional embodiments, the audio pin includes a first audio pin and a second audio pin;
[0063] The second detection module is further used to: detect the impedance of the first audio pin with a first time interval as a detection period;
[0064] In response to the impedance of the first audio pin being less than the first impedance threshold a number of times greater than or equal to a first preset number within a unit time, detecting the impedance of the second audio pin with a second time interval as a detection period;
[0065] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is greater than or equal to a second preset number of times, it is determined that the detection result is liquid inflow.
[0066] According to some optional embodiments, the second detection module is further used to:
[0067] In response to the impedance of the first audio pin being less than the first impedance threshold being less than the first preset number of times within a unit time, determining that the detection result is that no liquid has entered; or,
[0068] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is less than the second preset number of times, it is determined that the detection result is that no liquid has entered.
[0069] According to some optional embodiments, the device further includes:
[0070] A third detection module, used to detect notification information; wherein the notification information is used to switch an audio switch, and the audio switch is connected to the audio pin;
[0071] A first determination module, configured to determine a liquid inlet detection state for the interface in response to detecting the notification information;
[0072] The first termination module is configured to terminate the liquid inlet detection in response to the liquid inlet detection being performed on the interface.
[0073] According to some optional embodiments, the device further includes:
[0074] a fourth detection module, configured to detect a connection state of the insertion module in response to obtaining the detection result;
[0075] a fifth detection module, configured to, in response to the connection state being: the plug-in module has been unplugged from the interface, perform the insertion detection again; or,
[0076] The sixth detection module is configured to detect the connection status of the plug-in module again in response to the connection status being: the plug-in module is not unplugged from the interface.
[0077] According to some optional embodiments, the device further includes:
[0078] A second determination module, configured to determine an application scenario of the interface in response to obtaining the detection result;
[0079] The second termination module is used to terminate the liquid inlet detection in response to the application scenario belonging to a preset scenario.
[0080] According to some optional embodiments, the device further includes:
[0081] a seventh detection module, used to detect the connection status of the insertion module;
[0082] an eighth detection module, configured to, in response to the application scenario not belonging to the preset scenario and the connection state being: the insertion module and the interface are still in a connection state, perform the liquid inlet detection again; or,
[0083] The third determination module is used to determine the application scenario of the interface again in response to the application scenario belonging to the preset scenario and the connection state is: the insertion module and the interface are still in a connection state.
[0084] According to some optional embodiments, the first detection module is further used to:
[0085] In a state where a configuration channel pin is turned off, insert detection is performed on the interface; wherein the configuration channel pin is used to transmit non-audio data;
[0086] In response to detecting that a connection device is plugged into the interface, the configuration channel pin is turned on.
[0087] According to some optional embodiments, the device further includes:
[0088] The warning module is used for issuing a liquid inflow warning in response to the detection result that liquid inflow occurs.
[0089] According to some optional embodiments, the first detection module is further used to:
[0090] The insertion detection is performed on the interface in the electronic device with a third time interval as a detection period.
[0091] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0092] a memory for storing processor-executable instructions;
[0093] A processor connected to the memory;
[0094] Wherein, the processor is configured to execute the method as described in the embodiment of the first aspect.
[0095] According to a fifth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a computer, the computer is enabled to execute the method described in the embodiment of the first aspect.
[0096] The disclosed embodiments disclose an interface detection method, device, electronic device and storage medium. According to the detection result of liquid inflow detection, the liquid inflow status of the socket can be obtained, so that when the detection result is liquid inflow, the liquid inflow can be processed in time, which is helpful to improve the corrosion and short circuit problems of the interface in harsh environments and extend the life of the interface. In addition, the liquid inflow detection is performed when an insertion module is inserted into the interface, and the liquid inflow detection needs to be performed in the state of closing the insertion detection, which reduces the scene of the simultaneous existence of the insertion detection and the liquid inflow detection, which is conducive to reducing the risk of corrosion of the interface and also conducive to reducing power consumption.
[0097] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0098] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0099] Figure 1 is a structural diagram of an interface according to an exemplary embodiment;
[0100] Figure 2 is a schematic diagram of an application scenario of an interface according to an exemplary embodiment;
[0101] Figure 3 This is one of the schematic diagrams of application scenarios of audio pins in an interface according to an exemplary embodiment;
[0102] Figure 4 is a second schematic diagram of an application scenario of an audio pin in an interface according to an exemplary embodiment;
[0103] Figure 5 This is one of the flowchart diagrams of an interface detection method according to an exemplary embodiment;
[0104] Figure 6 is a second flow chart of an interface detection method according to an exemplary embodiment;
[0105] Figure 7 is a third flow chart of an interface detection method according to an exemplary embodiment;
[0106] Figure 8 This is a fourth flow chart of an interface detection method according to an exemplary embodiment;
[0107] Fig. 9 is a block diagram of an interface detection device according to an exemplary embodiment;
[0108] Fig.10 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0109] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the embodiments of the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present disclosure as detailed in the appended claims.
[0110] The terms used in the disclosed embodiments are only for the purpose of describing specific embodiments and are not intended to limit the disclosed embodiments. The singular forms of "a", "said" and "the" used in the disclosed embodiments and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0111] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the disclosed embodiments, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the disclosed embodiments, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0112] The interface refers to a physical interface, and the interface may be an external physical interface of an electronic device or a built-in physical interface of an electronic device.
[0113] For example, the external physical interface includes a USB interface, a type-C interface, or a Lightning interface, etc. The built-in physical interface includes a connector, an FPC interface, or a PCB interface, etc., but is not limited thereto.
[0114] The interface generally includes multiple pins, some of which can be used for insertion detection, and some of which can be used for liquid ingress detection.
[0115] like Figure 1 As shown, the harsh environment includes but is not limited to high humidity, high salinity or attached liquid environments. Compared with high humidity environments, in high salinity environments, the interface with liquid inlet is more likely to cause pin corrosion or short circuit.
[0116] Take the Type-C interface as an example. Figure 2As shown in FIG. 1 , the Type-C interface includes a ground pin (GND pin), a TX1+ pin, a TX1- pin, a VBUS pin, a SUB1 pin, a SUB2 pin, a CC1 pin, a CC2 pin, a D+ pin, a D- pin, a RX2+ pin, a RX2- pin, a TX2+ pin, and a TX2- pin, etc. The pins are marked with A1 to A12 and B1 to B12, respectively.
[0117] The D+ and D- pins are used for protocol identification during charging, differential routing in the USB protocol, and left and right channels of analog headphones. The CC1 and CC2 pins are used to detect at least the insertion direction and the type of device inserted.
[0118] The SUB pin (including the SUB1 pin and the SUB2 pin) is used for audio data transmission scenarios. For example, the SUB pin can be connected to the MIC pin in other interfaces, or the SUB pin can be connected to the AUX pin to achieve audio data transmission. Figure 3 As shown, when the SUB pin is used in an application scenario of analog headphones (audio playback), the SUB pin can be connected to the MIC pin. When the SUB pin is used in an application scenario of video playback (such as Display port mode), the SUB pin can be connected to the AUX pin.
[0119] For example, the Type-C interface of a mobile phone is an example of an electronic device. Due to pin multiplexing and the requirements for forward and reverse insertion, an audio switch is required to switch the corresponding pins in the Type-C interface to the corresponding path. Figure 4 The figure shows an example of the switching path of the SBU1 and SBU2 pins. The SBU1 and SBU2 pins can be connected to the audio codec (AudioCodec) through the MIC interface, and can communicate with the DP controller through the AUX interface, and then the corresponding functions can be correctly switched through the audio switch. The switching of the audio switch is controlled by the processor. For example, the processor communicates with the audio switch through the clock signal line (SCL) and the data signal line (SDA) to realize the switching of the audio switch.
[0120] The first aspect of the present disclosure provides an interface detection method, such as Figure 5 As shown, the method includes:
[0121] Step S110, performing insertion detection on the interface in the electronic device;
[0122] Step S120, in response to detecting that an insertion module is inserted into the interface, closing the insertion detection;
[0123] Step S130: When the insertion detection state is closed, perform a liquid inflow detection on the interface to obtain a detection result; wherein the detection result includes liquid inflow or no liquid inflow.
[0124] In the disclosed embodiment, liquid inflow detection can be used to obtain the liquid inflow status of the interface, so that when the detection result is liquid inflow, the interface can be processed in time, which helps to improve the corrosion problem of the interface in harsh environments.
[0125] Moreover, since the liquid inlet detection and insertion detection need to be detected by different pins in the interface respectively, the liquid inlet detection pin and the insertion detection pin will be charged during the detection process, and the presence of current will cause electrochemical corrosion, thereby further aggravating the pin corrosion. Therefore, the liquid inlet detection is performed when an insertion module is inserted into the interface, and the liquid inlet detection needs to be performed when the insertion detection is turned off, which reduces the scenarios where the insertion detection and liquid inlet detection exist at the same time, thereby reducing the number of charged pins, which is beneficial to reducing the risk of interface corrosion and also helps to reduce power consumption.
[0126] In step S110, whether an external module is inserted can be determined according to the level change of the pin used for insertion detection (also called insertion detection pin) in the interface.
[0127] For example: when nothing is inserted, the insertion detection pin is at a high level; if the level of the insertion detection pin is detected to be pulled low, it indicates that a module is inserted into the interface.
[0128] In some embodiments, the insertion detection is performed using a ground pin, that is, the insertion detection pin may be a ground pin of the interface.
[0129] When no device is connected, among the multiple pins of the interface, only the insertion detection pin can have a low-amplitude level, and the other pins can be unpowered. Therefore, when the liquid inlet detection is turned off, insertion detection can further reduce the possibility of pin corrosion.
[0130] In step S120, the insertion module may be an external device such as a mobile phone, a television, a tablet computer, a wearable device, a vehicle-mounted device, or may be a storage medium, an FPC, a PCB, or other components.
[0131] Turning off insertion detection means no longer performing insertion detection and terminating insertion detection.
[0132] In some embodiments, the method further includes: in response to detecting that no plug-in module is inserted into the interface, continuing the insertion detection.
[0133] In step S130, without limitation, the detection result of whether liquid is introduced or not can be determined according to the impedance change of the liquid inlet detection pin.
[0134] For example, if the impedance of the liquid inlet detection pin decreases (for example, the impedance of the liquid inlet detection pin is less than the impedance threshold), it indicates that liquid has entered the interface. Conversely, if the impedance of the liquid inlet detection pin is greater than or equal to the impedance threshold, it indicates that liquid has not entered the interface.
[0135] Performing liquid ingress detection with insertion detection turned off reduces the scenarios where insertion detection and liquid ingress detection exist at the same time, thereby reducing the number of live pins, which helps reduce the risk of interface corrosion and power consumption.
[0136] According to some optional embodiments, the performing liquid inflow detection on the interface to obtain the detection result includes:
[0137] The liquid ingress detection is performed using the audio pin of the interface to obtain the detection result; wherein the audio pin is used to transmit audio data.
[0138] Audio pins are mostly used for playing audio data. Compared with charging, the pin level in the audio data playback scenario is lower, and the impact of pin corrosion caused by harsh environment will be smaller. In addition, with the popularity of digital headphones, the frequency of use of audio pins is getting less and less, so the audio pins are used for liquid ingress detection. Using audio pins as liquid ingress detection pins is conducive to further reducing the possibility of interface corrosion.
[0139] Taking the Type-C interface as an example: the SBU1 pin and the SBU2 pin can be used as liquid inlet detection pins.
[0140] According to some optional embodiments, the step of performing the liquid inflow detection by using the audio pin of the interface to obtain the detection result includes:
[0141] Detecting the impedance of the audio pin;
[0142] The detection result is determined according to the impedance of the audio pin.
[0143] If liquid enters the interface, the impedance of the pin will be reduced. Therefore, by detecting the change in the impedance of the pin, it can be determined whether water has entered the interface.
[0144] In some embodiments, detecting the impedance of the audio pin includes:
[0145] Detecting the impedance of the audio pin at a preset time interval as a detection period;
[0146] The step of determining the detection result according to the impedance of the audio pin includes:
[0147] In response to the impedance of the audio pin being less than the impedance threshold for a number of times greater than or equal to a preset number within a unit time, determining that the detection result is liquid inflow; or,
[0148] In response to the impedance of the audio pin being less than the impedance threshold being less than a preset number of times within a unit time, it is determined that the detection result is that no liquid has entered.
[0149] By performing multiple periodic tests and setting impedance thresholds and preset times, the possibility of misjudgment of liquid inlet results can be reduced and the accuracy of detection can be improved.
[0150] Take the charging scenario of the Type-C interface as an example. During the charging process through the interface, there will be a level signal on the pins of the interface for a long time. In a humid environment, the impedance between the pins will decrease, and the current flowing through the pins will increase, causing electrochemical corrosion. In severe cases, it will cause a short circuit between the pins, reducing the service life of the interface. Figure 2 As shown, when water droplets 20 remain at both ends of the VBUS pin 11 and the CC1 pin of the Type-C interface 10, the VBUS pin 11 and the CC1 pin can be equivalent to connecting a resistor with a certain resistance value. Over time, the pins will gradually corrode, thereby causing the VBUS pin and the CC1 pin to fail in function.
[0151] According to some optional embodiments, the audio pin includes a first audio pin and a second audio pin;
[0152] The detecting the impedance of the audio pin comprises:
[0153] Detecting the impedance of the first audio pin with a first time interval as a detection period;
[0154] In response to the impedance of the first audio pin being less than the first impedance threshold a number of times greater than or equal to a first preset number within a unit time, detecting the impedance of the second audio pin with a second time interval as a detection period;
[0155] The step of determining the detection result according to the impedance of the audio pin includes:
[0156] In response to the number of times that the impedance of the second audio pin is less than a second impedance threshold within a unit time is greater than or equal to a second preset number of times, it is determined that the detection result is liquid inflow.
[0157] Determining the detection result based on the impedance of two audio pins (referring to the first audio pin and the second audio pin) can further reduce the possibility of misjudgment of liquid inflow, which is conducive to further improving the accuracy of the detection result.
[0158] The first time interval and the second time interval may be the same or different.
[0159] The first impedance threshold and the second impedance threshold may be the same or different.
[0160] The first preset number of times and the second preset number of times may be the same or different.
[0161] According to some optional embodiments, determining the detection result according to the impedance of the audio pin includes:
[0162] In response to the impedance of the first audio pin being less than the first impedance threshold being less than the first preset number of times within a unit time, determining that the detection result is that no liquid has entered; or,
[0163] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is less than the second preset number of times, it is determined that the detection result is that no liquid has entered.
[0164] In the embodiment of the present disclosure, when the impedance of the first audio pin and the impedance of the second audio pin both meet the preset conditions, the detection result is liquid ingress; if at least one of the impedance of the first audio pin and the impedance of the second audio pin does not meet the preset conditions, the detection result is no liquid ingress. The preset conditions include: the number of times that the impedance of the corresponding pin is less than the corresponding impedance threshold per unit time is greater than or equal to the corresponding impedance threshold.
[0165] According to some optional embodiments, the method further includes:
[0166] Detect notification information; wherein the notification information is used to switch an audio switch, and the audio switch is connected to the audio pin;
[0167] In response to detecting the notification information, determining a liquid inlet detection state for the interface;
[0168] In response to the liquid ingress detection being performed on the interface, the liquid ingress detection is terminated.
[0169] If the notification information is detected, it means that there is a processor in the electronic device that needs to control the audio switch switching, that is, it needs to use the audio pin to transmit audio data and use the audio function of the audio pin. At this time, terminating the liquid inlet detection can reduce the noise generated by the audio playback and effectively ensure the effect of audio playback. Among them, the processor controls the audio switch switching through I2C communication.
[0170] According to some optional embodiments, the method further includes:
[0171] In response to obtaining the detection result, detecting a connection state of the insertion module;
[0172] In response to the connection status being: the plug-in module has been unplugged from the interface, performing the insertion detection again; or,
[0173] In response to the connection status being: the plug-in module is not unplugged from the interface, the connection status of the plug-in module is detected again.
[0174] The connection status includes: the plug-in module has been unplugged from the interface, or the plug-in module has not been unplugged from the interface.
[0175] If the plug-in module is not pulled out of the interface, it indicates that the plug-in module and the interface are still connected. At this time, the connection status of the plug-in module is detected again until the plug-in module is pulled out. In this way, when a plug-in module is inserted, a liquid ingress detection is performed once. Generally, when a plug-in module is inserted in a normal environment (referring to a non-harsh environment), the pins of the interface are no longer completely exposed to the external environment. In this case, it is less likely to be affected by the harsh environment. Therefore, after detecting that a plug-in module is inserted, a liquid ingress detection is completed, which not only reduces power consumption but also saves software resources.
[0176] Without limitation, it is possible to determine whether the plug-in module is pulled out of the interface by changing the level of the pin in the interface.
[0177] According to some optional embodiments, the method further includes:
[0178] In response to obtaining the detection result, determining an application scenario of the interface;
[0179] In response to the application scenario belonging to a preset scenario, the liquid inlet detection is terminated.
[0180] After the liquid inlet detection is completed and the test results are obtained, the application scenario of the interface is determined.
[0181] The application scenarios of the interface include audio playback scenarios, charging scenarios, and OTG (On-The-Go, data exchange) scenarios, but are not limited to these.
[0182] Without limitation, the preset scenarios include scenarios for transmitting audio data, such as playing audio or playing video.
[0183] Since the audio pin is used for liquid ingress detection, when it is determined that the interface application scenario is an audio data transmission scenario, the liquid ingress detection is terminated, which can reduce the noise generated by the playback and effectively ensure the playback effect.
[0184] The application scenario can be determined in a variety of ways. For example, by detecting the notification information for switching the audio switch, it is determined whether it is a preset scenario; if the notification information is detected, it is determined that the application scenario belongs to the preset scenario.
[0185] Alternatively, based on the type of application in the foreground of the electronic device and the type of the plug-in module, if the application in the foreground is a multimedia application and the plug-in module is a headset or a speaker, etc., it is determined that the interface is in a preset scene. If the application in the foreground is not a multimedia application, or the plug-in module is not a headset or a speaker, etc., it is determined that the interface is in a non-preset scene.
[0186] According to some optional embodiments, the method further includes:
[0187] Detecting the connection status of the plug-in module;
[0188] In response to the application scenario not belonging to the preset scenario, and the connection state is: the insertion module and the interface are still in a connection state, the liquid inlet detection is performed again; or,
[0189] In response to the application scenario belonging to the preset scenario, and the connection status is: the plug-in module and the interface are still in a connection state, the application scenario of the interface is determined again.
[0190] According to some optional embodiments, the performing insertion detection on the interface includes:
[0191] In a state where a configuration channel pin is turned off, insert detection is performed on the interface; wherein the configuration channel pin is used to transmit non-audio data;
[0192] In response to detecting that a connection device is plugged into the interface, the configuration channel pin is turned on.
[0193] Turning off a pin means turning off the toggle signal (high or low level signal) of the corresponding pin.
[0194] The configuration channel pins are not used as insertion detection pins. Turning off the configuration channel pins before insertion detection helps to reduce the number of live pins and further reduce the risk of interface corrosion and short circuit.
[0195] Taking the Type-C interface as an example, the channel pins are configured as CC pins (including CC1 pin and CC2 pin).
[0196] According to some optional embodiments, performing insertion detection on the interface in a state where the configuration channel pin is turned off includes:
[0197] When the configuration channel pin is closed, the insertion detection is performed on the interface using a preset pin; wherein the voltage of the preset pin in the working state is lower than the voltage of the configuration channel pin in the working state.
[0198] Generally, the greater the voltage of the pin, the higher the level, the faster the pin corrodes, and the more likely the pin will corrode and short circuit. Therefore, using a preset pin with a lower voltage for insertion detection can further reduce the possibility of pin corrosion.
[0199] For example, a pulse signal with amplitude overlap may be used to perform the insertion detection on the interface.
[0200] Without limitation, the preset pin is a ground pin.
[0201] According to some optional embodiments, the method further includes:
[0202] In response to the detection result being liquid ingress, a liquid ingress warning is issued.
[0203] The liquid inlet warning can inform users of liquid inlet information in a timely manner so that users can deal with the liquid inlet problem in time, improving the user experience.
[0204] Without limitation, the liquid inlet warning may be a text message displayed on a display screen of the electronic device, or may be a sound message.
[0205] According to some optional embodiments, the performing insertion detection on the interface in the electronic device includes:
[0206] The insertion detection is performed on the interface in the electronic device with a third time interval as a detection period.
[0207] Periodically testing the interface for insertion, rather than continuously testing it, reduces the time the pins are energized, greatly reducing corrosion issues caused by standby conditions.
[0208] A second aspect of the present disclosure provides an interface, wherein the interface includes:
[0209] substrate;
[0210] An insertion detection pin, wherein the interface detection method described in any embodiment of the first aspect performs insertion detection through the insertion detection pin;
[0211] A liquid inlet detection pin, wherein the interface detection method described in any embodiment of the first aspect performs liquid inlet detection through the liquid inlet detection pin;
[0212] The insertion detection pin and the liquid inlet pin are respectively located at different positions of the substrate.
[0213] The substrate is used for carrying a plurality of pins including an insertion detection pin and a liquid inlet detection pin.
[0214] According to some optional embodiments, the insertion detection pin includes: a non-configuration channel pin; and / or the liquid inlet detection pin includes: an audio pin for transmitting audio data.
[0215] Without limitation, non-configuration channel pins include ground pins.
[0216] In one example, if Figure 6 As shown, the electronic device is a mobile phone, and the interface is a Type-C interface. After the power-on initialization, the interface detection method includes:
[0217] Step S210, disabling the liquid inlet detection function, turning off the CC toggle (i.e. turning off the configuration channel pin), and enabling CID (i.e. turning on the insertion detection);
[0218] Step S220, waiting for CID interruption, detecting whether there is an inserted device inserted, that is, waiting for an inserted device to be connected to the Type-C interface;
[0219] Step S230: If no device is detected to be inserted, repeat step S220. If a device is detected to be inserted, turn on the CC toggle, detect the type of the inserted device, and turn off the CID;
[0220] Step S240, start impedance detection on the SBU2 pin;
[0221] Step S250, recording the number of times the impedance of the SBU2 pin is lower than a threshold value (a first impedance threshold value);
[0222] Step S260, determining whether the number of SBU2 pin impedance detections is greater than 5 times (i.e., a first preset number of times); if less than 5 times, returning to step S240; if greater than or equal to 5 times, proceeding to step S270;
[0223] Step S270, start impedance detection on the SBU1 pin;
[0224] Step S280, recording the number of times the impedance of the SBU1 pin is lower than a threshold (a second impedance threshold, and the second impedance threshold is equal to the first impedance threshold);
[0225] Step S290, determining whether the number of SBU1 pin impedance detections is greater than 5 times (a second preset number of times), if less than 5 times, returning to step S270, if greater than or equal to 5 times, entering step S300;
[0226] Step S300, determine whether all the impedances detected by the SBU1 or SBU2 pins are lower than the threshold (i.e., low resistance), and the number of times the impedance is lower than the threshold is greater than or equal to 5 times. If yes, proceed to step S320 after step S310; if not, directly jump to step S320;
[0227] Step S310, printing the liquid inlet warning information;
[0228] Step S320, wait for the plug-in device to be unplugged; if the plug-in device is unplugged, return to step S210; if the plug-in device is not unplugged, repeat step S320.
[0229] If during the detection process, the processor needs to control the audio switch to switch the SBU1 or SBU2 signal path, it can simultaneously control the audio switch to terminate the impedance detection process, thereby reducing the problem of simultaneous multiplexing of the SBU1 and SBU2 pins due to liquid ingress detection. After unplugging the plugged device, the process also returns to step S210 to continue the insertion detection.
[0230] like Figure 7 As shown, the interface detection method also includes:
[0231] Step S330: If during the liquid inflow detection process, it is detected that the processor determines to notify the audio switch (AudioSW) to switch the switch, the process proceeds to step S360;
[0232] Step S340, closing the liquid inlet detection;
[0233] Step S350: End
[0234] The interface detection method of this example is applicable to the solution strategy for the problems such as corrosion between interface pins caused by harsh environments (such as moisture, oil, foreign matter, etc.) that may be encountered by external physical interfaces (such as Type-C) of mobile devices such as mobile phones. Moreover, the technical solution of this example can effectively be compatible with all application scenarios and reduce the increase in hardware costs while effectively reducing the probability of corrosion between pins caused by harsh environments; the technical solution of this example not only takes up less software resources, but also reduces the power consumption of detection as much as possible. By adding a liquid inlet prompt function, the user experience is effectively improved.
[0235] In another example, if Figure 8 As shown, the electronic device is a mobile phone, and the interface is a Type-C interface. After the power-on initialization, the interface detection method includes:
[0236] Step S410, enter the insertion detection and liquid ingress detection process; in this example, when no device is inserted into the Type-C interface, only pulse insertion detection can be enabled to reduce the probability of corrosion; when an insertion device is inserted, the insertion detection is turned off and liquid ingress detection is enabled at the same time, which can detect the liquid ingress of the Type-C interface itself and the liquid ingress caused by the access of the insertion device.
[0237] Step S410, turn off the toggle (high and low level signals) of the CC pin of Type-C, enable insertion detection, and turn off liquid inlet detection;
[0238] Step S420, waiting for the insertion detection interruption, detecting whether there is an insertion device inserted into the interface; if no insertion device is detected, repeating step S420; if insertion of an insertion device is detected, executing step S430;
[0239] Step S430, turn on CC toggle, turn off insertion detection, and the CC pin is used to detect the insertion direction;
[0240] Step S440, enabling the liquid inlet detection function of the SBU2 pin of the Type-C;
[0241] Step S450, determining whether the SBU2 pin has a low resistance and detects liquid inflow;
[0242] Step S460: If liquid is detected through the SBU2 pin, the liquid inlet detection function of SBU1 is continued to be turned on; if liquid is not detected through the SBU2 pin, step S500 is executed;
[0243] Step S470, detecting whether SBU1 has low resistance and detects liquid inflow;
[0244] Step S480: If SBU1 has low resistance and detects liquid inflow, print liquid inflow warning information;
[0245] Step S490: If the SBU1 does not have low resistance and no liquid inflow is detected, turn off the liquid inflow detection function of the SBU1;
[0246] Step S500, detect whether the working scenario (application scenario) after the inserted device is inserted into the interface is a charging scenario or an OTG scenario (non-preset scenario). In these two scenarios, the SBU pin will not be used, so the liquid inlet detection can still be turned on after the access device is working.
[0247] Step S510: If it is not a charging scenario or an OTG scenario, turn off the liquid inlet detection, and then execute step S520;
[0248] Step S520, determining whether the inserted device is unplugged; if the inserted device is not unplugged, continuing to repeat step S500; if the inserted device is unplugged, executing step S410;
[0249] Step S530: If it is a charging or OTG scenario, detect whether the device is unplugged;
[0250] Step S540: If the inserted device is not unplugged, return to step S440 to perform the liquid inlet detection process; if the inserted device is unplugged, execute step S410.
[0251] Regardless of the working scenario, once the device is detected to be unplugged, the system will re-enter the insertion detection process after power-on, turn off the CC toggle, enable insertion detection, and turn off liquid inlet detection.
[0252] The third aspect of the present disclosure provides an interface detection device 600, such as Fig. 9 As shown, the device comprises:
[0253] A first detection module 610, configured to perform insertion detection on the interface in the electronic device;
[0254] A processing module 620 is configured to disable the insertion detection in response to detecting that an insertion module is inserted into the interface;
[0255] The second detection module 630 is used to perform a liquid inflow detection on the interface to obtain a detection result when the insertion detection is turned off; wherein the detection result includes liquid inflow or no liquid inflow.
[0256] According to some optional embodiments, the second detection module is further used to:
[0257] The liquid ingress detection is performed using the audio pin of the interface to obtain the detection result; wherein the audio pin is used to transmit audio data.
[0258] According to some optional embodiments, the second detection module is further used to:
[0259] Detecting the impedance of the audio pin;
[0260] The detection result is determined according to the impedance of the audio pin.
[0261] According to some optional embodiments, the audio pin includes a first audio pin and a second audio pin;
[0262] The second detection module is further used to: detect the impedance of the first audio pin with a first time interval as a detection period;
[0263] In response to the impedance of the first audio pin being less than the first impedance threshold a number of times greater than or equal to a first preset number within a unit time, detecting the impedance of the second audio pin with a second time interval as a detection period;
[0264] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is greater than or equal to a second preset number of times, it is determined that the detection result is liquid inflow.
[0265] According to some optional embodiments, the second detection module is further used to:
[0266] In response to the impedance of the first audio pin being less than the first impedance threshold being less than the first preset number of times within a unit time, determining that the detection result is that no liquid has entered; or,
[0267] In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is less than the second preset number of times, it is determined that the detection result is that no liquid has entered.
[0268] According to some optional embodiments, the device further includes:
[0269] A third detection module, used to detect notification information; wherein the notification information is used to switch an audio switch, and the audio switch is connected to the audio pin;
[0270] A first determination module, configured to determine a liquid inlet detection state for the interface in response to detecting the notification information;
[0271] The first termination module is configured to terminate the liquid inlet detection in response to the liquid inlet detection being performed on the interface.
[0272] According to some optional embodiments, the device further includes:
[0273] a fourth detection module, configured to detect a connection state of the insertion module in response to obtaining the detection result;
[0274] a fifth detection module, configured to, in response to the connection state being: the plug-in module has been unplugged from the interface, perform the insertion detection again; or,
[0275] The sixth detection module is configured to detect the connection status of the plug-in module again in response to the connection status being: the plug-in module is not unplugged from the interface.
[0276] According to some optional embodiments, the device further includes:
[0277] A second determination module, configured to determine an application scenario of the interface in response to obtaining the detection result;
[0278] The second termination module is used to terminate the liquid inlet detection in response to the application scenario belonging to a preset scenario.
[0279] According to some optional embodiments, the device further includes:
[0280] a seventh detection module, used to detect the connection status of the insertion module;
[0281] an eighth detection module, configured to, in response to the application scenario not belonging to the preset scenario and the connection state being: the insertion module and the interface are still in a connection state, perform the liquid inlet detection again; or,
[0282] The third determination module is used to determine the application scenario of the interface again in response to the application scenario belonging to the preset scenario and the connection state is: the insertion module and the interface are still in a connection state.
[0283] According to some optional embodiments, the first detection module is further used to:
[0284] In a state where a configuration channel pin is turned off, insert detection is performed on the interface; wherein the configuration channel pin is used to transmit non-audio data;
[0285] In response to detecting that a connection device is plugged into the interface, the configuration channel pin is turned on.
[0286] According to some optional embodiments, the first detection module is further used to:
[0287] When the configuration channel pin is closed, the insertion detection is performed on the interface using a preset pin; wherein the voltage of the preset pin in the working state is lower than the voltage of the configuration channel pin in the working state.
[0288] According to some optional embodiments, the device further includes:
[0289] The warning module is used for issuing a liquid inflow warning in response to the detection result that liquid inflow occurs.
[0290] According to some optional embodiments, the first detection module is further used to:
[0291] The insertion detection is performed on the interface in the electronic device with a third time interval as a detection period.
[0292] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0293] a memory for storing processor-executable instructions;
[0294] A processor connected to the memory;
[0295] Wherein, the processor is configured to execute the method as described in the embodiment of the first aspect.
[0296] According to a fifth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a computer, the computer is enabled to execute the method described in the embodiment of the first aspect.
[0297] Fig.108 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0298] Reference Fig.10 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0299] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0300] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0301] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0302] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0303] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0304] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0305] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0306] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0307] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0308] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0309] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0310] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An interface detection method, It is characterized in that The method comprises: Performing insertion detection on the interface in the electronic device; In response to detecting that an insertion module is inserted into the interface, shutting down the insertion detection; When the insertion detection state is closed, the interface is subjected to a liquid inflow detection to obtain a detection result; wherein the detection result includes liquid inflow or no liquid inflow.
2. The method according to claim 1, It is characterized in that The performing liquid inflow detection on the interface to obtain the detection result includes: The liquid ingress detection is performed using the audio pin of the interface to obtain the detection result; wherein the audio pin is used to transmit audio data.
3. The method according to claim 2, It is characterized in that The step of performing the liquid inflow detection by using the audio pin of the interface to obtain the detection result includes: Detecting the impedance of the audio pin; The detection result is determined according to the impedance of the audio pin.
4. The method according to claim 3, It is characterized in that The audio pins include a first audio pin and a second audio pin; The detecting the impedance of the audio pin comprises: Detecting the impedance of the first audio pin with a first time interval as a detection period; In response to the impedance of the first audio pin being less than the first impedance threshold a number of times greater than or equal to a first preset number within a unit time, detecting the impedance of the second audio pin with a second time interval as a detection period; The step of determining the detection result according to the impedance of the audio pin includes: In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is greater than or equal to a second preset number of times, it is determined that the detection result is liquid inflow.
5. The method according to claim 4, It is characterized in that The step of determining the detection result according to the impedance of the audio pin includes: In response to the impedance of the first audio pin being less than the first impedance threshold being less than the first preset number of times within a unit time, determining that the detection result is that no liquid has entered; or, In response to the number of times that the impedance of the second audio pin is less than the second impedance threshold within a unit time is less than the second preset number of times, it is determined that the detection result is that no liquid has entered.
6. The method according to claim 2, It is characterized in that The method further comprises: Detect notification information; wherein the notification information is used to switch an audio switch, and the audio switch is connected to the audio pin; In response to detecting the notification information, determining a liquid inlet detection state for the interface; In response to the liquid ingress detection being performed on the interface, the liquid ingress detection is terminated.
7. The method according to claim 1, It is characterized in that The method further comprises: In response to obtaining the detection result, detecting a connection state of the insertion module; In response to the connection status being: the plug-in module has been unplugged from the interface, performing the insertion detection again; or, In response to the connection status being: the plug-in module is not unplugged from the interface, the connection status of the plug-in module is detected again.
8. The method according to claim 2, It is characterized in that The method further comprises: In response to obtaining the detection result, determining an application scenario of the interface; In response to the application scenario belonging to a preset scenario, the liquid inlet detection is terminated.
9. The method according to claim 1, It is characterized in that The performing insertion detection on the interface includes: In a state where the configuration channel pin is closed, performing insertion detection on the interface; In response to detecting that a connection device is plugged into the interface, the configuration channel pin is turned on.
10. The method according to claim 9, It is characterized in that The step of performing insertion detection on the interface in a state where the configuration channel pin is closed includes: When the configuration channel pin is closed, the insertion detection is performed on the interface using a preset pin; wherein the voltage of the preset pin in the working state is lower than the voltage of the configuration channel pin in the working state.
11. The method according to claim 1, It is characterized in that The insert detection of the interface in the electronic device includes: The insertion detection is performed on the interface in the electronic device with a third time interval as a detection period.
12. An interface, It is characterized in that The interface includes: substrate; An insertion detection pin, wherein the interface detection method according to any one of claims 1 to 11 performs insertion detection by means of the insertion detection pin; A liquid inlet detection pin, wherein the interface detection method according to any one of claims 1 to 11 performs liquid inlet detection through the liquid inlet detection pin; The insertion detection pin and the liquid inlet pin are respectively located at different positions of the substrate.
13. The interface according to claim 12, It is characterized in that The insertion detection pins include: non-configuration channel pins; and / or, The liquid inlet detection pin includes: an audio pin for transmitting audio data.
14. An interface detection device, It is characterized in that The device comprises: A first detection module, used for performing insertion detection on the interface in the electronic device; A processing module, configured to close the insertion detection in response to detecting that an insertion module is inserted into the interface; The second detection module is used to perform liquid inflow detection on the interface to obtain a detection result when the insertion detection is turned off; wherein the detection result includes liquid inflow or no liquid inflow.
15. An electronic device, It is characterized in that include: a memory for storing processor-executable instructions; A processor connected to the memory; The processor is configured to execute the method as claimed in any one of claims 1 to 11.
16. A non-transitory computer-readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of a computer, the computer is enabled to perform the method according to any one of claims 1 to 11.
