Pig cough recognition and monitoring method and system based on distributed acoustic nodes

CN123017048APending Publication Date: 2026-10-30WENS FOODSTUFF GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611450633.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

然而,猪舍环境具有空间结构复杂、设备运行噪声密集的特点,现有方法多采用均匀布设或经验布设声学传感器,未考虑建筑墙体、栏舍隔栏等结构对声音传播的遮蔽效应,以及通风、喂料等设备噪声对麦克风拾音的干扰,导致有效拾音区域受限,监测盲区较多

Benefits of technology

[0012]本发明公开了一种基于分布式声学节点的猪只咳嗽识别与监测方法及系统。首先获取猪舍建筑布局及设备运行数据,构建拾音遮蔽分布热力图,并基于密度峰值聚类确定分布式声学节点布设方案;接着提取猪只咳嗽音频的梅尔频率倒谱系数特征,构建基于LSTM算法的咳嗽识别模型;然后通过分布式节点采集环境声信号,分析比对相似特征干扰声音类型,筛选待分析声音信号并输入识别模型,实现猪只咳嗽的精准识别与监测。本发明有效克服了猪舍建筑遮蔽和设备噪音干扰,提升了复杂环境下猪只咳嗽识别的准确率与监测效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017048A_ABST
    Figure CN123017048A_ABST
Patent Text Reader

Abstract

The application discloses a pig cough recognition and monitoring method and system based on distributed acoustic nodes. First, the building layout of a pig house and equipment operation data are acquired, a sound pickup shielding distribution heat map is constructed, and a distributed acoustic node layout scheme is determined based on density peak clustering. Then, the mel frequency cepstral coefficient features of pig cough audio are extracted, and a cough recognition model based on an LSTM algorithm is constructed. Then, the environment sound signals are collected by the distributed nodes, the similar feature interference sound types are analyzed and compared, the sound signals to be analyzed are screened, and the recognition model is input, so that the accurate recognition and monitoring of pig cough are realized. The application effectively overcomes the pig house building shielding and equipment noise interference, and improves the accuracy and monitoring efficiency of pig cough recognition in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of livestock and poultry health monitoring technology, and in particular to a method and system for identifying and monitoring pig coughs based on distributed acoustic nodes. Background Technology

[0002] Swine respiratory diseases pose a significant health threat to large-scale pig farms. Coughing in pigs, as a core early symptom of these diseases, requires timely and accurate identification and monitoring for disease early warning and precise control. Traditional pig cough monitoring relies primarily on manual inspections, which suffers from high subjectivity, poor real-time performance, and high labor intensity, making it difficult to meet the efficient management needs of modern pig farms.

[0003] In recent years, automated monitoring methods based on acoustic sensing technology have been increasingly applied to livestock and poultry health. However, pigsty environments are characterized by complex spatial structures and dense equipment operating noise. Existing methods often employ uniform or empirically deployed acoustic sensors, failing to consider the masking effects of building walls and pen partitions on sound propagation, as well as the interference of ventilation and feeding equipment noise on microphone pickup. This results in limited effective pickup areas and numerous monitoring blind spots. Furthermore, sounds from feeding, drinking, and body friction within the pigsty are highly similar to coughing sounds in terms of spectrum, energy, and duration. Existing recognition models often employ traditional machine learning algorithms, lacking in-depth analysis of the temporal characteristics of acoustic signals, making them susceptible to interference from similar sounds. This leads to low accuracy and high false alarm rates in cough recognition. Therefore, there is an urgent need for a monitoring method that can adapt to the complex environment of pigsties, effectively overcome masking and noise interference, and accurately identify pig coughs. Summary of the Invention

[0004] To address at least one of the aforementioned technical problems, this invention proposes a method and system for identifying and monitoring pig coughs based on distributed acoustic nodes.

[0005] The first aspect of this invention provides a method for identifying and monitoring pig coughs based on distributed acoustic nodes, comprising: Obtain building layout data and equipment operation data of the target pig house in the pig farm. Based on the building layout data, determine the building obstruction area of ​​different building structures on microphone pickup, and based on the equipment operation data, determine the noise obstruction area of ​​equipment operation noise on microphone pickup, and construct a heat map of pickup obstruction distribution of the target pig house in the pig farm. The heat map of sound pickup masking distribution is analyzed based on the density peak clustering algorithm to identify the spatial clustering characteristics of the masking effect. The deployment location of the distributed acoustic nodes is determined based on the spatial clustering characteristics to obtain the distributed node deployment scheme. Audio data of pig coughing is obtained, and Mel frequency cepstral coefficient analysis is performed on the audio data of pig coughing to extract the acoustic features of the cough sound spectrum, energy and duration, so as to obtain the acoustic features of pig coughing. Based on the acoustic features of pig coughing, a pig cough recognition model based on LSTM algorithm is constructed. The distributed acoustic nodes acquire the ambient sound signal of the target pig house, analyze the ambient sound signal, compare the acoustic features of the ambient sound signal with the acoustic features of the pig cough, determine the sound type with similar features to the pig cough, and obtain the similar feature interference sound type. Based on the similarity of the interference sound types, the monitoring signals of pig coughing sounds in the target pig house are selected to obtain the sound signals to be analyzed. The sound signals to be analyzed are then input into the pig coughing recognition model to identify and monitor the coughing of pigs in the target pig house.

[0006] In this solution, the acquisition of building layout data and equipment operation data of the target pigsty in the pig farm, the determination of building obstruction areas for microphone pickup based on the building layout data, and the determination of noise obstruction areas for microphone pickup based on equipment operation data, and the construction of a sound pickup obstruction distribution heat map of the target pigsty in the pig farm, are specifically as follows: Building layout data of the target pigsty is obtained through building information modeling of pigsty. The building layout data includes the spatial location and size information of pigsty walls, pen partitions, columns and passages. Equipment operation data is obtained based on pigsty equipment operation records. The equipment operation data includes the location and operation period of ventilation equipment, feeding equipment and disinfection equipment. The location of the pigs' activity is determined based on the building layout data. Each location in the pigs' activity location is used as the starting point for sound propagation. Light projection simulation is performed on the target pigsty area. The light propagation path blocked by the building structure is determined based on the spatial overlap relationship between the projected light and the building layout of the target pigsty. The area corresponding to the blocked light propagation path is determined as the building shading area. The building penetration thickness in the sound propagation path is determined based on the building structure type and building thickness of each blocked light propagation path, and the corresponding sound attenuation is calculated based on the building penetration thickness. The sound attenuation is then mapped to the corresponding building shading area to obtain the building shading intensity distribution. Based on the equipment location in the equipment operation data, determine the sound propagation path between each operating device and each location in the set of pig activity locations, obtain the sound intensity of equipment noise at each location in the sound propagation path, and form the spatial distribution of equipment noise based on the sound intensity at each location. The spatial distribution of the equipment noise is correlated with the building layout of the target pigsty to determine the noise propagation impact area, and the noise propagation impact area is determined as the noise shielding area. The corresponding noise shielding intensity distribution is determined according to the sound intensity of the equipment operation noise in each noise propagation impact area. The building shielding intensity distribution and the noise shielding intensity distribution are superimposed according to spatial location to obtain the sound shielding intensity at each spatial location of the target pig house, and spatial mapping is performed based on the sound shielding intensity to construct the sound shielding distribution heat map.

