CN116071783A - Sheep reproductive health early warning system and method - Google Patents

Sheep reproductive health early warning system and method Download PDF

Info

Publication number
CN116071783A
CN116071783A CN202310106924.9A CN202310106924A CN116071783A CN 116071783 A CN116071783 A CN 116071783A CN 202310106924 A CN202310106924 A CN 202310106924A CN 116071783 A CN116071783 A CN 116071783A
Authority
CN
China
Prior art keywords
behavior
data
ewe
acceleration
value
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.)
Pending
Application number
CN202310106924.9A
Other languages
Chinese (zh)
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.)
Guizhou Giles Circular Agriculture Co ltd
Original Assignee
Guizhou Giles Circular Agriculture 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 Guizhou Giles Circular Agriculture Co ltd filed Critical Guizhou Giles Circular Agriculture Co ltd
Priority to CN202310106924.9A priority Critical patent/CN116071783A/en
Publication of CN116071783A publication Critical patent/CN116071783A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61DVETERINARY INSTRUMENTS, IMPLEMENTS, TOOLS, OR METHODS
    • A61D17/00Devices for indicating trouble during labour of animals ; Methods or instruments for detecting pregnancy-related states of animals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands

Abstract

The invention discloses a sheep reproduction health early warning system and a method, which are used for acquiring triaxial acceleration data of a ewe to obtain behavior data of the ewe, preprocessing the behavior data to obtain pre-production behavior information of the ewe, extracting characteristics of the behavior information to obtain characteristic values, identifying pre-production movement behaviors of the ewe according to the characteristic values to obtain sample behavior data, inputting the sample behavior data into a trained long-short-period memory network LSTM for training so as to classify the pre-production behaviors of the ewe to obtain classification results, carrying out sheep reproduction health early warning according to the classification results, describing the effects of a plurality of characteristics on the pre-production behavior identification of the ewe and the effects of the behavior identification, realizing accurate, stable and efficient long-distance transmission of the pre-production behavior data of the ewe, and transmitting the acquired data into a computer through wireless data for data processing, so that the accuracy of real-time processing and health early warning of the behavior data can be improved.

Description

