Automatic pigsty excrement cleaning and harmful gas detecting device and method
By incorporating image recognition and gas monitoring technologies into the robot, the problems of low manure removal efficiency and lagging health monitoring in traditional pigsties have been solved, realizing automated manure removal and harmful gas detection in pigsties, thus improving management efficiency and safety.
Patent Information
- Application Number
- CN202510460817.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Traditional pigsty management suffers from low manure removal efficiency, lagging health monitoring, and difficulty in monitoring harmful gases, resulting in high labor intensity, low management efficiency, and difficulty in achieving refined and automated management.
The robot is equipped with a visible light camera, a multispectral camera, and a harmful gas monitoring module. It uses convolutional neural networks and deep reinforcement learning to identify feces and plan manure removal paths, and monitors pig health and harmful gas concentrations in real time, thus achieving automated manure removal and harmful gas detection.
It has improved the automation level of pig house management, reduced labor costs, ensured the health of pigs and the safety of the breeding environment, realized real-time manure removal and health monitoring, and reduced the risk of disease transmission and the threat of harmful gases.
Smart Images

Figure CN120360018B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pig farming, and in particular to an automatic manure removal and harmful gas detection device and method for pigsties. Background Technology
[0002] As a pillar industry of agriculture, pig farming plays a vital role in meeting the pork needs of urban and rural residents. However, with increasing environmental protection pressures, rising feeding costs, and frequent outbreaks of swine diseases, the pig farming industry is facing enormous pressure to transform and upgrade. Against this backdrop, modern, large-scale, standardized, and professional farming models are being accelerated to improve industry efficiency and ensure the stability of pork supply.
[0003] Traditional pigsty management relies heavily on manual labor for manure removal and pig health monitoring. This not only increases labor intensity but also leads to low management efficiency due to the inherent risks of oversights, making it difficult to achieve refined and automated management. Especially in pig health monitoring, traditional methods depend on manual observation and periodic checks, lacking real-time monitoring systems. This means health problems may go undetected, potentially increasing the risk of pigs getting sick. Meanwhile, traditional manure removal in pigsties is mostly done manually at set times, but sometimes this is delayed, leading to manure accumulation. The enclosed environment often promotes the accumulation of harmful gases such as ammonia and hydrogen sulfide, which can seriously affect not only the health of the pigs but also the health of the farm workers. Currently, many automated manure removal systems have been implemented in pigsties. These devices primarily use mechanical devices to automatically remove pig manure. These systems typically include scraper manure removers, suction manure removers, or roller manure removers. Scraper manure removers usually consist of an electrically driven scraper that moves along the pigsty floor, collecting manure and transporting it to a collection trough. Suction-type manure removal machines primarily use suction to draw manure into pipes, which then discharge it to a designated location. Roller-type manure removal devices use rotating rollers to collect manure and deliver it to a collection trough under the slatted floor. However, these manure removal machines are typically bulky, expensive, and lack real-time monitoring of pig health and detection of harmful gas concentrations. Summary of the Invention
[0004] The purpose of this application is to provide an automatic manure removal and harmful gas detection device and method for pigsties, which can improve the automation level of pigsty management and reduce labor costs.
[0005] To achieve the above objectives, this application provides the following solution:
[0006] In a first aspect, this application provides an automatic manure removal and harmful gas detection device for pigsties, including: a robot, a control system, a manure removal device, a visible light camera, a multispectral camera, and a harmful gas monitoring module;
[0007] The control system, manure removal device, visible light camera, multispectral camera, and harmful gas monitoring module are all mounted on the robot. The robot is used to perform patrol tasks according to a preset patrol frequency, and to inspect all pig house units in the pig house during each patrol task.
[0008] For each pigsty unit, the inspection process involves: visible light cameras and multispectral cameras capturing images of the pigsty unit's floor, obtaining visible light and multispectral images of the floor, respectively; the control system inputs the visible light images into a first convolutional neural network to identify feces, and plans a manure removal path based on the identified feces using deep reinforcement learning, then controls the manure removal device to clean the identified feces according to the path; simultaneously, the visible light and multispectral images of the pigsty unit's floor are input into a second convolutional neural network to extract multi-scale features of the feces, and then the extracted multi-scale features are input into a support vector machine to output the health monitoring results of the pigs in the pigsty unit.
[0009] During the robot's inspection of each pigsty unit, the harmful gas monitoring module is used to monitor the concentration of harmful gases in the pigsty unit in real time; the control system is also used to compare the real-time monitored harmful gas concentration with the concentration threshold, and to sound an alarm when the real-time monitored harmful gas concentration exceeds the concentration threshold.
[0010] Secondly, this application provides a method for automatic manure removal and harmful gas detection in pigsties. This method is applied to the aforementioned automatic manure removal and harmful gas detection equipment. The method includes:
[0011] During each patrol mission at a preset patrol frequency, all pigpen units within the pigsty are inspected. For each unit, visible light and multispectral images of the floor are acquired. The visible light image is input into a first convolutional neural network to identify feces. Based on the identified feces, a manure removal path is planned using deep reinforcement learning, and the manure removal device is controlled to clean the identified feces according to the path. The visible light and multispectral images of the pigpen floor are input into a second convolutional neural network to extract multi-scale features of the feces. The extracted multi-scale features are input into a support vector machine to output the health monitoring results of the pigs within the unit. The concentration of harmful gases within the pigpen unit is monitored in real time. The real-time monitored concentration of harmful gases is compared with a concentration threshold, and an alarm is triggered when the real-time monitored concentration of harmful gases exceeds the threshold.
[0012] According to the specific embodiments provided in this application, this application has the following technical effects:
[0013] This application provides an automated manure removal and harmful gas detection device and method for pigsties. Through a control system, a visible light camera, and a multispectral camera, it automatically identifies pig manure and judges the health status of the pigs based on the state of the manure, enabling timely detection of health abnormalities while cleaning manure in real time. Furthermore, the harmful gas monitoring module can monitor the concentration of harmful gases in the pigsty, detecting and triggering alarms in real time during the manure removal process. This solves the problems of low efficiency of manual operation, untimely health monitoring, and inadequate monitoring of harmful gases in existing technologies, improving the automation level of pigsty management and reducing labor costs. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a schematic diagram of the structure of an automatic manure removal and harmful gas detection device for pigsties according to one embodiment of this application;
[0016] Figure 2 This is a schematic diagram of the structure of a charging card slot provided in another embodiment of this application;
[0017] Figure 3 A schematic diagram illustrating the overall working principle of an automatic manure removal and harmful gas detection device for pigsties provided in another embodiment of this application;
[0018] Figure 4 A flowchart illustrating an automatic manure removal and harmful gas detection method for pigsties, provided as an embodiment of this application;
[0019] Figure 5 This is a schematic diagram of a path planning process provided in another embodiment of this application;
[0020] Figure 6 This is a schematic diagram of a multi-scale feature recognition process for feces provided in another embodiment of this application.
[0021] Attached labels: manure removal device-1, visible light camera-2, multispectral camera-3, harmful gas monitoring module-4, signal receiver-5, charging station-6, charging card slot-7, alcohol disinfection spray station-8, water spray station-9. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] In one exemplary embodiment, such as Figure 1 As shown, this application proposes an automatic manure removal and harmful gas detection device for pigsties, aiming to solve the problems of low manure removal efficiency, lagging health monitoring, and difficulty in monitoring harmful gases in traditional pigsty management through intelligent means. The automatic manure removal and harmful gas detection device includes: a robot, a control system, a manure removal device 1, a visible light camera 2 (also known as a patrol camera), a multispectral camera 3 (also known as a multispectral video camera), and a harmful gas monitoring module 4. The control system, manure removal device 1, visible light camera 2, multispectral camera 3, and harmful gas monitoring module 4 are all mounted on the robot. The robot is used to perform patrol tasks according to a preset patrol frequency, and to patrol all pigsty units within the pigsty during each patrol task.
[0025] For the inspection of each pigsty unit: a visible light camera 2 and a multispectral camera 3 are used to photograph the ground of the pigsty unit, obtaining visible light images and multispectral images of the pigsty unit ground, respectively; the control system is used to input the visible light images into the first convolutional neural network to identify feces, and based on the identified feces, to plan a manure removal path through deep reinforcement learning, and then control the manure removal device 1 to clean the identified feces according to the manure removal path; at the same time, the visible light images and multispectral images of the pigsty unit ground are input into the second convolutional neural network to extract multi-scale features of the feces, and then the extracted multi-scale features of the feces are input into the support vector machine to output the health monitoring results of the pigs in the pigsty unit.
[0026] During the robot's inspection of each pigsty unit, the harmful gas monitoring module 4 is used to monitor the concentration of harmful gases in the pigsty unit in real time; the control system is also used to compare the real-time monitored harmful gas concentration with the concentration threshold, and to sound an alarm when the real-time monitored harmful gas concentration is greater than the concentration threshold.
[0027] This application enables the assessment of pig health status through fecal analysis during manure removal. Automated manure removal reduces the labor intensity of manual cleaning, improves work efficiency, and avoids delays in manure removal due to human oversight, thereby effectively reducing the risk of disease transmission in pigs. Simultaneously, the equipment provides a real-time monitoring and automatically adjusting harmful gas detection system that can detect the concentration of harmful gases such as ammonia and hydrogen sulfide in the pigsty in real time, and automatically alarm when the gas concentration is too high. This system achieves real-time monitoring and management of harmful gases, ensuring air quality in the pigsty and preventing harmful gases from threatening pigs and farmers. The introduction of this equipment not only effectively improves the automation and intelligence level of pigsty management but also provides a healthier and safer breeding environment for pigs.
[0028] The device proposed in this application integrates automatic manure removal and harmful gas detection functions. By setting the patrol frequency, the robot can perform manure removal tasks on a regular schedule, and simultaneously analyze the condition of the manure to promptly assess the health status of the pigs. Furthermore, considering that harmful gases can easily accumulate in slatted floor areas, the device also has the function of real-time monitoring of the concentration of harmful gases in the pigsty, effectively protecting the health of both the pigs and the farm workers.
[0029] In another exemplary embodiment, a slatted floor is provided in each pigpen unit. The control system is used to identify the slatted floor based on visible light and multispectral images of the pigpen unit floor, determine the location of the slatted floor, and discharge cleaned manure into the slatted floor according to its location. The control system can identify the special structure of the slatted floor through surface features in the visible light and multispectral images.
[0030] In another exemplary embodiment, such as Figure 2 As shown, the automatic manure removal and harmful gas detection equipment for pigsties in this application also includes a charging slot 7. After each patrol mission is completed, the control system calculates the optimal return path using a path planning algorithm based on the robot's current position and the position of the charging slot 7, and controls the robot to return to the charging slot 7 for charging according to the optimal return path.
[0031] The control system also monitors the robot's battery level in real time during each cruise mission. When the battery level falls below a preset threshold, it automatically triggers a command to return to the charging slot 7. Based on the robot's current position and the position of the charging slot 7, it uses a path planning algorithm to calculate the optimal return path and controls the robot to return to the charging slot 7 for charging according to the optimal return path. (Refer to...) Figure 1 The robot charges its battery via charging port 6.
[0032] An alcohol disinfection system is installed in charging slot 7. When the robot enters charging slot 7, the control system activates the alcohol disinfection system to disinfect the manure removal device 1 and the robot's wheels. Please refer to [the relevant documentation / reference]. Figure 2 The alcohol disinfection system includes an alcohol disinfection spray nozzle 8 and a water spray nozzle 9. Alcohol is sprayed out through the alcohol disinfection spray nozzle 8, and water is sprayed out through the water spray nozzle 9.
[0033] Automatic recharging and disinfection: After completing the tasks of cleaning and monitoring, the robot returns to the charging station to recharge and automatically disinfects the cleaning device to ensure the hygiene and long-term stable operation of the equipment, reduce the risk of germ transmission, and reduce the need for manual cleaning.
[0034] For example, the control system is specifically a central processing unit (CPU) or an embedded computing unit. The CPU or embedded computing unit performs computationally intensive tasks such as path planning, convolutional neural network inference, fecal state analysis, and gas concentration monitoring. Visible light images, multispectral images, and hazardous gas concentrations are typically transmitted to the CPU or embedded computing unit inside the robot, where data processing, analysis, and decision-making are handled. Image data is processed using computer vision algorithms, while hazardous gas concentrations are transmitted to the processing unit via sensor interfaces for real-time monitoring and evaluation.
[0035] Before returning to its charging slot after cleaning, the robot is sprayed with alcohol and water to clean and disinfect it, especially the manure-cleaning shovel. An alarm sounds when the alcohol and water levels are low. These control signals are typically issued by the central processing unit (CPU) or embedded computing unit. The alcohol and water storage tanks are equipped with level sensors to detect the remaining liquid. When the liquid level falls below a set threshold, the sensor transmits a signal to the CPU, triggering a low-level alarm. The CPU then determines the liquid adequacy based on the sensor data. If the remaining alcohol and water are sufficient, the control unit continues spraying; if the liquid is insufficient, the control system triggers an alarm, sounding an alarm to alert the operator or system to replenish the liquid. When the control unit receives a spraying command, it opens the corresponding liquid channel via a solenoid valve, initiating the spraying of alcohol and water. The spraying time, volume, and range can be preset or adjusted in real-time according to task requirements.
[0036] In another exemplary embodiment, the hazardous gas monitoring module 4 is a hazardous gas detector that can detect the concentration of hazardous gases such as ammonia and hydrogen sulfide.
[0037] Figure 1The automatic manure removal and harmful gas detection device for pigsties shown in this application also includes a signal receiver 5. The signal receiver 5 can receive signals from an external positioning system, helping the robot obtain its current position in real time. This aids the robot in autonomous navigation and ensures it can cruise along a predetermined path or return to the charging slot 7, among other tasks. The signal receiver 5 can also receive instructions from the operator or remote control system, such as starting / stopping the manure removal task, adjusting the path, and obtaining real-time feedback. By receiving these instructions, the robot can make timely adjustments or responses as needed.
[0038] Reference Figure 3 The overall working principle of the automatic manure removal and harmful gas detection equipment for pigsties in this application is as follows: First, the robot's patrol interval is set. Every certain period (e.g., 8 hours), the robot will automatically patrol and clean the manure in the pigsty. Upon detecting manure in a unit of pigsty, it will automatically start discharging the manure into the slatted floor to complete the cleaning task, ensuring the cleanliness and hygiene of the pigsty. Second, during the manure removal process, the robot also has a health monitoring function. The robot analyzes the state of the pigs' manure in real time using a visible light camera 2 (RGB (Red Green Blue) camera) and a multispectral camera 3 installed on the device. If abnormalities are found in the manure, such as abnormal shape, blood, or moisture, the robot can immediately issue an alarm and record which pig unit and pen may have a potential health problem, alerting the farmers to the pigs' health issues. In addition, the robot also has a harmful gas monitoring function. The concentration of harmful gases such as ammonia and hydrogen sulfide in pigsties often exceeds the standard, threatening the health of pigs and farmers. The robot monitors the concentration of harmful gases in the pigsty in real time by installing gas sensors. Once the concentration of harmful gases exceeds the set threshold, the robot will automatically issue an alarm, reminding the farmers to take appropriate measures to ensure that the air quality in the pigsty always meets safety standards. Finally, after each manure cleaning task is completed, the robot will automatically return to the charging slot 7. The robot uses built-in sensors to perceive its current position in real time and navigates according to the surrounding environment (such as walls, obstacles, etc.) to ensure it can find the location of the charging slot 7. Based on its current position and the location of the charging slot 7, the robot uses a path planning algorithm to calculate the optimal return path, ensuring efficient and safe arrival at the charging slot 7. The robot monitors the battery level in real time; if the battery level is less than 30% (a preset threshold), it automatically triggers the command to return to the charging slot 7. The slot not only provides charging for the robot but is also equipped with an alcohol disinfection system. When the robot enters the slot, the alcohol disinfection system automatically activates, disinfecting the robot's manure shovel (the structure in the manure cleaning device 1 used for cleaning and removing manure) and wheels, ensuring the cleanliness and hygiene of the equipment and preparing it for the next manure cleaning cycle.
[0039] The main objective of this application is to propose an innovative intelligent robotic device that is not only highly flexible but also effectively solves problems existing in current technologies, such as low manure removal efficiency, delayed health monitoring, and difficulty in real-time monitoring of harmful gas concentrations. Specifically, this application aims to achieve an organic combination of automated manure removal and pig health monitoring through intelligent management, thereby improving the accuracy and efficiency of pigsty management and ensuring the health of pigs and the safety of the breeding environment.
[0040] In summary, this application solves the problems of low efficiency of manual operation, untimely health monitoring, and inadequate monitoring of harmful gases in the existing technology by using automated and intelligent technical means, further improving the automation level of pig house management, ensuring the health of pigs, optimizing the breeding environment, and reducing labor costs.
[0041] Based on the same inventive concept, this application also provides a method for automatically cleaning manure and detecting harmful gases in pigsties, applicable to the aforementioned automatic manure cleaning and harmful gas detection equipment. The solution provided by this method is similar to the solution described in the aforementioned equipment. Therefore, the specific limitations in one or more embodiments of the automatic manure cleaning and harmful gas detection method provided below can be found in the above-described limitations of the automatic manure cleaning and harmful gas detection equipment, and will not be repeated here.
[0042] In one exemplary embodiment, such as Figure 4 As shown, an automatic manure removal and harmful gas detection method for pigsties is provided, including the following steps 101 to 108.
[0043] Step 101: When performing each patrol task according to the preset patrol frequency, patrol all pig house units in the pig house.
[0044] Step 102: During the inspection of each pigsty unit, acquire visible light and multispectral images of the ground of the pigsty unit.
[0045] Step 103: Input the visible light image into the first convolutional neural network to identify feces.
[0046] Step 104: Based on the identified feces, a feces cleaning path is planned through deep reinforcement learning, and the feces cleaning device is controlled to clean the identified feces according to the feces cleaning path.
[0047] Step 105: Input the visible light image and multispectral image of the pigsty unit floor into the second convolutional neural network to extract multiscale features of the feces.
[0048] Step 106: Input the extracted multi-scale features of feces into the support vector machine and output the health monitoring results of pigs in the pig house unit.
[0049] Step 107: Monitor the concentration of harmful gases in the pigsty unit in real time.
[0050] Step 108: Compare the real-time monitored concentration of harmful gas with the concentration threshold, and issue an alarm when the real-time monitored concentration of harmful gas exceeds the concentration threshold.
[0051] By implementing steps 101 to 108 above, and through automated and intelligent technologies, problems such as low efficiency of manual operation, untimely health monitoring, and inadequate monitoring of harmful gases in existing technologies can be solved, thereby further improving the automation level of pig house management, ensuring the health of pigs, optimizing the breeding environment, and reducing labor costs.
[0052] In another exemplary embodiment of this application, the robot automatically removes manure at a set patrol frequency. During each patrol, the robot cleans the manure inside the pigs according to a set path and discharges it into the slatted floor.
[0053] Set the frequency of manure removal:
[0054] T clean =n×T i ;
[0055] T clean T represents the cycle time of the manure removal task (in hours), n represents the number of patrols, and T represents the time of the patrol. i The interval between manure removal tasks set manually (unit: hours).
[0056] In another exemplary embodiment of this application, the manure removal path planning is as follows:
[0057] Through RGB image data I RGB The input convolutional neural network (CNN) model M identifies a set of labels C for each pixel, where C contains two labels: "feces" and "non-feces". Therefore, C is a set of labels associated with the input image I. RGB Two-dimensional label matrices of the same size.
[0058] C = M(I) RGB = [C1,C2,…,C] m ];
[0059] Where C i ∈{“feces”,“non-feces”}, I RGB The input is an RGB image.
[0060] Model M is an image recognition model trained using deep learning, typically trained on a large amount of image data before the robot leaves the factory. The trained model M can perform real-time inference during robot operation, analyzing image data or sensor data from the current environment (such as fecal condition analysis and gas concentration monitoring). The inference process is usually executed by a central processing unit. During navigation, the robot automatically analyzes the state of the feces and determines whether an alarm is needed based on Model M.
[0061] The path to the automatic manure removal task in the pigsty is planned using deep reinforcement learning (DPL).
[0062] The state space is:
[0063] S t ={x t ,y t ,z t C t T p};
[0064] Where x t ,y t ,z t Indicates the robot's current location, C t T represents the distribution of feces. p Indicates task progress.
[0065] The process for determining the task progress is as follows: Sensors on the robot (RGB camera, multispectral camera) are used to collect image data and detection data for stains / residues. The cleaning area is divided into several smaller areas, assuming there are N areas. For each smaller area g, a cleanliness score C is given based on the stain detection results. g (0 represents the dirtiest, 1 represents completely clean).
[0066] Cleanliness level of each area:
[0067] All areas received a cleanliness rating of C. g The cleanliness score for the entire area is obtained by weighted averaging:
[0068]
[0069] Among them, C' t A cleanliness score is assigned to the entire cleaning task, with values between 0 and 1, where 0 indicates completely uncleaned and 1 indicates completely clean. Based on the cleanliness score C... t Calculate task progress. Task progress T p The relationship between T and cleanliness score can be obtained through the following formula: p =C' t×100%; T p This represents the progress of the task, with values ranging from 0% to 100%. When T... p When the value exceeds 90%, it indicates that the cleaning task in that area has been completed.
[0070] The action space is the actions that the robot can take, such as moving forward, backward, turning left, turning right, and stopping cleaning.
[0071] A t ={forward,back,left,right,stop}.
[0072] The reward function is used to evaluate the robot's performance during task execution. The size of the reward is related to factors such as cleaning efficiency, path optimization effect, and task progress.
[0073] R t =α×A clean +β×T p -γ×P l .
[0074] A clean The area cleaned indicates the cleaning effect, T p P indicates the task progress, representing the degree of completion of the cleanup task. l α: The length of the path the robot takes; shorter is better. β: The weight of the cleaning effect, reflecting the impact of the cleaned area on the reward. γ: The weight of the task progress, reflecting the impact of task progress on the reward. γ: The weight of the path length, reflecting the impact of path optimization on the reward.
[0075] This method utilizes computer reinforcement learning algorithms. After defining "state space," "action space," and "reward function," their application in deep reinforcement learning involves learning and optimizing tasks through the interaction between the agent and its environment. The state space *St* describes the environmental state of the agent (robot) at each time step *t*. At each time step, the robot perceives its current state through sensors and maps it to the state space *St*. Based on the current state, the robot decides its next action (e.g., moving forward, backward, turning, etc.) and optimizes its path through interaction with the environment. At each time step, the robot selects an action based on its current state *St*. The action selection strategy determines the optimal action based on the current state and historical experience. At each time step, the robot selects an action and receives a reward *Rt* based on environmental feedback (e.g., cleaning effect, task progress, etc.). The reward is the primary motivation for the robot's learning, encouraging it to choose actions that improve cleaning efficiency, optimize the path, or enhance task completion. The robot learns the effects of different actions based on the reward function, maximizing the reward to improve the effectiveness of its strategy.
[0076] Deep reinforcement learning intelligently optimizes the generation path:
[0077]
[0078] P clean (t) represents the set of path coordinates of the robot cleaning the manure at time t, x a This indicates which unit in the pigsty. This indicates the specific location of the feces in the pigsty.
[0079] In another exemplary embodiment of this application, in order to ensure the cleaning effect, such as Figure 5 As shown, after the manure removal device, controlled according to the manure removal path, removes manure from any identified location each time, the process is performed according to the formula... The cleaning effect is evaluated to obtain the cleaning effect ratio; where C effect To determine the cleaning effect ratio, A clean In order to clear the area, A total The total area of the pigsty unit to be cleaned; if the cleaning effect ratio is greater than the preset ratio threshold, proceed to the next manure area; if the cleaning effect ratio is less than or equal to the preset ratio threshold, remove the manure at this location again.
[0080] C effect The value is between 0 and 1. A value greater than 0.8 is considered a good cleaning effect, and the process can proceed to the next cleaning point. That is, the preset ratio threshold is 0.8.
[0081] In another exemplary embodiment of this application, the multi-scale features of feces include: morphological features of feces, color difference of feces, moisture of feces, and texture features of feces; the texture features include texture contrast, texture uniformity, texture energy, and texture entropy.
[0082] The process of multi-scale feature recognition of feces is as follows: Figure 6 As shown, RGB and multispectral image data are fused and analyzed using a deep convolutional neural network (CNN), and multiscale features of the images are combined to automatically extract fecal particles of different sizes, humidity variations, and texture features.
[0083] Data preprocessing:
[0084] Normalize and enhance RGB and multispectral images to handle image differences under different lighting conditions.
[0085] The dataset was divided into training and testing sets, and the Labelimg tool was used to label feces in different health states.
[0086] Deep feature extraction:
[0087] Convolutional neural networks are used to extract edge, texture, color, and shape features from images.
[0088] RGB images and multispectral images are used as multi-input models for feature fusion.
[0089] F d =CNN(I RGB ,I MS );
[0090] Where I RGB It is an RGB image, I MS It is a multispectral image, F d This is a depth feature vector.
[0091] Model training and classification:
[0092] The model is trained using a Support Vector Machine (SVM), which inputs the depth features of RGB and multispectral images into the SVM for classification. The classification based on the SVM model is as follows:
[0093] The input features are: x=(S,ΔR,Η,Contrast,Homogeneity,Energy,Entropy), and the output model is y∈{1,-1}, where 1 indicates that the pigs are healthy and -1 indicates that the pigs have health problems.
[0094] Decision function:
[0095] f(x) = w T x+b;
[0096] w is the normal vector of the hyperplane, x is the input feature, and b is the bias term.
[0097] Based on the RGB image and the results of Canny edge detection of feces, morphological features of the fecal region are extracted:
[0098]
[0099] Where A represents the area where pig manure is located, and I (image intensity) represents the pixel value at image location (x,y). Let S denote the second derivative along the horizontal direction (x-axis) and S denote the second derivative along the vertical direction (y-axis). S can reflect the morphological characteristics of feces, especially its edges and contours.
[0100] Multispectral cameras are used to acquire images of pig manure at different wavelengths (such as visible light, infrared, and near-infrared). This data reflects the composition and physical characteristics of pig manure, including but not limited to color, moisture, density, and surface texture. Different manure components result in different reflectance spectra, allowing for the assessment of pig health through multispectral imaging analysis. Different components of manure (such as undigested food residue, fat content, and fiber content) affect its spectral reflectance values. For example:
[0101] Color changes: Healthy pig manure is usually brown, while unhealthy pig manure may have abnormal colors, such as being too light, too dark, or green, which may reflect problems with the pig's digestive system.
[0102] Moisture and viscosity: High moisture content in feces may indicate digestive problems such as diarrhea in pigs.
[0103] Surface texture: Abnormal texture (such as granular, overly uniform, or blocky) may indicate indigestion or that the pig is not fully absorbing nutrients.
[0104] After image preprocessing of the multispectral data, the spectral reflectance value is selected as R(λ), where λ is the spectral wavelength.
[0105] Color difference: This reflects changes in the color of pig manure, indicating a healthy or abnormal condition.
[0106] ΔR(λ)=R(λ max )-R(λ min );
[0107] Where R(λ) max ) is the maximum reflection wavelength λ max The corresponding spectral reflectance value, R(λ) min ) is the minimum reflection wavelength λ min The corresponding spectral reflectance value.
[0108] Humidity estimation: Based on the change in reflectance of moisture at specific wavelengths, multispectral reflectance values are used to estimate the humidity (H) of pig manure.
[0109]
[0110] In the formula, Η represents humidity, and ω k Let λ be the weight of the k-th band. k Let R(λ) be the wavelength corresponding to the k-th band, n be the number of bands, and R(λ) be the wavelength corresponding to the k-th band. k ) is λ k The corresponding spectral reflectance value.
[0111] Surface structure extraction:
[0112] Contrast represents the contrast of the texture in the image. Homogeneity represents the uniformity of the image texture. Energy represents the energy of the image texture. Entropy represents the entropy of the image texture.
[0113] Contrast=∑ i,j (ij) 2 p(i,j);
[0114]
[0115] Energy = ∑ i,j p(i,j) 2 ;
[0116] Entropy=-∑ i,j p(i,j)logp(i,j);
[0117] Where p(i,j) is the joint probability of pixel i and pixel j, and is also an element of the gray-level co-occurrence matrix.
[0118] In another exemplary embodiment of this application, the health status of pigs is estimated:
[0119] Health score: A health score is assigned to each pig by combining multiple characteristics and classification results to quantify its health status.
[0120]
[0121] In the formula, ω l f represents the weight of the l-th feature, indicating the degree of influence of that feature on the health score. l This is the classification output for the l-th feature. A higher health score indicates a healthier pig; a lower health score indicates a poorer health condition.
[0122] In another exemplary embodiment of this application, if the health monitoring results indicate that the pigs have health problems, an alarm is immediately issued and the pig house unit where the pigs have health problems is recorded.
[0123] In another exemplary embodiment of this application, the harmful gas monitoring module performs real-time detection of the concentration of harmful gases in the pigsty unit based on the Lambert-Beer model;
[0124] The Lambert-Beer model is as follows:
[0125] I = I0e -αcL ;
[0126] In the formula, I is the light intensity detected by the harmful gas monitoring module, I0 is the incident light intensity, α is the gas absorption coefficient, c is the concentration of harmful gas, and L is the optical path length.
[0127] If the concentration of harmful gases exceeds the set threshold, the equipment will automatically activate the alarm system to notify the farmers.
[0128] This application enables automatic manure removal from pigsties at set time intervals (e.g., every 8 hours), avoiding the cumbersome nature and manual labor reliance of traditional equipment. By efficiently cleaning manure and discharging it into slatted floors, it improves cleaning efficiency and reduces labor intensity. Secondly, manure analysis allows for real-time monitoring of pig health. It automatically identifies abnormalities in pig manure (such as abnormal blood or water content) and issues alarms to promptly remind farmers to take intervention measures. This real-time health monitoring function significantly improves the early detection rate of pig health problems, reduces the frequency of manual inspections, and increases the efficiency of pig farming management. Simultaneously, it features real-time monitoring of harmful gas concentrations, automatically detecting the concentration of harmful gases (such as ammonia and hydrogen sulfide) in the pigsty. If the concentration exceeds the standard, it immediately issues an alarm to remind farmers to take countermeasures. Real-time monitoring effectively reduces harmful gas concentrations, improves the safety of the pigsty environment, and protects the health of both pigs and farmers.
[0129] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0130] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. An automatic manure removal and harmful gas detection device for pigsties, characterized in that, The automatic manure removal and harmful gas detection equipment for pigsties includes: a robot, a control system, a manure removal device, a visible light camera, a multispectral camera, and a harmful gas monitoring module; The control system, manure removal device, visible light camera, multispectral camera, and harmful gas monitoring module are all mounted on the robot. The robot is used to perform patrol tasks according to a preset patrol frequency, and to inspect all pig house units in the pig house during each patrol task. For the inspection of each pigsty unit: visible light cameras and multispectral cameras are used to photograph the floor of the pigsty unit, obtaining visible light images and multispectral images of the floor, respectively; the control system is used to input the visible light images into a first convolutional neural network to identify feces, and based on the identified feces, to plan a manure removal path through deep reinforcement learning, and then control the manure removal device to clean the identified feces according to the manure removal path; simultaneously, the visible light images and multispectral images of the pigsty unit floor are input into a second convolutional neural network to extract multi-scale features of the feces, and then the extracted multi-scale features of the feces are input into a support vector machine to output the health monitoring results of the pigs in the pigsty unit; the multi-scale features of the feces include: morphological features of the feces, color difference of the feces, moisture of the feces, and texture features of the feces; the texture features include texture contrast, texture uniformity, texture energy, and texture entropy; The process for determining the task progress is as follows: the cleaning area is divided into several zones. For each zone, a cleanliness score is given based on the stain detection results. The cleanliness scores of all zones are weighted and averaged to obtain the overall cleanliness score of the entire zone. The task progress is calculated based on the overall cleanliness score of the entire zone. When the task progress value exceeds 90%, it indicates that the cleaning task for that area has been completed. During the robot's inspection of each pigsty unit, the harmful gas monitoring module is used to monitor the concentration of harmful gases in the pigsty unit in real time; the control system is also used to compare the real-time monitored harmful gas concentration with the concentration threshold, and to sound an alarm when the real-time monitored harmful gas concentration exceeds the concentration threshold.
2. The automatic manure removal and harmful gas detection equipment for pigsties according to claim 1, characterized in that, Each pigsty unit is equipped with a slatted floor. The control system is used to identify slatted floors based on visible light and multispectral images of the pigsty unit floor, determine the location of the slatted floors, and discharge the cleaned manure into the slatted floors according to their location.
3. The automatic manure removal and harmful gas detection equipment for pigsties according to claim 1, characterized in that, After each cruise mission is completed, the control system uses a path planning algorithm to calculate the optimal return path based on the robot's current position and the location of the charging slot, and then controls the robot to return to the charging slot for charging according to the optimal return path.
4. The automatic manure removal and harmful gas detection equipment for pigsties according to claim 3, characterized in that, The control system is also used to monitor the robot's battery level in real time during each cruise mission. When the battery level is less than a preset threshold, it automatically triggers a command to return to the charging slot. Based on the robot's current position and the position of the charging slot, it uses a path planning algorithm to calculate the optimal return path and controls the robot to return to the charging slot for charging according to the optimal return path.
5. The automatic manure removal and harmful gas detection equipment for pigsties according to claim 3, characterized in that, An alcohol disinfection system is installed on the charging card slot; Once the robot enters the charging slot, the control system activates the alcohol disinfection system to disinfect the manure removal device and the robot's wheels.
6. A method for automatic manure removal and harmful gas detection in pigsties, characterized in that, The automatic manure removal and harmful gas detection method for pigsties is applied to the automatic manure removal and harmful gas detection equipment for pigsties according to any one of claims 1-5, and the automatic manure removal and harmful gas detection method for pigsties includes: Each patrol mission is carried out according to the preset patrol frequency, and all pig house units in the pig house are inspected. During the inspection of each pigsty unit, visible light and multispectral images of the floor of the pigsty unit were acquired; The visible light image is input into the first convolutional neural network to identify feces; Based on the identified feces, a feces cleaning path is planned through deep reinforcement learning, and the feces cleaning device is controlled to clean the identified feces according to the feces cleaning path; The visible light and multispectral images of the pigsty unit floor are input into the second convolutional neural network to extract multi-scale features of the feces; The extracted multi-scale features of feces are input into a support vector machine, which outputs the health monitoring results of pigs in the pig house unit. Real-time monitoring of harmful gas concentrations within pigsty units; The system compares the real-time monitored concentration of harmful gases with a concentration threshold, and issues an alarm when the real-time monitored concentration of harmful gases exceeds the concentration threshold.
7. The method for automatic manure removal and harmful gas detection in pigsties according to claim 6, characterized in that, After the manure removal device, controlled according to the manure removal path, removes manure from any identified location each time, it is then processed according to the formula. The cleaning effect is evaluated to obtain the cleaning effect ratio; where, To determine the cleaning effect ratio, In order to clear the area, The total area of the pigsty unit to be cleaned; If the cleaning effect ratio is greater than the preset ratio threshold, proceed to the next feces location; If the cleaning effect ratio is less than or equal to the preset ratio threshold, the feces in this area will be removed again.
8. The method for automatic manure removal and harmful gas detection in pigsties according to claim 6, characterized in that, The multi-scale characteristics of feces include: fecal morphological characteristics, fecal color difference, fecal moisture, and fecal texture characteristics; the texture characteristics include texture contrast, texture uniformity, texture energy, and texture entropy. The formula for calculating the color difference is: In the formula, Due to color difference, Maximum reflection wavelength The corresponding spectral reflectance value, minimum reflection wavelength The corresponding spectral reflectance value; The formula for calculating the humidity is: In the formula, For humidity, For the first k Weight of each band, For the first k The corresponding wavelength for each band For the number of bands, for The corresponding spectral reflectance value; The formula for calculating the contrast of the texture is: In the formula, For contrast, For pixels and pixels The joint probability; The formula for calculating the uniformity of the texture is: In the formula, For uniformity; The formula for calculating the energy of the texture is: In the formula, For energy; The formula for calculating the entropy of the texture is: In the formula, Entropy.
9. The method for automatic manure removal and harmful gas detection in pigsties according to claim 6, characterized in that, Real-time monitoring of harmful gas concentrations within pigsty units, specifically including: The hazardous gas monitoring module uses the Lambert-Beer model to detect the concentration of hazardous gases in the pigsty unit in real time; The Lambert-Beer model is as follows: In the formula, The light intensity detected by the hazardous gas monitoring module. For the incident light intensity, The gas absorption coefficient, The concentration of harmful gases This is the optical path length.
10. The method for automatic manure removal and harmful gas detection in pigsties according to claim 6, characterized in that, The extracted multi-scale features of feces are input into a support vector machine, which outputs the health monitoring results of pigs in the pig house unit, followed by: If health monitoring results indicate that the pigs have health problems, an alarm should be issued immediately, and the pig house unit where the pigs have health problems should be recorded.
Citation Information
Patent Citations
Pig house environment monitoring system based on internet of things
CN110597333A
Pig house manure cleaning robot, manure cleaning method and live pig health diagnosis method
CN113785776A
Animal health assessment
CN114175178A
Method and system for identifying cleaning of artificial scrubbing robot
CN119699922A
