CN115876258B - Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data - Google Patents

Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data Download PDF

Info

Publication number
CN115876258B
CN115876258B CN202310107276.9A CN202310107276A CN115876258B CN 115876258 B CN115876258 B CN 115876258B CN 202310107276 A CN202310107276 A CN 202310107276A CN 115876258 B CN115876258 B CN 115876258B
Authority
CN
China
Prior art keywords
livestock
index
temperature
gas
poultry
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310107276.9A
Other languages
Chinese (zh)
Other versions
CN115876258A (en
Inventor
徐震
徐响
朱海强
孟文峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Tobetter Machinery Co ltd
Original Assignee
Shandong Tobetter Machinery Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Tobetter Machinery Co ltd filed Critical Shandong Tobetter Machinery Co ltd
Priority to CN202310107276.9A priority Critical patent/CN115876258B/en
Publication of CN115876258A publication Critical patent/CN115876258A/en
Application granted granted Critical
Publication of CN115876258B publication Critical patent/CN115876258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A40/00Adaptation technologies in agriculture, forestry, livestock or agroalimentary production
    • Y02A40/70Adaptation technologies in agriculture, forestry, livestock or agroalimentary production in livestock or poultry

Landscapes

  • Housing For Livestock And Birds (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a livestock and poultry raising environment abnormality monitoring and alarming system based on multi-source data, which comprises the following components: the data acquisition unit is used for acquiring the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry; the temperature detection unit is used for acquiring a temperature abnormality index according to the temperature, acquiring an aggregation value according to the livestock and poultry distribution in the gray level image, and acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index; the harmful gas content detection unit is used for taking harmful gas with gas content exceeding a gas standard exceeding threshold value as target gas, and acquiring exceeding indexes from the target gas; acquiring a gas change index according to the gas content difference at adjacent sampling moments; acquiring a gas abnormality index according to the excess index and the gas change index; and the abnormality monitoring and alarming unit is used for carrying out abnormality monitoring and alarming on the livestock and poultry raising environment by combining the temperature judging index and the gas abnormality index, so that the monitoring is more accurate.

Description

Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data
Technical Field
The invention relates to the technical field of data processing, in particular to a livestock and poultry raising environment abnormality monitoring and alarming system based on multi-source data.
Background
The importance of the livestock and poultry breeding environment on livestock and poultry breeding is proved by a great deal of scientific research and production practice at home and abroad, especially the closed livestock and poultry breeding environment has limited illumination, large fluctuation of temperature, humidity and the like, and harmful gas is not easy to emit, which has great influence on the growth and propagation of livestock and poultry. The environmental quality in the livestock and poultry breeding environment is raised as a primary problem affecting the health state and production performance of livestock and poultry.
In the prior art, the sensors are used for automatically monitoring various livestock and poultry raising environment index parameters such as air temperature, humidity, ammonia concentration and the like in real time, acquired monitoring data are compared with a normal threshold value, and when the monitoring data of the livestock and poultry raising environment are abnormal, alarm signals are sent to the mobile intelligent terminal, but the monitoring data obtained by each type of sensor are independent, namely, no connection exists between the monitoring data corresponding to different environment index parameters, the alarm signals are generated only according to the abnormal condition of one type of monitoring data, the condition that the alarm signals deviate exists, and the misleading is caused to staff.
Disclosure of Invention
In order to solve the technical problem of deviation of alarm signals caused by inaccurate monitoring data, the invention aims to provide a livestock and poultry breeding environment abnormality monitoring and alarm system based on multi-source data, and the adopted technical scheme is as follows:
the embodiment of the invention provides a livestock and poultry raising environment abnormality monitoring and alarming system based on multi-source data, which comprises the following steps:
the data acquisition unit is used for acquiring the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry at the current sampling time;
the temperature detection unit is used for acquiring a temperature abnormality index according to the temperature; inputting the gray level image into a semantic segmentation network to obtain a livestock and poultry head image, performing edge detection on the livestock and poultry head image to obtain edge lines, obtaining the quantity of livestock and poultry according to the outline information of the edge lines, dividing the gray level image into at least two areas, and counting the quantity of livestock and poultry contained in each area to obtain an aggregation value; acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index;
the harmful gas content detection unit is used for acquiring harmful gas with gas content exceeding the gas standard exceeding threshold value of the corresponding harmful gas as target gas, and acquiring an exceeding index according to the difference value between the gas content of the target gas and the gas standard exceeding threshold value of the corresponding harmful gas; acquiring a gas change index according to the gas content difference of the same type of harmful gas at the current sampling moment and the adjacent sampling moment; acquiring a gas abnormality index according to the excess index and the gas change index;
and the abnormality monitoring and alarming unit is used for carrying out abnormality monitoring and alarming on the livestock and poultry raising environment by combining the temperature judging index and the gas abnormality index.
Further, the method for obtaining the number of the livestock and poultry according to the outline information of the edge line in the temperature detection unit comprises the following steps:
dividing a closed edge line corresponding to the head of the livestock and poultry into two parts from the mass center of the target edge line, dividing each target edge line into a left edge line and a right edge line, acquiring the contour similarity of the left edge line, the right edge line and other edge lines, clustering the left edge line, the right edge line and the other edge lines based on the contour similarity to obtain clusters, calculating the contour similarity mean value of each cluster, taking two clusters corresponding to the smallest difference between the two contour similarity mean values as target clusters, acquiring the number of the edge lines in each target cluster, and taking the number of the edge lines in any one target cluster as the livestock and poultry number when the number is equal; and when the number is unequal, taking the number of the edge lines in the largest target cluster as the number of the livestock and poultry.
Further, the method for acquiring the closed edge line corresponding to the livestock and poultry head in the temperature detection unit comprises the following steps:
clustering the closed edge lines according to the closed edge line length in the edge lines by a K-means clustering algorithm to obtain clusters, calculating the closed edge line length average value in the clusters, obtaining the cluster corresponding to the largest closed edge line length average value as a livestock head cluster, and taking the closed edge line in the livestock head cluster as the closed edge line corresponding to the livestock head.
Further, the method for counting the number of the livestock and poultry contained in each region in the temperature detection unit to obtain the aggregation value comprises the following steps:
and obtaining the number of the areas, taking the ratio of the number of the livestock and poultry to the number of the areas as the average livestock and poultry number of each area, and taking the result obtained by summing the absolute value of the difference value of the livestock and poultry number and the average livestock and poultry number contained in each area as an aggregation value.
Further, the method for obtaining the temperature judgment index according to the aggregation value and the temperature abnormality index in the temperature detection unit comprises the following steps:
when the temperature abnormality index is greater than or equal to a preset temperature abnormality threshold, taking a normalized value of the temperature abnormality index as a temperature judgment index; when the temperature anomaly index is smaller than a preset temperature anomaly threshold, a ratio of the aggregate value to the absolute value of the temperature anomaly index is obtained, and a result obtained by carrying out negative correlation mapping and normalization on the ratio is used as a temperature judgment index.
Further, the method for acquiring the exceeding index in the harmful gas content detection unit comprises the following steps:
the number of target gases is obtained, and the result of adding the difference values corresponding to each type of target gases and multiplying the sum by the number of target gases is used as an exceeding index.
Further, the method for acquiring the gas change index in the harmful gas content detection unit includes:
and acquiring the gas content of the same type of harmful gas at each sampling time in the current sampling time and the preset time period based on the preset time period before the current sampling time, calculating the absolute value of the difference value of the gas content at each two adjacent sampling times as a change value, taking the addition result of all the change values as a second result of the same type of harmful gas, acquiring a second result corresponding to each type of harmful gas, and taking the sum of all the second results as a gas change index.
Further, the method for acquiring the gas abnormality index in the harmful gas content detection unit includes:
and calculating the product of the excess index and the gas variation index as a gas abnormality index.
Further, the method for carrying out anomaly monitoring and alarming on the livestock and poultry raising environment by combining the temperature judgment index and the gas anomaly index in the anomaly monitoring and alarming unit comprises the following steps:
setting a temperature abnormality threshold, and directly alarming abnormality when the temperature judgment index is larger than the temperature abnormality threshold; when the temperature judgment index is smaller than or equal to the temperature abnormality threshold, carrying out normalization processing on the gas abnormality index to obtain a normalized gas abnormality index, setting a harmful gas content abnormality threshold, and if the normalized gas abnormality index is larger than the harmful gas content abnormality threshold, carrying out abnormality alarm; if the normalized gas abnormality index is smaller than or equal to the harmful gas content abnormality threshold, confirming that no abnormality exists in the livestock and poultry raising environment.
Further, the method for obtaining the temperature abnormality index according to the temperature in the temperature detection unit comprises the following steps:
setting a standard temperature in the livestock and poultry raising environment, and taking the difference value between the temperature and the standard temperature as a temperature abnormality index.
The invention has the following beneficial effects: the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry at the current sampling time are obtained, so that the data in the livestock and poultry breeding environment can be timely obtained, and the distribution situation of the livestock and poultry can be intuitively observed; acquiring a temperature abnormality index temperature according to the temperature so as to make preliminary prediction on whether the temperature in the livestock and poultry raising environment is abnormal or not, and being beneficial to judging whether the temperature is abnormal or not; inputting the gray level images into a semantic segmentation network to obtain livestock and poultry head images, performing edge detection on the livestock and poultry head images to obtain edge lines, and obtaining the livestock and poultry quantity according to the outline information of the edge lines, so that the livestock and poultry quantity is ensured to be more accurate and more approximate to the actual livestock and poultry quantity; dividing the gray level image into at least two areas, counting the number of the livestock and poultry contained in each area to obtain an aggregation value, visually sensing the distribution condition of the livestock and poultry, indirectly verifying whether the temperature of the livestock and poultry breeding environment is abnormal or not at the current sampling time according to the distribution condition of the livestock and poultry, acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index, carrying out abnormality detection on the temperature in the livestock and poultry breeding environment according to the temperature judgment index, enabling the detection of whether the temperature is abnormal or not to be more accurate, and reducing the influence caused by the abnormality of a temperature sensor; the method comprises the steps of obtaining harmful gas with gas content exceeding the gas standard exceeding threshold value of the corresponding harmful gas as target gas, directly obtaining target gas which has visual influence on whether the harmful gas in the livestock and poultry breeding environment is abnormal or not, and improving the efficiency of detecting the abnormality of the harmful gas in the livestock and poultry breeding environment; acquiring an exceeding index according to the difference value between the gas content of the target gas and the gas exceeding threshold value of the corresponding harmful gas, and performing preliminary analysis on whether harmful gas abnormality exists in the livestock and poultry raising environment according to the exceeding index; acquiring a gas change index according to the gas content difference of the same type of harmful gas at the current sampling moment and the adjacent sampling moment, judging whether the condition of harmful gas mutation exists or not according to the gas change index, and further analyzing whether the condition of harmful gas abnormality exists or not; acquiring a gas abnormality index according to the exceeding index and the gas change index, and improving the accuracy of abnormality detection of harmful gas in the livestock and poultry raising environment through the gas abnormality index; the temperature judgment index and the gas abnormality index are combined to perform abnormality monitoring and alarming on the livestock and poultry breeding environment, so that the accuracy of performing abnormality monitoring and alarming on the livestock and poultry breeding environment is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a block diagram of a system for monitoring and alarming abnormality of livestock and poultry raising environment based on multi-source data according to an embodiment of the present invention.
Detailed Description
In order to further explain the technical means and effects adopted by the invention to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the livestock and poultry raising environment abnormality monitoring and alarming system based on multi-source data according to the invention with reference to the accompanying drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The invention provides a specific scheme of a livestock and poultry raising environment abnormality monitoring and alarming system based on multi-source data, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a block diagram of a system for monitoring and alarming an abnormality of a livestock and poultry raising environment based on multi-source data according to an embodiment of the present invention is shown, where the system includes: the system comprises a data acquisition unit, a temperature detection unit, a harmful gas content detection unit, an abnormality monitoring and alarming unit.
The data acquisition unit 10 is used for acquiring the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry at the current sampling time.
Specifically, the existing equipment such as a temperature sensor and a humidity sensor is used, and various harmful gas sensors are used for acquiring various data in the livestock and poultry raising environment, wherein the specific data are as follows: data acquisition time, temperature, humidity, carbon monoxide, nitric oxide, sulfur dioxide and other harmful gases; shooting the livestock and poultry breeding environment by using an industrial camera to obtain livestock and poultry images; the data and the livestock and poultry images are continuously acquired, and are acquired once every one hour.
And carrying out graying treatment on the livestock and poultry image by a weighted average method to obtain a gray image, and denoising the gray image by using a Gaussian filter algorithm to ensure that the gray image is clearer and avoid interference of noise points on the gray image. The weighted average method and the gaussian filtering algorithm are known techniques, and will not be described in detail herein.
A temperature detection unit 20 for acquiring a temperature abnormality index according to the temperature; inputting the gray level image into a semantic segmentation network to obtain a livestock and poultry head image, performing edge detection on the livestock and poultry head image to obtain edge lines, obtaining the quantity of livestock and poultry according to the outline information of the edge lines, dividing the gray level image into at least two areas, and counting the quantity of livestock and poultry contained in each area to obtain an aggregation value; and acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index.
Specifically, the temperature is an important environmental index in the livestock and poultry breeding process, especially for some livestock and poultry in the early growth stage, the self-regulation capability of young livestock and poultry is imperfect, and the survival rate of the young livestock and poultry can be influenced by slight temperature change. Therefore, the embodiment of the invention firstly judges whether the temperature of the livestock and poultry raising environment is abnormal or not, and combines the aggregation degree of the livestock and poultry, namely, when the temperature is too low, the livestock and poultry are relatively piled up and are gathered together for heating, so that the temperature of the livestock and poultry raising environment can be judged whether to be abnormal or not by combining the aggregation condition of the livestock and poultry.
The embodiment of the invention detects whether the temperature in the livestock and poultry raising environment is abnormal or not through the temperature judgment index, and the method for acquiring the temperature judgment index comprises the following steps:
(1) And acquiring a temperature abnormality index through the temperature.
Setting a standard temperature in the livestock and poultry raising environment, and taking the difference value between the temperature and the standard temperature as a temperature abnormality index. The specific process for acquiring the temperature abnormality index is as follows:
acquiring the temperature of a temperature sensor at the current sampling time, setting the standard temperature in the livestock and poultry breeding environment according to factors such as the type and the size of livestock and poultry under actual conditions, taking the difference value between the temperature and the standard temperature as a temperature abnormality index, and acquiring a formula of the temperature abnormality index a as follows:
wherein,is the temperature; />Is the standard temperature; a is an index of temperature anomaly.
When the following is performedThe larger a is, the higher the temperature in the livestock and poultry raising environment is; when->The smaller a is, the lower the temperature in the livestock and poultry raising environment is; when->The closer->When a is closer to 0, the temperature in the livestock and poultry breeding environment is more normal.
(2) And calculating an aggregation value by acquiring the number of the livestock and poultry.
Inputting the gray level image into a semantic segmentation network to obtain a livestock head image, and performing edge detection on the livestock head image to obtain an edge line. Clustering the closed edge lines according to the closed edge line length in the edge lines by a K-means clustering algorithm to obtain clusters, calculating the closed edge line length average value in the clusters, obtaining the cluster corresponding to the largest closed edge line length average value as a livestock head cluster, and taking the closed edge line in the livestock head cluster as the closed edge line corresponding to the livestock head.
Dividing a closed edge line corresponding to the head of the livestock and poultry into two parts from the mass center of the target edge line, dividing each target edge line into a left edge line and a right edge line, acquiring the contour similarity of the left edge line, the right edge line and other edge lines, clustering the left edge line, the right edge line and the other edge lines based on the contour similarity to obtain clusters, calculating the contour similarity mean value of each cluster, taking two clusters corresponding to the smallest difference between the two contour similarity mean values as target clusters, acquiring the number of the edge lines in each target cluster, and taking the number of the edge lines in any one target cluster as the livestock and poultry number when the number is equal; and when the number is unequal, taking the number of the edge lines in the largest target cluster as the number of the livestock and poultry. The specific process for obtaining the number of the livestock and poultry is as follows:
and carrying out semantic segmentation on the gray level image by using a Resnet neural network, wherein the input of the Resnet neural network is the gray level image, and the output of the Resnet neural network is the livestock head image.
Wherein, the training and labeling mode of the Resnet neural network is as follows: marking the region of the livestock and poultry head image as 1 and the other regions as 0 in the Resnet neural network training process; the Resnet neural network loss function is a cross entropy loss function.
Here, the Resnet neural network is a well-known technology, and will not be described in detail here.
And (3) acquiring edge lines of the livestock and poultry head image by using a canny edge detection algorithm, clustering the edge lines which are closed in the edge lines, clustering the closed edge lines by using a K-means clustering algorithm based on the length of the closed edge lines, wherein the K value in the K-means clustering algorithm is set to be 2, so that two clusters can be acquired, the length average value of the closed edge lines of the two clusters is calculated, the cluster corresponding to the largest length average value of the closed edge lines is acquired and is used as the livestock and poultry head cluster, and the closed edge line in the livestock and poultry head cluster is used as the closed edge line corresponding to the livestock and poultry head.
The canny edge detection algorithm and the K-means clustering algorithm are known techniques, and are not described in detail herein.
The method comprises the steps of taking a closed edge line corresponding to the head of a livestock and poultry as a target edge line, dividing the mass center of the target edge line into two parts, dividing each target edge line into a left edge line and a right edge line, obtaining the contour similarity of the left edge line, the right edge line and other edge lines by using a shape context algorithm, and clustering the edge lines according to the contour similarity by using a K-means clustering algorithm, wherein the K value in the K-means clustering algorithm is determined to be 3, so that 3 clustering clusters can be obtained by the K-means clustering algorithm, and the three clustering clusters respectively correspond to the left edge line clustering cluster, the right edge line clustering cluster and other edge line clustering clusters; and respectively acquiring contour similarity mean values in the three clusters, subtracting every two contour similarity mean values to obtain a difference value, and taking two clusters corresponding to the smallest difference value as target clusters, wherein the two clusters corresponding to the target clusters are respectively a left edge line cluster and a right edge line cluster.
In the livestock head image, the situation that the livestock heads are blocked exists, in order to enable the acquired livestock quantity to be more accurate according to the livestock heads, the position of the edge line in the target cluster in the livestock head image is analyzed, and when the target edge line does not belong to the same target cluster, namely, respectively belongs to a left edge line cluster and a right edge line cluster, the situation that the corresponding livestock heads are not blocked is indicated, and the corresponding target edge line represents one head of livestock, namely, one livestock; when the target edge lines belong to the same target cluster, the fact that the corresponding livestock and poultry heads are shielded is indicated to cause that the left side and the right side of the target edge lines belong to the same target cluster, and the corresponding target edge lines represent two heads of livestock and poultry, namely two livestock and poultry, so that the number of livestock and poultry in the livestock and poultry head images can be obtained according to the number of edge lines in the target cluster; when the number of the edge lines in the target cluster is equal, the condition that the livestock head is not blocked in the livestock head image is indicated, and the number of the edge lines in any one target cluster can be used as the livestock number; when the number of the edge lines in the target cluster is unequal, the condition that the livestock and poultry heads are blocked in the livestock and poultry head image is indicated, and the maximum number of the edge lines in the target cluster is taken as the livestock and poultry number.
The shape context algorithm and the K-means clustering algorithm are known techniques, and are not described in detail herein.
And obtaining the number of the areas, taking the ratio of the number of the livestock and poultry to the number of the areas as the average livestock and poultry number of each area, and taking the result obtained by summing the absolute value of the difference value of the livestock and poultry number and the average livestock and poultry number contained in each area as an aggregation value. The specific operation of acquiring the aggregation value is as follows:
dividing the gray image into n areas, wherein n is a positive integer, and taking the ratio of the number of livestock and poultry to the number of the areas n as a gray imageThe average livestock and poultry number of each region in the image is obtained, the livestock and poultry number contained in each region is obtained, the result obtained by summing the absolute value of the difference value of the livestock and poultry number contained in each region and the average livestock and poultry number is taken as an aggregation value, and the aggregation value is obtainedThe formula of (2) is: />
Wherein n is the number of regions;the number of the livestock and poultry contained in the ith area; />Is the average livestock and poultry number; />Is an aggregate value; />As a function of absolute value.
It should be noted that the number of the substrates,the smaller the livestock and poultry quantity contained in the ith area is, the more the livestock and poultry quantity contained in the ith area is close to the average livestock and poultry quantity, the more uniform the livestock and poultry distribution in the ith area is, the aggregation value is +.>The smaller; />The larger the difference between the number of livestock and poultry contained in the ith region and the average number of livestock and poultry is, the more uneven the livestock and poultry distribution in the ith region is, the more uneven the aggregation value is>The larger; thus, aggregate value +.>The larger the temperature, the more uneven the livestock and poultry distribution in the gray level image, the more abnormal the temperature in the livestock and poultry breeding environment.
(3) And acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index.
When the temperature abnormality index is greater than or equal to a preset temperature abnormality threshold, taking a normalized value of the temperature abnormality index as a temperature judgment index; when the temperature anomaly index is smaller than a preset temperature anomaly threshold, a ratio of the aggregate value to the absolute value of the temperature anomaly index is obtained, and a result obtained by carrying out negative correlation mapping and normalization on the ratio is used as a temperature judgment index. The specific operation of obtaining the temperature judgment index is as follows:
the embodiment of the invention sets the preset temperature abnormality threshold to 0, and when the temperature abnormality index is greater than or equal to the preset temperature abnormality threshold, the condition that the temperature in the livestock and poultry breeding environment is too high is indicated, and at the moment, the temperature judgment index can be directly obtained according to the temperature abnormality index: substituting the opposite number of the temperature anomaly index into an exponential function based on a natural constant e to obtain a result as a first result, and taking the difference between the constant 1 and the first result as a temperature judgment index; when the temperature anomaly index is smaller than a preset temperature anomaly threshold value, the condition that the temperature in the livestock and poultry raising environment is too low is indicated, at the moment, the influence of the temperature in the livestock and poultry raising environment on the livestock and poultry cannot be accurately monitored only by analyzing the temperature, because the aggregation degree of the livestock and poultry is influenced by the temperature, when the temperature is lower, the aggregation value is larger, and the temperature judgment index is obtained through the aggregation value and the temperature anomaly index together: the ratio of the aggregate value to the absolute value of the temperature abnormality index is obtained, and the result obtained by substituting the opposite number of the ratio into an exponential function based on a natural constant e is used as a temperature judgment index. Acquiring temperature judgment indexThe formula of (2) is:
wherein,is an index of temperature abnormality; />Is an aggregate value; />Is a temperature judgment index; />As a function of absolute value; />Is an exponential function based on a natural constant e.
When the temperature is abnormalWhen the temperature is more than or equal to 0, the temperature abnormality index is +.>The larger the specification temperature is, the higher the temperature judgment index +.>The greater the temperature abnormality index ∈ ->And temperature judgment index->Is a positive correlation relationship; when the temperature is abnormal>When the concentration is less than 0, the concentration is +.>The magnitude of (2) is subject to a temperature abnormality index +.>Is indicated as temperature abnormality index +>The smaller the temperature, the lower the temperature, the more the livestock and poultry are aggregated, and the aggregation value is +.>The larger; thus (S)>The smaller the temperature judgment index +.>The bigger the->The larger the temperature judgment index ∈ ->Smaller (less)>And temperature judgment index->Is a negative correlation relationship.
A harmful gas content detection unit 30, configured to obtain, as a target gas, a harmful gas whose gas content exceeds a gas standard exceeding threshold value of the corresponding type of harmful gas, and obtain an exceeding index according to a difference value between the gas content of the target gas and the gas standard exceeding threshold value of the corresponding type of harmful gas; acquiring a gas change index according to the gas content difference of the same type of harmful gas at the current sampling moment and the adjacent sampling moment; and acquiring a gas abnormality index according to the excess index and the gas change index.
Specifically, certain harmful gas can be generated in the livestock and poultry breeding process, and when the gas content of the harmful gas exceeds the set gas standard exceeding threshold, the growth of the livestock and poultry is damaged, so that whether the harmful gas in the livestock and poultry breeding environment is abnormal or not is detected in time.
The method for detecting whether the harmful gas in the livestock and poultry raising environment is abnormal or not through the gas abnormality index and acquiring the gas abnormality index comprises the following steps:
(1) And obtaining the exceeding index.
And subtracting the gas content of each type of harmful gas from the gas exceeding threshold value of the corresponding type of harmful gas to obtain a difference value, and taking the harmful gas corresponding to the difference value being greater than 0 as the target gas.
The number of target gases is obtained, and the result of adding the difference values corresponding to each type of target gases and multiplying the sum by the number of target gases is used as an exceeding index. Obtaining excess indexThe formula of (2) is:
wherein,is the amount of target gas; />A gas content that is an i-th target gas; />A gas exceeding threshold corresponding to the ith target gas; />Is beyond the index.
It should be noted that the number of the substrates,the bigger the->The larger the exceeding index->The larger the gas content of the target gas in the livestock and poultry raising environment is, the more the harmful gas in the livestock and poultry raising environment isAbnormality; />Smaller (less)>The smaller the exceeding index->The smaller the gas content of the target gas in the livestock and poultry breeding environment is, the closer the gas content is to the gas exceeding threshold value, and the more the harmful gas in the livestock and poultry breeding environment is normal; thus (S)>The bigger the harmful gas in the livestock and poultry raising environment is, the more abnormal the harmful gas is.
(2) And acquiring a gas change index.
And acquiring the gas content of the same type of harmful gas at each sampling time in the current sampling time and the preset time period based on the preset time period before the current sampling time, calculating the absolute value of the difference value of the gas content at each two adjacent sampling times as a change value, taking the addition result of all the change values as a second result of the same type of harmful gas, acquiring a second result corresponding to each type of harmful gas, and taking the sum of all the second results as a gas change index. The specific process for acquiring the gas change index is as follows:
the embodiment of the invention obtains the gas content of each type of harmful gas at each sampling time in the first 24 hours from the current sampling time, subtracts the gas content obtained by the same type of harmful gas at the adjacent sampling time to obtain a difference absolute value as a change value, obtains all change values of the type of harmful gas in 24 hours, and adds all change values of the type of harmful gas to obtain a second result corresponding to the type of harmful gas; in the first placeHarmful gas-like is exemplified, obtain +.>Class is ofHarmful gas content at each sampling time in the first 24 hours of stopping the current sampling time, the gas content at each sampling time is about +.>The gas content obtained at the sampling instant and +.>Absolute value of difference between gas contents obtained at each sampling instant as +.>Obtaining the variation value of the harmful gas and obtaining the +.>All the values of the harmful gas-like changes in 24 hours, the sum of all the values of the changes being added as +.>A second outcome that is harmful-like gas; according to get->The method of the second result of the harmful gas, obtain the second result that every kind of harmful gas corresponds to, take the sum of all second results as the gas change index, gas change index +.>The formula of (2) is:
wherein,the number of the types of the harmful gases in the livestock and poultry raising environment; />Is->Harmful gas-like substance +.>The gas content obtained at each sampling moment; />Is->Harmful gas-like substance +.>The gas content obtained at each sampling moment; />Is a gas change index; />As a function of absolute value.
When the value is changedThe larger, the description of->Harmful gas is in the->The gas content obtained at the sampling instant and +.>The larger the variation between the gas contents obtained at the respective sampling instants, the corresponding second result +.>The bigger the->The larger; when the value of change +.>The smaller, the description of->Harmful gas is in the->The gas content obtained at the sampling instant and +.>The smaller the variation between the gas contents obtained at the respective sampling instants, the corresponding second result +.>Smaller (less)>The smaller; thus, the variation value +.>And gas change index->Is a positive correlation relationship.
(3) And acquiring a gas abnormality index according to the excess index and the gas change index.
And calculating the product of the excess index and the gas variation index as a gas abnormality index. Acquiring gas abnormality indexThe formula of (2) is:
wherein,is beyond the index; />Is an abnormal gas index; />Is an index of gas abnormality.
It should be noted that the number of the substrates,the larger the target gas content in the livestock and poultry raising environment is, the more the target gas content in the livestock and poultry raising environment is abnormal, and the more the target gas content in the livestock and poultry raising environment is abnormal, the more the target gas>The larger; />The larger the gas content change of the harmful gas in the livestock and poultry breeding environment is, the more the harmful gas in the livestock and poultry breeding environment is likely to be abnormal, and the more the harmful gas in the livestock and poultry breeding environment is abnormal>The larger; thus (S)>The bigger the harmful gas in the livestock and poultry raising environment is, the more abnormal the harmful gas is.
The abnormality monitoring and alarming unit 40 is used for carrying out abnormality monitoring and alarming on the livestock and poultry raising environment by combining the temperature judging index and the gas abnormality index.
Setting a temperature abnormality threshold, and directly alarming abnormality when the temperature judgment index is larger than the temperature abnormality threshold; when the temperature judgment index is smaller than or equal to the temperature abnormality threshold, carrying out normalization processing on the gas abnormality index to obtain a normalized gas abnormality index, setting a harmful gas content abnormality threshold, and if the normalized gas abnormality index is larger than the harmful gas content abnormality threshold, carrying out abnormality alarm; if the normalized gas abnormality index is smaller than or equal to the harmful gas content abnormality threshold, confirming that no abnormality exists in the livestock and poultry raising environment.
The embodiment of the invention sets the temperature abnormality threshold to be 0.7, and when the temperature judgment index is larger than the temperature abnormality threshold, the temperature abnormality in the livestock and poultry breeding environment at the current moment is indicated, the abnormality alarm can be directly given, and the temperature in the livestock and poultry breeding environment can be timely adjusted by staff; when the temperature judgment index is smaller than or equal to the temperature abnormality threshold, the temperature in the livestock and poultry breeding environment at the current moment is normal, and in order to prevent abnormality detection errors, further analysis of harmful gases in the livestock and poultry breeding environment is started.
The obtained gas abnormality indexes are normalized to obtain normalized gas abnormality indexes, the abnormal harmful gas content threshold value is set to be 0.7, when the normalized gas abnormality indexes are larger than the abnormal harmful gas content threshold value, the abnormal presence of harmful gas in the livestock and poultry raising environment at the current moment is indicated, abnormal alarm can be directly carried out, and staff can timely process the gas content of the harmful gas in the livestock and poultry raising environment; when the normalized gas abnormality index is smaller than or equal to the abnormal threshold value of the harmful gas content, the condition that no abnormality exists in the livestock and poultry raising environment at the current moment is indicated.
Thus, the embodiment of the invention is completed.
In summary, the embodiment of the present invention includes: the data acquisition unit is used for acquiring the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry; the temperature detection unit is used for acquiring a temperature abnormality index according to the temperature, acquiring an aggregation value according to the distribution of livestock and poultry in the gray level image, and acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index; the harmful gas content detection unit is used for taking harmful gas with gas content exceeding a gas standard exceeding threshold value as target gas, and acquiring exceeding indexes from the target gas; acquiring a gas change index according to the gas content difference at adjacent sampling moments; acquiring a gas abnormality index according to the excess index and the gas change index; and the abnormality monitoring and alarming unit is used for carrying out abnormality monitoring and alarming on the livestock and poultry raising environment by combining the temperature judging index and the gas abnormality index, so that the monitoring is more accurate.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments.
The foregoing description of the preferred embodiments of the present invention is not intended to be limiting, but rather, any modifications, equivalents, improvements, etc. that fall within the principles of the present invention are intended to be included within the scope of the present invention.

Claims (7)

1. The livestock and poultry raising environment abnormality monitoring and alarming system based on the multi-source data is characterized by comprising the following steps:
the data acquisition unit is used for acquiring the temperature of the livestock and poultry breeding environment, the gas content of each type of harmful gas and the gray level image of the livestock and poultry at the current sampling time;
the temperature detection unit is used for acquiring a temperature abnormality index according to the temperature; inputting the gray level image into a semantic segmentation network to obtain a livestock and poultry head image, performing edge detection on the livestock and poultry head image to obtain edge lines, obtaining the quantity of livestock and poultry according to the outline information of the edge lines, dividing the gray level image into at least two areas, and counting the quantity of livestock and poultry contained in each area to obtain an aggregation value; acquiring a temperature judgment index according to the aggregation value and the temperature abnormality index;
the harmful gas content detection unit is used for acquiring harmful gas with gas content exceeding the gas standard exceeding threshold value of the corresponding harmful gas as target gas, and acquiring an exceeding index according to the difference value between the gas content of the target gas and the gas standard exceeding threshold value of the corresponding harmful gas; acquiring a gas change index according to the gas content difference of the same type of harmful gas at the current sampling moment and the adjacent sampling moment; acquiring a gas abnormality index according to the excess index and the gas change index;
the abnormality monitoring and alarming unit is used for carrying out abnormality monitoring and alarming on the livestock and poultry raising environment by combining the temperature judging index and the gas abnormality index;
the method for obtaining the number of the livestock and poultry according to the outline information of the edge line in the temperature detection unit comprises the following steps:
dividing a closed edge line corresponding to the head of the livestock and poultry into two parts from the mass center of the target edge line, dividing each target edge line into a left edge line and a right edge line, acquiring the contour similarity of the left edge line, the right edge line and other edge lines, clustering the left edge line, the right edge line and the other edge lines based on the contour similarity to obtain clusters, calculating the contour similarity mean value of each cluster, taking two clusters corresponding to the smallest difference between the two contour similarity mean values as target clusters, acquiring the number of the edge lines in each target cluster, and taking the number of the edge lines in any one target cluster as the livestock and poultry number when the number is equal; when the number is unequal, the number of edge lines in the largest target cluster is taken as the number of livestock and poultry;
the method for counting the number of the livestock and poultry contained in each area in the temperature detection unit to obtain the aggregation value comprises the following steps:
obtaining the number of the areas, taking the ratio of the number of the livestock and poultry to the number of the areas as the average number of the livestock and poultry in each area, and taking the result obtained by summing the absolute value of the difference between the number of the livestock and poultry contained in each area and the average number of the livestock and poultry as an aggregation value;
the method for acquiring the temperature judgment index according to the aggregation value and the temperature abnormality index in the temperature detection unit comprises the following steps:
when the temperature abnormality index is greater than or equal to a preset temperature abnormality threshold, taking a normalized value of the temperature abnormality index as a temperature judgment index; when the temperature anomaly index is smaller than a preset temperature anomaly threshold value, acquiring a ratio of the aggregate value to the absolute value of the temperature anomaly index, and carrying out negative correlation mapping and normalization on the ratio to obtain a result serving as a temperature judgment index;
acquiring temperature judgment indexThe formula of (2) is:
wherein,is an index of temperature abnormality; />Is an aggregate value; />Is a temperature judgment index; />As a function of absolute value; />Is an exponential function based on a natural constant e.
2. The abnormal livestock and poultry raising environment monitoring and alarming system based on multi-source data as set forth in claim 1, wherein the method for obtaining the closed edge line corresponding to the head of the livestock and poultry in the temperature detecting unit comprises the following steps:
clustering the closed edge lines according to the closed edge line length in the edge lines by a K-means clustering algorithm to obtain clusters, calculating the closed edge line length average value in the clusters, obtaining the cluster corresponding to the largest closed edge line length average value as a livestock head cluster, and taking the closed edge line in the livestock head cluster as the closed edge line corresponding to the livestock head.
3. The multi-source data based livestock and poultry raising environment abnormality monitoring and alarming system as set forth in claim 1, wherein,
the method for acquiring the exceeding index in the harmful gas content detection unit comprises the following steps:
the number of target gases is obtained, and the result of adding the difference values corresponding to each type of target gases and multiplying the sum by the number of target gases is used as an exceeding index.
4. The abnormal livestock and poultry raising environment monitoring and alarming system based on multi-source data as set forth in claim 1, wherein the method for acquiring the gas change index in the harmful gas content detection unit comprises the steps of:
and acquiring the gas content of the same type of harmful gas at each sampling time in the current sampling time and the preset time period based on the preset time period before the current sampling time, calculating the absolute value of the difference value of the gas content at each two adjacent sampling times as a change value, taking the addition result of all the change values as a second result of the same type of harmful gas, acquiring a second result corresponding to each type of harmful gas, and taking the sum of all the second results as a gas change index.
5. The abnormal livestock and poultry raising environment monitoring and alarming system based on multi-source data as set forth in claim 1, wherein the method for acquiring the abnormal gas index in the harmful gas content detection unit comprises the following steps:
and calculating the product of the excess index and the gas variation index as a gas abnormality index.
6. The abnormal monitoring and alarming system for livestock and poultry raising environment based on multi-source data as set forth in claim 1, wherein the method for combining temperature judgment index and gas abnormality index to perform abnormal monitoring and alarming for livestock and poultry raising environment in the abnormal monitoring and alarming unit comprises:
setting a temperature abnormality threshold, and directly alarming abnormality when the temperature judgment index is larger than the temperature abnormality threshold; when the temperature judgment index is smaller than or equal to the temperature abnormality threshold, carrying out normalization processing on the gas abnormality index to obtain a normalized gas abnormality index, setting a harmful gas content abnormality threshold, and if the normalized gas abnormality index is larger than the harmful gas content abnormality threshold, carrying out abnormality alarm; if the normalized gas abnormality index is smaller than or equal to the harmful gas content abnormality threshold, confirming that no abnormality exists in the livestock and poultry raising environment.
7. The system for monitoring and alarming abnormal livestock and poultry raising environment based on multi-source data according to claim 1, wherein the method for acquiring the temperature abnormality index according to the temperature in the temperature detection unit comprises the following steps:
setting a standard temperature in the livestock and poultry raising environment, and taking the difference value between the temperature and the standard temperature as a temperature abnormality index.
CN202310107276.9A 2023-02-14 2023-02-14 Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data Active CN115876258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310107276.9A CN115876258B (en) 2023-02-14 2023-02-14 Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310107276.9A CN115876258B (en) 2023-02-14 2023-02-14 Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data

Publications (2)

Publication Number Publication Date
CN115876258A CN115876258A (en) 2023-03-31
CN115876258B true CN115876258B (en) 2023-12-08

Family

ID=85761084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310107276.9A Active CN115876258B (en) 2023-02-14 2023-02-14 Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data

Country Status (1)

Country Link
CN (1) CN115876258B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116128260B (en) * 2023-04-18 2023-07-11 山东奥斯瑞特检验检测有限公司 Data sample-based key enterprise environment analysis method
CN116340801B (en) * 2023-05-31 2023-07-28 烟台市福山区动物疫病预防控制中心 Intelligent monitoring method for abnormal environmental data of livestock breeding
CN117056862B (en) * 2023-10-10 2023-12-19 贵州省畜牧兽医研究所 Poultry farming environment anomaly monitoring system based on Internet of things

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122184A (en) * 2011-01-20 2011-07-13 中国联合网络通信集团有限公司 Temperature and humidity monitoring and supervising method, terminal device and system
JP2016032461A (en) * 2014-07-31 2016-03-10 近藤電子株式会社 Health condition diagnostic device of poultry
CN109814644A (en) * 2019-01-16 2019-05-28 日立楼宇技术(广州)有限公司 Control method, device, system and the storage medium of indoor environment state
CN111368798A (en) * 2020-03-23 2020-07-03 中国农业科学院农业信息研究所 Livestock and poultry activity monitoring method and system
CN111650981A (en) * 2020-06-28 2020-09-11 辽宁邮电规划设计院有限公司 Multi-sensor-based stock raising remote control system and control method
CN111696321A (en) * 2020-06-30 2020-09-22 张祖明 Pigsty gas detection alarm system and method
CN111766827A (en) * 2020-07-09 2020-10-13 霍祥明 Modern pig breeding base real-time monitoring management system based on big data
CN112748755A (en) * 2019-10-30 2021-05-04 山东科技大学 Temperature control device based on visual identification
CN114009365A (en) * 2021-11-19 2022-02-08 深圳市博安智控科技有限公司 Intelligent breeding method, system, equipment and storage medium of Internet of things
CN114199962A (en) * 2021-12-16 2022-03-18 山西农业大学 Harmful gas analysis and monitoring system used in livestock and poultry house
CN114710537A (en) * 2022-03-25 2022-07-05 深圳市朗锐恒科技开发有限公司 Ammonia gas monitoring method and device in farm, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102122184A (en) * 2011-01-20 2011-07-13 中国联合网络通信集团有限公司 Temperature and humidity monitoring and supervising method, terminal device and system
JP2016032461A (en) * 2014-07-31 2016-03-10 近藤電子株式会社 Health condition diagnostic device of poultry
CN109814644A (en) * 2019-01-16 2019-05-28 日立楼宇技术(广州)有限公司 Control method, device, system and the storage medium of indoor environment state
CN112748755A (en) * 2019-10-30 2021-05-04 山东科技大学 Temperature control device based on visual identification
CN111368798A (en) * 2020-03-23 2020-07-03 中国农业科学院农业信息研究所 Livestock and poultry activity monitoring method and system
CN111650981A (en) * 2020-06-28 2020-09-11 辽宁邮电规划设计院有限公司 Multi-sensor-based stock raising remote control system and control method
CN111696321A (en) * 2020-06-30 2020-09-22 张祖明 Pigsty gas detection alarm system and method
CN111766827A (en) * 2020-07-09 2020-10-13 霍祥明 Modern pig breeding base real-time monitoring management system based on big data
CN114009365A (en) * 2021-11-19 2022-02-08 深圳市博安智控科技有限公司 Intelligent breeding method, system, equipment and storage medium of Internet of things
CN114199962A (en) * 2021-12-16 2022-03-18 山西农业大学 Harmful gas analysis and monitoring system used in livestock and poultry house
CN114710537A (en) * 2022-03-25 2022-07-05 深圳市朗锐恒科技开发有限公司 Ammonia gas monitoring method and device in farm, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
舍内关键环境因子对畜禽健康影响的研究进展;李春梅;李明阳;沈丹;李延森;韩国锋;;中国家禽(第03期);全文 *
陕西关中地区肉牛舍内外空气质量时空变化观测分析;梅楚刚;高骥威;昝林森;;中国牛业科学(第06期);全文 *

Also Published As

Publication number Publication date
CN115876258A (en) 2023-03-31

Similar Documents

Publication Publication Date Title
CN115876258B (en) Livestock and poultry breeding environment abnormity monitoring and alarming system based on multi-source data
CN110263846B (en) Fault diagnosis method based on fault data deep mining and learning
CN112179691B (en) Mechanical equipment running state abnormity detection system and method based on counterstudy strategy
CN117196353B (en) Environmental pollution assessment and monitoring method and system based on big data
CN110889441A (en) Distance and point density based substation equipment data anomaly identification method
CN114518143A (en) Intelligent environment sensing system
CN115994907B (en) Intelligent processing system and method for comprehensive information of food detection mechanism
CN116843236A (en) Food storage supervision system based on artificial intelligence
CN114580572B (en) Abnormal value identification method and device, electronic equipment and storage medium
CN115575584B (en) Atmospheric environment cadmium content monitoring and early warning method and system
CN111582406A (en) Power equipment state monitoring data clustering method and system
CN112978128A (en) Cold-chain logistics transportation commodity quality monitoring and management system based on big data and image analysis technology
CN116386120A (en) Noninductive monitoring management system
CN115659195A (en) Online atmospheric pollution identification method
CN115586145A (en) Method for monitoring heavy metals in wastewater of ferrous metallurgy industry based on spectrum technology
CN111855946B (en) Water quality analysis method based on fish behavior analysis
CN114358176A (en) Method for controlling quality of original wind power data of wind power station based on LOF algorithm
CN113408383A (en) Audible noise invalid data judgment method based on bounded beta (g, h) distribution and MWKPCA
CN113516091A (en) Method for identifying electric spark image of transformer substation
CN117761263B (en) Formaldehyde gas detection system and method
CN116612820B (en) Dairy product production intelligent management platform based on data analysis
CN116070150B (en) Abnormality monitoring method based on operation parameters of breathing machine
CN116992389B (en) False data detection method and system for Internet of things
CN117589704B (en) Range self-switching control method and system for water quality on-line monitoring
CN118013230A (en) Livestock and poultry water quality abnormality monitoring data processing method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant