A method for intelligent control and monitoring of farm density

By laying an infrared detector in the breeding farm, using multi-graph synchronous analysis and convolutional neural network model, the problem of insufficient individual recognition rate in density monitoring of infrared detection technology is solved, and the accuracy and management efficiency of density monitoring are improved.

CN118570741BActive Publication Date: 2024-11-01ANIMAL SCI RES INST GUANGDONG ACADEMY OF AGRI SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411059616.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-11-01
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

In semi-open breeding farms, density monitoring methods based on infrared detection technology have problems such as decreasing individual recognition rate and insufficient accuracy of density algorithms, especially when the animal clusters and ambient temperatures are close, resulting in deviations in monitoring results.

Method used

Using multi-graph synchronous analysis and convolutional neural network model combined with infrared detection technology, the infrared detector is arranged in the breeding farm to collect and preprocess data, calculate and identify risks, and monitor and regulate risks, and optimize the monitoring strategy to Improve identification accuracy.

Benefits of technology

It improves the identification accuracy of infrared detection technology in farm density monitoring, enhances the monitoring ability of animal behavior diversity, and ensures the accuracy and management efficiency of density monitoring results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570741B_ABST
    Figure CN118570741B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of intelligent agriculture and animal breeding technology, and proposes an intelligent control and monitoring method for farm density, which is specifically: arranging an infrared detector in a semi-open farm; acquiring an infrared image through data acquisition by the infrared detector, and preprocessing the infrared image to obtain a processing map; performing multi-image synchronous analysis based on the real-time processing map to form an identification and control risk; and combining the obtained identification and control risk to control and monitor. Intelligent control is performed on the diversity of behavioral patterns in large-scale farm environments, and the risk of insufficient individual recognition rate caused by the infrared technology control and monitoring method caused by such diversity is effectively quantified, so that the recognition rate risk can be accurately marked at the time point of the collapse feature, thereby improving the accuracy of the density monitoring results formed by the farm density analysis method, thereby improving the management efficiency of the farm and improving the health level of the animals in the farm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent agriculture and animal breeding, and specifically relates to an intelligent control and monitoring method for breeding farm density. Background Art

[0002] At present, many semi-open farms are large in scale and raise a large number of livestock, facing the problem of density management; and the density management of farms plays a key role in disease control and animal welfare in the livestock environment. Farm managers can use the intelligent control and monitoring of farm density to achieve accurate monitoring and control of farm density. The density monitoring method carried out in the environment of semi-open farms today generally adopts the control and monitoring method based on RFID technology, but RFID technology has certain limitations in density monitoring and control, including limited reading distance, data interference and tag loss. In contrast, the farm density analysis method based on infrared detection technology overcomes the limitations of the above-mentioned RFID technology, making it more promising in the direction of farm density monitoring. In addition, the cost of infrared technology is relatively low, and it does not require a lot of equipment and infrastructure support, so it has certain advantages in terms of technical cost and actual operation needs.

[0003] However, in a semi-open farm environment, even animals of the same species still exhibit diverse behavioral patterns. This diversity will reduce the individual recognition rate of the farm density analysis method based on infrared detection technology. The reduction in individual recognition rate is because the infrared detection instruments that usually work are specified by default, which limits the angle of instrument layout during data collection. This can easily cause angle limitations, resulting in individual overlap and insufficient temperature difference representation in the highly dependent infrared data. At the same time, the density algorithm of the farm is closely related to individual recognition, which ultimately makes the density algorithm less accurate.

[0004] Therefore, a technology is urgently needed to achieve multi-position dynamic monitoring of animals. Especially when animals are clustered, the ambient temperature is close to the animal body temperature, the use of traditional monitoring strategies may lead to deviations between the monitoring results and reality. Therefore, in practical applications, the monitoring strategy based on infrared technology still needs to be further improved and optimized, and intelligent dynamic monitoring is needed to ensure accurate monitoring and regulation of animal density in farms. Summary of the invention

[0005] The purpose of the present invention is to propose an intelligent control and monitoring method for farm density to solve one or more technical problems existing in the prior art and at least provide a beneficial option or create conditions.

[0006] In order to achieve the above object, according to one aspect of the present invention, a method for intelligent control and monitoring of farm density is provided, the method comprising the following steps:

[0007] S100, deploy infrared detectors in semi-open farms;

[0008] S200, acquiring an infrared image by collecting data through an infrared detector, and preprocessing the infrared image to obtain a processed image;

[0009] S300, performing multi-image synchronous analysis based on the real-time processed images to identify and control risks;

