Method for constructing poultry comfort model based on random forest and fuzzy comprehensive evaluation

CN122508243APending Publication Date: 2026-08-04INST OF AGRI INFORMATION & ECONOMICS HEBEI ACAD OF AGRI & FORESTRY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF AGRI INFORMATION & ECONOMICS HEBEI ACAD OF AGRI & FORESTRY SCI
Filing Date
2026-06-29
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0004]发明目的:本发明的目的在于提供一种基于随机森林和模糊综合评价的家禽舒适度模型构建方法,解决现有技术中家禽舒适度评价指标权重主观性强、多源异构数据融合困难、仅能输出离散等级无法连续量化打分的问题

Benefits of technology

[0049] 1. This invention introduces the objective weights output by random forests into fuzzy comprehensive evaluation, avoiding the bias caused by subjective weighting in the traditional AHP method, thus making the evaluation results more scientific. Fuzzy comprehensive evaluation enables real-time, refined scoring of single samples, overcoming the shortcomings of pure machine learning, which only outputs discrete levels and lacks continuous quantitative results;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122508243A_ABST
    Figure CN122508243A_ABST
Patent Text Reader

Abstract

The present application provides a kind of poultry comfort model construction method based on random forest and fuzzy comprehensive evaluation.The present application is zoned and laid out environment and physiological monitoring unit, synchronously acquires environmental parameter, infrared image, poultry respiratory frequency multi-source data;Infrared image is extracted and balanced temperature distribution TS feature is extracted, data cleaning and Min-Max standardization are completed, and paired data set with physiological true value labeling is constructed.Random forest MDI mean square error reduction method is used offline to calculate index objective weight, and key features are screened;Online multi-type membership function fuzzy system is constructed, and fuzzy synthesis is completed by weighted average operator, and the comfort level is determined by argmax maximum membership degree, and 0~100 continuous score is obtained, while supporting fine five-level division and environmental control binary determination mode.The present application realizes objective weighting and smooth quantitative evaluation, and is suitable for real-time monitoring and fine environmental control regulation of large-scale poultry breeding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent monitoring and evaluation technology for poultry farming, and particularly relates to a method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation. It is applicable to real-time evaluation and intelligent control of comfort in large-scale poultry farms for chickens, ducks, geese, etc. Background Technology

[0002] As the poultry farming industry rapidly develops towards large-scale, intensive, and intelligent operations, and the stocking density continues to increase, the growth environment and comfort of poultry directly determine their health level, stress resistance, feed conversion rate, and egg production performance. These are core factors affecting the economic benefits of poultry farming and animal welfare.

[0003] Current poultry comfort assessments generally suffer from the following technical shortcomings: The assessment indicators are singular; the traditional Temperature and Humidity Index (THI) relies solely on indoor environmental parameters, failing to consider individual animal surface temperature and physiological regulatory differences, resulting in significant discrepancies between the assessment results and the animals' actual comfort levels. Weight allocation depends on human experience, leading to strong subjectivity and failing to reflect the true impact of the indicators. It struggles to handle high-dimensional data and nonlinear relationships between indicators, easily resulting in overfitting and evaluation bias. The boundaries of comfort level classifications are not clearly defined, ignoring the transitional ambiguity of indicators such as temperature and humidity, which does not align with actual poultry perception. Furthermore, the lack of automated and standardized scoring models hinders real-time online assessment and early warning. Therefore, there is an urgent need for a method to construct a poultry comfort scoring model that can automatically screen key influencing factors, objectively determine indicator weights, and handle a combination of qualitative and quantitative indicators. Summary of the Invention

[0004] Purpose of the Invention: The purpose of this invention is to provide a method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation, solving the problems of strong subjectivity in the weights of poultry comfort evaluation indicators, difficulty in fusing multi-source heterogeneous data, and the inability to output only discrete levels without continuous quantitative scoring in existing technologies. This invention automatically selects core indicators offline using random forest and solves for objective weights, combined with fuzzy mathematics to handle the fuzziness of the evaluation boundaries, ultimately outputting a continuous quantitative comfort score from 0 to 100, thus balancing the needs of refined scientific research analysis with the implementation of automated environmental control in farms.

