Electrochemical discharge machining (ECDM) is an effective technique for machining hard and brittle insulating materials due to its characteristics that the occurrence of electrochemical discharging is independent of the electrical conductivity of the workpiece. In ECDM, the machining performance is significantly influenced by the real-time machining state. However, the real-time machining state still cannot be effectively detected and fed back until now. To improve the performance of ECDM and establish a useful closed-loop control strategy, it is essential to find a new signal that characterizes the machining state. Electrolyte supply is critical for ECDM and can be used as a closed-loop control factor. In this paper, a novel method for detecting the electrolyte supply state in the machining zone based on current signals was proposed. To achieve the method, a R-BiLSTM-A (ResNet-BiLSTM-Attention) model was designed for electrolyte supply state detection. The designed model was demonstrated to perform better than the other general artificial intelligence models. The relationship between the contact force and the electrolyte supply state detection results was investigated. It was found that the electrolyte supply state was insufficient when the tool-workpiece contact occurred. This state was successfully detected by the model, which verified the effectiveness of the designed model. The proposed model was then applied to detect the electrolyte supply state under different machining conditions. The tool electrode feed rate and electrode retreat parameters were optimized based on the detection results of the proposed model. The hole depths were improved by 126.50 % and 301.69 % with optimized machining parameters at the voltage of 39 V and 43 V, respectively.