Methods and systems for environmental control and optimization in pigsties
By combining multimodal sensors and deep learning algorithms, the system achieves automated and high-precision acquisition of pig house environment and pig physiological parameters, as well as abnormal behavior identification. This solves the problems of lag response and parameter mismatch in existing pig house environment control systems, and improves the intelligence and efficiency of breeding management.
Patent Information
- Application Number
- CN202511271121.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-08
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-09-08
AI Technical Summary
Existing pig house environmental control systems rely on manual adjustment or mechanical temperature threshold control, which are slow to respond and have poor operational consistency. They cannot adapt to the complexity of nonlinear time-varying systems in pig houses, resulting in a mismatch between ventilation parameters and actual needs, and lack an adaptive optimization mechanism.
Multimodal sensors (thermal imaging camera, RGB camera, depth camera, and acoustic acquisition device) are integrated into a track-mounted inspection robot to achieve automated and high-precision acquisition of pig house environment and pig physiological parameters; a behavior recognition model is constructed to identify pig herd aggregation status, body surface temperature, and cough frequency through algorithms such as adaptive illumination compensation, skeletal key point detection, and frequency domain noise reduction; a physiological environmental control model is established, and deep learning algorithms are used to fit the nonlinear mapping relationship between physiological parameters and environmental parameters to generate customized optimization schemes.
It enables automated and high-precision collection of pig house environment and pig physiological data, accurately identifies abnormal behavior and environmental problems, provides early risk warnings, optimizes resource allocation, improves the level of intelligent breeding management, ensures that environmental parameters are accurately adapted to the needs of abnormal areas, maximizes pig comfort, reduces disease incidence, and improves breeding efficiency.
Smart Images