[0007] In this scheme, the density peak clustering algorithm is used to analyze the heat map of the sound pickup masking distribution to identify the spatial clustering characteristics of the masking effect. Based on these spatial clustering characteristics, the deployment locations of the distributed acoustic nodes are determined, resulting in a distributed node deployment scheme, specifically: The spatial mapping area of ​​the sound masking distribution heatmap is divided into several spatial location units. The sound masking intensity of each spatial location unit is extracted as the feature value of each spatial location unit. The absolute value of the difference in sound masking intensity between any two spatial location units is calculated. The absolute value of the difference in sound masking intensity is used as the feature distance between spatial location units. A spatial location unit distance matrix is ​​constructed based on the feature distance. Calculate the sum of characteristic distances between the target spatial location unit and all other spatial location units, define the sum of characteristic distances as the local density of the target spatial location unit, sort the local densities of all spatial location units in descending order, and select the spatial location unit with the highest local density as the density peak candidate unit. The minimum feature distance between a density peak candidate unit and other spatial location units with a local density higher than the density peak candidate unit is calculated. The minimum feature distance is defined as the inter-cluster distance of the density peak candidate unit. The product of the local density of the density peak candidate unit and the inter-cluster distance is used as the clustering decision value of the density peak candidate unit. The density peak candidate unit with the largest clustering decision value is selected as the cluster center. Other spatial location units are assigned to the corresponding cluster centers according to the feature distance between other spatial location units and the cluster centers to form occlusion effect spatial clusters, thus obtaining the spatial clustering characteristics of the occlusion effect. Extract the average sound masking intensity of all spatial location units in each masking effect spatial cluster, determine the masking effect spatial cluster with the smallest average sound masking intensity as the target deployment cluster, calculate the average spatial coordinates of all spatial location units in the target deployment cluster, and take the spatial location corresponding to the average spatial coordinates as the deployment location of the distributed acoustic nodes. Traverse all masking effect spatial clusters to complete the deployment location determination, and obtain the distributed node deployment scheme.

[0008] In this scheme, the acquisition of audio data of pig coughing, the performance of Mel-frequency cepstral coefficient analysis on the audio data of pig coughing, the extraction of acoustic features of the cough sound's spectrum, energy, and duration to obtain the acoustic features of pig coughing, and the construction of a pig cough recognition model based on the LSTM algorithm based on the acoustic features of pig coughing, specifically: Audio data of pigs coughing is collected, the audio data of pigs coughing is pre-emphasized, the pre-emphasized audio data of pigs coughing is divided into several frames of audio signals in chronological order, each frame of audio signal is windowed, and each frame of audio signal after windowing is subjected to fast Fourier transform to obtain the corresponding spectrum. The obtained spectrum is used to calculate the logarithmic energy of the output of each Mel filter through a Mel filter bank. The logarithmic energy is then subjected to discrete cosine transform to extract the Mel frequency cepstral coefficients. The energy value of each frame of audio signal is calculated based on the Mel frequency cepstral coefficients. The energy values ​​of each frame of audio signal are arranged in chronological order to obtain an energy sequence. The duration of the audio data of the pig cough is calculated from the start frame to the end frame. The Mel frequency cepstral coefficients, energy sequence and duration are combined to form the acoustic features of the pig cough. A long short-term memory network model is constructed, which includes an input layer, a hidden layer, and an output layer. The hidden layer is composed of several long short-term memory units, and each long short-term memory unit includes an input gate, a forget gate, and an output gate. The acoustic features of pig coughs are input into the input layer of the long short-term memory network model for training. The long short-term memory (LSTM) units in the hidden layer extract temporal features from the input acoustic features of pig coughs. The input gate controls the retention ratio of the current input information, the forget gate controls the forgetting ratio of the information from the previous time step, and the output gate controls the output ratio of the hidden state at the current time step. The extracted temporal features are then transmitted to the output layer, which classifies the temporal features through a fully connected layer to output the pig cough recognition result. Based on the correspondence between the pig cough recognition result and the acoustic features of pig coughs, the parameters of the LSM network model are adjusted to obtain the pig cough recognition model.

[0009] In this solution, the environmental sound signal of the target pigsty is acquired through the distributed acoustic nodes, the environmental sound signal is analyzed, and the acoustic features of the environmental sound signal are compared with the acoustic features of the pigs' cough to determine the sound type with similar features to the pigs' cough, thus obtaining the similar feature interference sound type. Specifically: The distributed acoustic nodes synchronously collect environmental sound signals from different spatial locations within the target pigsty. The environmental sound signals are divided into frames according to time sequence. A short-time Fourier transform is performed on each frame of the environmental sound signal to obtain the time spectrum. The amplitude corresponding to each frequency in the time spectrum is extracted. Time frequency points with similar frequencies and continuous amplitude changes in adjacent time frames are connected to form multiple time frequency trajectories. Based on the frequency change direction and amplitude change relationship of each time-frequency trajectory in a continuous time frame, time-frequency trajectories with continuous frequency and energy changes are merged, and time-frequency trajectories that do not have a continuous time-frequency connection relationship with each other are separated to obtain multiple time-frequency components. Based on the start and end times, frequency ranges, and energy change data of each time-frequency component, amplitude correlation is calculated for time-frequency components with overlapping time ranges and overlapping frequency ranges. Time-frequency components with synchronous amplitude changes are merged, while time-frequency components with asynchronous amplitude changes are kept separate, thus dividing the ambient sound signal into multiple independent acoustic components. Mel frequency cepstral coefficients are extracted for each independent acoustic component, and acoustic features of the independent acoustic components are constructed based on the corresponding energy sequence, spectral characteristics and duration. The Euclidean distance between the acoustic features and the acoustic features of the pig cough is calculated, and the similarity between each independent acoustic component and the pig cough sound is determined based on the Euclidean distance. Independent acoustic components with a similarity greater than a preset similarity are identified as interfering sounds that have similar acoustic characteristics to the sound of a pig coughing. The sound type of the interfering sound is then determined, and the similar feature interfering sound type is obtained.

