An intelligent breeding system and method based on the Internet of Things
By installing sensors in the livestock pens to collect data, and using algorithms to analyze the characteristics and color changes of feces and sewage, the cleaning time can be dynamically predicted, thus overcoming the shortcomings of traditional cleaning methods and realizing intelligent and refined fecal and sewage treatment.
Patent Information
- Application Number
- CN202510561338.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Traditional timed cleaning methods are insufficient to meet the cleaning needs of breeding beds, and there is a lack of intelligent breeding solutions that can monitor in real time and accurately determine the best time to clean.
By installing image sensors and gas sensors in the livestock pens, environmental data is collected and an analysis set is constructed. The characteristics of feces and sewage are extracted using target detection algorithms. Combined with time series prediction models and HSV color space quantization, cleaning time is dynamically predicted and adjusted, and a multi-dimensional feature vector is constructed as a cleaning standard.
It enables dynamic monitoring and accurate prediction of manure and waste conditions, avoids environmental pollution, improves the automation and precision of aquaculture management, and ensures the scientific nature and cleanliness of the aquaculture environment.
Smart Images

Figure CN120472391B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data analysis, and particularly relates to an intelligent breeding system and method based on the Internet of Things. BACKGROUND
[0002] Under the tide of rapid development of smart agriculture, the breeding industry is marching towards informatization, automation and intelligentization. The deep integration of the Internet of Things, big data and artificial intelligence technology enables breeders to monitor the feeding and growth of livestock in real time through video monitoring systems, and also enables them to intelligently control the amount of drinking water and feeding according to the age of livestock and environmental temperature, thereby significantly improving feed conversion rate and breeding efficiency. At the same time, the accurate collection of data such as temperature and humidity, light, and ammonia concentration by various environmental sensors provides strong support for the development of scientific breeding programs.
[0003] The breeding bed, as the core basic unit of intelligent feeding, bears the important function of daily activities and rest of livestock, and is the main place for livestock to move around and rest all day long. Since livestock almost feed, sleep and move around all day long, the environmental state directly affects the health and growth of livestock, and is a key link in intelligent breeding environment monitoring. Due to individual differences, growth stage changes and diet structure adjustment of livestock, the time and amount of excrement produced are uncertain, and the traditional fixed-time cleaning mode cannot meet the cleaning needs of the breeding bed. Therefore, there is a lack of an effective solution that can monitor the pollution data of the breeding bed in real time, accurately determine the best cleaning time through intelligent analysis, and realize on-demand cleaning, which has become a key obstacle to the development of intelligent breeding. SUMMARY
[0004] The present application aims to provide an intelligent breeding system and method based on the Internet of Things to solve the problems in the prior art.
[0005] To achieve the above-mentioned purpose, the present application provides the following technical solution: an intelligent breeding method based on the Internet of Things, the intelligent breeding method comprising the following steps:
[0006] Step S1, monitoring the shed through an environmental sensor and collecting environmental data in the shed to build an environmental data analysis set;
[0007] Step S1-1, setting a breeding monitoring period, collecting environmental data of the shed according to the preset breeding monitoring period to build an environmental data analysis set, and the environmental data analysis set is used for image data and gas data of the shed;
[0008] Step S1-2, data collection on the smart breeding house by environmental sensors, the environmental sensors including image sensors and gas sensors, image data in the house is obtained by image sensors, the image data including house floor image data; NH3 concentration and CO2 concentration in the house are collected by gas sensors.
[0009] Periodic monitoring and data collection on the house by environmental sensors in the smart breeding house can comprehensively obtain environmental data such as house images and gases, and build an environmental data analysis set, which provides reliable data support for subsequent accurate analysis of house environmental conditions, timely discovery of abnormalities and measures, and helps to optimize the breeding environment and improve breeding efficiency and animal health level.
[0010] Step S2, analyze and extract image data in the environmental data analysis set, process the floor image data in the house by a target detection algorithm to build a floor cleaning image set, build a floor cleaning image time curve graph according to the timestamp data of each cleaning of the floor in the house and the floor image data corresponding to the timestamp data, and predict the next floor cleaning time of the house according to the floor cleaning image time curve graph, which is recorded as the first floor cleaning time; analyze and extract gas data in the environmental data analysis set to control gas exchange in the house;
[0011] Step S2-1, according to the image data in the environmental data analysis set, the image data and timestamp data of feces are analyzed and extracted according to the color features and texture features of the feces by a target detection algorithm to build a floor cleaning image set;
[0012] Step S2-2, according to the timestamp of the floor cleaning in the house as an index, the timestamp data in the floor cleaning image set is matched, and the matched floor image data and corresponding timestamp data are extracted;
[0013] Step S2-3, according to the extracted timestamp data and corresponding floor image data, the analysis and processing are carried out, the analysis and processing are specifically feature extraction of the floor image data, the feature extraction including feature extraction of color feature values and texture feature values of the floor image data corresponding to different timestamp data;
[0014] Step S2-4, x-axis is built with timestamp data as horizontal coordinate, y-axis is built with feature values extracted from floor image data as vertical coordinate, floor cleaning image time curve graph is built through x-axis and y-axis; the floor cleaning image time curve graph includes two curves with the same timestamp data, which are color feature curve and texture feature curve;
[0015] Step S2-5, according to the time stamp data on the x-axis of the ground cleaning image time curve, a time interval is added, and the addition time of the next time stamp data on the x-axis is predicted by the time series prediction model. The predicted addition time is taken as the next ground cleaning time of the cage, which is recorded as the first ground cleaning time;
[0016] The time series prediction model prediction calculation uses the following formula:
[0017]
[0018] In the formula, Pt represents the predicted time of ground cleaning for the cage; a represents the base constant, specifically the initial offset; n represents the autoregressive order; Yi represents the autoregressive coefficient; Pt-i represents the lag history value, specifically the historical data at time t-i; m represents the moving average order; Rj represents the moving average coefficient; and Ft-j represents the error value at time t-j;
[0019] Step S2-6, according to the preset NH3 concentration threshold and CO2 concentration threshold, the gas exchange of the cage is controlled. When the NH3 concentration in the cage obtained by the gas sensor exceeds the NH3 concentration threshold, or the CO2 concentration exceeds the CO2 concentration threshold, the ventilation device in the cage is started to replace the gas.
[0020] By extracting the time stamp and corresponding image data in the ground cleaning image set, the ground cleaning image time curve is constructed and the next ground cleaning time is predicted, which can deeply mine the time law and feature evolution trend of the manure change. The color and texture features of the manure image are extracted and drawn into a curve, combined with the time series prediction model, which can not only intuitively present the change of the manure state with time, but also accurately predict the ground cleaning demand based on the historical data, effectively avoid the environmental problems caused by the accumulation of manure, provide reliable basis for intelligent and scientific ground cleaning arrangement, and improve the automation level and resource utilization efficiency of breeding management;
[0021] Step S3, according to the ground cleaning image time curve, the color feature extraction and analysis of the ground image data are performed. By analyzing and calculating the ground color change of the cage in the adjacent two time stamp data in the ground cleaning image time curve, the time required for the ground color change is calculated based on the color feature, which is recorded as the second ground cleaning time. According to the first ground cleaning time and the second ground cleaning time, the ground cleaning time of the cage is calculated by weighted fusion, and the ground of the cage is cleaned
[0022] Step S3-1, taking the time stamp data in the ground cleaning image time curve as the index, searching from the origin position along the positive direction of the x-axis, and sequentially extracting the color features in the ground cleaning image time curve;
[0023] Step S3-2, the extracted color features are quantized through the HSV color space, and the HSV represents H as the hue, S as the saturation, and V as the lightness. The specific process of quantization is as follows:
[0024] Step S3-2-1, the extracted color feature data of the fecal pollution image is converted from the RGB color space to the HSV color space. Based on the conversion formula of RGB and HSV, the RGB value of each pixel point is calculated to obtain the corresponding hue value, saturation value and lightness value.
[0025] Step S3-2-2, the average value and the standard deviation of the H, S and V channels are calculated respectively based on the converted HSV values of all pixel points in the fecal pollution image.
[0026] Step S3-2-3, the value range of the H, S and V channels is divided into several intervals, and the proportion of the number of pixel points in each interval is counted.
[0027] Step S3-2-4, the average value, the standard deviation and the pixel proportion data in each interval are combined to construct a multi-dimensional feature vector including color features and texture features.
[0028] Step S3-3, the color features of the ground image data after quantization are used as the color judgment standard for ground cleaning, and are recorded as standard color feature values.
[0029] By extracting the color features in the ground cleaning image time curve, quantizing through the HSV color space and constructing a multi-dimensional feature vector as the color judgment standard for ground cleaning, the abstract fecal pollution color state can be converted into quantifiable and comparable precise data indicators. By using RGB-HSV conversion and statistical pixel point data, the distribution rule and change characteristics of fecal pollution color can be deeply analyzed, which provides objective and scientific basis for judging whether the fecal pollution meets the cleaning condition, effectively avoids the subjectivity and error of human judgment, improves the accuracy and standardization of ground cleaning decision, and ensures the cleanliness of the breeding environment.
[0030] Step S3-4, in the fecal pollution cleaning image time curve, two adjacent time stamp data in the ground cleaning image time curve are selected, which are recorded as the ground cleaning observation interval. The ground image data in the ground cleaning observation interval is extracted from the ground cleaning image set through the time stamp data of the ground cleaning observation interval.
[0031] Step S3-5, color feature values and corresponding timestamp data of the ground image data extracted in step S3-4 are extracted, an x-axis is constructed with the timestamp data as the horizontal coordinate, a y-axis is constructed with the color feature values as the vertical coordinate, and a color change trend graph is constructed through the x-axis and the y-axis; the ground cleaning image moment graph includes a plurality of timestamp data, and the number of the constructed color change trend graphs is the total number of the timestamp data minus one;
[0032] Step S3-6, a standard color change trend graph is obtained through curve fitting of all the constructed color change trend graphs, denoted as a standard color change trend graph, and the timestamp data with the same color feature values in the standard color change trend graph are taken as the time for the next ground cleaning of the pen;
[0033] Step S3-7, ground image data in the pen is acquired in real time through an image sensor, color feature values are extracted, and the extracted color feature values are input into the standard color change trend graph to calculate the time required for the color feature values to change to the standard color feature values, denoted as a second ground cleaning time;
[0034] By analyzing the ground cleaning image moment graph, constructing a color change curve graph based on the ground color change in adjacent timestamp, and combining the color judgment standard to calculate the second ground cleaning time, the evolution process and speed of the fecal color can be dynamically captured. The image data is extracted at the observation interval to construct a trend graph and fit a standard curve, so that the color change rule is more clear and intuitive, the current color feature value is compared with the standard value in real time, the time when the fecal pollution reaches the cleaning condition is accurately predicted, a dynamic and accurate time reference is provided for the ground cleaning work, the timeliness and effectiveness of the breeding environment management are ensured, and the fine level of intelligent breeding fecal treatment is improved;
[0035] Step S3-8, according to the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient, the time for the pen to clean the ground is calculated;
[0036] Step S3-9, by calculating the deviation value of the ground cleaning first time and the ground cleaning second time, the weight coefficients of the ground cleaning first time and the ground cleaning second time are dynamically adjusted, and the judgment conditions of the dynamic adjustment are as follows:
[0037] When the ground cleaning first time is not more than the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient remain unchanged;
[0038] When the ground cleaning first time is more than the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient are dynamically adjusted through the deviation ratio;
[0039] The calculation formula of the dynamically adjusted weight coefficient is as follows:
[0040]
[0041] In the formula, w2, new represents the dynamically adjusted weight coefficient of the second time of ground cleaning; w2 represents the weight coefficient of the second time of ground cleaning; and w1 represents the weight coefficient of the first time of ground cleaning.
[0042] The first time of ground cleaning is based on the prediction of the historical time sequence rule, and the second time of ground cleaning focuses on the judgment of the color change trend. The weight distribution can comprehensively consider the time rule and real-time state characteristics of the excrement evolution. When the two times are deviated, the weight is flexibly adjusted according to the deviation proportion, so that the determination of the ground cleaning time is more in line with the actual situation, the limitations of single prediction method are avoided, the scientificity, adaptability and reliability of the ground cleaning time decision are enhanced, and the breeding environment is always in a good state.
[0043] Further, an intelligent breeding system based on the Internet of Things, the intelligent breeding system comprises an environment data acquisition module, a ground analysis and prediction module, a behavior and environment monitoring module, a color quantification module, a color analysis module and a weight adjustment module;
[0044] The environment data acquisition module is used for monitoring and collecting image data of the excrement in the house to build a set; the ground analysis and prediction module is used for extracting a timestamp and image data to build a curve and predict the next ground cleaning time; the behavior and environment monitoring module is used for monitoring the behavior of the breeding animals and the gas concentration in the house, and starting a music soothing system and a ventilation device when an anomaly occurs; the color quantification module is used for extracting color features of the excrement image and quantifying the color features as a cleaning judgment standard; the color analysis module is used for building a curve according to the color change of the ground and calculating the second cleaning time; and the weight adjustment module is used for fusing the two times to calculate the ground cleaning time and dynamically adjusting the weight;
[0045] The output end of the environment data acquisition module is electrically connected to the input end of the ground analysis and prediction module; the output end of the ground analysis and prediction module is electrically connected to the input end of the behavior and environment monitoring module; the output end of the behavior and environment monitoring module is electrically connected to the input end of the color quantification module; the output end of the color quantification module is electrically connected to the input end of the color analysis module; and the output end of the color analysis module is electrically connected to the input end of the weight adjustment module;
[0046] The environment data collection module comprises a device deployment unit and a data collection unit; the device deployment unit is used for installing an image sensor in an intelligent breeding house; and the data collection unit is used for collecting ground image data according to a preset breeding monitoring period and storing the data;
[0047] The ground analysis and prediction module comprises a data indexing unit and a curve prediction unit; the data indexing unit is used for extracting data with a ground cleaning timestamp as an index; and the curve prediction unit is used for constructing a ground cleaning image time curve and predicting a first ground cleaning time;
[0048] The behavior environment monitoring module comprises a data monitoring and analysis unit and a device control execution unit; the data monitoring and analysis unit is responsible for collecting and analyzing breeding animal images and house gas data, and judging whether animal behavior and environmental conditions are abnormal; and the device control execution unit controls a music pacification system and a ventilation device according to the result of the data monitoring and analysis unit
[0049] The color quantification module comprises a feature extraction unit and a standard construction unit; the feature extraction unit is used for extracting color features from the ground cleaning image time curve; and the standard construction unit is used for quantitatively processing the color features to construct standard color feature values;
[0050] The color analysis module comprises a data screening unit and a trend calculation unit; the data screening unit is used for selecting adjacent timestamp data to extract corresponding ground image data; and the trend calculation unit is used for constructing and fitting a color change trend graph to calculate a second ground cleaning time;
[0051] The weight adjustment module comprises a time calculation unit and a weight adjustment unit; the time calculation unit is used for calculating a house ground cleaning time according to a preset weight; and the weight adjustment unit is used for dynamically adjusting a weight coefficient according to the two time deviations.
[0052] Compared with the prior art, the present application has the following advantages:
[0053] 1、The present application installs an image sensor in an intelligent breeding house, collects ground image data according to a preset breeding monitoring period, and constructs a set, thereby realizing dynamic monitoring of manure conditions. Based on the collected timestamp data, the generation law and distribution state of manure can be accurately mastered, data support can be provided for scientifically formulating a cleaning plan, the condition that ground cleaning lacks data basis in traditional breeding is changed, manure treatment efficiency is effectively improved, breeding environment management is optimized, and the breeding process is more intelligent and standardized.
[0054] 2、The application extracts the timestamp and corresponding image data in the ground cleaning image set, constructs a ground cleaning image moment curve, and predicts the next ground cleaning time by using a time series prediction model. The color and texture features of the feces image are extracted, and the feature changes are drawn into a curve to deeply mine the time law and feature evolution trend of the feces change. This way can accurately predict the ground cleaning demand based on historical data, avoid environmental problems caused by feces accumulation, and improve the automation level and resource utilization efficiency of breeding management.
[0055] 3、The application quantizes the color features of the feces image in HSV color space, constructs a multi-dimensional feature vector as the color judgment standard of ground cleaning, and converts the abstract feces color state into quantifiable data indicators. Combined with the color change curve constructed according to the color change of the ground within the adjacent timestamp, the current color feature value is compared with the standard value in real time to accurately predict the time when the feces reaches the cleaning condition. Finally, the two predicted times are fused by weighting and the weight is dynamically adjusted to ensure the scientificity and accuracy of the ground cleaning decision and improve the fine level of intelligent breeding feces treatment. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 It is a flowchart of the intelligent breeding method based on the Internet of Things of the application;
[0057] Figure 2 It is a structural schematic diagram of the intelligent breeding system based on the Internet of Things of the application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, not all. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the application.
[0059] Embodiment one: as shown in the application, a technical solution is provided, an intelligent breeding method based on the Internet of Things, the intelligent breeding method comprising the following steps: Figure 1
[0060] Step S1, monitor the shed by the environment sensor, and collect and construct the environment data analysis set of the environment data in the shed;
[0061] Step S1-1, set the breeding monitoring period, collect the environment data of the shed according to the preset breeding monitoring period, and construct the environment data analysis set, which is used for image data and gas data of the shed;
[0062] Step S1-2, data collection on the smart breeding house through environmental sensors, including image sensors and gas sensors, image data in the house is obtained through image sensors, including house floor image data; NH3 concentration and CO2 concentration in the house are collected through gas sensors.
[0063] In specific implementation, taking a pig house as an example, a high-definition image sensor can be installed on the top or side of the house, and a manure image is taken every 30 minutes according to a preset breeding monitoring period, and the image and corresponding timestamp are transmitted to the data center for storage by using the Internet of Things technology to build a floor cleaning image set. The principle is to establish a manure state database by continuous data collection to provide a basis for subsequent analysis. It should be noted that the installation position of the image sensor should avoid animal activity obstruction, and regular maintenance should be ensured to ensure the accuracy and continuity of data collection, and the stability of data transmission should be ensured to prevent data loss.
[0064] Step S2, analyze and extract image data in the environmental data analysis set, process the floor image data in the house through a target detection algorithm to build a floor cleaning image set, and build a floor cleaning image time curve according to the timestamp data of each cleaning of the floor in the house and the floor image data corresponding to the timestamp data. According to the floor cleaning image time curve, the next floor cleaning time of the house is predicted, which is recorded as the first floor cleaning time. Analyze and extract gas data in the environmental data analysis set to control gas exchange in the house.
[0065] Step S2-1, according to the image data in the environmental data analysis set, the image data and timestamp data of the manure are analyzed and extracted according to the color features and texture features of the manure through a target detection algorithm to build a floor cleaning image set.
[0066] Step S2-2, according to the timestamp of the floor cleaning in the house as an index, the timestamp data in the floor cleaning image set is matched, and the matched floor image data and corresponding timestamp data are extracted.
[0067] Step S2-3, according to the extracted timestamp data and corresponding floor image data, the analysis and processing are carried out, and the analysis and processing are specifically feature extraction of the floor image data, and the feature extraction includes feature extraction of color feature values and texture feature values of floor image data corresponding to different timestamp data.
[0068] Step S2-4: Construct the x-axis with timestamp data as the horizontal axis and the y-axis with the feature values extracted from the ground image data as the vertical axis. Construct a ground cleanup image time curve using the x-axis and y-axis. The ground cleanup image time curve includes two curves with the same timestamp data, namely the color feature curve and the texture feature curve.
[0069] Step S2-5: Based on the timestamp data on the x-axis of the ground cleanup image time curve, add time intervals, predict the next time timestamp data addition time on the x-axis using the time series prediction model, and use the predicted addition time as the time of the next ground cleanup of the enclosure, which is recorded as the first time of ground cleanup.
[0070] Step S2-6: Control the gas exchange in the enclosure according to the preset NH3 concentration threshold and CO2 concentration threshold. When the gas sensor detects that the NH3 concentration in the enclosure exceeds the NH3 concentration threshold or the CO2 concentration exceeds the CO2 concentration threshold, start the ventilation device in the enclosure to exchange the gas.
[0071] In practice, the pandas library is used to index and match the timestamp data in the ground cleaning image set, storing the extracted image data and timestamp key-value pairs in dictionary form. Then, the OpenCV library is used to extract the color and texture features of the images. Computer programming is used to implement data filtering and image feature extraction, constructing a timeline of ground cleaning images based on historical data. It is important to ensure data integrity during the data extraction process to avoid affecting curve construction due to missing data. Simultaneously, the image feature extraction algorithm must be optimized according to the characteristics of fecal sludge to ensure that the features accurately reflect the state of fecal sludge.
[0072] Step S3: Analyze and extract the color features of the ground image data at each time point in the ground cleanup image time curve, and quantify the color features to use as the color judgment standard for ground cleanup.
[0073] Step S3-1: Using the timestamp data in the ground cleanup image time curve as an index, search along the positive x-axis from the origin position, and extract the color features in the ground cleanup image time curve in sequence.
[0074] Step S3-2: Quantize the extracted color features using the HSV color space, where HSV represents hue, S represents saturation, and V represents lightness. The specific quantization process is as follows:
[0075] Step S3-2-1: Convert the extracted fecal image color feature data from RGB color space to HSV color space. Based on the conversion formula between RGB and HSV, calculate the RGB value of each pixel to obtain the corresponding hue value, saturation value, and brightness value.
[0076] Step S3-2-2: For the HSV values of all pixels in the fecal image after conversion, calculate the average value and standard deviation of the H, S, and V channels respectively;
[0077] Step S3-2-3: Divide the value range of H, S, and V channels into several intervals, and count the percentage of pixels in each interval.
[0078] Step S3-2-4: Combine the calculated average value, standard deviation, and pixel percentage data of each interval to construct a multi-dimensional feature vector that includes color features and texture features;
[0079] Step S3-3: Use the color features of the ground image data after quantization as the color judgment standard for ground cleaning, and record it as the standard color feature value;
[0080] In practical implementation, taking Matlab software as an example, the extracted RGB data of the fecal waste image is converted into HSV data using its built-in functions. Statistical analysis is then performed on each HSV channel, and intervals are divided to construct a multi-dimensional feature vector as a color judgment standard. The principle is that the HSV color space better matches human visual perception, quantifying the color characteristics of fecal waste into a comparable standard. It is important to note that the RGB to HSV conversion formula must be applied accurately, and the interval division must be reasonably set based on the actual range of ground color variations to avoid inaccurate judgment standards due to improper division.
[0081] Step S3-4: In the fecal sewage cleaning image time curve, select two adjacent timestamp data in the ground cleaning image time curve and record them as the ground cleaning observation interval. Extract the ground image data within the ground cleaning observation interval from the ground cleaning image set using the timestamp data of the ground cleaning observation interval.
[0082] Step S3-5: Extract color feature values and corresponding timestamp data from the ground image data extracted in step S3-4. Construct an x-axis with timestamp data as the horizontal axis and a y-axis with color feature values as the vertical axis. Construct a color change trend graph using the x-axis and y-axis. The ground cleanup image time curve graph includes multiple timestamp data, and the number of color change trend graphs constructed is one less than the total number of timestamp data.
[0083] Step S3-6: Obtain a standard color change trend map by curve fitting for all constructed color change trend maps, and denot it as the standard color change trend map. Use the timestamp data where the color feature value in the standard color change trend map is the same as the standard color feature value as the time of the next ground cleaning of the enclosure.
[0084] Step S3-7, real-time acquisition of ground image data in the pigsty through the image sensor, extraction of color feature values, input of the extracted color feature values into the standard color change trend chart, calculation of the time required for the color feature value change to the standard color feature value, and recording of the second ground cleaning time;
[0085] In specific implementation, taking pigsty manure treatment as an example, adjacent timestamp data is selected, a color change trend chart is drawn by using the matplotlib library of Python, and a standard color change trend chart is obtained by curve fitting through the least square method. The principle is to analyze the ground color change trend in adjacent time, and predict the cleaning time by combining the color judgment standard. It should be noted that a suitable fitting function should be selected in the curve fitting process to avoid overfitting or underfitting.
[0086] Step S3-8, calculation of the ground cleaning time of the pigsty according to the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient;
[0087] Step S3-9, dynamic adjustment of the weight coefficients of the ground cleaning first time and the ground cleaning second time by calculating the deviation value of the ground cleaning first time and the ground cleaning second time, and the judgment conditions of the dynamic adjustment are as follows:
[0088] When the ground cleaning first time does not exceed the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient remain unchanged;
[0089] When the ground cleaning first time exceeds the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient are dynamically adjusted by the deviation ratio;
[0090] In specific implementation, the ground cleaning first time weight is initially set to 0.4 and the second time weight is initially set to 0.6, the difference percentage of the two times is calculated, and the weight is dynamically adjusted by using the system algorithm. The principle is to combine the advantages of the two prediction times, and flexibly allocate the weight according to the deviation.
[0091] Step S6, acquisition of image data of the farmed animals in the pigsty through the image sensor, combination of the AI behavior analysis model and the music soothing system to monitor and manage the farmed animals in the pigsty;
[0092] The music system in the enclosure is controlled based on preset posture deviation thresholds and movement frequency deviation thresholds. Image data of farmed animals collected by image sensors is input into an AI behavior analysis model for analysis. Based on deep learning algorithms, abnormal postures of farmed animals in the enclosure are identified by recognizing their postures and movement frequencies. When the posture of farmed animals exceeds the posture deviation threshold or the movement frequency exceeds the movement frequency deviation threshold, the music soothing system in the enclosure is activated to play music. Music is also activated when farmed animals are eating.
[0093] Example 2, as Figure 2 As shown, the present invention provides an intelligent aquaculture system based on the Internet of Things. The intelligent aquaculture system includes an environmental data acquisition module, a ground analysis and prediction module, a behavioral environment monitoring module, a color quantification module, a color analysis module, and a weight adjustment module.
[0094] The environmental data acquisition module is used to monitor and collect image data of manure and sludge in the pens to construct a set; the ground analysis and prediction module is used to extract timestamps and image data to construct curves and predict the next ground cleaning time; the behavioral environment monitoring module is used to monitor the behavior of farmed animals and the gas concentration in the pen environment, and activate the music soothing system and ventilation device respectively when abnormalities occur; the color quantification module is used to extract the color features of manure and sludge images and quantify them as a cleaning judgment standard; the color analysis module is used to construct curves based on ground color changes and calculate the second cleaning time; the weight adjustment module is used to merge the two times to calculate the ground cleaning time and dynamically adjust the weights;
[0095] The output of the environmental data acquisition module is electrically connected to the input of the ground analysis and prediction module; the output of the ground analysis and prediction module is electrically connected to the input of the behavioral environment monitoring module; the output of the behavioral environment monitoring module is electrically connected to the input of the color quantization module; the output of the color quantization module is electrically connected to the input of the color analysis module; and the output of the color analysis module is electrically connected to the input of the weight adjustment module.
[0096] The environmental data acquisition module includes an equipment deployment unit and a data acquisition unit; the equipment deployment unit is used to install image sensors in the intelligent breeding enclosure; the data acquisition unit is used to collect and store ground image data according to a preset breeding monitoring cycle.
[0097] The ground analysis and prediction module includes a data indexing unit and a curve prediction unit; the data indexing unit is used to extract data using the ground cleanup timestamp as an index; the curve prediction unit is used to construct a ground cleanup image time curve and predict the first time of ground cleanup.
[0098] The behavior environment monitoring module comprises a data monitoring and analyzing unit and a device control executing unit; the data monitoring and analyzing unit is responsible for collecting and analyzing the images of the breeding animals and the data of the shed gas, and judging whether the animal behavior and the environmental condition are abnormal; the device control executing unit controls the music pacifying system and the ventilation device according to the result of the data monitoring and analyzing unit
[0099] The color quantification module comprises a feature extraction unit and a standard construction unit; the feature extraction unit is used for extracting color features from the ground cleaning time curve graph; the standard construction unit is used for quantitatively processing the color features to construct standard color feature values;
[0100] The color analysis module comprises a data screening unit and a trend calculation unit; the data screening unit is used for selecting adjacent timestamp data to extract corresponding ground image data; the trend calculation unit is used for constructing and fitting a color change trend graph to calculate the second ground cleaning time;
[0101] The weight adjustment module comprises a time calculation unit and a weight adjustment unit; the time calculation unit is used for calculating the shed ground cleaning time according to a preset weight; the weight adjustment unit is used for dynamically adjusting the weight coefficient according to the two time deviations.
[0102] It is apparent to those skilled in the art that the present application is not limited to the details of the foregoing exemplary embodiments, but can be implemented in other particular forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered in all respects as illustrative and not restrictive, and the scope of the present application should be defined by the appended claims rather than the above description, and it is intended to include all changes falling within the meaning and scope of the equivalent elements of the claims. Any reference signs in the claims should not be considered as limiting the claims involved.
Claims
1. An Internet of Things (IoT)-based intelligent breeding method, characterized in that: The intelligent breeding method comprises the following steps: Step S1, monitoring the shed through an environmental sensor and collecting environmental data in the shed to construct an environmental data analysis set; Step S2, analyzing and extracting image data in the environmental data analysis set, obtaining ground image data in the shed by processing through a target detection algorithm to construct a ground cleaning image set, constructing a ground cleaning image time curve graph according to the timestamp data of each ground cleaning in the shed and the ground image data corresponding to the timestamp data, predicting the next ground cleaning time of the shed according to the ground cleaning image time curve graph, and recording the ground cleaning first time; analyzing and extracting gas data in the environmental data analysis set, and controlling gas exchange in the shed; Step S3, color feature extraction analysis of the ground image data is performed according to the ground cleaning image time curve graph, the ground color change in the shed in the adjacent two timestamp data in the ground cleaning image time curve graph is analyzed and calculated, the ground color change time required is calculated in combination with the color feature, and recorded as the ground cleaning second time; the ground cleaning time of the shed is calculated through weighted fusion according to the ground cleaning first time and the ground cleaning second time, and the ground of the shed is cleaned.
2. The intelligent breeding method based on the Internet of Things according to claim 1, characterized in that: The specific steps of step S1 are as follows: Step S1-1, a breeding monitoring period is set, environmental data of the shed is collected according to the preset breeding monitoring period, and an environmental data analysis set is constructed, which is used for image data and gas data of the shed; Step S1-2, data of the shed of the intelligent breeding is collected through an environmental sensor, the environmental sensor comprises an image sensor and a gas sensor, image data in the shed is obtained through the image sensor, the image data comprises ground image data of the shed, and NH3 concentration and CO2 concentration in the shed are collected through the gas sensor. 3.The smart breeding method based on the Internet of Things according to claim 2, characterized in that: The specific steps of step S2 are as follows: Step S2-1, according to the image data in the environmental data analysis set, the image data and timestamp data of the excrement are analyzed and extracted according to the color feature and texture feature of the excrement through a target detection algorithm, and a ground cleaning image set is constructed; Step S2-2, the timestamp data in the ground cleaning image set is matched according to the timestamp of the ground cleaning in the shed as an index, and the matched ground image data and the corresponding timestamp data are extracted; Step S2-3, the extracted timestamp data and the corresponding ground image data are analyzed and processed, the analysis and processing specifically comprises feature extraction of the ground image data, and the feature extraction comprises feature extraction of color feature values and texture feature values of the ground image data corresponding to different timestamp data.
4. The intelligent breeding method based on the Internet of Things according to claim 3, characterized in that: In step S2, it further comprises: Step S2-4, an x-axis is constructed with the timestamp data as the horizontal coordinate, a y-axis is constructed with the feature values extracted from the ground image data as the vertical coordinate, and a ground cleaning image time curve graph is constructed through the x-axis and the y-axis; the ground cleaning image time curve graph comprises two curves with the same timestamp data, which are a color feature curve and a texture feature curve; Step S2-5, according to the time interval added to the time stamp data on the x-axis of the ground cleaning image time curve, the addition time of the next time stamp data on the x-axis is predicted by the time series prediction model, and the predicted addition time is taken as the next ground cleaning time of the shed, which is recorded as the first ground cleaning time; Step S2-6, according to the preset NH3 concentration threshold and CO2 concentration threshold, the gas exchange of the shed is controlled, when the NH3 concentration in the shed obtained by the gas sensor exceeds the NH3 concentration threshold, or the CO2 concentration exceeds the CO2 concentration threshold, the ventilation device in the shed is started to replace the gas.
5. The method of claim 4, wherein the method further comprises: The specific steps of step S3 are as follows: Step S3-1, analyze and extract the color features of the feces image data of each time data in the feces cleaning image time curve, and quantize the color features as the color judgment standard of feces cleaning; taking the time stamp data in the ground cleaning image time curve as the index, searching along the positive direction of the x-axis from the origin position, and sequentially extracting the color features in the ground cleaning image time curve; Step S3-2, quantize the extracted color features by HSV color space, and the HSV represents H as hue, S as saturation, and V as brightness, and the specific process of quantization is: Step S3-2-1, convert the extracted feces image color feature data from RGB color space to HSV color space, calculate the RGB value of each pixel point based on the conversion formula of RGB and HSV, and obtain the corresponding hue value, saturation value and brightness value; Step S3-2-2, calculate the average value and standard deviation of H, S and V channels respectively for all pixel points in the feces image after conversion; Step S3-2-3, divide the value range of H, S and V channels into several intervals, and calculate the proportion of the number of pixel points in each interval; Step S3-2-4, combine the calculated average value, standard deviation and interval pixel proportion data to construct a multi-dimensional feature vector including color features and texture features; Step S3-3, the color features of the ground image data after quantization are taken as the color judgment standard of ground cleaning, which is recorded as the standard color feature value. 6.The smart breeding method based on the Internet of Things according to claim 5, characterized in that: In step S3, it also includes: Step S3-4, in the feces cleaning image time curve, select two adjacent time stamp data in the ground cleaning image time curve, which is recorded as the ground cleaning observation interval, and extract the ground image data in the ground cleaning observation interval from the ground cleaning image set through the time stamp data of the ground cleaning observation interval; Step S3-5, extract the color feature value and corresponding time stamp data of the ground image data extracted in step S3-4, construct the x-axis with the time stamp data as the horizontal coordinate, and construct the y-axis with the color feature value as the vertical coordinate, and construct the color change trend graph through the x-axis and y-axis; the ground cleaning image time curve includes a plurality of time stamp data, and the number of constructed color change trend graphs is the total number of time stamp data minus one; Step S3-6, the standard color change trend graph is obtained by curve fitting on all the constructed color change trend graphs, and is recorded as a standard color change trend graph. Time stamp data with the same color feature value as the standard color feature value in the standard color change trend graph is taken as the time for the next ground cleaning of the pen; Step S3-7, real-time ground image data in the pen is obtained by the image sensor, and color feature values are extracted. The extracted color feature values are input into the standard color change trend graph to calculate the time required for the color feature values to change to the standard color feature value, which is recorded as a second ground cleaning time.
7. The intelligent breeding method based on the Internet of Things according to claim 6, characterized in that: In step S3, it further includes: Step S3-8, according to the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient, the time for the pen to clean the ground is calculated; Step S3-9, by calculating the deviation value of the ground cleaning first time and the ground cleaning second time, the weight coefficients of the ground cleaning first time and the ground cleaning second time are dynamically adjusted. The judgment condition of dynamic adjustment is as follows: When the ground cleaning first time does not exceed the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient remain unchanged; When the ground cleaning first time exceeds the ground cleaning second time, the preset ground cleaning first time weight coefficient and the ground cleaning second time weight coefficient are dynamically adjusted by the deviation ratio.
8. An intelligent breeding system based on the Internet of Things, applied to the intelligent breeding method based on the Internet of Things in any one of claims 1-7, characterized in that: The intelligent breeding system includes an environmental data acquisition module, a ground analysis and prediction module, a color quantization module, a color analysis module, and a weight adjustment module; The environmental data acquisition module is used to collect images and gases in the pen by setting a monitoring period using image and gas sensors. The ground analysis and prediction module is used to extract manure data from environmental images and analyze features to predict ground cleaning time, while adjusting ventilation according to gas concentration. The color quantization module is used to extract color features of manure images and quantify them as cleaning criteria. The color analysis module is used to construct a curve according to ground color changes and calculate a second cleaning time. The weight adjustment module is used to integrate the two times to calculate the ground cleaning time and dynamically adjust the weight. The output end of the environmental data acquisition module is electrically connected to the input end of the ground analysis and prediction module. The output end of the ground analysis and prediction module is electrically connected to the input end of the color quantization module. The output end of the color quantization module is electrically connected to the input end of the color analysis module. The output end of the color analysis module is electrically connected to the input end of the weight adjustment module.
9. The intelligent breeding system based on the Internet of Things according to claim 8, characterized in that: The environmental data acquisition module includes a period setting acquisition unit and a sensing data acquisition unit. The period setting acquisition unit is used to set a breeding monitoring period and collect pen environmental data according to the breeding monitoring period. The sensing data acquisition unit is used to obtain image data and gas data of the pen according to environmental sensors. The ground analysis prediction module comprises a fecal pollution image extraction unit and a cleaning time prediction unit; the fecal pollution image extraction unit is used to extract ground image data and timestamp data from image data in the environmental data analysis set; the cleaning time prediction unit is used to extract features from the ground image data, construct a curve graph, predict the next ground cleaning time in the shed, and control ventilation according to the gas concentration threshold value; The color quantification module comprises a feature extraction unit and a standard construction unit; the feature extraction unit is used to extract color features from the ground cleaning image time curve graph; and the standard construction unit is used to quantitatively process the color features to construct standard color feature values.
10. The intelligent breeding system based on the Internet of Things according to claim 8, characterized in that: The color analysis module comprises a data screening unit and a trend calculation unit; the data screening unit is used to select adjacent timestamp data to extract corresponding ground image data; and the trend calculation unit is used to construct and fit a color change trend graph to calculate the second ground cleaning time; The weight adjustment module comprises a time calculation unit and a weight adjustment unit; the time calculation unit is used to calculate the shed ground cleaning time according to a preset weight; and the weight adjustment unit is used to dynamically adjust the weight coefficient according to the two time deviations.
Citation Information
Patent Citations
Transformer monitoring data abnormal value detection and cleaning method and device
CN112527788A
Intelligent multi-layer three-dimensional meat duck breeding system based on big data
CN115119775A