[0010] S400, combined with the obtained identification, regulates risk and regulates monitoring.

[0011] Further, in step S100, the method for arranging infrared detectors in the semi-open farm is: the shape of the semi-open farm is a regular polygon, each corner position is marked as a monitoring arrangement point at the boundary of the semi-open farm, and an infrared detector is arranged at each monitoring arrangement point; the infrared detector is a near-infrared camera or a multi-spectral camera;

[0012] Alternatively, when the semi-open farm is not a regular polygon, the preset number of monitoring layout points is NOSC, where NOSC≥4, and NOSC positions are equidistantly or evenly marked along the boundary of the semi-open farm as monitoring layout points.

[0013] The above-mentioned infrared detectors are arranged to ensure that the detectors can accurately monitor the target and output reliable data. Equal distance or uniform marking means that the perimeter of the farm boundary divided by NOSC is used as the arrangement interval, and a position is selected as a monitoring arrangement point at every interval on the farm boundary.

[0014] The animals raised in semi-open farms are chickens, ducks, pigs, cattle or sheep;

[0015] Further, in step S200, an infrared image is obtained by data acquisition through an infrared detector, and a method for preprocessing the infrared image to obtain a processing graph is as follows: using an infrared detector to collect data from a semi-open farm and obtain an infrared image; graying the infrared image, removing noise from the infrared image through median filtering or Gaussian filtering, using an edge detection algorithm to divide the infrared image into regions to form a processing graph, and each divided region is used as a sub-identification area, and the sub-identification area where the animal appears in the processing graph is marked as an identification area through a pre-trained CNN convolutional neural network model; wherein the edge detection algorithm uses a Sobel operator or a Canny operator; a time period is preset as a pattern acquisition interval TG, TG∈[1,30] seconds; and a processing graph is obtained every TG.

[0016] Further, in step S300, a multi-image synchronous analysis is performed based on the real-time processed image to form a method for identifying and regulating risks: for any processed image, the upper quartile value of the grayscale value of all pixels in the processed image is obtained and recorded as TQG, and the pixels in the processed image with a grayscale value greater than TQG are recorded as risk control points; the pixels in the identification area are recorded as identification points, and if the number of identification points is greater than the number of risk control points, the processed image is recorded as a strong control processed image, otherwise it is a weak control processed image; when a pixel is recorded as an identification point and a risk control point at the same time, the pixel is defined as a high-position identification point;

[0017] Any identification area in the strong control processing map is used as a control compensation identification area; in the weak control processing map, when a pixel point belongs to a risk control point and does not belong to an identification point, it is defined as a control compensation point; for any identification area in the weak control processing map, the control compensation point is regionally eroded based on the identification point: if there are control compensation points in the eight neighborhoods of the identification point, these control compensation points are merged into the identification area, and these merged control compensation points are recorded as the identification boundary points of the identification area, and each identification boundary point is used as the starting point. If there are control compensation points in the eight neighborhoods of the identification boundary point, these control compensation points are merged into the identification area and recorded as new identification boundary points until there are no control compensation points in the eight neighborhoods of the identification boundary point, and the final area is recorded as the control compensation identification area;

[0018] In any compensation identification area, the distance between the compensation point with the largest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the first compensation radius, and the distance between the compensation point with the smallest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the second compensation radius. The ratio of the second compensation radius to the first compensation radius is used as the compensation index CTmpX of the corresponding compensation identification area.

[0019] The difference between the average value of the high-level identification point in the control and compensation identification area and the average value of the grayscale values ​​of all pixels is recorded as the high-level deviation DRG; the percentage of pixels identified as the control and compensation identification area to the total number of pixels in the processing image is recorded as the control and compensation ratio Rsth, and a preset observation period is recorded as SC_Time, SC_Time∈[1,2] hours; the average value of the control and compensation ratio in the current SC_Time period is recorded as Rsth.AVG, and the identification and control risk RCFN of the processing image is calculated by the control and compensation index:

[0020] ;

[0021] Among them, trimmean{} is the trimmed mean function, j1 is the serial number of the control compensation identification area, CTmpX j1 is the compensation index of the compensation identification area, and CTmpX.MI represents the minimum value of the corresponding compensation index of each compensation identification area;

[0022] Since the identification and control risk is quantified based on the grayscale value of the identification area in the analysis and processing diagram, the risk of insufficient individual recognition rate caused by the infrared technology control monitoring method caused by diversity is effectively quantified. However, when the identification area is highly dispersed in the processing diagram and the grayscale value is generally low, the identification and control risk calculated by the above method may be insufficiently quantified. This is because the individual recognition rate depends on the grayscale feature extraction in the identification area, which is not friendly to the accuracy of the analysis method of the weak control processing diagram, resulting in defects in the calculated identification and control risk. At present, there is no feasible technology to enhance the quantification effect when the dispersion is high and the grayscale value is generally low. In order to eliminate the influence of this analysis risk, the present invention proposes a more preferred solution:

