Animal sound source positioning method and electronic equipment
Through deep learning models and sound optimization algorithms to process animal call signals, the problem of low sound source positioning accuracy in the existing technology is solved, and high-precision animal sound source positioning in different noise environments is achieved.
Patent Information
- Application Number
- CN202411971635.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing animal sound source positioning methods are difficult to adapt to different noise changes, resulting in low accuracy of sound source positioning, especially when ambient noise and echo information exist.
By collecting sound signals and inputting them into the deep learning model, determining the effective frequency band range, using sound optimization algorithm to optimize noise and echo in the target sound signal, and using sound source positioning algorithm to process and optimize sound signals to determine the location of the animal sound source source.
It improves the accuracy and stability of animal sound source positioning, and can clearly capture animal calls and determine its direction and distance in different noise environments.
Smart Images

Figure CN119811399A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sound signal recognition, and in particular to an animal sound source localization method and electronic equipment. Background Art
[0002] In the fields of ecology and wildlife conservation, animal calls are an important source of information that can be used for species monitoring, behavioral research, habitat assessment, etc. Although traditional monitoring methods such as direct observation, trap capture, and radio tracking provide a certain degree of data support, these methods generally have the problems of high cost, low efficiency, and great interference to animals.
[0003] With the advancement of science and technology, especially the rapid development of audio processing technology and machine learning algorithms, animal voiceprint monitoring has gradually been widely used as a non-invasive, efficient and relatively low-cost monitoring method.
[0004] Although animal voiceprint monitoring has many advantages, it still faces significant challenges in practical applications. The current animal sound source localization method is difficult to adapt to different noise changes, resulting in low sound source localization accuracy, especially environmental noise and echo information, which increases the difficulty of sound source localization. Summary of the invention
[0005] The present invention provides an animal sound source localization method and electronic equipment, which are used to solve at least one of the above technical problems.
[0006] The present invention provides an animal sound source localization method, comprising:
[0007] Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds;
[0008] In the sound signal including the animal call, determining a valid frequency band range, and determining the sound signal within the valid frequency band as the target sound signal;
[0009] The target sound signal is optimized according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; the optimized sound signal is processed according to a sound source positioning algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
[0010] According to an animal sound source localization method provided by the present invention, the sound signal includes a first sound signal and a second sound signal, the first sound signal is collected by a first sensor, the second sound signal is collected by a second sensor, and there are multiple second sensors.
[0011] According to an animal sound source localization method provided by the present invention, determining a valid frequency band range in a sound signal containing an animal call, and determining a sound signal within the valid frequency band range as a target sound signal includes:
[0012] Performing Fourier transform on the first sound signal to convert the first sound signal into a frequency domain signal, wherein the frequency domain signal is within the effective frequency band;
[0013] Determine a valid frequency domain signal from the frequency domain signal, wherein the valid frequency domain signal satisfies a preset threshold;
[0014] Substitute the effective frequency domain signal into the bandpass filter screening formula:
[0015] have to Where ω0 is the cutoff frequency and Q is the prime factor;
[0016] The second sound signal S i (t) = Sanimal(t) + Snoise(t) + Srnter(t), where Sanimal(t) is the animal sound, Snoise(t) is the background noise, and Srnter(t) is the interference signal;
[0017] The second sound signal is captured to obtain an intermediate sound signal within a valid frequency band:
[0018] The intermediate sound signal is bandpass filtered to obtain an effective sound signal: Seffective(t)=H(f)*S i (t);
[0019] Through beamforming, the target sound signal in the target direction is obtained Where W i is the weight of each of the second sensors.
[0020] According to an animal sound source localization method provided by the present invention, the optimized sound signal is processed according to the sound source localization algorithm to determine the direction and distance of the animal sound source in the optimized sound signal, including:
[0021] Set the sound source S position S(x,y), the second sensor array is arranged on the x-axis, and the position of the second sensor is (x i ,0,0), input the sound source position and the position of the second sensor into the TDOA algorithm, and obtain the time difference between the sound source S and the second sensor:
[0022] Where c is the speed of sound;
[0023] The time difference between the sound source S and the second sensor is processed by the least square method, and the optimization algorithm is used to minimize the residual error of the time difference between the sound source S and the second sensor;
[0024] The residual is expressed as:
[0025] Define the objective function J as:
[0026] Set the learning rate η, and set the stopping condition to the change of the objective function J being less than the predetermined threshold ε, or reaching the maximum number of iterations N;
[0027] Computing Gradients
[0028] Use the gradient descent formula to update the position of the sound source S
[0029]
[0030] If |J k+1 -J k |<ε, or the maximum number of iterations N is reached, the iteration stops and the output (x k+1 ,y k+1 ) is the first target sound source position.
[0031] According to an animal sound source localization method provided by the present invention, if |J k+1 -J k |≥ε, then perform the following steps:
[0032] Assume that the sound signal emitted by the sound source S is s(t), and the signal received by the nth second sensor is s n (t), the time delay of the sound source S relative to the nth second sensor is Δt n , the signal received by the nth second sensor is expressed as Where A is the signal amplitude, ω is the angular frequency of the signal, is the phase of the signal received by the nth second sensor;
[0033] Assuming a reference second sensor, the phase difference between the signal received by the nth second sensor and the reference second sensor is expressed as in The phase of the signal received by the reference second sensor;
[0034] The distance difference between the sound propagation to the nth second sensor and the reference second sensor is (n-1)d·cosθ, where θ is the angle between the direction of the sound source S and the normal direction of the second sensor, and the time delay is expressed as Δt n=((n-1)d·cosθ) / c, the phase difference between the signal received by the nth second sensor and the reference second sensor is:
[0035]
[0036] Where f is the frequency of the sound signal;
[0037] Set the coordinates of the reference second sensor as the origin, and calculate the time delay between the nth second sensor and the reference second sensor, expressed as:
[0038]
[0039] Substituting the time delay between the nth second sensor and the reference second sensor into the phase difference formula of the signals received by the nth second sensor and the reference second sensor, we obtain:
[0040]
[0041] The phase difference formula of the nth second sensor is expressed as:
[0042]
[0043] It is calculated by the geometric relationship between the sound source S position (x, y) and the n second sensors:
[0044]
[0045] The Newton iteration method is used to iterate and obtain the second target sound position.
[0046] According to an animal sound source localization method provided by the present invention, the target sound signal is optimized according to a sound optimization algorithm to obtain an optimized sound signal, including:
[0047] Calculate the weight W of each second sensor beam signal i and phase difference Real-time capture of the beam signal X of the second sensor i(t) ;
[0048] The time difference of the beam signal reaching the second sensor is:
[0049] Δt=(d*sin(θ)) / c
[0050] Wherein, θ is the direction angle of the beam signal, and the distance between each second sensor is d;
[0051] The target sound source signal is obtained by weighted summing of the beam signals of the target direction angle:
[0052] y(t)=Σ(wi*xi(t-Δt_i))
[0053] According to an animal sound source localization method provided by the present invention, the high frequency acquisition of the first sensor and the sound source localization of the second sensor are expressed as:
[0054] Beamforming and high frequency acquisition are expressed as:
[0055] Y(f)=∑i=16Wi·Si(f)·Hi(f)
[0056] Where Y(f) is the frequency domain signal after beamforming, Si(f) is the amplitude of the sound wave captured by the i-th second sensor, and Hi(f) is the frequency response of the i-th first sensor;
[0057] Time domain sampling and preprocessing are expressed as:
[0058] y(n)=sample[Y(f)]
[0059] Where y(n) is the discrete sample value of Y(f) in the time domain,
[0060] x'(n)=preprocess[y(n)]
[0061] Among them, y(n) is obtained after preprocessing to obtain x'(n);
[0062] The sound source localization and adaptive filter are expressed as:
[0063] e^(n)=w(n)T·x'(n)
[0064] e(n)=d(n)-e^(n)
[0065] w(n+1)=w(n)+μe(n)·x'(n)
[0066] Δd=c*Δt.
[0067] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned animal sound source localization methods are implemented.
[0068] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned animal sound source localization methods are implemented.
[0069] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned animal sound source localization methods are implemented.
[0070] The animal sound source positioning method and electronic device provided by the present invention optimize the noise and echo in the target sound signal through the sound optimization algorithm, so as to clearly capture the animal's call, and then process the optimized sound signal according to the sound source positioning algorithm to finally determine the direction and distance of the animal. The linear six-microphone array sensor and the dynamic coil sensor constitute an integrated animal sound sensor, which can receive animal calls with high clarity, identify the direction and distance of the animal sound source with high accuracy, and better receive the calls of high-frequency animals, so as to realize all-round and wide-range animal sound recognition. The sensor utilizes the high-precision positioning and multi-channel collaborative working capabilities of the linear six-microphone array, combined with the high-frequency sensitivity and response speed of the dynamic coil sensor, to effectively capture and locate animal calls. Through advanced signal processing algorithms, the sensor can suppress background noise and ensure that the captured sound signal is clear and pure. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0072] Figure 1 It is a schematic flow chart of the animal sound source localization method provided by the present invention. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] Combine the following Figure 1 The animal sound source localization method of the present invention comprises:
[0075] A: Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds;
[0076] B: Determine a valid frequency band range in the sound signal containing the animal call, and determine the sound signal within the valid frequency band as the target sound signal;
[0077] C: Optimizing the target sound signal according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; processing the optimized sound signal according to a sound source localization algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
[0078] The sound optimization algorithm is used to optimize the noise and echo in the target sound signal, so that the animal calls can be clearly captured. The optimized sound signal is then processed according to the sound source localization algorithm to ultimately determine the direction and distance of the animal.
[0079] The sound signal includes a first sound signal and a second sound signal. The first sound signal is collected by a first sensor, and the second sound signal is collected by a second sensor. There are multiple second sensors. Specifically, the first sensor is a dynamic sensor, and the second sensor is a linear six-microphone array sensor.
[0080] In step A, the array and dynamic sensors synchronously collect animal sounds, and the positions of the two sensors are adjusted so that the two sensors can receive the animal sounds at the same time. The method of the present invention is implemented by utilizing the high frequency characteristics of the dynamic sensor and the sound source localization function of the linear six-microphone array sensor.
[0081] The embedded board connects the array sensor and the dynamic coil sensor. The embedded processor has the characteristics of high-speed data processing capability, low power consumption, and rich peripheral interfaces. The output signal of the array microphone is connected to the audio input interface of the embedded processor through the audio acquisition building block. The audio acquisition module of the embedded processor uses the internal resources of the MCU to read the two sensor signals at the same time, and then converts the signals of the linear six-microphone array sensor and the dynamic coil sensor into digital signals through the ADC digital-to-analog converter in the embedded processor to achieve the effect of signal reading and.
[0082] Furthermore, determining a valid frequency band range in the sound signal containing the animal call, and determining the sound signal within the valid frequency band range as the target sound signal includes:
[0083] When the animal makes a sound, the first sound signal S(t) collected by the dynamic coil sensor is the time domain signal of the audio. The first sound signal is Fourier transformed to convert the first sound signal into a frequency domain signal. The frequency domain signal is within the effective frequency band. The frequency domain signal is expressed as:
[0084]
[0085] Where ω is the angular frequency and j is an imaginary number;
[0086] The power spectrum density method is used to analyze the frequencies in the frequency domain and determine the main components of the frequencies.
[0087] PSD(ω)=|S(ω)| 2
[0088] Calculate the total energy of the frequency domain signal and determine the frequency range that contributes the largest proportion of energy, which is achieved by integrating the power spectral density:
[0089]
[0090] Set 80% of the energy as the main effective frequency component, determine the most concentrated part of the effective frequency [ω1, ω2], and then perform weighted averaging to obtain the center frequency ω0:
[0091]
[0092] Select a bandwidth frequency Δω to determine the effective frequency domain signal of the sound:
[0093]
[0094] Substitute the effective frequency domain signal into the bandpass filter screening formula:
[0095] have to Where ω0 is the cutoff frequency and Q is the prime factor;
[0096] The second sound signal S i (t) = Sanimal(t) + SNoise(t) + Srnter(t), where Sanimal(t) is the animal sound, Snoise(t) is the background noise, and Srnter(t) is the interference signal;
[0097] The second sound signal is captured to obtain an intermediate sound signal within a valid frequency band:
[0098] The intermediate sound signal is bandpass filtered to obtain an effective sound signal: Seffective(t)=H(f)*S i (t);
[0099] Through beamforming, the target sound signal in the target direction is obtained Where W i is the weight of each of the second sensors.
[0100] Preferably, the step of processing the optimized sound signal according to a sound source localization algorithm to determine the direction and distance of the source of the animal sound in the optimized sound signal comprises:
[0101] The six microphones of the linear six-microphone array sensor are spaced uniformly and initially in a straight line. The time difference between the animal calls reaching different microphones is used to calculate the distance difference between the animal calls and the microphones, and then the location of the signal source is determined.
[0102] The basic formula of TDOA algorithm is: Δt = (d / c) * ΔT
[0103] Among them, Δt is the time difference between the animal call reaching the two microphones, d is the geometric distance difference between the animal call and the two receivers, that is, the distance difference between the signal source reaching the two receivers, c is the speed of sound, and ΔT is the absolute time interval between signal sending and receiving.
[0104] Set the sound source S position S(x,y), the second sensor array is arranged on the x-axis, the second sensor i=1,2,…6, and the position of the second sensor in the two-dimensional case is (x i ,0,0), input the sound source position and the position of the second sensor into the TDOA algorithm, and obtain the time difference between the sound source S and the second sensor:
[0105] Where c is the speed of sound;
[0106] For a linear six-microphone array, five TDOA equations can be established, with microphone 1 being the reference microphone:
[0107]
[0108] After sorting, we get:
[0109]
[0110] Each TDOA equation represents a hyperbola, because for a given time difference Δt i1 , the location of the sound source must be located on the hyperbola with microphone i and microphone 1 as foci.
[0111] The time difference between the sound source S and the second sensor is processed by the least square method, and the optimization algorithm is used to minimize the residual error of the time difference between the sound source S and the second sensor;
[0112] The residual is expressed as:
[0113] Define the objective function J as:
[0114] Set the learning rate η, and set the stopping condition to the change of the objective function J being less than the predetermined threshold ε, or reaching the maximum number of iterations N;
[0115] For the current position (xk ,y k ), calculate the partial derivative of the objective function J with respect to x and y, that is, the gradient
[0116] After calculation, the gradient can be expressed as:
[0117]
[0118] Use the gradient descent formula to update the position of the sound source S
[0119]
[0120] If |J k+1 -J k |<ε, or the maximum number of iterations N is reached, the iteration stops and the output (x k+1 ,y k+1 ) is the first target sound source position.
[0121] Phase difference is the phase relationship between two signals, expressed in degrees or radians. In a linear microphone array, when a sound signal arrives at the array at a certain angle θ, there is a phase difference between the signals received by different microphones.
[0122] If |J k+1 -J k |≥ε, then perform the following steps:
[0123] The sound source S is located at point (x, y) on the two-dimensional plane, the microphone array is located on the x-axis, the first microphone is set as the reference microphone, its coordinates are (0, 0), the spacing between the microphones is d, and the microphone array is arranged linearly. The sound signal emitted by the sound source S is set to s(t), and the signal received by the nth second sensor is s n (t), the time delay of the sound source S relative to the nth second sensor is Δt n , the signal received by the nth second sensor is expressed as Where A is the signal amplitude, ω is the angular frequency of the signal, is the phase of the signal received by the nth second sensor;
[0124] Assuming a reference second sensor, the phase difference between the signal received by the nth second sensor and the reference second sensor is expressed as in The phase of the signal received by the reference second sensor;
[0125] The distance difference between the sound propagation to the nth second sensor and the reference second sensor is (n-1)d·cosθ, where θ is the angle between the direction of the sound source S and the normal direction of the second sensor, and the time delay is expressed as Δtn =((n-1)d·cosθ) / c, the phase difference between the signal received by the nth second sensor and the reference second sensor is:
[0126]
[0127] Where f is the frequency of the sound signal;
[0128] Set the coordinates of the reference second sensor as the origin, and calculate the time delay between the nth second sensor and the reference second sensor, expressed as:
[0129]
[0130] Substituting the time delay between the nth second sensor and the reference second sensor into the phase difference formula of the signals received by the nth second sensor and the reference second sensor, we obtain:
[0131]
[0132] The phase difference formula of the nth second sensor is expressed as:
[0133]
[0134] is the phase difference converted from the measured time delay, θ is the angle between the sound source direction and the normal direction of the microphone array,
[0135] It is calculated by the geometric relationship between the sound source S position (x, y) and the n second sensors:
[0136]
[0137] The Newton iteration method is used to iterate and obtain the second target sound position.
[0138] The Newton iteration method requires the calculation of the Jacobian matrix, which is the matrix composed of the partial derivatives of the equation system for each unknown number. The elements of the Jacobian matrix J are expressed as:
[0139]
[0140] i,j=1,2, where x1=x, x2=y. The specific form of the Jacobian matrix is obtained through calculation.
[0141] Newton iteration formula is:
[0142] x (k+1) =x (k) -J(x (k) ) -1 F(x (k) )
[0143] Among them, x k is the solution vector of the kth iteration, F(x (k) ) is in x (k) The value vector of the system of equations at (k) ) is in x (k) The Jacobian matrix.
[0144] The iterative process will continue until a certain termination condition is met, such as the norm of the value vector of the equation group is less than a certain threshold, or the number of iterations reaches a certain upper limit. The phase difference analysis of the signal received by the nth second sensor and the reference second sensor is introduced to improve the accuracy of the sound source direction and position measurement.
[0145] In each iteration, we use some kind of update rule to adjust the sound source position. For the gradient descent method, the update formula can be expressed as:
[0146] x (k+1) =x (k) -J(x (k) ) -1 F(x (k) )
[0147] The iteration process will continue until a termination condition is met. These conditions include:
[0148] 1. Objective function value F(x (k) ) is less than the threshold ∈1;
[0149] 2. The norm of the gradient |J(x (k) ) -1 F(x (k) )| is less than the threshold ∈2;
[0150] 3. The number of iterations reaches the upper limit N.
[0151] When the iteration process ends, the current sound source position estimate x (k) is considered as the final sound source position, where k is the index of the last iteration;
[0152] Expressed in formula, the final sound source position can be written as:
[0153]
[0154] Among them, k final is the index of the last iteration that satisfies the termination condition.
[0155] The step of optimizing the target sound signal according to the sound optimization algorithm to obtain the optimized sound signal includes:
[0156] The linear six-microphone array noise reduction function and echo cancellation adopt noise suppression algorithm and adaptive algorithm. These algorithms can adapt to the changes of different environmental noise and maintain stable performance.
[0157] Using a linear array of six microphones, calculate the weight W of each second sensor beam signal i and phase difference Real-time capture of the beam signal X of the second sensor i(t) ;
[0158] The time difference of the beam signal reaching the second sensor is:
[0159] Δt=(d*sin(θ)) / c
[0160] Wherein, θ is the direction angle of the beam signal, and the distance between each second sensor is d;
[0161] The target sound source signal is obtained by weighted summing of the beam signals of the target direction angle:
[0162] y(t)=Σ(wi*xi(t-Δt_i))
[0163] The target sound source signal is significantly enhanced while the noise signal from other non-target directions is effectively suppressed. This process not only relies on accurate weight allocation, but also makes full use of the phase difference between microphones to achieve the best effect of spatial filtering.
[0164] The linear six-microphone sound source localization technology provided by the present invention has high-precision sound source tracking capability. Through the unique six-microphone layout, it can fully capture the subtle changes of the sound signal in space and time, thereby achieving accurate estimation of the sound source position. In addition, the signal processing algorithm is integrated into it, which effectively enhances the accuracy of sound source localization and greatly reduces the interference of background noise and echo. Even in a noisy and complex environment, animal calls can be clearly captured, and the direction and distance of the animal can be determined.
[0165] The input to the adaptive filter is the beamformed signal y(n), which is a discrete sampled value in the time domain, corresponding to Y(f) in the frequency domain. The adaptive filter has a set of weights w(n) that adjust based on the error between the input signal and the desired output, i.e., a clean signal without echo. The output of the filter, e^(n), is a linear combination of the input signal y(n) (or more precisely, a version of it that has been appropriately delayed and filtered) and the weight vector w(n): e^(n) = w(n)T*x′(n). Where x′(n) is a preprocessed version of the input signal y(n), which serves as the actual input vector to the filter. The goal of the adaptive filter is to minimize the output error e(n), which is the difference between the desired output and the filter output e^(n): e(n) = d(n) - e^(n), where d(n) is the desired output signal. In echo cancellation applications, d(n) is usually the near-end speech signal captured directly by a near-end microphone. Once the error e(n) is calculated, the adaptive filter updates its weights w(n) using the least mean square (LMS) algorithm or other similar optimization algorithm to better estimate the echo and reduce the error in the next iteration: w(n+1)=w(n)+μ·e(n)·x′(n), where μ is the learning rate parameter, which controls the speed and stability of the weight update.
[0166] The high frequency acquisition of the first sensor and the sound source positioning of the second sensor are expressed as:
[0167] Beamforming and high frequency acquisition are expressed as:
[0168] Y(f)=∑i=16Wi·Si(f)·Hi(f)
[0169] Where Y(f) is the frequency domain signal after beamforming, Si(f) is the amplitude of the sound wave captured by the i-th second sensor, and Hi(f) is the frequency response of the i-th first sensor;
[0170] Time domain sampling and preprocessing are expressed as:
[0171] y(n)=sample[Y(f)]
[0172] Where y(n) is the discrete sample value of Y(f) in the time domain,
[0173] x'(n)=preprocess[y(n)]
[0174] Among them, y(n) is obtained after preprocessing to obtain x'(n);
[0175] The sound source localization and adaptive filter are expressed as:
[0176] The output of the filter, e^(n), is a linear combination of the input signal y(n) and the weight vector w(n):
[0177] e^(n)=w(n)T*x'(n)
[0178] Among them, x′(n) is the preprocessed version of the input signal y(n), which serves as the actual input vector of the filter;
[0179] The goal of an adaptive filter is to minimize the output error e(n), which is the difference between the desired output and the filter output e^(n):
[0180] e(n)=d(n)-e^(n)
[0181] Where d(n) is the desired output signal;
[0182] In echo cancellation applications, d(n) is usually a near-end speech signal obtained in some way, such as directly captured by a near-end microphone. Once the error e(n) is calculated, the adaptive filter uses the least mean square (LMS) algorithm or other similar optimization algorithms to update its weights w(n) to better estimate the echo and reduce the error in the next iteration:
[0183] w(n+1)=w(n)+μe(n)·x'(n)
[0184] Among them, μ is the learning rate parameter, which controls the speed and stability of weight update;
[0185] Δd=c*Δt.
[0186] It starts with multiple dynamic sensors capturing acoustic signals, enhancing the target signal and suppressing noise through beamforming, and then inputting the processed signal into the sound source localization board for sound source localization. The system combines the high-frequency response characteristics of the dynamic sensor, the spatial filtering capability of beamforming, and the time-domain processing capability of the adaptive filter to achieve efficient sound source localization, noise reduction, and echo cancellation.
[0187] The dynamic coil sensor has high-frequency response capability in high-frequency acquisition. In the higher frequency range, the dynamic coil sensor can show a very flat amplitude response, that is, its output voltage is proportional to the ground speed. In the high frequency band, the dynamic coil sensor can accurately and stably obtain ground speed information and convert it into a corresponding voltage signal, so that some special animal calls can be received. In addition, the dynamic coil sensor also shows good phase stability in the high frequency band, which helps to ensure the accuracy of the signal during the high-frequency acquisition process. Its anti-noise ability is also excellent, and it can effectively suppress noise interference in complex environments, thereby maintaining a high signal-to-noise ratio and ensuring that the acquired signal is both clear and reliable.
[0188] The linear six-microphone array sensor and the dynamic coil sensor form an integrated animal sound sensor, which can receive animal sounds with high clarity, identify the direction and distance of animal sound sources with high accuracy, and better receive the calls of high-frequency animals, thus realizing all-round and wide-range animal sound recognition. The sensor uses the high-precision positioning and multi-channel collaborative working capabilities of the linear six-microphone array, combined with the high-frequency sensitivity and response speed of the dynamic coil sensor, to effectively capture and locate animal sounds. Through advanced signal processing algorithms, the sensor can suppress background noise and ensure that the captured sound signals are clear and pure.
[0189] An integrated animal sound sensor and an animal sound source positioning device thereof, the device comprising: a linear six-microphone array sensor, a dynamic sensor, an embedded board, an adjustable mounting frame, and a host computer.
[0190] The embedded board can be a certain model development board, installed on the mounting frame, and connected to the host computer through USB for communication; the linear six-microphone array sensor and the dynamic coil sensor are connected to the embedded board through wires and installed on the mounting frame. When receiving animal calls, the mounting frame is adjusted so that the sensor can receive animal calls without blind spots; the host computer parameters are adjusted so that the sound can be short, flat and fast for animal call recognition.
[0191] The electronic device may include: a processor, a communications interface, a memory, and a communications bus, wherein the processor, the communications interface, and the memory communicate with each other via the communications bus. The processor may call logic instructions in the memory to execute an animal sound source localization method, the method comprising:
[0192] A: Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds;
[0193] B: Determine a valid frequency band range in the sound signal containing the animal call, and determine the sound signal within the valid frequency band as the target sound signal;
[0194] C: Optimizing the target sound signal according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; processing the optimized sound signal according to a sound source localization algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
[0195] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0196] On the other hand, the present invention also provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the animal sound source localization method provided by the above methods, the method includes:
[0197] A: Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds;
[0198] B: Determine a valid frequency band range in the sound signal containing the animal call, and determine the sound signal within the valid frequency band as the target sound signal;
[0199] C: Optimizing the target sound signal according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; processing the optimized sound signal according to a sound source localization algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
[0200] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the animal sound source localization method provided by the above methods, the method comprising:
[0201] A: Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds;
[0202] B: Determine a valid frequency band range in the sound signal containing the animal call, and determine the sound signal within the valid frequency band as the target sound signal;
[0203] C: Optimizing the target sound signal according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; processing the optimized sound signal according to a sound source localization algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
[0204] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0205] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0206] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for localizing an animal sound source, characterized in that: include: Collecting sound signals, inputting the sound signals into a deep learning model, and determining whether the sound signals contain animal sounds; In the sound signal including the animal call, determining a valid frequency band range, and determining the sound signal within the valid frequency band as the target sound signal; The target sound signal is optimized according to a sound optimization algorithm to obtain an optimized sound signal, wherein the sound optimization algorithm is used to optimize the noise and echo in the target sound signal; the optimized sound signal is processed according to a sound source positioning algorithm to determine the first target sound source position of the animal call source in the optimized sound signal.
2. The animal sound source localization method according to claim 1, characterized in that: The sound signal includes a first sound signal and a second sound signal, the first sound signal is collected by a first sensor, the second sound signal is collected by a second sensor, and there are multiple second sensors.
3. The method for localizing animal sound sources according to claim 2, characterized in that: The step of determining a valid frequency band range in the sound signal containing the animal call, and determining the sound signal within the valid frequency band range as the target sound signal comprises: Performing Fourier transform on the first sound signal to convert the first sound signal into a frequency domain signal, wherein the frequency domain signal is within the effective frequency band; Determine a valid frequency domain signal from the frequency domain signal, wherein the valid frequency domain signal satisfies a preset threshold; Substitute the effective frequency domain signal into the bandpass filter screening formula: have to Where ω0 is the cutoff frequency and Q is the prime factor; The second sound signal S i (t) = Sanimal(t) + Snoise(t) + Srnter(t), where Sanimal(t) is the animal sound, Snoise(t) is the background noise, and Srnter(t) is the interference signal; The second sound signal is captured to obtain an intermediate sound signal within a valid frequency band: The intermediate sound signal is bandpass filtered to obtain an effective sound signal: Seffective(t)=H(f)*S i (t); Through beamforming, the target sound signal in the target direction is obtained Where W i is the weight of each of the second sensors.
4. The method for localizing animal sound sources according to claim 2, characterized in that: The step of processing the optimized sound signal according to the sound source localization algorithm to determine the direction and distance of the source of the animal sound in the optimized sound signal includes: Set the sound source S position S(x,y), the second sensor array is arranged on the x-axis, and the position of the second sensor is (x i ,0,0), input the sound source position and the position of the second sensor into the TDOA algorithm, and obtain the time difference between the sound source S and the second sensor: Where c is the speed of sound; The time difference between the sound source S and the second sensor is processed by the least square method, and the optimization algorithm is used to minimize the residual error of the time difference between the sound source S and the second sensor; The residual is expressed as: Define the objective function J as: Set the learning rate η, and set the stopping condition to the change of the objective function J being less than the predetermined threshold ε, or reaching the maximum number of iterations N; Computing Gradients Use the gradient descent formula to update the position of the sound source S If |J k+1 -J k |<ε, or the maximum number of iterations N is reached, the iteration stops and the output (x k+1 ,y k+1 ) is the first target sound source position.
5. The method for localizing animal sound sources according to claim 4, characterized in that: If |J k+1 -J k |≥ε, then perform the following steps: Assume that the sound signal emitted by the sound source S is s(t), and the signal received by the nth second sensor is s n (t), the time delay of the sound source S relative to the nth second sensor is Δt n , the signal received by the nth second sensor is expressed as Where A is the signal amplitude, ω is the angular frequency of the signal, is the phase of the signal received by the nth second sensor; Assuming a reference second sensor, the phase difference between the signal received by the nth second sensor and the reference second sensor is expressed as in The phase of the signal received by the reference second sensor; The distance difference between the sound propagation to the nth second sensor and the reference second sensor is (n-1)d·cosθ, where θ is the angle between the direction of the sound source S and the normal direction of the second sensor, and the time delay is expressed as Δt n =((n-1)d·cosθ) / c, the phase difference between the signal received by the nth second sensor and the reference second sensor is: Where f is the frequency of the sound signal; Set the coordinates of the reference second sensor as the origin, and calculate the time delay between the nth second sensor and the reference second sensor, expressed as: Substituting the time delay between the nth second sensor and the reference second sensor into the phase difference formula of the signals received by the nth second sensor and the reference second sensor, we obtain: The phase difference formula of the nth second sensor is expressed as: It is calculated by the geometric relationship between the sound source S position (x, y) and the n second sensors: The Newton iteration method is used to iterate and obtain the second target sound position.
6. The method for locating animal sound sources according to claim 2, characterized in that: The step of optimizing the target sound signal according to the sound optimization algorithm to obtain the optimized sound signal includes: Calculate the weight W of each second sensor beam signal i and phase difference Real-time capture of the beam signal X of the second sensor i(t) ; The time difference of the beam signal reaching the second sensor is: Δt=(d*sin(θ)) / c Wherein, θ is the direction angle of the beam signal, and the distance between each second sensor is d; The target sound source signal is obtained by weighted summing of the beam signals of the target direction angle: y(t)=Σ(wi*xi(t-Δt_i)).
7. The method for locating animal sound sources according to claim 2, characterized in that: The high frequency acquisition of the first sensor and the sound source positioning of the second sensor are expressed as: Beamforming and high frequency acquisition are expressed as: Y(f)=∑i=16Wi·Si(f)·Hi(f) Where Y(f) is the frequency domain signal after beamforming, Si(f) is the amplitude of the sound wave captured by the i-th second sensor, and Hi(f) is the frequency response of the i-th first sensor; Time domain sampling and preprocessing are expressed as: y(n)=sample[Y(f)] Where y(n) is the discrete sample value of Y(f) in the time domain, x'(n)=preprocess[y(n)] Among them, y(n) is obtained after preprocessing to obtain x'(n); The sound source localization and adaptive filter are expressed as: e^(n)=w(n)T·x'(n) e(n)=d(n)-e^(n) w(n+1)=w(n)+μe(n)·x'(n) Δd=c*Δt.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the animal sound source localization method according to any one of claims 1 to 7 are implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the animal sound source localization method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the animal sound source localization method according to any one of claims 1 to 7 are implemented.