[0005] Technical solution: The present invention provides a method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation, comprising the following steps:

[0006] S1, the poultry house is divided into three areas: front, middle, and rear. A poultry monitoring unit is set up in each area. The poultry monitoring unit includes an environmental parameter monitoring unit and a physiological parameter monitoring unit. The environmental parameter monitoring unit is used to collect multi-dimensional environmental indicators in the house, and the physiological parameter monitoring unit is used to collect infrared thermal images, respiratory rate, and physiological true value data of poultry. The multi-dimensional environmental indicators, infrared thermal images, and physiological true value data together constitute a complete indicator system.

[0007] S2, completes the cleaning of missing and abnormal environmental data and timestamp alignment; filters valid infrared images, crops the region of interest and removes extreme temperature pixels, and uses the quantile equalization method to extract the 8-dimensional body surface temperature TS feature vector.

[0008] S3, using Min-Max standardization to map all indicators to the dimensionless interval [0,1], constructing a unified dimension evaluation dataset D;

[0009] S4. Divide the dataset into training and test sets, build a random forest model, calculate the importance of each indicator by the mean squared error reduction of MDI and normalize it to obtain the objective weight; select the key feature set K by accumulating the weights to ≥90%;

[0010] S5 constructs a five-level fuzzy evaluation system based on key feature sets, matches the corresponding membership function, and uses the output weights of random forest as the fuzzy evaluation weight vector; the weighted average operator completes fuzzy synthesis, determines the comfort level by the maximum membership degree, and calculates continuous scores from 0 to 100; it supports two output modes: five-level fine classification and binary environmental control judgment with 60 points as the critical value.

[0011] Furthermore, step S1 specifically includes the following steps:

[0012] S101, the environmental parameter monitoring unit includes temperature and humidity sensors, ammonia sensors, carbon dioxide sensors, wind speed sensors and dust sensors, which collect six basic environmental indicators in real time: temperature and relative humidity inside the livestock and poultry house, ammonia concentration, carbon dioxide concentration, ventilation wind speed and dust PM2.5 / 10.

[0013] S102, the physiological parameter monitoring unit includes a digital thermometer, a thermal infrared imager, and a timer; it is used to collect cloacal temperature, thermal infrared images, and respiratory rate of poultry.

[0014] Furthermore, step S2 specifically includes the following steps:

[0015] S201. For poultry, the temperature measurement point is selected on the bare skin without feathers. Taking chickens as an example, the comb is extremely rich in blood vessels and is extremely sensitive to temperature changes, so it is selected as the region of interest (ROI). Take close-range (0.5m-1m) vertical photographs of the chicken's head from the side or front, ensuring the comb is fully exposed in the field of view. Simultaneously, manually count the poultry's respiratory rate per minute. This respiratory rate serves as the physiological true value label for classifying the poultry's true comfort level, used for subsequent random forest supervised training. After the poultry have been resting for 30-50 minutes without strenuous activity, respiratory rate is measured by observing the rise and fall of the feathers on the chest and abdomen. The number of rises and falls is counted continuously for 60 seconds; the number of rises and falls per minute is the true respiratory rate.

[0016] S202, missing values ​​in the collected environmental data are processed by using linear interpolation or the average of previous and subsequent time points to fill in the missing values, or by directly removing data within the time period; when environmental data shows a jump that exceeds physical limits, the Z-score method is used to identify outliers, and these outliers are removed or corrected in combination with the reasonable environmental range of the poultry house; data from different sensor frequencies are time-aligned using timestamps, and multi-source data are merged into a unified time series dataset;

