Ruminant respiration detection method and system, computer equipment and storage medium
By using millimeter-wave radar and adaptive empirical mode decomposition, the robustness and automation issues of ruminant respiratory detection were solved, enabling high-precision, non-contact, and low-stress respiratory signal extraction in ruminants such as dairy goats, which is suitable for large-scale application in intelligent animal husbandry.
Patent Information
- Application Number
- CN202511525344.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2026-01-23
AI Technical Summary
Existing methods for detecting respiration in ruminants suffer from low robustness, susceptibility to motion artifacts, and difficulty in achieving large-scale automated detection. In particular, traditional methods require contact with ruminants such as dairy goats, which can easily cause stress responses and the signals are susceptible to environmental influences.
Millimeter-wave radar was used to collect chest and abdominal data. Vital signs time series were constructed by fast Fourier transform and phase extraction. Empirical mode decomposition and adaptive IMF methods were combined to calculate frequency matching degree, energy weight and period consistency. The respiratory principal component was adaptively selected to suppress body motion interference and repair the signal.
It achieves stable and accurate detection of respiratory signals in dairy goats under complex environments, enhances the robustness and automation of detection, reduces reliance on human intervention, and is suitable for large-scale application in intelligent animal husbandry.
Smart Images

Figure CN121370113A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of vital sign detection, and particularly relates to a ruminant respiration detection method and system, a computer device and a storage medium. BACKGROUND
[0002] With the rapid development of intelligent livestock farming and precision breeding, how to non-invasively and accurately detect the health status of ruminants such as dairy goats has become an important problem to be solved. Traditional vital sign detection methods mainly rely on manual contact means, such as heart rate sensors, respiratory belts or body temperature probes, etc. Although this method has a certain accuracy, it has the following problems: first, it needs to be in direct contact with the animal, which can easily cause stress reaction and affect the authenticity of physiological indicators; second, the sensor is easily disturbed by factors such as movement, body hair, and environmental humidity, resulting in large measurement errors; third, it is difficult to realize automatic detection of large-scale breeding groups, which seriously restricts the application prospect of intelligent breeding.
[0003] In recent years, non-contact vital sign detection methods have gradually attracted widespread attention. Video detection and infrared thermal imaging can achieve remote detection to some extent, but they are easily affected by light, shielding and environmental temperature changes, and often difficult to work stably in complex environments such as livestock houses.
[0004] Among them, millimeter wave radar has become a new technology for vital sign detection due to its advantages of being insensitive to environmental light, strong ability to penetrate hair and clothing, and high detection precision. Millimeter wave radar can extract the respiration signal by detecting the weak displacement of the chest and abdomen of the measured target, thereby realizing non-contact and effective vital sign detection. However, dairy goats move frequently and with large amplitude in a natural state, and radar signals are easily disturbed by motion artifacts, resulting in unstable extraction of respiration signals. At the same time, due to the thick hair of dairy goats and the weak respiration signal itself, traditional algorithms are difficult to effectively separate the target signal in a high-noise environment. Although modal decomposition methods can process signals to improve separation effect, modal decomposition methods need to rely on expert experience and manual selection, which has the risk of misselection and low robustness of detection. SUMMARY
[0005] In order to solve the problem of low robustness of existing animal respiration detection, the present application provides a ruminant respiration detection method, system, computer device and storage medium.
[0006] In order to achieve the above purpose, the present application provides the following technical solutions: A ruminant respiration detection method, comprising: collecting radar echo ADC data of the chest and abdomen of the ruminant; A range-dimensional Fast Fourier Transform (FFT) is performed on the radar echo ADC data to obtain a range-snap matrix. Phase extraction is performed on the range-snap matrix, and the difference of the phase signals is calculated to construct a vital signs time series. A FFT is then performed on the vital signs time series to obtain the FFT spectral energy distribution. Based on a pre-set respiratory frequency band, respiratory candidate signals are determined from the FFT spectral energy distribution. Empirical mode decomposition is performed on the candidate respiratory signal to obtain multiple intrinsic mode components. The frequency matching degree, energy weight and period consistency of each intrinsic mode component are calculated. A comprehensive score is calculated based on the frequency matching degree, energy weight and period consistency. The respiratory principal component is determined by the intrinsic mode component with the highest comprehensive score. Calculate the power spectral peak corresponding to the principal component of respiration, and determine the number of respirations of the ruminant within a set time period based on the power spectral peak.
[0007] Optionally, the method for detecting ruminant respiration provided by the present invention further includes: Radar data of the chest and abdomen of ruminants is collected by millimeter-wave radar at a fixed distance to obtain radar echo ADC data.
[0008] Optionally, the method for detecting ruminant respiration provided by the present invention further includes: The radar echo ADC data is rearranged into channel data and I / Q complexified to obtain a two-dimensional matrix signal. A Hamming window is applied to the two-dimensional matrix signal, and a fast Fourier operation is performed in the distance dimension to obtain the distance-snapshot matrix; Static clutter suppression is performed on the range-frame matrix based on mean cancellation, resulting in a range-frame matrix with static interference suppression. Within a preset range gate, the target range cell is determined based on the signal-to-noise ratio and time consistency of each range cell in the range-snap matrix after static interference suppression; The complex phase of the target distance cell is extracted, and the phase trajectory is obtained by phase unwrapping. The phase trajectory is then subjected to differential operation to determine the time series of vital signs.
[0009] Optionally, the method for detecting ruminant respiration provided by the present invention further includes: The missing signals in the respiratory candidate signals are repaired by interpolation based on the preceding respiratory candidate signals to obtain the repaired respiratory candidate signals.
[0010] Optionally, the missing signals in the respiratory candidate signals include masked overlay signals. The ruminant respiratory detection method provided by this invention further includes: Calculate the sliding energy standard deviation of respiratory candidate signals; The body movement interference interval is determined by the respiratory candidate signals whose sliding energy standard deviation is greater than the preset standard deviation threshold. The respiratory candidate signals in the body movement interference interval are then masked to obtain the masked coverage signal.
[0011] Optionally, the method for detecting ruminant respiration provided by the present invention further includes: The frequency matching degree is determined based on the dominant frequency and initial dominant frequency of the intrinsic modal components; The energy weight is determined based on the sum of the squares of the amplitudes of multiple sampling points of the intrinsic modal components. Periodic consistency is determined by the dispersion of the distance between two adjacent local peaks in the intrinsic modal components.
[0012] Optionally, the method for detecting ruminant respiration provided by the present invention further includes: The power spectral density of the principal respiratory component was calculated using the periodogram method. The main peak frequency is determined based on the power spectral density, and the number of respirations in ruminants is determined based on the main peak frequency.
[0013] The present invention also provides a ruminant respiratory detection system, comprising: The data acquisition module is used to collect radar echo ADC data from the chest and abdomen of ruminants. The signal filtering module is used to perform range-dimensional fast Fourier transform on radar echo ADC data to obtain a range-snap matrix; extract the phase from the range-snap matrix and calculate the difference of the phase signals to construct a vital signs time series; perform fast Fourier transform on the vital signs time series to obtain the fast Fourier spectrum energy distribution; and determine respiratory candidate signals based on the fast Fourier spectrum energy distribution according to the pre-set respiratory frequency band. The modality decomposition module is used to perform empirical modality decomposition on respiratory candidate signals to obtain multiple intrinsic modal components. It calculates the frequency matching degree, energy weight, and period consistency of each intrinsic modal component, calculates a comprehensive score based on the frequency matching degree, energy weight, and period consistency, and determines the respiratory principal component from the intrinsic modal component with the highest comprehensive score. The respiratory count determination module is used to calculate the power spectral peak corresponding to the principal component of respiration, and to determine the respiratory count of ruminants within a set time period based on the power spectral peak.
[0014] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the steps in a method for detecting the respiration of ruminants.
[0015] The present invention also provides a computer-readable storage medium storing a computer program that, when loaded by a processor, is capable of executing any of the steps in the method for detecting ruminant respiration.
[0016] The method for detecting respiration in ruminants provided by this invention has the following beneficial effects: The ruminant respiration detection method provided by this invention obtains multiple intrinsic mode components by performing empirical mode decomposition on candidate respiration signals. Based on the physiological characteristics and noise interference patterns of the respiration signals, a nonlinear weighted collaborative scoring mechanism with three dimensions—frequency matching degree, energy weight, and period consistency—is designed to purify the intrinsic mode components and determine the principal components. This avoids the subjectivity and poor consistency defects of relying on manual experience to select intrinsic mode functions, enhances the stability and reliability of operation in different individuals and complex environments, and provides a solid foundation for the large-scale and automated application of non-contact vital sign detection. Attached Figure Description
[0017] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of a method for detecting the respiration of ruminants provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the millimeter-wave radar method for detecting the respiration of dairy goats provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of data acquisition and construction using the TIAWR1642 millimeter-wave radar provided in an embodiment of the present invention; Figure 4 A diagram illustrating the signal processing procedure of the TIAWR1642 millimeter-wave radar provided in an embodiment of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0020] Example 1 This invention provides a method for detecting respiration in ruminants, specifically as follows: Figure 1 As shown, it includes the following steps: Step 11: Collect radar echo ADC data from the chest and abdomen of ruminants.
[0021] Step 11 includes: Step 111: Collect radar data of the chest and abdomen of ruminants at a fixed distance using millimeter-wave radar to obtain radar echo ADC data.
[0022] Specifically, taking respiratory monitoring of dairy goats as an example, without anesthetizing or completely immobilizing the goats, radar echo ADC data is first collected from the goats at the same distance within a limited range. For example, at a fixed distance of 0.6m, the raw radar echo signal from the chest and abdomen of the dairy goat is collected using a TIAWR1642 millimeter-wave radar. The raw analog echo signal received by the radar antenna is then converted into digitized radar data via analog-to-digital conversion (ADC). A dataset is constructed based on the collected ADC data for subsequent respiratory signal analysis.
[0023] Step 12: Perform range-dimensional Fast Fourier Transform on the radar echo ADC data to obtain the range-snap matrix. Extract the phase from the range-snap matrix and calculate the difference of the phase signal to construct a vital signs time series. Perform Fast Fourier Transform on the vital signs time series to obtain the Fast Fourier spectral energy distribution. Determine the respiratory candidate signal based on the pre-set respiratory frequency band and the Fast Fourier spectral energy distribution.
[0024] Step 12 includes: Step 121: Perform channel data rearrangement and I / Q complexification on the radar echo ADC data to obtain a two-dimensional matrix signal.
[0025] Step 122: Apply a Hamming window to the two-dimensional matrix signal and perform a distance-time Fast Fourier Transform operation to obtain the distance-time snapshot matrix.
[0026] Step 123: Perform static clutter suppression on the range-snap matrix based on mean cancellation to obtain the range-snap matrix after static interference suppression.
[0027] Step 124: Within the preset range gate range, determine the target range cell based on the signal-to-noise ratio and time consistency of each range cell in the range-snap matrix after static interference suppression.
[0028] Step 125: Extract the complex phase of the target distance cell, obtain the phase trajectory through phase unwrapping, and perform differential operation on the phase trajectory to determine the vital signs time series.
[0029] Specifically, after acquiring radar echo ADC data, the radar echo ADC data is first rearranged into channel data and processed using I / Q complexification to obtain a signal in two-dimensional matrix form. Next, a Hamming window is applied to each two-dimensional matrix chirp signal to reduce spectral leakage, and a range-dimensional FFT operation is performed to obtain a range-snap matrix. Then, the mean cancellation method is used to suppress static clutter in the FFT results, effectively removing strong reflections and low-frequency drift interference from fixed targets in the environment. Within a preset range threshold of 0.1-1.5m, a comprehensive score is constructed by calculating the signal-to-noise ratio (SNR) and time consistency index of each range cell. Combined with a pre-set SNR threshold of 10dB, the optimal target range cell is adaptively selected. For the locked target unit, its complex phase is further extracted and phase unwrapped to eliminate the discontinuity caused by the 2π jump, resulting in a continuous and stable phase trajectory. This allows for the extraction of a stable signal sequence related to the respiratory movements of the goat's chest and abdomen from the TIAWR1642 millimeter-wave radar echo ADC data under complex environmental conditions, providing reliable input for the respiratory rate estimation and mode decomposition of this invention. Subsequently, differential operations are performed on the phase trajectory obtained from phase unwrapping to remove static offsets, yielding a stable vital sign time series.
[0030] In addition, once the vital signs time series is determined, it can also automatically identify the main respiratory counts based on the FFT spectrum energy distribution through adaptive filtering, and limit the cutoff range to ±0.5Hz based on the signal amplitude characteristics to avoid signal distortion caused by an excessively wide filtering range.
[0031] Step 13: Calculate the sliding energy standard deviation of the respiratory candidate signals.
[0032] Step 14: Determine the body motion interference interval from the respiratory candidate signals whose sliding energy standard deviation is greater than the preset standard deviation threshold, and mask the respiratory candidate signals in the body motion interference interval to obtain the masked coverage signal.
[0033] Step 15: Interpolate and repair the missing signals in the respiratory candidate signals based on the preceding respiratory candidate signals to obtain the repaired respiratory candidate signals.
[0034] Specifically, after preprocessing the radar echo ADC data to obtain a stable vital sign time series, the sliding energy standard deviation is calculated for the phase difference signal in the vital sign time series, and an adaptive threshold is set to identify the motion interference interval. This interval is then extended forward and backward by a certain range to form a motion mask. For the area covered by the mask, spline interpolation combined with local smoothing is used for repair to ensure signal continuity and stability.
[0035] First, a second-order energy calculation is performed on the phase difference signal, as shown in formula (1): (1) in, It is a phase differential signal. The energy value is the second-order energy. Furthermore, the sliding standard deviation of the energy sequence is calculated with a window length L, as shown in formulas (2) and (3):
[0036] (2) (3) in, This represents the moving average calculated based on the past L sampling points at time n, where k is a summation index variable. Let be the moving standard deviation of the energy. Then, an adaptive threshold is constructed using the median of the moving standard deviation of the energy, as shown in formula (4):
[0037] (4) Where α is an adjustment coefficient used to amplify or reduce the adaptive threshold according to actual needs; those skilled in the art can select an appropriate value based on the experimental environment. T is the adaptive threshold. for The median, when When n is determined to be a signal belonging to the body motion interval, the signal is extended before and after it. Each sampling point is sampled and masked, as shown in formula (5): (5) Where i represents the index of the currently detected body motion interference location, and Mask is a mask sequence. A value of 1 indicates that the location is marked as "body motion interference" and needs to be repaired later, while a value of 0 indicates that the location is normal.
[0038] Finally, the body movement zone and its front and back sections... The motion region composed of sampling points is repaired based on interpolation, as shown in formula (6): (6) in, This represents the value of the original phase differential signal at the nth sampling point, and mask represents the nth item in the mask sequence, used to indicate whether the point belongs to the motion interference range. This represents the repaired phase differential signal. The set of valid samples used for interpolation. This represents the neighborhood index that is not covered by the mask. For the corresponding original phase difference value, spline_interp is the cubic spline interpolation function. Furthermore, the boundary points of the repaired area can be further smoothed using local averaging, as shown in formula (7):
[0039] (7) Step 16: Perform empirical mode decomposition on the respiratory candidate signal to obtain multiple intrinsic mode components. Calculate the frequency matching degree, energy weight, and period consistency of each intrinsic mode component. Calculate the comprehensive score based on the frequency matching degree, energy weight, and period consistency. Determine the respiratory principal component from the intrinsic mode component with the highest comprehensive score.
[0040] Step 16 includes: Step 161: Determine the frequency matching degree based on the dominant frequency and initial dominant frequency of the intrinsic mode components.
[0041] Step 162: Determine the energy weight based on the sum of the squares of the amplitudes of multiple sampling points of the intrinsic mode components.
[0042] Step 163: Determine the periodic consistency based on the dispersion of the distance between two adjacent local peaks in the intrinsic mode components.
[0043] Specifically, after the signal's body motion restoration is completed, an initial spectral analysis is performed on the signal to obtain the dominant frequency. And determine the bandpass range based on the dominant frequency. A fourth-order Butterworth bandpass filter is designed with a sampling rate of [sampling rate], and its normalized cutoff frequency is [normal cutoff frequency]. Respiratory candidate signals were obtained through zero-phase filtering. Subsequently, the Adaptive Intrinsic Mode Function based Empirical Mode Decomposition (AIMF-EMD) method was adopted. Based on the traditional empirical mode decomposition, an adaptive IMF strategy was introduced to ensure that the selected components best match the actual respiratory frequency band.
[0044] For example, firstly, respiratory candidate signals Empirical Mode Decomposition (EMD) is performed to obtain several Intrinsic Mode Function (IMF) components. For each IMF, the frequency matching degree, energy weight, and period consistency are calculated as shown in equations (8), (9), (10), and (11):
[0045] (8) (9) (10) (11) in For IMF main frequency, The initial dominant frequency, It is a very small constant. Frequency matching degree of respiratory candidate signals; For the energy index of the k-th IMF, The amplitude of the i-th sampling point of the k-th intrinsic mode component (IMF) is represented, where i is the sampling point index and N is the total number of sampling points participating in the statistics of this IMF sequence. The energy weights of the respiratory candidate signals. For all IMF energy sets the median; Let be the sampled value of the k-th IMF component at time n. Indicates the number of sampling points with delay. Let be the autocorrelation function of the k-th IMF component, measuring the autocorrelation of that component in time. similarity at the time for At the position of the i-th local maximum point within the specified interval. , and These are the lower and upper limits of the autocorrelation lag, calculated based on the range of respiratory rates. L is the number of maxima. The distance between two adjacent local peaks is denoted by std; std is the standard deviation operator used to measure the distance between two adjacent local peaks. The degree of dispersion, The periodic consistency index is used for the respiratory candidate signals. Then, a comprehensive score for the respiratory candidate signals is determined based on frequency matching, energy weight, and periodic consistency. The comprehensive score function is shown in formula (12):
[0046] (12) in, The respiratory candidate signal with the highest comprehensive score is selected as the respiratory principal component. In summary, compared to existing EMD methods, the AIMF-EMD method used in this invention introduces multidimensional constraints in component selection, ensuring that the final extracted IMF is highly consistent with the respiratory signal in terms of frequency, energy, and periodicity, thereby improving the stability and accuracy of the detection results.
[0047] Step 17: Calculate the power spectrum peak corresponding to the principal component of respiration, and determine the number of respirations of the ruminant within a set time period based on the power spectrum peak.
[0048] Step 17 includes: Step 171: Calculate the power spectral density of the principal respiratory component using the periodogram method; Step 172: Determine the main peak frequency based on the power spectral density, and determine the number of respirations of ruminants based on the main peak frequency.
[0049] Specifically, after determining the principal respiratory component, the power spectral density is calculated using the periodogram method, as shown in formula (13): (13) in, For the final determined principal component of respiration, This represents the power spectral density. The main peak frequency f was determined, thereby determining the number of respirations R of the dairy goat within 40.96 seconds, as shown in formula (14):
[0050] (14) When f exceeds the reasonable range for dairy goat respiration, such as 0.2-2.0 Hz, select the suboptimal peak or reconstrain the frequency band to ensure that the results conform to the physiological laws of dairy goats.
[0051] In summary, existing non-contact detection modal decomposition methods are highly sensitive to motion artifacts, struggle to cope with interference caused by vigorous animal movement, and require manual intervention for component selection, which carries the risk of misselection and reduces the stability and automation of detection. This invention provides an animal respiration detection method that can effectively suppress the interference of motion artifacts on respiratory signal extraction and adaptively select modalities. Since dairy goats do not require anesthesia or restraint, and respiration detection can be performed simply by placing them within normal limits, the non-contact, low-stress animal respiration detection method provided by this invention has high application value. Furthermore, the animal respiration detection method provided by this invention avoids signal distortion and makes respiration rate extraction more accurate by adaptively selecting the filter cutoff frequency, for example, through automatic frequency band identification and precise ±0.5Hz constraint. It automatically marks and repairs motion interference segments through a body movement detection and repair mechanism, effectively eliminating artifacts caused by dairy goat movement and shaking, avoiding false detections and missed detections caused by abnormal signals in traditional methods. Through the adaptive IMF-EMD method, the consistency between modal components and real respiration signals is improved, enhancing applicability in complex environments. Moreover, the AIMF-EMD method can be extended to the detection of vital signs in other ruminants, providing reliable support for intelligent ranches and animal health management.
[0052] Example 2 Based on Example 1, such as Figure 2 and Figure 3As shown, 25 numbered Saanen dairy goats from a certain teaching experimental base were selected, and experimental data were collected using the mmWave Studio tool. Specifically, as shown... Figure 3 As shown, the frequency synthesizer (Synth) first generates a linear frequency modulated continuous wave (FMCW) chirp signal for the transmitter and sends it to the transmitting antenna (TX), while simultaneously providing a local oscillator signal to the mixer. The transmitting antenna radiates the FMCW chirp signal onto the dairy goat, and the signals reflected back by the dairy goat are received by four receiving antennas (RX1, RX2, RX3, and RX4) used to receive the echo signals reflected back from the target and the environment. The weak echo signals received are amplified by a low-noise amplifier (LNA) to improve the signal-to-noise ratio before being passed to the mixer. The mixer mixes the received signal with the local oscillator signal and filters out the high-frequency components after mixing using a low-pass filter, retaining only the intermediate frequency signal to obtain an intermediate frequency signal (IF signal) containing the target's distance information. The analog IF signal is then converted into a digital signal by an analog-to-digital converter (ADC). The number of breaths of the dairy goat is obtained through digital signal processing (DSP) actions such as range-dimensional fast Fourier transform and static clutter filtering.
[0053] in, Figure 3 The TX chirp signal is an image that provides a more intuitive representation of the linear frequency modulated (LFM) continuous waveform of the transmitted signal, while the RX chirp signal is an image that provides a intuitive representation of the echo signal waveform. A chirp represents a single LFM pulse, a frame is a sequence of multiple chirs, and one frame of data is used for one target detection operation. Samples represent the number of points sampled by the analog-to-digital converter for each chirp. In this embodiment, as shown on the horizontal and vertical axes, one frame is set to contain two LFM pulses, each containing 256 sampling points, for a total of 512 sampling points, and one second is set to contain 25 frames.
[0054] Under the same TIAWR1642 millimeter-wave radar parameters, the sampling distance was controlled at 0.6m, and the dairy goats were in a normal activity state and within reasonable limits during the data collection process. During data collection, base staff recorded the respiratory rate by observing chest and abdominal movements, using this as the baseline value. The radar echo ADC data was then matched one-to-one with the baseline values to construct a dataset. MATLAB was used to perform preliminary processing on the raw signal to identify and remove outlier data. Data from goats exhibiting abnormal movement or equipment malfunctions causing signal distortion were also excluded. The final dataset contained 150 sets of valid binary data, which were used to validate subsequent respiratory detection algorithms.
[0055] The TIAWR1642 millimeter-wave radar parameter settings include: 256 sampling points, 4 receiving channels, and 1 transmitting channel; the ADC sampling rate is set to 10MHz; and the frequency modulation slope is approximately 6.0012 × 10⁻⁶. 13 The operating frequency is approximately 77 GHz; the range-dimensional FFT points are 256, the Doppler-dimensional FFT points are 128, and the angular-dimensional FFT points are 180; the breathing extraction frequency band is set to 0.2-2.0 Hz. It should be emphasized that the above TIAWR1642 millimeter-wave radar parameters are preferred values in this embodiment, and those skilled in the art can adjust them based on actual needs; this invention does not impose limitations.
[0056] After that, as Figure 4 As shown, a stable vital sign time series was obtained through signal processing methods such as distance dimension transformation, static interference suppression, target unit adaptive locking, phase extraction and differential processing. The signal amplitude range was limited by adaptive filtering, and body motion detection and repair were performed. The respiratory principal component was determined based on the AIMF-EMD method, and the respiratory rate of dairy goats was finally determined. The results were compared with the true values manually labeled by the base staff during the data acquisition process. The differences were all controlled within ±4 breaths / minute, and the system could still maintain high stability under motion interference scenarios.
[0057] Furthermore, the performance generalization evaluation of the animal respiration detection method was conducted using these 150 sets of radar experimental data from dairy goats. The evaluation results are shown in Table 1. Table 1 Performance Generalization Evaluation Table The Mean Absolute Error (MAE) is the average absolute deviation between the predicted and actual breath counts, reflecting the basic prediction accuracy. The Root Mean Square Error (RMSE) highlights the impact of extreme deviations through squared errors, measuring the ability to control outliers. The Median Absolute Error (MdAE) is the median error, resisting extreme value interference and reflecting prediction stability. The 95% confidence interval error range P95 (P95) represents the upper limit of error for 95% of the samples, reflecting the consistency of prediction results. The Concordance Correlation Coefficient (CCC) measures the consistency between the prediction and the actual value; a value closer to 1 is better. Acc@±2 and Acc@±4 represent the accuracy within ±2 and ±4 breaths / minute, respectively, corresponding to actual accuracy requirements. The runtime is the average processing time for a single set of data, evaluating real-time performance. As can be seen, the MAE of the AIMF-EMD method provided by this invention reaches 3.6386, and the Acc@±4 reaches 0.7375, indicating that the method has good generalization ability and robustness. Meanwhile, the running time is only 0.0082s, meeting application requirements.
[0058] Compared to existing multimodal decomposition methods such as EWT, EMD, CEEMDAN, and VMD, the AIMF-EMD method provided in this invention has significant advantages in metrics such as MAE and Acc@±4. By introducing body motion detection and repair, as well as an adaptive IMF strategy, this invention can significantly improve the accuracy of respiratory rate recognition, especially in the presence of body motion interference and high-noise backgrounds, exhibiting better adaptability and stability.
[0059] In summary, this invention innovatively employs a motion detection and repair mechanism and introduces the AIMF-EMD method, which effectively suppresses motion artifacts and noise interference in complex farming environments, significantly improving the accuracy and robustness of respiratory signal extraction. Especially under the natural activity state of dairy goats, this method maintains high recognition accuracy and stability, overcoming the problem of traditional mode decomposition methods relying on manual intervention and having a high misselection rate in the IMF selection process. This invention significantly outperforms existing mode decomposition methods in multiple evaluation indicators, demonstrating outstanding performance in accuracy, computational efficiency, and generalization ability. This result not only verifies the effectiveness of the AIMF-EMD method in extracting respiratory signals from dairy goats in complex farming environments but also demonstrates its broad application potential in animal health monitoring and smart farming.
[0060] Example 3 The present invention also provides a ruminant respiratory detection system, comprising: The data acquisition module is used to collect radar echo ADC data from the chest and abdomen of ruminants.
[0061] The signal filtering module is used to perform range-dimensional fast Fourier transform on radar echo ADC data to obtain a range-snap matrix; extract the phase from the range-snap matrix and calculate the difference of the phase signal to construct a vital signs time series; perform fast Fourier transform on the vital signs time series to obtain the fast Fourier spectrum energy distribution; and determine respiratory candidate signals based on the fast Fourier spectrum energy distribution according to the pre-set respiratory frequency band.
[0062] The modality decomposition module is used to perform empirical mode decomposition on respiratory candidate signals to obtain multiple intrinsic mode components. It calculates the frequency matching degree, energy weight, and period consistency of each intrinsic mode component, calculates a comprehensive score based on the frequency matching degree, energy weight, and period consistency, and determines the respiratory principal component from the intrinsic mode component with the highest comprehensive score.
[0063] The respiratory count determination module is used to calculate the power spectral peak corresponding to the principal component of respiration, and to determine the respiratory count of ruminants within a set time period based on the power spectral peak.
[0064] Based on the above embodiments, the ruminant respiratory detection system provided by the present invention further includes: The standard deviation calculation module is used to calculate the sliding energy standard deviation of respiratory candidate signals.
[0065] The body movement interference interval determination module is used to determine the body movement interference interval from respiratory candidate signals whose sliding energy standard deviation is greater than a preset standard deviation threshold, and to mask the respiratory candidate signals in the body movement interference interval to obtain a masked coverage signal.
[0066] The interpolation and repair module is used to interpolate and repair missing signals in the respiratory candidate signal based on the preceding respiratory candidate signal to obtain the repaired respiratory candidate signal.
[0067] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps in an embodiment of a method for detecting the respiration of ruminants. Specific implementation methods can be found in the method embodiments, and will not be repeated here.
[0068] Furthermore, the present invention also provides a non-transitory computer-readable storage medium containing instructions on which a computer program is stored. For example, a memory containing instructions that can be executed by a processor of a computer device to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the computer program is executed by the processor, it can implement the steps in an embodiment of a ruminant respiration detection method. Specific implementation methods can be found in the method embodiments, which will not be repeated here.
[0069] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0070] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0071] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0072] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.
[0073] It should be noted that the specific embodiments described above enable those skilled in the art to more fully understand the present invention, but do not limit the present invention in any way. Therefore, although the present invention has been described in detail in this specification and embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the present invention; and all technical solutions and improvements that do not depart from the spirit and scope of the present invention are covered within the protection scope of the present invention patent. No reference numerals in the claims should be construed as limiting the scope of the claims. Any simple variations or equivalent substitutions of technical solutions that can be readily obtained by those skilled in the art within the scope of the technology disclosed in the present invention are within the protection scope of the present invention.
Claims
1. A method for detecting the respiration of ruminants, characterized in that, include: Collect radar echo ADC data from the chest and abdomen of ruminants; The radar echo ADC data is subjected to range-dimensional fast Fourier transform to obtain a range-snap matrix. The phase of the range-snap matrix is extracted and the difference of the phase signal is calculated to construct a vital signs time series. The time series of vital signs is subjected to Fast Fourier Transform to obtain the Fast Fourier spectral energy distribution; based on the pre-set respiratory frequency band, the respiratory candidate signal is determined by the Fast Fourier spectral energy distribution. Empirical mode decomposition is performed on the candidate respiratory signal to obtain multiple intrinsic mode components. The frequency matching degree, energy weight, and period consistency of each intrinsic mode component are calculated. A comprehensive score is calculated based on the frequency matching degree, energy weight, and period consistency. The respiratory principal component is determined by the intrinsic mode component with the highest comprehensive score. Calculate the power spectral peak corresponding to the principal component of respiration, and determine the number of respirations of the ruminant within a set time period based on the power spectral peak.
2. The method for detecting respiration in ruminants according to claim 1, characterized in that, The radar echo ADC data collected from the thoracic and abdominal regions of ruminants includes: The radar data of the thoracic and abdominal region of the ruminant is obtained by collecting radar data of the thoracic and abdominal region of the ruminant at a fixed distance using millimeter-wave radar.
3. The method for detecting respiration in ruminants according to claim 1, characterized in that, Perform a range-dimensional Fast Fourier Transform on the radar echo ADC data to obtain a range-snap matrix. Extract the phase from the range-snap matrix and calculate the difference in the phase signals to construct a vital signs time series, including: The radar echo ADC data is subjected to channel data rearrangement and I / Q complexification processing to obtain a two-dimensional matrix signal; A Hamming window is applied to the two-dimensional matrix signal, and a fast Fourier operation is performed in the distance dimension to obtain the distance-snapshot matrix; Static clutter suppression is performed on the range-snap matrix based on mean cancellation to obtain the range-snap matrix after static interference suppression. Within a preset distance threshold, the target distance unit is determined based on the signal-to-noise ratio and time consistency of each distance unit in the distance-snap matrix after static interference suppression. The complex phase of the target distance unit is extracted, the phase is unwrapped to obtain the phase trajectory, and the phase trajectory is differentially processed to determine the vital signs time series.
4. The method for detecting respiration in ruminants according to claim 1, characterized in that, Before performing empirical mode decomposition on the candidate respiratory signal to obtain multiple intrinsic mode components, the method further includes: The missing signals in the respiratory candidate signals are repaired by interpolation based on the preceding respiratory candidate signals to obtain the repaired respiratory candidate signals.
5. The method for detecting ruminant respiration according to claim 4, characterized in that, The missing signals in the respiratory candidate signals include mask overlay signals. Before interpolating and repairing the missing signals in the respiratory candidate signals based on the preceding respiratory candidate signals, the following steps are also included: Calculate the sliding energy standard deviation of the respiratory candidate signals; The body movement interference interval is determined by the respiratory candidate signals whose sliding energy standard deviation is greater than a preset standard deviation threshold. The respiratory candidate signals in the body movement interference interval are then masked to obtain the masked coverage signal.
6. The method for detecting respiration in ruminants according to claim 1, characterized in that, Calculating the frequency matching degree, energy weight, and periodicity of each intrinsic mode component includes: The frequency matching degree is determined based on the dominant frequency and initial dominant frequency of the intrinsic mode components; The energy weight is determined based on the sum of the squares of the amplitudes of multiple sampling points of the intrinsic mode components. The periodic consistency is determined based on the dispersion of the distance between two adjacent local peaks in the intrinsic modal components.
7. The method for detecting respiration in ruminants according to claim 1, characterized in that, Based on the detection of the principal component of respiration using power spectral peaks, the respiratory count of the ruminant was obtained, including: The power spectral density of the principal respiratory component was calculated using the periodogram method. The main peak frequency is determined based on the power spectral density, and the number of respirations of the ruminant is determined based on the main peak frequency.
8. A ruminant respiratory detection system, characterized in that, include: The data acquisition module is used to collect radar echo ADC data from the chest and abdomen of ruminants. The signal filtering module is used to perform range-dimensional fast Fourier transform on the radar echo ADC data to obtain a range-snap matrix; to extract the phase from the range-snap matrix and calculate the difference of the phase signal to construct a vital signs time series. The time series of vital signs is subjected to Fast Fourier Transform to obtain the Fast Fourier spectral energy distribution; based on the pre-set respiratory frequency band, the respiratory candidate signal is determined by the Fast Fourier spectral energy distribution. The mode decomposition module is used to perform empirical mode decomposition on the respiratory candidate signal to obtain multiple intrinsic mode components, calculate the frequency matching degree, energy weight and period consistency of each intrinsic mode component, calculate a comprehensive score based on the frequency matching degree, energy weight and period consistency, and determine the respiratory principal component from the intrinsic mode component with the highest comprehensive score. The respiratory count determination module is used to calculate the power spectral peak corresponding to the principal component of the respiration, and to determine the respiratory count of the ruminant within a set time period based on the power spectral peak.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the ruminant respiratory detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is loaded by the processor, it is able to perform the steps of the method for detecting the respiration of ruminants as described in any one of claims 1 to 7.