Sheep house environment monitoring method based on sensor layout optimization and data fusion

By optimizing sensor layout and data fusion through CFD fluid simulation, the problems of blind sensor deployment and insufficient comprehensive evaluation in sheepfold environmental monitoring were solved, achieving efficient and accurate environmental monitoring and decision support.

CN121615554APending Publication Date: 2026-03-06SHIHEZI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511804454.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-03
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

The current sheepfold environmental monitoring system suffers from blind sensor deployment, resulting in high costs, increased energy consumption, or monitoring blind spots. Furthermore, it lacks a comprehensive evaluation model, making it unable to accurately reflect the overall environmental condition.

Method used

By optimizing sensor layout based on CFD fluid simulation, using the ray-shadow optimization algorithm to find the globally optimal layout, and combining Kalman filtering and entropy method for data fusion, a fuzzy comprehensive evaluation system is constructed to output the environmental comfort level.

Benefits of technology

It achieves efficient monitoring with a minimum number of sensors, provides a scientific basis for environmental regulation decisions, and improves the accuracy and stability of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121615554A_ABST
    Figure CN121615554A_ABST
Patent Text Reader

Abstract

The invention discloses a sheep house environment monitoring method based on sensor layout optimization and data fusion, and the method comprises a sensor layout optimization stage S1 and a data fusion evaluation stage S2, and the sensor layout optimization stage S1 comprises the following steps: S101, building a three-dimensional model based on the structure of a target sheep house, and carrying out CFD fluid simulation, obtaining a spatial distribution simulation diagram of internal environment parameters of the sheep house, and preliminarily analyzing parameter distribution characteristics; s102, a plurality of sensor candidate point positions are preset in the horizontal dimension and the vertical dimension according to the CFD simulation result, the symmetry of the sheep house building structure and the influence of the external environment; the invention belongs to the technical field of sheep house environment monitoring, and particularly relates to a sheep house environment monitoring method based on sensor layout optimization and data fusion, which ensures that the monitoring effect that the whole sheep house space environment state can be best represented is achieved by using the minimum number of sensors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sheepfold environmental monitoring technology, specifically, it relates to a sheepfold environmental monitoring method based on sensor layout optimization and data fusion. Background Technology

[0002] In modern intensive livestock farming, the indoor environment is crucial to the healthy growth, production performance, and welfare of animals. Environmental parameters such as temperature, humidity, and harmful gases (e.g., CO2, NH3, H2S) in sheep pens directly affect the feed intake, weight gain, and disease incidence of meat sheep. Therefore, real-time and accurate monitoring and scientific evaluation of the sheep pen environment are prerequisites for precise environmental control.

[0003] Currently, sheepfold environmental monitoring typically employs the deployment of multiple sensors. However, existing technologies suffer from two main drawbacks: First, sensor deployment often relies on experience, leading to inconsistencies. Overly dense deployment results in high costs, increased energy consumption, and data redundancy; sparse deployment or improper placement fails to accurately reflect the overall environmental conditions of the sheepfold, creating blind spots. Second, monitoring systems usually only display raw data for individual environmental parameters, lacking a comprehensive evaluation model to integrate multi-parameter information. This makes it difficult to intuitively assess the suitability of the current overall environment for meat sheep and fails to provide direct decision support for farmers.

[0004] Therefore, there is an urgent need for a method and system that can scientifically guide sensor deployment and deeply integrate and intelligently evaluate multi-parameter monitoring data. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a sheepfold environment monitoring method based on sensor layout optimization and data fusion, which ensures that the monitoring effect that best represents the state of the entire sheepfold space environment is achieved with the fewest number of sensors.