[0023] Preferably, in step S300, a method for identifying and regulating risks is formed by performing synchronous analysis of multiple images based on the processing images obtained in real time: presetting an observation period as SC_Time, SC_Time∈[1,2] hours; obtaining the number of identification areas in each processing image within the SC_Time period, classifying all processing images with the same number of identification areas into a group, and recording the number of identification areas of any group of processing images as KI, and recording the corresponding group as a KI type distribution group; recording the ratio of the number of pixels in the identification area to the number of pixels in the non-identification area in the processing image as the identification ratio IRT;

[0024] The number of pixels in the identification area and the average of the grayscale values ​​of all pixels are recorded as the first element and the second element EGR respectively. The first element and the second element form a tuple and are recorded as an element vector. The set of element vectors under the same processing diagram is recorded as an element vector set. The slope value PF_k of the element vector set is calculated by the polyfit function. The minimum value of each PF_k under the KI type distribution group is taken as the element index DtmNX(KI). The simulated coefficient FTT_RX of the KI type distribution group is calculated by the element index. KI :FTT_RX KI =ME.IRT KI (1+e -DtmNX(KI) ); ME.IRT KI It represents the average value of each recognition ratio under the KI type distribution group;

[0025] The midpoint of each recognition area in the processing graph is obtained as the recognition origin; the neighborhood coefficient kr is preset, kr∈[5,10]; any recognition area is taken as the current recognition area, and the kr recognition areas with the smallest Euclidean distance between the current recognition area and the neighboring recognition areas are defined as neighboring recognition areas, and the line segment obtained by connecting the origin of the recognition area and each neighboring recognition area is recorded as Lsr;

[0026] Draw a circle with the line segment Lsr as the diameter. The circular area is the radiation control area corresponding to the line segment Lsr. The average value of the pixel grayscale value in the radiation control area is recorded as SCGR. If any two radiation control areas in the current identification area intersect, the area where the intersection occurs is defined as a radiation control intersection. The area with the most radiation control intersections is obtained as the most suitable control area. The ratio of the average value of the grayscale value of each pixel in the most suitable control area to the second element of the current identification area is recorded as the sub-radiation control gradient of the current identification area.

[0027] The ratio of the number of pixels between any radiation control area and the optimal control area is Rsize, and the radiation attenuation index of the radiation control area is the value obtained by minmax normalization of Rsize under each radiation control area in the current identification area; the root mean square value of any radiation attenuation index and the sub-radiation control gradient is calculated as the radiation control gradient value RDGL; the control area weight RdaTL=RDGL×(EGR-SCGR) of the radiation control area is calculated according to the second element of the current identification area; the identification and control risk RCFN of the current processing map is calculated by the simulated coefficient:

[0028] ;

[0029] Where FTT_RX KI is the simulated coefficient of the current processing graph, i1 and i2 are cumulative variables, RdaTL(i2) i1 is the weight of the i1th control area in the i2th identification area, RD(i2) i1 is the radius of the ith radiation control zone in the ith identification zone, VLN i2 is the first element of the i2th identification area, TcfMT KI It is the average value of the first element of all identification areas of all processing images under the KI type distribution group, and ln() is the logarithmic function with the natural number e as the base.

[0030] Further, in step S400, the method of combining the obtained identification and control risk with the control monitoring is: record the currently obtained identification and control risk as RCFN, when there is only one infrared detector for density monitoring, take the average of the identification and control risks at any moment and its previous k0 moments as the identification risk progress kMA, k0 is the progress coefficient, and its value range is k0∈[3,10]; perform SES single exponential smoothing fitting on the identification risk progress at each moment to obtain the fitting value FV corresponding to each moment; set the alarm condition as: (RCFN≥FV)&&(RCFN≥kMA), when the return value of the alarm condition is TRUE, an alarm is immediately initiated to notify the administrator to perform control, and enable all thermal detectors for density monitoring; when all infrared detectors are enabled, call each infrared detector to obtain the identification and control risks in real time, and set the control condition as: (RCFN<FV)&&(RCFN<kMA); perform density monitoring on the first thermal detector that meets the control condition, and turn off the remaining infrared detectors.