[0010] In this scheme, the step of selecting the pig cough sound monitoring signals in the target pig house based on the similar characteristic interference sound type to obtain the sound signal to be analyzed, and inputting the sound signal to be analyzed into the pig cough recognition model to identify and monitor the pig cough in the target pig house, specifically involves: Based on the similar characteristic interference sound type, determine the corresponding physical sound source, obtain the equipment operation record, control status record or action status record corresponding to the physical sound source, and perform time correlation on the equipment operation record, control status record or action status record according to a unified time base, and determine the time period of interference sound occurrence corresponding to the similar characteristic interference sound type based on the change of the physical sound source's operation status. The sound monitoring signals in the target pigsty are continuously acquired through the distributed acoustic nodes. The sound monitoring signals are divided into frames according to time sequence, and the acquisition time of each frame of sound monitoring signal is matched with the time period of the occurrence of the similar feature interference sound type. The sound monitoring signals whose acquisition time is within the time period of the occurrence of the similar feature interference sound type are removed, and the sound monitoring signals without the time period of the occurrence of similar feature interference sound are taken as the sound signals to be analyzed. The independent acoustic components of the sound signal to be analyzed are extracted, and acoustic features are extracted from the independent acoustic components of the sound signal to be analyzed to obtain acoustic feature data of the sound signal to be analyzed. The acoustic feature data is input into the pig cough recognition model for temporal feature extraction and classification recognition, and the pig cough recognition results corresponding to each independent acoustic component are output. The monitoring results of pig cough in the target pig house are determined according to the occurrence time of the independent acoustic components corresponding to the pig cough recognition results.

[0011] A second aspect of the present invention also provides a pig cough recognition and monitoring system based on distributed acoustic nodes. The system includes a memory and a processor. The memory includes a program for a pig cough recognition and monitoring method based on distributed acoustic nodes. When the program for a pig cough recognition and monitoring method based on distributed acoustic nodes is executed by the processor, it implements the steps of the pig cough recognition and monitoring method based on distributed acoustic nodes as described in any of the above claims.

[0012] This invention discloses a method and system for identifying and monitoring pig coughs based on distributed acoustic nodes. First, data on the pigsty layout and equipment operation are acquired to construct a heatmap of sound pickup obstruction distribution. Then, a distributed acoustic node deployment scheme is determined based on density peak clustering. Next, Mel-frequency cepstral coefficient features of the pig cough audio are extracted to construct a cough recognition model based on the LSTM algorithm. Then, environmental sound signals are collected through distributed nodes, and similar interference sound types are analyzed and compared. The sound signals to be analyzed are selected and input into the recognition model, achieving accurate identification and monitoring of pig coughs. This invention effectively overcomes pigsty building obstruction and equipment noise interference, improving the accuracy and monitoring efficiency of pig cough identification in complex environments. Attached Figure Description

[0013] Figure 1 A flowchart of a method for identifying and monitoring pig coughs based on distributed acoustic nodes according to the present invention is shown; Figure 2 A flowchart is shown showing the sound masking distribution heat map of the target pig house in the pig farm constructed according to the present invention; Figure 3 The flowchart illustrating the distributed node deployment scheme obtained by the present invention is shown. Figure 4The diagram shows a block diagram of a pig cough recognition and monitoring system based on distributed acoustic nodes according to the present invention. Detailed Implementation

[0014] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0015] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.

[0016] Figure 1 The flowchart of a method for identifying and monitoring pig coughs based on distributed acoustic nodes according to the present invention is shown.

[0017] like Figure 1 As shown, the first aspect of the present invention provides a method for identifying and monitoring pig coughs based on distributed acoustic nodes, comprising: Obtain building layout data and equipment operation data of the target pig house in the pig farm. Based on the building layout data, determine the building obstruction area of ​​different building structures on microphone pickup, and based on the equipment operation data, determine the noise obstruction area of ​​equipment operation noise on microphone pickup, and construct a heat map of pickup obstruction distribution of the target pig house in the pig farm. The heat map of sound pickup masking distribution is analyzed based on the density peak clustering algorithm to identify the spatial clustering characteristics of the masking effect. The deployment location of the distributed acoustic nodes is determined based on the spatial clustering characteristics to obtain the distributed node deployment scheme. Audio data of pig coughing is obtained, and Mel frequency cepstral coefficient analysis is performed on the audio data of pig coughing to extract the acoustic features of the cough sound spectrum, energy and duration, so as to obtain the acoustic features of pig coughing. Based on the acoustic features of pig coughing, a pig cough recognition model based on LSTM algorithm is constructed. The distributed acoustic nodes acquire the ambient sound signal of the target pig house, analyze the ambient sound signal, compare the acoustic features of the ambient sound signal with the acoustic features of the pig cough, determine the sound type with similar features to the pig cough, and obtain the similar feature interference sound type. Based on the similarity of the interference sound types, the monitoring signals of pig coughing sounds in the target pig house are selected to obtain the sound signals to be analyzed. The sound signals to be analyzed are then input into the pig coughing recognition model to identify and monitor the coughing of pigs in the target pig house.

[0018] It should be noted that by constructing a heatmap of sound pickup masking distribution, the combined masking effect of piggery building structure and equipment noise on microphone pickup is quantified, overcoming the problem of numerous monitoring blind spots in complex environments. Based on density peak clustering analysis of the spatial clustering characteristics of the heatmap, the node deployment locations are determined, achieving adaptive optimization of the distributed acoustic node layout and significantly improving the effective sound pickup coverage. Simultaneously, the spectral, energy, and duration features of cough sounds are extracted using Mel-frequency cepstral coefficients and combined with the LSTM algorithm to construct a recognition model, fully exploring the temporal dependencies of the cough sound signal and greatly enhancing the model's ability to deeply represent cough sounds. Furthermore, by comparing the similarity between ambient sound and cough acoustic features to identify interference sound types, and accordingly selecting the input signal to be analyzed into the model, similar acoustic interference such as feeding and drinking is effectively eliminated, thereby significantly reducing the false alarm rate and achieving high-precision, low-false-alarm monitoring of pig coughs.

[0019] Figure 2 A flowchart is shown for the sound masking distribution heat map of the target pig house in the pig farm constructed according to the present invention.

[0020] According to an embodiment of the present invention, the steps of acquiring building layout data and equipment operation data of the target pig house in the pig farm, determining the building obstruction areas of different building structures on microphone pickup based on the building layout data, and determining the noise obstruction areas of equipment operation noise on microphone pickup based on the equipment operation data, and constructing a sound pickup obstruction distribution heat map of the target pig house in the pig farm, are as follows: Building layout data of the target pigsty is obtained through building information modeling of pigsty. The building layout data includes the spatial location and size information of pigsty walls, pen partitions, columns and passages. Equipment operation data is obtained based on pigsty equipment operation records. The equipment operation data includes the location and operation period of ventilation equipment, feeding equipment and disinfection equipment. The location of the pigs' activity is determined based on the building layout data. Each location in the pigs' activity location is used as the starting point for sound propagation. Light projection simulation is performed on the target pigsty area. The light propagation path blocked by the building structure is determined based on the spatial overlap relationship between the projected light and the building layout of the target pigsty. The area corresponding to the blocked light propagation path is determined as the building shading area. The building penetration thickness in the sound propagation path is determined based on the building structure type and building thickness of each blocked light propagation path, and the corresponding sound attenuation is calculated based on the building penetration thickness. The sound attenuation is then mapped to the corresponding building shading area to obtain the building shading intensity distribution. Based on the equipment location in the equipment operation data, determine the sound propagation path between each operating device and each location in the set of pig activity locations, obtain the sound intensity of equipment noise at each location in the sound propagation path, and form the spatial distribution of equipment noise based on the sound intensity at each location. The spatial distribution of the equipment noise is correlated with the building layout of the target pigsty to determine the noise propagation impact area, and the noise propagation impact area is determined as the noise shielding area. The corresponding noise shielding intensity distribution is determined according to the sound intensity of the equipment operation noise in each noise propagation impact area. The building shielding intensity distribution and the noise shielding intensity distribution are superimposed according to spatial location to obtain the sound shielding intensity at each spatial location of the target pig house, and spatial mapping is performed based on the sound shielding intensity to construct the sound shielding distribution heat map.