[0006] A method for monitoring sheepfold environment based on sensor layout optimization and data fusion includes a sensor layout optimization stage S1 and a data fusion evaluation stage S2, wherein the sensor layout optimization stage S1 includes the following steps: S101: Based on the structure of the target sheepfold, a three-dimensional model is established, and CFD fluid simulation is performed to obtain a spatial distribution simulation diagram of the internal environmental parameters of the sheepfold, and the parameter distribution characteristics are preliminarily analyzed. S102: Based on the CFD simulation results and the structural symmetry of the sheepfold and the influence of the external environment, multiple candidate sensor locations are preset in the horizontal and vertical dimensions. S103: Deploy sensors at the candidate locations to collect time-series data of environmental parameters within a preset time period; S104: Using the light-shadow optimization algorithm as the search optimization tool, and the root mean square error (RMSE) between the interpolation restoration result and the actual measurement value as the objective function, the optimization solution is performed to finally obtain the globally optimal or near-optimal set of sensor spatial layout points under a specified number of sensors. The data fusion evaluation stage S2 includes the following steps: S201: Deploy sensor nodes at the locations optimized by S104 to continuously collect multi-parameter environmental data; S202: Use the Kalman filter algorithm to fuse homogeneous data from multiple sensors for the same environmental parameter to obtain a more accurate single parameter estimate after noise reduction; S203: Construct a set of environmental factors including temperature, humidity, carbon dioxide concentration, ammonia concentration, and hydrogen sulfide concentration, and a set of comments for evaluating environmental comfort. S204: The objective weights of each environmental factor are calculated using the entropy method; S205: Determine the membership functions of each environmental parameter corresponding to different rating levels according to the national livestock breeding standards, and calculate the membership degree of each parameter data corresponding to the rating set after processing by S202 to form a membership degree matrix; S206: Perform fuzzy synthesis operation on the weight vector and the membership matrix to obtain the fuzzy comprehensive evaluation result vector, and output the final sheepfold environment comfort level evaluation according to the principle of maximum membership degree.

[0007] Further, in S104, the step of obtaining the globally optimal or near-optimal set of sensor spatial layout points for a specified number of sensors is as follows: S104.1 Problem Modeling The sensor placement optimization problem is modeled as a combinatorial optimization problem: Let the set of candidate sensor locations be P={p1,p2,...,pN}, where N is the total number of candidate locations; The goal is to select a subset S⊂P of size M from P such that when the entire sheepfold environment is reconstructed by interpolation using only sensor data from S, the RMSE between it and the actual measurements of all candidate points is minimized, where RMSE is the root mean square error. The objective function for RMSE is defined as:

[0008] Where y^i is the interpolated value and yi is the actual measured value; S104.2 Lighting and Shadow Optimization The optimized process is as follows: 104.2.1. Initialize the light source group L light sources are randomly generated, and each light source represents a sensor layout scheme, that is, a subset of points of size M. 104.2.2. Shadow Depth Calculation Based on the objective function RMSE, the shadow depth di is calculated for each light source Li using the following formula:

[0009] Where ϵ is a very small positive number to prevent the denominator from being zero. The greater the shadow depth, the better the layout scheme corresponding to the light source; 104.2.3. Light source update and adaptive adjustment (a) Neighborhood-based fine-tuning strategy For each light source Li, generate several candidate new locations in its neighborhood; The neighborhood is defined as randomly replacing k sensor points in the current layout; Select the new position with the largest shadow depth in the neighborhood as the update direction; (b) Adaptive adjustment of light source density A density threshold θdense is set to determine the homogeneity of light source quality within a region. When the variance falls below this threshold, a light source migration mechanism is triggered to avoid local redundancy and waste of computational resources. The shadow depth variance of each region is calculated. If the shadow depth variance is less than the density threshold θdense, the region is considered to have excessively concentrated light sources. Reduce the number of light sources in the area and randomly relocate some light sources to areas with shallower shadow depth; If the light source density in a certain area is too low, a new light source will be randomly generated in that area. (c) Light source clustering mechanism When multiple light sources have similar shadow depths and are spatially adjacent, they are merged into a light source cluster. Perform a fine-grained local search at the cluster center, using a smaller neighborhood perturbation step size; Light sources within the cluster share information, accelerating convergence.