[0031] Furthermore, the method for density monitoring by the infrared detector is: to separate the animals and the background of the infrared image through the Gaussian mixture model, to mark the individual animals using the convolutional neural network algorithm, and to calculate the farm density according to the number of individual animals and the monitoring area of ​​the infrared detector; wherein the convolutional neural network algorithm includes YOLO or Faster R-CNN.

[0032] Preferably, all undefined variables in the present invention, if not clearly defined, can be manually set thresholds.

[0033] The present invention also provides an intelligent control and monitoring system for farm density, the intelligent control and monitoring system for farm density comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implementing the steps in the intelligent control and monitoring method for farm density when executing the computer program, the intelligent control and monitoring system for farm density can be run on computing devices such as desktop computers, laptop computers, PDAs, and cloud data centers, the executable system may include, but not limited to, a processor, a memory, and a server cluster, the processor executing the computer program runs in the following system units:

[0034] Equipment arrangement unit, used to arrange infrared detectors in semi-open farms;

[0035] An image acquisition and processing unit, used to acquire infrared images through data acquisition by an infrared detector, and to pre-process the infrared images to obtain processing images;

[0036] An image analysis unit is used to perform synchronous analysis of multiple images based on the processed images obtained in real time to identify and regulate risks;

[0037] The risk perception unit is used to combine the obtained identification and regulation risks for monitoring.

[0038] The beneficial effects of the present invention are as follows: the present invention provides an intelligent control and monitoring method for farm density, which performs intelligent control and monitoring on the diversity of behavioral patterns exhibited by animals in a large-scale farm environment, and effectively quantifies the risk of insufficient individual recognition rate caused by the infrared technology control and monitoring method caused by such diversity, thereby being able to accurately mark the time point of the recognition rate risk at the collapse feature, thereby improving the accuracy of the density monitoring results formed by the farm density analysis method based on infrared detection technology, thereby improving the management efficiency of the farm, so as to ensure the health level of the animals in the farm and the stability of the farm management. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other features of the present invention will become more obvious by describing in detail the embodiments shown in the accompanying drawings. The same reference numerals in the accompanying drawings of the present invention represent the same or similar elements. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work. In the accompanying drawings:

[0040] Figure 1 Shown is a flow chart of an intelligent control and monitoring method for farm density;

[0041] Figure 2 Shown is a structural diagram of an intelligent control and monitoring system for farm density. DETAILED DESCRIPTION

[0042] The following will be combined with the embodiments and drawings to clearly and completely describe the concept, specific structure and technical effects of the present invention, so as to fully understand the purpose, scheme and effect of the present invention. It should be noted that the embodiments and features in the embodiments of this application can be combined with each other without conflict.

[0043] like Figure 1 The figure shows a flow chart of an intelligent control and monitoring method for farm density. Figure 1 To illustrate an intelligent control and monitoring method for farm density according to an embodiment of the present invention, the method comprises the following steps:

[0044] S100, deploy infrared detectors in semi-open farms;

[0045] S200, acquiring an infrared image by collecting data through an infrared detector, and preprocessing the infrared image to obtain a processed image;

[0046] S300, performing multi-image synchronous analysis based on the real-time processed images to identify and control risks;

[0047] S400, combined with the obtained identification, regulates risk and regulates monitoring.

[0048] Furthermore, in step S100, the method for arranging infrared detectors in a semi-open farm is: the shape of the semi-open farm is a regular polygon, and each corner position is marked as a monitoring layout point at the boundary of the semi-open farm. If the semi-open farm is not a regular polygon, the number of preset monitoring layout points is NOSC, where the value of NOSC is 4, and NOSC positions are equidistantly or evenly marked along the boundary of the semi-open farm as monitoring layout points; the infrared detector adopts a near-infrared camera.

[0049] The above infrared detectors are arranged to ensure that the detectors can accurately monitor the target and output reliable data. Equal distance or uniform marking means that the perimeter of the farm boundary divided by NOSC is used as the layout interval, and a position is selected as a monitoring layout point at every layout interval on the farm boundary. The animals raised in the semi-open farm are chickens;

[0050] Further, in step S200, an infrared image is obtained by data acquisition through an infrared detector, and a method for preprocessing the infrared image to obtain a processing graph is as follows: data is collected on a semi-open farm by an infrared detector to obtain an infrared image; the infrared image is grayed, noise is removed from the infrared image by median filtering or Gaussian filtering, and the infrared image is divided into regions using an edge detection algorithm to form a processing graph, and each divided region is used as a sub-identification area, and the sub-identification area where the animal appears in the processing graph is marked as an identification area by a pre-trained CNN convolutional neural network model; wherein the edge detection algorithm uses a Sobel operator; a time period is preset as a pattern acquisition interval TG, with a value of 15 seconds; and a processing graph is obtained every TG.

