Frog chirp recognition method based on spatial orientation, medium and system
Through the spatial orientation-based frog sound recognition method, the microphone array and sound source positioning algorithm are used, combined with separation filtering and pattern recognition technology, the accuracy of frog sound recognition in complex environments is solved, and high accuracy and Comprehensive ecological monitoring.
Patent Information
- Application Number
- CN202411600237.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art is difficult to accurately identify frog sounds in complex environments, and cannot effectively utilize spatial information, which limits the accuracy and comprehensiveness of monitoring results.
Using the spatial orientation-based frog sound recognition method, audio signals are collected through microphone arrays, sound source positioning algorithms are used to analyze spatial orientation information, and signals are separated by frog sound separation filter equations, acoustic features are extracted, and a support vector machine is used. Classifier and Gaussian mixed model database are used for identification.
It improves the accuracy of frog sound recognition, can identify newly discovered frog species, achieve comprehensive ecological monitoring, and improves monitoring automation and continuity.
Smart Images

Figure CN119446155A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of frog call recognition, and in particular, relates to a frog call recognition method, medium and system based on spatial orientation. Background Art
[0002] In recent years, with the increasing attention paid to ecological and environmental protection, the monitoring and protection of wild animal populations has received widespread attention. Among them, frogs are important indicator species, and their population dynamics and call characteristics are closely related to the environmental changes in their habitats. Through the automatic monitoring and analysis of frog calls, the local frog population status can be grasped in a timely manner, providing an important basis for ecological and environmental assessment and protection management.
[0003] At present, frog call monitoring technology mainly includes two methods: manual observation and automated monitoring. Manual observation requires professionals to stay in the wild for a long time to observe and record the calls of frogs, which has limitations and discontinuities. Automated monitoring usually uses a single microphone or microphone array, combined with digital signal processing technology to analyze and identify the collected frog call audio signals. This method can achieve continuous automatic monitoring, but it is easily interfered by noise in complex environments and has a low recognition accuracy. In addition, most of the existing automated monitoring methods can only identify known frog species, and lack effective identification methods for newly discovered or unrecorded frog species.
[0004] On the other hand, the spatial distribution characteristics of frogs are also an important basis for studying their population dynamics and conservation status. However, existing frog call monitoring technologies rarely consider the spatial information of frog calls and only analyze and identify them from a single sound source perspective, which to a certain extent limits the accuracy and comprehensiveness of the monitoring results.
[0005] Therefore, how to accurately identify frog calls in complex environments and use spatial information to improve the reliability of monitoring has become a key issue that needs to be urgently addressed in current frog ecological monitoring technology. Summary of the invention
[0006] In view of this, the present invention provides a method, medium and system for identifying frog calls based on spatial orientation, which can solve the technical problem that the prior art is difficult to accurately identify frog calls in complex environments.
[0007] The present invention is achieved in that:
[0008] A first aspect of the present invention provides a method for identifying frog calls based on spatial orientation, comprising the following steps:
[0009] S10, collecting frog sound audio signals using a microphone array;
[0010] S20, performing spatial orientation analysis on the collected audio signal based on a sound source localization algorithm to determine the positions of sound sources in different orientations;
[0011] S30, according to the sound source orientation information, using a pre-fitted frog call separation filter equation group to separate the frog calls from different orientations;
[0012] S40, performing time-frequency analysis on the separated single-direction frog calls to extract acoustic features, including fundamental frequency, harmonic structure, duration, frequency modulation, and amplitude envelope;
[0013] S50, constructing a feature classification function, combining the spatial orientation information and the acoustic features, and performing preliminary classification on the separated frog sounds;
[0014] S60, establishing a frog sound database, including typical call characteristics of known frog species;
[0015] S70, matching the classified frog sounds with features in a database to identify specific frog species;
[0016] S80, performing confidence evaluation on the recognition result. If the confidence is lower than a threshold, the sample is marked as “unknown” and added to the data set for further analysis.
[0017] S90. Regularly update the frog sound database and feature classification functions to adapt to new frog species and environmental changes and improve recognition accuracy.
[0018] On the basis of the above technical solution, the frog sound recognition method based on spatial orientation of the present invention can also be improved as follows:
[0019] Among them, the frog call separation filter equation group includes a time domain filter equation, a frequency domain filter equation, a spatial filter equation, a phase correction equation and a noise suppression equation.
[0020] Furthermore, the time domain filtering equation is used to perform time domain filtering on the original audio signal to eliminate high frequency noise and low frequency background sound;
[0021] The frequency domain filtering equation is used to separate frog sounds of different frequency bands in the frequency domain;
[0022] The spatial filtering equation is used to enhance the sound signal in the target direction according to the sound source orientation information;
[0023] The phase correction equation is used to correct the phase difference caused by the geometric layout of the microphone array;
[0024] The noise suppression equation is used to further suppress environmental noise and improve the signal-to-noise ratio of frog sounds.
[0025] Furthermore, the steps of performing spatial orientation analysis on the collected audio signal based on the sound source localization algorithm are as follows:
[0026] 1. Time delay estimation: The time delay between different microphone pairs is calculated using the generalized cross-correlation function (GCC):
[0027]
[0028] In the formula, R GCC (τ) is the generalized cross-correlation function; X1(f) and X2(f) are the Fourier transforms of the two microphone signals; ψ GCC (f) is the weighting function; τ is the time delay. By analyzing the time delay difference between different microphone pairs, the spatial orientation information of the sound source relative to the microphone array can be obtained.
[0029] 2. Hyperbolic positioning: Based on the time delay difference, a hyperbolic equation is constructed to determine the location of the sound source:
[0030]
[0031] Where x and y are the coordinates of the sound source; a and b are the hyperbola parameters, which are determined by the microphone position and time delay. Multiple hyperbolas formed by multiple microphone pairs can accurately locate the sound source through geometric relationships.
[0032] 3. Least squares estimation: Using the hyperbola formed by multiple microphone pairs, the sound source position is estimated by the least squares method:
[0033]
[0034] In the formula, is the estimated sound source position parameter; i is the observed value; f(x i ; θ) is the hyperbolic model function; N is the number of microphone pairs.
[0035] Through the above three sub-steps, the spatial orientation information of frog calls can be effectively determined based on the collected audio signals, providing an important basis for subsequent frog call separation and identification.
[0036] Furthermore, the formula of each equation in the frog call separation filter equation group is expressed as follows:
[0037] 1. Time domain filtering equation:
[0038]
[0039] Where y(t) is the filtered signal; x(t) is the input signal; h(k) is the filter coefficient; M is the filter order; ε t is the time domain filtering error.
[0040] The h(k) coefficient is obtained by minimizing the mean square error to remove high-frequency noise and low-frequency background sound:
[0041]
[0042] Where d(t) is the desired output signal.
[0043] 2. Frequency domain filtering equation:
[0044] Y(f)=H(f)X(f)+N(f);
[0045] Where Y(f) is the filtered spectrum; X(f) is the spectrum of the input signal; H(f) is the frequency domain filter transfer function; and N(f) is the frequency domain noise.
[0046] H(f) can be designed through the Wiener filter to separate frog sounds in different frequency bands:
[0047]
[0048] Among them, S xx (f) is the signal power spectrum density; S nn (f) is the noise power spectral density.
[0049] 3. Spatial filtering equation:
[0050]
[0051] Where y(t) is the spatial filtering output; x m (t) is the signal of the mth microphone; w m is the complex weight; M is the number of microphones; η(t) is the spatial filtering error.
[0052] Weight w m Obtained by maximizing the output signal-to-noise ratio to enhance the sound signal in the target direction:
[0053]
[0054] Among them, R s is the target signal covariance matrix; R n is the noise covariance matrix.
[0055] 4. Phase correction equation:
[0056] φ corrected (f) = v measured (f)-2πfτ delay +ε φ ;
[0057] In the formula, φcorrected (f) is the phase after correction; φ measured (f) is the measured phase; f is the frequency; τ delay is the time delay; ε φ is the phase correction error.
[0058] τ delay The geometric relationship of the microphone array is used to correct the phase difference caused by the array layout:
[0059]
[0060] Among them, r m is the mth microphone position; r s is the sound source position; r0 is the reference microphone position; c is the sound speed.
[0061] 5. Noise suppression equation:
[0062] S enhanced (f,t)=G(f,t)S noisy (f,t);
[0063] In the formula, S enhanced (f, t) is the enhanced time-frequency spectrum; S noisy (f, t) is the time-frequency spectrum containing noise; G(f, t) is the gain function.
[0064] G(f,t) is calculated using spectral subtraction to further suppress environmental noise and improve the signal-to-noise ratio of frog sounds:
[0065]
[0066] Where |N(f,t)| 2 is the estimated noise power spectrum; α is the over-reduction factor; β is the spectrum lower limit.
[0067] The parameters in these equations are obtained as follows:
[0068] h(k) coefficient: obtained by iterative optimization based on actual frog sounds and environmental noise samples through an adaptive algorithm (such as the LMS algorithm).
[0069] S xx (f) and S nn (f) Short-time Fourier transform is used to estimate the power spectrum of pre-collected pure frog sounds and environmental noise samples.
[0070] R s and R n : Estimate the signal covariance matrix in the target direction and non-target direction through multiple sampling.
[0071] r mand r0: obtained by accurately measuring the geometric layout of the microphone array.
[0072] α and β: The optimal values are determined by analyzing multiple frog sound samples and combining auditory perception experiments.
[0073] The above five sub-steps constitute the frog croak separation filter equation group, which can effectively separate the frog croaks from different directions from the original audio signal, laying the foundation for subsequent feature extraction and frog species identification.
[0074] Step S40 is used to perform time-frequency analysis on the separated single-direction frog calls to extract acoustic features. This includes the following sub-steps:
[0075] 1. Fundamental frequency extraction: Use autocorrelation function or cepstrum analysis to estimate the fundamental frequency f0 of frog calls. The fundamental frequency is the main feature of frog calls and reflects the basic frequency of the frog vocal cord vibration.
[0076] 2. Harmonic structure analysis: Through Fourier transform or linear prediction coding, the harmonic characteristics of frog sounds are analyzed and the harmonic structure parameter H is extracted. The harmonic structure reflects the excitation mechanism and vocal tract characteristics of frog sound sources.
[0077] 3. Duration estimation: Count the duration of frog calls and obtain the duration feature T. The duration of calls of different frog species often varies.
[0078] 4. Frequency modulation analysis: Calculate the degree of change of frog sound frequency over time and extract the frequency modulation index FM. Frequency modulation is an important feature of frog sound production.
[0079] 5. Amplitude envelope analysis: Extract the change of frog sound amplitude over time and obtain the amplitude envelope parameter A. The amplitude envelope reflects the dynamic characteristics of sound source excitation and vocal channel filtering.
[0080] The above five sub-steps can effectively extract rich acoustic features from the separated frog sound signals, which will provide a strong basis for subsequent frog species identification.
[0081] Furthermore, a feature classification function is constructed to combine the spatial orientation information and acoustic features to perform preliminary classification on the separated frog sounds. The feature classification function adopts a support vector machine (SVM) model, and its decision function is as follows:
[0082]
[0083] In the formula, f(x) is the classification result; x is the input feature vector; x i is the support vector; y i is the category label; α iis the Lagrange multiplier; b is the bias term; K(·,·) is the kernel function.
[0084] The kernel function uses radial basis function (RBF):
[0085] K(x i ,x)=exp(-γ||x i -x|| 2 );
[0086] Where γ is the kernel function parameter, which is determined by cross-validation.
[0087] The eigenvector x contains the following components:
[0088] 1. Spatial orientation information: [θ, φ], where θ is the azimuth angle and φ is the elevation angle;
[0089] 2. Acoustic characteristics: [f0, H, T, FM, A], where f0 is the fundamental frequency, H is the harmonic structure parameter, T is the duration, FM is the frequency modulation index, and A is the amplitude envelope parameter.
[0090] By training the SVM model, the separated frog sounds can be preliminarily classified according to the feature vector, providing valuable information for subsequent accurate identification. i and b can be obtained by solving the dual problem of SVM using the Sequential Minimal Optimization (SMO) algorithm.
[0091] Furthermore, in the step of establishing a frog sound database including typical call features of known frog species, the features of each frog species in the database are represented as a Gaussian mixture model (GMM):
[0092]
[0093] Where p(x|λ) is the probability density function of feature x; λ represents the GMM parameter set; M is the number of Gaussian components; w i is the weight of the i-th component; g(x|μ i ,∑ i ) is a multivariate Gaussian distribution, μ i and∑ i are the mean vector and covariance matrix respectively.
[0094] The calculation formula of Gaussian component is as follows:
[0095]
[0096] Where D is the dimension of the feature vector.
[0097] The GMM parameters are estimated by the expectation maximization (EM) algorithm, and the iterative formula is as follows:
[0098] Step E:
[0099] M-step:
[0100]
[0101] In the formula, T is the number of training samples; γ i (t) is the posterior probability. Through iterative optimization of the EM algorithm, the GMM parameter λ_s of each known frog species can be obtained and stored in the database.
[0102] Furthermore, the classified frog sounds are matched with the features in the database to identify the specific frog species, and maximum likelihood estimation is used for frog species identification:
[0103]
[0104] In the formula, is the recognition result; X={x1,…,x T} is the characteristic sequence of the frog sound to be identified; s is the GMM parameter of the sth frog species.
[0105] The calculation formula for log-likelihood is as follows:
[0106]
[0107] To avoid numerical underflow, the logarithmic sum exponential (LSE) technique is used in the actual calculation:
[0108]
[0109] Among them, LSE i (a i )=log∑ i exp(a i ).
[0110] By maximizing the log-likelihood, we can get the frog species label that is most likely to correspond to the frog sound to be identified. Complete the frog species identification process.
[0111] Furthermore, in the step of evaluating the confidence of the recognition result, the confidence evaluation adopts the log-likelihood ratio (LLR) method:
[0112]
[0113] In the formula, is the GMM parameter corresponding to the recognition result; UBMare the GMM parameters of the universal background model (UBM).
[0114] The UBM is obtained by merging the GMMs of all known frog species:
[0115]
[0116] Where S is the number of known frog species.
[0117] The decision rules are as follows:
[0118] If LLR < θ, the sample is marked as “unknown”;
[0119] Otherwise, accept the recognition result
[0120] Among them, θ is the preset threshold, which is determined by analyzing the recognition error rate of known frog species.
[0121] For samples marked as "unknown", their feature vector X and corresponding audio data are added to the dataset to be analyzed. middle:
[0122] These "unknown" samples can be further used for analysis and improvement to enhance the performance of the entire frog species identification system.
[0123] The parameters in these calculation steps are obtained as follows:
[0124] 1. Alpha i and b: obtained by solving the dual problem of SVM using the sequential minimal optimization (SMO) algorithm.
[0125] γ: Determine the optimal value using grid search and cross validation.
[0126] 3.w i , μ i and∑ i : It is calculated iteratively through the EM algorithm, and the initial value uses the K-means clustering result.
[0127] 4. Lambda UBM : First, the training data of all known frog species are merged, and then the EM algorithm is used to estimate the UBM parameters.
[0128] 5.θ: By analyzing the recognition error rate and unknown sample rejection rate on the validation set, the balance point is selected as the threshold.
[0129] The specific steps of step S90 are to regularly update the frog sound database and feature classification functions to adapt to new frog species and environmental changes and improve recognition accuracy.
[0130] For database update, new frog sound samples can be collected periodically and the GMM parameter λ can be re-estimated using the EM algorithm. s This way, the database can be continuously expanded to cover more frog species.
[0131] For updating the classification function, the SVM model can be retrained using newly collected samples to optimize the feature vector x and kernel function parameter γ. This allows the classifier to be adaptively adjusted to adapt to new frog sound characteristics and environmental changes.
[0132] In addition, "unknown" samples can be manually identified regularly and the results can be fed back to the database and classifier to further improve the performance of the entire recognition system.
[0133] Through the specific implementation of the above steps S10 to S90, a frog call recognition system based on spatial orientation can be constructed. The system can collect frog call signals using a microphone array, extract the acoustic characteristics of a single frog species through sound source localization and filtering separation technology, and accurately identify frog species by combining SVM classifier and GMM database. At the same time, the system also has an adaptive update mechanism, which can continuously improve the recognition accuracy as new samples continue to accumulate and adapt to complex and changing environmental conditions. In short, this frog call recognition method based on spatial information provides an effective and reliable solution for ecological monitoring and protection.
[0134] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned method for identifying frog calls based on spatial orientation.
[0135] A third aspect of the present invention provides a frog call recognition system based on spatial orientation, which includes the above-mentioned computer-readable storage medium.
[0136] Compared with the prior art, the method, medium and system for identifying frog calls based on spatial orientation provided by the present invention have the following beneficial effects:
[0137] In response to the problems raised in the background technology, the present invention proposes a method, medium and system for identifying frog calls based on spatial orientation, which uses a microphone array to collect frog calls in the environment, analyzes the spatial orientation information of the sound signal through a sound source localization algorithm, and combines it with the acoustic characteristics of the frog calls to construct a high-precision frog species identification model. Compared with the prior art, the present invention has the following advantages:
[0138] 1. Improved the accuracy of frog call recognition. By using the spatial information collected by multi-channel microphones, frog calls from different directions can be effectively separated and more accurate acoustic features can be extracted, thus greatly improving the reliability of frog species identification.
[0139] 2. The recognition range is expanded, and newly discovered frog species can be recognized. The method of the present invention adopts a database update mechanism, which can adaptively absorb new frog call samples and continuously expand the recognition database, thereby overcoming the limitation of the prior art that it can only recognize known frog species.
[0140] 3. Comprehensive ecological monitoring is achieved. Using spatial positioning information, the method of the present invention can accurately describe the distribution of frogs in the habitat, providing a more comprehensive basis for ecological environment assessment and protection management.
[0141] 4. Improved the automation and continuity of monitoring. Based on the automated microphone array acquisition and signal processing technology, this method can achieve continuous and stable frog croaking monitoring, greatly improving the efficiency and reliability of monitoring work.
[0142] In summary, the frog call recognition method based on spatial orientation proposed in the present invention makes full use of the spatial information of multi-channel sound signals, and through advanced sound source localization, signal separation and pattern recognition technology, realizes high-accuracy, adaptability and comprehensive frog ecological monitoring, and solves the technical problem that the existing technology is difficult to accurately identify frog calls in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0143] Figure 1 A flow chart of the method provided by the present invention;
[0144] Figure 2 The vertical angle distribution diagram of the frog sound in the embodiment;
[0145] Figure 3 The horizontal angle distribution diagram of the frog sound in the embodiment;
[0146] Figure 4 A comparison diagram of the original signal and the filtered signal in the embodiment;
[0147] Figure 5 This is a comparison chart of the recognition performance of different methods without providing the signal-to-noise ratio. DETAILED DESCRIPTION
[0148] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0149] like Figure 1FIG. 1 is a flow chart of a method for identifying frog calls based on spatial orientation provided by the present invention. The method comprises the following steps:
[0150] S10, collecting frog sound audio signals using a microphone array;
[0151] S20, performing spatial orientation analysis on the collected audio signal based on a sound source localization algorithm to determine the positions of sound sources in different orientations;
[0152] S30, according to the sound source orientation information, using a pre-fitted frog call separation filter equation group to separate the frog calls from different orientations;
[0153] S40, performing time-frequency analysis on the separated single-direction frog calls to extract acoustic features, including fundamental frequency, harmonic structure, duration, frequency modulation, and amplitude envelope;
[0154] S50, constructing a feature classification function, combining the spatial orientation information and the acoustic features, and performing preliminary classification on the separated frog sounds;
[0155] S60, establishing a frog sound database, including typical call characteristics of known frog species;
[0156] S70, matching the classified frog sounds with features in a database to identify specific frog species;
[0157] S80, performing confidence evaluation on the recognition result. If the confidence is lower than a threshold, the sample is marked as “unknown” and added to the data set for further analysis.
[0158] S90. Regularly update the frog sound database and feature classification functions to adapt to new frog species and environmental changes and improve recognition accuracy.
[0159] The specific implementation methods of the above steps are described in detail below:
[0160] The specific implementation method of step S10 is to collect frog sound audio signals using a microphone array. First, it is necessary to use multiple microphones to form an array and reasonably deploy them in the frog habitat to be monitored. These microphones collect the frog sound signals in the environment and convert them into electrical signals. In order to improve the accuracy and robustness of sound source positioning, M microphones are usually selected to form an array. During the collection process, it is also necessary to pay attention to the geometric arrangement of the array and the sensitivity and frequency response characteristics of each microphone.
[0161] The collected original audio signal can be expressed as x(t)=[x1(t),x2(t),…,x M (t)] T , where x m(t) is the sound signal collected by the mth microphone at time t. In order to obtain high-quality original audio signals, low-noise professional recording equipment can be used. The acquisition system should also have sufficient data storage and processing capabilities to cope with a large amount of frog sound sampling data.
[0162] The specific implementation of step S20 is to perform spatial orientation analysis on the collected audio signal based on the sound source localization algorithm. This involves the following sub-steps:
[0163] 1. Time delay estimation: The time delay between different microphone pairs is calculated using the generalized cross-correlation function (GCC). The calculation formula of the GCC function is:
[0164]
[0165] Among them, R GCC (τ) is the generalized cross-correlation function; X1(f) and X2(f) are the Fourier transforms of the two microphone signals; ψ GCC (f) is the weighting function; τ is the time delay. By analyzing the time delay difference τ between different microphone pairs ij , the spatial orientation information of the sound source relative to the microphone array can be obtained.
[0166] 2. Hyperbolic positioning: Based on the time delay difference, a hyperbolic equation is constructed to determine the location of the sound source:
[0167]
[0168] Where x and y are the coordinates of the sound source on the two-dimensional plane; (x i ,y i ) is the position of the i-th microphone; a i and b i The time delay τ ij The hyperbola parameters are determined. Multiple hyperbolas formed by multiple microphone pairs can accurately locate the sound source through geometric relationships.
[0169] 3. Least squares estimation: Using the hyperbolic equation formed by multiple microphone pairs, the coordinates of the sound source position are estimated by the least squares method:
[0170]
[0171] in, is the estimated sound source position parameter; i is the observed value (time delay); f(x i ; θ) is the hyperbolic model function; N is the number of microphone pairs.
[0172] Through the above three sub-steps, the spatial orientation information of frog sounds can be effectively determined based on the collected audio signals. in is the azimuth, These spatial orientation information will provide important basis for the subsequent separation and recognition of frog calls.
[0173] The specific implementation of step S30 is to separate frog sounds from different directions using a pre-fitted frog sound separation filter equation group according to the sound source orientation information. This involves the following sub-steps:
[0174] 1. Time domain filtering equation:
[0175]
[0176] Among them, y(t) is the filtered signal; x(t) is the input signal; h(k) is the filter coefficient; M is the filter order; ε t is the time domain filtering error. The filter coefficient h(k) can be optimized by minimizing the mean square error to eliminate high-frequency noise and low-frequency background sound:
[0177] minE[(d(t)-y(t)) 2 ];
[0178] Where d(t) is the expected output signal.
[0179] 2. Frequency domain filtering equation:
[0180] Y(f)=H(f)X(f)+N(f);
[0181] Among them, Y(f) is the spectrum after filtering; X(f) is the spectrum of the input signal; H(f) is the frequency domain filter transfer function; N(f) is the frequency domain noise. H(f) can be designed using a Wiener filter to separate frog sounds in different frequency bands:
[0182]
[0183] Among them, S xx (f) is the signal power spectrum density; S nn (f) is the noise power spectral density.
[0184] 3. Spatial filtering equation:
[0185]
[0186] Among them, y(t) is the spatial filtering output; x m (t) is the signal of the mth microphone; w mis the complex weight; M is the number of microphones; η(t) is the spatial filtering error. Weight w m This can be optimized by maximizing the output signal-to-noise ratio:
[0187]
[0188] Among them, R s is the target signal covariance matrix; R n is the noise covariance matrix.
[0189] 4. Phase correction equation:
[0190] φ corrected (f) = φ measured (f)-2πfτ delay +ε φ ;
[0191] Among them, φ corrected (f) is the phase after correction; φ measured (f) is the measured phase; f is the frequency; τ delay is the time delay; ε φ is the phase correction error. τ delay It can be calculated based on the geometric relationship of the microphone array:
[0192]
[0193] Among them, r m is the mth microphone position; r s is the sound source position; r0 is the reference microphone position; c is the sound speed.
[0194] 5. Noise suppression equation:
[0195] S enhanced (f,t)=G(f,t)S noisy (f,t);
[0196] Among them, S enhanced (f, t) is the enhanced time-frequency spectrum; S noisy (f, t) is the time-frequency spectrum containing noise; G(f, t) is the gain function. G(f, t) can be calculated by spectral subtraction:
[0197]
[0198] Where, |N(f,t)| 2 is the estimated noise power spectrum; α is the over-reduction factor; β is the spectrum lower limit.
[0199] The above five sub-steps constitute the frog call separation filter equation group, which can effectively separate the frog calls of different directions from the original audio signal x(t). The frog sound y(t) lays the foundation for subsequent feature extraction and frog species identification.
[0200] The specific implementation of step S40 is to perform time-frequency analysis on the separated single-direction frog calls to extract acoustic features. This includes the following sub-steps:
[0201] 1. Fundamental frequency extraction: Use the autocorrelation function or cepstrum analysis method to estimate the fundamental frequency f0 of frog calls. The fundamental frequency is the main feature of frog calls and reflects the basic frequency of frog vocal cord vibration. The calculation formula of the autocorrelation function is:
[0202]
[0203] By analyzing R xx The maximum value of (τ) corresponds to the time delay τ0, and the fundamental frequency can be obtained
[0204] 2. Harmonic structure analysis: By performing Fourier transform on the frog sound signal y(t), analyzing its spectrum Y(f), the harmonic structure parameter H is extracted. The spectrum Y(f) can be expressed as:
[0205]
[0206] Among them, A k and φ k are the amplitude and phase of the kth harmonic respectively; K is the number of harmonics. The harmonic structure parameter H can be obtained by the harmonic amplitude A k and phase φ k to characterize the statistical characteristics of .
[0207] 3. Duration estimation: Count the duration of frog calls y(t) and obtain the duration feature T. The duration of calls of different frog species often varies.
[0208] 4. Frequency modulation analysis: Calculate the degree of change of frog sound frequency f(t) over time and extract the frequency modulation index FM. Frequency modulation is an important feature of frog sound production and can be expressed as:
[0209]
[0210] 5. Amplitude envelope analysis: Extract the change of the amplitude A(t) of the frog sound y(t) over time and obtain the amplitude envelope parameter A. The amplitude envelope reflects the dynamic characteristics of the sound source excitation and the vocal tract filtering, and can be calculated by Hilbert transform:
[0211]
[0212] in, is the Hilbert transform operator.
[0213] The above five sub-steps can effectively extract rich acoustic features x = [f0, H, T, FM, A] from the separated frog sound signal y(t). These features will provide a strong basis for subsequent frog species identification.
[0214] The specific implementation method of step S50 is to construct a feature classification function, combining spatial orientation information And acoustic features x, the separated frog sounds are preliminarily classified. Here, Support Vector Machine (SVM) is used as the classifier, and its decision function is:
[0215]
[0216] Among them, f(x) is the classification result; x is the input feature vector; x i is the support vector; y i is the category label; α i is the Lagrange multiplier; b is the bias term; K(·,·) is the kernel function.
[0217] The kernel function uses the radial basis function (RBF):
[0218] K(x i ,x)=exp(-γ||x i -x|| 2 );
[0219] Among them, γ is the kernel function parameter, and the optimal value is determined by cross-validation.
[0220] The eigenvector x contains the following components:
[0221] 1. Spatial orientation information:
[0222] 2. Acoustic characteristics: x = [f0, H, T, FM, A].
[0223] By training the SVM model, the separated frog sounds can be preliminarily classified according to these features, providing valuable information for subsequent accurate identification. i and b can be obtained by solving the dual problem of SVM using the Sequential Minimal Optimization (SMO) algorithm.
[0224] The specific implementation of step S60 is to establish a frog sound database, which contains the typical call characteristics of known frog species. Here, a Gaussian mixture model (GMM) is used to represent the characteristic distribution of each frog species:
[0225]
[0226] Where p(x|λ) is the probability density function of feature x; λ represents the GMM parameter set; M is the number of Gaussian components; w i is the weight of the i-th component; g(x|μ i ,∑ i ) is a multivariate Gaussian distribution, μ i and∑ i are the mean vector and covariance matrix respectively.
[0227] The calculation formula of Gaussian component is as follows:
[0228]
[0229] Where D is the dimension of the feature vector x.
[0230] GMM parameter w i , μ i and∑ i It can be estimated by the expectation-maximization (EM) algorithm, and the initial value can be the result of K-means clustering. The iterative formula of the EM algorithm is as follows:
[0231] Step E:
[0232] Step M:
[0233]
[0234] Where, T is the number of training samples; γ i (t) is the posterior probability of the i-th Gaussian component at time t.
[0235] Through iterative optimization of the EM algorithm, the GMM parameter λ of each known frog species can be obtained. s , and store it in the database to provide a basis for subsequent frog species identification.
[0236] The specific implementation method of step S70 is to match the classified frog sounds with the features in the database to identify the specific frog species. Here, the maximum likelihood estimation method is used for frog species identification:
[0237]
[0238] in, is the recognition result; X={x1,…,x T} is the characteristic sequence of the frog sound to be identified; s is the GMM parameter of the sth frog species.
[0239] The calculation formula of log-likelihood is as follows:
[0240]
[0241] To avoid numerical underflow, the Logarithmic Sum of Exponential (LSE) technique is used in actual calculations:
[0242]
[0243] Among them, LSE i (a i )=log∑ i exp(a i ).
[0244] By maximizing the log-likelihood, we can get the frog species label that is most likely to correspond to the frog sound to be identified. Complete the frog species identification process.
[0245] The specific implementation method of step S80 is to evaluate the confidence of the recognition result. If the confidence is lower than the threshold, the sample is marked as "unknown" and added to the data set for further analysis. The log-likelihood ratio (LLR) method is used here for confidence evaluation:
[0246]
[0247] in, is the GMM parameter corresponding to the recognition result; UBM are the GMM parameters of the Universal Background Model (UBM).
[0248] The UBM is obtained by merging the GMMs of all known frog species:
[0249]
[0250] Where S is the number of known frog species.
[0251] The decision rules are as follows:
[0252] If LLR<θ, the sample is marked as “unknown”;
[0253] Otherwise, accept the recognition result
[0254] Among them, θ is the preset threshold, which is usually around -2.5 and can be adjusted according to actual conditions.
[0255] For samples marked as "unknown", their feature vector X and corresponding audio data are added to the dataset to be analyzed. middle:
[0256]
[0257] These "unknown" samples can be further used for analysis and improvement to enhance the performance of the entire frog species identification system.
[0258] The specific implementation method of step S90 is to regularly update the frog sound database and feature classification function to adapt to new frog species and environmental changes and improve recognition accuracy.
[0259] For database update, new frog sound samples can be collected periodically and the GMM parameter λ can be re-estimated using the EM algorithm. s The update formula is as follows:
[0260] Step E:
[0261] Step M:
[0262]
[0263] Among them, T is the number of newly collected samples. In this way, the database can be continuously expanded to cover more frog species.
[0264] For updating the classification function, the SVM model can be retrained using newly collected samples to optimize the feature vector x and kernel function parameter γ. This allows the classifier to be adaptively adjusted to adapt to new frog sound characteristics and environmental changes.
[0265] In addition, "unknown" samples can be periodically Perform manual identification and feed the results back to the database and classifier to further improve the performance of the entire recognition system.
[0266] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are run in a computer, they are used to execute the above-mentioned method for identifying frog calls based on spatial orientation.
[0267] A third aspect of the present invention provides a frog call recognition system based on spatial orientation, which includes the above-mentioned computer-readable storage medium.
[0268] Specifically, the principle of the present invention is:
[0269] First, the frog sounds in the environment are collected by deploying a microphone array in the frog habitat to obtain multi-channel original audio signals. This multi-channel collection method can provide richer spatial information than a single microphone, laying the foundation for subsequent sound source localization and signal separation.
[0270] Secondly, the sound source localization algorithm is used to analyze the collected multi-channel audio signals to determine the azimuth and pitch angle of the frog's croaking in space. Here, technical means such as time delay estimation, hyperbolic localization and least squares estimation are used to effectively extract the spatial position information of the frog's croaking. This spatial orientation information provides important prior knowledge for subsequent frog species identification.
[0271] Next, based on the spatial orientation information of the frog sounds, the original audio signal is separated and processed using a pre-designed filter equation group. This filter equation group includes multiple sub-modules such as time domain filtering, frequency domain filtering, spatial filtering, phase correction and noise suppression, which can effectively extract the frog sounds of a single orientation from the mixed signal. This separation technology ensures the accuracy of subsequent feature extraction and recognition.
[0272] Then, the acoustic features including fundamental frequency, harmonic structure, duration, frequency modulation and amplitude envelope were extracted from the separated single-direction frog call signals. These features not only reflect the sound source characteristics of frog calls, but are also closely related to the physiological mechanisms and behavioral habits of frog species.
[0273] Next, the extracted acoustic features and spatial orientation information are combined into feature vectors and input into the support vector machine (SVM) classifier for preliminary classification. SVM is a supervised machine learning algorithm that can effectively use classification boundaries in high-dimensional feature space to identify frog species.
[0274] Finally, the classification results are matched with the pre-established frog sound database, and the maximum likelihood estimation method is used to determine the frog species to be identified. The database contains the typical call characteristics of known frog species, which are modeled using a Gaussian mixture model (GMM). By maximizing the log-likelihood, the frog species label that is most likely to correspond to the frog call to be identified can be obtained.
[0275] At the same time, the method of the present invention also designs a set of adaptive update mechanisms, which can regularly expand the database and optimize the classifier to adapt to new frog species and environmental changes. This self-learning ability greatly improves the applicability and reliability of the system.
[0276] In general, the method of the present invention makes full use of the spatial information of multi-channel sound signals, and realizes high-accuracy recognition of frog calls in complex environments through a series of signal processing technologies such as sound source localization, filtering separation, feature extraction and pattern recognition. This method based on spatial information not only improves the overall performance of monitoring, but also provides more comprehensive and reliable data support for frog ecological protection.
[0277] In order to better understand and implement the present invention, an embodiment of a specific application scenario of the present invention is provided below: In order to timely grasp the dynamic changes in the frog population in a wetland park, a department uses the frog call recognition method based on spatial orientation proposed in the present invention to conduct long-term monitoring.
[0278] First, the department's investigators deployed an 8-channel microphone array in the wetland park. The geometric layout of the array is shown in Table 1. The sensitivity and frequency response characteristic parameters of each microphone are shown in Table 2. These microphones collect and convert frog sound signals in the environment into electrical signals, and save them to the server through a digital acquisition system.
[0279] Table 1 Microphone array geometric layout parameters
[0280] Microphone Number Horizontal coordinate X(m) Vertical coordinate Y(m) Height Z(m) 1 0 0 1.5 2 3 0 1.5 3 0 3 1.5 4 3 3 1.5 5 1.5 1.5 1.5 6 4.5 1.5 1.5 7 1.5 4.5 1.5 8 4.5 4.5 1.5
[0281] Table 2 Microphone performance parameters
[0282] Microphone Number Sensitivity (mV / Pa) Frequency response range(Hz) 1 50 20-20000 2 48 20-20000 3 52 20-20000 4 49 20-20000 5 51 20-20000 6 47 20-20000 7 53 20-20000 8 50 20-20000
[0283] During the one-month monitoring process, the system collected about 300,000 frog croaking audio samples. Using the sound source localization algorithm described in step S20, these collected data can be spatially analyzed to obtain the angular distribution of frog croaking in the horizontal and vertical directions, such as Figure 2 and Figure 3 As shown in the figure, it can be seen that most of the frog calls are concentrated in the horizontal azimuth angle θ between 30° and 60°, and the vertical azimuth angle φ between 20° and 50°. This shows that the main activity area of frogs in the wetland park is located near the southeast corner of the microphone array.
[0284] Based on these spatial orientation information, the frog call separation filter equation group described in step S30 is then used to process the collected original audio signal. First, the time domain filter equation is used to remove high-frequency noise and low-frequency background sound:
[0285]
[0286] Among them, M = 128, h(j) coefficient is obtained by minimizing the mean square error. After time domain filtering, the signal-to-noise ratio is improved from the original 10dB to 15dB.
[0287] Next, use the frequency domain filtering equation to separate the frog sounds in different frequency bands on the spectrum:
[0288] Y(f)=H(f)X(f)+N(f);
[0289] Among them, the design of H(f) uses a Wiener filter, which can effectively separate the frequency band between 300Hz and 3kHz. This step can remove most of the environmental noise and improve the clarity of the frog's call.
[0290] Then, according to the spatial orientation information obtained in step S20, Use the spatial filtering equation to enhance the sound signal in the target direction:
[0291]
[0292] Among them, w m The calculation of is optimized by maximizing the output signal-to-noise ratio. This step can effectively separate the frog sounds from a single direction from the multi-channel signal.
[0293] Finally, the separated frog sounds are further processed using the phase correction equation and the noise suppression equation to further improve the signal quality:
[0294] φ corrected (f) = φ measured (f)-2πfτ delay +ε φ ;
[0295] S enhanced (f,t)=G(f,t)S noisy (f,t);
[0296] Through the above five steps of filtering, frog sounds from different directions can be effectively separated from the original audio signal, such as Figure 4 As shown in the figure, after filtering, the signal-to-noise ratio of the target frog sound is significantly improved, and the noise component is well suppressed.
[0297] Next, the separated frog call signals were subjected to time-frequency analysis to extract acoustic features including fundamental frequency, harmonic structure, duration, frequency modulation, and amplitude envelope. These features reflect the sound source characteristics and individual behavioral characteristics of frog calls, providing a basis for subsequent frog species identification.
[0298] Taking the typical call of a certain frog species as an example, its acoustic characteristics are shown in Table 3.
[0299] Table 3 Acoustic characteristics of some frog calls
[0300] feature Value <![CDATA[Fundamental frequency f0]]> 800Hz Harmonic structure H 3.2 Duration T 1.5s Frequency Modulation FM 0.4 Amplitude Envelope A 0.8
[0301] Combine these acoustic features with the spatial orientation information obtained from step S20 The feature vector x is combined and input into the SVM classifier described in step S50 for preliminary classification. The kernel function of SVM adopts RBF kernel, γ=0.1. After training and cross-validation, the classification accuracy of the SVM model reaches 85%.
[0302] Next, the SVM classification result is matched with the frog sound database established in step S60, and the frog species to be identified is determined by the maximum likelihood estimation method. The database contains the GMM model parameters of 8 known frog species, λ s ,s=1,2,…,8. By comparing the log-likelihood values of the frog sounds to be identified, the most likely corresponding frog species label can be obtained.
[0303] In order to verify the performance of the method of the present invention, its recognition results are compared with the method using ordinary filters. Ordinary filters only use time domain filtering and frequency domain filtering, and do not use spatial orientation information for separation. Figure 5 The comparison of the recognition accuracy of the two methods on the test set is given. As can be seen from the figure, the method of the present invention is significantly better than the ordinary filter under various signal-to-noise ratio conditions, especially when the signal-to-noise ratio is low. This is mainly due to the fact that the method of the present invention can make full use of the spatial information of multi-channel sound signals, effectively separate the frog sounds in a single direction, and thus extract more accurate acoustic features.
[0304] During the one-month monitoring process, the method of the invention identified a total of 5 known frog species, namely: pond frog, black-necked snake, marsh frog, rain frog, and black-spotted frog; these identification results are basically consistent with the frog population situation observed by field experts. At the same time, the system also marked about 10% of the frog call samples as "unknown" and added them to the data set for further analysis. These "unknown" samples may belong to newly discovered frog species, or some variant calls made by known frog species in special environments.
[0305] In order to continuously improve the recognition accuracy, the system will regularly update the database and classifier. First, regularly collect new frog sound samples and use the EM algorithm to re-estimate the GMM parameter λ s , to expand the coverage of the database. At the same time, the SVM model will be retrained using newly collected samples to optimize the feature vector x and kernel function parameter γ to adapt to environmental changes. In addition, "unknown" samples will be manually identified regularly, and the results will be fed back to the database and classifier to further improve the performance of the entire recognition system.
[0306] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for identifying frog calls based on spatial orientation, characterized in that: The following steps are involved: S10, collecting frog sound audio signals using a microphone array; S20, performing spatial orientation analysis on the collected audio signal based on a sound source localization algorithm to determine the positions of sound sources in different orientations; S30, according to the sound source orientation information, using a pre-fitted frog call separation filter equation group to separate the frog calls from different orientations; S40, performing time-frequency analysis on the separated single-direction frog calls to extract acoustic features, including fundamental frequency, harmonic structure, duration, frequency modulation, and amplitude envelope; S50, constructing a feature classification function, combining the spatial orientation information and the acoustic features, and performing preliminary classification on the separated frog sounds; S60, establishing a frog sound database, including typical call characteristics of known frog species; S70, matching the classified frog sounds with features in a database to identify specific frog species; S80, performing confidence evaluation on the recognition result. If the confidence is lower than a threshold, the sample is marked as "unknown" and added to the data set for further analysis; S90. Regularly update the frog sound database and feature classification functions to adapt to new frog species and environmental changes and improve recognition accuracy.
2. A method for identifying frog calls based on spatial orientation according to claim 1, characterized in that: The frog call separation filter equation group includes a time domain filter equation, a frequency domain filter equation, a space filter equation, a phase correction equation and a noise suppression equation.
3. A method for identifying frog calls based on spatial orientation according to claim 2, characterized in that: The time domain filtering equation is used to perform time domain filtering on the original audio signal to eliminate high frequency noise and low frequency background sound; The frequency domain filtering equation is used to separate frog sounds of different frequency bands in the frequency domain; The spatial filtering equation is used to enhance the sound signal in the target direction according to the sound source orientation information; The phase correction equation is used to correct the phase difference caused by the geometric layout of the microphone array; The noise suppression equation is used to further suppress environmental noise and improve the signal-to-noise ratio of frog sounds.
4. A method for identifying frog calls based on spatial orientation according to claim 3, characterized in that: The time domain filtering equation is specifically expressed as follows: Where y(t) is the filtered signal; x(t) is the input signal; h(k) is the filter coefficient; M is the filter order; ε t is the time domain filtering error, and t is the time variable.
5. A method for identifying frog calls based on spatial orientation according to claim 4, characterized in that: The frequency domain filtering equation is specifically expressed as follows: Y(f)=H(f)X(f)+N(f); Where Y(f) is the filtered spectrum; X(f) is the spectrum of the input signal; H(F) is the frequency domain filter transfer function; and N(f) is the frequency domain noise.
6. A method for identifying frog sounds based on spatial orientation according to claim 5, characterized in that: The spatial filtering equation is specifically expressed as follows: Where y(t) is the spatial filtering output; x m (t) is the signal collected by the mth microphone; w m is the complex weight; M is the number of microphones; η(t) is the spatial filtering error.
7. The method for identifying frog sounds based on spatial orientation according to claim 6, characterized in that: The phase correction equation is specifically expressed as follows: f corrected (f)=φ measured (f)-2πfτ delay +e φ ; In the formula, φ corrected (f) is the phase after correction; φ measured (f) is the measured phase; f is the frequency; τ delay is the time delay; ε φ is the phase correction error.
8. The method for identifying frog sounds based on spatial orientation according to claim 7, characterized in that: The noise suppression equation is specifically expressed as follows: S enhanced (f,t)=G(F,t)S noisy (f,t); In the formula, S enhanced (f, t) is the enhanced time-frequency spectrum; S noisy (f, t) is the time-frequency spectrum containing noise; G(f, t) is the gain function.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed in a computer, they are used to execute the frog call recognition method based on spatial orientation according to any one of claims 1 to 8.
10. A frog call recognition system based on spatial orientation, characterized in that: A computer-readable storage medium comprising the computer-readable storage medium of claim 9.