[0021] It should be noted that the walls, pens, columns, and other building structures within the pigsty physically obstruct sound propagation and cause varying degrees of sound attenuation. Since light travels in a straight line in a uniform medium and is blocked by obstacles, this optical propagation characteristic has a high degree of spatial consistency with the physical law that sound is blocked by building structures within the pigsty space. Therefore, by simulating light projection from the pigs' activity location as the starting point of sound propagation towards the target pigsty area, and detecting the spatial overlap between the projected light and the building layout, it can be determined whether the corresponding sound propagation path is blocked by the building structure. The area corresponding to the blocked light is thus identified as the building-shielded area. Furthermore, since different building structure types and thicknesses have varying degrees of sound absorption and attenuation, the corresponding sound attenuation can be quantitatively calculated based on the type and thickness of the building structure through which the blocked light penetrates, thereby obtaining the building shielding intensity distribution. On the other hand, since the noise from ventilation, feeding, and disinfection equipment attenuates along its spatial propagation path, and the noise intensity exhibits a regular spatial distribution with varying propagation distance and equipment power, calculating the equipment noise intensity at each spatial location based on the sound propagation path between the equipment location and the pigs' activity location yields a spatial distribution of equipment noise. This distribution is then spatially correlated with the pigsty's architectural layout to determine the noise propagation impact area, thus obtaining the noise shielding area and its corresponding noise shielding intensity distribution. Finally, the architectural shielding intensity distribution and the noise shielding intensity distribution are superimposed according to spatial location to construct a sound shielding distribution heatmap of the target pigsty. The equipment also includes manure cleaning equipment, sprinkler systems, lighting equipment, and environmental temperature control equipment.

[0022] Figure 3 A flowchart illustrating the distributed node deployment scheme obtained by the present invention is shown.

[0023] According to an embodiment of the present invention, the analysis of the sound pickup masking distribution heatmap based on the density peak clustering algorithm identifies the spatial clustering characteristics of the masking effect, and determines the deployment locations of the distributed acoustic nodes based on the spatial clustering characteristics to obtain a distributed node deployment scheme, specifically as follows: The spatial mapping area of ​​the sound masking distribution heatmap is divided into several spatial location units. The sound masking intensity of each spatial location unit is extracted as the feature value of each spatial location unit. The absolute value of the difference in sound masking intensity between any two spatial location units is calculated. The absolute value of the difference in sound masking intensity is used as the feature distance between spatial location units. A spatial location unit distance matrix is ​​constructed based on the feature distance. Calculate the sum of characteristic distances between the target spatial location unit and all other spatial location units, define the sum of characteristic distances as the local density of the target spatial location unit, sort the local densities of all spatial location units in descending order, and select the spatial location unit with the highest local density as the density peak candidate unit. The minimum feature distance between a density peak candidate unit and other spatial location units with a local density higher than the density peak candidate unit is calculated. The minimum feature distance is defined as the inter-cluster distance of the density peak candidate unit. The product of the local density of the density peak candidate unit and the inter-cluster distance is used as the clustering decision value of the density peak candidate unit. The density peak candidate unit with the largest clustering decision value is selected as the cluster center. Other spatial location units are assigned to the corresponding cluster centers according to the feature distance between other spatial location units and the cluster centers to form occlusion effect spatial clusters, thus obtaining the spatial clustering characteristics of the occlusion effect. Extract the average sound masking intensity of all spatial location units in each masking effect spatial cluster, determine the masking effect spatial cluster with the smallest average sound masking intensity as the target deployment cluster, calculate the average spatial coordinates of all spatial location units in the target deployment cluster, and take the spatial location corresponding to the average spatial coordinates as the deployment location of the distributed acoustic nodes. Traverse all masking effect spatial clusters to complete the deployment location determination, and obtain the distributed node deployment scheme.

[0024] It should be noted that the sound masking distribution heatmap quantifies the sound masking intensity at various locations within the pigsty space. Areas with lower masking intensity represent areas where sound propagation is less hindered by building structure and equipment noise, and where the microphone's effective sound pickup conditions are better. By dividing the heatmap space into several spatial location units and using the absolute value of the masking intensity difference as the feature distance, the algorithm can accurately characterize the similarity of masking effects between different spatial locations, providing a metric basis for spatial clustering. Based on this, the local density of each spatial location unit is calculated. A unit with a higher local density means that it is surrounded by a large number of neighbors with similar shading intensity, thus naturally forming a spatial clustering area of ​​shading effect. The unit with the highest local density is selected as the candidate unit of density peak, and the minimum feature distance between it and the unit with higher density is further calculated. Then, the product of local density and inter-cluster distance is used as the clustering decision value. This design makes the cluster center have the dual characteristics of "high degree of clustering of its own shading intensity" and "large degree of separation from better shading areas". Therefore, the candidate unit with the largest clustering decision value is selected as the cluster center, which can divide the entire pig house space into several spatial clusters with completely different shading effect characteristics, and complete the identification of the spatial clustering characteristics of shading effect.

[0025] More importantly, when the above clustering process divides spatial clusters, the spatial coverage of each cluster naturally reflects the spatial distribution breadth of locations with similar shading intensity within that area. This spatial distribution breadth directly corresponds to the effective acquisition distance of the acoustic nodes. When the spatial span of a cluster matches the effective acquisition distance of a single acoustic node in the actual environment of the pigsty, deploying a single node within that cluster can achieve complete coverage of the entire low-shading sub-area, avoiding resource waste caused by overly dense node deployment or acquisition blind spots caused by overly sparse deployment. Therefore, by extracting the average sound masking intensity of each cluster, the cluster with the smallest average value is determined as the target deployment cluster. This cluster has the lightest overall masking and its spatial range is suitable for the effective acquisition distance of the nodes, making it the preferred area for microphone deployment. Then, the average spatial coordinates of all spatial location units within the target deployment cluster are calculated to obtain the geometric center of the cluster as the node deployment location. This ensures that the nodes are located in the core area of ​​the low-masking cluster to maximize acquisition quality. Furthermore, by traversing all clusters, the deployment location of each node is determined. The resulting distributed node deployment scheme achieves the technical effects of adaptively avoiding high-masking blind spots in the complex environment of the pigsty, making full use of the effective acquisition distance of the acoustic nodes, and achieving the maximum effective sound pickup coverage with the fewest number of nodes.