Figure CN120802638B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of livestock farming environment management technology, specifically to a method and system for optimizing and controlling the environment of pig houses. Background Technology
[0002] With the development of large-scale pig farming, precision ventilation is more in line with the current production needs of pig farms compared to traditional tunnel ventilation and its derivatives. It can reduce the perceived temperature of pigs by increasing the airflow velocity over their bodies, alleviating heat stress and thus improving production performance.
[0003] Currently, precision ventilation systems typically rely on manual adjustment or mechanical temperature threshold control. This approach has drawbacks; for example, adjusting ventilation parameters requires continuous observation of the pig herd's behavior and manual intervention, resulting in slow response times and poor operational consistency, thus hindering production efficiency. Traditional environmental controllers, with temperature as the core single-factor control objective, rely on classical linear control methods, which cannot adapt to the complexity of nonlinear time-varying systems in pig houses, leading to a mismatch between ventilation parameters and actual needs. Furthermore, there is a nonlinear coupling relationship between environmental control parameters and physiological indicators, which traditional linear models cannot fit, and there is a lack of adaptive optimization mechanisms based on real-time data. Therefore, a more intelligent and efficient pig house environmental parameter optimization management technology is needed to address these issues. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for regulating and optimizing the pig house environment to solve the problems mentioned in the background art.
[0005] To address the aforementioned technical problems, this invention provides a method for optimizing and controlling the pigsty environment, comprising:
[0006] S100 collects environmental parameters of pigsties and physiological parameters of pigs through multimodal sensors.
[0007] The multimodal sensor system includes a thermal imaging camera, an RGB camera, a depth camera, and an acoustic acquisition device. A track-mounted inspection robot integrates these sensors to collect data pen-by-pen. The processed data yields environmental parameters and physiological parameters of the pigs. This ensures data coverage of the entire pigsty, avoiding blind spots inherent in manual data collection.
[0008] To process multimodal data, a dedicated environmental control host was developed based on a high-performance computing platform. An SQL database was established to import data collected by sensors and robots into the database.
[0009] Based on a multi-source sensor integration system using a track-mounted inspection robot platform, a pollution-proof structural design scheme is constructed to ensure the stability of the data acquisition system. A gradient deployment scheme is implemented according to the functional zoning of the pigsty to eliminate blind spots in spatial monitoring. Differentiated data acquisition strategies are implemented for core functional areas such as feeding areas and rest areas.
[0010] Environmental parameters include the wind speed of the fan and the opening degree of the water curtain of the spraying equipment; physiological parameters include the aggregation state of the pig herd, as well as the body surface temperature, respiratory rate and cough frequency of the pigs.
[0011] Aggregation refers to the density of pigs per unit area. Respiratory rate refers to the number of breaths per unit time. Coughing frequency refers to the number of coughing events per unit time.
[0012] It has enabled automated and high-precision collection of pig house environment and pig physiological data, reducing errors caused by human intervention and providing a comprehensive and real-time data foundation for subsequent behavior recognition and environmental optimization.
[0013] Improve monitoring efficiency and reliability, and ensure that the data collection process is adapted to the complex environment of pig houses, thereby supporting early risk warning and precise management.
[0014] S200. Construct a behavior recognition model, analyze behavioral characteristics based on physiological parameters, and delineate abnormal regions. Specifically, this includes:
[0015] S201. Construct a behavior recognition model to identify the aggregation state of pig herds, as well as the body surface temperature, respiratory rate, and coughing frequency of pigs, by analyzing raw data collected by multimodal sensors. The construction of the behavior recognition model includes:
[0016] S2011. Preprocess the raw data acquired by the multimodal sensor. This includes:
[0017] An adaptive illumination compensation algorithm is used to normalize the brightness of RGB video frames, eliminating interference from illumination fluctuations and ensuring stable image quality.
[0018] Based on a key point detection model of pig skeletons, an individual body contour is extracted using a pose estimation algorithm, and contour interpolation is performed to reconstruct the body contour in overlapping and occluded areas. This solves the occlusion problem in crowded pig herds and improves the accuracy of individual recognition.
[0019] Thermal imaging data is used to perform environmental thermal radiation compensation, and the environmental heat source is separated from the true surface temperature of the pig by background temperature field modeling. This reduces misjudgments.
[0020] The acoustic signal undergoes frequency domain noise reduction processing to extract characteristic voiceprints in the 300Hz-3kHz frequency band. Low-frequency noise is filtered out, and the extracted characteristic voiceprints are used for cough event recognition.
[0021] S2012, Construct a behavioral feature recognition engine. This includes:
[0022] Aggregation status recognition: Based on point cloud data from depth sensors, calculate the density value of pigs per unit area, and trigger an aggregation status flag when the density value exceeds a set threshold.
[0023] Body surface temperature inversion: Locate the pollution-resistant areas of the pig's ear base and groin in thermal imaging data, and output the individual's core body surface temperature using a regional temperature weighting algorithm.
[0024] Respiratory rate detection: The temperature fluctuation period in the nasal region of pigs is captured by thermal imaging sequences, and the number of breaths per minute is calculated by combining the optical flow analysis of thoracic cavity movement.
[0025] Cough frequency statistics: Construct a voiceprint feature matching library, and record a valid cough event when the similarity between the acoustic signal and the cough feature template is greater than a threshold.
[0026] S2013, Deploy an incremental learning mechanism, including:
[0027] The initial model was trained on a standard dataset of clean pig herds; real-time data on dirty environments and overlapping herds were collected, and enhanced samples were generated using a generative adversarial network. Model parameters were fine-tuned and the weight matrix was updated every 24 hours.
[0028] S202. Obtain historical environmental parameters, analyze the airflow coverage area corresponding to different wind speeds, and the spray mapping area corresponding to different water curtain opening degrees, thereby setting the controllable area. Specifically, this includes:
[0029] S2021. Obtain historical environmental parameters, including the wind speed of the fan at different times and the opening degree of the water curtain of the spraying equipment.
[0030] S2022. A computational fluid dynamics (CFD) simulation model is used to construct a spatial mesh for the pigsty. The fan locations and wind speeds are input to generate airflow velocity distribution cloud maps corresponding to different wind speeds, and the effective area is analyzed. Specifically, this includes:
[0031] Analyze the wind speed corresponding to each airflow velocity distribution cloud map. Set the base rate and efficiency To satisfy Wind speed respectively with and Multiply by each product to obtain the base wind speed. and effective wind speed .
[0032] The continuous region in the airflow velocity distribution cloud map where the airflow velocity is greater than the reference wind speed is taken as the reference region, and the continuous region where the airflow velocity is greater than the effective wind speed is taken as the effective region.
[0033] The efficiency ratio is obtained by dividing the area of the baseline region in the airflow velocity distribution cloud map by the area of the effective region. The area of the baseline region in the airflow velocity distribution cloud map with the highest efficiency ratio is taken as the effective area. .
[0034] S023. Establish a model of the water droplet motion trajectory, input the water curtain opening degree, simulate the water droplet diffusion range, generate a heat map of the spray intensity distribution corresponding to different water curtain opening degrees, and analyze the effective area. Specifically, this includes:
[0035] Analyze the maximum spray intensity in each spray intensity distribution heatmap. Set the base rate and efficiency To satisfy Maximum spray intensity respectively with and Multiply by each product to obtain the reference strength. and effective strength .
[0036] In the spray intensity distribution heatmap, the continuous region where the spray intensity is greater than the reference intensity is taken as the reference region, and the continuous region where the spray intensity is greater than the effective intensity is taken as the effective region.
[0037] The efficiency ratio is obtained by dividing the area of the reference region in the spray intensity distribution heat map by the area of the effective region. The area of the reference region in the spray intensity distribution heat map with the highest efficiency ratio is taken as the effective area. .
[0038] S2024, in terms of effective area and In this process, the smallest effective area is selected as the controllable area.
[0039] S203. Analyze the aggregation status of the pig herd and divide the area into reference zones according to the controllable area. Calculate the anomaly index for each reference zone, and designate reference zones with an anomaly index greater than a threshold as anomaly zones. Specifically, this includes:
[0040] S2031. Analyze the video images in the original data. Connect the two points that are farthest apart on each pig with a line segment. Use the line segment as the diagonal to build a square. Select the area of the largest square as the standard area.
[0041] S2032. Divide the pigsty into grid zones, with each grid having a standard area. Mark the grids containing pigs, and combine adjacent marked grids into reference zones, each with an area less than or equal to the controllable area.
[0042] S2033. Analyze the physiological parameters of each pig in the reference area and substitute them into the formula to calculate the abnormality index of each reference area. Reference areas with abnormality indices greater than the threshold are designated as abnormal areas. Abnormality Index Formula as follows:
[0043] ;
[0044] In the formula, It is a constant greater than 1. and These represent the average body surface temperature and average respiratory rate of pigs in the reference area, respectively. and These represent the average respiratory rate and average body surface temperature of pigs in all reference areas. To reference the highest coughing frequency among all pigs in the area, The maximum number of coughs allowed under a set healthy condition. It is a constant. This is the set normal pig density per unit area. This is for reference purposes regarding pig density per unit area within the district.
[0045] When the abnormality index exceeds a preset threshold, the reference area is marked as an "abnormal area" and subsequent optimization is triggered. The formula design takes into account both the relative abnormality and absolute health thresholds of the population, avoiding misjudgment based on a single indicator.
[0046] Algorithms accurately detect abnormal behavior and environmental problems in pig herds, enabling early risk warnings and helping to optimize resource allocation. This reduces health risks to pigs, improves the level of intelligent farming management, and allows for targeted intervention by identifying abnormal zones.
[0047] S300. Establish a physiological environmental control model and set the optimal optimization scheme for each abnormal zone. Specifically, this includes:
[0048] S301. Count the number of pigs *s* within the outlier zone ABN and establish a training set for each pig. Obtain physiological and environmental parameters from the same historical time period, classify them according to their respective pig species, and place each category of parameters into the corresponding pig's training set.
[0049] Each data point in the training set represents physiological and environmental parameters at the same time. Physiological parameters refer to the body surface temperature, respiratory rate, and cough frequency of the corresponding pig, while environmental parameters refer to the fan speed acting on the corresponding pig at the same time and the opening degree of the water curtain of the spraying equipment.
[0050] S302. Establish a physiological and environmental control model, and use a deep learning algorithm to fit each training set to obtain the nonlinear mapping relationship between the physiological parameters and environmental parameters of each pig.
[0051] S303. Set the value range for each physiological parameter, input these value ranges into the physiological environmental control model, and obtain the value range of each environmental parameter for each pig.
[0052] The range of physiological parameters is pre-set by staff, referencing the distribution range of physiological parameters in healthy pigs. The physiological environmental control model analyzes the range by substituting the two endpoints of the range into various mapping relationships, and the two results are then used as endpoints to output the range of environmental parameters.
[0053] S304. All value intervals are classified according to whether the environmental parameters are the same. The overlapping intervals after all value intervals under the same environmental parameters are analyzed and used as the reference intervals for the corresponding environmental parameters.
[0054] S305. Based on all environmental parameters, establish n optimization schemes for the abnormal region ABN. The values of each environmental parameter in each optimization scheme are within the corresponding reference range. The values of all environmental parameters in different optimization schemes are not exactly the same.
[0055] S306. Analyze the values of various environmental parameters in the optimization scheme, calculate the comfort index of each optimization scheme, and select the optimization scheme with the largest comfort index as the best optimization scheme for the abnormal area ABN.
[0056] The values of various environmental parameters in the optimized scheme are input into the physiological environmental control model to obtain the predicted values of various physiological parameters for each pig. These values are then substituted into the formula to calculate the comfort index. :
[0057] ;
[0058] In the formula, A constant greater than 1 The maximum allowed frequency of coughs under a set healthy condition. The highest predicted value for cough frequency among all pigs. It is a constant. and These are the respiratory rate and body surface temperature under the set healthy state, respectively. and The first Predicted values for body surface temperature and respiratory rate of a live pig.
[0059] For each abnormal zone, multiple optimization schemes are generated, and their comfort indices are calculated. The scheme corresponding to the maximum value is selected, ensuring that: cough is suppressed first; and breathing and body temperature approach healthy levels.
[0060] Anomaly indices enable early risk identification and improve monitoring efficiency. Comfort indices, through quantitative prediction of effects, drive adaptive adjustments to environmental control parameters, thereby enhancing aquaculture efficiency.
[0061] Similarly, the optimal optimization scheme is planned for each abnormal region.
[0062] Both the abnormality index and the comfort index are dimensionless quantities.
[0063] Model-driven optimization ensures that environmental parameters are precisely adapted to the needs of abnormal areas, maximizing pig comfort and reducing disease incidence. This improves the efficiency of adaptive management of the pig house environment, optimizes resource utilization, and enhances overall farming benefits.
[0064] S400 generates environmental control commands based on the optimal solution and controls the equipment to execute them.
[0065] The optimal optimization scheme for each abnormal area is obtained. Environmental control commands are generated based on the values of various environmental parameters in the optimal optimization scheme. The wind speed of the fan and the opening degree of the water curtain of the spraying equipment are controlled to execute the environmental control commands.
[0066] A rapid and accurate response mechanism has been implemented to ensure that environmental optimization solutions take effect immediately, reducing delays caused by manual operations. This optimizes the microclimate of pig houses, improves resource utilization efficiency, and enhances the stability and sustainability of livestock production.
[0067] The present invention also provides a pigsty environment control and optimization system, including an intelligent sensing module, an environmental analysis module, a parameter optimization module and a control management module.
[0068] The intelligent sensing module is used to collect environmental parameters of pigsties and physiological parameters of pigs through multimodal sensors.
[0069] A track-mounted inspection robot, integrated with multimodal sensors, collects data pen by pen and processes the raw data to obtain environmental parameters and physiological parameters of the pigs. The specific data collection process involves technologies such as adaptive lighting compensation, skeletal key point detection, environmental thermal radiation compensation, and acoustic frequency domain noise reduction to ensure data quality.
[0070] It achieves automated and high-precision multimodal data acquisition, reduces human intervention errors, provides a comprehensive and real-time data foundation for subsequent behavior recognition and environmental optimization, and improves the efficiency and reliability of pig house monitoring.
[0071] The environmental analysis module is used to build behavior recognition models, analyze behavioral characteristics based on physiological parameters, and classify abnormal areas.
[0072] A behavior recognition model is constructed, including data preprocessing and behavior feature recognition, and an incremental learning mechanism is deployed. Subsequently, the controllable area is analyzed by combining historical environmental parameters, a reference area is delineated, and an anomaly index is calculated to identify abnormal areas.
[0073] Advanced algorithms can accurately detect abnormal behavior and environmental problems in pig herds, enabling early risk warnings, helping to optimize resource allocation, reduce health risks to pigs, and improve the level of intelligent breeding management.
[0074] The parameter optimization module is used to establish a physiological environmental control model and set the best optimization scheme for each abnormal zone.
[0075] A physiological environmental control model was established, and a deep learning algorithm was used to fit the training set of each pig to derive the nonlinear mapping. Healthy value ranges were set for physiological parameters, and the reference ranges for environmental parameters were obtained by inputting them into the model. Multiple optimization schemes were generated, and the best optimization scheme was selected by using the comfort index formula.
[0076] Model-driven optimization ensures that environmental parameters are precisely adapted to the needs of abnormal areas, maximizing pig comfort, reducing disease incidence, and improving the efficiency of adaptive management of pig house environment and overall breeding benefits.
[0077] The control and management module is used to generate environmental control commands based on the best optimization scheme and control the equipment to execute them.
[0078] Based on the optimal optimization scheme output by the parameter optimization module, specific environmental control commands are generated, and these commands are executed by the control system to achieve automated adjustment of the equipment.
[0079] It has achieved a rapid and accurate response mechanism, ensuring that environmental optimization solutions take effect immediately, reducing delays caused by manual operations, optimizing the microclimate of pig houses, improving resource utilization efficiency, and ultimately enhancing the stability and sustainability of breeding production.
[0080] Compared with the prior art, the beneficial effects achieved by the present invention are:
[0081] Advantages of multimodal data acquisition: By integrating thermal imaging cameras, RGB cameras, depth cameras, and acoustic acquisition devices into a track-mounted inspection robot, comprehensive and synchronous acquisition of piggery environment and pig physiological parameters can be achieved. This method eliminates interference from light fluctuations, environmental heat radiation, and acoustic noise, providing a high-precision data foundation and avoiding the problems of insufficient coverage and error accumulation caused by single sensors in existing technologies.
[0082] Advantages of intelligent behavior recognition and anomaly detection: A behavior recognition model is constructed, employing advanced algorithms such as adaptive illumination compensation, skeletal keypoint detection, thermal radiation compensation, and frequency domain noise reduction to accurately identify the aggregation state, body surface temperature, respiratory rate, and cough frequency of pig herds. The model is continuously optimized through an incremental learning mechanism to adapt to dirty environments and overlapping herd scenarios, improving the accuracy and robustness of anomaly zone segmentation and overcoming the failure risk of existing methods in dynamically changing scenarios.
[0083] Advantages of Personalized Environmental Optimization: A physiological environmental control model is established, and deep learning algorithms are used to fit a nonlinear mapping relationship between physiological parameters and environmental parameters for each pig, generating a customized optimization plan. Based on the comfort index, the optimal plan is dynamically selected, and precise control is implemented for abnormal areas, such as adjusting fan speed and water curtain opening, to ensure the comfort of pigs. This solves the problems of resource waste and poor results caused by the one-size-fits-all environmental control in existing technologies.
[0084] System integration and automation advantages: The entire solution adopts a modular design, including intelligent sensing, environmental analysis, parameter optimization, and control management modules, achieving end-to-end automation from data acquisition to command execution. Through track-mounted inspection robots and real-time environmental control commands, manual intervention is reduced, improving management efficiency and response speed, surpassing the shortcomings of existing segmented systems in terms of coordination and real-time performance. Attached Figure Description
[0085] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0086] Figure 1 This is a flowchart illustrating the method for optimizing pigsty environment according to the present invention.
[0087] Figure 2 This is a schematic diagram of the structure of the pigsty environment control and optimization system of the present invention. Detailed Implementation
[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0089] Please see Figure 1 This invention provides a method for regulating and optimizing the pigsty environment, comprising:
[0090] S100 collects environmental parameters of pigsties and physiological parameters of pigs through multimodal sensors.
[0091] The multimodal sensor system includes a thermal imaging camera, an RGB camera, a depth camera, and an acoustic acquisition device. A track-mounted inspection robot integrates these multimodal sensors to collect data pen-by-pen. The processed data yields environmental parameters and physiological parameters of the pigs. This ensures data coverage of the entire pigsty, avoiding blind spots inherent in manual data collection.
[0092] To process multimodal data, a dedicated environmental control host was developed based on a high-performance computing platform. An SQL database was established to import data collected by sensors and robots into the database.
[0093] Based on a multi-source sensor integration system using a track-mounted inspection robot platform, a pollution-proof structural design scheme is constructed to ensure the stability of the data acquisition system. A gradient deployment scheme is implemented according to the functional zoning of the pigsty to eliminate blind spots in spatial monitoring. Differentiated data acquisition strategies are implemented for core functional areas such as feeding areas and rest areas.
[0094] Environmental parameters include the wind speed of the fan and the opening degree of the water curtain of the spraying equipment; physiological parameters include the aggregation state of the pig herd, as well as the body surface temperature, respiratory rate and cough frequency of the pigs.
[0095] Aggregation refers to the density of pigs per unit area. Respiratory rate refers to the number of breaths per unit time. Coughing frequency refers to the number of coughing events per unit time.
[0096] It has enabled automated and high-precision collection of pig house environment and pig physiological data, reducing errors caused by human intervention and providing a comprehensive and real-time data foundation for subsequent behavior recognition and environmental optimization.
[0097] Improve monitoring efficiency and reliability, and ensure that the data collection process adapts to the complex environment of pig houses (such as changes in light and noise interference), thereby supporting early risk warning and precise management.
[0098] S200. Construct a behavior recognition model, analyze behavioral characteristics based on physiological parameters, and delineate abnormal regions. Specifically, this includes:
[0099] S201. Construct a behavior recognition model to identify the aggregation state of pig herds, as well as the body surface temperature, respiratory rate, and coughing frequency of pigs, by analyzing raw data collected by multimodal sensors. The construction of the behavior recognition model includes:
[0100] S2011. Preprocess the raw data acquired by the multimodal sensor. This includes:
[0101] An adaptive illumination compensation algorithm is used to normalize the brightness of RGB video frames, eliminating interference from illumination fluctuations and ensuring stable image quality.
[0102] Based on a key point detection model of pig skeletons, an individual body contour is extracted using a pose estimation algorithm, and contour interpolation is performed to reconstruct the body contour in overlapping and occluded areas. This solves the occlusion problem in crowded pig herds and improves the accuracy of individual recognition.
[0103] Thermal imaging data is used to perform environmental thermal radiation compensation, and the environmental heat source is separated from the true surface temperature of the pig by background temperature field modeling. This reduces misjudgments.
[0104] The acoustic signal undergoes frequency domain noise reduction processing to extract characteristic voiceprints in the 300Hz-3kHz frequency band. Low-frequency noise (such as fan noise) is filtered out, and the extracted characteristic voiceprints are used for cough event recognition.
[0105] S2012, Construct a behavioral feature recognition engine. This includes:
[0106] Aggregation status recognition: Based on point cloud data from depth sensors, calculate the density value of pigs per unit area, and trigger an aggregation status flag when the density value exceeds a set threshold.
[0107] Body surface temperature inversion: Locate the pollution-resistant areas of the pig's ear base and groin in thermal imaging data, and output the individual's core body surface temperature using a regional temperature weighting algorithm.
[0108] Respiratory rate detection: The temperature fluctuation period in the nasal region of pigs is captured by thermal imaging sequences, and the number of breaths per minute is calculated by combining the optical flow analysis of thoracic cavity movement.
[0109] Cough frequency statistics: Construct a voiceprint feature matching library, and record a valid cough event when the similarity between the acoustic signal and the cough feature template is greater than a threshold.
[0110] S2013, Deploy an incremental learning mechanism, including:
[0111] The initial model was trained on a standard dataset of clean pig herds; real-time data on dirty environments and overlapping herds were collected, and enhanced samples were generated using a generative adversarial network. Model parameters were fine-tuned and the weight matrix was updated every 24 hours.
[0112] S202. Obtain historical environmental parameters, analyze the airflow coverage area corresponding to different wind speeds, and the spray mapping area corresponding to different water curtain opening degrees, thereby setting the controllable area. Specifically, this includes:
[0113] S2021. Obtain historical environmental parameters, including the wind speed of the fan at different times and the opening degree of the water curtain of the spraying equipment.
[0114] S2022. A computational fluid dynamics (CFD) simulation model is used to construct a spatial mesh for the pigsty. The fan locations and wind speeds are input to generate airflow velocity distribution cloud maps corresponding to different wind speeds, and the effective area is analyzed. Specifically, this includes:
[0115] Analyze the wind speed corresponding to each airflow velocity distribution cloud map. Set the base rate and efficiency To satisfy Wind speed respectively with and Multiply by each product to obtain the base wind speed. and effective wind speed .
[0116] The continuous region in the airflow velocity distribution cloud map where the airflow velocity is greater than the reference wind speed is taken as the reference region, and the continuous region where the airflow velocity is greater than the effective wind speed is taken as the effective region.
[0117] The efficiency ratio is obtained by dividing the area of the baseline region in the airflow velocity distribution cloud map by the area of the effective region. The area of the baseline region in the airflow velocity distribution cloud map with the highest efficiency ratio is taken as the effective area. .
[0118] S023. Establish a model of the water droplet motion trajectory, input the water curtain opening degree, simulate the water droplet diffusion range, generate a heat map of the spray intensity distribution corresponding to different water curtain opening degrees, and analyze the effective area. Specifically, this includes:
[0119] Analyze the maximum spray intensity in each spray intensity distribution heatmap. Set the base rate and efficiency To satisfy Maximum spray intensity respectively with and Multiply by each product to obtain the reference strength. and effective strength .
[0120] In the spray intensity distribution heatmap, the continuous region where the spray intensity is greater than the reference intensity is taken as the reference region, and the continuous region where the spray intensity is greater than the effective intensity is taken as the effective region.
[0121] The efficiency ratio is obtained by dividing the area of the reference region in the spray intensity distribution heat map by the area of the effective region. The area of the reference region in the spray intensity distribution heat map with the highest efficiency ratio is taken as the effective area. .
[0122] S2024, in terms of effective area and In this process, the smallest effective area is selected as the controllable area.
[0123] S203. Analyze the aggregation status of the pig herd and divide the area into reference zones according to the controllable area. Calculate the anomaly index for each reference zone, and designate reference zones with an anomaly index greater than a threshold as anomaly zones. Specifically, this includes:
[0124] S2031. Analyze the video images in the original data. Connect the two points that are farthest apart on each pig with a line segment. Use the line segment as the diagonal to build a square. Select the area of the largest square as the standard area.
[0125] S2032. Divide the pigsty into grid zones, with each grid having a standard area. Mark the grids containing pigs, and combine adjacent marked grids into reference zones, each with an area less than or equal to the controllable area.
[0126] S2033. Analyze the physiological parameters of each pig in the reference area and substitute them into the formula to calculate the abnormality index of each reference area. Reference areas with abnormality indices greater than the threshold are designated as abnormal areas. Abnormality Index Formula as follows:
[0127] ;
[0128] In the formula, It is a constant greater than 1. and These represent the average body surface temperature and average respiratory rate of pigs in the reference area, respectively. and These represent the average respiratory rate and average body surface temperature of pigs in all reference areas. To reference the highest coughing frequency among all pigs in the area, The maximum number of coughs allowed under a set healthy condition. It is a constant. This is the set normal pig density per unit area. This is for reference purposes regarding pig density per unit area within the district.
[0129] When the abnormality index exceeds a preset threshold, the reference area is marked as an "abnormal area" and subsequent optimization is triggered. The formula design takes into account both the relative abnormality and absolute health thresholds of the population, avoiding misjudgment based on a single indicator.
[0130] Algorithms accurately detect abnormal behavior and environmental problems in pig herds, enabling early risk warnings (such as disease or stress) and helping to optimize resource allocation (such as directional adjustment of fans and sprinkler systems). This reduces health risks to pigs, improves the level of intelligent farming management, and allows for targeted intervention by delineating abnormal zones.
[0131] S300. Establish a physiological environmental control model and set the optimal optimization scheme for each abnormal zone. Specifically, this includes:
[0132] S301. Count the number of pigs *s* within the outlier zone ABN and establish a training set for each pig. Obtain physiological and environmental parameters from the same historical time period, classify them according to their respective pig species, and place each category of parameters into the corresponding pig's training set.
[0133] Each data point in the training set represents physiological and environmental parameters at the same time. Physiological parameters refer to the body surface temperature, respiratory rate, and cough frequency of the corresponding pig, while environmental parameters refer to the fan speed acting on the corresponding pig at the same time and the opening degree of the water curtain of the spraying equipment.
[0134] S302. Establish a physiological and environmental control model, and use a deep learning algorithm to fit each training set to obtain the nonlinear mapping relationship between the physiological parameters and environmental parameters of each pig.
[0135] S303. Set the value range for each physiological parameter, input these value ranges into the physiological environmental control model, and obtain the value range of each environmental parameter for each pig.
[0136] The range of physiological parameters is pre-set by staff, referencing the distribution range of physiological parameters in healthy pigs. The physiological environmental control model analyzes the range by substituting the two endpoints of the range into various mapping relationships, and the two results are then used as endpoints to output the range of environmental parameters.
[0137] S304. All value intervals are classified according to whether the environmental parameters are the same. The overlapping intervals after all value intervals under the same environmental parameters are analyzed and used as the reference intervals for the corresponding environmental parameters.
[0138] S305. Based on all environmental parameters, establish n optimization schemes for the abnormal region ABN. The values of each environmental parameter in each optimization scheme are within the corresponding reference range. The values of all environmental parameters in different optimization schemes are not exactly the same.
[0139] S306. Analyze the values of various environmental parameters in the optimization scheme, calculate the comfort index of each optimization scheme, and select the optimization scheme with the largest comfort index as the best optimization scheme for the abnormal area ABN.
[0140] The values of various environmental parameters in the optimized scheme are input into the physiological environmental control model to obtain the predicted values of various physiological parameters for each pig. These values are then substituted into the formula to calculate the comfort index. :
[0141] ;
[0142] In the formula, A constant greater than 1 The maximum allowed frequency of coughs under a set healthy condition. The highest predicted value for cough frequency among all pigs. It is a constant. and These are the respiratory rate and body surface temperature under the set healthy state, respectively. and The first Predicted values for body surface temperature and respiratory rate of a live pig.
[0143] For each abnormal zone, multiple optimization schemes (such as combinations of different wind speeds and water curtain opening degrees) are generated, and their comfort indices are calculated. The scheme corresponding to the maximum value is selected to ensure that: cough suppression is prioritized (infectious disease control); and breathing and body temperature approach healthy levels (thermal comfort).
[0144] Abnormal indices enable early risk identification (such as a sudden increase in cough frequency), improving monitoring efficiency. Comfort indices, through quantitative prediction of effects, drive adaptive adjustments to environmental control parameters (such as increasing wind speed during high temperatures), thereby enhancing aquaculture efficiency.
[0145] Similarly, the optimal optimization scheme is planned for each abnormal region.
[0146] Both the abnormality index and the comfort index are dimensionless quantities.
[0147] Model-driven optimization ensures that environmental parameters (such as wind speed and water curtain opening) are precisely adapted to the needs of abnormal areas, maximizing pig comfort and reducing disease incidence. This improves the efficiency of adaptive management of the pig house environment, optimizes resource utilization, and enhances overall farming benefits.
[0148] S400 generates environmental control commands based on the optimal solution and controls the equipment to execute them.
[0149] The optimal optimization scheme for each abnormal area is obtained. Environmental control commands are generated based on the values of various environmental parameters in the optimal optimization scheme. The wind speed of the fan and the opening degree of the water curtain of the spraying equipment are controlled to execute the environmental control commands.
[0150] A rapid and accurate response mechanism has been implemented to ensure that environmental optimization solutions take effect immediately, reducing delays caused by manual operations. This optimizes the microclimate of pig houses (such as temperature and humidity), improves resource utilization efficiency, and enhances the stability and sustainability of livestock production.
[0151] Please see Figure 2 The present invention also provides a pigsty environment control and optimization system, including an intelligent sensing module, an environmental analysis module, a parameter optimization module and a control management module.
[0152] The intelligent sensing module is used to collect environmental parameters of pigsties and physiological parameters of pigs through multimodal sensors.
[0153] A track-mounted inspection robot, integrating multimodal sensors (including thermal imaging cameras, RGB cameras, depth cameras, and acoustic acquisition devices), collects data pen by pen, and processes the raw data to obtain environmental parameters of the pigsty (such as fan speed and water curtain opening of the spraying equipment) and physiological parameters of the pigs (such as the aggregation status of the pigs, body surface temperature, respiratory rate, and cough frequency). The specific data collection process involves technologies such as adaptive lighting compensation, skeletal key point detection, environmental thermal radiation compensation, and acoustic frequency domain noise reduction to ensure data quality.
[0154] It achieves automated and high-precision multimodal data acquisition, reduces human intervention errors, provides a comprehensive and real-time data foundation for subsequent behavior recognition and environmental optimization, and improves the efficiency and reliability of pig house monitoring.
[0155] The environmental analysis module is used to build behavior recognition models, analyze behavioral characteristics based on physiological parameters, and classify abnormal areas.
[0156] A behavior recognition model was constructed, including data preprocessing (such as brightness normalization of RGB video frames, environmental thermal radiation compensation for thermal imaging, and frequency domain noise reduction of acoustic signals) and behavior feature recognition (such as calculating aggregation state based on point cloud data, analyzing respiratory frequency based on thermal imaging sequences, and statistically analyzing cough frequency through voiceprint matching). An incremental learning mechanism was deployed (fine-tuning the model every 24 hours). Subsequently, controllable area was analyzed by combining historical environmental parameters (efficiency area was calculated through CFD simulation and spray model), reference areas were delineated, and anomaly indices (based on physiological parameter formulas) were calculated to identify abnormal areas.
[0157] Advanced algorithms can accurately detect abnormal behavior and environmental problems in pig herds, enabling early risk warnings, helping to optimize resource allocation, reduce health risks to pigs, and improve the level of intelligent breeding management.
[0158] The parameter optimization module is used to establish a physiological environmental control model and set the best optimization scheme for each abnormal zone.
[0159] A physiological environmental control model was established, and a deep learning algorithm was used to fit the training set of each pig (containing the mapping relationship between historical physiological parameters and environmental parameters) to derive the nonlinear mapping. A healthy value range was set for the physiological parameters, and the reference range of the environmental parameters was obtained by inputting the model. Multiple optimization schemes were generated (the values of each environmental parameter are within the reference range), and the best optimization scheme was selected by the comfort index formula (calculated based on predicted physiological parameters).
[0160] Model-driven optimization ensures that environmental parameters (such as wind speed and water curtain opening) are accurately adapted to the needs of abnormal areas, maximizing pig comfort, reducing disease incidence, and improving the efficiency of adaptive management of the pig house environment and overall breeding benefits.
[0161] The control and management module is used to generate environmental control commands based on the best optimization scheme and control the equipment to execute them.
[0162] Based on the optimal solution output by the parameter optimization module, specific environmental control commands (such as adjusting the fan speed and the water curtain opening of the spraying equipment) are generated, and these commands are executed by the control system to achieve automated adjustment of the equipment.
[0163] It has achieved a rapid and accurate response mechanism, ensuring that environmental optimization solutions take effect immediately, reducing delays caused by manual operations, optimizing the microclimate of pig houses, improving resource utilization efficiency, and ultimately enhancing the stability and sustainability of breeding production.
[0164] Example 1: Assume that there are several pigs in reference area A1. The average body surface temperature of these pigs is 39°C, the average respiratory rate is 18 times / minute, the maximum coughing frequency is 3 times / hour, and the pig density per unit area is 0.6 pigs / m².
[0165] When constant The value was 2. The average respiratory rate of pigs in all reference areas was 15 breaths / minute, the average body surface temperature was 38℃, and the maximum allowable cough frequency under the set healthy condition was 5 coughs / hour. (Constant) Given a normal pig density of 1 head / m², the abnormality index of reference area A1 is calculated using the formula:
[0166] Reference area A1: ;
[0167] The anomaly index of reference area A1 is 1.49.
[0168] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0169] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for regulating and optimizing the pigsty environment, characterized by: The method includes: S100: Collects environmental parameters of pigsties and physiological parameters of pigs through multimodal sensors; The multimodal sensor includes a thermal imaging camera, an RGB camera, a depth camera, and an acoustic acquisition device. The multimodal sensor is integrated into a track-type inspection robot to collect data from each pen. After processing, the data is used to obtain the environmental parameters of the pigsty and the physiological parameters of the pigs. Environmental parameters include the wind speed of the fan and the opening of the water curtain of the spraying equipment; physiological parameters include the aggregation state of the pig herd, as well as the body surface temperature, respiratory rate and cough frequency of the pigs. Aggregation status refers to the density of pigs per unit area; respiratory rate refers to the number of times a pig breathes per unit time; cough frequency refers to the number of cough events per unit time. S200. Construct a behavior recognition model, analyze behavioral characteristics based on physiological parameters, and delineate abnormal regions; specifically including: S201. Construct a behavior recognition model to identify the aggregation state of pig herds, as well as the body surface temperature, respiratory rate and cough frequency of pigs by analyzing the raw data collected by multimodal sensors. S202. Obtain historical environmental parameters, analyze the airflow coverage area corresponding to different wind speeds, and the spray mapping area corresponding to different water curtain openings, thereby setting the controllable area. S203. Analyze the aggregation status of the pig herd and divide the reference area according to the controllable area; calculate the abnormality index of each reference area and take the reference area with the abnormality index greater than the threshold as the abnormal area. S300. Establish a physiological environmental control model and set the optimal optimization scheme for each abnormal zone; specifically including: S301. Count the number of pigs s in the abnormal area ABN and establish a training set for each pig; obtain the physiological and environmental parameters at the same time in history, classify them according to the pigs, and put each type of parameter into the training set of the corresponding pig. S302. Establish a physiological and environmental control model, and use a deep learning algorithm to fit each training set to obtain the nonlinear mapping relationship between the physiological parameters and environmental parameters of each pig. S303. Set the value range for each physiological parameter, input these value ranges into the physiological environmental control model, and obtain the value range of each environmental parameter for each pig. S304. All value intervals are classified according to whether the environmental parameters are the same. The overlapping intervals after all value intervals under the same environmental parameters are analyzed and used as the reference intervals for the corresponding environmental parameters. S305. Based on all environmental parameters, establish n optimization schemes for the abnormal region ABN. The values of each environmental parameter in each optimization scheme are within the corresponding reference range. The values of all environmental parameters in different optimization schemes are not exactly the same. S306. Analyze the values of various environmental parameters in the optimization scheme, calculate the comfort index of each optimization scheme, and select the optimization scheme with the largest comfort index as the best optimization scheme for the abnormal area ABN. Similarly, the optimal optimization scheme is planned for each abnormal area; S400 generates environmental control commands based on the optimal solution and controls the equipment to execute them.
2. The method for regulating and optimizing the pigsty environment according to claim 1, characterized in that: In S201, the construction of the behavior recognition model includes: S2011. Preprocess the raw data acquired by the multimodal sensor; including: An adaptive illumination compensation algorithm is used to normalize the brightness of RGB video frames and eliminate illumination fluctuation interference. Based on the key point detection model of pig skeleton, the individual body contour is extracted by the pose estimation algorithm, and the body contour is reconstructed by interpolation in the overlapping occluded areas. Thermal imaging data is used to perform environmental thermal radiation compensation, and the environmental heat source is separated from the true temperature of the pig's body surface by background temperature field modeling. The acoustic signal is subjected to frequency domain noise reduction processing to extract the characteristic acoustic pattern in the 300Hz-3kHz frequency band; S2012, Construct a behavior feature recognition engine; including: Aggregation status recognition: Based on point cloud data from depth sensors, calculate the density of pigs per unit area, and trigger an aggregation status flag when the density value exceeds a set threshold; Body surface temperature inversion: Locate the pollution-resistant areas of the ear base and groin of pigs in thermal imaging data, and output the individual core body surface temperature using a regional temperature weighting algorithm; Respiratory rate detection: The temperature fluctuation period in the nostril area of pigs is captured by thermal imaging sequence, and the number of breaths per minute is calculated by combining it with the optical flow analysis of thoracic cavity movement. Cough frequency statistics: Construct a voiceprint feature matching library, and record a valid cough event when the similarity between the acoustic signal and the cough feature template is greater than a threshold; S2013, Deploy an incremental learning mechanism, including: The initial model was trained on a standard dataset of clean pig herds; real-time data on dirty environments and overlapping herds were collected, and enhanced samples were generated through a generative adversarial network; model parameters were fine-tuned and the weight matrix was updated every 24 hours.
3. The method for regulating and optimizing the pigsty environment according to claim 1, characterized in that: S202 includes: S2021. Obtain historical environmental parameters, including the wind speed of the fan at different times and the water curtain opening of the spraying equipment. S2022. A computational fluid dynamics (CFD) simulation model is used to construct a spatial mesh for the pigsty. The fan locations and wind speeds are input to generate airflow velocity distribution cloud maps corresponding to different wind speeds, and the effective area is analyzed. Specifically, it includes: Analyze the wind speed corresponding to each airflow velocity distribution cloud map. Set the base rate and efficiency To satisfy Wind speed respectively with and Multiply by each product to obtain the base wind speed. and effective wind speed ; The continuous area in the airflow velocity distribution cloud map where the airflow velocity is greater than the reference wind speed is taken as the reference area, and the continuous area where the airflow velocity is greater than the effective wind speed is taken as the effective area. The efficiency ratio is obtained by dividing the area of the baseline region in the airflow velocity distribution cloud map by the area of the effective region; the area of the baseline region in the airflow velocity distribution cloud map with the highest efficiency ratio is taken as the effective area. ; S023. Establish a model of the water droplet motion trajectory, input the water curtain opening degree, simulate the water droplet diffusion range, generate a heat map of the spray intensity distribution corresponding to different water curtain opening degrees, and analyze the effective area. Specifically, it includes: Analyze the maximum spray intensity in each spray intensity distribution heatmap. Set the base rate and efficiency To satisfy Maximum spray intensity respectively with and Multiply by each product to obtain the reference strength. and effective strength ; In the spray intensity distribution heat map, the continuous area where the spray intensity is greater than the reference intensity is taken as the reference area, and the continuous area where the spray intensity is greater than the effective intensity is taken as the effective area. The efficiency ratio is obtained by dividing the area of the reference region in the spray intensity distribution heat map by the area of the effective region; the area of the reference region in the spray intensity distribution heat map with the highest efficiency ratio is taken as the effective area. ; S2024, in terms of effective area and In this process, the smallest effective area is selected as the controllable area.
4. The method for regulating and optimizing the pigsty environment according to claim 1, characterized in that: S203 includes: S2031. Analyze the video images in the original data. Connect the two points that are farthest apart on each pig with a line segment. Use the line segment as the diagonal to build a square. Select the area of the largest square as the standard area. S2032. Divide the pigsty into grid zones, with each grid having a standard area; mark the grids containing pigs, and combine adjacent marked grids into a reference zone, with each reference zone having an area less than or equal to the controllable area; S2033. Analyze the physiological parameters of each pig in the reference area, and substitute them into the formula to calculate the abnormality index of each reference area; designate the reference areas with abnormality indices greater than the threshold as abnormal areas; abnormality index formula. as follows: ; In the formula, A constant greater than 1 and These represent the average body surface temperature and average respiratory rate of pigs in the reference area, respectively. and These represent the average respiratory rate and average body surface temperature of pigs in all reference areas, respectively. To reference the highest coughing frequency among all pigs in the area, The maximum allowed frequency of coughs under a set health condition; It is a constant. This is the set normal pig density per unit area. This is for reference purposes regarding pig density per unit area within the district.
5. The method for regulating and optimizing the pigsty environment according to claim 1, characterized in that: In S306, the values of various environmental parameters in the optimization scheme are input into the physiological environmental control model to obtain the predicted values of various physiological parameters for each pig. Substitute into the formula to calculate the comfort index : ; In the formula, A constant greater than 1 The maximum allowed frequency of coughs under a set healthy condition. The highest predicted value for cough frequency among all pigs. It is a constant. and These are the respiratory rate and body surface temperature under the set healthy state, respectively; and The first Predicted values for body surface temperature and respiratory rate of a live pig.
6. The method for regulating and optimizing the pigsty environment according to claim 1, characterized in that: In S400, the optimal optimization scheme for each abnormal area is obtained, and environmental control instructions are generated based on the values of various environmental parameters in the optimal optimization scheme. The wind speed of the fan and the opening degree of the water curtain of the spraying equipment are controlled to execute the environmental control instructions.
7. A pigsty environment control and optimization system, applied to the pigsty environment control and optimization method as described in claim 1, characterized in that: The system includes an intelligent sensing module, an environmental analysis module, a parameter optimization module, and a control and management module; The intelligent sensing module is used to collect environmental parameters of the pigsty and physiological parameters of the pigs through multimodal sensors; The environmental analysis module is used to build behavior recognition models, analyze behavioral characteristics based on physiological parameters, and classify abnormal areas. The parameter optimization module is used to establish a physiological environmental control model and set the best optimization scheme for each abnormal zone; The control and management module is used to generate environmental control commands based on the best optimization scheme and control the equipment to execute them.
Citation Information
Patent Citations
Pig house environment regulation control system and method based on multiple sensors
CN119002595A