[0051] Further, in step S300, a multi-image synchronous analysis is performed based on the real-time processed image to form a method for identifying and regulating risks: for any processed image, the upper quartile value of the grayscale value of all pixels in the processed image is obtained and recorded as TQG, and the pixels in the processed image with a grayscale value greater than TQG are recorded as risk control points; the pixels in the identification area are recorded as identification points, and if the number of identification points is greater than the number of risk control points, the processed image is recorded as a strong control processed image, otherwise it is a weak control processed image; when a pixel is recorded as an identification point and a risk control point at the same time, the pixel is defined as a high-position identification point;

[0052] Any identification area in the strong control processing map is used as a control compensation identification area; in the weak control processing map, when a pixel point belongs to a risk control point and does not belong to an identification point, it is defined as a control compensation point; for any identification area in the weak control processing map, the control compensation point is regionally eroded based on the identification point: if there are control compensation points in the eight neighborhoods of the identification point, these control compensation points are merged into the identification area, and these merged control compensation points are recorded as the identification boundary points of the identification area, and each identification boundary point is used as the starting point. If there are control compensation points in the eight neighborhoods of the identification boundary point, these control compensation points are merged into the identification area and recorded as new identification boundary points until there are no control compensation points in the eight neighborhoods of the identification boundary point, and the final area is recorded as the control compensation identification area;

[0053] In any compensation identification area, the distance between the compensation point with the largest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the first compensation radius, and the distance between the compensation point with the smallest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the second compensation radius. The ratio of the second compensation radius to the first compensation radius is used as the compensation index CTmpX of the corresponding compensation identification area.

[0054] The difference between the average value of the high-level identification point in the control compensation identification area and the average value of the grayscale values ​​of all pixels is recorded as the high-level deviation DRG; the percentage of pixels identified as the control compensation identification area to the total number of pixels in the processing image is recorded as the control compensation ratio Rsth, and a preset observation period is recorded as SC_Time, which takes 1 hour; the average value of the control compensation ratio in the current SC_Time period is recorded as Rsth.AVG, and the identification and control risk RCFN of the processing image is calculated by the control compensation index:

[0055] ;

[0056] Among them, trimmean{} is the trimmed mean function, j1 is the serial number of the control compensation identification area, CTmpX j1 is the compensation index of the compensation identification area, and CTmpX.MI represents the minimum value of the corresponding compensation index of each compensation identification area;

[0057] Preferably, in step S300, a method for identifying and regulating risk is formed by performing synchronous analysis of multiple images based on the processing images obtained in real time: presetting an observation period as SC_Time, with a value of 1 hour; obtaining the number of identification areas in each processing image within the SC_Time period, classifying all processing images with the same number of identification areas into a group, and recording the number of identification areas of any group of processing images as KI, and recording the corresponding group as a KI type distribution group; recording the ratio of the number of pixels in the identification area to the number of pixels in the non-identification area in the processing image as the identification ratio IRT;

[0058] The number of pixels in the identification area and the average of the grayscale values ​​of all pixels are recorded as the first element and the second element EGR respectively. The first element and the second element form a tuple and are recorded as an element vector. The set of element vectors under the same processing diagram is recorded as an element vector set. The slope value PF_k of the element vector set is calculated by the polyfit function. The minimum value of each PF_k under the KI type distribution group is taken as the element index DtmNX(KI). The simulated coefficient FTT_RX of the KI type distribution group is calculated by the element index. KI :FTT_RX KI =ME.IRT KI (1+e -DtmNX(KI) ); ME.IRT KI It represents the average value of each recognition ratio under the KI type distribution group;

[0059] The midpoint of each recognition area in the processing graph is obtained as the recognition origin; the neighborhood coefficient kr is preset to 8; any recognition area is taken as the current recognition area, and the kr recognition areas with the smallest Euclidean distance between the current recognition area and the neighboring recognition areas are defined as neighboring recognition areas, and the line segment obtained by connecting the origin of the recognition area and each neighboring recognition area is recorded as Lsr;

[0060] The Euclidean distance between the recognition areas refers to the Euclidean distance calculated by the recognition areas corresponding to the recognition origins;