[0026] According to an embodiment of the present invention, the step of acquiring audio data of pig coughing, performing Mel-frequency cepstral coefficient analysis on the audio data of pig coughing, extracting the acoustic features of the cough sound's spectrum, energy, and duration to obtain the acoustic features of pig coughing, and constructing a pig cough recognition model based on the LSTM algorithm based on the acoustic features of pig coughing, specifically involves: Audio data of pigs coughing is collected, the audio data of pigs coughing is pre-emphasized, the pre-emphasized audio data of pigs coughing is divided into several frames of audio signals in chronological order, each frame of audio signal is windowed, and each frame of audio signal after windowing is subjected to fast Fourier transform to obtain the corresponding spectrum. The obtained spectrum is used to calculate the logarithmic energy of the output of each Mel filter through a Mel filter bank. The logarithmic energy is then subjected to discrete cosine transform to extract the Mel frequency cepstral coefficients. The energy value of each frame of audio signal is calculated based on the Mel frequency cepstral coefficients. The energy values ​​of each frame of audio signal are arranged in chronological order to obtain an energy sequence. The duration of the audio data of the pig cough is calculated from the start frame to the end frame. The Mel frequency cepstral coefficients, energy sequence and duration are combined to form the acoustic features of the pig cough. A long short-term memory network model is constructed, which includes an input layer, a hidden layer, and an output layer. The hidden layer is composed of several long short-term memory units, and each long short-term memory unit includes an input gate, a forget gate, and an output gate. The acoustic features of pig coughs are input into the input layer of the long short-term memory network model for training. The long short-term memory (LSTM) units in the hidden layer extract temporal features from the input acoustic features of pig coughs. The input gate controls the retention ratio of the current input information, the forget gate controls the forgetting ratio of the information from the previous time step, and the output gate controls the output ratio of the hidden state at the current time step. The extracted temporal features are then transmitted to the output layer, which classifies the temporal features through a fully connected layer to output the pig cough recognition result. Based on the correspondence between the pig cough recognition result and the acoustic features of pig coughs, the parameters of the LSM network model are adjusted to obtain the pig cough recognition model.

[0027] It should be noted that the coughing sound of pigs is essentially a time-varying, non-stationary signal with a strict temporal evolution law. Its acoustic characteristics exhibit a dynamic evolution process on the time axis, starting with a low-frequency energy impact generated by lung airflow, followed by vocal cord vibration forming a specific formant shift, and finally, the energy gradually decays. This cross-frame temporal dependency cannot be independently represented by traditional frame-level features. The LSTM algorithm was chosen because its input gate, forget gate, and output gate within its Long Short-Term Memory (LSTM) unit constitute a gated state machine. The input gate determines how much new information in the Mel-frequency cepstral coefficients and energy sequence of the current frame is written into the current memory state. The forget gate determines how much historical temporal information stored in the previous hidden state needs to be cleared. The output gate controls how much information in the current memory state is exposed as a visible hidden state output. These three gating mechanisms are continuously differentiable and proportionally adjusted through the sigmoid activation function, enabling the model to adaptively learn the complete temporal evolution trajectory of the coughing sound from the start frame to the end frame during training. This avoids forgetting early acoustic events due to gradient vanishing or excessively amplifying noise interference due to gradient exploding. During the training phase, a multidimensional acoustic feature sequence containing Mel frequency cepstral coefficients, energy sequence, and duration is sequentially input into the input layer at time steps. Multiple long short-term memory units in the hidden layer update the cell state and hidden state frame by frame, encoding the dynamic spectral changes across frames into a fixed-dimensional temporal feature vector. The output layer maps this feature vector to a classification probability distribution of coughing and non-coughing through a fully connected layer. Then, the network weight parameters are adjusted by backpropagation using the corresponding error between the labeled pig cough acoustic features and the recognition results. The resulting pig cough recognition model can accurately capture the subtle changes in cough sound in the temporal dimension, thereby achieving high-accuracy end-to-end cough recognition in complex pig house environments. It effectively distinguishes the temporal structure differences between cough sound and short-term similar sounds such as feeding and drinking, significantly reducing the false alarm rate.

[0028] According to an embodiment of the present invention, the step of acquiring the ambient sound signal of the target pigsty through the distributed acoustic nodes, analyzing the ambient sound signal, comparing the acoustic features of the ambient sound signal with the acoustic features of the pig's cough, determining the sound type with similar features to the pig's cough, and obtaining the similar feature interference sound type, specifically includes: The distributed acoustic nodes synchronously collect environmental sound signals from different spatial locations within the target pigsty. The environmental sound signals are divided into frames according to time sequence. A short-time Fourier transform is performed on each frame of the environmental sound signal to obtain the time spectrum. The amplitude corresponding to each frequency in the time spectrum is extracted. Time frequency points with similar frequencies and continuous amplitude changes in adjacent time frames are connected to form multiple time frequency trajectories. Based on the frequency change direction and amplitude change relationship of each time-frequency trajectory in a continuous time frame, time-frequency trajectories with continuous frequency and energy changes are merged, and time-frequency trajectories that do not have a continuous time-frequency connection relationship with each other are separated to obtain multiple time-frequency components. Based on the start and end times, frequency ranges, and energy change data of each time-frequency component, amplitude correlation is calculated for time-frequency components with overlapping time ranges and overlapping frequency ranges. Time-frequency components with synchronous amplitude changes are merged, while time-frequency components with asynchronous amplitude changes are kept separate, thus dividing the ambient sound signal into multiple independent acoustic components. Mel frequency cepstral coefficients are extracted for each independent acoustic component, and acoustic features of the independent acoustic components are constructed based on the corresponding energy sequence, spectral characteristics and duration. The Euclidean distance between the acoustic features and the acoustic features of the pig cough is calculated, and the similarity between each independent acoustic component and the pig cough sound is determined based on the Euclidean distance. Independent acoustic components with a similarity greater than a preset similarity are identified as interfering sounds that have similar acoustic characteristics to the sound of a pig coughing. The sound type of the interfering sound is then determined, and the similar feature interfering sound type is obtained.

[0029] It should be noted that in the complex acoustic environment of pigsties, multiple sound sources, such as chewing while eating, swallowing while drinking, body friction, and intermittent equipment operation, emit sound simultaneously. These sounds highly overlap with the acoustic characteristics of pig coughs, such as Mel-frequency cepstral coefficients, energy sequences, and durations. If all environmental sound signals are directly input into the recognition model, interference from similar features will lead to a significant increase in the false alarm rate. Traditional methods typically extract features from the mixed sound signals as a whole, failing to distinguish between different sound sources existing simultaneously and making it difficult to specifically identify the type of interference. By connecting time-frequency trajectories, merging time-frequency components, and calculating amplitude correlation, the overlapping and mixed environmental sound signals are decomposed layer by layer into multiple independent acoustic components, so that each component corresponds to a single physical sound source. Then, the acoustic features of each independent component are extracted and Euclidean distance is calculated with the acoustic features of pig coughs to quantify the degree of similarity, thereby accurately screening out interference sounds similar to cough sounds and determining their specific types. The direction of frequency change refers to the rising, falling, or stable trend of the main frequency components of the acoustic signal over time in a continuous time frame, while the amplitude change relationship refers to the growth, decay, or fluctuation correlation pattern of the signal's energy intensity in a continuous time frame. The process of merging time-frequency trajectories with continuous frequency and energy changes involves connecting the time-frequency trajectories with consistent frequency change directions and synchronous amplitude changes in adjacent time frames end-to-end on the time-frequency plane, merging them into a single time-frequency component covering a continuous time period.

