CN115810365A - Pig health early warning method and system based on pig sound - Google Patents

Pig health early warning method and system based on pig sound Download PDF

Info

Publication number
CN115810365A
CN115810365A CN202111087024.1A CN202111087024A CN115810365A CN 115810365 A CN115810365 A CN 115810365A CN 202111087024 A CN202111087024 A CN 202111087024A CN 115810365 A CN115810365 A CN 115810365A
Authority
CN
China
Prior art keywords
pig
sound
early warning
audio signal
warning method
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
CN202111087024.1A
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.)
Chengdu Ruihu Electronic Technology Co ltd
Original Assignee
Chengdu Ruihu Electronic Technology 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 Chengdu Ruihu Electronic Technology Co ltd filed Critical Chengdu Ruihu Electronic Technology Co ltd
Priority to CN202111087024.1A priority Critical patent/CN115810365A/en
Publication of CN115810365A publication Critical patent/CN115810365A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Emergency Alarm Devices (AREA)

Abstract

The invention provides a pig health early warning method and system based on pig sound, wherein the method comprises the following steps: s1: collecting audio signals in the column through a sound collection card placed in the pig column; s2: preprocessing the acquired audio signal to acquire MFCC characteristics and store the MFCC characteristics as audio data to be uploaded; s3: transmitting the audio data to be uploaded to an edge computing host, filtering noise in the audio data, and extracting useful characteristic information; s4: inputting the useful characteristic information into a trained model for reasoning and classification, recording abnormal data according to a model classification result and reminding workers of abnormal sounds of pigs. Compared with the prior art, the method judges the health of the pigs through the sound characteristics of the pigs based on deep learning, can effectively improve early disease early warning of the pigs, improves supervision of a pigsty, and reduces safety risks of a farm.

Description