[0061] Draw a circle with the line segment Lsr as the diameter. The circular area is the radiation control area corresponding to the line segment Lsr. The average value of the pixel grayscale value in the radiation control area is recorded as SCGR. If any two radiation control areas in the current identification area intersect, the area where the intersection occurs is defined as a radiation control intersection. The area with the most radiation control intersections is obtained as the most suitable control area. The ratio of the average value of the grayscale value of each pixel in the most suitable control area to the second element of the current identification area is recorded as the sub-radiation control gradient of the current identification area.

[0062] The ratio of the number of pixels between any radiation control area and the optimal control area is Rsize, and the radiation attenuation index of the radiation control area is the value obtained by minmax normalization of Rsize under each radiation control area in the current identification area; the root mean square value of any radiation attenuation index and the sub-radiation control gradient is calculated as the radiation control gradient value RDGL; the control area weight RdaTL=RDGL×(EGR-SCGR) of the radiation control area is calculated according to the second element of the current identification area; the identification and control risk RCFN of the current processing map is calculated by the simulated coefficient:

[0063] ;

[0064] Where FTT_RX KI is the simulated coefficient of the current processing graph, i1 and i2 are cumulative variables, RdaTL(i2) i1is the weight of the i1th control area in the i2th identification area, RD(i2) i1 is the radius of the ith radiation control zone in the ith identification zone, VLN i2 is the first element of the i2th identification area, TcfMT KI It is the average value of the first element of all identification areas of all processing images under the KI type distribution group, and ln() is the logarithmic function with the natural number e as the base.

[0065] The pseudo-measured coefficient of the current processing graph refers to the pseudo-measured coefficient corresponding to the KI-type distribution group to which the current processing graph belongs;

[0066] Further, in step S400, the method of combining the obtained identification and control risk with the control monitoring is: record the currently obtained identification and control risk as RCFN, when there is only one infrared detector for density monitoring, take the average of the identification and control risks at any moment and the previous k0 moments as the identification risk progress kMA, k0 is the progress coefficient, and its value range is 5 for k0; perform SES single exponential smoothing fitting on the identification risk progress at each moment to obtain the fitting value FV corresponding to each moment; set the alarm condition as: (RCFN≥FV)&&(RCFN≥kMA), when the return value of the alarm condition is TRUE, immediately initiate an alarm, notify the administrator to perform control, and enable all thermal detectors for density monitoring; when all infrared detectors are enabled, call each infrared detector to obtain the identification and control risks in real time, and set the control condition as: (RCFN<FV)&&(RCFN<kMA); perform density monitoring on the first thermal detector that meets the control conditions, and turn off the remaining infrared detectors.

[0067] Furthermore, the method for density monitoring using the infrared detector is: to separate the animals from the background of the infrared image through a Gaussian mixture model, to mark individual animals using a convolutional neural network algorithm, and to calculate the farm density based on the number of individual animals and the monitoring area of ​​the infrared detector; wherein the convolutional neural network algorithm uses Faster R-CNN.

[0068] An embodiment of the present invention provides an intelligent control and monitoring system for farm density, such as Figure 2 The figure shows a structural diagram of an intelligent control and monitoring system for farm density of the present invention. The intelligent control and monitoring system for farm density of this embodiment comprises: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned embodiment of an intelligent control and monitoring method for farm density are implemented.

[0069] The system comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to run in the following units of the system:

[0070] Equipment arrangement unit, used to arrange infrared detectors in semi-open farms;

[0071] An image acquisition and processing unit, used to acquire infrared images through data acquisition by an infrared detector, and to pre-process the infrared images to obtain processing images;

[0072] An image analysis unit is used to perform multi-image synchronous analysis based on the processed images obtained in real time to identify and regulate risks;

[0073] The risk perception unit is used to combine the obtained identification and regulation risks for monitoring.

[0074] The intelligent control and monitoring system for farm density can be run on computing devices such as desktop computers, laptops, PDAs, and cloud servers. The intelligent control and monitoring system for farm density can include, but is not limited to, processors and memories. Those skilled in the art will appreciate that the example is merely an example of an intelligent control and monitoring system for farm density, and does not constitute a limitation on an intelligent control and monitoring system for farm density. It can include more or fewer components than the example, or a combination of certain components, or different components. For example, the intelligent control and monitoring system for farm density can also include input and output devices, network access devices, buses, etc.

[0075] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the operation system of the intelligent control and monitoring system for the density of a farm, and uses various interfaces and lines to connect the various parts of the entire intelligent control and monitoring system for the density of a farm.

[0076] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the intelligent control and monitoring system of farm density by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0077] Although the description of the present invention has been quite detailed and has been described in particular with respect to several described embodiments, it is not intended to be limited to any of these details or embodiments or any particular embodiment, so as to effectively cover the intended scope of the present invention. In addition, the present invention is described above with the embodiments foreseeable by the inventors, and its purpose is to provide a useful description, and those non-substantial changes to the present invention that are not currently foreseen may still represent equivalent changes of the present invention.

