The invention discloses an environment self-adaptive ultrasonic gas leakage detection method based on a self-
encoder. The method comprises the following steps of: 1, acquiring a sound
signal, and collecting environmental
background noise when no gas leaks under a normal working condition; 2, carrying out fixed-length segmentation
processing on the sound signals, and extracting logarithmic Mel spectrum features; step 3, establishing a convolutional auto-
encoder neural
network model; step 4, extracting embedded representation vectors of all normal samples in the
training set by using the auto-
encoder model trained in the step 3 to form a normal sample feature
library, then training an anomaly
detector, and determining an optimal
detection threshold according to anomaly
score values of all the normal samples in the
verification set; and 5, when the environment changes, updating the normal sample feature
library and the abnormal sample feature
library by using newly accumulated sound data, retraining the abnormal
detector and updating the
detection threshold. According to the method, the problems of scarcity of leaked data, high acquisition cost and poor environmental adaptability in a real scene are effectively solved.