Intelligent breeding system and method based on Internet of Things

By using image and gas sensors in the breeding enclosure to collect data, combining time series prediction and HSV color space quantization, and dynamic adjustment of weights, the problem that traditional cleaning modes are difficult to meet the cleaning needs of aquaculture beds is solved, and the refined and intelligent management of manure treatment is achieved.

CN120472391AActive Publication Date: 2025-08-12ZHONGXIAO ANIMAL HUSBANDRY EQUIP CO LTD

Patent Information

Application Number
CN202510561338.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-12
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

The traditional timed cleaning mode is difficult to meet the cleaning needs of breeding beds, and there is a lack of intelligent breeding solutions that can monitor real-time and accurately judge the best cleaning time.

Method used

The circle data is collected through image sensors and gas sensors, an environmental data collection is constructed, and the feces are extracted using the object detection algorithm, combined with the time series prediction model and HSV color space quantization, and the weights are dynamically adjusted to achieve accurate prediction and decision-making of feces cleaning time.

Benefits of technology

It realizes dynamic monitoring and precise cleaning of manure and sewage conditions, avoids environmental pollution, improves the automation and resource utilization efficiency of aquaculture management, and ensures the scientificity and accuracy of decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472391A_ABST
    Figure CN120472391A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent breeding system and method based on the Internet of Things, relates to the technical field of big data analysis, and realizes efficient management of intelligent breeding feces through multi-dimensional analysis. Excrement images are collected through an image sensor according to a preset period and stored according to timestamps, a data set is constructed, and excrement dynamic monitoring is achieved. Image data are extracted to construct a ground cleaning image moment curve graph, a time sequence prediction model is used, color and texture feature analysis is combined, cleaning time is pre-judged, a feces change rule is excavated, and environmental problems are avoided. The method comprises the following steps: performing HSV spatial quantization on color features of a feces image to form a judgment standard, constructing a trend chart based on adjacent timestamp color changes, comparing and predicting cleaning time in real time, and dynamically adjusting the weight according to deviation through weighted fusion of two prediction results, thereby ensuring scientific and accurate decision, comprehensively improving the precision and intelligence level of feces treatment, and improving the efficiency of feces treatment. And the breeding environment management is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of big data analysis, and in particular to an intelligent farming system and method based on the Internet of Things. Background Art

[0002] Driven by the rapid development of smart agriculture, the livestock industry is making significant strides toward informatization, automation, and intelligentization. The deep integration of the Internet of Things, big data, and artificial intelligence technologies enables farmers to monitor livestock and poultry feeding, growth, and reproduction in real time through video surveillance systems. They can also intelligently adjust water intake and feed amounts based on livestock age and ambient temperature, significantly improving feed conversion rates and livestock profitability. Furthermore, various environmental sensors accurately collect data on temperature, humidity, light intensity, ammonia concentration, and other factors, providing strong support for the development of scientific farming plans.

[0003] As the core foundation of smart farming, breeding beds carry the vital functions of daily activities and rest for livestock and poultry. They are the primary venue for all-day activities and rest. Since livestock and poultry eat, sleep, and move around here almost around the clock, the state of their environment directly affects their health and growth and development, making it a key component of smart farming environmental monitoring. Due to individual differences in livestock and poultry, changes in growth stages, and adjustments in diet, the timing and quantity of excrement produced are uncertain, making traditional scheduled cleaning methods difficult to meet the cleaning needs of breeding beds. Therefore, the lack of an effective solution that can monitor breeding bed contamination data in real time, accurately determine the optimal cleaning time through intelligent analysis, and implement on-demand cleaning has become a key obstacle to the refined development of smart farming. Summary of the Invention

[0004] The purpose of the present invention is to provide an intelligent farming system and method based on the Internet of Things to solve the problems raised in the prior art.

[0005] To achieve the above object, the present invention provides the following technical solution: an intelligent farming method based on the Internet of Things, the intelligent farming method comprising the following steps:

[0006] Step S1: Monitor the enclosure through environmental sensors and collect environmental data in the enclosure to construct an environmental data analysis set;

[0007] Step S1-1: Set a breeding monitoring cycle, collect environmental data of the enclosure according to the preset breeding monitoring cycle, and construct an environmental data analysis set, which is used for image data and gas data of the enclosure;

[0008] Step S1-2: Collect data from the smart farming pens through environmental sensors, which include image sensors and gas sensors. The image data inside the pens are obtained through the image sensors, and the image data include ground image data of the pens; the NH3 concentration and CO2 concentration in the pens are collected through the gas sensors.

[0009] Environmental sensors are used in smart breeding pens to periodically monitor and collect data. This allows for comprehensive acquisition of pen images, gases, and other environmental data, building an environmental data analysis collection. This provides reliable data support for subsequent accurate analysis of pen environmental conditions, timely detection of anomalies, and the implementation of measures. This helps optimize the breeding environment, improve breeding efficiency, and enhance animal health.