Claims

1. An intelligent control and monitoring method for farm density, characterized in that: The method comprises the following steps: S100, deploy infrared detectors in semi-open farms; S200, acquiring an infrared image by collecting data through an infrared detector, and preprocessing the infrared image to obtain a processed image; S300, performing multi-image synchronous analysis based on the real-time processed images to identify and control risks; S400, combined with the obtained identification and regulation risk regulation monitoring; In step S300, a method for identifying and regulating risks is formed by performing synchronous analysis of multiple images based on the processing images obtained in real time: for any processing image, the upper quartile value of the grayscale values ​​of all pixels in the processing image is obtained and recorded as TQG, and pixels in the processing image with grayscale values ​​greater than TQG are recorded as risk control points; pixels in the identification area are recorded as identification points, and if the number of identification points is greater than the number of risk control points, the processing image is recorded as a strong control processing image, otherwise it is a weak control processing image; when a pixel is recorded as an identification point and a risk control point at the same time, the pixel is defined as a high-position identification point; Any identification area in the strong control processing map is used as a control compensation identification area; in the weak control processing map, when a pixel point belongs to a risk control point and does not belong to an identification point, it is defined as a control compensation point; for any identification area in the weak control processing map, the control compensation point is regionally eroded based on the identification point: if there are control compensation points in the eight neighborhoods of the identification point, these control compensation points are merged into the identification area, and these merged control compensation points are recorded as the identification boundary points of the identification area, and each identification boundary point is used as the starting point. If there are control compensation points in the eight neighborhoods of the identification boundary point, these control compensation points are merged into the identification area and recorded as new identification boundary points until there are no control compensation points in the eight neighborhoods of the identification boundary point, and the final area is recorded as the control compensation identification area; In any compensation identification area, the distance between the compensation point with the largest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the first compensation radius, and the distance between the compensation point with the smallest gray value and the risk control point with the largest gray value in the corresponding compensation identification area is recorded as the second compensation radius. The ratio of the second compensation radius to the first compensation radius is used as the compensation index CTmpX of the corresponding compensation identification area. The difference between the average value of the high-level identification point in the control and compensation identification area and the average value of the grayscale values ​​of all pixels is recorded as the high-level deviation DRG; the percentage of pixels identified as the control and compensation identification area to the total number of pixels in the processing image is recorded as the control and compensation ratio Rsth, and a preset observation period is recorded as SC_Time, SC_Time∈[1,2] hours; the average value of the control and compensation ratio in the current SC_Time period is recorded as Rsth.AVG, and the identification and control risk RCFN of the processing image is calculated through the control and compensation index; In step S400, the method of combining the obtained identification and control risk with the control monitoring is: record the currently obtained identification and control risk as RCFN, when there is only one infrared detector for density monitoring, take the average of the identification and control risks at any moment and its previous k0 moments as the identification risk progress kMA, k0 is the progress coefficient, and its value range is k0∈[3,10]; perform SES single exponential smoothing fitting on the identification risk progress at each moment to obtain the fitting value FV corresponding to each moment; set the alarm condition as: (RCFN≥FV)&&(RCFN≥kMA), when the return value of the alarm condition is TRUE, immediately initiate an alarm, notify the administrator to perform control, and enable all thermal detectors for density monitoring; when all infrared detectors are enabled, call each infrared detector to obtain the identification and control risks in real time, and set the control condition as: (RCFN<FV)&&(RCFN<kMA); perform density monitoring on the first thermal detector that meets the control condition, and turn off the remaining infrared detectors.

2. The intelligent control and monitoring method for farm density according to claim 1 is characterized in that: In step S100, the method for arranging infrared detectors in a semi-open farm is as follows: the shape of the semi-open farm is a regular polygon, each corner position is marked as a monitoring arrangement point at the boundary of the semi-open farm, and an infrared detector is arranged at each monitoring arrangement point; the infrared detector is a near-infrared camera or a multi-spectral camera; Alternatively, when the semi-open farm is not a regular polygon, the preset number of monitoring layout points is NOSC, where NOSC≥4, and NOSC positions are equidistantly or evenly marked along the boundary of the semi-open farm as monitoring layout points.