[0030] According to an embodiment of the present invention, the step of selecting the monitoring signals of pig coughing sounds in the target pigsty based on the similar feature interference sound type to obtain the sound signal to be analyzed, and inputting the sound signal to be analyzed into the pig coughing recognition model to identify and monitor the coughing of pigs in the target pigsty, specifically includes: Based on the similar characteristic interference sound type, the corresponding physical sound source is determined, and the equipment operation record, control status record, or action status record corresponding to the physical sound source is obtained. The equipment operation record, control status record, or action status record is time-correlated according to a unified time base. The interference sound occurrence time period corresponding to the similar characteristic interference sound type is determined according to the change in the operation status of the physical sound source. For equipment with continuous operation status, the corresponding interference sound occurrence time period is determined according to the start and end time of the equipment operation status. For equipment with intermittent action status, the corresponding interference sound occurrence time period is determined according to the occurrence time and duration of the action status. The sound monitoring signals in the target pigsty are continuously acquired through the distributed acoustic nodes. The sound monitoring signals are divided into frames according to time sequence, and the acquisition time of each frame of sound monitoring signal is matched with the time period of the occurrence of the similar feature interference sound type. The sound monitoring signals whose acquisition time is within the time period of the occurrence of the similar feature interference sound type are removed, and the sound monitoring signals without the time period of the occurrence of similar feature interference sound are taken as the sound signals to be analyzed. The independent acoustic components of the sound signal to be analyzed are extracted, and acoustic features are extracted from the independent acoustic components of the sound signal to be analyzed to obtain acoustic feature data of the sound signal to be analyzed. The acoustic feature data is input into the pig cough recognition model for temporal feature extraction and classification recognition, and the pig cough recognition results corresponding to each independent acoustic component are output. The monitoring results of pig cough in the target pig house are determined according to the occurrence time of the independent acoustic components corresponding to the pig cough recognition results.

[0031] It should be noted that by tracing the corresponding physical sound source based on the type of interfering sound with similar characteristics, and obtaining the equipment operation record, control status record, or action status record of the physical sound source, and performing time correlation according to a unified time base, the actual time period of the interfering sound in the target pigsty can be accurately determined. This allows the system to continuously collect sound monitoring signals from distributed acoustic nodes, frame them in chronological order, and match the collection time of each frame with the time period of interference occurrence. It automatically removes sound monitoring signals within the interference period, retaining only the sound signals to be analyzed from the interference-free period, effectively avoiding interference from feeding, drinking, equipment operation, and other sounds that are similar to coughing sounds. Highly similar interfering sounds are incorporated into the recognition model, significantly reducing the false alarm rate. Based on this, independent acoustic components are extracted from the sound signal to be analyzed, and acoustic features are extracted. The feature data is then input into a pre-trained LSTM pig cough recognition model for temporal feature extraction and classification. The model outputs the recognition results corresponding to each independent acoustic component, and the monitoring results of pig cough are determined based on the occurrence time corresponding to the recognition results. This achieves accurate localization and real-time monitoring of cough events in complex pigsty environments, improving recognition accuracy and ensuring the temporal traceability of monitoring results, providing reliable technical support for early warning of respiratory diseases in pigs.

[0032] According to an embodiment of the present invention, it further includes: After installing nodes based on the distributed node deployment scheme, the distributed acoustic nodes synchronously collect the ambient sound signals at each deployment location in the target pig house, and extract the average energy of the ambient sound signals collected by each node in the preset low frequency band as the current low frequency energy value of each node. The average low-frequency energy of all nodes is calculated based on the current low-frequency energy value. The ratio of the current low-frequency energy value to the average low-frequency energy value is used as the occlusion attenuation coefficient of the node. The node is then judged to have pig body occlusion based on the comparison result between the occlusion attenuation coefficient and the preset occlusion judgment threshold. When occlusion is determined, the equivalent acoustic features of the area where the occluded node is located are estimated by distance-weighted interpolation based on the spatial distance between the node and the neighboring unoccluded nodes and the current low-frequency energy value of the neighboring unoccluded nodes. The equivalent acoustic features are then used to replace the acoustic features in the ambient sound signal collected by the occluded node to update the sound signal to be analyzed input into the pig cough recognition model.

[0033] According to an embodiment of the present invention, the step of updating the sound signal to be analyzed input into the pig cough recognition model specifically involves: When the occlusion attenuation coefficient is less than the preset occlusion judgment threshold, it is determined that the distributed acoustic node is occluded by a pig's body. The three-dimensional coordinates of the spatial location of the occluded node are extracted, and the Euclidean distance between the node and the spatial locations of all unoccluded nodes is calculated based on the three-dimensional coordinates. The spatial weight of each unobstructed node to the obstructed node is calculated based on the reciprocal of the Euclidean distance, and the spatial weight is weighted and summed with the current low-frequency energy value of the corresponding unobstructed node to obtain the estimated low-frequency energy value of the region where the obstructed node is located. The estimated low-frequency energy value is used as the equivalent acoustic feature of the region. Alternative acoustic feature data for the occluded node is generated based on the equivalent acoustic feature. The corresponding acoustic feature in the ambient sound signal collected by the occluded node is replaced with the alternative acoustic feature data to obtain the updated sound signal to be analyzed. The updated sound signal to be analyzed is then input into the pig cough recognition model for recognition and monitoring.