[0010] Step S2: Analyze and extract image data from the environmental data analysis set, obtain ground image data in the enclosure through target detection algorithm processing to construct a ground cleaning image set, construct a ground cleaning image time curve graph based on the timestamp data of each ground cleaning in the enclosure and the ground image data corresponding to the timestamp data, and predict the time of the next ground cleaning in the enclosure based on the ground cleaning image time curve graph, which is recorded as the first ground cleaning time; analyze and extract gas data from the environmental data analysis set, and control the gas exchange in the enclosure;

[0011] Step S2-1: Analyze the image data in the environmental data set and, using a target detection algorithm, extract the image data and timestamp data of the feces based on the color and texture characteristics of the feces to construct a ground cleaning image set;

[0012] Step S2-2: using the timestamp of the ground cleaning in the enclosure as an index, matching the timestamp data in the ground cleaning image set, and extracting the matched ground image data and the corresponding timestamp data;

[0013] Step S2-3: performing analysis and processing based on the extracted timestamp data and the corresponding ground image data, wherein the analysis and processing specifically includes performing feature extraction on the ground image data, wherein the feature extraction includes extracting color feature values and texture feature values of the ground image data corresponding to different timestamp data;

[0014] Step S2-4, constructing an x-axis with the timestamp data as the horizontal coordinate, constructing a y-axis with the feature values extracted from the ground image data as the vertical coordinate, and constructing a ground cleaning image time curve graph through the x-axis and y-axis; the ground cleaning image time curve graph includes two curves with the same timestamp data, namely a color feature curve and a texture feature curve;

[0015] Step S2-5: adding a time interval to the timestamp data on the x-axis of the ground cleaning image time curve graph, predicting the time of adding the next timestamp data on the x-axis using the time series prediction model, and using the predicted addition time as the time of the next ground cleaning of the pen, recorded as the first ground cleaning time;

[0016] The time series forecasting model uses the following formula for forecast calculation:

[0017]

[0018] Where Pt is the predicted time for ground cleaning in the enclosure; a is the basic constant, specifically the initial offset; n is the autoregressive order; Yi is the autoregressive coefficient; Pt-i is the lagged historical value, specifically the historical data at time ti; m is the moving average order; Rj is the moving average coefficient; Ft-j is the error value at time tj;

[0019] Step S2-6: Control the gas exchange in the pen according to the preset NH3 concentration threshold and CO2 concentration threshold. When the gas sensor detects that the NH3 concentration in the pen exceeds the NH3 concentration threshold, or the CO2 concentration exceeds the CO2 concentration threshold, start the ventilation device in the pen to replace the gas.

[0020] By extracting the timestamps and corresponding image data from the ground cleaning image collection, constructing a ground cleaning image time curve and predicting the next ground cleaning time, we can deeply explore the temporal patterns and characteristic evolution trends of manure changes. The color and texture features of the manure images are extracted and plotted into curves. Combined with the time series prediction model, it can not only intuitively show the changes in manure status over time, but also accurately predict the need for ground cleaning based on historical data, effectively avoiding environmental problems caused by manure accumulation, providing a reliable basis for intelligent and scientific ground cleaning arrangements, and improving the automation level and resource utilization efficiency of aquaculture management;

[0021] Step S3, extract and analyze the color features of the ground image data according to the ground cleaning image time curve, analyze and calculate the ground color change of the enclosure within two adjacent timestamp data in the ground cleaning image time curve, and calculate the time required for the ground color change in combination with the color features, which is recorded as the second ground cleaning time; calculate the ground cleaning time of the enclosure by weighted fusion based on the first ground cleaning time and the second ground cleaning time, and perform ground cleaning on the enclosure.

[0022] Step S3-1: Using the timestamp data in the ground clearing image time curve as an index, search along the positive direction of the x-axis from the origin position, and extract the color features in the ground clearing image time curve in sequence;

[0023] Step S3-2: quantize the extracted color features using the HSV color space. The HSV representation is H for hue, S for saturation, and V for lightness. The specific process of quantization is as follows:

[0024] Step S3-2-1, convert the extracted color feature data of the feces image from the RGB color space to the HSV color space, calculate the RGB value of each pixel based on the conversion formula between RGB and HSV, and obtain the corresponding hue value, saturation value, and lightness value;

[0025] Step S3-2-2: Calculate the mean and standard deviation of the HSV values of all pixels in the feces image, respectively.

[0026] Step S3-2-3: Divide the value range of the H, S, and V channels into several intervals, and count the number of pixels in each interval;

[0027] Step S3-2-4: Combine the calculated average value, standard deviation, and pixel ratio data of each interval to construct a multidimensional feature vector including color features and texture features;

