A comprehensive evaluation method for the indoor temperature and humidity environment quality centered on the thermal sensation response of pigs

By integrating pig house environmental, behavioral, and physiological data through a deep learning model, a multimodal comprehensive evaluation model was established. This solved the problems of lag and one-sidedness in existing pig house environmental quality assessments, enabling a scientific assessment of pig house environmental comfort and improving the scientific validity and credibility of the assessment.

CN122087570APending Publication Date: 2026-05-26NORTHEAST AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NORTHEAST AGRICULTURAL UNIVERSITY
Filing Date
2026-02-03
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

The existing pigsty environmental quality assessment system relies too heavily on single-physical-dimensional data obtained from non-biological sensors, which fails to capture the dynamic physiological and behavioral responses of pigs to environmental disturbances. This results in lagging and one-sided assessments, making it difficult to systematically quantify the impact of environmental changes on pigs' core physiological parameters and behavioral patterns.

Method used

By using effective temperature, pig physiological parameters, and lying distance as evaluation indicators, and combining deep learning models (such as CMC-PLD, Echo Memory Network, Cross-modal AttentionTemporal Network, etc.) to comprehensively evaluate the thermal response of pigs, a multimodal comprehensive evaluation model is established by integrating environmental, behavioral, and physiological data to achieve a scientific assessment of the comfort of the pig house environment.

Benefits of technology

This approach enables a scientific transition from environmental data to pig comfort assessment, breaking through the bottleneck of traditional single-factor evaluation, improving the scientific rigor and credibility of environmental comfort assessment, and more accurately reflecting physiological and behavioral responses within the pigsty.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087570A_ABST
    Figure CN122087570A_ABST
Patent Text Reader

Abstract

This invention discloses a comprehensive evaluation method for the temperature and humidity environment quality in pigsties, centered on the pig's thermal response. It establishes three feature extraction sub-networks to extract features from pigsty environmental modalities, pig physiological modalities, and behavioral modalities, respectively, obtaining the effective temperature ET' and lying distance. Distance By combining pig silhouette images, respiratory rate (RR), heart rate (HR), and body temperature (RT) with these data, and then extracting features from each, a cross-modal attention time network method is used to fuse the data to determine the environmental level of the pigsty. This deep integration of environmental physical parameters and animal biological response data achieves a scientific transition from "environmental data" to "pig's perceived comfort." This completely breaks through the bottleneck of traditional single-factor assessment, shifting the assessment from apparent physical indicators to intrinsic physiological responses. The assessment results possess animal-centered characteristics, greatly improving the scientific rigor and credibility of environmental comfort assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to evaluation methods, and in particular relates to a comprehensive evaluation method for the quality of indoor temperature and humidity environment centered on the thermal response of pigs. Background Technology

[0002] With the development of modern pig farming towards intensification and large-scale operations, stocking densities have increased significantly. The environmental conditions inside pig houses have become a core limiting factor determining animal welfare, health status, and maximizing production performance. Suitable thermal and humidity parameters within the pig house can significantly reduce heat or cold stress responses in pigs, thereby lowering the incidence and prevalence of respiratory and intestinal diseases. Simultaneously, comfortable environmental conditions can maximize feed intake, improve feed utilization efficiency, and achieve higher average daily weight gain and lower feed conversion ratios. However, current pig house environmental quality assessment systems generally have limitations, namely, over-reliance on single-physical-dimensional data obtained from non-biological sensors (such as thermometers, hygrometers, and gas probes). This single-factor, in vitro assessment model cannot capture the dynamic and real physiological and behavioral responses of pigs to environmental disturbances.

[0003] Specifically, while current research utilizes temperature and humidity sensors to continuously collect environmental parameters, this ability to characterize the impact of environmental conditions on pig herds is significantly lagging and one-sided, lacking a basis in the pigs' perception of environmental comfort and physiological feedback mechanisms. Therefore, it is difficult to systematically quantify the effects of environmental changes on core physiological parameters (such as changes in body temperature and heart rate) and key behavioral patterns (such as lying posture) in pigs. Thus, relying solely on physical environmental sensor data to assess comfort is insufficient, failing to confirm environmental suitability from the perspective of the pigs' physiological needs and thermal balance. This lack of assessment perspective directly limits the construction of an objective and comprehensive environmental quality evaluation index system, making it difficult to provide a basis for precise environmental control decisions. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a comprehensive evaluation method for the quality of indoor temperature and humidity environment centered on the thermal response of pigs.

[0005] The present invention provides a comprehensive evaluation method for the quality of indoor temperature and humidity environment centered on the thermal response of pigs, which is achieved through the following steps: S1: Evaluation Indicators for Temperature and Humidity Environment Quality By using effective temperature, pig physiological parameters, and the distance between pigs lying down as evaluation indicators, they were divided into suitable C1, relatively suitable C2, and unsuitable C3, respectively.

