Automatic manure cleaning and harmful gas detection equipment and method for hog house
Through the image recognition and gas monitoring technology equipped by the robot, automated manure cleaning and harmful gas detection in pig houses is achieved, solving the problems of low manure cleaning efficiency, lag in health monitoring and difficulty in monitoring harmful gases in traditional pig houses, and improving management efficiency and safety.
Patent Information
- Application Number
- CN202510460817.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-25
AI Technical Summary
In traditional pig house management, low manure cleaning efficiency, lag in health monitoring and difficult monitoring of 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 multi-spectral camera and a harmful gas monitoring module. It uses convolutional neural network and deep reinforcement learning to identify feces and plan feces cleaning paths to monitor the health and harmful gas concentrations in real time, and realizes automated feces cleaning and harmful gas detection.
It has improved the degree of automation of pig house management, reduced labor costs, ensured the health of pigs and the safety of breeding environment, and reduced the risk of disease transmission and the threat of harmful gases to pigs and breeders.
Smart Images

Figure CN120360018A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of pig farming, and particularly to an automatic manure cleaning and harmful gas detection device and method for pig houses. Background Art
[0002] As a pillar industry of agriculture, pig farming plays a crucial role in meeting the pork demand of urban and rural residents. However, with the increasing environmental protection pressure, gradually rising feeding costs, and frequent occurrence of pig diseases, the pig farming industry is facing huge pressure for transformation and upgrading. Against this background, modern, large-scale, standardized, and specialized farming models are accelerating to improve industrial efficiency and ensure the stability of pork supply.
[0003] Traditional pig house management methods mainly rely on manual operations for manure cleaning and pig health monitoring. This not only increases the labor intensity but also, due to the easy occurrence of omissions in manual operations, leads to low management efficiency and is difficult to achieve refined and automated management methods. Especially in pig health monitoring, traditional methods rely on manual observation and regular inspections, lacking a real-time monitoring system, which makes it possible that health problems may not be detected in time, and even increases the risk of pigs getting sick. At the same time, most traditional pig house manure cleaning is carried out in a manual and timed manner. However, sometimes the manure cleaning work is not timely, which easily causes the accumulation of manure in the pig house, and the enclosed breeding environment often promotes the accumulation of harmful gases such as ammonia and hydrogen sulfide. In severe cases, it not only affects the health of pigs but also poses a threat to the health of breeding personnel. Currently, many automatic manure cleaning systems have been applied to pig houses, and these devices mainly automatically clean pig manure through mechanical devices. These systems usually include scraper-type manure cleaners, suction-type manure cleaners, or roller-type manure cleaning devices. The scraper-type manure cleaner usually consists of an electrically driven scraper, which moves along the pig house floor, collects manure, and conveys it to the manure collection tank. The suction-type manure cleaner mainly uses suction to suck manure into the pipeline and discharges it to a designated location through the pipeline. The roller-type manure cleaning device collects manure through rotating rollers and sends it to the collection tank under the slatted floor. And these manure cleaning mechanical devices are usually bulky, costly, and lack the function of real-time monitoring of the health status of pigs and the detection of harmful gas concentrations. Summary of the Invention
[0004] The purpose of this application is to provide an automatic manure cleaning and harmful gas detection device and method for pig houses, which can improve the automation degree of pig house management and reduce labor costs.
[0005] To achieve the above purpose, this application provides the following solutions:
[0006] In a first aspect, the present application provides an automatic manure cleaning and harmful gas detection device for a pig house, including: a robot, a control system, a manure cleaning device, a visible light camera, a multi-spectral camera, and a harmful gas monitoring module;
[0007] The control system, manure cleaning device, visible light camera, multi-spectral camera and harmful gas monitoring module are all installed on the robot. The robot is used to perform patrol tasks according to the preset patrol frequency and patrol all piggery units in the piggery during each patrol task.
[0008] For the inspection of each pig house unit: the visible light camera and the multispectral camera are used to photograph the floor of the pig house unit, and the visible light image and the multispectral image of the floor of the pig house unit are obtained respectively; the control system is used to input the visible light image into the first convolutional neural network, identify the feces, and plan the manure cleaning path through deep reinforcement learning according to the identified feces, and then control the manure cleaning device to clean the identified feces according to the manure cleaning path; at the same time, the visible light image and the multispectral image of the floor of the pig house unit are input into the second convolutional neural network to extract the 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 pig house unit.
[0009] When the robot inspects each pig house unit, the harmful gas monitoring module is used to monitor the concentration of harmful gases in the pig house unit in real time. The control system is also used to compare the concentration of harmful gases monitored in real time with the concentration threshold, and to sound an alarm when the concentration of harmful gases monitored in real time is greater than the concentration threshold.
[0010] In a second aspect, the present application provides a method for automatic manure cleaning and harmful gas detection in a pig house, which is applied to the above-mentioned automatic manure cleaning and harmful gas detection equipment in a pig house, and the method for automatic manure cleaning and harmful gas detection in a pig house includes:
[0011] When performing each patrol mission according to the preset patrol frequency, all pig house units in the pig house are patrolled; when patrolling each pig house unit, the visible light image and multispectral image of the ground of the pig house unit are obtained; the visible light image is input into the first convolutional neural network to identify feces; according to the identified feces, the manure cleaning path is planned through deep reinforcement learning, and the manure cleaning device is controlled to clean the identified feces according to the manure cleaning path; the visible light image and multispectral image of the ground of the pig house unit are input into the second convolutional neural network to extract the multi-scale features of the feces; the extracted multi-scale features of the feces are input into the support vector machine, and the health monitoring results of the pigs in the pig house unit are output; the concentration of harmful gases in the pig house unit is monitored in real time; the concentration of harmful gases monitored in real time is compared with the concentration threshold, and an alarm is triggered when the concentration of harmful gases monitored in real time is greater than the concentration threshold.
[0012] According to the specific embodiments provided in the present application, the present application has the following technical effects:
[0013] The present application provides a pigsty automatic manure cleaning and harmful gas detection device and method. It can automatically identify pig feces through a control system, a visible light camera, and a multispectral camera, and judge the health status of pigs according to the state of the feces. It can timely detect health abnormalities while cleaning the feces in real time. In addition, the harmful gas monitoring module has the function of monitoring the concentration of harmful gases in the pigsty and can detect and alarm in real time during the manure cleaning process. It solves the problems of low efficiency of manual operation, untimely health monitoring, and inadequate monitoring of harmful gases in the prior art, improves the automation level of pigsty management, and reduces labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0015] Figure 1 It is a schematic structural diagram of a pigsty automatic manure cleaning and harmful gas detection device in an embodiment of the present application;
[0016] Figure 2 It is a schematic structural diagram of a charging slot provided in another embodiment of the present application;
[0017] Figure 3 It is a schematic diagram of the overall working principle of a pigsty automatic manure cleaning and harmful gas detection device provided in another embodiment of the present application;
[0018] Figure 4 It is a schematic flowchart of a pigsty automatic manure cleaning and harmful gas detection method provided in an embodiment of the present application;
[0019] Figure 5 It is a schematic flowchart of path planning provided in another embodiment of the present application;
[0020] Figure 6 It is a schematic flowchart of multi-scale feature recognition of feces provided in another embodiment of the present application.
[0021] Reference numerals: manure cleaning device - 1, visible light camera - 2, multispectral camera - 3, harmful gas monitoring module - 4, signal receiver - 5, charging place - 6, charging slot - 7, alcohol disinfection spraying place - 8, clean water spraying place - 9. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0022] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0023] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0024] In an exemplary embodiment, as Figure 1 shown, the present application proposes a pigsty automatic manure cleaning and harmful gas detection device, aiming to solve problems such as low manure cleaning efficiency, lagging health monitoring, and difficulty in monitoring harmful gases in traditional pigsty management through intelligent means. The pigsty automatic manure cleaning and harmful gas detection device includes: a robot, a control system, a manure cleaning device 1, a visible light camera 2 (also known as a patrol camera), a multispectral camera 3 (also known as a multispectral camera), and a harmful gas monitoring module 4. The control system, the manure cleaning device 1, the visible light camera 2, the multispectral camera 3, and the harmful gas monitoring module 4 are all arranged on the robot. The robot is used to execute a cruise task according to a preset cruise frequency and patrol all pigsty units in the pigsty during each execution of the cruise task.
[0025] For the patrol of each pigsty unit: The visible light camera 2 and the multispectral camera 3 are used to photograph the ground of the pigsty unit to obtain a visible light image and a multispectral image of the ground of the pigsty unit respectively; the control system is used to input the visible light image into a first convolutional neural network to identify feces, and according to the identified feces, plan a manure cleaning path through deep reinforcement learning, and then control the manure cleaning device 1 to clean the identified feces according to the manure cleaning path; at the same time, the visible light image and the multispectral image of the ground of the pigsty unit 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 result of the pigs in the pigsty unit.
[0026] During the process of the robot patrolling 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 concentration of harmful gases with a concentration threshold and alarm when the real-time monitored concentration of harmful gases is greater than the concentration threshold.
[0027] This application can determine the health status of pigs through fecal analysis while cleaning manure. Through automated manure cleaning, the labor intensity of manual manure cleaning is reduced, work efficiency is improved, and the problem of untimely manure cleaning caused by manual omissions is avoided, thereby effectively reducing the risk of pig disease transmission. At the same time, the harmful gas detection system of this device that provides real-time monitoring and automatic adjustment can detect the concentrations 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 realizes the real-time monitoring and management of harmful gases, ensures the air quality in the pigsty, and prevents harmful gases from threatening pigs and breeding personnel. The introduction of the equipment of this application not only effectively improves the automation and intelligent level of pigsty management, but also provides a healthier and safer breeding environment for pigs.
[0028] The equipment proposed in this application integrates the functions of automatic manure cleaning and harmful gas detection. By setting the patrol frequency, the robot can perform manure cleaning tasks regularly, and at the same time, through the analysis of the manure situation, it can timely judge the health status of pigs. In addition, considering that harmful gases are likely to accumulate in the slatted floor area, the equipment of this application also has the function of real-time monitoring of the harmful gas concentration in the pigsty, effectively protecting the health of pigs and breeding personnel.
[0029] In another exemplary embodiment, slatted floors are provided in each pigsty unit. The control system is used to identify the slatted floors, determine the positions of the slatted floors according to the visible light images and multispectral images of the pigsty unit floor, and discharge the cleaned manure into the slatted floors according to the positions of the slatted floors. Among them, the control system can identify the special structure of the slatted floors through the surface features of the ground in the visible light images and multispectral images.
[0030] In another exemplary embodiment, as Figure 2 shown, the automatic manure cleaning and harmful gas detection equipment for pigsties of this application further includes: a charging card slot 7. After each cruise task is completed, the control system is used to calculate the optimal return path using the path planning algorithm according to the current position of the robot and the position of the charging card slot 7, and control the robot to return to the charging card slot 7 for charging according to the optimal return path.
[0031] The control system is also used to real-time monitor the battery power of the robot during each cruise task execution. When the battery power is less than the preset power threshold, it automatically triggers the instruction to return to the charging card slot 7, calculates the optimal return path using the path planning algorithm according to the current position of the robot and the position of the charging card slot 7, and controls the robot to return to the charging card slot 7 for charging according to the optimal return path. Referring to Figure 1 the robot charges the battery through the charging place 6.
[0032] An alcohol disinfection system is provided on the charging slot 7. When the robot enters the charging slot 7, the control system controls the alcohol disinfection system to disinfect the manure cleaning device 1 and the wheels of the robot. Still refer to Figure 2 , the alcohol disinfection system includes an alcohol disinfection spraying area 8 and a clean water spraying area 9. Alcohol is sprayed out through the alcohol disinfection spraying area 8, and clean water is sprayed out through the clean water spraying area 9.
[0033] Automatic recharging and disinfection: After completing the manure cleaning and monitoring tasks, the robot returns to the charging station for charging and automatically disinfects the cleaning device to ensure the hygiene and long-term stable operation of the equipment, reduce the risk of pathogen transmission, and reduce the need for manual cleaning.
[0034] Exemplarily, the control system is specifically a central processing unit or an embedded computing unit. Central processing unit or embedded computing unit: Used to perform computationally intensive tasks such as path planning, inference of convolutional neural networks, manure status analysis, and gas concentration monitoring. Visible light images, multispectral images, and harmful gas concentrations are usually transmitted to the central processing unit or embedded computing unit inside the robot, and these hardware components are responsible for data processing, analysis, and decision-making. Image data is processed through computer vision algorithms, and harmful gas concentrations are transmitted to the processing unit through the sensor interface for real-time monitoring and evaluation.
[0035] Before the robot returns to the charging slot for charging after cleaning, alcohol and clean water are sprayed to clean and disinfect the robot, especially the manure shovel part. When the alcohol and clean water are insufficient, an alarm sound will be emitted. These control signals are usually issued by the central processing unit or the embedded computing unit. The alcohol and clean water storage tanks are equipped with liquid level sensors to detect the remaining amount of the liquid. When the liquid level is lower than the set threshold, the liquid level sensor will transmit a signal to the central processing unit to trigger a low liquid level alarm. The central processing unit will judge the sufficiency of the liquid based on the data fed back by the sensor. If the remaining amount of alcohol and clean water is sufficient, the control unit continues to perform the spraying operation; if the liquid is insufficient, the control system will trigger the alarm system to emit an alarm sound to remind the operator or the system to make a supplement. When the control unit receives the spraying instruction, it opens the corresponding liquid channel through the solenoid valve to start the spraying of alcohol and clean water. The spraying time, spraying amount, and spraying range can be preset or adjusted in real time according to the task requirements.
[0036] In another exemplary embodiment, the harmful gas monitoring module 4 is a harmful gas detector that can detect the concentrations of harmful gases such as ammonia and hydrogen sulfide.
[0037] Figure 1The automatic manure cleaning and harmful gas detection equipment for pig houses in this application also includes a signal receiver 5. The signal receiver 5 can receive signals from an external positioning system to help the robot obtain its current position in real time. This helps the robot perform autonomous navigation and ensures that it can cruise along a predetermined path or return to the charging slot 7 and other tasks. The signal receiver 5 can also receive instructions from the operator or the remote control system, such as starting / stopping the manure cleaning task, adjusting the path, obtaining real-time feedback, etc. By receiving these instructions, the robot can make timely adjustments or responses as needed.
[0038] Referring to Figure 3 , the overall working principle of the automatic manure cleaning and harmful gas detection equipment for pig houses in this application is as follows: First, set the robot's cruising interval time. The robot will automatically cruise and clean the manure in the pig house every certain period (such as 8 hours). After detecting manure in a unit pig house, it will automatically start to discharge the manure into the slotted floor to complete the cleaning task, ensuring the cleanliness and hygiene of the pig house; Second, during the manure cleaning process, the robot also has a health monitoring function. The robot analyzes the manure status of pigs in real time through the visible light camera 2 (RGB (Red Green Blue) camera) and the multispectral camera 3 installed on the equipment. If abnormalities are found in the manure, such as abnormal shape, blood, moisture, etc., the robot can immediately issue an alarm and record which pigsty unit and which pen of pigs may have health risks, prompting the breeding personnel to pay attention to the health problems of the pigs; In addition, the robot also has a harmful gas monitoring function. The concentrations of harmful gases such as ammonia and hydrogen sulfide in the pig house often exceed the standard, threatening the health of pigs and breeding personnel. The robot monitors the concentration of harmful gases in the pig house in real time through the installed gas sensors. Once the monitored harmful gas concentration exceeds the set threshold, the robot will automatically issue an alarm to remind the breeding personnel to take appropriate countermeasures to ensure that the air quality in the pig house always meets the safety standards; Finally, after each manure cleaning task is completed, the robot will automatically return to the charging slot 7. The robot senses its current position in real time through the built-in sensors and navigates according to the surrounding environment (such as walls, obstacles, etc.) to ensure that it can find the position of the charging slot 7. The robot calculates the optimal return path using the path planning algorithm based on the current position and the position of the charging slot 7 to ensure efficient and safe arrival at the charging slot 7. The robot monitors the battery power in real time, and when the power is less than 30% (the preset power threshold), it will automatically trigger the instruction to return to the charging slot 7. The slot not only provides the charging function for the robot but also is equipped with an alcohol disinfection system. When the robot enters the slot, the alcohol disinfection system will automatically start to disinfect the manure shovel (the structure in the manure cleaning device 1 for cleaning and shoveling manure) and the wheels of the robot to ensure the cleanliness and hygiene of the equipment and prepare for the next cruise and manure cleaning.
[0039] The main objective of this application is to propose an innovative intelligent robot device, which not only has high flexibility but also can effectively solve problems existing in the prior art, such as low manure cleaning efficiency, lagging health monitoring, and difficulty in real-time monitoring of harmful gas concentration. Specifically, this application aims to achieve an organic combination of automated manure cleaning and pig health status monitoring through intelligent management, improve the accuracy and efficiency of pigsty management, and ensure the health of pigs and the safety of the breeding environment.
[0040] In summary, this application solves problems in the prior art, such as low efficiency of manual operation, untimely health monitoring, and inadequate harmful gas monitoring, through automated and intelligent technical means, further improves the automation level of pigsty management, ensures the health of pigs, optimizes the breeding environment, and reduces labor costs.
[0041] Based on the same inventive concept, the embodiments of this application also provide a method for automatic manure cleaning and harmful gas detection in a pigsty, which is applied to the above-mentioned automatic manure cleaning and harmful gas detection equipment for pigsties. The implementation solutions provided by this method to solve problems are similar to those recorded in the above-mentioned equipment. Therefore, the specific limitations in one or more embodiments of the method for automatic manure cleaning and harmful gas detection in a pigsty provided below can refer to the limitations on the automatic manure cleaning and harmful gas detection equipment for pigsties in the foregoing text, and will not be elaborated here.
[0042] In an exemplary embodiment, as Figure 4 shown, a method for automatic manure cleaning and harmful gas detection in a pigsty is provided, including the following steps 101 to 108.
[0043] Step 101: When performing each cruise task according to a preset cruise frequency, patrol all pigsty units in the pigsty.
[0044] Step 102: When patrolling each pigsty unit, obtain visible light images 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 manure.
[0046] Step 104: According to the identified manure, plan a manure cleaning path through deep reinforcement learning, and control the manure cleaning device to clean the identified manure according to the manure cleaning path.
[0047] Step 105: Input the visible light image and multispectral image of the ground of the pigsty unit into the second convolutional neural network to extract multi-scale features of the manure.
[0048] Step 106: Input the extracted multi-scale features of the manure into a support vector machine to output the health monitoring result of the pigs in the pigsty unit.
[0049] Step 107: Real-time monitor the concentration of harmful gases in the pigsty unit.
[0050] Step 108: Compare the real-time monitored concentration of harmful gases with the concentration threshold, and give an alarm when the real-time monitored concentration of harmful gases is greater than the concentration threshold.
[0051] Implement the above Steps 101 to 108. Through automated and intelligent technical means, solve the problems in the prior art such as low efficiency of manual operation, untimely health monitoring, and inadequate monitoring of harmful gases, further improve the automation level of pigsty management, ensure the health of pigs, optimize the breeding environment, and reduce labor costs.
[0052] In another exemplary embodiment of the present application, the robot automatically clears manure according to the set cruise frequency. Each time it cruises, the robot will clean the manure in the pigsty according to the set path and discharge it into the slatted floor.
[0053] Set the manure cleaning frequency:
[0054] T clean = n × T i ;
[0055] T clean is the cycle time of the manure cleaning task (unit: hour), n is the number of cruises, and T i is the interval time of the manure cleaning task set manually (unit: hour).
[0056] In another exemplary embodiment of the present application, the content of manure cleaning path planning is as follows:
[0057] The RGB image data I RGB is input into the convolutional neural network (CNN) model M, and the model identifies the label set C of each pixel point, where C contains two labels: "manure" and "non-manure". Therefore, C is a two-dimensional label matrix with the same size as the input image I RGB .
[0058] C = M(I RGB ) = [C1, C2,..., C m ;
[0059] where C i ∈ {"manure", "non-manure"}, and I RGB is the input RGB image.
[0060] Model M is an image recognition model trained through deep learning, which is usually trained with a large amount of image data before the robot leaves the factory. The trained model M can perform real-time inference during the operation of the robot to analyze the image data or sensor data (such as fecal state analysis, gas concentration monitoring) in the current environment. The inference process is usually executed by the central processing unit. During the cruising process, the robot will automatically analyze the state of the feces and determine whether to give an alarm according to model M.
[0061] Plan the path to the automatic manure cleaning task in the pigsty through Deep Reinforcement Learning (DPL).
[0062] The state space is:
[0063] S t ={x t ,y t ,z t ,C t ,T p};
[0064] Among them, x t ,y t ,z t represent the current position of the robot, C t represents the fecal distribution, and T p represents the task progress.
[0065] The process of determining the task progress is as follows: Use the sensors (RGB camera, multispectral camera) on the robot to collect image data and detection data of stains / residues. The cleaning area is divided into several small areas. Suppose there are N areas. For each small area g, according to the detection result of the stain, a cleanliness score C g (0 means the dirtiest, 1 means completely clean) is given.
[0066] The cleanliness of each area:
[0067] The cleanliness scores C g of all areas are weighted and averaged to obtain the cleanliness score of the entire area:
[0068]
[0069] Among them, C’ t is the cleanliness score of the entire cleaning task, with a value between 0 and 1. 0 means completely uncleaned, and 1 means completely clean. According to the cleanliness score C t calculate the task progress. The relationship between the task progress T p and the cleanliness score can be obtained through the following formula: T p =C’ t×100%; T p is the completion progress of the task, with values ranging from 0% to 100%. When the value of T p exceeds 90%, it indicates that the cleaning task in this area has been completed.
[0070] The action space is the actions that the robot can take: moving forward, backward, turning left, turning right, and stopping manure cleaning.
[0071] A t = {forward, back, left, right, stop}.
[0072] The reward function is used to evaluate the performance of the robot during the 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 of the cleaned area represents the cleaning effect, T p represents the task progress, indicating the degree of completion of the cleaning task, P l is the path length that the robot has traveled, and the shorter the length, the 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 the task progress on the reward. γ: The weight of the path length, reflecting the impact of path optimization on the reward.
[0075] The method uses the computer's reinforcement learning algorithm. After "state space", "action space", and "reward function", their usage methods in deep reinforcement learning are to complete the learning and optimization of the task through the interaction between the agent and the environment. The state space St describes the environmental state of the agent (robot) at each time step t. At each time step, the robot senses its current state through sensors and maps it to the state space St. Based on the current state, the robot decides the next action (such as moving forward, backward, turning, etc.) and optimizes the path through interaction with the environment. At each time step, the robot selects an action based on the current state St. The action selection strategy will determine the optimal action according to the current state and historical experience. At each time step, the robot selects an action and obtains a reward Rt according to the environmental feedback (such as cleaning effect, task progress, etc.). The reward is the main driving force for the robot to learn, encouraging the robot to choose actions that can improve cleaning efficiency, optimize the path, or increase the task completion degree. The robot learns about the effects of different actions according to the reward function and improves the effectiveness of the strategy by maximizing the reward.
[0076] Intelligent Optimization of Generating Path by Deep Reinforcement Learning:
[0077]
[0078] P clean (t) is the set of path coordinates for the robot to clean manure at time t, and x a represents the unit number in the pigsty, indicating the specific location of the manure in the pigsty.
[0079] In another exemplary embodiment of the present application, to ensure the cleaning effect, as Figure 5 shown, after each shoveling of any identified manure by the manure cleaning device according to the manure cleaning path, the cleaning effect is evaluated according to the formula to obtain the cleaning effect ratio; in the formula, C effect is the cleaning effect ratio, A clean is the cleaning area, and A total is the total area of the pigsty unit to be cleaned; if the cleaning effect ratio is greater than the preset ratio threshold, go to the next manure location; if the cleaning effect ratio is less than or equal to the preset ratio threshold, shovel the manure at this location again.
[0080] C effect The value of is between 0 and 1, and when it is greater than 0.8, it is considered that the cleaning effect is good and the next cleaning point can be visited. That is, the preset ratio threshold is 0.8.
[0081] In another exemplary embodiment of the present application, the multi-scale features of the manure include: the morphological features of the manure, the color difference of the manure, the humidity of the manure, and the texture features of the manure; the texture features include the contrast of the texture, the uniformity of the texture, the energy of the texture, and the entropy of the texture.
[0082] The recognition process of the multi-scale features of the manure is as Figure 6 shown. Through a Convolutional Neural Network (CNN), the RGB image and the hyperspectral image data are fused and analyzed, and combined with the multi-scale features of the image, to automatically extract manure particles of different sizes, humidity changes, and texture features.
[0083] Data Preprocessing:
[0084] Normalize and enhance the RGB image and the hyperspectral image to handle image differences under different lighting conditions.
[0085] Divide the data set into a training set and a test set, and use the Labelimg tool to label the manure in different health states.
[0086] Deep Feature Extraction:
[0087] Extract edge, texture, color, and morphological features in the image using a convolutional neural network.
[0088] Use the RGB image and the multispectral image as a multi-input model for feature fusion.
[0089] F d = CNN(I RGB , I MS );
[0090] where I RGB is the RGB image, I MS is the multispectral image, and F d is the deep feature vector.
[0091] Model training and classification:
[0092] Use a Support Vector Machine (SVM) for training, and input the deep features of the RGB image and the multispectral image 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 y ∈ {1, -1}, where 1 indicates the pig is healthy and -1 indicates there are health problems with the pig.
[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] Extract the morphological features of the fecal area based on the RGB image combined with the Canny edge detection fecal results:
[0098]
[0099] where A represents the area where pig feces are located, the image intensity I(x, y) represents the pixel value at the image position (x, y), represents the second derivative along the horizontal direction (x-axis) and represents the second derivative along the vertical direction (y-axis), and S can reflect the morphological features of the feces, especially its edges and contours.
[0100] Pig manure image data at different wavelengths (such as visible light, infrared, near-infrared, etc.) are obtained through a multispectral camera. These data can reflect the composition and physical characteristics of pig manure, including but not limited to information such as color, humidity, density, surface texture, etc. Different manure components will result in different reflection spectra, so the health status of pigs can be judged through multispectral imaging analysis. Different components of manure (such as undigested food residues, fat content, fiber content, etc.) will affect its spectral reflection value. For example:
[0101] Color change: Healthy pig manure usually appears brown, while unhealthy pig manure may show abnormal colors, such as being too light, too dark or green, which may reflect problems in the pig's digestive system.
[0102] Humidity and stickiness: Manure with higher humidity may reflect digestive problems such as diarrhea in pigs.
[0103] Surface texture: Abnormal textures (such as granular, overly uniform or lumpy) may indicate indigestion or that the pig has not fully absorbed nutrients.
[0104] After image preprocessing of the multispectral data, the spectral reflection value is selected as R(λ), where λ is the spectral wavelength.
[0105] Color difference: Reflects the color change of pig manure, indicating a healthy or abnormal state.
[0106] ΔR(λ) = R(λ max ) - R(λ min );
[0107] where R(λ max ) is the spectral reflection value corresponding to the maximum reflection wavelength λ max , and R(λ min ) is the spectral reflection value corresponding to the minimum reflection wavelength λ min .
[0108] Humidity estimation: According to the change in the reflectivity of water in a specific band, the humidity Η of pig manure is estimated using the multispectral reflection value.
[0109]
[0110] In the formula, Η is the humidity, ω k is the weight of the k-th band, λ k is the wavelength corresponding to the k-th band, n is the number of bands, and R(λ k ) is the spectral reflection value corresponding to λ k .
[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 (i - j) 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 the present application, the health status of pigs is estimated:
[0119] Health score: By integrating multiple features and classification results, a health score is assigned to each pig to quantify its health status.
[0120]
[0121] In the formula, ω l is the weight of the l-th feature, indicating the degree of influence of this feature on the health score. f l is the classification output of the l-th feature. The higher the value of the health score, the healthier the pig; the lower the health score, the worse the health status of the pig.
[0122] In another exemplary embodiment of the present application, if the health monitoring result shows that the pig has a health problem, an alarm is immediately issued, and the pigsty unit where the pig has a health problem is recorded.
[0123] In another exemplary embodiment of the present application, the harmful gas monitoring module detects the concentration of harmful gases in the pigsty unit in real time based on the Lambert-Beer model;
[0124] Among them, the Lambert-Beer model is:
[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 gases, and L is the optical path length.
[0127] If the concentration of harmful gases exceeds the set threshold, the device will automatically activate the alarm system to notify the breeders.
[0128] This application can regularly carry out automatic manure cleaning in the pigsty at set time intervals (such as every 8 hours), avoiding the disadvantages of the traditional equipment being bulky and relying on manual labor. By efficiently cleaning the manure in the pigsty and discharging the cleaned manure into the slotted floor, the manure cleaning efficiency is improved and the labor intensity is reduced. Secondly, the health status of pigs can be monitored in real time through manure analysis. It can automatically identify abnormalities in pig manure (such as abnormal blood, moisture, etc.) and issue an alarm through the system to timely remind the breeders to take intervention measures. This real-time health monitoring function greatly improves the early detection rate of pig health problems, reduces the frequency of manual inspections, and improves the efficiency of breeding management. At the same time, it has a real-time monitoring function for the concentration of harmful gases and can automatically detect the concentration of harmful gases (such as ammonia, hydrogen sulfide) in the pigsty. Once the concentration exceeds the standard, it can immediately issue an alarm to remind the breeders to take countermeasures. Real-time monitoring can effectively reduce the concentration of harmful gases, improve the environmental safety of the pigsty, and ensure the health of pigs and breeders.
[0129] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, 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, it should be considered as the scope described in this specification.
[0130] In this article, specific examples are used to elaborate on the principle and implementation mode of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. An automatic manure cleaning and harmful gas detection device for pig houses, characterized in that, The automatic manure cleaning and harmful gas detection equipment for pig houses includes: a robot, a control system, a manure cleaning device, a visible light camera, a multispectral camera, and a harmful gas monitoring module; The control system, the manure cleaning device, the visible light camera, the multispectral camera, and the harmful gas monitoring module are all arranged on the robot; The robot is used to perform a cruising task according to a preset cruising frequency and inspect all pig house units in the pig house during each cruising task; For the inspection of each pig house unit: the visible light camera and the multispectral camera are used to take pictures of the ground of the pig house unit to obtain a visible light image and a multispectral image of the ground of the pig house unit respectively; the control system is used to input the visible light image into the first convolutional neural network to identify feces, and according to the identified feces, plan a manure cleaning path through deep reinforcement learning, and then control the manure cleaning device to clean the identified feces according to the manure cleaning path; at the same time, the visible light image and the multispectral image of the ground of the pig house unit are input into the second convolutional neural network to extract the 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 pig house unit; During the inspection of each pig house unit by the robot, the harmful gas monitoring module is used to monitor the concentration of harmful gases in the pig house unit in real time; the control system is also used to compare the real-time monitored concentration of harmful gases with a concentration threshold, and alarm when the real-time monitored concentration of harmful gases is greater than the concentration threshold.
2. The pigsty automatic manure cleaning and harmful gas detection device according to claim 1, characterized in that, A slotted floor is arranged in each pig house unit; The control system is used to identify the slotted floor according to the visible light image and the multispectral image of the ground of the pig house unit, determine the position of the slotted floor, and discharge the cleaned feces into the slotted floor according to the position of the slotted floor.
3. The pigsty automatic manure cleaning and harmful gas detection equipment according to claim 1, characterized in that The automatic manure cleaning and harmful gas detection equipment for pig houses further includes: a charging slot; After each cruising task is completed, the control system is used to calculate the optimal return path according to the current position of the robot and the position of the charging slot using a path planning algorithm, and control the robot to return to the charging slot for charging according to the optimal return path.
4. The pigsty automatic manure cleaning and harmful gas detection device according to claim 3, characterized in that, The control system is also used to monitor the battery power of the robot in real time during each cruising task. When the battery power is less than a preset power threshold, it automatically triggers an instruction to return to the charging slot, calculates the optimal return path according to the current position of the robot and the position of the charging slot using a path planning algorithm, and controls the robot to return to the charging slot for charging according to the optimal return path.
5. The pigsty automatic manure cleaning and harmful gas detection device according to claim 3, characterized in that, An alcohol disinfection system is arranged on the charging slot; When the robot enters the charging slot, the control system controls the alcohol disinfection system to disinfect the manure cleaning device and the wheels of the robot.
6. A method for automatic manure cleaning and harmful gas detection in a pigsty, characterized in that, The automatic manure cleaning and harmful gas detection method for pig houses is applied to the automatic manure cleaning and harmful gas detection equipment according to any one of claims 1-5. The automatic manure cleaning and harmful gas detection method for pig houses includes: During each cruising task performed according to a preset cruising frequency, all pig house units in the pig house are inspected; When inspecting each pig house unit, obtain a visible light image and a multispectral image of the ground of the pig house unit; Input the visible light image into the first convolutional neural network to identify feces; Based on the identified feces, plan the feces cleaning path through deep reinforcement learning, and control the feces cleaning device to clean the identified feces according to the feces cleaning path; Input the visible light image and multi-spectral image of the pigsty unit floor into the second convolutional neural network to extract the multi-scale features of the feces; Input the extracted multi-scale features of the feces into the support vector machine to output the health monitoring results of the pigs in the pigsty unit; Real-time monitor the concentration of harmful gases in the pigsty unit; Compare the real-time monitored concentration of harmful gases with the concentration threshold, and give an alarm when the real-time monitored concentration of harmful gases is greater than the concentration threshold.
7. The method for automatic manure cleaning and harmful gas detection in a pigsty according to claim 6, characterized in that, After each shoveling of any identified feces by the manure cleaning device according to the manure cleaning path, the cleaning effect is evaluated according to the formula to obtain the cleaning effect ratio; in the formula, C effect is the cleaning effect ratio, A clean is the cleaning area, and A total is the total area of the pig house unit to be cleaned; If the cleaning effect ratio is greater than the preset ratio threshold, go to the next feces location; If the cleaning effect ratio is less than or equal to the preset ratio threshold, shovel the feces here again.
8. The automatic manure cleaning and harmful gas detection method for pig houses according to claim 6, characterized in that, The multi-scale features of the feces include: the morphological features of the feces, the color difference of the feces, the humidity of the feces, and the texture features of the feces; the texture features include the contrast of the texture, the uniformity of the texture, the energy of the texture, and the entropy of the texture; The calculation formula for the color difference is: ΔR(λ) = R(λ max ) - R(λ min ); where ΔR(λ) is the color difference, and R(λ max ) is the spectral reflectance value corresponding to the maximum reflection wavelength λ max , and R(λ min ) is the spectral reflectance value corresponding to the minimum reflection wavelength λ min . The calculation formula for the humidity is as follows: In the formula, Η is the humidity, ω k is the weight of the k-th band, λ k is the corresponding wavelength of the k-th band, n is the number of bands, R(λ k ) is the spectral reflectance value corresponding to λ k ; The calculation formula for the contrast of the texture is: Contrast = ∑ i,j (i - j) 2 p(i, j); where Contrast is the contrast, and p(i, j) is the joint probability of pixel i and pixel j; The calculation formula for the uniformity of the texture is as follows: In the formula, Homogeneity is the uniformity; The calculation formula for the energy of the texture is: Energy = ∑ i,j p(i, j) 2 ; where Energy is the energy; The calculation formula for the entropy of the texture is: Entrogy = -∑ i,j p(i, j) log p(i, j); where Entropy is the entropy.
9. The automatic manure cleaning and harmful gas detection method for pig houses according to claim 6, characterized in that, Real-time monitor the concentration of harmful gases in the pigsty unit, specifically including: 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; Among them, the Lambert-Beer model is: I = I0e -αcL ; where 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.
10. The automatic manure cleaning and harmful gas detection method for pig houses according to claim 6, characterized in that, After inputting the extracted multi-scale features of the feces into the support vector machine to output the health monitoring results of the pigs in the pigsty unit, it also includes: If the health monitoring result is that the pig has a health problem, immediately issue an alarm and record the pigsty unit where the pig has a health problem.
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
Toy type automatic excrement cleaning system for pigs
CN209017618U
Cited By
Hog house disinfection, deodorization and epidemic prevention breeding system
CN120827090A