[0017] S203 performs quality screening on the acquired thermal infrared images, removing invalid images that cannot be identified due to equipment failure, severe motion blur, overexposure, target occlusion, etc.; uniformly scales the original image to the standard model size, and crops the region of interest (ROI) containing only the poultry subject based on the target detection box, removing invalid background pixels. Temperature values ​​of all valid pixels within the ROI are extracted and sorted in ascending order, and extreme temperature anomalies at the top 1% and bottom 1% are removed. Temperature intervals are divided using a quantile equalization method, referencing the general standards for animal stress assessment in infrared thermal imaging. Eight temperature intervals are evenly divided, and seven quantile thresholds are calculated to ensure a balanced number of pixel samples in each interval and eliminate feature bias caused by local pixel distribution imbalances. Using the quantile thresholds as boundaries, the number of pixels in each temperature interval is counted and divided by the total valid pixels of the ROI to obtain the pixel percentage of each interval. These eight percentages are concatenated into a fixed-dimensional one-dimensional feature vector TS, which serves as the poultry body surface temperature distribution feature. The poultry body surface temperature distribution feature vector TS, combined with parameters such as temperature and humidity and ammonia concentration collected by environmental sensors, is integrated to form a complete comprehensive evaluation index set D for poultry heat stress.

[0018] Furthermore, step S3 specifically includes the following steps:

[0019] S301, Construct the original monitoring dataset X(t) of the environment. i ), where t is time, X(t) i ) represents the known sample point t i The measured index value at time i, where i = 1, 2, ..., n;

[0020] S302, to eliminate the influence of different environmental data dimensions on the model weights, they are linearly mapped to the interval [0,1] to obtain dimensionless environmental data. The formula is: ,in For dimensional environmental data, The maximum value in the environmental dataset. This represents the minimum value of the environmental dataset.

[0021] Furthermore, step S4 specifically includes the following steps:

[0022] S401, Construct a random forest training sample set, and denote the standardized poultry comfort evaluation dataset as: },in: Let y be the m-dimensional feature vector of the i-th sample. i The dataset is used to simultaneously collect comfort value labels based on poultry respiratory rate and body temperature physiological thresholds. N is the total number of samples. The dataset is then stratified and randomly divided into a training set D according to the proportions. train With test set D test The stratification is based on the true value labels of comfort to ensure that the distribution of samples in each category is consistent;

[0023] S402: Use Bootstrap sampling, set the total number of random forest decision trees to T, and sample from the training set D. train Random sampling with replacement generates T independent training subsets [D1, D2, ..., D...]. T The number of samples in each subset is equal to the total number of samples in the original training set, N. train Maintain consistency;

[0024] S403, for each training subset D t Construct an unpruned decision tree h t (x), when a node splits, k features are randomly selected to participate in the split, satisfying: , where m is the total number of all candidate evaluation features;

[0025] S404 integrates the total number of T random forest decision trees, and the overall prediction output of the random forest is the average of the prediction results of all individual trees:

[0026]

[0027] S405, calculate the importance score for each evaluation feature using the node splitting mean square error reduction (MDI), feature X j Importance score (X) j The definition is: in all decision trees, all trees using feature X jThe sum of the reductions in mean square error caused by the split nodes is given by the following formula:

[0028]

[0029] Where T is the total number of decision trees in the random forest, and S t For all trees in the t-th tree that use feature X j A set of split nodes. The reduction in mean square error caused by the splitting of node s;

[0030] S406, normalize all feature scores to the [0,1] interval to obtain feature weights:

[0031]

[0032] W j That is, feature X j Normalized importance weights;

[0033] S407, arranged in descending order of importance, with a cumulative weight ≥90%, forms the key feature set for comfort evaluation. .

[0034] Furthermore, step S5 specifically includes the following steps:

[0035] S501, set the comfort rating set V = {very comfortable, comfortable, average, uncomfortable, very uncomfortable};

[0036] S502, for the j-th key feature X j Construct Gaussian, trapezoidal, or S-shaped membership functions respectively, and apply them to the measured values ​​x. j The mapping is to membership degrees at 5 levels, and the membership degrees satisfy the following conditions. ;

[0037] S503, substitute the measured values ​​of key features into the corresponding membership functions, calculate the membership degree of each level row by row, and construct the fuzzy relation matrix R:

[0038]

[0039] Where the j-th row of R represents the membership degree of the j-th feature to the five comfort levels;

[0040] S504, the normalized feature importance obtained from the random forest is used as the objective weight of each key feature, forming a 1×m weight vector. satisfy ;

[0041] S505, using a weighted average operator to synthesize W and R, yields a comprehensive membership vector. ,in ;

[0042] S506, determining comfort level based on the principle of maximum membership. k * To provide the level index corresponding to the maximum membership degree, For index k * Corresponding comfort rating level;

[0043] S507, setting grade scores The final comfort rating was Get a continuous score from 0 to 100;

[0044] S508 features a simplified binary classification mode for on-site control, dividing a score of 60-100 into comfort and 0-60 into discomfort, thus adapting to the binary decision-making needs of automated environmental control equipment.

[0045] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.

[0046] The present invention also discloses a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the method of the present invention.

[0047] The present invention also discloses a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method of the present invention.

[0048] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:

[0049] 1. This invention introduces the objective weights output by random forests into fuzzy comprehensive evaluation, avoiding the bias caused by subjective weighting in the traditional AHP method, thus making the evaluation results more scientific. Fuzzy comprehensive evaluation enables real-time, refined scoring of single samples, overcoming the shortcomings of pure machine learning, which only outputs discrete levels and lacks continuous quantitative results;

[0050] 2. This invention integrates environmental sensing, infrared body surface temperature images, and multidimensional data of poultry physiological indicators, overcoming the shortcomings of traditional temperature and humidity index (THI) which relies solely on environmental parameters and ignores individual differences. The comfort evaluation results match the actual physiological state of poultry more closely.

[0051] 3. This invention employs a multi-source monitoring unit divided into front, middle, and rear sections in the poultry house to simultaneously collect multi-dimensional environmental indicators, infrared thermal imaging images, and respiratory rate physiological parameters. It constructs a paired dataset of image features, environmental sensing data, and physiological truth values, which solves the defects of single infrared images lacking complete indicators and supervision labels and being unable to objectively calculate indicator weights. It also overcomes the problem of strong subjectivity in the manual weighting of existing technologies.

[0052] 4. This invention uses the infrared thermal imaging animal heat stress assessment TS feature extraction method, which divides the ROI temperature pixels into 8 intervals using quantile equalization to generate a body surface temperature distribution feature vector. It abandons the single-point temperature extraction method, makes full use of global temperature distribution information, reduces feature errors caused by shooting occlusion, motion blur, and extreme temperature pixels, and improves feature stability.

[0053] 5. A five-level refined grading system is provided for aquaculture research data analysis. The 60-point critical binary grading system can be directly connected to automated environmental control equipment such as fans and water curtains, making up for the shortcomings of existing models that are single in grading and have poor engineering implementation. Attached Figure Description

[0054] Figure 1 This is an overall flowchart of the poultry comfort model construction method based on random forest and fuzzy comprehensive evaluation of the present invention.

[0055] Figure 2 This is a flowchart of the random forest feature selection process in an embodiment of the present invention;

[0056] Figure 3 This is a flowchart illustrating the construction of a comfort rating model for fuzzy evaluation in an embodiment of the present invention. Detailed Implementation

[0057] The present invention will be further described in detail below with reference to the embodiments.

[0058] like Figure 1 As shown, the present invention provides a method for constructing a poultry comfort rating model based on random forest and fuzzy comprehensive evaluation. The specific steps are as follows:

[0059] S1, Multi-source data acquisition. IoT sensing layer devices are deployed within the poultry house. An environmental sensor network collects real-time data on temperature, humidity, and ammonia concentration; a non-contact infrared thermometer module collects poultry body surface temperature; and high-definition cameras capture video streams for analyzing respiratory rate, feeding frequency, and flock aggregation.

[0060] S2, Data Preprocessing and Indicator Construction. The raw data is cleaned. For physiological and behavioral data (such as respiratory rate), a moving average filter is used for noise reduction; for environmental data, outliers are removed using the 3σ principle. Subsequently, all indicators are mapped to the [0,1] interval using the Min-Max normalization method to construct the initial evaluation indicator set.

