A method for controlling liquid ingress detection, applied to an electronic device, wherein the electronic device comprises a Type-C interface, a liquid ingress detection circuit, a device recognition circuit, and a screen, the liquid ingress detection circuit is configured to perform liquid ingress detection in the Type-C interface by applying a voltage to first data pins of the Type-C interface, and the device recognition circuit is configured to recognize a device connected to the Type-C interface on the condition that voltages are applied to the first data pins; and the method comprises: controlling the liquid ingress detection circuit to start the liquid ingress detection in the Type-C interface; stopping applying a voltage to the first data pins when a detection result of the liquid ingress detection is that liquid ingress occurs in the Type-C interface, and obtaining a first parameter of the screen of the electronic device; when the first parameter of the screen is a screen-off state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after a first duration; and when the first parameter of the screen is a screen-on state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after second duration; and the first duration being greater than the second duration. the electronic device comprises a Type-C interface, a liquid ingress detection circuit, a device recognition circuit, and a screen, the liquid ingress detection circuit is configured to perform liquid ingress detection in the Type-C interface by applying a voltage to first data pins of the Type-C interface, and the device recognition circuit is configured to recognize a device connected to the Type-C interface on the condition that voltages are applied to the first data pins; and the method comprises: controlling the liquid ingress detection circuit to start the liquid ingress detection in the Type-C interface; stopping applying a voltage to the first data pins when a detection result of the liquid ingress detection is that liquid ingress occurs in the Type-C interface, and obtaining a first parameter of the screen of the electronic device; when the first parameter of the screen is a screen-off state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after a first duration; and when the first parameter of the screen is a screen-on state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after second duration; and the first duration being greater than the second duration. controlling the liquid ingress detection circuit to start the liquid ingress detection in the Type-C interface; stopping applying a voltage to the first data pins when a detection result of the liquid ingress detection is that liquid ingress occurs in the Type-C interface, and obtaining a first parameter of the screen of the electronic device; when the first parameter of the screen is a screen-off state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after a first duration; and when the first parameter of the screen is a screen-on state, controlling the liquid ingress detection circuit to start next liquid ingress detection in the Type-C interface after second duration; and the first duration being greater than the second duration.