Intelligent method and system for monitoring pig behavior abnormality

The disclosure provides an intelligent method and system for monitoring pig behavior abnormality. The method comprises: acquiring an instantaneous acceleration of a pig; calculating an instantaneous acceleration variation according to the instantaneous acceleration; calculating a sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation; calculating a threshold according to historical data; drawing a box diagram according to the sampling characteristic value and the threshold; judging whether the sampling characteristic value exceeds the threshold according to the box diagram; if not, reacquiring the instantaneous acceleration of the pig and calculate the instantaneous acceleration variation; and if so, sending an alarm signal. An alarm signal is sent out after an abnormal behavior is detected by comparing the sampling characteristic value and the threshold, so that the abnormal behavior of the pig can be found in time, and the feeding safety is improved.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of priority to Chinese Patent Application No. 202010101545.7 titled “INTELLIGENT METHOD AND SYSTEM FOR MONITORING PIG BEHAVIOR ABNORMALITY”, filed with the Chinese State Intellectual Property Office on Feb. 19, 2020, the entire disclosure of which is incorporated herein by reference.

TECHNICAL FIELD

The disclosure relates to the field of motion state identification, in particular to an intelligent method and system for monitoring pig behavior abnormality.

BACKGROUND

With a rapid development of China's intelligent agricultural production, National Medium- and Long-term Science and Technology Development Program (2006-2020) has clearly brought a “precise operation and informatization of agriculture” into an optimization subject. Therefore, an establishment of a modern livestock and poultry feeding management system by using big data technology is of great significance to development of China's agricultural modernization and improvement of agricultural competitiveness.

In alive pig feeding process, some abnormal signs appears for an epidemic disease, oestrus and other phenomena of pigs, but the traditional method excessively depends on the long-term feeding experience of feeders. The probability of an abnormal behavior occurring in practical feeding of live pigs is not high, and the abnormal behavior is not easily found by production managers. Therefore, how to realize timely monitoring of the live pig abnormal behavior has become a problem to be settled urgently.

SUMMARY

The disclosure intends to provide an intelligent method and system for monitoring pig behavior abnormality to detect an abnormal behavior of a live pig timely.

In order to achieve the above effect, the disclosure provides the following solutions.

An intelligent method for monitoring pig behavior abnormality comprises:acquiring an instantaneous acceleration of a live pig;calculating an instantaneous acceleration variation according to the instantaneous acceleration;calculating a sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation;calculating a threshold according to historical data;drawing a box diagram according to the sampling characteristic value and the threshold;judging whether the sampling characteristic value exceeds the threshold according to the box diagram;if not, reacquiring the instantaneous acceleration of the live pig, and returning to calculate the instantaneous acceleration variation according to the instantaneous acceleration; andif so, sending an alarm signal to a feeder.

Optionally, the calculating the instantaneous acceleration variation according to the instantaneous acceleration specifically comprises: calculating the instantaneous acceleration variation according to a formula
Δaccx(k)=accx(k)−accx(k−1)
Δaccy(k)=accy(k)−accy(k−1)
Δaccz(k)=accz(k)−accz(k−1);
wherein Δaccx(k), Δaccy(k) and Δaccz(k) are instantaneous acceleration variations in three axial directions respectively, k is the number of sampling points, and accx(k), accy(k) and Δaccz(k) are the instantaneous accelerations in the three axial directions respectively.

Optionally, the calculating the sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation comprises:calculating a first characteristic value according to the instantaneous acceleration variation;calculating a second characteristic value according to the instantaneous acceleration; andcalculating the sampling characteristic value according to the first characteristic value and the second characteristic value.

Optionally, the calculating the first characteristic value according to the instantaneous acceleration variation specifically comprises: calculating the first characteristic value according to a formula
T1(k)=√{square root over (Δaccx(k)2+Δaccy(k)2+Δaccz(k)2)};wherein T1(k) is the first characteristic value.

Optionally, the calculating the second characteristic value according to the instantaneous acceleration comprises:acquiring a standard deviation value of a current sampling point according to the instantaneous acceleration; andcalculating the second characteristic value according to the standard deviation value.

Optionally, the acquiring the standard deviation value of the current sampling point according to the instantaneous acceleration specifically comprises: calculating the standard deviation value of the current sampling point according to a formula
t2[k]=std({tilde over (x)}[k]);wherein t2[k] is the standard deviation value of the current sampling point, {tilde over (x)}[k]=[{right arrow over (x)}[k−N], . . . {right arrow over (x)}[k]], {right arrow over (x)}[k]=(accx(k),accy(k),accz(k)), and N is a set value.

Optionally, the calculating the second characteristic value according to the standard deviation value specifically comprises: calculating the second characteristic value according to a formula T2[k]=SQRT(t2[k]); where T2[k] is the second characteristic value.