[0061] S3, Feature Filtering Based on Random Forest. The preprocessed dataset is input into a random forest classifier. The contribution of each feature to comfort classification is evaluated by calculating the reduction in the mean squared error (MDI) of each feature at the split of the decision tree node. For example, if the average Gini reduction of "body surface temperature" is much higher than that of "carbon dioxide concentration," then the former is a more critical indicator.

[0062] S4. Construct a fuzzy comprehensive evaluation matrix. For the selected core indicators, define their membership functions under the five evaluation levels.

[0063] S5, Model Solving and Scoring Output. This involves calculating the feature weights from the random forest. As the weight vector for fuzzy evaluation, fuzzy synthesis operations are performed. Finally, using the formula The fuzzy results are converted into an intuitive score of 0-100. When the score is below 60, the system determines that the poultry is in a state of heat stress or cold stress and triggers an alarm.

[0064] like Figure 2 The diagram shown is a flowchart of the random forest feature selection process provided by this invention. The specific steps are as follows:

[0065] Input the original dataset, construct the training sample set for the random forest, and denote the standardized multidimensional dataset as: ,in: Let y be the m-dimensional feature vector of the i-th sample. i Here, N represents the comfort label corresponding to the sample, and N is the total number of samples.

[0066] Divide the dataset into training and testing sets, and use Bootstrap sampling to generate T training subsets by randomly sampling with replacement from the sample set D.

[0067] Train the random forest model, for each training subset D t Construct an unpruned decision tree h t (x), when a node splits, k features are randomly selected to participate in the split, satisfying: , where m is the total number of characteristics;

[0068] The final output of the random forest is the mean of all decision trees: ;

[0069] Feature importance is calculated using the Mean Squared Error Reduction (MDI) method to determine the feature importance scores for indicators such as environmental temperature and humidity, and body temperature. Feature X j Importance score (X) j Defined as all users of X jThe sum of the reductions in mean square error caused by the split nodes is given by the following formula: Where T is the number of decision trees, and S t For all trees in the t-th tree that use feature X j A set of split nodes. The reduction in mean square error caused by the splitting of node s;

[0070] Select important features, normalize all feature scores to the [0,1] interval, and obtain feature weights. W j That is, feature X j Normalized importance weights;

[0071] The normalized feature weights are sorted in descending order and summed sequentially. Features whose cumulative weights reach 90% or higher are selected as the key feature set. .

[0072] like Figure 3 The diagram shows a flowchart of the comfort rating model construction for fuzzy evaluation in an embodiment of the present invention. The specific steps are as follows:

[0073] Construct a comfort evaluation system and define grading standards, and establish core evaluation factors;

[0074] A five-level comfort rating set V = {Very Comfortable, Comfortable, Average, Uncomfortable, Very Uncomfortable} is established. To achieve quantitative grading of the evaluation results, a score range of 0–100 is set for each rating level: Very Comfortable (80–100 points), Comfortable (60–80 points), Average (40–60 points), Uncomfortable (20–40 points), and Very Uncomfortable (0–20 points). Simultaneously, the midpoint of each level range is selected as the baseline score, constructing a score vector (S = [90, 70, 50, 30, 10]) to provide numerical basis for subsequent defuzzification and quantification calculations.

[0075] Construct membership functions and calculate the membership degree of individual indicators. For the j-th key feature X... j Construct Gaussian, trapezoidal, or S-shaped membership functions respectively, and apply them to the measured values ​​x. j Mapped to membership degrees at 5 levels. ,satisfy This function can convert measured values ​​of indicators into the degree of membership of corresponding comfort levels, realizing the mapping of quantitative values ​​to fuzzy evaluation semantics.

[0076] The normalized feature importance obtained from the random forest is used as the objective weight of each key feature, forming a 1×m weight vector. satisfy ;