Sheep reproductive health early warning system and method
Technical Field
The invention belongs to the technical field of livestock health management, and particularly relates to a sheep reproduction health early warning system and method.
Background
The growth and health status of animals can be reflected by their behavior, so that the monitoring data of their behavior during early warning and diagnosis of livestock diseases become the main data source. The ewes before delivery are easily affected by external environment to cause abortion, and the ewes with multiple delivery can be paralysed and other diseases due to the inadequacy of application and unknowingly supplemented, and the health of the ewes can be affected by any condition, the life of the ewes can be seriously endangered, and the sick manifestations of the ewes before delivery are mostly abnormal behaviors, unstable gait, unwilling to walk and the like. The timely and accurate detection of the disease condition of the prenatal ewe has important practical significance for improving the breeding efficiency of the ewe and improving the economic benefit of a feeder, so that the prenatal ewe disease needs to be warned very much.
Disclosure of Invention
In view of the above, the invention provides a sheep reproduction health early warning system and a method for constructing a data model corresponding to four typical behavior features occurring in a prenatal movement process of a ewe and improving the accuracy of classification results of the prenatal behavior features of the ewe, so as to solve the technical problems, and the invention is realized by adopting the following technical scheme.
In a first aspect, the present invention provides a sheep reproductive health warning system, comprising:
the data acquisition unit is used for acquiring triaxial acceleration data of the ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
the characteristic extraction unit is used for extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data are selected, namely, the variances of three axial data of x, y and z, the frequency domain characteristic is the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are counted;
the behavior recognition unit is used for recognizing the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and the prenatal exercise behaviors of the ewes are recognized by adopting a clustering algorithm and a neural network classification algorithm;
and the early warning unit is used for inputting the sample behavior data into a trained long-short-period memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
As a further improvement of the above technical solution, inputting the sample behavior data into a trained long-short-term memory network LSTM for training to classify the pre-partum behavior of the ewe to obtain a classification result, including:
the J epsilon {1, 2..J } is adopted as all the key feature points of the movement behaviors in a certain window, the number of windows represented by a certain movement behavior is represented by T epsilon {1, 2..T }, each LSTM finishes the data input, the analysis result of the movement behavior feature points of the same category output in the previous window and the output result of the adjacent movement nodes in the current time range are subjected to the data input, and the data are output to the next movement behavior feature representation window and the adjacent movement behavior feature points through the LSTM, wherein the corresponding expression is h j,t =f(x j,t h j-1,t ,h j,t-1 ) The operational procedure of LSTM is represented by a function f;
with two forgetting doors
Figure BDA0004075466490000021
Wherein->
Figure BDA0004075466490000022
Representing in space and space characteristics, forgetting gate represents whether the internal behavior feature change unit can generate data forgetting calculation in the LSTM calculation process, namely, obtaining behaviors in the last hierarchy within a certain probability rangeThe change result of the feature;
the expression of the input gate is i j,t =σ(W f *[h j,t-1 ,h j-1,t ,X j,t ]+b i ) The input gate completes the integration processing of the input data in the algorithm structure, and the input data comprises the behavior change characteristics of the ewe in the previous time range, the motion behavior characteristic points in the current time range and the position coordinates of the motion behavior occurrence points of the ewe in the current time period.
As a further improvement of the technical scheme, the expression for updating the movement behavior characteristic state of the ewe is that
Figure BDA0004075466490000031
Wherein the current state of the athletic performance characteristic in the LSTM is represented by C j,t To show that the two forgetting doors can jointly realize the control of the movement behavior characteristic state;
the output gate is calculated by the following relation o j,t =σ(W o *[h j,t-1 ,h j-1,t ,X j,t ]+b o ) The output gate can realize the processing of the data to be output, and the output gate is represented by the following relation
Figure BDA0004075466490000032
After the correlation operation on the LSTM node is completed, the result is output to the output layer and the next time space iteration.
As a further improvement of the technical scheme, the identification of the prenatal exercise behavior of the ewes according to the characteristic values to obtain sample behavior data comprises the following steps:
preset training sample set d= { (x) i ,y i ) I=1, 2..n }, where x is i ∈R n Represents the ith feature vector, R n Representing sample space, y i E { -1,1} represents two classes of class labels, n represents the lumped number of samples, and the hyperplane can be classified by a classification function f (x) =ω T x+b, where ω represents the hyperplane direction parameter, b represents the dividing hyperplay parameter, T represents the transpose of the vector, when f (x) =0X is the point on the hyperplane;
maximizing the geometric interval of all support vectors to obtain a maximum interval classifier, namely, a basic expression of SVM, as follows
Figure BDA0004075466490000033
The expression obtained by using Lagrangian multiplier method and converting is
Figure BDA0004075466490000034
Wherein alpha is i Representing the lagrangian multiplier added by the ith constraint condition, alpha represents a set of n lagrangian multipliers, and L (ω, b, a) represents the resulting lagrangian function;
solving the minimum value of L (omega, b, alpha) to omega, b, then solving the maximum value to alpha, and finally converting into
Figure BDA0004075466490000041
Where i, j denote the numbers of any two samples.
As a further improvement of the technical scheme, the three-axis acceleration data is mapped into a high-dimensional space by adopting a Gaussian kernel function, so that the three-axis acceleration data becomes linearly separable, and the Gaussian kernel function has the expression of
Figure BDA0004075466490000042
Wherein the method comprises the steps of ||x i -x j And I represents the mode of any two input vectors, sigma represents the nuclear parameter of a Gaussian kernel function, then three classifiers are built by combining drinking, feeding and ruminating in pairs by adopting a one-to-one method, finally a test sample is sequentially input into the three classifiers and voted, and the result output by the classifier with the largest number of votes is used as a final behavior classification result.
As a further improvement of the technical scheme, the feature extraction of the behavior information to obtain the feature value comprises the following steps:
the expression for extracting the time domain characteristic root mean square value from the sensor signal of the ewe behavior recognition is
Figure BDA0004075466490000043
Wherein N represents the number of behavior recognition samples, V i A sensor acceleration value representing the instant i;
training a prediction model of acceleration coordinate difference value and corresponding RMS of behavior recognized by the ewe based on LSTM, calculating various parameters through a front-back time sequence relation of the acceleration coordinate recognized by the actual ewe behavior mapped with the RMS value in a training set and the predicted coordinate difference value, comprehensively considering estimated values and observed values of two adjacent moments, realizing updating of state variables, and estimating current requirements;
after the LSTM model is trained, the acceleration coordinate difference value can be predicted by introducing a prediction set RMS, the coordinate value is subjected to reverse-push prediction, and finally the visual prediction of the behavior acceleration data of the ewe is realized.
As a further improvement of the above solution, the prediction of the acceleration coordinate difference may be achieved by introducing a prediction set RMS, including:
input model trained acceleration signal eigenvalue RMS i X, Y and coordinate value x in Z direction i 、y i And z i ,i=1,2...n;
The output includes process excitation noise covariance Q, observation noise covariance R, and parameter state transition matrix A, and M x 、M y M is as follows z A three-axis coordinate difference prediction model;
based on the original signal, respectively for the original coordinate value x i 、y i And z i Calculating the time domain feature RMS of acceleration i Calculation is performed, i=1, 2..n;
in the front and rear time, the expression for calculating the coordinate value is
Figure BDA0004075466490000051
i=1, 2..n, the construction of a deep LSTM network is completed, in which the input and target output are respectively represented by RMS i Δx i And Deltay i Acting as, in two coordinate directions, by correlation trainingImplementing construction of predictive models, i.e. Mx (RMS) i ) And My (RMS) i );
The calculated parameters A, Q and R are respectively
Figure BDA0004075466490000052
Then
Figure BDA0004075466490000053
Wherein DeltaX i =[Δx 1 ,Δx 2 ...Δx i ],ΔY i =[Δy 1 ,Δy 2 ...Δy i ],ΔZ i =[Δz 1 ,Δz 2 ...Δz i ],F BiLinear Representing a binary linear regression function for calculating the correlation coefficients and residuals of the x, y, z coordinates of the previous moment and the x, y, z coordinates of the next moment as
Figure BDA0004075466490000054
Wherein a is 1 、a 2 、a 3 、b 1 、b 2 、b 3 、c 1 、c 2 And c 3 Representing the correlation coefficient, u i And v i Residual error, thereby determining->
Figure BDA0004075466490000055
Figure BDA0004075466490000056
And a= cov (β xyz ) Two LSTM models are used to build a nonlinear observation model, namely
Figure BDA0004075466490000061
Wherein μ' i 、v′ i And omega' i The residual is represented, and the observation noise R is obtained.
As a further improvement of the technical scheme, the method for acquiring the triaxial acceleration data of the ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain the prenatal behavior information of the ewe comprises the following steps:
triaxial acceleration of ewes during static periodAcquiring the degree data, calculating a trigonometric function value sin alpha sin theta cos alpha cos theta of alpha theta according to space geometric knowledge, and presetting three axis measurement values of an acceleration sensor to be alpha when in rest 1x 、α 1y And alpha 1z Then
Figure BDA0004075466490000062
Wherein A is x 、A y And A z Representing the actual triaxial acceleration value, A x Indicating the acceleration value of the horizontal forward direction gravity acceleration direction A y Indicating the acceleration value in the left-right direction, A z Representing the acceleration value in the vertical direction, and the measured values of the acceleration sensor in three directions are respectively alpha x 、α y And alpha z Can be calculated from the tilt angle and the measured value
Figure BDA0004075466490000063
And respectively calculating acceleration values in the horizontal direction, the front-rear direction and the vertical direction to obtain the acceleration data in the three corrected directions.
As a further improvement of the technical scheme, the feature dimension reduction optimization recognition process comprises the following steps:
presetting the high-dimensional matrix as { X } 1 ,X 2 ...X N Computing the average vector of the high-dimensional matrix
Figure BDA0004075466490000064
The expression is
Figure BDA0004075466490000065
The covariance matrix Var (X) of the high-dimensional matrix X is calculated by using the average vector as the expression
Figure BDA0004075466490000066
To determine the eigenvector U of the covariance matrix Var (X) i And a characteristic value lambda i N eigenvalues are arranged in descending order, namely lambda 123 ...>λ kk+1 >...>λ k Presetting lambda 1k Corresponding toThe k eigenvectors of (a) constitute a principal component matrix, and the variation matrix is U= { U 1 ,U 2 ,U 3 ...U k Then the expression of principal component matrix Y is y=u T X, the size of k is adjusted to adjust the dimension of the principal component matrix, i.e., to adjust the reduced dimension.
In a second aspect, the invention also provides a sheep reproduction health early warning method, which comprises the following steps:
acquiring triaxial acceleration data of a ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data, namely variances of three axial data of x, y and z, are selected, and frequency domain characteristics are taken to be the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are totally selected;
identifying the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and identifying the prenatal exercise behaviors of the ewes by adopting a clustering algorithm and a neural network classification algorithm;
and inputting the sample behavior data into a trained long-short-term memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
The invention provides a sheep reproduction health early warning system and method, which are characterized in that behavior data of a ewe are obtained by collecting triaxial acceleration data of the ewe, the behavior data are preprocessed to obtain behavior information before the ewe is produced, characteristic values are obtained by characteristic extraction of the behavior information, the behavior data before the ewe is produced are identified according to the characteristic values to obtain sample behavior data, the sample behavior data are input into a trained long-short-period memory network LSTM for training to classify the behavior before the ewe to obtain classification results, sheep reproduction health early warning is carried out according to the classification results, characteristic extraction is carried out on the denoised acceleration data, and a plurality of acceleration characteristics representing the behavior of the ewe such as variance, mean value, extremum and the like are introduced and analyzed, so that the effects of the characteristics on the behavior recognition before the ewe can be described, the behavior recognition effect is realized, the accurate, stable and efficient long-distance transmission of the behavior data before the ewe is realized, the collected data are transmitted into a computer through wireless data for data processing, and the real-time processing and the health early warning of the behavior data can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of a sheep reproductive health warning system provided by the invention;
fig. 2 is a flow chart of the sheep reproduction health early warning method provided by the invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
Referring to fig. 1, the invention provides a sheep reproduction health early warning system, comprising:
the data acquisition unit is used for acquiring triaxial acceleration data of the ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
the characteristic extraction unit is used for extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data are selected, namely, the variances of three axial data of x, y and z, the frequency domain characteristic is the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are counted;
the behavior recognition unit is used for recognizing the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and the prenatal exercise behaviors of the ewes are recognized by adopting a clustering algorithm and a neural network classification algorithm;
and the early warning unit is used for inputting the sample behavior data into a trained long-short-period memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
In this embodiment, inputting the sample behavior data into a trained long-short-term memory network LSTM for training to classify the pre-partum behavior of the ewe to obtain a classification result, including: the J epsilon {1, 2..J } is adopted as all the key feature points of the movement behaviors in a certain window, the number of windows represented by a certain movement behavior is represented by T epsilon {1, 2..T }, each LSTM finishes the data input, the analysis result of the movement behavior feature points of the same category output in the previous window and the output result of the adjacent movement nodes in the current time range are subjected to the data input, and the data are output to the next movement behavior feature representation window and the adjacent movement behavior feature points through the LSTM, wherein the corresponding expression is h j,t =f(x j,t h j-1,t ,h j,t-1 ) The operational procedure of LSTM is represented by a function f; with two forgetting doors
Figure BDA0004075466490000091
Wherein->
Figure BDA0004075466490000092
Representing in space and spatial characteristics, forgetting gate representing whether or not data loss occurs in the internal behavior feature change unit in LSTM calculation processForgetting to calculate, namely obtaining a change result of the behavior characteristic in the last level within a certain probability range; the expression of the input gate is i j,t =σ(W f *[h j,t-1 ,h j-1,t ,X j,t ]+b i ) The input gate completes the integration processing of the input data in the algorithm structure, and the input data comprises the behavior change characteristics of the ewe in the previous time range, the motion behavior characteristic points in the current time range and the position coordinates of the motion behavior occurrence points of the ewe in the current time period.
It should be noted that, the expression for updating the athletic performance characteristic state of the ewe is that
Figure BDA0004075466490000093
Wherein the current state of the athletic performance characteristic in the LSTM is represented by C j,t To show that the two forgetting doors can jointly realize the control of the movement behavior characteristic state; the output gate is calculated by the following relation o j,t =σ(W o *[h j,t-1 ,h j-1,t ,X j,t ]+b o ) The output gate can realize the processing of the data to be output, and the output gate is expressed by the following relation>
Figure BDA0004075466490000101
After the correlation operation on the LSTM node is completed, the result is output to the output layer and the next time space iteration.
It is understood that the motion information of the ewes is collected through the nine-axis attitude sensor in the data collection part, and the data is uploaded to the cloud server through Bluetooth and WIFI. After data acquisition, denoising the acquired attitude data by adopting a wavelet threshold method. And introducing the motion characteristics of the ewes represented by multiple dimensions such as acceleration, angular speed and the like in the behavior characteristic extraction part to complete the gesture analysis of the ewe motion process. Before classifying the pre-natal behaviors of the ewes, the sensor signals of the movement behaviors of the ewes are collected in a concentrated mode, and preprocessing of behavior feature extraction is carried out. The behavior of lying in the ewe is approximately reflected in sleep and rest, and the behavior is in a lying-prone position, and the breastbone and breasts of the ewe are in contact with the ground. The ewes mostly maintain a static or slightly swaying posture in standing behaviors, and four limbs of the ewes are contacted with the ground to maintain the body standing. The body balance was maintained by two legs at all time points when half-strides were produced in the ewe walking behavior, which was a pile-up behavior, gauge, and slow. The ewe developed this action by planing or scraping the ground through the front hoof. In the preprocessing process of the collected data of the sensors, the extraction of the behavior characteristics is very important for the subsequent behavior classification process of the ewes, the prenatal movement behavior characteristics of the ewes cannot be directly represented after the preprocessing operation is carried out on the original signal data, and the characteristic values of the behaviors of lying me, standing, walking and spectral planing of the ewes are required to be extracted and analyzed. The collected original sensor data information has a plurality of gravity acceleration components and a plurality of sharp noise interferences, and the noise reduction processing is carried out on the collected original acceleration data, so that relatively pure noise-interference-free acceleration data can be obtained. The characteristics of the denoised acceleration data are extracted, a plurality of acceleration characteristics representing the behavior of the ewe, such as variance, mean value, extremum difference and the like, are introduced and analyzed, the effects of the characteristics on the behavior recognition before the delivery of the ewe are described, the accurate, stable and efficient long-distance transmission of the behavior data before the delivery of the ewe is realized, the acquired data are transmitted into a computer through wireless data for data processing, and the accuracy of real-time processing and health early warning of the behavior data can be improved.
Optionally, identifying the prenatal exercise behavior of the ewe according to the feature value to obtain sample behavior data, including:
preset training sample set d= { (x) i ,y i ) I=1, 2..n }, where x is i ∈R n Represents the ith feature vector, R n Representing sample space, y i E { -1,1} represents two classes of class labels, n represents the lumped number of samples, and the hyperplane can be classified by a classification function f (x) =ω T x+b, where ω represents the hyperplane direction parameter, b represents the partitioning hyperplay parameter, T represents the transpose of the vector, when f (x) =0When x is a point on the hyperplane;
maximizing the geometric interval of all support vectors to obtain a maximum interval classifier, namely, a basic expression of SVM, as follows
Figure BDA0004075466490000111
The expression obtained by using Lagrangian multiplier method and converting is
Figure BDA0004075466490000112
Wherein alpha is i Representing the lagrangian multiplier added by the ith constraint condition, alpha represents a set of n lagrangian multipliers, and L (ω, b, a) represents the resulting lagrangian function;
solving the minimum value of L (omega, b, alpha) to omega, b, then solving the maximum value to alpha, and finally converting into
Figure BDA0004075466490000113
Where i, j denote the numbers of any two samples.
In this embodiment, the three-axis acceleration data is mapped into the high-dimensional space by using a gaussian kernel function, so that the three-axis acceleration data becomes linearly separable, and the gaussian kernel function has the expression of
Figure BDA0004075466490000114
Wherein the method comprises the steps of ||x i -x j And I represents the mode of any two input vectors, sigma represents the nuclear parameter of a Gaussian kernel function, then three classifiers are built by combining drinking, feeding and ruminating in pairs by adopting a one-to-one method, finally a test sample is sequentially input into the three classifiers and voted, and the result output by the classifier with the largest number of votes is used as a final behavior classification result.
It should be noted that, performing feature extraction on the behavior information to obtain a feature value includes: the expression for extracting the time domain characteristic root mean square value from the sensor signal of the ewe behavior recognition is
Figure BDA0004075466490000121
Wherein N represents the number of behavior recognition samples, V i A sensor acceleration value representing the instant i; training a prediction model of acceleration coordinate difference value and corresponding RMS of behavior recognized by the ewe based on LSTM, calculating various parameters through a front-back time sequence relation of the acceleration coordinate recognized by the actual ewe behavior mapped with the RMS value in a training set and the predicted coordinate difference value, comprehensively considering estimated values and observed values of two adjacent moments, realizing updating of state variables, and estimating current requirements; after the LSTM model is trained, the acceleration coordinate difference value can be predicted by introducing a prediction set RMS, the coordinate value is reversely predicted, the visual prediction of the behavior acceleration data of the ewe is finally realized, and the accuracy of the sheep reproduction health early warning and the stability of the system work are improved.
Alternatively, the prediction of the acceleration coordinate difference may be achieved by the introduction of a prediction set RMS, comprising:
input model trained acceleration signal eigenvalue RMS i X, Y and coordinate value x in Z direction i 、y i And z i ,i=1,2...n;
The output includes process excitation noise covariance Q, observation noise covariance R, and parameter state transition matrix A, and M x 、M y M is as follows z A three-axis coordinate difference prediction model;
based on the original signal, respectively for the original coordinate value x i 、y i And z i Calculating the time domain feature RMS of acceleration i Calculation is performed, i=1, 2..n;
in the front and rear time, the expression for calculating the coordinate value is
Figure BDA0004075466490000122
i=1, 2..n, the construction of a deep LSTM network is completed, in which the input and target output are respectively represented by RMS i Δx i And Deltay i Acting as a model for constructing prediction by correlation training in two coordinate directions, i.e. Mx (RMS) i ) And My (RMS) i );
The calculated parameters A, Q and R are respectively
Figure BDA0004075466490000123
Then
Figure BDA0004075466490000131
Wherein DeltaX i =[Δx 1 ,Δx 2 ...Δx i ],ΔY i =[Δy 1 ,Δy 2 ...Δy i ],ΔZ i =[Δz 1 ,Δz 2 ...Δz i ],F BiLinear Representing a binary linear regression function for calculating the correlation coefficients and residuals of the x, y, z coordinates of the previous moment and the x, y, z coordinates of the next moment as
Figure BDA0004075466490000132
Wherein a is 1 、a 2 、a 3 、b 1 、b 2 、b 3 、c 1 、c 2 And c 3 Representing the correlation coefficient, u i And v i Residual error, thereby determining->
Figure BDA0004075466490000133
Figure BDA0004075466490000134
And a= cov (β xyz ) Two LSTM models are used to build a nonlinear observation model, namely
Figure BDA0004075466490000135
Wherein μ' i 、v′ i And omega' i The residual is represented, and the observation noise R is obtained.
In this embodiment, collecting triaxial acceleration data of a ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, including: collecting triaxial acceleration data of a ewe when the ewe is stationary, calculating trigonometric function values sin alpha sin theta cos alpha cos theta of alpha and theta according to space geometric knowledge, and presetting three axis measurement values of an acceleration sensor when the ewe is stationary as alpha 1x 、α 1y And alpha 1z Then
Figure BDA0004075466490000136
Wherein A is x 、A y And A z Representing the actual triaxial acceleration value, A x Indicating the acceleration value of the horizontal forward direction gravity acceleration direction A y Indicating the acceleration value in the left-right direction, A z Representing the acceleration value in the vertical direction, and the measured values of the acceleration sensor in three directions are respectively alpha x 、α y And alpha z From the tilt angle and the measured value, it is calculated +.>
Figure BDA0004075466490000141
And respectively calculating acceleration values in the horizontal direction, the front-rear direction and the vertical direction to obtain the acceleration data in the three corrected directions.
It should be noted that, the feature dimension reduction optimizing and identifying process includes: presetting the high-dimensional matrix as { X } 1 ,X 2 ...X N Computing the average vector of the high-dimensional matrix
Figure BDA0004075466490000142
The expression is +.>
Figure BDA0004075466490000143
The expression of covariance matrix Var (X) for calculating high-dimensional matrix X using average vector is +.>
Figure BDA0004075466490000144
Figure BDA0004075466490000145
To determine the eigenvector U of the covariance matrix Var (X) i And a characteristic value lambda i N eigenvalues are arranged in descending order, namely lambda 123 ...>λ kk+1 >...>λ N Presetting lambda 1k The corresponding k eigenvectors form a principal component matrix, and the formed change matrix is U= { U 1 ,U 2 ,U 3 ...U k Then the expression of principal component matrix Y is y=u T And X, the size of k is adjusted to adjust the dimension of the principal component matrix, namely the reduced dimension, so that the working efficiency of data processing is improved.
Referring to fig. 2, the invention also provides a sheep reproduction health early warning method, which comprises the following steps:
s1: acquiring triaxial acceleration data of a ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
s2: extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data, namely variances of three axial data of x, y and z, are selected, and frequency domain characteristics are taken to be the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are totally selected;
s3: identifying the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and identifying the prenatal exercise behaviors of the ewes by adopting a clustering algorithm and a neural network classification algorithm;
s4: and inputting the sample behavior data into a trained long-short-term memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
In this embodiment, the neural network has a strong learning capability under the condition of distinguishing nonlinear separable, and is mainly characterized by the capability of autonomous learning of complex mapping, and can extract a group of nonlinear feature sets for recognition and classification. The neural network classifier has good fault tolerance to the processing process of external signals, has strong self-adaptive capacity, is easy to calculate in parallel and program calculation of software and hardware, and is very suitable for identifying the motion behavior based on the acceleration sensor. The identification of the prenatal exercise behavior of the ewe is respectively four behaviors of walking, standing, lying prone and planing, and because the same exercise mode is adopted between different behaviors, such as standing and lying prone, the ewe can be set to be static although the states of the two behaviors are different. The data sampling rate and the insensitivity of the data errors are adopted, the behavior of the female sheep such as pre-partum walking, standing, lying and planing is identified by combining a neural network classification algorithm, namely, the static behavior of the female sheep is classified by the clustering algorithm, the lying behavior of the female sheep is accurately distinguished and classified from the other three behaviors, and the three behaviors such as pre-partum standing, walking and planing are further identified by adopting the neural network classification algorithm on the basis. The generalization capability of the algorithm is improved, and the recognition rate of the algorithm to the prenatal exercise behaviors of the ewes is also improved.
Any particular values in all examples shown and described herein are to be construed as merely illustrative and not a limitation, and thus other examples of exemplary embodiments may have different values.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The above examples merely represent a few embodiments of the present invention, which are described in more detail and are not to be construed as limiting the scope of the present invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention.

Claims (10)

1. Sheep reproduction health early warning system, characterized by, include:
the data acquisition unit is used for acquiring triaxial acceleration data of the ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
the characteristic extraction unit is used for extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data are selected, namely, the variances of three axial data of x, y and z, the frequency domain characteristic is the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are counted;
the behavior recognition unit is used for recognizing the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and the prenatal exercise behaviors of the ewes are recognized by adopting a clustering algorithm and a neural network classification algorithm;
and the early warning unit is used for inputting the sample behavior data into a trained long-short-period memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
2. The sheep reproductive health warning system of claim 1, wherein inputting the sample behavioral data into a trained long-short term memory network LSTM for training to classify the pre-natal behaviors of the ewe to obtain classification results, comprises:
the J epsilon {1, 2..J } is adopted as all the key feature points of the movement behaviors in a certain window, the number of windows represented by a certain movement behavior is represented by T epsilon {1, 2..T }, each LSTM finishes the data input, the analysis result of the movement behavior feature points of the same category output in the previous window and the output result of the adjacent movement nodes in the current time range are subjected to the data input, and the data are output to the next movement behavior feature representation window and the adjacent movement behavior feature points through the LSTM, wherein the corresponding expression is h j,t =f(x j,t h j-1,t ,h j,t-1 ) The operational procedure of LSTM is represented by a function f;
with two forgetting doors
Figure FDA0004075466480000011
Wherein->
Figure FDA0004075466480000012
The forgetting gate indicates whether the internal behavior feature change unit can generate data forgetting calculation in the LSTM calculation process in the space and space characteristics, namely, the change result generated by the behavior feature obtained in the last layer in a certain probability range;
the expression of the input gate is i j,t =σ(W f *[h j,t-1 ,h j-1,t ,X j,t ]+b i ) The input gate completes the integration processing of the input data in the algorithm structure, and the input data comprises the behavior change characteristics of the ewe in the previous time range, the motion behavior characteristic points in the current time range and the position coordinates of the motion behavior occurrence points of the ewe in the current time period.
3. The sheep reproductive health warning system of claim 2, further comprising:
the expression for updating the motion behavior characteristic state of the ewe is
Figure FDA0004075466480000021
Wherein the current state of the athletic performance characteristic in the LSTM is represented by C j,t To show that the two forgetting doors can jointly realize the control of the movement behavior characteristic state;
the output gate is calculated by the following relation o j,t =σ(W o *[h j,t-1 ,h j-1,t ,X j,t ]+b o ) The output gate can realize the processing of the data to be output, and the output gate is represented by the following relation
Figure FDA0004075466480000022
After the correlation operation on the LSTM node is completed, the result is output to the output layer and the next time space iteration. />
4. The sheep reproduction health warning system according to claim 1, wherein the identifying the prenatal exercise behavior of the ewe according to the characteristic values to obtain sample behavior data comprises:
preset training sample set d= { (x) i ,y i ) I=1, 2..n }, where x is i ∈R n Represents the ith feature vector, R n Representing sample space, y i E { -1,1} represents two classes of class labels, n represents the lumped number of samples, and the hyperplane can be classified by a classification function f (x) =ω T x+b, where ω represents a hyperplane direction parameter, b represents a dividing hyperplane direction parameter, T represents a transpose of the vector, and when f (x) =0, x is a point on the hyperplane;
maximizing the geometric interval of all support vectors to obtain a maximum interval classifier, namely, a basic expression of SVM, as follows
Figure FDA0004075466480000031
The expression obtained by using Lagrangian multiplier method and converting is
Figure FDA0004075466480000032
Wherein alpha is i Representing the lagrangian multiplier added by the ith constraint condition, alpha represents a set of n lagrangian multipliers, and L (ω, b, a) represents the resulting lagrangian function;
solving the minimum value of L (omega, b, alpha) to omega, b, then solving the maximum value to alpha, and finally converting into
Figure FDA0004075466480000033
Where i, j denote the numbers of any two samples.
5. The sheep reproductive health warning system of claim 4, wherein the three-axis acceleration data is mapped into a high-dimensional space using a gaussian kernel function that is expressed as
Figure FDA0004075466480000034
Wherein the method comprises the steps of ||x i -x j I represents the modulus of any two input vectors, σ represents the gaussian kernelAnd (3) the nuclear parameters of the function are combined in pairs by adopting a one-to-one method for three behaviors of drinking water, feeding and rumination to build three classifiers altogether, finally, the test sample is sequentially input into the three classifiers and votes are carried out, and the result output by the classifier with the largest number of votes is taken as the final behavior classification result.
6. The sheep reproduction health warning system according to claim 1, wherein the feature extraction of the behavior information to obtain a feature value includes:
the expression for extracting the time domain characteristic root mean square value from the sensor signal of the ewe behavior recognition is
Figure FDA0004075466480000035
Wherein N represents the number of behavior recognition samples, V i A sensor acceleration value representing the instant i;
training a prediction model of acceleration coordinate difference value and corresponding RMS of behavior recognized by the ewe based on LSTM, calculating various parameters through a front-back time sequence relation of the acceleration coordinate recognized by the actual ewe behavior mapped with the RMS value in a training set and the predicted coordinate difference value, comprehensively considering estimated values and observed values of two adjacent moments, realizing updating of state variables, and estimating current requirements;
after the LSTM model is trained, the acceleration coordinate difference value can be predicted by introducing a prediction set RMS, the coordinate value is subjected to reverse-push prediction, and finally the visual prediction of the behavior acceleration data of the ewe is realized.
7. The sheep reproduction health warning system of claim 6, wherein the prediction of the acceleration coordinate difference is achieved by the introduction of a prediction set RMS, comprising:
input model trained acceleration signal eigenvalue RMS i X, Y and coordinate value x in Z direction i 、y i And z i ,i=1,2...n;
The output includes process excitation noise covarianceQ, observed noise covariance R, and parameter state transition matrix A, and also includes M x 、M y M is as follows z A three-axis coordinate difference prediction model;
based on the original signal, respectively for the original coordinate value x i 、y i And z i Calculating the time domain feature RMS of acceleration i Calculation is performed, i=1, 2..n;
in the front and rear time, the expression for calculating the coordinate value is
Figure FDA0004075466480000041
Figure FDA0004075466480000042
The construction of a deep LSTM network is completed, in which the input and the target output are respectively controlled by RMS i Δx i And Deltay i Acting as a model for constructing prediction by correlation training in two coordinate directions, i.e. Mx (RMS) i ) And My (RMS) i );
The calculated parameters A, Q and R are respectively
Figure FDA0004075466480000043
Then
Figure FDA0004075466480000044
Wherein DeltaX i =[Δx 1, Δx 2 ...Δx i ],ΔY i =[Δy 1 ,Δy 2 ...Δy i ],ΔZ i =[Δz 1 ,Δz 2 ...Δz i ],F BiLinear Representing a binary linear regression function for calculating the correlation coefficients and residuals of the x, y, z coordinates of the previous moment and the x, y, z coordinates of the next moment as
Figure FDA0004075466480000051
Wherein a is 1 、a 2 、a 3 、b 1 、b 2 、b 3 、c 1 、c 2 And c 3 Representing the correlation coefficient, u i And v i Residual error, thereby determining->
Figure FDA0004075466480000052
Figure FDA0004075466480000053
And a= cov (β xyz ) Two LSTM models are used to build a nonlinear observation model, namely
Figure FDA0004075466480000054
Wherein μ' i 、v′ i And omega' i The residual is represented, and the observation noise R is obtained.
8. The sheep reproductive health warning system of claim 1, wherein collecting triaxial acceleration data of a ewe to obtain behavioral data of the ewe, and preprocessing the behavioral data to obtain pre-natal behavioral information of the ewe, comprises:
collecting triaxial acceleration data of a ewe when the ewe is stationary, calculating trigonometric function values sin alpha sin theta cos alpha cos theta of alpha and theta according to space geometric knowledge, and presetting three axis measurement values of an acceleration sensor when the ewe is stationary as alpha 1x 、α 1y And alpha 1z Then
Figure FDA0004075466480000055
Wherein A is x 、A y And A z Representing the actual triaxial acceleration value, A x Indicating the acceleration value of the horizontal forward direction gravity acceleration direction A y Indicating the acceleration value in the left-right direction, A z Representing the acceleration value in the vertical direction, and the measured values of the acceleration sensor in three directions are respectively alpha x 、α y And alpha z Can be calculated from the tilt angle and the measured value
Figure FDA0004075466480000056
Respectively calculate the horizontal direction, the front-back directionAnd the acceleration value in the vertical direction, namely obtaining the acceleration data in the three corrected directions.
9. The sheep reproductive health warning system of claim 8, wherein employing a feature dimension reduction optimization recognition process comprises:
presetting the high-dimensional matrix as { X } 1 ,X 2 ...X N Computing the average vector of the high-dimensional matrix
Figure FDA0004075466480000061
The expression is
Figure FDA0004075466480000062
The covariance matrix Var (X) of the high-dimensional matrix X is calculated by using the average vector as the expression
Figure FDA0004075466480000063
To determine the eigenvector U of the covariance matrix Var (X) i And a characteristic value lambda i N eigenvalues are arranged in descending order, namely lambda 123 ...>λ kk+1 >...>λ N Presetting lambda 1k The corresponding k eigenvectors form a principal component matrix, and the formed change matrix is U= { U 1 ,U 2 ,U 3 ...U k Then the expression of principal component matrix Y is y=u T X, the size of k is adjusted to adjust the dimension of the principal component matrix, i.e., to adjust the reduced dimension.
10. A method for sheep reproductive health warning according to any one of claims 1 to 9, comprising the steps of:
acquiring triaxial acceleration data of a ewe to obtain behavior data of the ewe, and preprocessing the behavior data to obtain prenatal behavior information of the ewe, wherein the preprocessing comprises denoising, windowing and inclination correction;
extracting characteristics of the behavior information to obtain characteristic values, wherein three time domain characteristics of acceleration data, namely variances of three axial data of x, y and z, are selected, and frequency domain characteristics are taken to be the mean value of the main peak frequency of the three axial data and the first five values of the energy value of the frequency of the three axial data, and nineteen characteristic values are totally selected;
identifying the prenatal exercise behaviors of the ewes according to the characteristic values to obtain sample behavior data, wherein the exercise behaviors comprise walking, standing, lying prone and planing, and identifying the prenatal exercise behaviors of the ewes by adopting a clustering algorithm and a neural network classification algorithm;
and inputting the sample behavior data into a trained long-short-term memory network LSTM for training so as to classify the prenatal behaviors of the ewes to obtain classification results, and carrying out sheep reproduction health early warning according to the classification results.
CN202310106924.9A 2023-02-13 2023-02-13 Sheep reproductive health early warning system and method Pending CN116071783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310106924.9A CN116071783A (en) 2023-02-13 2023-02-13 Sheep reproductive health early warning system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310106924.9A CN116071783A (en) 2023-02-13 2023-02-13 Sheep reproductive health early warning system and method

Publications (1)

Publication Number Publication Date
CN116071783A true CN116071783A (en) 2023-05-05

Family

ID=86181781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310106924.9A Pending CN116071783A (en) 2023-02-13 2023-02-13 Sheep reproductive health early warning system and method

Country Status (1)

Country Link
CN (1) CN116071783A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935439A (en) * 2023-07-18 2023-10-24 河北农业大学 Automatic monitoring and early warning method and automatic monitoring and early warning system for delivery of pregnant sheep

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935439A (en) * 2023-07-18 2023-10-24 河北农业大学 Automatic monitoring and early warning method and automatic monitoring and early warning system for delivery of pregnant sheep

Similar Documents

Publication Publication Date Title
Singh et al. Transforming sensor data to the image domain for deep learning—An application to footstep detection
CN106529442B (en) A kind of pedestrian recognition method and device
CN109620244B (en) Infant abnormal behavior detection method based on condition generation countermeasure network and SVM
CN109979161B (en) Human body falling detection method based on convolution cyclic neural network
Tahir et al. Hrnn4f: Hybrid deep random neural network for multi-channel fall activity detection
KR102265809B1 (en) Method and apparatus for detecting behavior pattern of livestock using acceleration sensor
Yang et al. PD-ResNet for classification of Parkinson’s disease from gait
CN108762503A (en) A kind of man-machine interactive system based on multi-modal data acquisition
CN116071783A (en) Sheep reproductive health early warning system and method
CN111216126B (en) Multi-modal perception-based foot type robot motion behavior recognition method and system
Kale et al. Human posture recognition using artificial neural networks
Wang et al. A2dio: Attention-driven deep inertial odometry for pedestrian localization based on 6d imu
CN113723239B (en) Magnetic resonance image classification method and system based on causal relationship
CN108182410A (en) A kind of joint objective zone location and the tumble recognizer of depth characteristic study
CN110555463B (en) Gait feature-based identity recognition method
CN117041972A (en) Channel-space-time attention self-coding based anomaly detection method for vehicle networking sensor
Malathi et al. Classification of diseases in paddy using deep convolutional neural network
Balakrishnan et al. Computing WHERE-WHAT classification through FLIKM and deep learning algorithms
Meena et al. An eXplainable Self Attention Based Spatial-Temporal Analysis for Human Activity Recognition
CN112861679A (en) Transfer learning method and system for behavior recognition
CN113887335A (en) Fall risk real-time evaluation system and method based on multi-scale space-time hierarchical network
Chauhan et al. Development of computational tool for lung cancer prediction using data mining
Hossain et al. A hybrid clustering pipeline for mining baseline local patterns in 3d point cloud
Mahjoub et al. Naive Bayesian fusion for action recognition from Kinect
CN117237902B (en) Robot character recognition system based on deep learning

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