Safety valves in gas distribution systems are crucial for preventing excessive pressure buildups. Leakage in these valves compromises system stability, causing equipment damage and environmental pollution. Acoustic emission signal analysis from the valve body is essential for detecting leakage, but these signals are often weak and easily disrupted by noise, complicating detection. This paper proposes a multi-domain encoding learning algorithm to address these challenges. Unlike conventional single-domain methods, it combines two encoding images, the Gramian angular difference field and the Markov transition field, to enhance the comprehensive expression of leakage features. A lightweight convolutional neural network reduces computing resource dependency, and a convolutional block attention mechanism improves feature identification. Experimental results demonstrate that our method detects gas leakage with an accuracy of at least 96.77%. It maintains superior performance even under intense noise interference, offering a promising solution for detecting weak gas leakages in safety valves amidst high background noise.