[0034] It should be noted that after installing distributed acoustic nodes at the locations determined by density peak clustering, pigs may gather in a corner of a pen for a long time due to thermotropism or feeding habits. This area happens to be close to the installation location of a certain node. The pigs' bodies and the pen structure physically block the microphone, causing a significant attenuation of the sound signal collected by the node. The system continues to use the data from that node as input without sensing this dynamic obstruction, resulting in a significant decrease in the cough recognition rate in that area and causing local monitoring failure. To address the aforementioned issues, this invention, after installing nodes based on a distributed node deployment scheme, synchronously collects environmental sound signals from each deployment location within the target pigsty using distributed acoustic nodes. The average energy of the environmental sound signals collected by each node within a preset low-frequency band is extracted as the current low-frequency energy value of each node. Based on this current low-frequency energy value, the average low-frequency energy value of all nodes is calculated. The ratio of the current low-frequency energy value to the average low-frequency energy value is used as the occlusion attenuation coefficient for that node. The comparison between the occlusion attenuation coefficient and a preset occlusion judgment threshold determines whether the node is obstructed by a pig's body. When the occlusion attenuation coefficient is less than the preset occlusion judgment threshold, it is determined that the distributed acoustic node is obstructed by a pig's body, and the spatial location of the obstructing node is extracted. The three-dimensional coordinates of the occluded node are used to calculate the Euclidean distance between the occluded node and the spatial locations of all unoccluded nodes. The spatial weight of each unoccluded node relative to the occluded node is calculated based on the reciprocal of the Euclidean distance. The spatial weights are then weighted and summed with the current low-frequency energy value of the corresponding unoccluded node to obtain the estimated low-frequency energy value of the area where the occluded node is located. This estimated low-frequency energy value is used as the equivalent acoustic feature of the area. Alternative acoustic feature data for the occluded node is generated based on the equivalent acoustic feature. The corresponding acoustic features in the environmental sound signal collected by the occluded node are replaced with the alternative acoustic feature data to obtain the updated sound signal to be analyzed. The updated sound signal to be analyzed is then input into the pig cough recognition model for recognition and monitoring. This technical solution can detect the physical obstruction of the microphone by the pig's body in real time and automatically trigger a compensation mechanism. It estimates the equivalent acoustic features of the obstructed area by spatial distance weighted interpolation of nearby unobstructed nodes, effectively avoiding sound signal attenuation and feature loss caused by obstruction. This ensures the integrity and accuracy of the sound signal to be analyzed in the input recognition model, thereby improving the reliability and comprehensiveness of pig cough monitoring.

[0035] Figure 4 The diagram shows a block diagram of a pig cough recognition and monitoring system based on distributed acoustic nodes according to the present invention.

[0036] A second aspect of the present invention also provides a pig cough recognition and monitoring system based on distributed acoustic nodes. The system includes: a memory 401, a processor 402, and a communication interface 403. The memory includes a program for a pig cough recognition and monitoring method based on distributed acoustic nodes. The communication interface is used for data connection and communication between the memory and the processor. When the program for a pig cough recognition and monitoring method based on distributed acoustic nodes is executed by the processor, it implements the steps of the pig cough recognition and monitoring method based on distributed acoustic nodes as described in any of the above claims.

[0037] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0038] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0039] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for identifying and monitoring pig coughs based on distributed acoustic nodes, characterized in that, Includes the following steps: Obtain building layout data and equipment operation data of the target pig house in the pig farm. Based on the building layout data, determine the building obstruction area of ​​different building structures on microphone pickup, and based on the equipment operation data, determine the noise obstruction area of ​​equipment operation noise on microphone pickup, and construct a heat map of pickup obstruction distribution of the target pig house in the pig farm. The heat map of sound pickup masking distribution is analyzed based on the density peak clustering algorithm to identify the spatial clustering characteristics of the masking effect. The deployment location of the distributed acoustic nodes is determined based on the spatial clustering characteristics to obtain the distributed node deployment scheme. Audio data of pig coughing is obtained, and Mel frequency cepstral coefficient analysis is performed on the audio data of pig coughing to extract the acoustic features of the cough sound spectrum, energy and duration, so as to obtain the acoustic features of pig coughing. Based on the acoustic features of pig coughing, a pig cough recognition model based on LSTM algorithm is constructed. The distributed acoustic nodes acquire the ambient sound signal of the target pig house, analyze the ambient sound signal, compare the acoustic features of the ambient sound signal with the acoustic features of the pig cough, determine the sound type with similar features to the pig cough, and obtain the similar feature interference sound type. Based on the similarity of the interference sound types, the monitoring signals of pig coughing sounds in the target pig house are selected to obtain the sound signals to be analyzed. The sound signals to be analyzed are then input into the pig coughing recognition model to identify and monitor the coughing of pigs in the target pig house.

2. The method for identifying and monitoring pig coughing based on distributed acoustic nodes according to claim 1, characterized in that, The process involves acquiring building layout data and equipment operation data for the target pig farm, determining building obstruction areas for microphone pickup based on the building layout data, and determining noise obstruction areas for microphone pickup based on equipment operation noise based on the equipment operation data, and constructing a sound pickup obstruction distribution heatmap for the target pig farm. Specifically: Building layout data of the target pigsty is obtained through building information modeling of pigsty. The building layout data includes the spatial location and size information of pigsty walls, pen partitions, columns and passages. Equipment operation data is obtained based on pigsty equipment operation records. The equipment operation data includes the location and operation period of ventilation equipment, feeding equipment and disinfection equipment. The location of the pigs' activity is determined based on the building layout data. Each location in the pigs' activity location is used as the starting point for sound propagation. Light projection simulation is performed on the target pigsty area. The light propagation path blocked by the building structure is determined based on the spatial overlap relationship between the projected light and the building layout of the target pigsty. The area corresponding to the blocked light propagation path is determined as the building shading area. The building penetration thickness in the sound propagation path is determined based on the building structure type and building thickness of each blocked light propagation path, and the corresponding sound attenuation is calculated based on the building penetration thickness. The sound attenuation is then mapped to the corresponding building shading area to obtain the building shading intensity distribution. Based on the equipment location in the equipment operation data, determine the sound propagation path between each operating device and each location in the set of pig activity locations, obtain the sound intensity of equipment noise at each location in the sound propagation path, and form the spatial distribution of equipment noise based on the sound intensity at each location. The spatial distribution of the equipment noise is correlated with the building layout of the target pigsty to determine the noise propagation impact area, and the noise propagation impact area is determined as the noise shielding area. The corresponding noise shielding intensity distribution is determined according to the sound intensity of the equipment operation noise in each noise propagation impact area. The building shielding intensity distribution and the noise shielding intensity distribution are superimposed according to spatial location to obtain the sound shielding intensity at each spatial location of the target pig house, and spatial mapping is performed based on the sound shielding intensity to construct the sound shielding distribution heat map.

3. The method for identifying and monitoring pig coughing based on distributed acoustic nodes according to claim 1, characterized in that, The density peak clustering algorithm is used to analyze the heatmap of the sound pickup masking distribution to identify the spatial clustering characteristics of the masking effect. Based on these spatial clustering characteristics, the deployment locations of the distributed acoustic nodes are determined, resulting in a distributed node deployment scheme, specifically: The spatial mapping area of ​​the sound masking distribution heatmap is divided into several spatial location units. The sound masking intensity of each spatial location unit is extracted as the feature value of each spatial location unit. The absolute value of the difference in sound masking intensity between any two spatial location units is calculated. The absolute value of the difference in sound masking intensity is used as the feature distance between spatial location units. A spatial location unit distance matrix is ​​constructed based on the feature distance. Calculate the sum of characteristic distances between the target spatial location unit and all other spatial location units, define the sum of characteristic distances as the local density of the target spatial location unit, sort the local densities of all spatial location units in descending order, and select the spatial location unit with the highest local density as the density peak candidate unit. The minimum feature distance between a density peak candidate unit and other spatial location units with a local density higher than the density peak candidate unit is calculated. The minimum feature distance is defined as the inter-cluster distance of the density peak candidate unit. The product of the local density of the density peak candidate unit and the inter-cluster distance is used as the clustering decision value of the density peak candidate unit. The density peak candidate unit with the largest clustering decision value is selected as the cluster center. Other spatial location units are assigned to the corresponding cluster centers according to the feature distance between other spatial location units and the cluster centers to form occlusion effect spatial clusters, thus obtaining the spatial clustering characteristics of the occlusion effect. Extract the average sound masking intensity of all spatial location units in each masking effect spatial cluster, determine the masking effect spatial cluster with the smallest average sound masking intensity as the target deployment cluster, calculate the average spatial coordinates of all spatial location units in the target deployment cluster, and take the spatial location corresponding to the average spatial coordinates as the deployment location of the distributed acoustic nodes. Traverse all masking effect spatial clusters to complete the deployment location determination, and obtain the distributed node deployment scheme.

