This study aims to establish the optimization of ultrasound-assisted extraction for active compounds from Salvia deserta Schang flowers. The effect of ultrasonic time, ratio of liquid to material, ethanol concentration, and ultrasonic power on the extraction efficiency of total polyphenols and three phenolic compounds (e.g., rosmarinic acid, caffeic acid, and protocatechuic acid was investigated. Response surface methodology (RSM) and deep neural network (DNN) model was performed to find out the optimum extraction conditions to maximize the output using a comprehensive evaluation score in parallel. Compared with the DNN model, the optimal working conditions of the extraction procedures based on the RSM model achieves the maximum yield of active components in S. deserta Schang flowers while requiring a shorter extraction time, lower energy consumption, and greater cost effectiveness. The optimal extraction process for the active components of S. deserta Schang flowers was determined as follows: 39 min of ultrasonic time, 1:37 (g/mL) ratio of liquid to material, 55% ethanol concentration, and 200 W of ultrasonic power. Additionally, S. deserta Schang flowers exhibited promising antioxidative activity, which was verified through several in vitro antioxidant trials, including DPPH, ABTS, ·OH, and phosphomolybdate method, suggesting their remarkable antioxidant capacity. This findings contribute effective, sustainable and valuable insights into the ultrasonic-assisted extraction of valuable compounds from S. deserta Schang flower, and the more biological activity of compounds from S. deserta Schang flower remains to be further investigated.