[0077] A weighted average operator is selected for matrix synthesis to fully retain the effective evaluation information of each indicator, closely reflecting the comprehensive superposition characteristics of actual aquaculture comfort. The comprehensive membership degree is calculated as follows: ,in By weighted fusion of the membership degree and objective weight of each indicator, a comprehensive fuzzy evaluation vector B containing the membership information of the five levels of comfort is obtained.

[0078] To transform fuzzy membership vectors into intuitive and comparable continuous quantitative comfort scores of 0–100, a weighted average defuzzification method is used to construct a quantitative scoring formula. This mapping function enables precise conversion of fuzzy evaluation results into continuous values ​​of 0–100. Based on the preset score range, the final determination of the comfort level can be completed, realizing a full-process evaluation from indicator measurement and fuzzy deduction to precise quantitative grading.

[0079] Example

[0080] The example uses a large-scale, enclosed chicken house for laying hens as the monitoring object. The chicken house is 60m long and is divided into three monitoring areas: the front area (0-20m), the middle area (20-40m), and the rear area (40-60m). Each area is equipped with a poultry monitoring unit, which includes an environmental parameter monitoring unit and a physiological parameter monitoring unit.

[0081] Phase 1: Offline Modeling (Weight Calculation and Feature Selection)

[0082] Multi-source paired data were collected continuously for 40 days, with simultaneous collection at 5:00 AM, 12:00 PM, and 7:00 PM each day; each sample was simultaneously recorded with six environmental sensor indicators, infrared comb thermal imaging image, manually measured respiratory rate, and cloacal temperature.

[0083] Raw data preprocessing: missing environmental values ​​were filled with the mean before and after, and outliers exceeding the threshold were removed by Z-score; valid images were selected from infrared images, the rooster comb ROI was cropped, the temperature values ​​of all valid pixels in the ROI were extracted and sorted in ascending order, and the extreme temperature outliers at the top 1% and bottom 1% were removed. The quantiles were divided into 8 temperature intervals, and the pixel proportion of each interval was statistically analyzed to splice an 8-dimensional TS body surface temperature feature vector.

[0084] Data standardization: All environmental indicators and TS features are mapped to the dimensionless interval [0,1] to construct a standardized evaluation dataset D;

[0085] True value labeling: Based on the physiological threshold of laying hen farming, combined with respiratory rate and cloacal temperature values, all samples were divided into 5 levels of comfort true value labels, which were used as the output dependent variable of the random forest model;

[0086] Random Forest Training and Weight Calculation: The dataset is divided into training and test sets in a 7:3 ratio. Grid search is used to determine the optimal hyperparameters. The original importance of each indicator is calculated and normalized using the permutation MSE method. Low-contribution redundant indicators are removed to obtain the key feature set K and the fixed indicator weight vector. After offline modeling is completed, the weights are permanently stored, eliminating the need for repeated training.

[0087] Phase 2: Real-time online comfort evaluation

[0088] During routine breeding, only real-time sensor environmental data and infrared comb images are collected, eliminating the need to repeatedly measure respiratory rate and cloacal temperature physiological values.

[0089] Real-time infrared image processing generates TS feature vectors, which are standardized and unified with environmental indicators; fixed weights and key feature sets obtained in the offline stage are retrieved to build a fuzzy comprehensive evaluation system; real-time indicators are substituted to calculate the membership degree of each level, and the weighted average operator is used to fuse the weights to obtain a comprehensive membership vector, which is then mapped to calculate a continuous comfort score of 0 to 100.

[0090] The evaluation results are output according to the scoring range: 80~100 is considered very comfortable, 60~80 is comfortable, 40~60 is average, 20~40 is uncomfortable, and 0~20 is very uncomfortable; a binary mode can be switched, 60 points and above is considered comfortable, and below 60 points is considered stressful, and the control signal is directly output to adjust the ventilation volume of the water curtain and fan.

[0091] This embodiment achieves automated and quantitative assessment of poultry comfort through the above method. Compared with traditional manual experience judgment, the accuracy is effectively improved, and it can be used to guide precise environmental control in farms.