[0010] 104.2.4. Progressive Shading Assessment Strategy Use coarse evaluation in the global search phase and fine evaluation in the local search phase; 104.2.5. Local Search Triggering and Retreat When the light source is focused on a certain area, a local search is triggered. If the search is ineffective, it will retreat to a global search. 104.2.6. Uniform distribution of light source and adjustment of exploration space After each iteration, the spatial distribution entropy of the light source is calculated using the following formula:

[0011] Where R is the number of spatial partitions, and nj is the number of light sources in the j-th partition; If H < θentropy (θentropy is a pre-defined critical entropy value used to determine whether the distribution of light sources in space is "sufficiently uniform"), then the light sources are redistributed to make them cover the search space more uniformly. Periodically launch probe light sources beyond the current boundary to explore. If a region with better performance is found, automatically expand the boundary to include it. At the same time, when the solution group continues to converge to a narrow region, shrink the boundary to focus resources for a refined search. Dynamically adjust the search space boundary to avoid missing potential optimal regions.

[0012] 104.2.7. Termination Conditions If the shadow depth of the optimal light source changes less than the density threshold θdense in η consecutive iterations; Or it may reach the maximum number of iterations Tmax; Propose the sensor layout scheme corresponding to the current optimal light source.

[0013] Furthermore, in step S204, the step of calculating the weights using the entropy method includes: data normalization processing, calculating the weight of the indicators, calculating the information entropy value, calculating the information entropy redundancy, and finally calculating the weights of each indicator.

[0014] Furthermore, in step S205, Gaussian membership functions are used for temperature and humidity parameters, and S-type membership functions are used for carbon dioxide, ammonia, and hydrogen sulfide concentration parameters.

[0015] A sheepfold environment monitoring system applying the method of any one of claims 1-4, comprising a sensor network module: consisting of a plurality of wireless sensor nodes deployed at optimized layout points, used to collect environmental parameter data of temperature, humidity, carbon dioxide, ammonia and hydrogen sulfide in the sheepfold; Data aggregation and processing module: used to receive and store data uploaded by the sensor network, and run the layout optimization algorithm and data fusion evaluation algorithm. Application demonstration module: used to display real-time environmental data, historical data curves, and the final comprehensive evaluation results of environmental comfort.

[0016] Furthermore, the sensor network module uses ZigBee, LoRa, or NB-IoT wireless communication to transmit data to the data aggregation and processing module.

[0017] Compared with the prior art, the advantages and positive effects of the present invention are: ANSYS Fluent and other CFD software were used to perform 3D modeling and fluid simulation of the target sheepfold to theoretically understand the spatial variation characteristics of environmental parameters. A number of candidate sensor locations were initially pre-defined, far exceeding the actual needs. These candidate sensors were then deployed in the actual sheepfold to collect environmental data over a period of time (e.g., 24 hours). The layout optimization problem was modeled as a combinatorial optimization problem. A light-shading optimization algorithm was used to achieve the highest possible spatial monitoring representativeness with the fewest possible sensors. By simulating the distribution of light sources and changes in shadow depth, the search strategy was dynamically adjusted to achieve a balance between global exploration and local refinement, effectively finding the globally optimal or near-optimal sensor layout scheme. A two-layer data fusion architecture is used to comprehensively evaluate environmental data: The first layer (homogeneous data fusion): For data collected by multiple sensors with optimized layouts for the same environmental parameter, the Kalman filter algorithm is used for fusion. The introduction of the Kalman filter layer improves the quality and reliability of the original data, making the final evaluation results more stable and credible. The second layer (heterogeneous data fusion): The entropy method is used to determine the weights, avoiding human subjectivity; the fuzzy comprehensive evaluation integrates multi-parameter information into an intuitive comfort index, solving the problem of the one-sidedness of single-parameter evaluation, and providing a direct and scientific decision-making basis for environmental regulation. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative effort. In the drawings: Figure 1 This is a flowchart of the overall process for monitoring the sheepfold environment as described in this invention. Figure 2 Here is a steady-state simulation diagram of the temperature field in Fluent. Figure 3 Simulation diagram of airflow in sheepfold space; Figure 4 A flowchart illustrating sensor layout optimization for a light-shading optimization algorithm; Figure 5 This is a flowchart of the data fusion process based on Kalman filtering and fuzzy comprehensive evaluation. Figure 6 Simulation diagram of temperature field in the vertical cross section of the sheepfold in the east-west direction; Figure 7 Simulation diagram of temperature field in a vertical section along the north-south axis of the sheepfold; Figure 8This is a schematic diagram of the sheepfold structure; Figure 9 A schematic diagram of a sheepfold model. Detailed Implementation