[0006] S2: Data Acquisition Under five different environmental conditions—normal temperature and humidity with normal wind speed, low temperature and high humidity with normal wind speed, normal temperature and high humidity with normal wind speed, high temperature and high humidity with high wind speed, and low temperature and normal humidity with normal wind speed—the indoor humidity (RH1…RH5) and ambient temperature were collected. T air1 ... T air5 and wind speed v 1…… v 5 Rectal temperature, heart rate, and respiratory rate of pigs were collected under the corresponding environment. Physiological parameter data were collected at 8:00 and 14:00 every day, with a time interval of 15 minutes between each collection, for a total of 12 times per day. The temperature and humidity data of the pig house were collected at a time interval of 1 minute. The average of the environmental data 15 minutes before the physiological data collection was taken as the final temperature and humidity data of the pig house. A camera was set up at a height of about 2.5 m to collect behavioral data of pigs continuously for 24 hours.

[0007] S3: Pig lying distance detection By reconstructing the original YOLOv11 model into the C3K2 module and replacing the attention mechanism module, an improved CMC-PLD model is proposed to realize the detection of pig lying-down behavior and distance, including the following steps: Step 1: Replace the C3K2 module with the C3Ghost module to extract multi-layer semantic features of piglet outline, texture and local pose, suppress redundant information of background texture and shadow, and effectively capture local limb fragments that are not completely occluded in the group. The second step involves a multi-scale feature processing network, comprising two parts: the MutscaleEdgeInfoGenerator module and the ConvEdegeFusion module. The MutscaleEdgeInfoGenerator module uses multiple 3×3 convolutional kernels to generate edge features at three detection scales: P3, P4, and P5, representing local edges, overall contours, and the outer boundaries of clustered groups, respectively. After contour extraction by the C3Ghost module, the ConvEdegeFusion module adaptively fuses the edge features with the corresponding scale backbone features, preserving semantic information while enhancing target boundary details and improving the ability to separate individual piglets in densely clustered scenes. Step 3: After processing by the above modules, the C2PSACoordATT attention mechanism module is used to enhance the response of key regions, fuse coordinate information to highlight the discriminative features of occluded piglets, adaptively enhance the attention weight of key features, suppress the interference of redundant information, and output the final extracted pig outline image V1. Based on the above model, the lying-down behavior of pigs is detected, and the outline image V1 of each pig in the video and its bounding rectangle are identified. Through geometric calculation, the center point coordinates of each detection box are obtained, and the Euclidean distance between every two pigs in the group is calculated. d n To use a representative value to characterize the lying-down degree of the entire pig herd, the arithmetic mean of all calculated distances was taken as the lying-down distance. Distance As shown in formula (1), where d n The distance between the center points of the two pigs is the coordinate distance. n This represents the number of pigs in the lying-down group. (1).

[0008] S4: Determination of the effective temperature ET' in the pigsty Based on the environmental humidity, environmental temperature, and wind speed collected in step S2 under five different environments, the effective temperature ET' inside the pigsty under each of the five environments is calculated as shown in equation (2), where: T air RH represents the ambient temperature inside the pigsty, and RH represents the ambient humidity inside the pigsty. v Let be the wind speed inside the pigsty; a, c, and e are all constants, where a represents the effect of relative humidity, c represents the effect of airflow, and e represents the weight of the airflow. (2).