Pig health early warning method and system based on pig sound
Technical Field
The invention relates to the technical field of intelligent breeding, in particular to a pig health early warning method and system based on pig sound.
Background
The pig industry is an important component of the animal husbandry in China, and the yield and the total consumption of pork exceed 50 percent of that of other meat. With the continuous improvement of the scale, intensification and closed feeding degree of the pig industry in China, the development of the pig industry obtains remarkable achievements. At the same time, however, the contradiction between the supervision level of pigs and the continuously expanded culture scale is increasingly prominent.
Studies have shown that the cry of pigs can convey a variety of information, including health status. Therefore, the continuous monitoring of the cry for the farmers can provide useful information for aquaculture production. The traditional pig health judgment needs manual squat, a large amount of manpower and financial resources are consumed, and effective supervision on pig health cannot be carried out.
Disclosure of Invention
The invention aims to overcome the defects in the prior art and provide a pig health early warning method and system based on pig voice.
The purpose of the invention can be realized by the following technical scheme:
the invention provides a pig health early warning method based on pig sound, which comprises the following steps:
step 1: and audio signals in the column are acquired through a sound acquisition card placed in the column of the pig.
And 2, step: and preprocessing the acquired audio signals, acquiring MFCC characteristics and storing the MFCC characteristics as audio data to be uploaded. The method specifically comprises the following steps:
s2.1: pre-emphasis processing is carried out on the audio signal, so that a high-frequency signal of the audio signal is compensated;
s2.2: framing and windowing the pre-emphasized audio signal, and performing fast Fourier transform on each frame of audio signal after framing and windowing to obtain the frequency spectrum, the power spectrum and the energy spectrum of each frame;
s2.3: the energy spectrum is passed through a set of Mel-scale triangular filter banks, the logarithmic energy output by each filter bank is calculated, and the MFCC coefficients are obtained by discrete cosine transform.
The pre-emphasis process is to pass the audio signal through a high pass filter.
And step 3: and transmitting the audio data to be uploaded to an edge computing host, filtering noise in the audio data, and extracting useful characteristic information.
Further, noise in the audio data is filtered by a depth residual shrinkage network.
And 4, step 4: inputting the useful characteristic information into a trained model for reasoning and classification, recording abnormal data according to a model classification result and reminding workers of abnormal sounds of pigs.
The model is trained by adopting a deep convolutional neural network, and parameter adjustment is carried out through back propagation so as to enable the model to achieve the optimal classification performance.
The model classification results are accompanied by a score evaluation of 0-1.
Further, the score evaluation of more than 0.3 is normal and less than 0.3 is abnormal.
The abnormal data comprises discontinuous breathing sound, strange and harsh sound and frame-making sound of the pigs.
The invention also provides a pig health early warning system based on the pig sound, which comprises:
a sound acquisition card: the audio signal of a specific position in the column is collected;
the edge calculation host computer: the voice recognition system is used for extracting voice characteristic parameters MFCC in the collected audio signals, carrying out inference classification according to the MFCC, recording abnormal data according to a classification result and controlling an early warning loudspeaker to give an alarm;
an early warning horn: the device is used for alarming by abnormal sound and reminding workers that pigs only make abnormal sound.
Further, the specific locations include locations within the column away from the trough, and away from the hallway.
Compared with the prior art, the invention has the following advantages:
1. the invention utilizes a sound acquisition card to acquire sound data of the pigs at specific positions, and uses a convolutional neural network to automatically judge the sound health of the pigs.
2. The invention adopts the Mel cepstrum coefficient as the voice characteristics of the collected audio signal for analysis, and has good robustness and recognition performance.
3. According to the invention, the original audio characteristic parameters are preprocessed and then used as the training input of the neural network, the deep residual shrinkage network is used for filtering noise, useful characteristic information is extracted, and the problem of inaccurate judgment result caused by the fact that the traditional audio classification has more noise of model audio and the model has a simple structure is solved.
4. According to the method and the system, the abnormal data are recorded and alarmed according to the classification result, the supervision of the pigsty can be improved, and the safety risk of the farm is reduced.
Drawings
Fig. 1 is a schematic flow chart of a pig health warning method based on pig voice according to the present embodiment;
fig. 2 is a schematic structural diagram of a pig health early warning system based on a pig sound according to the present embodiment.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiments.
Examples
Referring to fig. 1, the embodiment provides a pig health warning method based on a pig sound, which includes the following steps:
s1: collecting audio signals in the column through a sound collection card placed in the column;
s2: extracting voice characteristic parameters MFCC in the audio signals, and storing the voice characteristic parameters MFCC as audio data to be uploaded;
in speech recognition and speaker recognition, the most commonly used speech features are Mel-scale frequency Cepstral Coefficients (MFCC for short). According to the research of human auditory mechanism, human ears have different auditory sensitivities to sound waves with different frequencies. Speech signals from 200HZ to 5000HZ have the greatest impact on speech intelligibility. When two sounds with different loudness are applied to human ears, the auditory perception of the frequency components with higher loudness affects the auditory perception of the frequency components with lower loudness, making them less noticeable, which is called masking effect. Since lower frequency sounds travel a greater distance up the cochlear inner basilar membrane than higher frequency sounds, generally bass sounds tend to mask treble sounds, while treble sounds mask bass sounds more difficult.
Therefore, the input signal is filtered by arranging a group of band-pass filters from dense to sparse according to the size of the critical bandwidth in the frequency band from low frequency to high frequency. The signal energy output by each band-pass filter is used as the basic characteristic of the signal, and the characteristic can be used as the input characteristic of voice after being further processed. Since the characteristics do not depend on the properties of the signals, no assumptions and restrictions are made on the input signals, and the research results of the auditory model are utilized. Therefore, the parameters have better robustness, are more consistent with the hearing characteristics of human ears, and still have better recognition performance when the signal-to-noise ratio is reduced.
S2.1: pre-emphasis processing is carried out on the audio signal, so that a high-frequency signal of the audio signal is compensated;
the pre-emphasis process passes the audio signal through a high-pass filter, which is calculated as follows:
H(Z)=1-μZ -1
wherein mu is a coefficient between 0.9 and 1.0, and H (Z) is the Z transformation of the audio signal processed by the high-pass filter.
As an alternative embodiment, μ takes a value of 0.97.
S2.2: framing and windowing the pre-emphasized audio signal, and performing fast Fourier transform on each frame of audio signal after framing and windowing to obtain the frequency spectrum, the power spectrum and the energy spectrum of each frame;
s2.2.1: framing the pre-emphasized audio signal;
s2.2.2: windowing each frame;
multiplying each frame by a hamming window to increase the continuity of the left and right ends of the frame, the formula is as follows:
S'(n)=S(n)×W(n)
Figure BDA0003266172860000041
wherein, S' (N) is the audio signal after windowing, S (N) is the signal after framing, N =0,1, …, N-1,N is the size of the frame, W (N) is the calculation formula of the hamming window, and a is the coefficient of the hamming window.
As an alternative embodiment, a has a value of 0.46.
S2.2.3: and carrying out fast Fourier transform on the audio signals of the frames after the framing and the windowing to obtain the frequency spectrum, the power spectrum and the energy spectrum of each frame.
S2.3: the energy spectrum is passed through a set of Mel-scale triangular filter banks, the logarithmic energy output by each filter bank is calculated, and the MFCC coefficients are obtained by discrete cosine transform.
S2.3.1: and (3) passing the energy spectrum through a set of Mel-scale triangular filter banks, and calculating the logarithmic energy output by each filter bank, wherein the formula is as follows:
Figure BDA0003266172860000042
wherein H m (k) Is the frequency response of the triangular filter bank, | X a (k)| 2 For the energy spectrum of each frame after fast Fourier transform, S (M) is the logarithmic energy output by the mth triangular filter bank, M is the number of filters in the triangular filter bank, and k is the sampling sequenceAnd N is the number of sampling points.
S2.3.2: obtaining MFCC coefficients by cosine transformation of logarithmic energy, wherein the formula is as follows:
Figure BDA0003266172860000043
wherein, C (n) is the nth order MFCC coefficient, n =1,2, ·, L is the MFCC coefficient order, and S (m) is the logarithmic energy output by the mth triangular filter bank.
S3: transmitting the audio data to be uploaded to an edge computing host, filtering noise in the audio data by adopting a depth residual shrinkage network, and extracting useful characteristic information;
the depth residual shrinking network is a depth integration of the depth residual network, attention mechanism and soft thresholding. The important features noted by the attention mechanism are retained by setting the soft threshold value to 0, so that the useful features are extracted from the noise-containing audio signal.
S4: inputting the useful characteristic information into a trained model for reasoning and classification, recording abnormal data according to a model classification result and reminding workers of abnormal sounds of pigs.
The model adopts a Convolutional Neural Network (CNN) for network training, and parameter adjustment is carried out through back propagation so as to achieve the optimal performance of classification. Each classification result is accompanied by a score evaluation of 0-1, and a score threshold of 0.3 is set, normal if greater than 0.3 and abnormal if less than 0.3. Abnormal data include discontinuous breathing sounds, strange and harsh sounds and framing sounds of pigs.
Referring to fig. 2, the embodiment further provides a pig health warning system based on a pig sound, including: the system comprises a sound acquisition card, an edge calculation host and an early warning loudspeaker.
A sound acquisition card: the audio signal of a specific position in the column is collected;
the edge calculation host computer: the voice recognition system is used for extracting voice characteristic parameters MFCC in the collected audio signals, carrying out inference classification according to the MFCC, recording abnormal data according to a classification result and controlling an early warning loudspeaker to give an alarm;
the early warning loudspeaker: the device is used for alarming by abnormal sound and reminding workers that pigs only make abnormal sound.
As an alternative embodiment, the sound capture card is placed in a column remote from the trough, remote from the trough and remote from the corridor.
The method utilizes the sound acquisition card to acquire the sound data of the pig at a specific position, and adopts the Mel cepstrum coefficient as the voice characteristic of the acquired audio signal for analysis, so that the method has good robustness and better identification performance; secondly, taking the Mel cepstrum coefficient as training input of a neural network, filtering noise by using a deep residual shrinkage network, extracting useful characteristic information, and solving the problem of inaccurate judgment result caused by much noise of model audio and simple structure of the model in the traditional audio classification; and finally, according to the classification result record, alarming is carried out on abnormal data, so that the supervision of the pigsty can be improved, and the safety risk of the farm is reduced.
The embodiments described above are described to facilitate an understanding and use of the invention by those skilled in the art. It will be readily apparent to those skilled in the art that various modifications to these embodiments may be made, and the generic principles described herein may be applied to other embodiments without the use of the inventive faculty. Therefore, the present invention is not limited to the above embodiments, and those skilled in the art should make improvements and modifications within the scope of the present invention based on the disclosure of the present invention.