[0019] The present invention will be further described below with reference to the accompanying drawings and embodiments: A method for monitoring sheepfold environment based on sensor layout optimization and data fusion includes a sensor layout optimization stage S1 and a data fusion evaluation stage S2, wherein the sensor layout optimization stage S1 includes the following steps: S101: Based on the structure of the target sheepfold, a three-dimensional model is established, and CFD fluid simulation is performed to obtain a spatial distribution simulation diagram of the internal environmental parameters of the sheepfold, and the parameter distribution characteristics are preliminarily analyzed. S102: Based on the CFD simulation results and the structural symmetry of the sheepfold and the influence of the external environment, multiple candidate sensor locations are preset in the horizontal and vertical dimensions. S103: Deploy sensors at the candidate locations to collect time-series data of environmental parameters within a preset time period; S104: Using the light-shadow optimization algorithm as the search optimization tool, and the root mean square error (RMSE) between the interpolation restoration result and the actual measurement value as the objective function, the optimization solution is performed to finally obtain the globally optimal or near-optimal set of sensor spatial layout points under a specified number of sensors. The data fusion evaluation stage S2 includes the following steps: S201: Deploy sensor nodes at the locations optimized by S104 to continuously collect multi-parameter environmental data; S202: Use the Kalman filter algorithm to fuse homogeneous data from multiple sensors for the same environmental parameter to obtain a more accurate single parameter estimate after noise reduction; S203: Construct a set of environmental factors including temperature, humidity, carbon dioxide concentration, ammonia concentration, and hydrogen sulfide concentration, and a set of comments for evaluating environmental comfort. S204: The objective weights of each environmental factor are calculated using the entropy method; S205: Determine the membership functions of each environmental parameter corresponding to different rating levels according to the national livestock breeding standards, and calculate the membership degree of each parameter data corresponding to the rating set after processing by S202 to form a membership degree matrix; The evaluation set can be a membership vector of V = {comfortable, suitable, average, poor, bad}, forming a membership matrix R; S206: Perform fuzzy synthesis operation on the weight vector and the membership matrix to obtain the fuzzy comprehensive evaluation result vector B. Based on the principle of maximum membership, output the final evaluation of the comfort level of the sheepfold environment.

[0020] In step S104, the step of obtaining the globally optimal or near-optimal set of sensor spatial layout points for a specified number of sensors is as follows: S104.1 Problem Modeling The sensor placement optimization problem is modeled as a combinatorial optimization problem: Let the set of candidate sensor locations be P={p1,p2,...,pN}, where N is the total number of candidate locations and p is a single sensor location; The goal is to select a subset S⊂P from the set of all candidate points P, which contains a specific number of points, such that when the entire sheepfold environment is reconstructed by interpolation using only the sensor data from the subset S containing the specific number of points, the RMSE between it and the actual measurements of all candidate points is minimized, where RMSE is the root mean square error. The objective function for RMSE is defined as:

[0021] in For interpolated values, These are actual measured values; S104.2 Lighting and Shadow Optimization The optimized process is as follows: 104.2.1. Initialize the light source group Randomly generated There are 1 light source, and each light source represents a sensor layout scheme, that is, a subset of points of size M; 104.2.2. Shadow Depth Calculation Based on the objective function RMSE, for each light source Calculate its shadow depth The calculation formula is:

[0022] Where ϵ is a very small positive number to prevent the denominator from being zero. The greater the shadow depth, the better the layout scheme corresponding to the light source; 104.2.3. Light source update and adaptive adjustment (a) Neighborhood-based fine-tuning strategy For each light source Several candidate new positions are generated within its neighborhood; The neighborhood is defined as randomly replacing k sensor points in the current layout; Select the new position with the largest shadow depth in the neighborhood as the update direction; (b) Adaptive adjustment of light source density Calculate the variance of the shadow depth for each region. If the variance of the shadow depth is less than the density threshold θdense, it is considered that the light sources are over-concentrated in this region; Reduce the number of light sources in this region and randomly relocate some light sources to regions with shallower shadow depth; If the light source density in a certain region is too low, new light sources are randomly generated in this region; (c) Light source clustering mechanism When the shadow depths of multiple light sources are similar and their spatial positions are adjacent, they are merged into a single light source cluster; Perform a local fine search at the center of the light source cluster, using a smaller neighborhood perturbation step size; The light sources within the light source cluster share information to accelerate convergence.

[0023] 104.2.4. Progressive shadow evaluation strategy Use a rough evaluation during the global search stage and a fine evaluation during the local search stage; Preset the iteration number threshold as Tglobal; when the iteration number t < Tglobal, enter the global search stage, and use the computationally simple inverse distance weighted interpolation method to quickly estimate RMSE. At this time, a larger light source update step size is allowed to promote extensive exploration and avoid premature convergence to local extrema; When the iteration number t ≥ Tglobal, enter the local search. The algorithm has locked in the approximate range where the optimal solution may exist, and switches to the Kriging interpolation method, which can accurately simulate spatial variability but has a higher computational cost, to calculate RMSE to evaluate the quality of the solution; the light source update step size is reduced, focusing on local refinement search, and local gradient information is introduced to guide the light sources towards the optimal solution.

[0024] 104.2.5. Local search trigger and retreat Trigger local search when the light sources gather in a certain region, and retreat to the global search if it is ineffective; Among them, the trigger condition is: when multiple light sources gather in a small region and the variance of their shadow depths is less than the threshold θlocal (θlocal is the shadow depth variance threshold of a light source cluster, used to determine whether multiple light sources are "similar" and "excellent" enough in performance to have sufficient reason to trigger the more computationally expensive local search), trigger local search. The local search method uses simulated annealing or gradient descent to perform a depth search within the cluster; The retreat mechanism for retreating to the global search is: if the local search does not significantly improve the shadow depth within τ iterations, cancel the local search and resume the global exploration.

[0025] 104.2.6. Uniform distribution of light sources and adjustment of exploration space Calculate the spatial distribution entropy of the light sources after each round of iteration. The calculation formula is:

[0026] Where H is the spatial distribution entropy of the light source, and R is the number of spatial partitions. For the first The number of light sources in the area, where L is the total number of light sources; If H < θentropy (θentropy is a pre-defined critical entropy value used to determine whether the distribution of light sources in space is "sufficiently uniform"), then the light sources are redistributed to make them cover the search space more uniformly. Periodically launch probe light sources beyond the current boundary to explore. If a region with better performance is found, automatically expand the boundary to include it. At the same time, when the solution group continues to converge to a narrow region, shrink the boundary to focus resources for a refined search. Dynamically adjust the search space boundary to avoid missing potential optimal regions.

[0027] 104.2.7. Termination Conditions If the shadow depth of the optimal light source changes less than the density threshold θdense in η consecutive iterations, or reaches the maximum number of iterations Tmax, then the sensor layout scheme corresponding to the current optimal light source is determined.