[0009] S5: Establishment of a multimodal comprehensive evaluation model for temperature and humidity environment quality The effective temperature ET', physiological parameters of pigs, and behavioral data obtained in step S4 are used as inputs, and the evaluation level is used as the output. After fusing various features, the suitability level of the current pigsty is evaluated, forming a comprehensive evaluation model for pigsty environmental comfort. This model includes a data input layer, a feature encoding layer, a multimodal fusion layer, and a temperature and humidity environmental comfort evaluation layer, specifically including the following steps: Step 1: Input multi-source heterogeneous data into the data input layer. The multi-source heterogeneous data specifically includes: ① Environmental data: effective temperature ET'; ② Behavioral data: prone distance. Distance ③ Physiological data: respiratory rate (RR), heart rate (HR), and body temperature (RT) of pigs were obtained in the experiment. All modal data underwent time synchronization preprocessing before the input data layer to ensure the consistency of heterogeneous data in the time dimension. Step 2: The feature encoding layer is mainly responsible for extracting high-dimensional features from modal data from different sources. ① The environmental data is used to extract features from the effective temperature ET' using an Echo Memory Network structure. This structure includes two modules: a one-dimensional convolutional neural network and a bidirectional gated recurrent unit. The one-dimensional convolutional network module automatically extracts local features such as the rate of temperature rise and other changing trends within a local time window. Then, the bidirectional gated loop unit module applies local features. Bidirectional time-series modeling is performed to capture the correlation structure between past and future environmental states, characterizing the dynamic cyclical process of environmental control. The extracted environmental features are denoted as F. e ; ② Behavioral modalities mainly include the lying distance between piglets, using the CMC-PLD model constructed in step 3 as the output. Further, a Vision Transformer with Multi-head Self-Attention is employed to extract pig contour images V1 to fully exploit spatial features: First, the image is divided into image patches and global feature modeling is performed through visual transformation, highlighting the interaction structure between pigs and effectively capturing global spatial dependencies; then, the global spatial dependency information of the image is extracted through a multi-head self-attention mechanism to construct the global spatial relationship of the pig herd distribution. This structure can identify the pig herd distribution pattern, and the resulting output features can effectively characterize the spatial aggregation and activity features of the pig herd. These features are fused with the lying distance calculated in step 3 to form behavioral features, denoted as F. b ; ③ A Double Convolution Layer structure is selected for extracting physiological data. First, a densely connected layer with 128 neurons is used to map the physiological data into a high-dimensional feature space. The second layer further compresses and purifies the features through 64 neurons. Each layer introduces nonlinear activation using the ReLU activation function to enhance nonlinear expressive power. After purification, a high-dimensional feature vector, denoted as F, is generated. p The calculation formula is shown in equation (3), where ReLU is the activation function. These are the weights of the first layer convolutional kernel. For the first layer bias, These are the weights of the second-layer convolutional kernel. For the second layer of bias, the specific values ​​of each coefficient are obtained by inputting physiological parameters. Automatic fitting and determination; (3) The third step, the multimodal fusion layer, uses a cross-modal attention temporal network structure to achieve information interaction and fusion between in-house environmental features, behavioral features, and physiological features; specifically, it includes the following steps: ① The modal data (F) after feature extraction e F b F p This is unified to the same dimension through a linear projection layer, denoted as F. e `、F b `、F p `; ②The environmental mode F e As the dominant behavioral modality feature F b `and physiological modal characteristics F p As complementary components in attention calculation, this highlights the impact of environmental changes on pig behavior and physiological state: First, the behavioral modality feature F... b `and physiological modal characteristics F p `The splicing is denoted as P, and the physiological modal features F` p `with behavioral modality features F b `The splicing is denoted as B, and the environmental mode F is...` e Let E be the fusion feature. Calculate the attention weights of E, B, and P, and concatenate the weighted features. This generates a rich context vector by fusing multi-source information from environment, behavior, and physiology. The extracted context vector is then added to the original features using residuals, mitigating gradient vanishing while preserving original information. Further normalization is applied to accelerate model convergence. This fusion feature is denoted as F. c ; ③ Fuse features F c Using the temporal network layer in the CATTN architecture, time-series modeling of multimodal fusion features is performed. The temporal dependencies between multimodal features are captured through forward and backward propagation, resulting in the final temporally enhanced fusion features. ; Step 4: The temperature and humidity environment comfort evaluation layer adopts a DCL network structure. The first dense connection layer uses 128 neurons to integrate temporal enhancement features. The mapping is performed, and the second layer further uses 64 neurons to focus on temporal enhancement of fusion features. The core information is as follows: ReLU activation function is introduced after each linear transformation to enhance nonlinear expressive power, and Dropout strategy is adopted to prevent model overfitting; the core features compressed to 64 dimensions are mapped to 3 evaluation categories, the original predicted scores are output, the original predicted scores are normalized by Softmax to convert them into category probabilities, and the category with the highest probability is taken as the final evaluation result; that is, a multimodal comprehensive evaluation model for temperature and humidity environment quality is established.

[0010] S6: Evaluation Method Step 1: Install sensor monitoring nodes in the target pigsty, including temperature sensors, humidity sensors and anemometers, to continuously collect data at a frequency of once per minute and timestamp it; deploy cameras to record pig behavior 24 hours a day; and use physiological monitoring instruments to collect physiological parameters of the pigs. Step 2: Take the average of the environmental data from the 15 minutes prior to physiological data collection and use it as the environmental data during physiological data collection; substitute the averaged environmental data parameters into the effective temperature calculation formula to obtain the current effective temperature of the pigsty; extract the effective frames from the video data and input them into the improved CMC-Pig Lying Distance model to realize the detection of pig lying behavior. Step 3: Input the three types of data into the multimodal comprehensive evaluation method model for temperature and humidity environment quality through the data input layer. First, high-dimensional features are extracted from the modal data from different sources through the feature encoding layer. Then, the information interaction and fusion between environmental, behavioral and physiological features is realized through the multimodal fusion layer using a cross-modal attention time network structure. Finally, the final environmental quality evaluation is output in the temperature and humidity environment comfort evaluation layer using a DCL structure in conjunction with the Softmax function.