Optionally, the calculating the sampling characteristic value according to the first characteristic value and the second characteristic value specifically comprises: calculating the sampling characteristic value according to a formula T[k]=max(T1[k])2.max(T2[k])2; wherein T[k] is the sampling characteristic value.

Optionally, the calculating the threshold according to the historical data specifically comprises:setting a proportion of daily activity data and abnormal activity data in the historical data both to be 50 percent;dividing the historical data into M equal parts to generate M data sets;for each of the data sets: taking the data set as a test set and others as training sets, training a neural network by using the training sets, and testing the trained neural network by using the test set to generate a test value; andaveraging M test values to generate the threshold.

In order to achieve the above effect, the disclosure also provides the following technical solution.

An intelligent system for monitoring pig behavior abnormality comprises:an acquisition unit configured to acquire an instantaneous acceleration of a live pig;an variation calculation unit connected with the acquisition unit and configured to calculate an instantaneous acceleration variation according to the instantaneous acceleration;a sampling characteristic value calculation unit connected with the acquisition unit and the variation calculation unit respectively and configured to calculate a sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation;a threshold calculation unit configured to calculate a threshold according to historical data;a drawing unit connected with the sampling characteristic value calculation unit and the threshold calculation unit respectively and configured to draw a box diagram according to the sampling characteristic value and the threshold;a judgment unit connected with the drawing unit and configured to judge whether the sampling characteristic value exceeds the threshold according to the box diagram;a control unit connected with the judgment unit and the acquisition unit respectively and configured to control the acquisition unit to reacquire the instantaneous acceleration of the live pig when a judgment result from the judgment unit is negative; andan alarm unit connected with the judgment unit and configured to send an alarm signal to a feeder when the judgment result from the judgment unit is positive.

According to the detailed embodiments of the disclosure, the disclosure can achieve following technical effects:

According to the disclosure, the characteristic value of the instantaneous acceleration of the live pig is calculated, the characteristic value is compared with the threshold calculated according to historical data to determine whether the behavior of the live pig is normal or not, and an alarm signal is sent out after the abnormal behavior is detected, so that the abnormal behavior of the live pig can be found in time to improve the feeding safety.

DESCRIPTION OF REFERENCE NUMERALS

1, an acquisition unit;2, a variation calculation unit;3, a sampling characteristic value calculation unit;4, a threshold calculation unit;5, a drawing unit;6, a judgment unit;7, a control unit; and8, an alarm unit.

DETAILED DESCRIPTION

In the following, the technical solutions in the embodiments of the present disclosure will be clearly and completely described with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, but not all the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without any creative efforts shall fall within the scope of the present disclosure.

The disclosure intends to provide an intelligent method and system for monitoring pig behavior abnormality to detect abnormal behaviors of live pigs timely.

For a better understanding of above intention, features and advantages of the present disclosure, the disclosure will be described in details by reference to the accompanying drawings and specific embodiments thereof.

FIG. 1is a flow diagram of the intelligent method for monitoring pig behavior abnormality according to an exemplary embodiment of this disclosure. As shown inFIG. 1, the intelligent method for monitoring pig behavior abnormality comprises steps of:step101: acquiring instantaneous acceleration of a live pig;step102: calculating an instantaneous acceleration variation according to the instantaneous acceleration;step103: calculating a sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation;step104: calculating a threshold according to historical data;step105: drawing a box diagram according to the sampling characteristic value and the threshold;step106: judging whether the sampling characteristic value exceeds the threshold according to the box diagram;if not, reacquiring the instantaneous acceleration of the live pig, and returning to the step102; andif so, sending an alarm signal to a feeder.

The intelligent method for monitoring pig behavior abnormality of the disclosure is performed by calculating the characteristic value of the instantaneous acceleration of the live pig, comparing the characteristic value with the threshold calculated according to historical data to determine whether the behavior of the live pig is normal or abnormal, and sending out an alarm signal when the abnormal behavior is detected, so that the abnormal behavior of the live pig can be found by the feeder in time, and the feeding safety is improved.

The step101can specifically comprises steps of:a first step101substep of arranging an acceleration sensor on the neck of the live pig;a second step101substep of acquiring acquisition data from the acceleration sensor;a third step101substep of carrying out low-pass filtering on the acquisition data to obtain noiseless data; anda fourth step101substep of removing abnormal values in the noiseless data to generate an instantaneous acceleration.

Due to a small motion range of the neck of the live pig, the acceleration sensor can be mounted on the neck of the live pig to effectively reduce the data processing complexity. The accuracy of the data can be effectively improved by noiseless processing and abnormal value removal processing on the acquisition data, so as to increase the reliability of the alarm signal.