[0028] Step S3-3: using the color features of the ground image data after quantization as the color judgment standard for ground cleaning, recorded as the standard color feature value;

[0029] By extracting color features from the time-lapse graph of ground cleaning images, quantifying them in the HSV color space, and constructing multidimensional feature vectors as the color judgment standard for ground cleaning, the abstract state of manure color can be converted into quantifiable and comparable precise data indicators. Using RGB-HSV conversion and statistical pixel data, we can deeply analyze the distribution patterns and changing characteristics of manure color, providing an objective and scientific basis for determining whether manure meets cleaning conditions. This effectively avoids the subjectivity and errors of human judgment, improves the accuracy and standardization of ground cleaning decisions, and ensures the cleanliness of the aquaculture environment.

[0030] Step S3-4: In the manure cleaning image time curve graph, select two adjacent timestamp data in the ground cleaning image time curve graph, record them as ground cleaning observation intervals, and extract ground image data within the ground cleaning observation intervals from the ground cleaning image set based on the timestamp data of the ground cleaning observation intervals;

[0031] Step S3-5: extracting color feature values and corresponding timestamp data from the ground image data extracted in step S3-4, constructing an x-axis with the timestamp data as the horizontal coordinate, and constructing a y-axis with the color feature values as the vertical coordinate, and constructing a color change trend graph through the x-axis and the y-axis; the ground cleaning image moment curve graph includes multiple timestamp data, and the number of color change trend graphs constructed is the total number of timestamp data minus one;

[0032] Step S3-6, obtaining a standard color change trend graph by curve fitting for all constructed color change trend graphs, recording it as the standard color change trend graph, and taking the timestamp data in which the color feature value in the standard color change trend graph is the same as the standard color feature value as the time for the next ground cleaning of the enclosure;

[0033] Step S3-7, using an image sensor to acquire real-time ground image data within the enclosure, extracting color feature values, inputting the extracted color feature values into a standard color change trend graph, and calculating the time required for the color feature values to change to the standard color feature values, which is recorded as the second ground cleaning time;

[0034] By analyzing the ground cleaning image time curve, constructing a color change curve based on the ground color changes within adjacent timestamps, and combining the color judgment standard to calculate the second time of ground cleaning, the evolution process and speed of manure color can be dynamically captured. Image data is extracted at observation intervals to construct a trend chart and fit the standard curve, making the color change pattern clearer and more intuitive. The current color feature value is compared with the standard value in real time to accurately predict the time when manure reaches the cleaning conditions, providing a dynamic and accurate time reference for ground cleaning work, ensuring the timeliness and effectiveness of aquaculture environment management, and improving the refinement level of intelligent aquaculture manure treatment.

[0035] Step S3-8, calculating the time for ground cleaning in the enclosure according to the preset first time weight coefficient for ground cleaning and the second time weight coefficient for ground cleaning;

[0036] Step S3-9: Dynamically adjust the weight coefficient of the first floor cleaning time and the second floor cleaning time by calculating the deviation value between the first floor cleaning time and the second floor cleaning time. The judgment conditions for dynamic adjustment are as follows:

[0037] When the first floor cleaning time does not exceed the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient remain unchanged;

[0038] When the first floor cleaning time exceeds the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient are dynamically adjusted according to the deviation ratio;

[0039] The calculation formula for dynamic adjustment of weight coefficient is as follows:

[0040]

[0041] Wherein, w2,new represents the weight coefficient after dynamic adjustment of the second time of ground cleaning; w2 represents the weight coefficient of the second time of ground cleaning; w1 represents the weight coefficient of the first time of ground cleaning.

[0042] By weightedly integrating the first and second times of ground cleaning, and dynamically adjusting the weight coefficient based on the deviation between the two, the two prediction results are used to determine the time of ground cleaning in the enclosure, thus achieving complementary advantages. The first time is based on the prediction of historical time series patterns, while the second time focuses on judging the trend of color changes. Combined with the weight distribution, the time pattern of manure evolution and real-time status characteristics can be comprehensively considered. When there is a deviation between the two, the weight is flexibly adjusted according to the deviation ratio, so that the determination of ground cleaning time is more in line with the actual situation, avoiding the limitations of a single prediction method, enhancing the scientificity, adaptability and reliability of ground cleaning time decisions, and ensuring that the breeding environment is always in good condition.

[0043] Furthermore, an intelligent farming system based on the Internet of Things includes an environmental 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 environmental data acquisition module is used to build a collection of house manure monitoring and image data collection; the ground analysis and prediction module is used to extract timestamps and image data to build a curve graph and predict the next ground cleaning time; the behavior environment monitoring module is used to monitor the behavior of farmed animals and the gas concentration in the house environment, and activate the music soothing system and ventilation device respectively when abnormal; the color quantization module is used to extract the color features of the manure image and quantify them as the cleaning judgment standard; the color analysis module is used to build a curve according to the change of ground color and calculate the second cleaning time; the weight adjustment module is used to fuse the two times to calculate the ground cleaning time and dynamically adjust the weight;