3. The intelligent control and monitoring method for farm density according to claim 1 is characterized in that: In step S200, an infrared image is acquired by data acquisition through an infrared detector, and a method for preprocessing the infrared image to obtain a processing graph is as follows: an infrared detector is used to acquire data from a semi-open farm and acquire an infrared image; the infrared image is grayed, and noise is removed from the infrared image by median filtering or Gaussian filtering, and an edge detection algorithm is used to divide the infrared image into regions to form a processing graph, and each divided region is used as a sub-identification region, and the sub-identification region where the animal appears in the processing graph is marked as an identification region by a pre-trained CNN convolutional neural network model; wherein the edge detection algorithm uses a Sobel operator or a Canny operator; a time period is preset as a pattern acquisition interval TG, TG∈[1,30] seconds; and a processing graph is acquired every TG.

4. The intelligent control and monitoring method for farm density according to claim 1 is characterized in that: The method of identifying and regulating risk through the calculation of the control and compensation index processing diagram is: ; Among them, RCFN is the identification and control risk, trimmean{} is the trimmed mean function, j1 is the serial number of the control and compensation identification area, CTmpX j1 is the compensation index of the compensation identification zone, and CTmpX.MI represents the minimum value of the corresponding compensation index of each compensation identification zone.

5. The intelligent control and monitoring method for farm density according to claim 1 is characterized in that: In step S300, a method for identifying and regulating risks is formed by performing synchronous analysis of multiple images based on the processing images obtained in real time, which can be replaced by: presetting an observation period as SC_Time, SC_Time∈[1,2] hours; obtaining the number of identification areas in each processing image within the SC_Time period, classifying all processing images with the same number of identification areas into a group, and recording the number of identification areas of any group of processing images as KI, and recording the corresponding group as a KI type distribution group; the ratio of the number of pixels in the identification area to the number of pixels in the non-identification area in the processing image is recorded as the identification ratio IRT; The number of pixels in the identification area and the average of the grayscale values ​​of all pixels are recorded as the first element and the second element EGR respectively. The first element and the second element form a tuple and are recorded as an element vector. The set of element vectors under the same processing diagram is recorded as an element vector set. The slope value PF_k of the element vector set is calculated by the polyfit function. The minimum value of each PF_k under the KI type distribution group is taken as the element index DtmNX(KI). The simulated coefficient FTT_RX of the KI type distribution group is calculated by the element index. KI :FTT_RX KI =ME.IRT KI (1+e -DtmNX(KI) ); ME.IRT KI It represents the average value of each recognition ratio under the KI type distribution group; The midpoint of each recognition area in the processing graph is obtained as the recognition origin; the neighborhood coefficient kr is preset, kr∈[5,10]; any recognition area is taken as the current recognition area, and the kr recognition areas with the smallest Euclidean distance between the current recognition area and the neighboring recognition areas are defined as neighboring recognition areas, and the line segment obtained by connecting the origin of the recognition area and each neighboring recognition area is recorded as Lsr; Draw a circle with the line segment Lsr as the diameter. The circular area is the radiation control area corresponding to the line segment Lsr. The average value of the pixel grayscale value in the radiation control area is recorded as SCGR. If any two radiation control areas in the current identification area intersect, the area where the intersection occurs is defined as a radiation control intersection. The area with the most radiation control intersections is obtained as the most suitable control area. The ratio of the average value of the grayscale value of each pixel in the most suitable control area to the second element of the current identification area is recorded as the sub-radiation control gradient of the current identification area. The ratio of the number of pixels between any radiation control area and the optimal control area is denoted as Rsize, and the radiation attenuation index of the radiation control area is the value obtained by minmax normalization of Rsize under each radiation control area in the current identification area; the root mean square value of any radiation attenuation index and the sub-radiation control gradient is calculated as the radiation control gradient amount RDGL; the control area weight RdaTL=RDGL×(EGR-SCGR) of the radiation control area is calculated according to the second element of the current identification area, and the identification and control risk of the current processing map is calculated by the simulated coefficient and the control area weight.

6. The intelligent control and monitoring method for farm density according to claim 1, characterized in that: The method of density monitoring using infrared detectors is: separate the animals from the background of infrared images through a Gaussian mixture model, apply a convolutional neural network algorithm to mark individual animals, and calculate the farm density based on the number of individual animals and the monitoring area of ​​the infrared detector; the convolutional neural network algorithm includes YOLO or Faster R-CNN.

7. An intelligent control and monitoring system for farm density, characterized in that: The intelligent control and monitoring system for farm density includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the intelligent control and monitoring method for farm density described in any one of claims 1 to 6 are implemented. The intelligent control and monitoring system for farm density runs on a desktop computer, a laptop computer, a PDA, and a computing device in a cloud data center.