[0011] This invention presents a comprehensive evaluation method for indoor temperature and humidity environment quality centered on the pig's thermal response. By deeply integrating environmental physical parameters (such as temperature, humidity, and airflow velocity) with animal biological response data (including core physiological parameters and behavioral characteristics monitored non-contactly), it achieves a scientific transition from "environmental data" to "pig's perceived comfort." This completely breaks through the bottleneck of traditional single-factor assessment, shifting the evaluation from apparent physical indicators to intrinsic physiological responses. The evaluation results possess animal-centered characteristics, greatly improving the scientific rigor and credibility of environmental comfort assessment. Attached Figure Description

[0012] Figure 1 This is a flowchart illustrating the invention process; Figure 2 An improved CMC-PLD model framework diagram; Figure 3 Here is a diagram of the C3Ghost module structure; Figure 4Here is a structural diagram of the C2PSACoordATT module; Figure 5 Structure diagram of an environmental assessment model based on multimodal data fusion. Detailed Implementation

[0013] The present invention provides a comprehensive evaluation method for the quality of indoor temperature and humidity environment centered on the thermal response of pigs, which is achieved through the following steps: S1: Evaluation Indicators for Temperature and Humidity Environment Quality The technical solution of this application uses effective temperature, pig physiological parameters (body temperature, heart rate, respiratory rate), and the lying distance between pigs as evaluation indicators. The effective temperature threshold is obtained by combining national standards with actual experimental results; the thresholds for pig physiological parameters are based on their normal physiological parameter ranges and combined with the changes in physiological parameters under different temperature and humidity conditions during the experiment; the lying distance between pigs is obtained by recognizing the lying behavior of pigs under different temperature and humidity conditions and calculating the distance between the centers of the pigs' bodies. By combining evaluation indicators with the actual feedback of pigs to heat, the environmental quality was divided into three levels: suitable (C1), relatively suitable (C2), and unsuitable (C3) through experiments. Corresponding threshold ranges were established within each level, and a temperature and humidity environmental quality evaluation index system was constructed, as shown in Table 1 below:

[0014] S2: Data Acquisition This application collected data on indoor humidity (RH1…RH5) and ambient temperature under five typical pigsty environmental conditions (i.e., normal temperature and humidity with normal wind speed, low temperature and high humidity with normal wind speed, normal temperature and high humidity with normal wind speed, high temperature and high humidity with high wind speed, and low temperature and normal humidity with normal wind speed). T air1 ... T air5 and wind speed v 1…… v 5Rectal temperature (handheld electronic thermometer, Nerni, Shijiazhuang), heart rate, and respiratory rate (handheld DBB15 pulse oximeter, Xiangya Technology, Zhengzhou, China) were collected for each pig under the corresponding environmental conditions. In this embodiment, there were 35 pigs in the pigsty. Physiological parameter data were collected at 8:00 and 14:00 every day, with a time interval of 15 minutes between each collection, for a total of 12 times per day. The temperature and humidity data of the pigsty were collected at a time interval of 1 minute. The average of the environmental data 15 minutes before the physiological data collection was used as the environmental data for the physiological data collection. A zoomed-hemisphere Type 1 web camera (Hikvision, Hangzhou) was set up at a height of about 2.5 m to collect behavioral data of the pigs 24 hours a day.

[0015] S3: Pig lying distance detection Pigs are highly sensitive to changes in temperature and humidity parameters within the pigpen, exhibiting different behaviors under varying conditions: in lower temperatures, pigs tend to lie down in clusters, while in higher temperatures, they lie down more dispersedly. Therefore, the clustering of pigs' lying-down behavior (lying-down distance) can accurately reflect their comfort level in the temperature and humidity environment. This application innovatively proposes using pig lying-down behavior and key physiological parameters as characteristics of the pig's response to temperature and humidity, integrating data from indoor environmental sensors to construct a comprehensive evaluation method for indoor temperature and humidity comfort based on the pig's own response. By reconstructing the original YOLOv11 model's C3K2 module and replacing the attention mechanism module, an improved CMC-PLD model is proposed to achieve pig lying-down behavior and distance detection. Figure 2 As shown, it includes the following steps: Step 1: Replace the C3K2 module with the C3Ghost module, such as... Figure 3 As shown, multi-layer semantic features of piglet outline, texture and local pose are extracted, background texture and shadow redundancy information are suppressed, and robust parsing of occlusion and complex scenes is achieved, effectively capturing local limb fragments that are not completely occluded in the group. The second step is the Multi Scale Feature Processing (MSFP) network, which consists of two parts: the MultiScaleEdgeInfoGenerator module and the ConvEdegeFusion module. The MultiScaleEdgeInfoGenerator module uses multiple sets of 3×3 convolutional kernels to generate edge features at three detection scales: P3, P4, and P5, representing local edges, overall contours, and outer boundaries of clustered groups, respectively. After contour extraction by the C3Ghost module, the ConvEdegeFusion module adaptively fuses the edge features with the corresponding scale backbone features, preserving semantic information while enhancing target boundary details and improving the ability to separate individual piglets in densely clustered scenes. Step 3: After the above modules have processed the data, the C2PSACoordATT attention mechanism module is used to enhance the response in key regions, such as... Figure 4 As shown, by fusing coordinate information to highlight the discriminative features of occluded piglets, the attention weight of key features (such as the unoccluded head and limb edges) can be adaptively enhanced, while suppressing the interference of redundant information, so as to enhance the feature extraction performance in complex scenes and output the final extracted pig outline image V1. Based on the above model, the lying-down behavior of pigs is detected, and the outline image V1 of each pig in the video and its bounding rectangle are identified. Through geometric calculation, the center point coordinates of each detection box are obtained, and the Euclidean distance between every two pigs in the group is calculated. d n To use a representative value to characterize the lying-down degree of the entire pig herd, the arithmetic mean of all calculated distances was taken as the lying-down distance. Distance As shown in formula (1), where d n The distance between the center points of the two pigs is the coordinate distance. n This represents the number of pigs in the lying-down group. (1).

[0016] S4: Determination of the effective temperature ET' in the pigsty Based on the national standard for environmental parameters and environmental management of large-scale pig farms (GBT 17824.3-2008 Environmental Parameters and Environmental Management of Large-scale Pig Farms) and actual experimental data, the comfortable range of environmental parameters in the pig house was determined. The effective temperature (ET') in the pig house was calculated from the temperature, humidity and airflow data obtained by the sensors. Based on the environmental humidity, environmental temperature and wind speed collected in step S2 under five different environments, the effective temperature ET' in the pig house under the five different environments was calculated as shown in equation (2), where: T airRH represents the ambient temperature inside the pigsty, and RH represents the ambient humidity inside the pigsty. v The wind speed inside the pigsty; a, c, and e are all constants, where a represents the effect of relative humidity, c represents the effect of airflow, and e represents the weight of airflow. Based on experimental data, the values ​​are determined as follows: a = 0.05, c = 0.1, e = 0.5. (2).

[0017] S5: Establishment of a multimodal comprehensive evaluation model for temperature and humidity environment quality The model uses three main categories of data as input: the effective temperature (ET') of five types obtained in step S4, the corresponding physiological parameters of 35 pigs, and the behavioral data of each pig in the same pen. The evaluation level is used as the output. After fusing these features, the current suitability level of the pigsty is evaluated, forming a comprehensive evaluation model for pigsty environmental comfort. Its overall structure is as follows: Figure 5 As shown, the model includes a data input layer, a feature encoding layer, a multimodal fusion layer, and a temperature and humidity environment comfort evaluation layer, specifically including the following steps: Step 1: Input multi-source heterogeneous data into the data input layer. The multi-source heterogeneous data specifically includes: ① Environmental data: effective temperature ET' (calculated from temperature, humidity, and wind speed); ② Behavioral data: prone distance. Distance ③ Physiological data: respiratory rate (RR), heart rate (HR), and body temperature (RT) of pigs were obtained in the experiment. All modal data underwent time synchronization preprocessing before the input data layer to ensure the consistency of heterogeneous data in the time dimension. Step 2: The feature encoding layer is mainly responsible for extracting high-dimensional features from modal data from different sources. ① Because the changes in environmental parameters are time-dependent and smooth, the environmental modality feature extraction network adopts the Echo Memory Network (Echo-Net) structure to extract features of the effective temperature ET'. This structure includes two modules: a one-dimensional convolutional neural network and a bidirectional gated recurrent unit. The one-dimensional convolutional network module automatically extracts local features such as the rate of temperature rise and other changing trends within a local time window. Then, the bidirectional gated loop unit module applies local features. Bidirectional time-series modeling is performed to capture the correlation structure between past and future environmental states, characterizing the dynamic cyclical process of environmental control. The extracted environmental features are denoted as F. e ; ② Behavioral modalities mainly include the lying distance between piglets. The CMC-PLD model constructed in step 3 is used as the output. To further enhance the ability to extract behavioral features of the pig herd, a VisionTransformer with Multi-head Self-Attention (ViT-MSA) is used to extract pig contour images V1 to fully explore the spatial features in the image: First, the image is divided into image blocks and global feature modeling is performed through visual transformation to highlight the interaction structure between pigs and effectively capture global spatial dependencies; then, the global spatial dependency information of the image is extracted through the multi-head self-attention mechanism to construct the global spatial relationship of the pig herd distribution. This structure can identify the distribution pattern of the pig herd, and the output features can effectively characterize the spatial aggregation and activity features of the pig herd. It is fused with the lying distance calculated in step 3 to form a behavioral feature, denoted as F. b ; ③ Because physiological data are structured numerical features with low dimensionality and certain nonlinear relationships exist between physiological parameters, a Double Convolution Layer (DCL) structure is chosen to extract the physiological data. First, a densely connected layer with 128 neurons maps the physiological data to a high-dimensional feature space. The second layer further compresses and refines the features using 64 neurons. Each layer incorporates a ReLU activation function to introduce nonlinear activation and enhance nonlinear expressive power. After purification, a high-dimensional feature vector, denoted as F, is generated. p The calculation formula is shown in equation (3), where ReLU is the activation function. These are the weights of the first layer convolutional kernel. For the first layer bias, These are the weights of the second-layer convolutional kernel. For the second layer of bias, the specific values ​​of each coefficient are obtained by inputting physiological parameters. Automatic fitting and determination; (3) The third step, the multimodal fusion layer, uses a Cross-modal Attention Temporal Network (CATTN) structure to achieve information interaction and fusion between in-house environmental features, behavioral features, and physiological features; specifically, it includes the following steps: ① The modal data (F) after feature extraction e F b F p This is unified to the same dimension through a linear projection layer, denoted as F. e `、F b `、F p `; ② In a group-housed piglet environment, environmental parameters are the direct drivers of comfort, while behavioral and physiological parameters represent the pigs' responsiveness to environmental changes. Based on this, the environmental modality F... e As the dominant behavioral modality feature F b `and physiological modal characteristics F p As complementary components in attention calculation, this highlights the impact of environmental changes on pig behavior and physiological state: First, the behavioral modality feature F... b `and physiological modal characteristics F p `The splicing is denoted as P, and the physiological modal features F` p `with behavioral modality features F b `The splicing is denoted as B, and the environmental mode F is...` e Let E be the fusion feature. Calculate the attention weights of E, B, and P, and concatenate the weighted features. This generates a rich context vector by fusing multi-source information from environment, behavior, and physiology. The extracted context vector is then added to the original features using residuals, mitigating gradient vanishing while preserving original information. Further normalization is applied to accelerate model convergence. This fusion feature is denoted as F. c ; ③ Although effective fusion in the feature space has been achieved, environmental parameters, pig behavioral parameters, and physiological parameters all inherently possess significant time-series characteristics. To fully reflect the temporal changes in the pigsty environment and understand the lag effect of environmental changes on pig behavior and physiological responses, the fused feature F... c Using the temporal network layer in the CATTN architecture, time-series modeling of multimodal fusion features is performed. The temporal dependencies between multimodal features are captured through forward and backward propagation, resulting in the final temporally enhanced fusion features. ; Step 4: The main purpose of the temperature and humidity environment comfort evaluation layer is to integrate time-series enhanced features. This is mapped to specific environmental comfort levels to evaluate the comfort of the temperature and humidity environment in pigsties. This layer employs a DCL network structure; the first densely connected layer utilizes 128 neurons to integrate temporal enhancement features. The mapping is performed, and the second layer further uses 64 neurons to focus on temporal enhancement of fusion features. The core information is as follows: ReLU activation function is introduced after each linear transformation to enhance nonlinear expressive power, and Dropout strategy is adopted to prevent model overfitting; the core features compressed to 64 dimensions are mapped to 3 evaluation categories, the original predicted scores are output, the original predicted scores are normalized by Softmax to convert them into category probabilities, and the category with the highest probability is taken as the final evaluation result; that is, a multimodal comprehensive evaluation model for temperature and humidity environment quality is established.

[0018] S6: Evaluation Method Step 1: Install sensor monitoring nodes in the target pigsty, including temperature sensors, humidity sensors and anemometers, to continuously collect data at a frequency of once per minute and timestamp it; deploy cameras to record pig behavior 24 hours a day; and use physiological monitoring instruments to collect physiological parameters of the pigs. Step 2: Take the average of the environmental data from the 15 minutes prior to physiological data collection and use it as the environmental data during physiological data collection; substitute the averaged environmental data parameters into the effective temperature calculation formula to obtain the current effective temperature of the pigsty; extract the effective frames from the video data and input them into the improved CMC-Pig Lying Distance model to realize the detection of pig lying behavior. Step 3: Input the three types of data into the multimodal comprehensive evaluation method model for temperature and humidity environment quality through the data input layer. First, high-dimensional features are extracted from the modal data from different sources through the feature encoding layer. Then, the information interaction and fusion between environmental, behavioral and physiological features is realized through the multimodal fusion layer using a cross-modal attention time network structure. Finally, the final environmental quality evaluation is output in the temperature and humidity environment comfort evaluation layer using a DCL structure in conjunction with the Softmax function.

Claims

1. A comprehensive evaluation method for indoor temperature and humidity environment quality centered on pig body thermal response, characterized in that: This is achieved through the following steps: S1: Evaluation Indicators for Temperature and Humidity Environment Quality By using effective temperature, pig physiological parameters, and the distance between pigs lying down as evaluation indicators, and incorporating the pigs' own response to heat into the evaluation criteria, the pigs were divided into suitable C1, relatively suitable C2, and unsuitable C3. S2: Data Acquisition Under five different environmental conditions—normal temperature and humidity with normal wind speed, low temperature and high humidity with normal wind speed, normal temperature and high humidity with normal wind speed, high temperature and high humidity with high wind speed, and low temperature and normal humidity with normal wind speed—the indoor humidity (RH1…RH5) and ambient temperature were collected. T air1 ... T air5 and wind speed v 1…… v 5 Rectal temperature, heart rate, and respiratory rate of pigs were collected under the corresponding environmental conditions. Physiological parameter data were collected at 8:00 and 14:00 every day, with a 15-minute interval between each collection, for a total of 12 times per day. Temperature and humidity data of the pigsty were collected at 1-minute intervals, and the average of the environmental data in the 15 minutes before the physiological data collection was taken as the temperature and humidity data of the pigsty. A camera was set up at a height of about 2.5 m to collect behavioral data of pigs continuously for 24 hours. S3: Pig lying distance detection By reconstructing the original YOLOv11 model into the C3K2 module and replacing the attention mechanism module, an improved CMC-PLD model is proposed to realize the detection of pig lying-down behavior and distance, including the following steps: Step 1: Replace the C3K2 module with the C3Ghost module to extract multi-layer semantic features of piglet outline, texture and local pose, suppress redundant information of background texture and shadow, and effectively capture local limb fragments that are not completely occluded in the group. The second step involves a multi-scale feature processing network, comprising two parts: the MutscaleEdgeInfoGenerator module and the ConvEdegeFusion module. The MutscaleEdgeInfoGenerator module uses multiple 3×3 convolutional kernels to generate edge features at three detection scales: P3, P4, and P5, representing local edges, overall contours, and the outer boundaries of clustered groups, respectively. After contour extraction by the C3Ghost module, the ConvEdegeFusion module adaptively fuses the edge features with the corresponding scale backbone features, preserving semantic information while enhancing target boundary details and improving the ability to separate individual piglets in densely clustered scenes. Step 3: After processing by the above modules, the C2PSACoordATT attention mechanism module is used to enhance the response of key regions, fuse coordinate information to highlight the discriminative features of occluded piglets, adaptively enhance the attention weight of key features, suppress the interference of redundant information, and output the final extracted pig outline image V1. Based on the above model, the lying-down behavior of pigs is detected, and the outline image V1 of each pig in the video and its bounding rectangle are identified. Through geometric calculation, the center point coordinates of each detection box are obtained, and the Euclidean distance between every two pigs in the group is calculated. d n To use a representative value to characterize the lying-down degree of the entire pig herd, the arithmetic mean of all calculated distances was taken as the lying-down distance. Distance As shown in formula (1), where d n The distance between the center points of the two pigs is the coordinate distance. n This represents the number of pigs in the group that are lying down. (1) S4: Determination of the effective temperature ET' in the pigsty Based on the environmental humidity, environmental temperature, and wind speed collected in step S2 under five different environments, the effective temperature ET' inside the pigsty under each of the five environments is calculated as shown in equation (2), where: T air RH represents the ambient temperature inside the pigsty, and RH represents the ambient humidity inside the pigsty. v Let be the wind speed inside the pigsty; a, c, and e are all constants, where a represents the effect of relative humidity, c represents the effect of airflow, and e represents the weight of the airflow. (2) S5: Establishment of a multimodal comprehensive evaluation model for temperature and humidity environment quality The effective temperature ET', physiological parameters of pigs, and behavioral data obtained in step S4 are used as inputs, and the evaluation level is used as the output. After fusing various features, the suitability level of the current pigsty is evaluated, forming a comprehensive evaluation model for pigsty environmental comfort. This model includes a data input layer, a feature encoding layer, a multimodal fusion layer, and a temperature and humidity environmental comfort evaluation layer, specifically including the following steps: Step 1: Input multi-source heterogeneous data into the data input layer. The multi-source heterogeneous data specifically includes: ① Environmental data: effective temperature ET'; ② Behavioral data: prone distance. Distance ③ Physiological data: respiratory rate (RR), heart rate (HR), and body temperature (RT) of pigs were obtained in the experiment. All modal data underwent time synchronization preprocessing before the input data layer to ensure the consistency of heterogeneous data in the time dimension. Step 2: The feature encoding layer is mainly responsible for extracting high-dimensional features from modal data from different sources. ① The environmental data is used to extract features from the effective temperature ET' using an Echo Memory Network structure. This structure includes two modules: a one-dimensional convolutional neural network and a bidirectional gated recurrent unit. The one-dimensional convolutional network module automatically extracts local features such as the rate of temperature rise and other changing trends within a local time window. Then, the bidirectional gated loop unit module applies local features. Bidirectional time-series modeling is performed to capture the correlation structure between past and future environmental states, characterizing the dynamic cyclical process of environmental control. The extracted environmental features are denoted as F. e ; ② Behavioral modalities mainly include the lying distance between piglets. The CMC-PLD model constructed in step 3 is used as the output. A Vision Transformer with Multi-head Self-Attention is employed to further extract spatial features from the pig contour image V1 to fully exploit the spatial characteristics in the image: First, the image is divided into image patches and global feature modeling is performed through visual transformation to highlight the interaction structure between pigs and effectively capture global spatial dependencies. Then, the global spatial dependency information of the image is extracted through a multi-head self-attention mechanism to construct the global spatial relationship of the pig herd distribution. This structure can identify the distribution pattern of the pig herd, and the resulting output features can effectively characterize the spatial aggregation and activity characteristics of the pig herd. This is fused with the lying distance calculated in step 3 to form a behavioral feature, denoted as F. b ; ③ A Double Convolution Layer structure is selected for extracting physiological data. First, a densely connected layer with 128 neurons is used to map the physiological data into a high-dimensional feature space. The second layer further compresses and purifies the features through 64 neurons. Each layer introduces nonlinear activation using the ReLU activation function to enhance nonlinear expressive power. After purification, a high-dimensional feature vector, denoted as F, is generated. p The calculation formula is shown in equation (3), where ReLU is the activation function. These are the weights of the first layer convolutional kernel. For the first layer bias, These are the weights of the second-layer convolutional kernel. For the second layer of bias, the specific values ​​of each coefficient are obtained by inputting physiological parameters. Automatic fitting and determination; (3) The third step, the multimodal fusion layer, uses a cross-modal attention temporal network structure to achieve information interaction and fusion between in-house environmental features, behavioral features, and physiological features. Specifically, it includes the following steps: ① The modal data (F) after feature extraction e F b F p This is unified to the same dimension through a linear projection layer, denoted as F. e `、F b `、F p `; ②The environmental mode F e As the dominant behavioral modality feature F b `and physiological modal characteristics F p As complementary components in attention calculation, this highlights the impact of environmental changes on pig behavior and physiological state: First, the behavioral modality feature F... b `and physiological modal characteristics F p `The splicing is denoted as P, and the physiological modal features F` p `with behavioral modality features F b `The splicing is denoted as B, and the environmental mode F is...` e Let E be the fusion feature. Calculate the attention weights of E, B, and P, and concatenate the weighted features to generate a rich contextually aware context vector by fusing multi-source information from environment, behavior, and physiology. Add the residuals of the extracted context vector to the original features to mitigate gradient vanishing while preserving the original information. Then, perform layer normalization to further standardize the model and accelerate its convergence. This fusion feature is denoted as F. c ; ③ Fuse features F c Using the temporal network layer in the CATTN architecture, time-series modeling of multimodal fusion features is performed. The temporal dependencies between multimodal features are captured through forward and backward propagation, resulting in the final temporally enhanced fusion features. ; Step 4: The temperature and humidity environment comfort evaluation layer adopts a DCL network structure. The first dense connection layer uses 128 neurons to integrate temporal enhancement features. The mapping is performed, and the second layer further uses 64 neurons to focus on temporal enhancement of fusion features. The core information is as follows: ReLU activation function is introduced after each linear transformation to enhance nonlinear expressive power, and Dropout strategy is adopted to prevent model overfitting; the core features compressed to 64 dimensions are mapped to 3 evaluation categories, the original predicted scores are output, the original predicted scores are converted into category probabilities by Softmax normalization, and the category with the highest probability is taken as the final evaluation result; that is, a multimodal comprehensive evaluation model for temperature and humidity environment quality is established. S6: Evaluation Method Step 1: Install sensor monitoring nodes in the target pigsty, including temperature sensors, humidity sensors and anemometers, to continuously collect data at a frequency of once per minute and timestamp it; deploy cameras to record pig behavior 24 hours a day; and use physiological monitoring instruments to collect physiological parameters of the pigs. Step 2: Take the average of the environmental data from the 15 minutes prior to physiological data collection and use it as the environmental data during physiological data collection; substitute the averaged environmental data parameters into the effective temperature calculation formula to obtain the current effective temperature of the pigsty; extract the effective frames from the video data and input them into the improved CMC-Pig Lying Distance model to realize the detection of pig lying behavior. Step 3: Input the three types of data into the multimodal comprehensive evaluation method model for temperature and humidity environment quality through the data input layer. First, high-dimensional features are extracted from the modal data from different sources through the feature encoding layer. Then, the information interaction and fusion between environmental, behavioral and physiological features is realized through the multimodal fusion layer using a cross-modal attention time network structure. Finally, the final environmental quality evaluation is output in the temperature and humidity environment comfort evaluation layer using a DCL structure in conjunction with the Softmax function.