[0045] 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 behavior environment monitoring module; the output end of the behavior environment monitoring 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;

[0046] The environmental data acquisition module includes a device deployment unit and a data acquisition unit; the device deployment unit is used to install an image sensor in the smart breeding enclosure; the data acquisition unit is used to collect ground image data according to a preset breeding monitoring cycle and summarize and store it;

[0047] The ground analysis and prediction module includes a data index unit and a curve prediction unit; the data index unit is used to extract data using the ground cleaning timestamp as an index; the curve prediction unit is used to construct a ground cleaning image time curve graph and predict the first ground cleaning time;

[0048] The behavior and environment monitoring module includes a data monitoring and analysis unit and an equipment control execution unit; the data monitoring and analysis unit is responsible for collecting and analyzing images of farmed animals and gas data in the enclosure to determine whether the animal behavior and environmental conditions are abnormal; the equipment control execution unit controls the music soothing system and ventilation device based on the results of the data monitoring and analysis unit.

[0049] The color quantization module includes 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 diagram; the standard construction unit is used to quantize the color features to construct a standard color feature value;

[0050] The color analysis module includes 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; the trend calculation unit is used to construct and fit the color change trend graph to calculate the second ground cleaning time;

[0051] The weight adjustment module includes a time calculation unit and a weight adjustment unit; the time calculation unit is used to calculate the enclosure ground cleaning time according to a preset weight; the weight adjustment unit is used to dynamically adjust the weight coefficient according to two time deviations.

[0052] Compared with the prior art, the present invention has the following beneficial effects:

[0053] 1. This invention achieves dynamic monitoring of manure and sewage conditions by installing image sensors in intelligent aquaculture pens and collecting ground image data according to preset aquaculture monitoring cycles. By summarizing and storing the collected timestamp data, it can accurately grasp the patterns and distribution of manure and sewage, providing data support for the formulation of scientific cleaning plans. This changes the lack of data-based ground cleaning in traditional aquaculture, effectively improves manure and sewage treatment efficiency, optimizes aquaculture environmental management, and makes the aquaculture process more intelligent and standardized.

[0054] 2. The present invention extracts the timestamps and corresponding image data from the ground cleaning image set to construct a ground cleaning image time curve, and uses a time series prediction model to predict the next ground cleaning time. The color and texture features of the manure image are extracted, and the feature changes are plotted as a curve to deeply explore the temporal patterns and feature evolution trends of manure changes. This method can accurately predict ground cleaning needs based on historical data, avoid environmental problems caused by manure accumulation, and improve the level of automation and resource utilization efficiency of aquaculture management.

[0055] 3. This invention quantifies the color features of manure images using the HSV color space, constructs a multidimensional feature vector as the color judgment standard for ground cleaning, and converts the abstract manure color state into a quantifiable data indicator. Combined with a color change curve constructed based on ground color changes within adjacent timestamps, the current color feature value is compared with the standard value in real time to accurately predict the time when manure meets cleaning conditions. Finally, by weighted fusion of the two predicted times and dynamically adjusting the weights, the scientific nature and accuracy of ground cleaning decisions are ensured, improving the level of refinement of intelligent livestock manure treatment. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a schematic diagram of a process of an intelligent farming method based on the Internet of Things of the present invention;

[0057] Figure 2 This is a structural schematic diagram of an intelligent farming system based on the Internet of Things of the present invention. DETAILED DESCRIPTION

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0059] Example 1: Figure 1 As shown, the present invention provides a technical solution, an intelligent farming method based on the Internet of Things, which includes the following steps:

[0060] Step S1: Monitor the enclosure through environmental sensors and collect environmental data in the enclosure to construct an environmental data analysis set;

[0061] Step S1-1: Set a breeding monitoring cycle, collect environmental data of the enclosure according to the preset breeding monitoring cycle, and construct an environmental data analysis set, which is used for image data and gas data of the enclosure;

[0062] Step S1-2: Collect data from the smart farming pens through environmental sensors, which include image sensors and gas sensors. The image data inside the pens are obtained through the image sensors, and the image data include ground image data of the pens; the NH3 concentration and CO2 concentration in the pens are collected through the gas sensors.

[0063] In practical implementation, taking pig pens as an example, high-definition image sensors can be installed on the roof or side of the pens to capture images of manure and sewage every 30 minutes, according to a preset monitoring cycle. Using IoT technology, these images and corresponding timestamps are transmitted to a data center for storage, creating a collection of ground-cleaning images. The principle is to continuously collect data to establish a manure status database, providing a foundation for subsequent analysis. It is important to note that the image sensors must be installed in a location that avoids obstruction by animal activity and undergo regular maintenance to ensure accurate and continuous data collection. Furthermore, the stability of data transmission must be ensured to prevent data loss.