Claims (10)

1. A pig health early warning method based on pig sound is characterized by comprising the following steps:
s1: collecting audio signals in the column through a sound collection card placed in the pig column;
s2: preprocessing the acquired audio signal to acquire MFCC characteristics and store the MFCC characteristics as audio data to be uploaded;
s3: transmitting the audio data to be uploaded to an edge computing host, filtering noise in the audio data, and extracting useful characteristic information;
s4: inputting the useful characteristic information into a trained model for reasoning and classification, recording abnormal data according to a model classification result and reminding workers of abnormal sounds of pigs.
2. The pig sound-based pig health warning method according to claim 1, wherein the S2 comprises the following steps:
s2.1: pre-emphasis processing is carried out on the audio signal, so that a high-frequency signal of the audio signal is compensated;
s2.2: framing and windowing the pre-emphasized audio signal, and performing fast Fourier transform on each frame of audio signal after framing and windowing to obtain the frequency spectrum, the power spectrum and the energy spectrum of each frame;
s2.3: the energy spectrum is passed through a set of Mel-scale triangular filter banks, the logarithmic energy output by each filter bank is calculated, and the MFCC coefficients are obtained by discrete cosine transform.
3. The pig sound-based pig health warning method of claim 2, wherein the pre-emphasis process is to pass the audio signal through a high pass filter.
4. The pig sound-based pig health warning method of claim 1, wherein noise in the audio data is filtered by a depth residual shrinkage network.
5. The pig sound-based pig health early warning method according to claim 1, wherein the model is trained by using a deep convolutional neural network, and parameter adjustment is performed through back propagation so that the model achieves the optimal performance of classification.
6. The pig sound-based pig health warning method of claim 1, wherein the model classification result is accompanied by a score evaluation of 0-1.
7. The pig sound-based pig health warning method of claim 6, wherein the score evaluation is greater than 0.3 for normal and less than 0.3 for abnormal.
8. The pig sound-based pig health warning method of claim 1, wherein the abnormal data comprises pig discontinuous breathing sound, strange harsh sound and framing sound.
9. A pig health early warning system based on pig sound is characterized by comprising:
a sound acquisition card: the audio signal used for collecting the specific position in the column;
the edge calculation host computer: the voice recognition system is used for extracting voice characteristic parameters MFCC in the collected audio signals, performing inference classification according to the MFCC, recording abnormal data according to a classification result, and controlling an early warning loudspeaker to give an alarm;
the early warning loudspeaker: the device is used for alarming abnormal sound and reminding workers that pigs only make abnormal sound.
10. The pig sound-based pig health warning system of claim 9, wherein the specific location comprises a location within a column remote from the trough, and remote from the corridor.
CN202111087024.1A 2021-09-16 2021-09-16 Pig health early warning method and system based on pig sound Pending CN115810365A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111087024.1A CN115810365A (en) 2021-09-16 2021-09-16 Pig health early warning method and system based on pig sound

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111087024.1A CN115810365A (en) 2021-09-16 2021-09-16 Pig health early warning method and system based on pig sound