[0028] In step S204, the steps of calculating weights using the entropy method include: data normalization processing, calculating the weight of indicators, calculating the information entropy value, calculating the information entropy redundancy, and finally calculating the weight of each indicator.

[0029] In step S205, Gaussian membership functions are used for temperature and humidity parameters, and S-type membership functions are used for carbon dioxide, ammonia, and hydrogen sulfide concentration parameters.

[0030] Sensor network module: Composed of several wireless sensor nodes deployed at optimized locations, used to collect environmental parameter data such as temperature, humidity, carbon dioxide, ammonia, and hydrogen sulfide in the sheepfold; Data aggregation and processing module: used to receive and store data uploaded by the sensor network, and run the layout optimization algorithm and data fusion evaluation algorithm. Application demonstration module: used to display real-time environmental data, historical data curves, and the final comprehensive evaluation results of environmental comfort.

[0031] The sensor network module transmits data to the data aggregation and processing module using ZigBee, LoRa, or NB-IoT wireless communication methods.

[0032] To further explain the present invention, a semi-enclosed earthen sheepfold with a length of 33.7m and a width of 12.4m is used as an example for illustration: Layout optimization implementation: (1) Establish a three-dimensional CFD model of the sheepfold, set boundary conditions, such as wall temperature and thermal conductivity, and simulate the steady-state distribution of the temperature field of the sheepfold under closed conditions in winter (refer to Figure 2 Simulation results show that the temperature is uniform in the horizontal direction, and there is a heat accumulation of about 0.5℃ at the top in the vertical direction.

[0033] (2) Based on simulation and structural analysis, such as door openings and film-covered areas, 18 candidate locations for temperature sensors are initially pre-defined, for example: 14 on the horizontal plane 0.95m above the ground and 4 on the plane 2m above the ground.

[0034] (3) Collect temperature data at 18 locations over 24 hours on a sunny, windless day.

[0035] (4) The objective is to select 4 optimal points from them. The initial number of light sources is set to 20, the maximum number of iterations is 100, and the stopping threshold is 0.01. The light-shadow optimization algorithm is used for optimization. The optimization objective is to minimize the RMSE between the temperature values ​​of the remaining 14 points restored by the inverse distance weighted interpolation of the 4 points and the measured values.

[0036] (5) After solving the algorithm, four optimal layout points were finally obtained, such as points numbered 1, 4, 7 and 18, with an RMSE of 2.8℃, which is better than the average level of traditional random layout (>3.0℃). Subsequent monitoring will only deploy temperature sensors at these four points.

[0037] 2. Implementation of Data Fusion Evaluation: (1) Deploy multi-parameter sensors at the optimized locations to continuously collect data on temperature, humidity, CO2, NH3, and H2S.

[0038] (2) In the homogeneous fusion stage, Kalman filtering is performed on the data from the four temperature sensors to obtain an optimal temperature estimate; The same applies to other parameters such as humidity.

[0039] (3) In the heterogeneous fusion stage, the filtered data of each parameter within a certain period of time are used to form a sample matrix, such as within 1 hour.

[0040] (4) The weight vector of the five environmental parameters in this time period is calculated using the entropy method and denoted as W (e.g. [0.15, 0.16, 0.17, 0.30, 0.22]).

[0041] (5) Refer to the "Evaluation Standard for Livestock and Poultry Breeding Site Environment" to set the membership functions for each parameter; Temperature and humidity are calculated using Gaussian functions, while gas concentration is calculated using S-shaped functions.

[0042] Calculate the membership vector of each parameter value to the comment set V = {comfortable, suitable, average, poor, bad}, and form the membership matrix R.

[0043] (6) Perform fuzzy synthesis operation: B = WR (using weighted average operator) to obtain the comprehensive evaluation result vector B = (0.099, 0.211, 0.289, 0.254, 0.147).

[0044] (7) According to the principle of maximum membership, the maximum value of 0.289 corresponds to the comment "average". The system will finally output the current comfort level of the sheepfold environment as "average" and can display this result to the user.

[0045] In this embodiment, the parameters of the ray-shadow optimization algorithm are set as follows: (1) Number of light sources L = 20; (2) Maximum number of iterations Tmax = 100; (3) Global search stage threshold Tglobal=40; (4) The number of neighborhood disturbance points k=1; (5) Light source density threshold θdense = 0.05; (6) Local search trigger threshold θlocal=0.01; (7) Distribution entropy threshold θentropy = 1.5; (8) Stop threshold δ=0.001, η=5.

[0046] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

[0047] The above-disclosed embodiments are merely specific examples of the present invention. However, the present invention is not limited thereto, and any variations that can be conceived by those skilled in the art should fall within the protection scope of the present invention.

Claims

1. A sensor layout optimization and data fusion based sheep shed environment monitoring method, characterized in that, The method comprises a sensor layout optimization stage S1 and a data fusion evaluation stage S2, wherein the sensor layout optimization stage S1 comprises the following steps: S101: a three-dimensional model is established based on the structure of the target sheep shed, CFD fluid simulation is performed, a spatial distribution simulation diagram of the sheep shed internal environment parameters is obtained, and the parameter distribution characteristics are preliminarily analyzed; S102: according to the CFD simulation results and the symmetry of the sheep shed building structure and the influence of the external environment, a plurality of sensor candidate points are preset in the horizontal and vertical dimensions; S103: sensors are deployed at the candidate points to collect time series data of the environmental parameters in a preset period; S104: the light-shade optimization algorithm is used as a search optimization tool, the root mean square error (RMSE) between the interpolation restoration results and the true measured values is used as the objective function, and optimization solving is performed, so as to finally obtain a globally optimal or approximately optimal sensor spatial layout point set under a specified number of sensors; The data fusion evaluation stage S2 comprises the following steps: S201: sensor nodes are deployed at the points optimized in S104 to continuously collect multi-parameter environmental data; S202: the Kalman filtering algorithm is used to fuse the data of multiple sensors for the same environmental parameter, so as to obtain more accurate single-parameter estimation values after denoising; S203: an environmental factor set comprising temperature, humidity, carbon dioxide concentration, ammonia concentration and hydrogen sulfide concentration, and a comment set for evaluating environmental comfort are constructed; S204: the objective weight of each environmental factor is calculated by using the entropy method; S205: the membership functions of each environmental parameter corresponding to different comment levels are determined according to the national livestock breeding standards, the membership degrees of the parameter data processed in S202 corresponding to the comment set are calculated, and a membership degree matrix is formed; S206: the weight vector and the membership degree matrix are subjected to fuzzy synthesis operation to obtain a fuzzy comprehensive evaluation result vector, and the final sheep shed environmental comfort level evaluation is output according to the maximum membership degree principle.

2. The sheep shed environment monitoring method based on sensor layout optimization and data fusion according to claim 1, characterized in that: In the S104, the step of obtaining a globally optimal or approximately optimal sensor spatial layout point set under a specified number of sensors is: S104.1 problem modeling The sensor layout optimization problem is modeled as a combinatorial optimization problem: Let the candidate sensor point set be P={p1, p2,..., pN}, where N is the total number of candidate points, and p is a single sensor point; The target is to select a subset S P from the total candidate point set P containing a specific number of points, so that the RMSE between the interpolation restoration of the entire sheep shed environment field using only the sensor data in the subset S containing a specific number of points and the true measured values of all candidate points is minimized, where RMSE is the root mean square error; The objective function for RMSE is defined as: where is the interpolated restored value, is the true measured value; S104.2 light-shade optimization The optimization process is as follows: 104.2.

1. initialization of light source group Randomly generated a number of light sources, each light source representing a sensor layout, i.e. a subset of M point positions; 104.2.

2. shadow depth calculation Based on the objective function RMSE, for each light source , the shadow depth , the calculation formula is: wherein ε is a very small positive number to prevent the denominator from being zero, The greater the shadow depth, the better the layout scheme corresponding to the light source; 104.2.

3. light source update and adaptive adjustment (a) neighborhood-based fine-tuning strategy for each light source generate several candidate new positions within its neighborhood; The neighborhood is defined as randomly replacing k sensor points in the current layout; The new position with the maximum shadow depth in the neighborhood is selected as the update direction; (b) Adaptive adjustment of light source density A density threshold θdense is set to determine the degree of homogeneity of light source quality in a region. When the variance is below this threshold, the light source migration mechanism is triggered to avoid local redundancy and waste of computing resources. The shadow depth variance of each region is calculated. If the shadow depth variance is less than the threshold θdense, it is considered that the light source is too concentrated in the region, and the number of light sources in the region needs to be reduced. Some light sources are randomly migrated to regions with shallower shadow depth. If the light source density in a region is too low, new light sources are randomly generated in the region; (c) Light source clustering mechanism When the shadow depths of multiple light sources are similar and their spatial positions are adjacent, they are merged into a light source cluster. Local fine search is performed at the center of the light source cluster, and a smaller neighborhood perturbation step size is used. Light sources in the light source cluster share information to speed up convergence. 104.2.

4. Progressive shadow evaluation strategy Coarse evaluation is used in the global search stage, and fine evaluation is used in the local search stage. The light source update step size is reduced, and the focus is on local fine search. 104.2.

5. Local search triggering and retreat Local search is triggered when light sources are concentrated in a region. If it is invalid, it is retreated to global search. 104.2.

6. Uniform distribution of light sources and adjustment of exploration space The spatial distribution entropy of the light source is calculated after each iteration, and the calculation formula is: Wherein H is the spatial distribution entropy of the light source, R is the number of spatial partitions, is the number of light sources in the first partition, and L is the total number of light sources. If H<θentropy (θentropy is a pre-set threshold value for judging whether the distribution of light sources in space is "sufficiently uniform"), redistribute the light sources to cover the search space more evenly. Periodically emit probe light sources outside the current boundary for exploration. If a region with better performance is found, automatically expand the boundary to include it. At the same time, when the solution group continues to converge in a narrow area, the boundary is contracted to focus resources for fine search. The search space boundary is dynamically adjusted to avoid missing potential optimal regions. 104.2.

7. Termination condition If the shadow depth of the optimal light source changes by less than the density threshold θdense in consecutive η iterations, or the maximum number of iterations Tmax is reached, the current optimal light source corresponding to the sensor layout scheme is given.

3. The sheep shed environment monitoring method based on sensor layout optimization and data fusion according to claim 2, characterized in that: In the step S204, the entropy value method weight calculation step includes: data normalization processing, calculating index proportion, calculating information entropy value, calculating information entropy redundancy, and finally calculating each index weight.

4. The sheep shed environment monitoring method based on sensor layout optimization and data fusion according to claim 1, characterized in that: In step S205, Gaussian membership function is used for temperature and humidity parameters, and S-type membership function is used for carbon dioxide, ammonia, and hydrogen sulfide concentration parameters.

5. A sheep shed environment monitoring system utilising the method of any one of claims 1 to 4, characterised in that, Sensor network module: composed of a plurality of wireless sensor nodes arranged at the optimized layout points, used for collecting temperature, humidity, carbon dioxide, ammonia, and hydrogen sulfide environmental parameter data in the sheep shed; Data aggregation and processing module: used for receiving and storing data uploaded by the sensor network, and running the layout optimization algorithm and data fusion evaluation algorithm; Application display module: used for displaying real-time environmental data, historical data curves, and final environmental comfort comprehensive evaluation results.

6. The sheep shed environment monitoring method based on sensor layout optimization and data fusion according to claim 4, characterized in that: The sensor network module transmits data to the data aggregation and processing module in ZigBee, LoRa or NB-IoT wireless communication mode.