[0064] Step S2: Analyze and extract image data from the environmental data analysis set, obtain ground image data in the enclosure through target detection algorithm processing to construct a ground cleaning image set, construct a ground cleaning image time curve graph based on the timestamp data of each ground cleaning in the enclosure and the ground image data corresponding to the timestamp data, and predict the time of the next ground cleaning in the enclosure based on the ground cleaning image time curve graph, which is recorded as the first ground cleaning time; analyze and extract gas data from the environmental data analysis set, and control the gas exchange in the enclosure;

[0065] Step S2-1: Analyze the image data in the environmental data set and, using a target detection algorithm, extract the image data and timestamp data of the feces based on the color and texture characteristics of the feces to construct a ground cleaning image set;

[0066] Step S2-2: using the timestamp of the ground cleaning in the enclosure as an index, matching the timestamp data in the ground cleaning image set, and extracting the matched ground image data and the corresponding timestamp data;

[0067] Step S2-3: performing analysis and processing based on the extracted timestamp data and the corresponding ground image data, wherein the analysis and processing specifically includes performing feature extraction on the ground image data, wherein the feature extraction includes extracting color feature values and texture feature values of the ground image data corresponding to different timestamp data;

[0068] Step S2-4, constructing an x-axis with the timestamp data as the horizontal coordinate, constructing a y-axis with the feature values extracted from the ground image data as the vertical coordinate, and constructing a ground cleaning image time curve graph through the x-axis and y-axis; the ground cleaning image time curve graph includes two curves with the same timestamp data, namely a color feature curve and a texture feature curve;

[0069] Step S2-5: adding a time interval to the timestamp data on the x-axis of the ground cleaning image time curve graph, predicting the time of adding the next timestamp data on the x-axis using the time series prediction model, and using the predicted addition time as the time of the next ground cleaning of the pen, recorded as the first ground cleaning time;

[0070] Step S2-6: Control the gas exchange in the pen according to the preset NH3 concentration threshold and CO2 concentration threshold. When the gas sensor detects that the NH3 concentration in the pen exceeds the NH3 concentration threshold, or the CO2 concentration exceeds the CO2 concentration threshold, start the ventilation device in the pen to replace the gas.

[0071] In implementation, the pandas library was used to index and match the timestamp data in the ground cleaning image collection. The extracted image data and timestamp key-value pairs were stored in a dictionary format. The OpenCV library was then used to extract the image's color and texture features. Computer programming was used to filter data and extract image features, and a time-lapse graph of ground cleaning images was constructed based on historical data. Importantly, data integrity must be ensured during the data extraction process to avoid data loss that could affect curve construction. Furthermore, the image feature extraction algorithm was optimized based on the characteristics of the manure to ensure that the features accurately reflected the manure status.

[0072] Step S3: Analyze and extract the color features of the ground image data at each time data in the ground cleaning image time curve diagram, and quantify the color features as the ground cleaning color judgment standard;

[0073] Step S3-1: Using the timestamp data in the ground clearing image time curve as an index, search along the positive direction of the x-axis from the origin position, and extract the color features in the ground clearing image time curve in sequence;

[0074] Step S3-2: quantize the extracted color features using the HSV color space. The HSV representation is H for hue, S for saturation, and V for lightness. The specific process of quantization is as follows:

[0075] Step S3-2-1, convert the extracted color feature data of the feces image from the RGB color space to the HSV color space, calculate the RGB value of each pixel based on the conversion formula between RGB and HSV, and obtain the corresponding hue value, saturation value, and lightness value;

[0076] Step S3-2-2: Calculate the mean and standard deviation of the HSV values of all pixels in the feces image, respectively.

[0077] Step S3-2-3: Divide the value range of the H, S, and V channels into several intervals, and count the number of pixels in each interval;

[0078] Step S3-2-4: Combine the calculated average value, standard deviation, and pixel ratio data of each interval to construct a multidimensional feature vector including color features and texture features;

[0079] Step S3-3: using the color features of the ground image data after quantization as the color judgment standard for ground cleaning, recorded as the standard color feature value;

[0080] In specific implementation, using Matlab software as an example, the RGB data of the extracted manure image is converted to HSV data using its built-in functions. Statistical analysis is then performed on each HSV channel, and intervals are divided to construct a multidimensional feature vector as a color judgment standard. The principle is to utilize the HSV color space, which is more consistent with human visual perception, to quantify manure color characteristics into comparable standards. It is important to note that the RGB and HSV conversion formulas must be accurately applied, and the interval divisions must be reasonably set based on the actual range of ground color variation to avoid inaccurate judgment standards due to improper divisions.