[0092] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements 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 constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation, characterized in that, Includes the following steps: S1, the poultry house is divided into three areas: front, middle, and rear. A poultry monitoring unit is set up in each area. The poultry monitoring unit includes an environmental parameter monitoring unit and a physiological parameter monitoring unit. The environmental parameter monitoring unit is used to collect multi-dimensional environmental indicators in the house, and the physiological parameter monitoring unit is used to collect true physiological data of poultry infrared thermal images, respiratory rate, and cloacal temperature. The multi-dimensional environmental indicators, infrared thermal images, and physiological true data together constitute a complete indicator system. S2, raw data is collected through the poultry monitoring unit and the raw data is preprocessed; S3, standardize the preprocessed data to construct a unified-dimensional poultry comfort evaluation dataset D; S4. Construct a random forest model. Input the evaluation dataset D into the random forest model, use mean squared error to calculate the importance of each indicator feature, and screen the key feature set K that has a significant impact on comfort. S5. Based on the key feature set K, a fuzzy comprehensive evaluation system is constructed, the membership function and weight vector are determined, and the poultry comfort level and quantitative score are obtained through fuzzy synthesis operation.

2. The method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation according to claim 1, characterized in that, Step S1 specifically includes the following steps: S101, the environmental parameter monitoring unit includes temperature and humidity sensors, ammonia sensors, carbon dioxide sensors, wind speed sensors and dust sensors, which collect six basic environmental indicators in real time: temperature and relative humidity inside the livestock and poultry house, ammonia concentration, carbon dioxide concentration, ventilation wind speed and dust PM2.5 / 10. S102, the physiological parameter monitoring unit includes a digital thermometer, a thermal infrared imager, and a timer; it is used to collect poultry cloacal temperature as poultry body temperature, thermal infrared images, and respiratory rate.

3. The method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation according to claim 1, characterized in that, Step S2 specifically includes the following steps: S201. For poultry, the temperature measurement point is selected on the bare skin without feathers. Taking chicken as an example, the comb is used as the region of interest (ROI). The side or front of the chicken's head is photographed vertically at a distance of 0.5m-1m so that the comb is exposed in the field of view. After the poultry is left to rest for 30-50 minutes without vigorous activity, the undulation of the poultry's chest and abdominal feathers is observed. The number of undulations is counted for 60 seconds. The number of undulations per minute is the true value of the respiratory rate. The respiratory rate is used as the physiological true value label for classifying the poultry's true comfort level and is used for subsequent random forest supervised training. S202, missing values ​​in the collected environmental data are processed by using linear interpolation or the average of previous and subsequent time points to fill in the missing values, or by directly removing data within the time period; when environmental data shows a jump that exceeds physical limits, the Z-score method is used to identify outliers, and these outliers are removed or corrected in combination with the reasonable environmental range of the poultry house; data from different sensor frequencies are time-aligned using timestamps, and multi-source data are merged into a unified time series dataset; S203. Quality screening is performed on the acquired thermal infrared images, removing invalid images that are unrecognizable due to equipment malfunction, severe motion blur, overexposure, or target occlusion. The original images are uniformly scaled to the standard model size, and the Region of Interest (ROI) containing only the poultry body is cropped based on the target detection box, removing invalid background pixels. Temperature values ​​of all valid pixels within the ROI are extracted and sorted in ascending order, removing extreme temperature anomalies at the top and bottom 1%. Temperature intervals are divided using a quantile-balanced partitioning method, referring to the general standards for animal stress assessment in infrared thermal imaging, dividing the temperature into 8 equal intervals and calculating 7 quantile thresholds to ensure a balanced number of pixel samples in each interval and eliminate feature bias caused by local pixel distribution imbalances. Using the quantile thresholds as boundaries, the number of pixels in each temperature interval is counted and divided by the total valid pixels of the ROI to obtain the pixel percentage of each interval. The 8 percentages are concatenated into a fixed-dimensional one-dimensional feature vector TS, serving as the poultry body surface temperature distribution feature. The poultry body surface temperature distribution feature vector TS, combined with parameters such as temperature, humidity, and ammonia concentration collected by environmental sensors, is integrated to form a complete comprehensive evaluation index set D for poultry heat stress.