4. The method for identifying and monitoring pig coughing based on distributed acoustic nodes according to claim 1, characterized in that, The process involves acquiring audio data of pig coughs, performing Mel-frequency cepstral coefficient analysis on the audio data to extract the acoustic features of the cough sound's spectrum, energy, and duration, thus obtaining the acoustic features of the pig coughs. Based on these acoustic features, a pig cough recognition model based on the LSTM algorithm is constructed. Specifically: Audio data of pigs coughing is collected, the audio data of pigs coughing is pre-emphasized, the pre-emphasized audio data of pigs coughing is divided into several frames of audio signals in chronological order, each frame of audio signal is windowed, and each frame of audio signal after windowing is subjected to fast Fourier transform to obtain the corresponding spectrum. The obtained spectrum is used to calculate the logarithmic energy of the output of each Mel filter through a Mel filter bank. The logarithmic energy is then subjected to discrete cosine transform to extract the Mel frequency cepstral coefficients. The energy value of each frame of audio signal is calculated based on the Mel frequency cepstral coefficients. The energy values ​​of each frame of audio signal are arranged in chronological order to obtain an energy sequence. The duration of the audio data of the pig cough is calculated from the start frame to the end frame. The Mel frequency cepstral coefficients, energy sequence and duration are combined to form the acoustic features of the pig cough. A long short-term memory network model is constructed, which includes an input layer, a hidden layer, and an output layer. The hidden layer is composed of several long short-term memory units, and each long short-term memory unit includes an input gate, a forget gate, and an output gate. The acoustic features of pig coughs are input into the input layer of the long short-term memory network model for training. The long short-term memory (LSTM) units in the hidden layer extract temporal features from the input acoustic features of pig coughs. The input gate controls the retention ratio of the current input information, the forget gate controls the forgetting ratio of the information from the previous time step, and the output gate controls the output ratio of the hidden state at the current time step. The extracted temporal features are then transmitted to the output layer, which classifies the temporal features through a fully connected layer to output the pig cough recognition result. Based on the correspondence between the pig cough recognition result and the acoustic features of pig coughs, the parameters of the LSM network model are adjusted to obtain the pig cough recognition model.

5. The method for identifying and monitoring pig coughing based on distributed acoustic nodes according to claim 1, characterized in that, The process involves acquiring ambient sound signals from the target pigsty via the distributed acoustic nodes, analyzing these signals, comparing their acoustic characteristics with the acoustic characteristics of pig coughs, determining sound types with similar characteristics to pig coughs, and obtaining similar interference sound types. Specifically: The distributed acoustic nodes synchronously collect environmental sound signals from different spatial locations within the target pigsty. The environmental sound signals are divided into frames according to time sequence. A short-time Fourier transform is performed on each frame of the environmental sound signal to obtain the time spectrum. The amplitude corresponding to each frequency in the time spectrum is extracted. Time frequency points with similar frequencies and continuous amplitude changes in adjacent time frames are connected to form multiple time frequency trajectories. Based on the frequency change direction and amplitude change relationship of each time-frequency trajectory in a continuous time frame, time-frequency trajectories with continuous frequency and energy changes are merged, and time-frequency trajectories that do not have a continuous time-frequency connection relationship with each other are separated to obtain multiple time-frequency components. Based on the start and end times, frequency ranges, and energy change data of each time-frequency component, amplitude correlation is calculated for time-frequency components with overlapping time ranges and overlapping frequency ranges. Time-frequency components with synchronous amplitude changes are merged, while time-frequency components with asynchronous amplitude changes are kept separate, thus dividing the ambient sound signal into multiple independent acoustic components. Mel frequency cepstral coefficients are extracted for each independent acoustic component, and acoustic features of the independent acoustic components are constructed based on the corresponding energy sequence, spectral characteristics and duration. The Euclidean distance between the acoustic features and the acoustic features of the pig cough is calculated, and the similarity between each independent acoustic component and the pig cough sound is determined based on the Euclidean distance. Independent acoustic components with a similarity greater than a preset similarity are identified as interfering sounds that have similar acoustic characteristics to the sound of a pig coughing. The sound type of the interfering sound is then determined, and the similar feature interfering sound type is obtained.

6. The method for identifying and monitoring pig coughing based on distributed acoustic nodes according to claim 1, characterized in that, The step of selecting the pig cough sound monitoring signals in the target pig house based on the similarity feature interference sound type to obtain the sound signal to be analyzed, and inputting the sound signal to be analyzed into the pig cough recognition model to identify and monitor the pig coughs in the target pig house, specifically: Based on the similar characteristic interference sound type, determine the corresponding physical sound source, obtain the equipment operation record, control status record or action status record corresponding to the physical sound source, and perform time correlation on the equipment operation record, control status record or action status record according to a unified time base, and determine the time period of interference sound occurrence corresponding to the similar characteristic interference sound type based on the change of the physical sound source's operation status. The sound monitoring signals in the target pigsty are continuously acquired through the distributed acoustic nodes. The sound monitoring signals are divided into frames according to time sequence, and the acquisition time of each frame of sound monitoring signal is matched with the time period of the occurrence of the similar feature interference sound type. The sound monitoring signals whose acquisition time is within the time period of the occurrence of the similar feature interference sound type are removed, and the sound monitoring signals without the time period of the occurrence of similar feature interference sound are taken as the sound signals to be analyzed. The independent acoustic components of the sound signal to be analyzed are extracted, and acoustic features are extracted from the independent acoustic components of the sound signal to be analyzed to obtain acoustic feature data of the sound signal to be analyzed. The acoustic feature data is input into the pig cough recognition model for temporal feature extraction and classification recognition, and the pig cough recognition results corresponding to each independent acoustic component are output. The monitoring results of pig cough in the target pig house are determined according to the occurrence time of the independent acoustic components corresponding to the pig cough recognition results.

7. A pig cough recognition and monitoring system based on distributed acoustic nodes, characterized in that, The pig cough recognition and monitoring system based on distributed acoustic nodes includes a memory and a processor. The memory includes a program for a pig cough recognition and monitoring method based on distributed acoustic nodes. When the program for a pig cough recognition and monitoring method based on distributed acoustic nodes is executed by the processor, it implements the steps of the pig cough recognition and monitoring method based on distributed acoustic nodes as described in any one of claims 1 to 6.