The step102can specifically comprises calculating the instantaneous acceleration variation according to a formula
Δaccx(k)=accx(k)−accx(k−1)
Δaccy(k)=accy(k)−accy(k−1)
Δaccz(k)=accz(k)−accz(k−1);
wherein Δaccx(k), Δaccy(k) and Δaccz(k) are instantaneous acceleration variations in three axial directions respectively, k is the number of sampling points, and accx(k), accy(k) and accz(k) are the instantaneous accelerations in the three axial directions respectively.

The instantaneous accelerations of the live pig in three axial directions are collected to truly indicate the motion state of the live pig.

The step103can specifically comprises steps of:a first step103substep of calculating a first characteristic value according to the instantaneous acceleration variation; wherein, the first characteristic value is specifically calculated according to a formula T1(k)=√{square root over (Δaccx(k)2+Δaccy(k)2+Δaccz(k)2)} and T1(k) is the first characteristic value;a second step103substep of calculating a second characteristic value according to the instantaneous acceleration; anda third step103substep of calculating the sampling characteristic value according to the first characteristic value and the second characteristic value, wherein, the sampling characteristic value is specifically calculated according to a formula and T[k]=max(T1[k])2.max(T2[k])2and T[k] is the sampling characteristic value.

The second step103substep can include the step of:acquiring a standard deviation value of a current sampling point according to the instantaneous acceleration; wherein, the standard deviation value of the current sampling point is specifically calculated according to a formula t2[k]=std({tilde over (x)}[k]);wherein t2[k] is the standard deviation value of the current sampling point, {tilde over (x)}[k]=[{right arrow over (x)}[k−N], . . . {right arrow over (x)}[k]], {right arrow over (x)}[k]=(accx(k),accy(k),accz(k)), and N is a set value;

The second step103substep can then further include the step of:calculating the second characteristic value according to the standard deviation value; wherein, the second characteristic value is specifically calculated according to a formula T2[k]=SQRT(t2[k]) and T2[k] is the second characteristic value.

The step104can include steps of:a first step104substep including setting a proportion of daily activity data and abnormal activity data in the historical data both to be 50 percent;a second step104substep of dividing the historical data into M equal parts to generate M data sets;a third step104substep of, for each of the data sets, taking the data set as a test set and others as training sets, training a neural network with the training sets, and testing the trained neural network with the test set to generate a test value; anda fourth step104substep of averaging M test values to generate a threshold.

The following technical effects can be achieved by the present disclosure:the data processing difficulty can be effectively reduced by mounting an acceleration sensor on the neck of a live pig;instantaneous accelerations in three axial directions of the live pig are detected so that the actual motion state of the live pig can be well indicated;during calculating the sampling characteristic value, the maximum value of the first characteristic values and the maximum value of the second characteristic values are multiplied to increase the influence of the micro behavior of the live pig on the sampling characteristic value and improve the monitoring reliability.

In order to achieve above technical effects, the disclosure also provides a technical solution as follows:

An intelligent system for monitoring pig behavior abnormality is shown inFIG. 2. The system, in the exemplary embodiment, includes an acquisition unit1, a variation calculation unit2, a sampling characteristic value calculation unit3, a threshold calculation unit4, a drawing unit5, a judgment unit6, a control unit7, and an alarm unit8.

The acquisition unit1is configured to acquire an instantaneous acceleration of the live pig;the variation calculation unit2is connected with the acquisition unit1and configured to calculate an instantaneous acceleration variation according to the instantaneous acceleration;the sampling characteristic value calculation unit3is connected with the acquisition unit1and the variation calculation unit2respectively and configured to calculate a sampling characteristic value according to the instantaneous acceleration and the instantaneous acceleration variation;the threshold calculation unit4is configured to calculate a threshold according to historical data;the drawing unit5is connected with the sampling characteristic value calculation unit3and the threshold calculation unit4respectively and configured to draw a box diagram according to the sampling characteristic value and the threshold;the judgment unit6is connected with the drawing unit5and configured to judge whether the sampling characteristic value exceeds the threshold according to the box diagram;the control unit7is connected with the judgment unit6and the acquisition unit1respectively and configured to control the acquisition unit1to reacquire the instantaneous acceleration of the live pig when a judgment result from the judgment unit6is negative; andthe alarm unit8is connected with the judgment unit6and configured to send an alarm signal to a feeder when the judgment result from the judgment unit6is positive.compared with the conventional technology, the intelligent system for monitoring pig behavior abnormality has the same beneficial effects as the intelligent method for monitoring pig behavior abnormality, which will not be described in details.

Various embodiments of the description have been described in a progressive way, each of which emphasizes the difference from the others, and among which the same and similar parts can be referred to each other.