[0081] Step S3-4: In the manure cleaning image time curve graph, select two adjacent timestamp data in the ground cleaning image time curve graph, record them as ground cleaning observation intervals, and extract ground image data within the ground cleaning observation intervals from the ground cleaning image set based on the timestamp data of the ground cleaning observation intervals;

[0082] Step S3-5: extracting color feature values and corresponding timestamp data from the ground image data extracted in step S3-4, constructing an x-axis with the timestamp data as the horizontal coordinate, and constructing a y-axis with the color feature values as the vertical coordinate, and constructing a color change trend graph through the x-axis and the y-axis; the ground cleaning image moment curve graph includes multiple timestamp data, and the number of color change trend graphs constructed is the total number of timestamp data minus one;

[0083] Step S3-6, obtaining a standard color change trend graph by curve fitting for all constructed color change trend graphs, recording it as the standard color change trend graph, and taking the timestamp data in which the color feature value in the standard color change trend graph is the same as the standard color feature value as the time for the next ground cleaning of the enclosure;

[0084] Step S3-7, using an image sensor to acquire real-time ground image data within the enclosure, extracting color feature values, inputting the extracted color feature values into a standard color change trend graph, and calculating the time required for the color feature values to change to the standard color feature values, which is recorded as the second ground cleaning time;

[0085] In practice, using piggery wastewater treatment as an example, we selected data from adjacent time stamps and used Python's matplotlib library to plot a color trend chart. We then used the least squares method to perform curve fitting to create a standard color trend chart. This approach analyzes the color trends of the ground within a certain timeframe and combines them with color judgment criteria to predict the cleanup time. It's important to select an appropriate fitting function during the curve fitting process to avoid overfitting or underfitting.

[0086] Step S3-8, calculating the time for ground cleaning in the enclosure according to the preset first time weight coefficient for ground cleaning and the second time weight coefficient for ground cleaning;

[0087] Step S3-9: Dynamically adjust the weight coefficient of the first floor cleaning time and the second floor cleaning time by calculating the deviation value between the first floor cleaning time and the second floor cleaning time. The judgment conditions for dynamic adjustment are as follows:

[0088] When the first floor cleaning time does not exceed the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient remain unchanged;

[0089] When the first floor cleaning time exceeds the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient are dynamically adjusted according to the deviation ratio;

[0090] In practice, the initial weighting for the first ground clearance time is set at 0.4, and the second time at 0.6. The system algorithm dynamically adjusts the weights by calculating the percentage difference between the two times. The principle is to combine the advantages of the two predicted times and flexibly assign weights based on the deviation.

[0091] Step S6: Acquire image data of the farmed animals in the pen through an image sensor, and monitor and manage the farmed animals in the pen by combining an AI behavior analysis model with a music soothing system;

[0092] The music system in the pen is controlled according to the preset posture deviation threshold and movement frequency deviation threshold. The image data of farmed animals collected by the image sensor is input into the AI behavior analysis model for analysis. Based on the deep learning algorithm, the abnormal posture of farmed animals in the pen is judged by identifying the posture and movement frequency of farmed animals. When the posture of farmed animals monitored in real time exceeds the posture deviation threshold, or the movement frequency exceeds the movement frequency deviation threshold, the music soothing system in the pen is activated to play music; and when farmed animals are eating, the music soothing system in the pen is activated to play music.

[0093] Example 2, as Figure 2 As shown, the present invention provides an intelligent farming system based on the Internet of Things, which includes an environmental 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;

[0094] The environmental data acquisition module is used to build a collection of house manure monitoring and image data collection; the ground analysis and prediction module is used to extract timestamps and image data to build a curve graph and predict the next ground cleaning time; the behavior environment monitoring module is used to monitor the behavior of farmed animals and the gas concentration in the house environment, and activate the music soothing system and ventilation device respectively when abnormal; the color quantization module is used to extract the color features of the manure image and quantify them as the cleaning judgment standard; the color analysis module is used to build a curve according to the change of ground color and calculate the second cleaning time; the weight adjustment module is used to fuse the two times to calculate the ground cleaning time and dynamically adjust the weight;

[0095] 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 behavior environment monitoring module; the output end of the behavior environment monitoring 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;

[0096] The environmental data acquisition module includes a device deployment unit and a data acquisition unit; the device deployment unit is used to install an image sensor in the smart breeding enclosure; the data acquisition unit is used to collect ground image data according to a preset breeding monitoring cycle and summarize and store it;

[0097] The ground analysis and prediction module includes a data index unit and a curve prediction unit; the data index unit is used to extract data using the ground cleaning timestamp as an index; the curve prediction unit is used to construct a ground cleaning image time curve graph and predict the first ground cleaning time;

[0098] The behavior and environment monitoring module includes a data monitoring and analysis unit and an equipment control execution unit; the data monitoring and analysis unit is responsible for collecting and analyzing images of farmed animals and gas data in the enclosure to determine whether the animal behavior and environmental conditions are abnormal; the equipment control execution unit controls the music soothing system and ventilation device based on the results of the data monitoring and analysis unit.

[0099] The color quantization module includes 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 diagram; the standard construction unit is used to quantize the color features to construct a standard color feature value;

[0100] The color analysis module includes 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; the trend calculation unit is used to construct and fit the color change trend graph to calculate the second ground cleaning time;

[0101] The weight adjustment module includes a time calculation unit and a weight adjustment unit; the time calculation unit is used to calculate the enclosure ground cleaning time according to a preset weight; the weight adjustment unit is used to dynamically adjust the weight coefficient according to two time deviations.

[0102] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.

Claims

1. An intelligent farming method based on the Internet of Things, characterized by: The intelligent farming method comprises the following steps: Step S1: Monitor the enclosure through environmental sensors and collect environmental data in the enclosure to construct an environmental data analysis set; Step S2: Analyze and extract image data from the environmental data analysis set, obtain ground image data in the enclosure through target detection algorithm processing to construct a ground cleaning image set, construct a ground cleaning image time curve graph based on the timestamp data of each ground cleaning in the enclosure and the ground image data corresponding to the timestamp data, and predict the time of the next ground cleaning in the enclosure based on the ground cleaning image time curve graph, which is recorded as the first ground cleaning time; analyze and extract gas data from the environmental data analysis set, and control the gas exchange in the enclosure; Step S3: perform color feature extraction and analysis of the ground image data according to the ground cleaning image time curve chart, analyze and calculate the ground color change of the enclosure within two adjacent timestamp data in the ground cleaning image time curve chart, and calculate the time required for the ground color change in combination with the color features, which is recorded as the second ground cleaning time; calculate the ground cleaning time of the enclosure through weighted fusion based on the first ground cleaning time and the second ground cleaning time, and perform ground cleaning on the enclosure.

2. The intelligent farming 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: Set a breeding monitoring cycle, collect environmental data of the enclosure according to the preset breeding monitoring cycle, and construct an environmental data analysis set, which is used for image data and gas data of the enclosure; Step S1-2: Collect data from the smart farming pens through environmental sensors, which include image sensors and gas sensors. The image data inside the pens are obtained through the image sensors, and the image data include ground image data of the pens; the NH3 concentration and CO2 concentration in the pens are collected through the gas sensors.

3. The intelligent farming 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: Analyze the image data in the environmental data set and, using a target detection algorithm, extract the image data and timestamp data of the feces based on the color and texture characteristics of the feces to construct a ground cleaning image set; Step S2-2: using the timestamp of the ground cleaning in the enclosure as an index, matching the timestamp data in the ground cleaning image set, and extracting the matched ground image data and the corresponding timestamp data; Step S2-3: Analyze and process the extracted timestamp data and the corresponding ground image data. Specifically, the analysis and processing includes feature extraction of the ground image data. The feature extraction includes feature extraction of color feature values and texture feature values of the ground image data corresponding to different timestamp data.

4. The intelligent farming method based on the Internet of Things according to claim 3, characterized in that: In step S2, it also includes: Step S2-4, constructing an x-axis with the timestamp data as the horizontal coordinate, constructing a y-axis with the feature values extracted from the ground image data as the vertical coordinate, and constructing a ground cleaning image time curve graph through the x-axis and y-axis; the ground cleaning image time curve graph includes two curves with the same timestamp data, namely a color feature curve and a texture feature curve; Step S2-5: adding a time interval to the timestamp data on the x-axis of the ground cleaning image time curve graph, predicting the time of adding the next timestamp data on the x-axis using the time series prediction model, and using the predicted addition time as the time of the next ground cleaning of the pen, recorded as the first ground cleaning time; Step S2-6: Control the gas exchange in the pen according to the preset NH3 concentration threshold and CO2 concentration threshold. When the gas sensor detects that the NH3 concentration in the pen exceeds the NH3 concentration threshold, or the CO2 concentration exceeds the CO2 concentration threshold, start the ventilation device in the pen to replace the gas.

5. The intelligent farming method based on the Internet of Things according to claim 4, characterized in that: The specific steps of step S3 are as follows: Step S3-1: Analyze and extract the color features of the manure and sewage image data at each time point in the manure and sewage cleaning image time curve, and quantify the color features as a color judgment standard for manure and sewage cleaning; use the timestamp data in the ground cleaning image time curve as an index, search from the origin position along the positive direction of the x-axis, and extract the color features in the ground cleaning image time curve in sequence; Step S3-2: quantize the extracted color features using the HSV color space. The HSV representation is H for hue, S for saturation, and V for lightness. The specific process of quantization is as follows: Step S3-2-1, convert the extracted color feature data of the feces image from the RGB color space to the HSV color space, calculate the RGB value of each pixel based on the conversion formula between RGB and HSV, and obtain the corresponding hue value, saturation value, and lightness value; Step S3-2-2: Calculate the mean and standard deviation of the HSV values of all pixels in the feces image, respectively. Step S3-2-3: Divide the value range of the H, S, and V channels into several intervals, and count the number of pixels in each interval; Step S3-2-4: Combine the calculated average value, standard deviation, and pixel ratio data of each interval to construct a multidimensional feature vector including color features and texture features; Step S3-3: The color features of the ground image data after quantization processing are used as the color judgment standard for ground cleaning, and recorded as the standard color feature value.

