CN-122024759-A - Noise monitoring method, electronic device and storage medium
Abstract
The application belongs to the technical field of computers, and provides a noise monitoring method, electronic equipment and a storage medium. The method comprises the steps of obtaining noise data in a first time period, determining a spectrogram corresponding to the noise data in the first time period, obtaining source information corresponding to the noise data in the first time period through a first preset model according to the spectrogram corresponding to the noise data, determining an early warning threshold according to the source information, predicting the noise data in the first time period through a second preset model to obtain noise intensity in a second time period, and triggering early warning if the noise intensity in the second time period is larger than or equal to the early warning threshold after the noise intensity in the second time period is in the first time period. The method can trigger the noise alarm in time, and avoid the influence of noise on the user.
Inventors
- ZHOU YUKAI
- GUO JINBIN
Assignees
- 鸿海精密工业股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241111
Claims (10)
- 1. A method of noise monitoring, the method comprising: acquiring noise data of a first time period; determining a spectrogram corresponding to the noise data in the first time period; obtaining source information corresponding to the noise data in the first time period through a first preset model according to a spectrogram corresponding to the noise data; determining an early warning threshold according to the source information; Predicting the noise data of the first time period through a second preset model to obtain the noise intensity of a second time period, wherein the second time period is after the first time period; and if the noise intensity of the second time period is greater than or equal to the early warning threshold value, triggering early warning.
- 2. The noise monitoring method of claim 1, further comprising: Acquiring audio data of a plurality of areas; Carrying out descriptive statistics on the audio data of the plurality of areas to obtain audio features corresponding to each area; and determining a target area based on the audio characteristics corresponding to each area, and taking the audio data of the target area as the noise data of the first time period.
- 3. The noise monitoring method of claim 1, wherein prior to determining a spectrogram corresponding to the noise data for the first time period, the method further comprises: and preprocessing the noise data in the first time period to obtain preprocessed noise data.
- 4. The method of claim 3, wherein preprocessing the noise data for the first period of time to obtain preprocessed noise data comprises: cleaning the noise data in the first time period to obtain cleaned noise data; and carrying out normalization processing on the cleaned noise data to obtain the noise data after pretreatment.
- 5. The noise monitoring method according to claim 2, wherein the determining a spectrogram corresponding to the noise data of the first period of time includes: weighting noise data in the first time period based on a window function to obtain noise characteristics; performing Fourier transform on the noise characteristics to obtain frequency spectrum data, wherein the frequency spectrum data comprises amplitude information of the noise characteristics on preset frequency; And obtaining a spectrogram based on the preset frequency and amplitude information corresponding to the preset frequency.
- 6. The method for monitoring noise according to claim 1, wherein the first preset model includes an encoding layer and an output layer, and the obtaining, according to the spectrogram corresponding to the noise data, source information corresponding to the noise data in the first period through the first preset model includes: Coding a spectrogram corresponding to the noise data based on the coding layer to obtain a first feature vector, and coding a spectrogram from a preset source to obtain a second feature vector; And calculating the similarity of the first feature vector and the second feature vector based on the output layer, and determining a preset source corresponding to a spectrogram with the highest similarity as the source information.
- 7. The noise monitoring method of claim 1, wherein determining an early warning threshold based on the source information comprises: And determining the early warning threshold value based on a preset condition and the source information.
- 8. The noise monitoring method according to claim 1, wherein the second preset model includes an embedding layer and a prediction layer, and the predicting the noise data in the first period by the second preset model to obtain the noise intensity in the second period includes: Obtaining time series data based on the noise data of the first time period and the noise data of a third time period, wherein the third time period is before the first time period; Encoding the time sequence data by utilizing the embedded layer to obtain an encoding vector; And obtaining the noise intensity of the second time period by utilizing the prediction layer according to the coding vector.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the noise monitoring method according to any one of claims 1 to 8 when executing the computer program.
- 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the noise monitoring method according to any of claims 1 to 8.
Description
Noise monitoring method, electronic device and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a noise monitoring method, an electronic device, and a storage medium. Background With the acceleration of the urban process, noise pollution problems such as traffic noise, construction noise and industrial enterprise noise are increasingly prominent. Noise pollution not only affects people's daily life and work, but also may cause injury to people's physical and mental health. Therefore, how to accurately monitor noise is a problem to be solved. In the existing noise monitoring scheme, whether to trigger a noise alarm is further judged generally based on the monitored noise data, and is limited by the transient characteristics of the noise data, so that the existing noise monitoring mode cannot trigger the alarm in time, and a user cannot take corresponding measures in time to deal with the alarm, so that user experience is not facilitated. Disclosure of Invention The application provides a noise monitoring method, electronic equipment and a storage medium, which are used for solving the technical problem that a noise alarm cannot be triggered in time. The first aspect of the embodiment of the application provides a noise monitoring method, which comprises the steps of obtaining noise data in a first time period, determining a spectrogram corresponding to the noise data in the first time period, obtaining source information corresponding to the noise data in the first time period through a first preset model according to the spectrogram corresponding to the noise data, determining an early warning threshold according to the source information, predicting the noise data in the first time period through a second preset model to obtain the noise intensity in a second time period, and triggering early warning if the noise intensity in the second time period is larger than or equal to the early warning threshold after the first time period. In some embodiments, before acquiring the noise data of the first time period, the method further comprises acquiring audio data of a plurality of areas, performing descriptive statistics on the audio data of the plurality of areas to obtain audio features corresponding to each area, determining a target area based on the audio features corresponding to each area, and taking the audio data of the target area as the noise data of the first time period. In some embodiments, before determining the spectrogram corresponding to the noise data in the first time period, the method further includes preprocessing the noise data in the first time period to obtain preprocessed noise data. In some embodiments, the preprocessing the noise data in the first period of time to obtain preprocessed noise data includes cleaning the noise data in the first period of time to obtain cleaned noise data, and normalizing the cleaned noise data to obtain preprocessed noise data. In some embodiments, determining the spectrogram corresponding to the noise data in the first time period includes weighting the noise data in the first time period based on a window function to obtain a noise feature, performing fourier transform on the noise feature to obtain spectral data, wherein the spectral data includes amplitude information of the noise feature on a preset frequency, and obtaining the spectrogram based on the preset frequency and the amplitude information corresponding to the preset frequency. In some embodiments, the first preset model includes a coding layer and an output layer, and the obtaining source information corresponding to the noise data in the first period through the first preset model includes obtaining a first feature vector by coding the spectrogram corresponding to the noise data based on the coding layer, obtaining a second feature vector by coding the spectrogram of a preset source, calculating similarity between the first feature vector and the second feature vector based on the output layer, and determining a preset source corresponding to the spectrogram with the highest similarity as the source information. In some embodiments, the determining the pre-warning threshold according to the source information includes determining the pre-warning threshold based on a preset condition and the source information. In some embodiments, the second preset model includes an embedding layer and a prediction layer, and the predicting the noise data in the first time period by the second preset model obtains the noise intensity in the second time period, including obtaining time series data based on the noise data in the first time period and the noise data in a third time period, where the third time period is before the first time period, encoding the time series data by using the embedding layer to obtain an encoding vector, and obtaining the noise intensity in the second time period by using the prediction layer according