The electrolyzer was equipped with three layers of Nafion
902 cation exchange membrane, the cation exchange membrane divides the electrolyzer into a cathode chamber and an anode chamber, and PtO2 is used as the anode and graphite is used as the cathode, and an aqueous solution of ethylene glycol with a concentration of 8 mol/L is added to the anode chamber of the electrolyzer as an anode electrolyte, and 10 g of N-methyltetralin and 8.7 g of n-butanol are added to the anode chamber. A mixed aqueous solution of acetonitrile containing 5 wt% of KBr was added to the cathode chamber of the electrolyzer as the cathode electrolyte. Turn on the power supply, electrolyze at a constant current under the conditions of electrolysis temperature of 50 and current density of 3A/dm2 for 2 h. After completing the electrolysis, take out the cathode electrolyte, extract with 100 ml of xylene to get the extract, then wash with 100 ml of water, 50 ml of saturated aqueous sodium bicarbonate solution, 100 ml of water in turn, dry with anhydrous sodium sulfate, and concentrate, to get the 1-butyl-1-methylpyridinium bromide ionic liquid. Chloroalkonium ionic liquid.