Publications (1)

Publication Number Publication Date
CN115810365A true CN115810365A (en) 2023-03-17

Family

ID=85482274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111087024.1A Pending CN115810365A (en) 2021-09-16 2021-09-16 Pig health early warning method and system based on pig sound

Country Status (1)

Country Link
CN (1) CN115810365A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116862530A (en) * 2023-06-25 2023-10-10 江苏华泽微福科技发展有限公司 Intelligent after-sale service method and system
CN117423342A (en) * 2023-10-27 2024-01-19 东北农业大学 Pig abnormal state monitoring method and system based on edge calculation

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116862530A (en) * 2023-06-25 2023-10-10 江苏华泽微福科技发展有限公司 Intelligent after-sale service method and system
CN116862530B (en) * 2023-06-25 2024-04-05 江苏华泽微福科技发展有限公司 Intelligent after-sale service method and system
CN117423342A (en) * 2023-10-27 2024-01-19 东北农业大学 Pig abnormal state monitoring method and system based on edge calculation
CN117423342B (en) * 2023-10-27 2024-06-07 东北农业大学 Pig abnormal state monitoring method and system based on edge calculation

Similar Documents

Publication Publication Date Title
CN109258509B (en) Intelligent monitoring system and method for abnormal sound of live pigs
CN109243470B (en) Broiler cough monitoring method based on audio technology
CN106847293A (en) Facility cultivation sheep stress behavior acoustical signal monitoring method
CN108198562A (en) A kind of method and system for abnormal sound in real-time positioning identification animal house
CN109044396B (en) Intelligent heart sound identification method based on bidirectional long-time and short-time memory neural network
CN115810365A (en) Pig health early warning method and system based on pig sound
CN112164408A (en) Pig coughing sound monitoring and early warning system based on deep learning
CN112820275A (en) Automatic monitoring method for analyzing abnormality of suckling piglets based on sound signals
CN106340309A (en) Dog bark emotion recognition method and device based on deep learning
CN109817227B (en) Abnormal sound monitoring method and system for farm
CN105336331A (en) Intelligent monitoring method and intelligent monitoring system for abnormal behaviors of pigs on basis of sound
CN109741759B (en) Acoustic automatic detection method for specific bird species
CN109479750A (en) A kind of plum mountain pig heat monitoring method based on acoustic information
Liu et al. Bowel sound detection based on MFCC feature and LSTM neural network
CN110731778A (en) respiratory sound signal identification method and system based on visualization
CN115048984A (en) Sow oestrus recognition method based on deep learning
CN110942784A (en) Snore classification system based on support vector machine
CN114203187A (en) Pig singing recognition system and method based on MFCC coefficient
CN113599052A (en) Snore monitoring method and system based on deep learning algorithm and corresponding electric bed control method and system
Zhang et al. A novel insect sound recognition algorithm based on MFCC and CNN
Wang et al. Automatic detection of continuous pig cough in a complex piggery environment
Wei et al. Recognition of behavior state of Penaeus vannamei based on passive acoustic technology
CN111862991A (en) Method and system for identifying baby crying
Bayat et al. Identification of Aras Birds with convolutional neural networks
CN113257226B (en) Improved characteristic parameter language identification method based on GFCC

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