Intensive farm cage laying hen panic stress recognition system and method based on lightweight acoustic model
By using a lightweight acoustic model and relational knowledge distillation technology, a recognition system was constructed that can accurately identify the level of fear stress in laying hens under complex backgrounds. This solves the problems of time-consuming, labor-intensive, and insufficient recognition accuracy of traditional methods, and achieves efficient and accurate monitoring of stress in laying hens.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2026-04-27
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies struggle to accurately identify the level of fear stress in laying hens under complex background noise and diverse stressors. Furthermore, traditional methods are time-consuming, labor-intensive, and highly invasive, making it difficult to achieve real-time, non-disruptive monitoring.
A lightweight acoustic model was adopted, and a student model based on ECAPA-TDNN was constructed by combining an expansion shuffling module, a time-frequency attention module, and a relational knowledge distillation method. Acoustic features were extracted through Mel frequency cepstral coefficients to identify the level of fear stress in laying hens.
It achieves high-precision identification of the level of fear stress in laying hens in real-world farming scenarios, with an accuracy of 96.44% and a recall rate of 93.75%. The model has a low number of parameters and a good balance between recognition performance and real-time performance.
Smart Images

Figure CN122435948A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fear stress recognition technology for laying hens, specifically to a fear stress recognition system and method for caged laying hens in intensive poultry farms. Background Technology
[0002] Egg-laying hen farming is a crucial component of animal husbandry, and the health and welfare of laying hens have become core factors influencing their production performance and economic benefits. Chickens are inherently timid and highly susceptible to various environmental disturbances, leading to fear and stress responses. Stressful exposure weakens the immune response to pathogens, increases inflammation, and enhances disease susceptibility. Furthermore, persistent or repeated fear and stress can cause stunted growth, decreased egg production, and other negative impacts, ultimately harming animal welfare and economic efficiency. Therefore, timely and accurate monitoring of fear and stress in laying hens is essential for early detection of flock abnormalities, early warning of diseases and potential production risks, and effective intervention.
[0003] Traditional stress monitoring methods primarily rely on manual inspections and physiological indicator sampling. Manual inspections are time-consuming and labor-intensive, and often miss typical short-lived behaviors such as panic stress. While physiological indicator sampling can quantitatively assess stress levels, it is highly invasive and has time delays, making it difficult to achieve real-time, non-disruptive monitoring of the poultry farm. Therefore, promoting non-contact, automated welfare monitoring and assessment of chicken flocks is a trend in modern poultry farming. Currently, non-contact poultry monitoring methods are mainly based on video and audio. Although video-based detection is very intuitive, it faces significant limitations in practical applications. In Asia, layered cage systems are predominant in egg-laying chicken farming, and these systems suffer from severe visual occlusion problems. Furthermore, robot-based inspections typically only identify visible lesions or long-term abnormalities, failing to effectively capture short-lived behaviors such as panic stress. Crucially, the robot's patrolling behavior itself can become a confounding factor inducing stress in chicken flocks. In addition, fixed visual monitoring methods cannot achieve comprehensive coverage of the entire chicken house. In contrast, acoustic signals, with their strong penetrating power, flexible deployment methods, and high information density, demonstrate unique applicability in complex cage environments.
[0004] Significant progress has been made in the monitoring and analysis of poultry behavior based on acoustic technology. These studies primarily focus on three areas: first, acoustic feature modeling of routine poultry behavior; second, automatic identification of disease-related abnormal calls; and third, assessment of overall poultry welfare or stress levels based on acoustic parameters. These studies demonstrate the potential of sound technology in livestock and poultry information perception; however, certain limitations still exist. 1. The research scenario is disconnected from the actual application: Most studies are conducted in laboratories with relatively simple acoustic environments. Their models are difficult to apply directly to real commercial farms with complex background noise and severe sound source aliasing, thus limiting their generalization ability. 2. Lack of refined stress assessment: Existing research mostly focuses on binary judgments of "having" or "not having" stress, but this cannot meet the precise management needs of managers to take corresponding intervention measures based on the severity of stress. 3. Lack of a generalized stress identification model: Stressors in real-world farming environments are diverse and unpredictable, while existing models are often trained for specific stimuli (such as grasping, fasting, etc.), lacking an acoustic model that can ignore the type of stressor and robustly assess general stress levels. Summary of the Invention
[0005] To address the aforementioned challenges, this invention proposes a system and method for identifying panic stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model. The purpose of this invention is to accurately identify the general panic stress levels (non-stress, mild stress, and severe stress) in laying hens under diverse stressor environments, and to enhance the robustness of the model.
[0006] The present invention adopts the following technical solution: I. A method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model The method for identifying fear stress in caged laying hens includes the following steps: Step S1: Construct a student model; the student model includes an input module, three dilation and shuffling modules, a time-frequency attention module, an attention statistical pooling module, and an output module.
[0007] The input module is used to perform an initial one-dimensional convolution mapping on the acoustic input features, which are 13-dimensional Mel frequency cepstral coefficients.
[0008] Preferably, the input module mainly consists of a one-dimensional convolutional layer, a ReLU activation layer, and a first batch of normalization layers connected in sequence.
[0009] The dilation and shuffling module includes a first grouped one-dimensional convolutional unit, a channel shuffling unit, a dilated one-dimensional convolutional unit, and a second grouped one-dimensional convolutional unit connected sequentially along the data flow direction. The first grouped one-dimensional convolutional unit performs channel dimensionality reduction on the input features of the dilation and shuffling module. The channel shuffling unit performs channel shuffling on the dimensionality-reduced features output by the first grouped one-dimensional convolutional unit. The dilated one-dimensional convolutional unit extracts temporal features from the channel-shuffled features. The second grouped one-dimensional convolutional unit performs channel dimensionality increase on the output of the dilated one-dimensional convolutional unit. The output of the second grouped one-dimensional convolutional unit is element-wise added to the input of its respective dilation and shuffling module via a residual connection.
[0010] In the three dilatation shuffling modules, the void ratio of the one-dimensional convolutional unit with voids is set to 2, 3 and 1 respectively along the data flow direction.
[0011] In each dilatation shuffling module, the feature channel dimension output by the second grouped one-dimensional convolutional unit is the same as the feature channel dimension input by the dilatation shuffling module.
[0012] In each dilatation shuffling module, the first group one-dimensional convolutional unit and the second group one-dimensional convolutional unit are both 1×1 convolutions, and the number of groups is 4.
[0013] In each dilation shuffling module, the channel shuffling unit rearranges the output channels of the first group of one-dimensional convolutional units according to the grouping method of the first group of one-dimensional convolutional units, so that the rearranged adjacent channels come from different channel groups.
[0014] The time-frequency attention module is used to enhance key time-frequency discrimination information to improve the ability to distinguish easily confused sounds such as pecking sounds and cage-banging sounds. The time-frequency attention module includes two parallel attention branches: a time attention branch and a frequency attention branch. The time attention branch is used to pool the input features of the time-frequency attention module along the frequency dimension to obtain a time series descriptor, and then perform one-dimensional convolution processing on the time series descriptor to obtain and output the time attention features. The size of the one-dimensional convolution kernel in the time attention branch is 3. The frequency attention branch is used to pool the input features of the time-frequency attention module along the time dimension to obtain a frequency statistical descriptor, and then perform multilayer perceptron processing on the frequency statistical descriptor to obtain and output the frequency attention features. The multilayer perceptron in the frequency attention branch includes two fully connected layers. The time attention features and the frequency attention features are fused by element-wise addition and normalized by the Sigmoid function to form a time-frequency attention matrix. The time-frequency attention matrix is multiplied element-wise with the input features of the time-frequency attention module to obtain weighted features, which are then output to the attention statistical pooling module.
[0015] The attention statistical pooling module is used to aggregate the output (weighted features) of the time-frequency attention module into a fixed-dimensional feature vector.
[0016] Preferably, the attention statistical pooling module mainly consists of an attention statistical pooling layer and a second batch normalization layer connected in sequence.
[0017] The output module is used to output the type of fear stress in laying hens based on the fixed-dimensional feature vector.
[0018] Specifically, the output module includes a first fully connected layer and a second fully connected layer, wherein the output dimension of the second fully connected layer matches the number of categories of fear stress in laying hens.
[0019] Step S2: Using the pre-trained ECAPA-TDNN model as the teacher model, and using the pre-built dataset, train the student model through the relational knowledge distillation (RKD) method to obtain the trained student model, which is then used as a model for recognizing the fear stress of caged laying hens.
[0020] In the training process of step S2, the loss function mainly consists of the prediction loss of the student model and the knowledge distillation loss of the relationship between the teacher model and the student model; the relational knowledge distillation loss includes distance loss and angle loss.
[0021] In step S2, the dataset includes stressed samples and non-stressed samples, and the stressed samples are collected from the following stress sources: (a) Human factors: Unauthorized entry by strangers; (b) Mechanical factors: Robotic inspection; (c) Biological factors: simulated invasion of natural enemies.
[0022] Step S3: Collect the sound signal of laying hens in the breeding environment, use a 4th order Butterworth high-pass filter to perform high-pass filtering on the sound signal of laying hens, and then perform spectral subtraction noise reduction on the filtered sound signal of laying hens to obtain the preprocessed sound signal of laying hens. Extract the Mel frequency cepstral coefficients from the preprocessed sound signal of laying hens as acoustic input features, input the acoustic input features into the caged laying hen fear stress recognition model, and output the laying hen fear stress category.
[0023] In step S3, the sampling rate of the hen's sound signal is 44100 Hz; the cutoff frequency of the high-pass filter is 500 Hz; the spectral subtraction noise reduction uses a Hamming window for frame processing with a window length of 4096 points and a frame shift of 1024 points; when extracting the Mel frequency cepstral coefficients, the frame length is 25 ms, the frame shift is 10 ms, the number of fast Fourier transform points is 2048, and the number of Mel filter banks is 128.
[0024] In step S3, the categories of stress in laying hens include non-stress, mild stress, and severe stress.
[0025] II. A system for recognizing the fear and stress of caged laying hens in intensive poultry farms The egg-laying hen fear stress recognition system is deployed on an edge computing device and includes: The audio acquisition module is used to collect sound signals from laying hens in the breeding environment; The preprocessing module is used to perform high-pass filtering on the hen sound signal acquired by the audio acquisition module using a 4th-order Butterworth high-pass filter, and then perform spectral subtraction noise reduction on the filtered hen sound signal to obtain the preprocessed hen sound signal. The feature extraction module is used to extract Mel frequency cepstral coefficients from the preprocessed hen sound signal as acoustic input features; The recognition module is used to input the acoustic input features into the caged laying hen fear stress recognition model and output the laying hen fear stress category. The results output module is used to output the types of fear stress in laying hens, or to visualize the types of fear stress in laying hens.
[0026] The beneficial effects of this invention are: 1. This invention proposes a lightweight acoustic model for deployment at the end of a farm, which can efficiently and robustly identify the general panic stress level of laying hens under diverse stressors.
[0027] 2. This invention designs an expansion shuffling module in a lightweight acoustic model and uses this module to efficiently extract key temporal features of the chicken's panic sounds. While significantly compressing the model, it can effectively capture the long-term dependencies in the chicken's call signals by expanding the receptive field.
[0028] 3. This invention introduces a time-frequency attention module into the lightweight acoustic model. This module can adaptively focus on the most distinctive time-frequency features, effectively enhancing the model's ability to recognize easily confused sounds such as the sound of hens banging against the cage in fear and the sound of them eating.
[0029] 4. This invention uses a relational knowledge distillation method to train a lightweight acoustic model, which is then used as a student model. The complex acoustic knowledge of a large teacher network is transferred to the student model, thereby improving the overall performance of the student model without increasing inference costs.
[0030] 5. Experimental results show that the model of the present invention achieves high-precision recognition in real aquaculture scenarios, with an accuracy of 96.44% and a recall of 93.75%. At the same time, the model has a parameter count of 0.34 M and a floating-point computation of 39.86 M, exhibiting low model complexity and achieving a good balance between recognition performance and real-time performance.
[0031] In summary, the lightweight acoustic model proposed in this invention successfully achieves a balance between recognition performance, lightweight efficiency, and generalization ability, providing an effective solution for deploying non-contact, sophisticated stress monitoring systems for laying hens at the farm end. Furthermore, this invention can also provide a technical reference for evaluating the impact of intelligent devices on the behavioral responses of laying hens. Attached Figure Description
[0032] Figure 1 A schematic diagram of sound acquisition from laying hens; where (a) is the data acquisition device; and (b) is the acquisition path. Figure 2 The diagram illustrates the stressor simulation; (a) represents human factors (unknown personnel entering); (b) represents mechanical factors (robot inspection); (c) represents biological factors mimicking the entry of natural enemies (simulated birds); and (d) represents biological factors mimicking the entry of natural enemies (rats). Figure 3 A comparative diagram of the sound of laying hens before (top) and after (bottom) noise reduction; Figure 4 Examples of spectral diagrams of laying hen sounds under different stress levels: (a) daily calls under non-stress conditions; (b) feeding sounds under non-stress conditions; (c) calls under mild stress conditions; (d) panic calls under severe stress conditions. Figure 5 This is a schematic diagram of the Mel frequency cepstral coefficient feature extraction process; Figure 6 A framework diagram of a chicken panic stress sound recognition model based on relational knowledge distillation; Figure 7 A schematic diagram of the structure of a lightweight acoustic model; Figure 8 This is a schematic diagram of the expansion and washing module; where (a) is a schematic diagram of the module's structure and (b) is a schematic diagram of the washing process. Figure 9 The results are the performance evaluation results of the lightweight acoustic model; where (a) is the PR curve and (b) is the normalized confusion matrix diagram. Figure 10 This is a comparison chart of the overall performance of the embodiments of the present invention with other algorithms; Figure 11 This is a schematic diagram of the system architecture of the present invention; Figure 12 The graph shows the probability trend of continuous stress identification for different breeds of laying hens under actual production conditions; (a) represents the Hy-Line Grey flock; and (b) represents the Hy-Line Brown flock. Figure 13 This is a schematic diagram of the time-frequency attention module. Detailed Implementation
[0033] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] This invention provides a system for recognizing panic stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model. The system incorporates this lightweight acoustic model. During the training process, on the one hand, this invention proposes combining quantitative behavioral indicators from videos with acoustic feature parameters from audio to provide data support for defining different stress levels, ensuring the objectivity of stress level classification. On the other hand, this invention proposes constructing a dataset by collecting sound data from various common stressors (human, mechanical, and biological factors), thereby training a model with good generalization ability, enabling it to accurately identify common acoustic patterns of panic stress induced by different stimuli.
[0035] The present invention provides a method for identifying fear stress in caged laying hens in intensive poultry farms, comprising the following steps: Step S1: Construct the student model. The student model adopts a TDNN architecture, which includes an input module, three cascaded dilated shuffling modules, a time-frequency attention module, an attention statistical pooling module, and an output module. First, the core of the caged laying hen fear stress recognition model is the dilated shuffling module, which integrates grouped convolution and channel shuffling to reduce model complexity. Simultaneously, dilated convolution is introduced to effectively expand the receptive field. Second, the time-frequency attention module addresses the confusion between sounds with similar short-term spectra but different macroscopic patterns, such as pecking sounds and fearful cage-banging sounds, in real-world farming scenarios, enhancing the model's ability to distinguish acoustic features. Finally, a relational knowledge distillation training method is used (the training process framework is as follows...). Figure 6 As shown, the more powerful pre-trained ECAPA-TDNN model is used as the teacher network, and its structured knowledge is transferred to the caged laying hen fear stress recognition model of this invention, so as to further improve the overall performance of the model without increasing the inference cost.
[0036] The structure of the fear stress recognition model for caged laying hens is as follows: Figure 7 As shown, where: The input module is used to perform an initial one-dimensional convolutional mapping on the acoustic input features, which are 13-dimensional Mel frequency cepstral coefficients. Preferably, the input module mainly consists of a one-dimensional convolutional layer, a ReLU activation layer, and a first batch of normalization layers connected in sequence.
[0037] like Figure 8As shown in (a), the dilation shuffling module includes a first group of one-dimensional convolutional units, a channel shuffling unit, a dilated one-dimensional convolutional unit, and a second group of one-dimensional convolutional units connected sequentially along the data flow direction. The first group of one-dimensional convolutional units performs channel dimensionality reduction on the input features of the dilation shuffling module. The channel shuffling unit performs channel shuffling on the dimensionality-reduced features output by the first group of one-dimensional convolutional units. The dilated one-dimensional convolutional unit extracts temporal features from the channel-shuffled features. The second group of one-dimensional convolutional units performs channel dimensionality increase on the output of the dilated one-dimensional convolutional units. The output of the second group of one-dimensional convolutional units is added element-wise with the input of its respective dilation shuffling module through a residual connection.
[0038] In the three dilation shuffling modules, the porosity of the dilated one-dimensional convolutional units is set to 2, 3, and 1 sequentially along the data flow direction. This is crucial for recognizing the panic cries of laying hens, as panic cries are often accompanied by specific, long-duration temporal patterns, and the receptive field design provided by this invention helps the model capture this long-term temporal dependency.
[0039] In each dilatation shuffling module, the feature channel dimension of the output of the second group of one-dimensional convolutional units is the same as the feature channel dimension of the input of its own dilatation shuffling module. The second group of one-dimensional convolutional units increases the dimensionality of their output features to the same dimension as the input of the dilatation shuffling module through channel upscaling, and then adds the output features to the original input of the dilatation shuffling module through a residual connection. This structure not only ensures the effective propagation of gradients in deep networks but also allows the modules to focus on learning residual features, further improving the training efficiency and performance of the model.
[0040] In the three dilation and shuffling modules, the first group of one-dimensional convolutional units and the second group of one-dimensional convolutional units are both 1×1 convolutions, and the number of groups is 4.
[0041] like Figure 8 As shown in (b), in the three dilation shuffling modules, the channel shuffling unit rearranges the output channels of the first group of one-dimensional convolutional units according to the grouping method of the first group of one-dimensional convolutional units, so that the rearranged adjacent channels come from different channel groups. By systematically reorganizing the channels of the feature map, efficient interaction of cross-group information is achieved, thereby enhancing the feature learning ability of the network without increasing computational overhead.
[0042] The time-frequency attention module enhances key time-frequency discrimination information to improve the ability to distinguish easily confused sounds such as pecking sounds and cage-banging sounds. The time-frequency attention module includes two parallel attention branches: a temporal attention branch and a frequency attention branch. The temporal attention branch pools the input features of the time-frequency attention module along the frequency dimension to obtain a time-series descriptor, and then performs a one-dimensional convolution on the time-series descriptor to obtain and output the temporal attention features. The one-dimensional convolution kernel size in the temporal attention branch is 3. The frequency attention branch pools the input features of the time-frequency attention module along the time dimension to obtain a frequency statistical descriptor, and then performs a multilayer perceptron processing on the frequency statistical descriptor to obtain and output the frequency attention features. The multilayer perceptron in the frequency attention branch includes two fully connected layers. The temporal attention features and frequency attention features are fused by element-wise addition and normalized by the Sigmoid function to form a time-frequency attention matrix. The time-frequency attention matrix is then multiplied element-wise with the input features of the time-frequency attention module to obtain weighted features, which are then output to the attention statistical pooling module. The time-frequency attention module reweights features along the time-frequency dimension, enabling the caged layer hen stress recognition model to focus on the most discriminative key information before pooling. This module guides the network to focus on the most recognizable joint time-frequency patterns, significantly improving the model's classification accuracy in layer hen farming scenarios: In actual farming, layer hens exhibit behavior such as banging against the cage when under stress. These banging sounds share similar transient and impulse characteristics with the sounds of pecking at feed troughs, posing a challenge to the model's accurate recognition. Figure 4 As shown, spectral analysis reveals that the pecking sounds of the flock are characterized by a series of highly rhythmic, dense energy pulses concentrated in the mid-to-high frequency range (approximately 4 kHz to 10 kHz). In contrast, impacts on the cage manifest as more isolated, higher-energy broadband impact events, with energy distributed across a wider frequency band (approximately 0.5 kHz to 10 kHz) and containing significant low-frequency components. Temporally, these impacts occur at a lower frequency and lack periodicity. The time-frequency attention module in this invention can adaptively capture this subtle but crucial difference in time-frequency patterns, thereby significantly improving the model's classification accuracy in egg-laying hen farming scenarios.
[0043] The attention statistical pooling module is used to aggregate the output (weighted features) of the time-frequency attention module into a fixed-dimensional feature vector; preferably, the attention statistical pooling module mainly consists of an attention statistical pooling layer and a second batch normalization layer connected in sequence.
[0044] The output module is used to output the category of fear stress in laying hens based on the fixed-dimensional feature vector. The output module includes a first fully connected layer and a second fully connected layer. The output dimension of the second fully connected layer matches the number of categories of fear stress in laying hens.
[0045] Preferably, the output dimension of the second fully connected layer is 3, and the stress categories of laying hens include non-stress, mild stress, and severe stress.
[0046] Step S2: Using the pre-trained ECAPA-TDNN model as the teacher model, and using the pre-built dataset, train the student model through relational knowledge distillation to obtain the trained student model, which is then used as a model for recognizing the fear stress of caged laying hens.
[0047] The ECAPA-TDNN model is primarily composed of multiple cascaded SE-Res2Net modules. This module combines the multi-scale feature extraction capabilities of Res2Net with the channel attention mechanism of SE-Block, effectively capturing acoustic features at different time scales. Furthermore, the model utilizes a multi-layer feature aggregation strategy to fuse feature maps of different depths and generates the final feature embedding through an Attentive Statistics Pooling (ASP) layer. In this invention, for the task of recognizing the startled sounds of laying hens, the pre-trained ECAPA-TDNN teacher network has already constructed clear inter-class boundaries and intra-class aggregations for different types of hen calls (such as rhythmic pecking sounds, isolated impact sounds, and normal calls) in its feature space. By learning this relational knowledge, the lightweight student network can not only learn to recognize individual sound samples but also understand the relative differences and similarities between different sound categories.
[0048] During training, the loss function mainly consists of the prediction loss of the student model and the knowledge distillation loss of the relationship between the teacher model and the student model; the relational knowledge distillation loss includes distance loss and angle loss.
[0049] The loss function can be expressed as:
[0050] In the formula, Indicates the total loss. This represents the standard cross-entropy loss calculated between the predicted output of the student model and the true label. This represents the predicted output of the student model. Represents the true labels of the student model. This represents the knowledge distillation loss, indicating the relationship between the teacher model and the student model. The feature embeddings of the student model are represented. The feature embedding of the teacher model is represented. , These represent the weight hyperparameters of the two loss terms, respectively.
[0051] During training, the dataset used includes stressed and non-stressed samples. The stressed samples are collected from the following stress sources: (a) Human factors: Unauthorized entry by strangers; (b) Mechanical factors: Robotic inspection; (c) Biological factors: simulated invasion of natural enemies.
[0052] Step S3: Collect the sound signals of laying hens in the breeding environment, use a 4th-order Butterworth high-pass filter to perform high-pass filtering on the sound signals of laying hens, and then perform spectral subtraction noise reduction on the filtered sound signals of laying hens to obtain preprocessed sound signals of laying hens. Extract the Mel frequency cepstral coefficients from the preprocessed sound signals of laying hens as acoustic input features, input the acoustic input features into the caged laying hen fear stress recognition model, and output the laying hen fear stress category.
[0053] In step S3, the sampling rate of the hen's sound signal is 44100 Hz; the cutoff frequency of the high-pass filter is 500 Hz; the spectral subtraction noise reduction uses a Hamming window for frame processing with a window length of 4096 points and a frame shift of 1024 points; when extracting the Mel frequency cepstral coefficients, the frame length is 25 ms, the frame shift is 10 ms, the number of fast Fourier transform points is 2048, and the number of Mel filter banks is 128.
[0054] The present invention also provides a system for identifying the fear stress of caged laying hens in intensive farms, applicable to the above-mentioned method for identifying fear stress in caged laying hens in intensive farms.
[0055] The egg-laying hen fear stress recognition system is deployed on edge computing devices, including: The audio acquisition module is used to collect sound signals of laying hens from one or more monitoring points in the breeding environment. In multi-point scenarios, a multi-channel sound card can be used for synchronous or quasi-synchronous acquisition, and channel identifiers and timestamps can be added to the audio data. The preprocessing module uses a 4th-order Butterworth high-pass filter to perform high-pass filtering on the hen sound signals from each monitoring point acquired by the audio acquisition module, in order to filter out low-frequency background noise and irrelevant frequency components; then, spectral subtraction is performed on the high-pass filtered hen sound signals to improve the signal-to-noise ratio under complex noise backgrounds, resulting in the preprocessed hen sound signals; in specific implementations, GPU acceleration of spectral subtraction denoising can also be used. The feature extraction module is used to extract Mel frequency cepstral coefficients from the preprocessed hen sound signal as acoustic input features; in specific implementations, sound features such as log Mel spectrum and short-time Fourier transform spectrum can also be used as acoustic input features to adapt to different recognition models. The recognition module is used to input acoustic input features into the caged laying hen fear stress recognition model and output the laying hen fear stress category; The results output module is used to output the types of fear stress in laying hens, or to visualize the types of fear stress in laying hens.
[0056] Furthermore, the stress categories for laying hens can also include the category, probability, or level of the target sound event. The category of the target sound event can include stress-related sound events, respiratory health-related sound events such as coughing, sneezing, and wheezing, and abnormal environmental sound events.
[0057] Furthermore, the recognition module can also support loading different model structures and weight parameters through model configuration files, enabling model configurability and replaceability. When switching tasks, expansion can be achieved by changing the model configuration and weights without altering the system's acquisition, preprocessing, and output framework.
[0058] Furthermore, the results output module can also generate event logs.
[0059] Furthermore, the results output module can also support one or more of the following functions: probability trend curves, event lists, alarm triggering, and switching display by monitoring point and historical event tracing and playback.
[0060] Furthermore, the intensive farm cage-raised layer hen fear stress recognition system of the present invention may also include a storage module for storing raw audio (optional), features, recognition logs, event records, model weights and configuration files, etc., for traceability and statistical analysis.
[0061] Furthermore, the stress recognition system for caged laying hens in intensive poultry farms of the present invention may also include a communication module for uploading recognition results, event summaries, or alarm information to a remote management terminal; preferably, only low-bandwidth result information is uploaded to reduce dependence on network bandwidth.
[0062] Furthermore, the stress recognition system for caged laying hens in intensive poultry farms of the present invention is preferably deployed on an edge computing device: by using the edge computing device to carry out the operation of the above modules, a local closed-loop processing from data collection to output is achieved, thereby avoiding the latency and link risks caused by cloud transmission.
[0063] Specific embodiments of the present invention are as follows: In the following embodiments, such as Figure 1As shown in (a), a supercardioid electret microphone with a frequency response range of 80 Hz to 14 kHz was selected as the audio acquisition tool. The recorder model was ZOOM F6, with a recording sampling frequency of 44.1 kHz and a 32-bit acquisition precision. To ensure accurate sound annotation, video recording of the laying hens' activities was simultaneously used during data acquisition to provide a reference for subsequent annotation and analysis. To achieve audio-video alignment later, timecoders were used to provide timecodes for both the recorder and the video recorder. Since the types and intensities of noise vary in different locations within the laying hen house, to ensure the universality of the collected sound data, according to... Figure 1 In the middle route (orange arrow), the sounds of laying hens under no external influence and the sounds of laying hens with external interference were collected at multiple points at multiple time periods.
[0064] The process of constructing the dataset includes high-pass filtering, spectral subtraction for noise reduction, and dataset labeling and partitioning. High-pass filtering: The original recording contains continuous strong low-frequency noise from equipment such as exhaust fans, which masks the hen's vocalizations. Spectral analysis shows that the main energy of this mechanical noise is concentrated below 500 Hz, while the fundamental frequency of hen vocalizations is typically between 800 and 1500 Hz. Therefore, in this embodiment, a fourth-order Butterworth high-pass filter with a cutoff frequency of 500 Hz is used to filter out low-frequency noise and other irrelevant frequency components. The filter transfer function is defined as:
[0065] in, This is the amplitude-frequency response of the filter. It is the signal frequency. The cutoff frequency is set to 500 Hz. Let be the filter order, set to 4.
[0066] Spectral subtraction noise reduction: After initially filtering out low-frequency noise from the equipment, stable broadband noise, including airflow noise, still exists in the chicken coop. Therefore, frequency domain noise reduction processing is required for the noisy signals. In this embodiment, the noisy frequency... Windowing and frame division processing were performed. A Hamming window was chosen, with a window length of 4096 points, corresponding to approximately 92.9 ms of time. The frame shift was 1024 points to balance time and frequency resolution. The final denoising effect is as follows. Figure 3 As shown, the reconstructed audio signal retains the vocal components of the laying hen while effectively suppressing persistent low-frequency background noise, thus improving the clarity and recognizability of the signal.
[0067] Dataset labeling and segmentation: When laying hens are exposed to external stimuli, they exhibit varying degrees of stress responses. As shown in Table 1, this embodiment classifies the panic stress response of laying hens into three levels based on their behavioral and acoustic characteristics.
[0068]
[0069] Figure 4 Audio spectrograms of laying hens under different conditions. Figure 4 (a) shows the daily crowing of laying hens. It can be seen that the noise level at the bottom of the poultry house is around 500 Hz to 1500 Hz. At 0.7 s and 3.5 s, some chickens make normal crowing sounds with a frequency of around 1200 Hz. Figure 4 (b) is the sound of laying hens feeding together. At this time, when the chickens peck at the food, their beaks will collide with the metal feed trough, producing a stable high-frequency sound above 4000 Hz. Occasionally, the laying hens will make a call at around 1000 Hz. Figure 4 (c) is a mild stress call. At this time, the laying hens are slightly agitated and will collide with the metal cage, producing an unstable sound above 4000 Hz. At the same time, some chickens will only make intermittent high-frequency calls with a frequency of 800 Hz to 2000 Hz. Figure 4 (d) indicates severe stress, characterized by widespread agitation and panic in the flock, with chickens jumping and banging on their cages. Laying hens continuously emit high-frequency, sharp cries, accompanied by persistent high-frequency impact sounds. It's worth noting that laying hens exhibit diverse behaviors during mild stress, and their spectrograms can sometimes resemble those of normal feeding, resulting in smaller interspecific differences and increasing the difficulty of identification.
[0070] Because the data was collected from actual poultry farming scenarios, there was overlap in chicken sounds, making annotation difficult. In this embodiment, experts used video recordings as a reference, listened to the denoised audio, and annotated it using Adobe Audition 2022 software. Three categories were labeled: no stress, mild stress, and severe stress. Annotated sound segments were divided into 4-second segments, with segments shorter than 4 seconds discarded. This resulted in a dataset containing 3563 laying hen sound samples: 2668 non-stressed segments, 843 mildly stressed segments, and 52 severely stressed segments. To comprehensively evaluate model performance and avoid randomness caused by segmentation bias, this embodiment used a 10-fold cross-validation method for model training and testing.
[0071] Audio Feature Extraction: Due to the high dimensionality and redundant information of raw audio waveform data, it is not suitable as direct input to the model. To effectively capture the acoustic characteristics of the vocalizations of laying hens under different stress states, this embodiment uses Mel-frequency cepstral coefficients (MFCCs) as the core acoustic feature. The complete MFCC feature extraction process is as follows: Figure 5 As shown.
[0072] After the above steps, the denoised hen audio signal is finally converted into a set of 13-dimensional MFCC feature vectors. These feature vectors effectively characterize the key acoustic information of the audio, serving as input for subsequent classification models.
[0073] Example 1 In this embodiment, dataset A was constructed based on sound samples collected from an egg-laying chicken farm in Hangzhou, Zhejiang Province. Figure 2 As shown, this embodiment simulates several typical external stressors. These interfering factors include: (a) human factors (intrusion of strangers); (b) mechanical factors (robot inspection); and (c) to (d) biological factors (simulation of intrusion of natural enemies such as birds and mice). To avoid the data collector becoming a continuous interfering variable, this embodiment first collects data on the human factor (intrusion of strangers). After the chickens adapt to the data collector (demonstrated by normal feeding and drinking behavior when the experimenter is present), the same data collector then performs the data collection tasks for the other stressors.
[0074] In this embodiment, the input to the student model is a 13-dimensional MFCC feature extracted from the clucking sounds of laying hens. In the training configuration, the batch size is set to 32, and the total number of training epochs is 100. To optimize model performance, Adam is selected as the optimizer, with an initial learning rate of 0.001 and a weight decay coefficient of 0.0001.
[0075] In the distillation framework of this embodiment, after pre-training the ECAPA-TDNN teacher network, its parameters are completely frozen, aiming to provide stable high-order knowledge supervision signals for the student network.
[0076] In this embodiment, the loss function used in the training process with ECAPA-TDNN as the teacher network, represented by the relational knowledge distillation method, is as follows:
[0077] in, It is the standard cross-entropy loss calculated between the predicted output of the student model and the true label. This is the RKD loss, which constrains the feature embedding of the student model through distance loss and angle loss. Feature embedding with teacher model They have similar structural relationships. and It is a hyperparameter that balances the two loss terms, and in this embodiment, it is set to 0.5.
[0078] After training, a model for recognizing the fear stress of caged laying hens was obtained. Table 2 shows the classification evaluation results of this model on the validation set for sounds under different stress states in laying hens. It is evident that the model demonstrates high accuracy and reliability in classifying sounds under different stress states in laying hens.
[0079]
[0080] Specifically, the model is suitable for severe stress. Value (accuracy) Both the recall and F1 score reached 100%, indicating that the model can accurately identify severe stress sounds in laying hens. Furthermore, the model's recognition performance in non-stressed states was also very robust, with an F1 score of 96.57% and a particularly high recall of 98.50%, meaning the model almost never missed samples from non-stressed states. The model also achieved good recognition results in the more difficult-to-distinguish category of mild stress. The F1 score reached 94.62%, and the F1 score also reached 88.29%.
[0081] like Figure 9 As shown, the PR curve and normalized confusion matrix provide a more in-depth visual analysis of the results. The PR curve further confirms the model's accuracy from the perspective of mean precision (AP). AP values for all categories are at a high level: 100% for severe stress, 98.55% for non-stress, and 92.98% for mild stress. This indicates that the model maintains robust performance with high precision and high recall across all classification thresholds. The confusion matrix further confirms that the model achieves 100% recall for the key severe stress identification, while also demonstrating a high recall of 98% for non-stress states, showcasing strong identification capabilities.
[0082] To verify the performance of each module in the model, an ablation experiment was conducted in this embodiment using the controlled variable method: Model ①: TDNN baseline model; Model ②: An expansion shuffling module (abbreviated as DS in the table) is introduced into the TDNN baseline model (abbreviated as TDNN in the table) as a lightweight core, which significantly reduces the computational cost and parameter count of the model by 66.68% and 51.56%, respectively; Model ③: To compensate for the performance loss that may be caused by model compression and to enhance the model's ability to identify features of similar hen call spectra, a time-frequency attention module (abbreviated as TF in the table) was introduced. The value increased significantly from 86.30% to 92.52%; Finally, to further improve the overall performance of the model, a relational knowledge distillation method (abbreviated as RKD in the table) was adopted with ECAPA-TDNN as the teacher network. The final model (i.e., the previously obtained caged laying hen fear stress recognition model) was then developed. Value and The values increased by 0.15% and 1.23% respectively.
[0083] The results of the ablation experiment are shown in Table 3. These results fully demonstrate the rationality of the model of this invention: the dilatation shuffling module ensures computational efficiency, the time-frequency attention module improves recognition accuracy, and the knowledge distillation method further explores the performance potential of the model. Together, the three achieve an effective balance between performance and efficiency in the task of recognizing stress sounds in laying hens.
[0084]
[0085] Example 2 This embodiment provides a system for recognizing the fear stress of caged laying hens in intensive poultry farms, and the deployment scheme is as follows: Figure 11 As shown. The main hardware of this system adopts an edge computing platform, which works with a sound card to capture multi-channel audio synchronously and acquires high-fidelity sound signals through a microphone. The control and computing modules fully cover the end-to-end process from raw audio acquisition, 4th-order Butterworth high-pass filtering, GPU-accelerated spectral subtraction noise reduction to real-time model inference.
[0086] To adapt to the engineering constraints of the farm site, the system in this embodiment adopts the following deployment method: The microphone wiring reused the existing lighting circuit path in the building, reducing additional construction work by laying the microphone and its cables along the existing circuit path. The acquisition link adopts differential transmission (e.g., XLR shielded twisted pair cable) to enhance electromagnetic interference resistance, that is, effectively resist the electromagnetic interference generated by high-power fans and other electrical equipment in intensive farming environments; While ensuring coverage, a sparse deployment scheme is adopted to reduce the number of sensors and the overall cost. In the data acquisition / training phase, directional microphones are used to improve the quality of labeled data, while omnidirectional microphones are used in the field deployment phase to improve spatial coverage.
[0087] The system in this embodiment is mounted on an edge computing device with a housing size of 35×18×20 cm, which allows for flexible deployment in a centralized control cabinet at the entrance of the poultry house or installation on the structural support inside the house.
[0088] To evaluate the upper limit of the system's computing power in high-concurrency monitoring scenarios, rigorous stress tests were conducted on the NVIDIA Jetson AGX Orin (64 GB) platform. The results are shown in Table 4. It can be seen that the average end-to-end inference latency measured for a single 4-second audio window is 23.89 ms.
[0089]
[0090] Based on this latency result, a single edge computing node can theoretically support real-time processing of up to 167 audio streams without data loss. To further consider task scheduling overhead, memory throughput fluctuations, and long-term operational stability, a safe load threshold of 125 concurrent channels was determined. This threshold was obtained by applying a 75% utilization factor to the theoretical maximum value, thus providing a safety margin consistent with reliable real-time systems engineering principles. This capacity is sufficient to meet the refined monitoring needs of most large-scale intensive poultry farming facilities.
[0091] As can be seen, the system of the present invention has high concurrency processing capability and can meet the needs of multi-channel real-time monitoring in large-scale farms.
[0092] Example 3 To verify the adaptability of the system of the present invention to different breeding environments, additional acoustic data was collected from the Hy-Line Grey chicken coop of a large farm in Huzhou City, Zhejiang Province to construct dataset B, with a total of 1399 samples. Zero-shot inference and fine-tuning methods were used to verify the recognition effect. Model 4: 420 segments were randomly selected from dataset B as an independent test set. The caged laying hen fear stress recognition model obtained in Example 1 was used for inference to evaluate the zero-shot generalization ability of the model.
[0093] Model 5: The model was fine-tuned using the remaining 979 fragments and evaluated again on the same test set to verify the model's ability to adapt to new environments with a small amount of data.
[0094] The results are shown in Table 5. Without fine-tuning, the model's F1 score still reaches 87.79%, demonstrating good initial adaptability. It is worth noting that the model achieved 100% precision and recall for severely stressed samples without fine-tuning, indicating that the acoustic features of severe stress have strong cross-scenario consistency and are unaffected by changes in cage specifications. After fine-tuning, the model's precision was 96.51%, recall was 93.13%, and F1 score was 94.79%, comparable to the results of the cage-raised laying hen panic stress recognition model on the validation set of dataset A.
[0095]
[0096] To further verify the robustness of the invention in actual production scenarios, in this embodiment, the fine-tuned model was deployed in the system of Example 2, and a continuous 12-hour test (8:30-20:30) was conducted in chicken houses for both Hy-Line Grey and Hy-Line Brown breeds. Video monitoring was used as the ground truth for comparison, and the results were recorded as follows. Figure 12 As shown.
[0097] Depend on Figure 12 As can be seen in (a), for Hy-Line Grey chicken houses, the system accurately captured the panic events induced by manual handling (around 11:28) and abnormal light stimulation (around 17:44), and the identified trends highly matched the behavioral characteristics of the chicken flock recorded in the video. Figure 12 As can be seen in (b), the system also accurately detected the stress in laying hens induced by manual inspection (around 09:33) in Hy-Line Brown chicken houses. At other times, the laying hens did not show a significant stress response, with only a few individual hens exhibiting some stress-induced cries due to feather pecking, competing for food, etc., at certain times.
[0098] In particular, although the acoustic characteristics of Hy-Line Brown chickens were never included in the original training set of the model, the system still performed robustly in the chicken house, which fully demonstrates that the system has strong cross-breed adaptability and cross-scenario generalization ability.
[0099] Comparative Example To verify the advanced nature of the proposed model in recognizing the fear and stress sounds of laying hens, this comparative example evaluated the performance of five models—CAM++, PANNs-CNN6, ECAPA-TDNN, ERes2Net, and Res2Net—on the same dataset as Example 1. The results are shown in Table 6.
[0100]
[0101] It can be seen that the model in Example 1 has only 0.34M parameters and only 39.86M computational resources, which are only 5.6% and 4.0% of the teacher model ECAPA-TDNN, respectively. The F1 score and F1 score are very close to those of the teacher model. The values even surpass those of the teacher model. Furthermore, the average time required for the model in Example 1 to process 1 second of audio samples is only 0.10 ms, approximately twice as fast as the ECAPA-TDNN model. This demonstrates that, compared to the teacher network ECAPA-TDNN, the student model achieves a significant optimization in model complexity at the cost of minimal performance difference, fully proving the effectiveness of the lightweight strategy and knowledge distillation method in this example. Compared to models such as CAM++, PANNs-CNN6, and ERes2Net, the model in Example 1 exhibits superior overall performance in terms of recognition performance, parameter count, and inference speed. Although the model in Example 1 still has room for further optimization in terms of computational cost compared to Res2Net, its recognition accuracy and inference speed are both superior to Res2Net.
[0102] Figure 10 The overall performance of different algorithms was compared using radar charts. In these charts, all indicators were normalized; data points closer to the outer circle indicate better performance for that indicator, and a larger area enclosed by the curve indicates better overall algorithm performance. It can be clearly seen that among the comparative models listed in Table 6, the model obtained in Example 1, with the lowest number of parameters and the fastest inference speed, [except...]. Its F1 score and F1 score are slightly lower than ECAPA-TDNN, its computational cost is slightly higher than Res2Net, and it has the highest accuracy in all other metrics.
[0103] In summary, the system and method of this invention successfully achieve a balance between lightweight design and high recognition performance, demonstrating excellent overall performance and meeting the requirements for accurate and rapid recognition of the fright stress sounds of laying hens.
[0104] The above specific embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.
[0105] The above description is only a preferred embodiment of the present invention. Therefore, all equivalent changes or modifications made to the structure, features and principles described in the claims of this patent application are included in the scope of this patent application.
Claims
1. A method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model, characterized in that: The method for identifying fear stress in caged laying hens includes the following steps: Step S1: Construct a student model; the student model includes, in sequence, an input module, three dilation shuffling modules, a time-frequency attention module, an attention statistical pooling module, and an output module; The dilatation shuffling module includes a first grouped one-dimensional convolutional unit, a channel shuffling unit, a dilated one-dimensional convolutional unit, and a second grouped one-dimensional convolutional unit connected sequentially along the data flow direction. The first grouped one-dimensional convolutional unit performs channel dimensionality reduction on the input features of the dilated shuffling module. The channel shuffling unit performs channel shuffling on the dimensionality-reduced features output by the first grouped one-dimensional convolutional unit. The dilated one-dimensional convolutional unit extracts temporal features from the channel-shuffled features. The second grouped one-dimensional convolutional unit performs channel dimensionality increase on the output of the dilated one-dimensional convolutional unit. The output of the second grouped one-dimensional convolutional unit and the input of the dilated shuffling module are added element-wise through a residual connection. Step S2: Using the ECAPA-TDNN model as the teacher model, and using a pre-built dataset, train the student model through relational knowledge distillation to obtain the trained student model, which is then used as a model for recognizing the fear stress of caged laying hens. Step S3: Collect the sound signal of laying hens in the breeding environment, use a 4th order Butterworth high-pass filter to perform high-pass filtering on the sound signal of laying hens, and then perform spectral subtraction noise reduction on the filtered sound signal of laying hens to obtain the preprocessed sound signal of laying hens. Extract the Mel frequency cepstral coefficients from the preprocessed sound signal of laying hens as acoustic input features, input the acoustic input features into the caged laying hen fear stress recognition model, and output the laying hen fear stress category.
2. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In the three dilatation shuffling modules, the porosity of the one-dimensional convolutional unit with holes is set to 2, 3 and 1 respectively along the data flow direction; In each dilatation shuffling module, the feature channel dimension output by the second grouped one-dimensional convolutional unit is the same as the feature channel dimension input by the dilatation shuffling module.
3. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In the three dilation shuffling modules, the first group one-dimensional convolution unit and the second group one-dimensional convolution unit are both 1×1 convolutions, and the number of groups is 4. The channel shuffling units rearrange the output channels according to the grouping method of the first group one-dimensional convolution unit, so that the rearranged adjacent channels come from different channel groups.
4. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: The time-frequency attention module includes two parallel attention branches: a time attention branch and a frequency attention branch. The temporal attention branch is used to pool the input features of the time-frequency attention module along the frequency dimension to obtain a time series descriptor, and then perform a one-dimensional convolution on the time series descriptor to obtain and output the temporal attention features; the size of the one-dimensional convolution kernel in the temporal attention branch is 3. The frequency attention branch is used to pool the input features of the time-frequency attention module along the time dimension to obtain a frequency statistical descriptor, and then process the frequency statistical descriptor using a multilayer perceptron to obtain and output the frequency attention features; the multilayer perceptron in the frequency attention branch includes two fully connected layers. The temporal attention features and the frequency attention features are fused by adding them element by element, and then normalized by the Sigmoid function to form a time-frequency attention matrix. The time-frequency attention matrix is multiplied element by element with the input features of the time-frequency attention module to obtain weighted features, which are then output to the attention statistical pooling module.
5. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: The input module is used to perform an initial one-dimensional convolution mapping on the acoustic input features, which are 13-dimensional Mel frequency cepstral coefficients. The attention statistical pooling module is used to aggregate the output of the time-frequency attention module into a fixed-dimensional feature vector. The output module is used to output the hen fear stress category based on the fixed-dimensional feature vector. The output module includes a first fully connected layer and a second fully connected layer. The output dimension of the second fully connected layer matches the number of hen fear stress categories.
6. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In step S3, the sampling rate of the hen's sound signal is 44100 Hz; the cutoff frequency of the high-pass filter is 500 Hz; the spectral subtraction noise reduction uses a Hamming window for frame processing with a window length of 4096 points and a frame shift of 1024 points; when extracting the Mel frequency cepstral coefficients, the frame length is 25 ms, the frame shift is 10 ms, the number of fast Fourier transform points is 2048, and the number of Mel filter banks is 128.
7. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In the training process of step S2, the loss function mainly consists of the prediction loss of the student model and the knowledge distillation loss of the relationship between the teacher model and the student model; the relational knowledge distillation loss includes distance loss and angle loss.
8. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In step S3, the categories of stress in laying hens include non-stress, mild stress, and severe stress.
9. The method for identifying fear stress in caged laying hens in intensive poultry farms based on a lightweight acoustic model according to claim 1, characterized in that: In step S2, the dataset includes stressed samples and non-stressed samples, and the stressed samples are collected from the following stress sources: (a) Human factors: Unauthorized entry by strangers; (b) Mechanical factors: Robotic inspection; (c) Biological factors: simulated invasion of natural enemies.
10. A system for identifying fear stress in caged laying hens in intensive poultry farms, applicable to the method for identifying fear stress in caged laying hens as described in any one of claims 1 to 9, characterized in that: The egg-laying hen fear stress recognition system is deployed on an edge computing device and includes: The audio acquisition module is used to collect sound signals from laying hens in the breeding environment; The preprocessing module is used to perform high-pass filtering on the hen sound signal acquired by the audio acquisition module using a 4th-order Butterworth high-pass filter, and then perform spectral subtraction noise reduction on the filtered hen sound signal to obtain the preprocessed hen sound signal. The feature extraction module is used to extract Mel frequency cepstral coefficients from the preprocessed hen sound signal as acoustic input features; The recognition module is used to input the acoustic input features into the caged laying hen fear stress recognition model and output the laying hen fear stress category. The results output module is used to output the types of fear stress in laying hens, or to visualize the types of fear stress in laying hens.