4. The method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation according to claim 1, characterized in that, Step S3 specifically includes the following steps: S301, Construct the original monitoring dataset X(t) of the environment. i ), where t is time, X(t) i ) represents the known sample point t i The measured index value at time i, where i = 1, 2, ..., n; S302, to eliminate the influence of different environmental data dimensions on the model weights, they are linearly mapped to the interval [0,1] to obtain dimensionless environmental data. The formula is: ,in For dimensional environmental data, The maximum value in the environmental dataset. This represents the minimum value of the environmental dataset.

5. The method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation according to claim 1, characterized in that, Step S4 specifically includes the following steps: S401, Construct a random forest training sample set, and denote the standardized poultry comfort evaluation dataset as: },in: Let y be the m-dimensional feature vector of the i-th sample. i The dataset is used to simultaneously collect comfort ground truth labels based on two physiological thresholds: poultry respiratory rate and cloacal temperature. N is the total number of samples. The dataset is then stratified and randomly divided into a training set D according to the proportions. train With test set D test The stratification is based on the true value labels of comfort to ensure that the distribution of samples in each category is consistent; S402: Use Bootstrap sampling, set the total number of random forest decision trees to T, and sample from the training set D. train Random sampling with replacement generates T independent training subsets [D1, D2, ..., D...]. T The number of samples in each subset is equal to the total number of samples in the original training set, N. train Maintain consistency; S403, for each training subset D t Construct an unpruned decision tree h t (x), when a node splits, k features are randomly selected to participate in the split, satisfying: , where m is the total number of all candidate evaluation features; S404 integrates the total number of T random forest decision trees, and the overall prediction output of the random forest is the average of the prediction results of all individual trees: ; S405, calculate the importance score for each evaluation feature using the node splitting mean square error reduction (MDI), feature X j Importance score (X) j The definition is: in all decision trees, all trees using feature X j The sum of the reductions in mean square error caused by the split nodes is given by the following formula: ; Where T is the total number of decision trees in the random forest, and S t For all trees in the t-th tree that use feature X j A set of split nodes. The reduction in mean square error caused by the splitting of node s; S406, normalize all feature scores to the [0,1] interval to obtain feature weights: ; W j That is, feature X j Normalized importance weights; S407, arranged in descending order of importance, with a cumulative weight ≥90%, forms the key feature set for comfort evaluation. .

6. The method for constructing a poultry comfort model based on random forest and fuzzy comprehensive evaluation according to claim 1, characterized in that, Step S5 specifically includes the following steps: S501, set the comfort rating set V = {very comfortable, comfortable, average, uncomfortable, very uncomfortable}; S502, for the j-th key feature X j Construct Gaussian, trapezoidal, or S-shaped membership functions respectively, and apply them to the measured values ​​x. j The mapping is to membership degrees at 5 levels, and the membership degrees satisfy the following conditions. ; S503, substitute the measured values ​​of key features into the corresponding membership functions, calculate the membership degree of each level row by row, and construct the fuzzy relation matrix R: ; Where the j-th row of R represents the membership degree of the j-th feature to the five comfort levels; S504, the normalized feature importance obtained from the random forest is used as the objective weight of each key feature, forming a 1×m weight vector. satisfy ; S505, using a weighted average operator to synthesize W and R, yields a comprehensive membership vector. ,in ; S506, determining comfort level based on the principle of maximum membership. k * To provide the level index corresponding to the maximum membership degree, For index k * Corresponding comfort rating level; S507, setting grade scores The final comfort rating was Get a continuous score from 0 to 100; S508 features a simplified binary classification mode for on-site control, dividing a score of 60-100 into comfortable and 0-60 into uncomfortable, thus adapting to the binary decision-making needs of automated environmental control equipment.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.

8. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.

9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.