6. The intelligent farming 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 manure cleaning image time curve graph, select two adjacent timestamp data in the ground cleaning image time curve graph, record them as ground cleaning observation intervals, and extract ground image data within the ground cleaning observation intervals from the ground cleaning image set based on the timestamp data of the ground cleaning observation intervals; Step S3-5: extracting color feature values and corresponding timestamp data from the ground image data extracted in step S3-4, constructing an x-axis with the timestamp data as the horizontal coordinate, and constructing a y-axis with the color feature values as the vertical coordinate, and constructing a color change trend graph through the x-axis and the y-axis; the ground cleaning image moment curve graph includes multiple timestamp data, and the number of color change trend graphs constructed is the total number of timestamp data minus one; Step S3-6, obtaining a standard color change trend graph by curve fitting for all constructed color change trend graphs, recording it as the standard color change trend graph, and taking the timestamp data in which the color feature value in the standard color change trend graph is the same as the standard color feature value as the time for the next ground cleaning of the enclosure; Step S3-7: Use the image sensor to obtain real-time ground image data in the enclosure, extract color feature values, input the extracted color feature values into the standard color change trend graph, calculate the time required for the color feature values to change to the standard color feature values, and record it as the second ground cleaning time.

7. The intelligent farming method based on the Internet of Things according to claim 6, characterized in that: In step S3, it also includes: Step S3-8, calculating the time for ground cleaning in the enclosure according to the preset first time weight coefficient for ground cleaning and the second time weight coefficient for ground cleaning; Step S3-9: Dynamically adjust the weight coefficient of the first floor cleaning time and the second floor cleaning time by calculating the deviation value between the first floor cleaning time and the second floor cleaning time. The judgment conditions for dynamic adjustment are as follows: When the first floor cleaning time does not exceed the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient remain unchanged; When the first floor cleaning time exceeds the second floor cleaning time, the preset first floor cleaning time weight coefficient and the second floor cleaning time weight coefficient are dynamically adjusted according to the deviation ratio.

8. An intelligent farming system based on the Internet of Things, applied to the intelligent farming method based on the Internet of Things according to any one of claims 1 to 7, characterized in that: The intelligent farming system includes an environmental data acquisition module, a ground analysis and prediction module, a color quantification 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 cycle using image and gas sensors; the ground analysis and prediction module is used to extract manure data from environmental images and analyze features, predict the ground cleaning time, and control ventilation according to gas concentration; the color quantification module is used to extract the color features of manure images and quantify them as cleaning judgment criteria; the color analysis module is used to construct a curve based on the ground color change and calculate the second cleaning time; the weight adjustment module is used to fuse 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 farming system based on the Internet of Things according to claim 8, characterized in that: The environmental data acquisition module includes a cycle setting acquisition unit and a sensor data acquisition unit; the cycle setting acquisition unit is used to set the breeding monitoring cycle and collect the environmental data of the enclosure according to the breeding monitoring cycle; the sensor data acquisition unit is used to obtain the image data and gas data of the enclosure according to the environmental sensor; The ground analysis and prediction module includes a manure image extraction unit and a cleaning time prediction unit; the manure image extraction unit is used to extract ground image data and timestamp data from the 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 chart, predict the next ground cleaning time of the barn, and control ventilation according to the gas concentration threshold; The color quantization module includes a feature extraction unit and a standard construction unit; the feature extraction unit is used to extract color features from the ground cleaning image moment curve diagram; the standard construction unit is used to quantize the color features and construct standard color feature values.

10. The intelligent farming system based on the Internet of Things according to claim 8, characterized in that: The color analysis module includes 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; the trend calculation unit is used to construct and fit the color change trend graph to calculate the second ground cleaning time; The weight adjustment module includes a time calculation unit and a weight adjustment unit; the time calculation unit is used to calculate the enclosure ground cleaning time according to a preset weight; the weight adjustment unit is used to dynamically adjust the weight coefficient according to 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

  • Flotation process fault early warning method for predicting deviation degree based on BiLSTM

    CN116597350A

  • Water environment time sequence prediction model construction method based on data dynamic feature mining

    CN118349839A

  • Target area water quality early warning method and system, computer equipment and readable medium

    CN119068354A

Cited By

  • Semi-outdoor breeding feeding optimization method and system

    CN120911700A